@livepreso/cdk 0.0.4 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/10.js +2 -0
- package/dist/101.js +2 -0
- package/dist/112.css +11 -0
- package/dist/112.js +17 -0
- package/dist/180.js +9 -0
- package/dist/256.css +2 -0
- package/dist/256.js +2 -0
- package/dist/400.js +2 -0
- package/dist/499.js +2 -0
- package/dist/53.js +2 -0
- package/dist/698.css +2 -0
- package/dist/698.js +2 -0
- package/dist/706.js +2 -0
- package/dist/911.js +2 -0
- package/dist/assets/6c19b40c7cf1d183.svg +1 -0
- package/dist/backend/cli.mjs +186 -58
- package/dist/main.css +1 -1
- package/dist/main.js +54 -69
- package/package.json +7 -5
- package/src/shared/cdk-files.mjs +3 -0
- package/src/shared/modes.mjs +8 -4
package/dist/256.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(self.rspackChunk_livepreso_cdk=self.rspackChunk_livepreso_cdk||[]).push([[256],{32152(e){function t(e){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=32152,e.exports=t},91525(e){function t(e){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=91525,e.exports=t},60562(e,t,n){"use strict";n.d(t,{StageHost:()=>u1});var r,o,i,a,s,l,c,u,f,p,d,h,y,v,b,g,m,w,O,k,_,j,S,P,C=n(78667),x=n(9051),E=n(20797),T=n(78553),I=n(56167),R=n(27094),D=n.n(R),N=n(53379),A=n(72111),B=n(15854),F=n(41129);n(22521),n(73541);var M=n(22300),L=n.n(M),U=n(7379),V=n.n(U);function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $(e){return($=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function W(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(W=function(){return!!e})()}function K(e,t){return(K=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var q=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=[e],r=$(r),(t=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,W()?Reflect.construct(r,o||[],$(this).constructor):r.apply(this,o))).state={width:0,height:0},t}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&K(n,e),t=[{key:"componentDidMount",value:function(){var e=this,t=document.getElementById(this.props.id).getContext("2d"),n=new Image;n.src=this.props.image;var r=this.props.maxWidth,o=this.props.maxHeight;D()(n).load(function(){var i=0,a=0;if(r||o){var s=n.width/n.height;if(r&&!o&&n.width>r||r/o<s&&n.width>r){var l=r/n.width;a=1/s*(i=n.width*l)}else if(o&&!r&&n.height>o||r/o>s&&n.height>o){var c=o/n.height;i=(a=n.height*c)*s}else i=n.width,a=n.height}else i=n.width,a=n.height;e.setState({width:i,height:a}),t.drawImage(n,0,0,i,a)})}},{key:"handleClick",value:function(e){if(this.props.active){var t=document.getElementById(this.props.id),n=e.pageX-D()(t).offset().left,r=e.pageY-D()(t).offset().top,o=t.getContext("2d").getImageData(n,r,1,1).data,i="rgba(".concat(o[0],", ").concat(o[1],", ").concat(o[2],", 1)");this.props.onChange(i)}this.props.onClick(e)}},{key:"render",value:function(){var e=V()(this.props.className,{"sp-eye-dropper":!0,active:this.props.active});return(0,C.jsx)("canvas",{className:e,width:this.state.width,height:this.state.height,id:this.props.id,onClick:this.handleClick.bind(this)})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);z(q,"displayName","EyeDropper"),z(q,"propTypes",{className:L().string,id:L().string.isRequired,image:L().string.isRequired,maxWidth:L().number,maxHeight:L().number,active:L().bool,onClick:L().func,onChange:L().func}),z(q,"defaultProps",{active:!0,onClick:function(){},onChange:function(){}});var H=n(1668);function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J(e){return(J=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function G(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(G=function(){return!!e})()}function Y(e,t){return(Y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(0,H.P)((h=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t,r;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=J(t),Z(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,G()?Reflect.construct(t,r||[],J(this).constructor):t.apply(this,r)),"handleColorChange",function(t){e.props.open&&(e.props.onChange(t),e.props.toggle(!1))}),Z(e,"handleClick",function(t){e.props.onClick(t)}),Z(e,"handleIconClick",function(t){e.props.open||e.props.toggle(!0),e.props.onIconClick(t)}),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&Y(n,e),t=[{key:"render",value:function(){return(0,C.jsxs)("div",{className:"sp-eye-dropper-input ".concat(this.props.className),ref:this.props.forwardRef,children:[(0,C.jsx)(q,{id:this.props.id,maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,image:this.props.image,active:this.props.open,onClick:this.handleClick,onChange:this.handleColorChange}),(0,C.jsx)(F.IconButton,{iconName:"colorize",disabled:this.props.open,onClick:this.handleIconClick})]})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component),Z(h,"displayName","EyeDropperInput"),Z(h,"propTypes",{className:L().string,id:L().string.isRequired,image:L().string.isRequired,maxWidth:L().number,maxHeight:L().number,onClick:L().func,onChange:L().func,onIconClick:L().func}),Z(h,"defaultProps",{onClick:function(){},onChange:function(){},onIconClick:function(){}}),h)),n(78858);var X=n(79937);function Q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function et(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(et=function(){return!!e})()}function en(e,t){return(en=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(0,X.N)((Q(y=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=[e],r=ee(r),(t=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,et()?Reflect.construct(r,o||[],ee(this).constructor):r.apply(this,o))).innerContainerRef=x.createRef(),t}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&en(n,e),t=[{key:"render",value:function(){var e=this.props.innerClassName,t=this.props.getClasses("sp-paper");return(0,C.jsx)("div",{className:t,children:(0,C.jsx)("div",{ref:this.innerContainerRef,className:"".concat(e," sp-paper-container"),style:this.props.innerStyle||{},children:this.props.children})})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component),"propTypes",{innerClassName:L().string,innerStyle:L().object}),Q(y,"defaultProps",{innerClassName:""}),y)).propTypes={innerClassName:L().string,innerStyle:L().object},n(69562);var er=n(29083),eo=n(26549),ei=n.n(eo),ea=n(49422);function es(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function el(e){return(el=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ec(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ec=function(){return!!e})()}function eu(e,t){return(eu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ef=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=el(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,ec()?Reflect.construct(e,t||[],el(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&eu(n,e),t=[{key:"render",value:function(){var e,t,n=ei().omit(this.props,["className"]),r=n.id,o=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(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}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(n,["id"]),i=V()("sp-dialog",this.props.className),a=null;this.props.title&&(a="[object String]"===Object.prototype.toString.call(this.props.title)?(0,C.jsx)("h3",{className:"sp-dialog-title",children:this.props.title}):this.props.title);var s=null;return s=this.props.isTask?this.props.children:(0,C.jsx)("div",{className:"sp-dialog-content",children:this.props.children}),(0,C.jsxs)(er.R,(e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){es(e,t,n[t])})}return e}({},ei().omit(o,["title"])),t=t={id:r,className:i,children:[a,s]},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e))}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);es(ef,"displayName","Dialog"),es(ef,"propTypes",{id:L().string,title:L().node,width:ea.A,height:ea.A,visible:L().bool});var ep=n(31272);function ed(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eh(e){return(eh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ey(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ey=function(){return!!e})()}function ev(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){ed(e,t,n[t])})}return e}function eb(e,t){return(eb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var eg=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=[e],r=eh(r),(t=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,ey()?Reflect.construct(r,o||[],eh(this).constructor):r.apply(this,o))).transitionRef=x.createRef(),t}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&eb(n,e),t=[{key:"render",value:function(){var e=this,t=this.props,n=t.show,r=t.duration,o=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(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}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(t,["show","duration"]),i={transition:"opacity ".concat(r,"ms ease-in-out"),opacity:0},a={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0,height:"0px"}};return(0,C.jsx)(ep.Ay,{in:n,timeout:r,nodeRef:this.transitionRef,children:function(t){var r,s;return(0,C.jsx)(ef,(r=ev({},o),s=s={forwardRef:e.transitionRef,visible:n,transitionStyle:ev({},i,a[t])},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(s)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(s)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(s,e))}),r))}})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);ed(eg,"displayName","Dialog"),ed(eg,"propTypes",{show:L().bool,duration:L().number}),ed(eg,"defaultProps",{show:!1,duration:300});var em=n(25589),ew=n(12213),eO=n(84462);function ek(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e_(e){return(e_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ej(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ej=function(){return!!e})()}function eS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){ek(e,t,n[t])})}return e}function eP(e,t){return(eP=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var eC=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=[e],r=e_(r),(t=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,ej()?Reflect.construct(r,o||[],e_(this).constructor):r.apply(this,o))).transitionRef=e.forwardRef||x.createRef(),t}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&eP(n,e),t=[{key:"render",value:function(){var e=this,t=this.props,n=t.show,r=t.duration,o=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(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}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(t,["show","duration"]),i={transition:"opacity ".concat(r,"ms ease-in-out"),opacity:0},a={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0,pointerEvents:"none"},exited:{opacity:0,height:"0px",pointerEvents:"none"}};return(0,C.jsx)(eO.o.Consumer,{children:function(t){var s=t.root;return ew.createPortal((0,C.jsx)(ep.Ay,{in:n,timeout:r,nodeRef:e.transitionRef,unmountOnExit:!0,children:function(t){var n,r;return(0,C.jsx)(em.a,(n=eS({},o),r=r={forwardRef:e.transitionRef,transitionStyle:eS({},i,a[t])},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n))}}),s)}})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);ek(eC,"displayName","Modal"),ek(eC,"propTypes",{show:L().bool,duration:L().number}),ek(eC,"defaultProps",{show:!1,duration:300});var ex=n(83136),eE=n(55162);n(5980),n(7459),n(99086),n(13479),n(89362),n(55857),n(93389),n(7127);var eT=n(55018),eI=n(11692);function eR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eD(e){return(eD=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eN=function(){return!!e})()}function eA(e,t){return(eA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(0,X.N)((v=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t,r;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=eD(t),eR(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,eN()?Reflect.construct(t,r||[],eD(this).constructor):t.apply(this,r)),"handleClick",function(){e.props.onClick(e.props.value)}),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&eA(n,e),t=[{key:"render",value:function(){var e=this.props,t=e.getClasses,n=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(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}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,["getClasses"]),r=null;this.props.color&&(r={color:(0,eI.A)(this.props.color).toHexString()});var o={inputType:"radio",switchElement:(0,C.jsxs)("div",{children:[(0,C.jsx)("div",{className:"sp-radio-button-target",children:(0,C.jsx)(eE.I,{value:"radio_button_unchecked"})}),(0,C.jsx)("div",{className:"sp-radio-button-fill",style:r,children:(0,C.jsx)(eE.I,{value:"radio_button_checked"})})]}),className:t({"sp-radio-button":!0,"sp-has-color":this.props.color}),iconClassName:"sp-radio-button-icon",onClick:this.handleClick,labelPosition:this.props.labelPosition?this.props.labelPosition:"right"};return(0,C.jsx)(eT.n,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){eR(e,t,n[t])})}return e}({},ei().omit(n,["onClick"]),o))}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component),eR(v,"displayName","RadioButton"),eR(v,"propTypes",{onClick:L().func,color:L().string}),eR(v,"defaultProps",{onClick:function(){}}),v));function eB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eF(e){return(eF=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eM(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eM=function(){return!!e})()}function eL(e,t){return(eL=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var eU=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t,r;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=eF(t),eB(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,eM()?Reflect.construct(t,r||[],eF(this).constructor):t.apply(this,r)),"handleChange",function(t,n,r){t.props.onClick&&t.props.onClick.call(t,r),e.props.onChange(r,n)}),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&eL(n,e),t=[{key:"render",value:function(){var e=this;return(0,C.jsx)("div",{className:this.props.className,children:x.Children.map(this.props.children,function(t,n){var r,o,i=(r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){eB(e,t,n[t])})}return e}({selected:t.props.value===e.props.selectedValue,name:t.props.value},t.props),o=o={key:n,onClick:function(r){return e.handleChange(t,n,r)}},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}),r);return e.props.labelPosition&&(i.labelPosition=e.props.labelPosition),x.cloneElement(t,i)})})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);eB(eU,"displayName","RadioButtonGroup"),eB(eU,"propTypes",{name:L().string.isRequired,labelPosition:L().oneOf(["left","right"]),onChange:L().func}),eB(eU,"defaultProps",{onChange:function(){}});var eV=n(93511),ez=n(53917);function e$(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eW(e){return(eW=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eK=function(){return!!e})()}function eq(e,t){return(eq=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(0,X.N)((0,ez.s)((b=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=[e],r=eW(r),e$(t=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,eK()?Reflect.construct(r,o||[],eW(this).constructor):r.apply(this,o)),"handleStartUpdates",function(e){t.props.disabled||t.props.startUpdates(e)}),t.containerRef=e.forwardRef||x.createRef(),t}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&eq(n,e),t=[{key:"render",value:function(){var e,t=this.props.getClasses((e$(e={"sp-slider":!0},this.props.vertical?"sp-vertical":"sp-horizontal",!0),e$(e,"sp-disabled",this.props.disabled),e$(e,"sp-active",this.props.active),e)),n={backgroundColor:this.props.background},r=this.props.vertical?"bottom":"left",o=this.props.getPercentageValue(this.props.value),i=e$({},r,o);return(0,C.jsxs)("div",{className:t,onMouseDown:this.handleStartUpdates,onTouchStart:this.handleStartUpdates,ref:this.containerRef,children:[(0,C.jsx)("div",{className:"sp-slider__track",style:n}),this.props.rect&&(0,C.jsx)("div",{className:"sp-slider__distance",style:{width:o}}),this.props.rect&&(0,C.jsx)("div",{className:"sp-slider__pointer",style:i})]})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component),e$(b,"displayName","Slider"),e$(b,"propTypes",{value:L().number.isRequired,vertical:L().bool,background:L().string,disabled:L().bool}),e$(b,"defaultProps",{value:0,vertical:!1,background:"",disabled:!1}),b)));var eH=n(8986);n(62923);var eZ=n(59147);n(51285),n(10562),n(83923),n(75580),n(80368);var eJ=n(68549),eG=n(51204),eY=n(4817),eX=n(39683),eQ=n.n(eX),e0=n(17366),e1=n.n(e0);function e2(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e3(e){return(e3=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function e5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(e5=function(){return!!e})()}function e4(e,t){return(e4=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(0,X.N)((0,H.P)((0,eY.K)((g=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){if(!(this instanceof n))throw TypeError("Cannot call a class as a function");t=n,r=[e],t=e3(t),e2(o=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,e5()?Reflect.construct(t,r||[],e3(this).constructor):t.apply(this,r)),"handleChange",function(e){o.setState({value:e,highlightedPos:-1,highlightedValue:{id:""}})}),e2(o,"handleClear",function(){o.setState({value:"",highlightedPos:-1,highlightedValue:{id:""}}),o.props.onChange(""),o.focusInput=!0}),e2(o,"handleItemClick",function(e){o.setState({selectedValue:e}),o.handleItemHover(e),o.props.toggle(!1),o.props.onChange(e)}),e2(o,"handleItemHover",function(e){var t=-1;ei().each(o.subZoneList,function(n,r){n.id===e.id&&(t=r)}),o.setState({highlightedValue:e,highlightedPos:t})}),o.allZones={},o.subZones=!1,o.subZoneList=[],o.prevValue=!1,o.focusInput=!1,ei().forEach(e1().tz.names(),function(e){var t=e1().tz(e);o.allZones[e]={id:e,name:e.replace(/_/g," "),offset:"UTC "+t.format("Z"),nOffset:t.utcOffset()}}),o.allZones=ei().sortBy(o.allZones,"name"),o.subZones={zones:o.allZones};var t,r,o,i=e.currentZone&&""!==e.currentZone?e.currentZone:e1().tz.guess(),a=e1().tz(i);return o.state={selectedValue:{id:i,name:i.replace(/_/g," "),offset:"UTC "+a.format("Z"),nOffset:a.utcOffset()},value:e.value||"",highlightedValue:{id:""},highlightedPos:-1},o.containerRef=e.forwardRef||x.createRef(),e.setWindowListeners({keydown:function(e){return o.handleWindowKeyDown(e)}}),o}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&e4(n,e),t=[{key:"UNSAFE_componentWillMount",value:function(){this._uniqueId=ei().uniqueId("time-zone-")}},{key:"componentDidUpdate",value:function(){this.focusInput&&(D()(this.containerRef.current).find("#"+this.props.searchId).focus(),this.focusInput=!1)}},{key:"handleControlClick",value:function(e){this.props.disabled||this.props.toggle(),this.focusInput=!0}},{key:"handleWindowKeyDown",value:function(e){if(this.props.open)switch(e.keyCode){case eG.A.UP:e.preventDefault(),this.updateHighlightPos(-1);break;case eG.A.DOWN:e.preventDefault(),this.updateHighlightPos(1);break;case eG.A.ENTER:e.preventDefault(),this.handleItemClick(this.state.highlightedValue);break;default:return}}},{key:"updateHighlightPos",value:function(e){var t=this.state.highlightedPos,n=this.state.highlightedValue,r=t+e;-1===t?e>0&&(t=0):(r<this.subZoneList.length&&r>=0&&(t+=e),r<0&&(t=-1)),n=t>=0?this.subZoneList[t]:{id:""};var o=D()(this.containerRef.current).find("#"+this.props.scrollId),i=o.find(".sp-list__item").eq(t),a=o.scrollTop(),s=i.position().top;if(t>0){var l=0;this.props.maxHeight<s+i.height()?(l=a+(s-this.props.maxHeight),o.scrollTop(l)):s-i.height()<0&&((l=a+(s-i.height()))>=0?o.scrollTop(l):o.scrollTop(0))}else o.scrollTop(0);this.setState({highlightedPos:t,highlightedValue:n})}},{key:"localZones",value:function(e){var t=e1()().utcOffset(),n=e1().tz.guess().split("/")[0],r=this.props.localRange||60,o=ei().filter(e,function(e){var o=e.nOffset;return e.id.split("/")[0]===n&&ei().inRange(o,t-r,t+r)});o=ei().sortBy(o,function(e){return Math.abs(t-e.nOffset)});var i=this.state.selectedValue.id||e1().tz.guess();o=ei().filter(o,function(e){return e.id!==i});var a=e1().tz(i);return a={id:i,name:i.replace(/_/g," "),offset:"UTC "+a.format("Z"),nOffset:a.utcOffset()},o.unshift(a),o.slice(0,5)}},{key:"makeDescription",value:function(){var e=this.props.description;return e?(0,C.jsx)("p",{className:"sp-dropdown-description",children:e}):null}},{key:"getListItems",value:function(e,t,n){var r=this;return(0,C.jsxs)("div",{children:[e?(0,C.jsx)(eJ.a6,{value:e}):null,t.map(function(e,t){var n=(0,C.jsxs)("p",{children:[e.name," ",e.offset]}),o=r.state.selectedValue.id===e.id,i=r.state.highlightedValue.id===e.id;return(0,C.jsx)(eJ.ck,{useHover:!1,primaryText:n,selected:o,highlighted:i,onClick:function(){return r.handleItemClick(e)},onMouseEnter:function(){return r.handleItemHover(e)}},"".concat(t,"-").concat(e.id))})]})}},{key:"getList",value:function(){var e=this,t={},n=[];return this.state.value.length>=3?(t.zones=n=eQ().filter(this.state.value,this.allZones.map(function(e){return e.name})).map(function(t){var n=t.index;return e.allZones[n]}),this.subZoneList=n):n=this.allZones,this.props.showLocal&&this.state.value.length<3&&(t.local=this.localZones(n),this.subZoneList=t.local),this.subZones=t,D()("#"+this.props.scrollId).scrollTop(0),t}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.icon,o=n.open,i=n.disabled,a=n.scrollId,s=n.searchId,l=this.state,c=l.value,u=l.selectedValue,f=this.props.getClasses({"sp-timezone-picker":!0,"sp-dropdown":!0,"sp-dropdown--open":o,"sp-dropdown--disabled":i,"sp-dropdown--has-icon":r}),p={maxHeight:this.props.maxHeight},d={value:c,icon:r,id:s,onChange:this.handleChange,onFocus:this.handleFocus,onBlur:this.handleBlur,onClearInput:this.handleClear,onLeaveInput:this.handleClear};c!==this.prevValue?(e=this.getList(),this.prevValue=c):e=this.subZones;var h=u.name+" "+u.offset;return(0,C.jsxs)("div",{className:f,ref:this.containerRef,children:[this.props.label?(0,C.jsx)("label",{htmlFor:this._uniqueId,className:"sp-input-label",children:(0,C.jsx)("p",{children:this.props.label})}):null,(0,C.jsxs)("div",{className:"sp-timezone-rel",children:[(0,C.jsxs)("div",{className:"sp-menu-control",onClick:function(e){return t.handleControlClick(e)},children:[(0,C.jsx)("div",{className:"sp-menu-label",children:h}),(0,C.jsx)("div",{className:"sp-menu-dropdown-icon",children:(0,C.jsx)(eE.I,{value:this.props.open?"arrow_drop_up":"arrow_drop_down"})}),(0,C.jsx)("div",{className:"sp-menu-control-underline"})]}),this.props.open&&(0,C.jsxs)("div",{className:"sp-menu sp-menu-pinnable sp-visible sp-menu-pinning-top-left",children:[(0,C.jsx)(eV.L,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){e2(e,t,n[t])})}return e}({},d)),(0,C.jsxs)(eJ.B8,{className:"sp-scrollable sp-timezone-list",style:p,setId:a,children:[e.local&&this.getListItems("Local Zones",e.local,this.state.value,"local"),e.zones&&this.getListItems(!1,e.zones,this.state.value,"zones")]})]})]})]})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component),e2(g,"displayName","TimeZonePicker"),e2(g,"propTypes",{className:L().string,disabled:L().bool,errors:L().arrayOf(L().string),description:L().string,label:L().string,onChange:L().func,icon:L().string,showLocal:L().bool,localRange:L().number,value:L().string,maxHeight:L().number,scrollId:L().string,searchId:L().string,currentZone:L().string}),e2(g,"defaultProps",{showLocal:!0,localRange:60,maxHeight:300,errors:[],scrollId:"sp-zone-scroll",searchId:"sp-zone-search",onChange:function(){}}),g))));var e6=n(95867),e8=n.n(e6);n(10609),n(6663),n(26266),n(99094),n(84577),n(79027);var e9=n(92566),e7=n(22482);function te(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tt(e){return(tt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tn=function(){return!!e})()}function tr(e,t){return(tr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var to=(0,e7.tG)("RichTextField"),ti=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){if(!(this instanceof n))throw TypeError("Cannot call a class as a function");t=n,r=[e],t=tt(t),te(o=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,tn()?Reflect.construct(t,r||[],tt(this).constructor):t.apply(this,r)),"handleEditorChange",function(e){o.setState({value:e}),o.props.onChange(e)});var t,r,o,i=e.initialValue;return void 0!==e.value&&to.warn("'value' has been deprecated as a prop. It has been replaced with 'initialValue'. Set initialValue on initial load, and use the onChange callback to get value updates"),o.state={initialValue:i,value:i},o}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&tr(n,e),t=[{key:"render",value:function(){var e=this.props,t=e.disabled,n=e.fullWidth,r=e.maxChars,o=e.toolbarOptions,i=this.state.value,a=""!==ei().trim(i),s=V()("sp-rich-text-field",{"sp-has-value":a,"sp-is-disabled":t,"sp-full-width":n,"sp-has-max-chars":r,"sp-is-over-max-chars":null!==r&&i.length>r});return(0,C.jsx)("div",{className:s,children:(0,C.jsx)(e9.K,{initialValue:this.state.initialValue,disabled:t,onInit:this.props.onInit,init:{height:this.props.height,skin:!1,menubar:!1,toolbar:o,plugins:"link autolink lists",target_list:!1,link_default_target:"_blank",valid_elements:"a[rel|rev|charset|hreflang|tabindex|accesskey|type|name|href|target|title|class],strong/b,em/i,strike,u,#p,-ol[type|compact],-ul[type|compact],-li,br,-sub,-sup,-blockquote,-div,-span[style],-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],small",browser_spellcheck:!0,contextmenu:!1,resize:!1,statusbar:!1},onEditorChange:this.handleEditorChange})})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);te(ti,"displayName","RichTextField"),te(ti,"propTypes",{disabled:L().bool,fullWidth:L().bool,onChange:L().func,initialValue:L().any,maxChars:L().number}),te(ti,"defaultProps",{disabled:!1,fullWidth:!0,maxChars:null,onChange:function(){},onInit:function(){},initialValue:"",height:200,toolbarOptions:"blocks | bold italic underline strikethrough monospace superscript subscript | bullist numlist | indent outdent | link unlink"});var ta=n(51510);let ts={tag:"------modules-components-components-inputs-tag-picker-Tag__tag",selected:"------modules-components-components-inputs-tag-picker-Tag__selected",dark:"------modules-components-components-inputs-tag-picker-Tag__dark"};function tl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tc(e){return(tc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tu=function(){return!!e})()}function tf(e,t){return(tf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var tp=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=tc(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,tu()?Reflect.construct(e,t||[],tc(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&tf(n,e),t=[{key:"render",value:function(){var e,t,n=this.props,r=n.tagKey,o=n.description,i=n.iconName,a=n.onClick,s=n.translations,l=n.selected,c=n.className,u=o||(null==(e=s.tagPicker)?void 0:e.noDesc)||"No description",f="dark"===this.props.theme,p=V()(ts.tag,(tl(t={},ts.dark,f),tl(t,ts.selected,l),tl(t,c,c),t));return(0,C.jsx)(ta.c,{className:p,onClick:a?function(){return a(r)}:null,rightColumn:(0,C.jsx)(eE.I,{className:ts.icon,value:i}),primaryText:r,secondaryText:u,secondaryTextLines:3})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);tl(tp,"propTypes",{theme:L().oneOf(["dark","light"]),tagKey:L().string.isRequired,description:L().string,iconName:L().string,selected:L().bool,onClick:L().func,translations:L().object,className:L().string}),tl(tp,"defaultProps",{theme:"light",description:null,iconName:null,onClick:null,translations:{}});var td=n(68055),th=n(94664);function ty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tv(e){return(tv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tb=function(){return!!e})()}function tg(e,t){return(tg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var tm=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t,r;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=tv(t),ty(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,tb()?Reflect.construct(t,r||[],tv(this).constructor):t.apply(this,r)),"state",{open:!1}),ty(e,"popoverRef",x.createRef()),ty(e,"checkClickaway",function(t){if(t.target.isConnected){var n=e.popoverRef.current,r=th.A.isDescendant(n,t.target),o=e.props.onClickAway;r||n===t.target||o()}}),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&tg(n,e),t=[{key:"componentDidMount",value:function(){var e=this;this.listenerTimeout=setTimeout(function(){e.addListener()},500)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.listenerTimeout),D()("body").off("click",this.checkClickaway)}},{key:"addListener",value:function(){D()("body").on("click",this.checkClickaway)}},{key:"render",value:function(){var e=V()("------modules-components-components-containers-popover-Popover__popover","sp-popover",this.props.className);return(0,C.jsx)("div",{ref:this.popoverRef,className:e,children:this.props.children})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);ty(tm,"propTypes",{className:L().string,children:L().node,onClickAway:L().func}),ty(tm,"defaultProps",{className:"",children:null,onClickAway:function(){}});function tw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tO(e){return(tO=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tk(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tk=function(){return!!e})()}function t_(e,t){return(t_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var tj=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=tO(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,tk()?Reflect.construct(e,t||[],tO(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&t_(n,e),t=[{key:"getFilteredTags",value:function(){var e=this.props.tags.filter(function(e){return e.visible}),t=this.props.searchValue;return t?eQ().filter(t,e.map(function(e){return e.key})).map(function(t){return e[t.index]}):e}},{key:"render",value:function(){var e,t,n=this.props,r=n.onClick,o=n.onClickAway,i=n.translations,a=n.onSearchChanged,s=this.getFilteredTags(),l=(null==(e=i.tagPicker)?void 0:e.tagFindHint)||"Find tag";return(0,C.jsxs)(tm,{className:"------modules-components-components-inputs-tag-picker-TagPickerPopover__tag-picker-popover",onClickAway:o,children:[(0,C.jsx)(eV.L,{className:"------modules-components-components-inputs-tag-picker-TagPickerPopover__search-field",initialValue:this.props.searchValue,hintText:l,onChange:a,onClearInput:function(){return a("")},autoFocus:!0}),(0,C.jsx)(td.B,{className:"------modules-components-components-inputs-tag-picker-TagPickerPopover__tag-list",children:s.length?s.map(function(e){var t=e.key,n=e.description;return(0,C.jsx)(tp,{className:"------modules-components-components-inputs-tag-picker-TagPickerPopover__tag",tagKey:t,description:n,iconName:"add",onClick:r},t)}):(0,C.jsx)("span",{className:"------modules-components-components-inputs-tag-picker-TagPickerPopover__empty-message",children:(null==(t=i.tagPicker)?void 0:t.noTagsFound)||"No tags found"})})]})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);tw(tj,"propTypes",{tags:L().array,onClick:L().func,searchValue:L().string,onSearchChanged:L().func,onClickAway:L().func,translations:L().object}),tw(tj,"defaultProps",{tags:[],searchValue:"",onSearchChanged:function(){},onClick:function(){},onClickAway:function(){},translations:{}});let tS="------modules-components-components-inputs-tag-picker-TagPicker__section-title";function tP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tx(e){return(tx=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tE=function(){return!!e})()}function tT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){tC(e,t,n[t])})}return e}function tI(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function tR(e,t){return(tR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var tD=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t,r;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=tx(t),tC(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,tE()?Reflect.construct(t,r||[],tx(this).constructor):t.apply(this,r)),"state",{open:!1}),tC(e,"handleSearchFocus",function(){e.setState({open:!0})}),tC(e,"handleClickAway",function(){e.props.onClickAway(),e.setState({open:!1})}),tC(e,"handleTagAdded",function(t){var n=e.props,r=n.allTags,o=n.slideTags,i=r.find(function(e){return e.key===t});if(i&&!o.find(function(e){return e.key===t})){var a=[i].concat(function(e){if(Array.isArray(e))return tP(e)}(o)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||function(e){if(e){if("string"==typeof e)return tP(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tP(e,void 0)}}(o)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());e.props.onTagsChanged(a)}}),tC(e,"handleTagRemoved",function(t){var n=e.props.slideTags.filter(function(e){return e.key!==t});n.length!==e.props.slideTags.length&&e.props.onTagsChanged(n)}),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&tR(n,e),t=[{key:"getTag",value:function(e){var t=this.props,n=t.readOnlyTags,r=t.translations,o=this.props.readOnly||n.includes(e.key),i=tI(tT({},ei().omit(e,["key"])),{tagKey:e.key,iconName:o?null:"clear",onClick:o?null:this.handleTagRemoved,selected:!o,translations:r});return(0,x.createElement)(tp,tI(tT({},i),{key:e.key}))}},{key:"getAvailableTags",value:function(){var e=this.props,t=e.allTags,n=e.slideTags,r=e.readOnlyTags;return t.filter(function(e){return!n.find(function(t){return t.key===e.key})}).filter(function(e){return!(r||[]).includes(e.key)})}},{key:"getFilteredSlideTags",value:function(){return this.props.slideTags.filter(function(e){return e.visible})}},{key:"getNoTagsEl",value:function(){var e,t,n,r=this.props,o=r.readOnly,i=r.translations;return o?(0,C.jsx)("div",{className:tS,children:(null==(n=i.tagPicker)?void 0:n.noTags)||"This slide has no tags"}):(0,C.jsxs)("div",{className:tS,children:[(null==(e=i.tagPicker)?void 0:e.noTagsYet)||"This slide has no tags yet",(0,C.jsx)("br",{}),(null==(t=i.tagPicker)?void 0:t.useSearch)||"Use the search above to add tags to this slide"]})}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.readOnlyTags,o=n.readOnly,i=n.translations,a=this.getAvailableTags(),s=this.getFilteredSlideTags(),l=(null==(e=i.tagPicker)?void 0:e.tagFindHint)||"Find tag";return(0,C.jsxs)("div",{className:"------modules-components-components-inputs-tag-picker-TagPicker__tag-picker",children:[o?null:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(eV.L,{hintText:l,onFocus:this.handleSearchFocus}),this.state.open?(0,C.jsx)("div",{className:"------modules-components-components-inputs-tag-picker-TagPicker__popover-container",children:(0,C.jsx)(tj,{tags:a,readOnlyTags:r,searchValue:this.props.searchValue,onSearchChanged:this.props.onSearchChanged,onClick:this.handleTagAdded,onClickAway:this.handleClickAway,translations:i})}):null]}),(0,C.jsx)("div",{className:"------modules-components-components-inputs-tag-picker-TagPicker__tag-container",children:s.length?s.map(function(e){return t.getTag(e)}):this.getNoTagsEl()})]})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);tC(tD,"propTypes",{allTags:L().array,readOnlyTags:L().array,slideTags:L().array,readOnly:L().bool,onTagsChanged:L().func,onClickAway:L().func,searchValue:L().string,onSearchChanged:L().func,translations:L().object}),tC(tD,"defaultProps",{allTags:[],slideTags:[],readOnlyTags:[],readOnly:!1,onTagsChanged:function(){},searchValue:"",onSearchChanged:function(){},onClickAway:function(){},translations:{}});let tN="------modules-components-components-inputs-tag-picker-TagFilterPopover__section-title",tA="------modules-components-components-inputs-tag-picker-TagFilterPopover__empty-message";function tB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tM(e){return(tM=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tL=function(){return!!e})()}function tU(e,t){return(tU=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var tV=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t,r;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=tM(t),tF(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,tL()?Reflect.construct(t,r||[],tM(this).constructor):t.apply(this,r)),"handleTagAdded",function(t){var n=e.props.selectedTags,r=e.props.tags.find(function(e){return e.key===t});if(r&&!n.find(function(e){return e.key===t})){var o=((function(e){if(Array.isArray(e))return tB(e)})(n)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e){if(e){if("string"==typeof e)return tB(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tB(e,void 0)}}(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([r]);e.props.onTagsChanged(o)}}),tF(e,"handleTagRemoved",function(t){var n=e.props.selectedTags.filter(function(e){return e.key!==t});n.length!==e.props.selectedTags.length&&e.props.onTagsChanged(n)}),tF(e,"handleToggleClicked",function(){e.props.onToggleClicked(!e.props.toggleSelected)}),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&tU(n,e),t=[{key:"getVisibleSelectedTags",value:function(){return this.props.selectedTags.filter(function(e){return e.visible})}},{key:"getFilteredTags",value:function(){var e=this.props.searchValue,t=this.props.selectedTags.map(function(e){return e.key}),n=this.props.tags.filter(function(e){return e.visible&&!t.includes(e.key)});return e&&e.length?eQ().filter(e,n.map(function(e){return e.key})).map(function(e){return n[e.index]}):n}},{key:"getAvailableUsedTags",value:function(){return this.getFilteredTags().filter(function(e){return e.isUsed})}},{key:"getAvailableUnusedTags",value:function(){return this.getFilteredTags().filter(function(e){return!e.isUsed})}},{key:"render",value:function(){var e,t,n,r,o,i,a,s,l=this,c=this.props,u=c.translations,f=c.onSearchChanged,p=c.onClickAway,d=this.getVisibleSelectedTags(),h=this.getAvailableUsedTags(),y=this.getAvailableUnusedTags(),v=(null==(e=u.tagPicker)?void 0:e.tagFilterHint)||"Filter tags",b=(0,C.jsx)("span",{className:tA,children:(null==(t=u.tagPicker)?void 0:t.empty)||"None"}),g="dark"===this.props.theme,m=V()("------modules-components-components-inputs-tag-picker-TagFilterPopover__tag-filter-popover",tF({},"------modules-components-components-inputs-tag-picker-TagFilterPopover__dark",g)),w=(null==(n=u.tagPicker)?void 0:n.tagFilterAll)||"All of these",O=(null==(r=u.tagPicker)?void 0:r.tagFilterAny)||"Any of these";return(0,C.jsxs)(tm,{className:m,onClickAway:p,children:[(0,C.jsx)(eV.L,{icon:"filter_list",className:"------modules-components-components-inputs-tag-picker-TagFilterPopover__search-field",initialValue:this.props.searchValue,hintText:v,onChange:f,onClearInput:function(){return f("")}}),(0,C.jsxs)(eJ.B8,{className:"------modules-components-components-inputs-tag-picker-TagFilterPopover__list",children:[(0,C.jsx)(eJ.a6,{className:tN,value:(null==(o=u.tagPicker)?void 0:o.tagsSearching)||"Searching for"}),d.length?d.map(function(e){var t=e.key,n=e.description;return(0,C.jsx)(tp,{theme:l.props.theme,tagKey:t,description:n,iconName:"clear",selected:!0,onClick:l.handleTagRemoved},t)}):(0,C.jsx)("span",{className:tA,children:(null==(i=u.tagPicker)?void 0:i.searchEmpty)||"Select a tag below to begin searching"}),(0,C.jsx)(eJ.a6,{className:tN,value:(null==(a=u.tagPicker)?void 0:a.tagsAvailable)||"Used in this deck"}),h.length?h.map(function(e){var t=e.key,n=e.description;return(0,C.jsx)(tp,{theme:l.props.theme,tagKey:t,description:n,iconName:"add",onClick:l.handleTagAdded},t)}):b,(0,C.jsx)(eJ.a6,{className:tN,value:(null==(s=u.tagPicker)?void 0:s.tagsNotInUse)||"Not used in this deck"}),y.length?y.map(function(e){var t=e.key,n=e.description;return(0,C.jsx)(tp,{theme:l.props.theme,tagKey:t,description:n,iconName:"add",onClick:l.handleTagAdded},t)}):b]}),(0,C.jsxs)("div",{className:"------modules-components-components-inputs-tag-picker-TagFilterPopover__toggle-container",children:[w,(0,C.jsx)(eZ.l,{className:"------modules-components-components-inputs-tag-picker-TagFilterPopover__toggle",selected:this.props.toggleSelected,theme:"dark",onClick:this.handleToggleClicked}),O]})]})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);tF(tV,"propTypes",{theme:L().oneOf(["dark","light"]),tags:L().array,selectedTags:L().array,onTagsChanged:L().func,searchValue:L().string,onSearchChanged:L().func,toggleSelected:L().bool,onToggleClicked:L().func,onClickAway:L().func,translations:L().object}),tF(tV,"defaultProps",{theme:"light",tags:[],selectedTags:[],onTagsChanged:function(){},searchValue:"",onSearchChanged:function(){},toggleSelected:!1,onToggleClicked:function(){},onClickAway:function(){},translations:{}});function tz(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t$(e){return(t$=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tW=function(){return!!e})()}function tK(e,t){return(tK=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var tq=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t,r;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=t$(t),tz(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,tW()?Reflect.construct(t,r||[],t$(this).constructor):t.apply(this,r)),"handleClick",function(){e.props.onPopoverToggled(!e.props.popoverOpen)}),tz(e,"handleClickAway",function(){setTimeout(function(){e.props.onPopoverToggled(!1)},0)}),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&tK(n,e),t=[{key:"getLabel",value:function(){var e,t=this.props,n=t.selectedTags,r=t.translations;if(!n.length)return"None";if(1===n.length)return n[0].key;var o=n.length-1,i=n[0].key,a=ei().template((null==r||null==(e=r.tagPicker)?void 0:e.moreTags)||"+ <%= tagCount %> more")({tagCount:o});return"".concat(i," ").concat(a)}},{key:"render",value:function(){var e,t=this,n=this.props.translations,r=this.getLabel(),o="dark"===this.props.theme,i=V()("------modules-components-components-inputs-tag-picker-TagFilter__tag-filter",this.props.className,tz({},"------modules-components-components-inputs-tag-picker-TagFilter__dark",o)),a=(null==(e=n.tagPicker)?void 0:e.tagsLabel)||"Tags";return(0,C.jsxs)("div",{className:i,children:[(0,C.jsx)("label",{className:"------modules-components-components-inputs-tag-picker-TagFilter__input-label",children:a}),(0,C.jsxs)("div",{className:"------modules-components-components-inputs-tag-picker-TagFilter__menu-control",onClick:function(){return t.handleClick()},children:[(0,C.jsx)("div",{className:"------modules-components-components-inputs-tag-picker-TagFilter__menu-label",children:r}),(0,C.jsx)("div",{className:"------modules-components-components-inputs-tag-picker-TagFilter__menu-dropdown-icon",children:(0,C.jsx)(eE.I,{value:this.props.popoverOpen?"arrow_drop_up":"arrow_drop_down"})}),(0,C.jsx)("div",{className:"------modules-components-components-inputs-tag-picker-TagFilter__menu-control-underline"})]}),this.props.popoverOpen?(0,C.jsx)(tV,{theme:this.props.theme,tags:this.props.tags,selectedTags:this.props.selectedTags,onTagsChanged:this.props.onTagsChanged,searchValue:this.props.searchValue,onSearchChanged:this.props.onSearchChanged,toggleSelected:this.props.toggleSelected,onToggleClicked:this.props.onToggleClicked,onClickAway:this.handleClickAway,translations:n}):null]})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);tz(tq,"propTypes",{className:L().string,theme:L().oneOf(["dark","light"]),tags:L().array,selectedTags:L().array,onTagsChanged:L().func,searchValue:L().string,onSearchChanged:L().func,toggleSelected:L().bool,onToggleClicked:L().func,popoverOpen:L().bool,onPopoverToggled:L().func,translations:L().object}),tz(tq,"defaultProps",{className:"",theme:"light",tags:[],selectedTags:[],onTagsChanged:function(){},searchValue:"",onSearchChanged:function(){},toggleSelected:!1,onToggleClicked:function(){},popoverOpen:!1,onPopoverToggled:function(){},translations:{}});var tH=n(9413),tZ=n(33076),tJ=n(21707);function tG(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tY(e){return(tY=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tX=function(){return!!e})()}function tQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){tG(e,t,n[t])})}return e}function t0(e,t){return(t0=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var t1=n(56988),t2=n(31438),t3=n.n(t2),t5=n(85968),t4=n(10905),t6=n.n(t4);function t8(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t9(e){return(t9=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function t7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(t7=function(){return!!e})()}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){t8(e,t,n[t])})}return e}function nt(e,t){return(nt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"open",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:20,r=function(r){var o;if("function"!=typeof r&&null!==r)throw TypeError("Super expression must either be null or a function");function i(e){var n,r,o,a;if(!(this instanceof i))throw TypeError("Cannot call a class as a function");return o=i,a=[e],o=tY(o),tG(n=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,tX()?Reflect.construct(o,a||[],tY(this).constructor):o.apply(this,a)),"componentToggle",function(e){var r=void 0===e?!n.state[t]:e;n.setState(tG({},t,r))}),tG(n,"openContextMenu",function(e){if(!(n.ignore||!n.isValidEl(e)||n.isIgnoreEl(e))&&!n.isOpen){e.preventDefault(),n.setIgnoreTimer(),n.resetPos(),n.componentToggle(!0);var t=e.touches&&e.touches.length?e.touches[0]:e;setTimeout(function(){n.positionContext(t.clientX,t.clientY)},0)}}),tG(n,"handleMouseup",function(e){n.closeContextMenu(e)}),tG(n,"handleTouchStart",function(e){e.touches.length>1?n.handleTouchEnd():!n.ignore&&n.isValidEl(e)&&(n.isOpen?n.closeContextMenu(e):n.downTimer=setTimeout(function(){n.openContextMenu(e)},650))}),tG(n,"handleTouchMove",function(){n.handleTouchEnd()}),tG(n,"handleTouchEnd",function(){clearTimeout(n.downTimer)}),tG(n,"handleContextmenu",function(e){n.isOpen||n.openContextMenu(e)}),tG(n,"handleKeyup",function(e){27===e.keyCode&&n.closeContextMenu()}),tG(r={},t,!1),tG(r,"top","auto"),tG(r,"bottom","auto"),tG(r,"left","auto"),tG(r,"right","auto"),n.state=r,n.ignoreTimer=null,n.downTimer=null,n.menuRef=x.createRef(),n}return i.prototype=Object.create(r&&r.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),r&&t0(i,r),o=[{key:"componentDidMount",value:function(){this.bindContextClick()}},{key:"componentWillUnmount",value:function(){this.unbindContextClick(),clearTimeout(this.downTimer),clearTimeout(this.ignoreTimer)}},{key:"closeContextMenu",value:function(e){var t=this.menuRef.current,n=e&&th.A.isDescendant(t,e.target);this.ignore||!this.isOpen||n||(this.setIgnoreTimer(),this.componentToggle(!1))}},{key:"isValidEl",value:function(e){var t=D()(e.target);return!!(!t.is("input, select, option")&&!t.hasClass("interactive")&&!t.closest(".interactive").length)}},{key:"isIgnoreEl",value:function(e){return D()(e.target).parents(".".concat(this.props.ignoreElement)).length||D()(e.target).hasClass(this.props.ignoreElement)}},{key:"setIgnoreTimer",value:function(){var e=this;this.ignoreTimer=setTimeout(function(){e.ignoreTimer=null},200)}},{key:"positionContext",value:function(e,t){var r=this.menuRef.current,o=r.getBoundingClientRect(),i=r.parentNode.getBoundingClientRect(),a=window.innerHeight,s=window.innerWidth,l=t+o.height+n,c=e+o.width+n,u="auto",f="auto",p="auto",d="auto";l>a?(d=a-t-(a-i.bottom)+2,d="".concat(d,"px")):(p=t-i.top+2,p="".concat(p,"px")),c>s?(f=s-e-(s-i.right)+2,f="".concat(f,"px")):(u=e-i.left+2,u="".concat(u,"px")),this.setState({left:u,right:f,top:p,bottom:d})}},{key:"resetPos",value:function(){this.setState({left:-500,right:"auto",top:-500,bottom:"auto"})}},{key:"bindContextClick",value:function(){tJ.A.on(document,"mouseup",this.handleMouseup),tJ.A.on(document,"touchstart",this.handleTouchStart),tJ.A.on(document,"touchmove",this.handleTouchMove),tJ.A.on(document,"touchend",this.handleTouchEnd),tJ.A.on(document,"contextmenu",this.handleContextmenu),tJ.A.on(document,"keyup",this.handleKeyup)}},{key:"unbindContextClick",value:function(){tJ.A.off(document,"mouseup",this.handleMouseup),tJ.A.off(document,"touchstart",this.handleTouchStart),tJ.A.off(document,"touchmove",this.handleTouchMove),tJ.A.off(document,"touchend",this.handleTouchEnd),tJ.A.off(document,"contextmenu",this.handleContextmenu),tJ.A.off(document,"keyup",this.handleKeyup)}},{key:"isOpen",get:function(){return this.state[t]}},{key:"ignore",get:function(){return!!this.ignoreTimer}},{key:"render",value:function(){var t,n,r=tQ({toggle:this.componentToggle,openContext:this.openContextMenu},this.props,this.state);return(0,C.jsx)(e,(t=tQ({},r),n=n={forwardRef:this.menuRef},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(i.prototype,o),i}(x.Component);tG(r,"displayName",e.displayName)}((t8(m=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=[e],r=t9(r),(t=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,t7()?Reflect.construct(r,o||[],t9(this).constructor):r.apply(this,o))).keymageArray=[],t.containerRef=e.forwardRef||x.createRef(),t}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&nt(n,e),t=[{key:"componentDidMount",value:function(){t1.A.isIOS||x.Children.forEach(this.props.children,function(e,t){var n=this;e.props.keys&&this.keymageArray.push(t6()(e.props.keys,function(){var e=n.props.children[t];e.props.disabled||(e.props.onClick&&e.props.onClick(e,e.props.value),n.handleItemClick(e.props.value,e))},{preventDefault:!0}))},this)}},{key:"componentWillUnmount",value:function(){if(!t1.A.isIOS)for(;this.keymageArray.length;)this.keymageArray.shift()()}},{key:"handleControlClick",value:function(){this.props.toggle()}},{key:"handleItemClick",value:function(e,t){var n=this;t.props.disabled||(this.props.onItemClick(t.props.value),this.props.open&&setTimeout(function(){n.props.toggle(!1)},100),e.preventDefault(),e.stopPropagation())}},{key:"getIcon",value:function(e){if(t1.A.isIOS)return null;if(e.props.keys){var t=navigator.userAgent.indexOf("Mac OS X")>=0,n=e.props.keys.split("-");return{__html:(n=ei().map(n,function(e,r){var o="";switch(e){case"defmod":case"cmd":case"win":o=t?"⌘":"Ctrl";break;case"option":o="⌥";break;case"shift":o=t?"⇧":"Shift";break;default:o=t3()(e)}return n.length>1&&r>0&&(o=" + ".concat(o)),o})).join("")}}return null}},{key:"render",value:function(){var e,t,n=this,r=V()(this.props.className,"sp-context-menu"),o={top:this.props.top,bottom:this.props.bottom,left:this.props.left,right:this.props.right};return(0,C.jsx)("div",(e=ne({className:"sp-context-menu-container needsclick",style:o,ref:this.containerRef},(0,t5.A)(this.props)),t=t={children:this.props.open?(0,C.jsx)(tH.W,{className:r,onItemClick:this.props.onItemClick.bind(this),children:x.Children.map(this.props.children,function(e,t){var r=x.cloneElement(e,ne({},e.props)),o=n.getIcon(e),i=V()("sp-context-menu-item",{"sp-is-disabled":e.props.disabled});return(0,C.jsxs)("div",{className:i,onTouchEnd:e.props.value?function(t){return n.handleItemClick(t,e)}:null,onMouseUp:e.props.value?function(t){return n.handleItemClick(t,e)}:null,children:[(0,C.jsx)("span",{className:"sp-context-icon",dangerouslySetInnerHTML:o}),r]},t)},this)}):null},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e))}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component),"displayName","ContextMenu"),t8(m,"propTypes",{className:L().string,onItemClick:L().func}),t8(m,"defaultProps",{onItemClick:function(){}}),m));function nn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nr(e){return(nr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function no(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(no=function(){return!!e})()}function ni(e,t){return(ni=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var na=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=[e],r=nr(r),(t=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,no()?Reflect.construct(r,o||[],nr(this).constructor):r.apply(this,o))).nestedMenuRef=x.createRef(),t.containerRef=x.createRef(),t.state={open:!1},t}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&ni(n,e),t=[{key:"componentDidMount",value:function(){this._positionNestedMenu()}},{key:"componentDidUpdate",value:function(e,t){this._positionNestedMenu()}},{key:"componentClickAway",value:function(){this._closeNestedMenu()}},{key:"_positionNestedMenu",value:function(){var e=this.containerRef.current,t=this.nestedMenuRef.current;e&&t&&(t.style.left=e.offsetWidth+"px")}},{key:"_openNestedMenu",value:function(){this.props.disabled||this.setState({open:!0})}},{key:"_closeNestedMenu",value:function(){this.setState({open:!1})}},{key:"_toggleNestedMenu",value:function(){this.props.disabled||this.setState({open:!this.state.open})}},{key:"_onParentItemClick",value:function(){this._toggleNestedMenu()}},{key:"_onMenuItemClick",value:function(e,t,n){this.props.onItemClick&&this.props.onItemClick(e,t,n),this._closeNestedMenu()}},{key:"render",value:function(){var e=this,t=V()(this.props.className,{"sp-open":this.state.open,"sp-is-disabled":this.props.disabled});return(0,C.jsxs)("div",{ref:this.containerRef,className:t,onMouseEnter:function(t){return e._openNestedMenu(t)},onMouseLeave:function(t){return e._closeNestedMenu(t)},children:[(0,C.jsx)(tZ.D,{index:this.props.index,disabled:this.props.disabled,iconRightClassName:"muidocs-icon-custom-arrow-drop-right",onClick:function(t){return e._onParentItemClick(t)},children:this.props.text}),(0,C.jsx)(tH.W,{ref:this.nestedMenuRef,menuItems:this.props.menuItems,onItemClick:function(t){return e._onMenuItemClick(t)},hideable:!0,visible:this.state.open})]})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);nn(na,"displayName","NestedMenuItem"),nn(na,"propTypes",{className:L().string,index:L().number.isRequired,text:L().string,menuItems:L().array.isRequired,disabled:L().bool,onItemClick:L().func}),nn(na,"defaultProps",{disabled:!1});function ns(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nl(e){return(nl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nc=function(){return!!e})()}function nu(e,t){return(nu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var nf=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=nl(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,nc()?Reflect.construct(e,t||[],nl(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&nu(n,e),t=[{key:"render",value:function(){return(0,C.jsxs)("div",{className:"sp-subheader",children:[this.props.label,this.props.description&&(0,C.jsxs)("span",{className:"sp-subheader-desc",children:["- ",this.props.description]})]})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);ns(nf,"displayName","SubheaderMenuItem"),ns(nf,"propTypes",{label:L().string.isRequired,description:L().string});function np(e){return(np=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nd=function(){return!!e})()}function nh(e,t){return(nh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(o="displayName")in(r=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=np(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,nd()?Reflect.construct(e,t||[],np(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&nh(n,e),t=[{key:"render",value:function(){return(0,C.jsx)("div",{className:"sp-divider"})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component))?Object.defineProperty(r,o,{value:"DividerMenuItem",enumerable:!0,configurable:!0,writable:!0}):r[o]="DividerMenuItem";var ny=n(64603),nv=n(29182);function nb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ng(e){return(ng=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nm=function(){return!!e})()}function nO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){nb(e,t,n[t])})}return e}function nk(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function n_(e,t){return(n_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(0,H.P)((w=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=[e],r=ng(r),nb(t=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,nm()?Reflect.construct(r,o||[],ng(this).constructor):r.apply(this,o)),"handleControlClick",function(e){t.props.toggle()}),t.menuItemsRef=x.createRef(),t.state={previousValue:t.props.selectedValue},t}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&n_(n,e),t=[{key:"UNSAFE_componentWillReceiveProps",value:function(e){this.setState({previousValue:e.selectedValue})}},{key:"handleItemClick",value:function(e,t){var n={};this.props.selectedValue&&!t.props.disabled&&this.state.previousValue!==t.props.value&&(n.previousValue=t.props.value,this.props.onChange(t.props.value),t.props.onClick&&t.props.onClick(e),this.setState(n)),this.props.toggle(!1)}},{key:"render",value:function(){var e=this,t=V()(this.props.className,"sp-fab-menu",{"sp-open":this.props.open}),n=this.props,r=n.pinned,o=n.open,i=n.children,a=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(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}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(n,["pinned","open","children"]),s=ei().find(x.Children.toArray(this.props.children),function(t){return!!e.props.selectedValue&&t.props.value===e.props.selectedValue});return(0,C.jsxs)("div",{className:t,ref:this.props.forwardRef,children:[(0,C.jsx)(ny.f,nk(nO({},ei().omit(a,["toggle","brandColor"])),{className:"",onClick:this.handleControlClick})),o?(0,C.jsx)(tH.W,{ref:this.menuItemsRef,pinned:r,maxHeight:this.props.maxHeight,children:x.Children.map(i,function(t,n){var r=t===s,o=x.cloneElement(t,nk(nO({},t.props),{selected:r}));return(0,C.jsx)("div",{onClick:function(n){return e.handleItemClick(n,t)},children:o},n)})}):null]})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component),nb(w,"displayName","FloatingActionMenu"),nb(w,"propTypes",{className:L().string,selectedValue:L().any,onChange:L().func,icon:L().element,mini:L().bool,disabled:L().bool,secondary:L().bool,pinned:nv.A,maxHeight:ea.A}),nb(w,"defaultProps",{onChange:function(){},icon:(0,C.jsx)(eE.I,{value:"add"}),mini:!1,secondary:!1,pinned:!0}),w));var nj=n(81242);function nS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nP(e){return(nP=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nC=function(){return!!e})()}function nx(e,t){return(nx=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(0,H.P)((nS(O=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=nP(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,nC()?Reflect.construct(e,t||[],nP(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&nx(n,e),t=[{key:"handleControlClick",value:function(e){this.props.toggle()}},{key:"handleItemClick",value:function(){this.props.toggle(!1)}},{key:"render",value:function(){var e=this,t=V()(this.props.className,"sp-icon-menu",{"sp-open":this.props.open});return(0,C.jsxs)("div",{className:t,ref:this.props.forwardRef,children:[(0,C.jsx)(nj.K,{onClick:function(t){return e.handleControlClick(t)},disabled:this.props.disabled,children:(0,C.jsx)(eE.I,{value:this.props.iconName})}),this.props.open?(0,C.jsx)(tH.W,{pinned:this.props.pinned,maxHeight:this.props.maxHeight,children:x.Children.map(this.props.children,function(t,n){return(0,C.jsx)("div",{onClick:function(n){return e.handleItemClick(n,t)},children:t},n)})}):null]})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component),"displayName","IconMenu"),nS(O,"propTypes",{className:L().string,iconName:L().string,disabled:L().bool,pinned:nv.A,maxHeight:ea.A}),nS(O,"defaultProps",{iconName:"add",pinned:!0}),O));function nE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nT(e){return(nT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nI=function(){return!!e})()}function nR(e,t){return(nR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var nD=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=[e],r=nT(r),(t=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,nI()?Reflect.construct(r,o||[],nT(this).constructor):r.apply(this,o))).buttonRef=x.createRef(),t.state={open:!1},t}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&nR(n,e),t=[{key:"componentDidMount",value:function(){var e=this.props.type.charAt(0).toUpperCase().concat(this.props.type.slice(1));if(!F["".concat(e,"Button")])throw Error("Attempted to use button without specifying valid button type")}},{key:"handleItemClick",value:function(){this.toggle(!1)}},{key:"toggle",value:function(e){this.setState({open:e})}},{key:"render",value:function(){var e,t,n=this,r=V()(this.props.className,"sp-button-menu",{"sp-open":this.state.open}),o=ei().omit(this.props,["toggle","forwardRef"]),i=o.type,a=o.label,s=o.themeColor,l=o.primary,c=o.secondary,u=o.disabled,f=o.pinned,p=o.maxHeight,d=o.children,h=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(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}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(o,["type","label","themeColor","primary","secondary","disabled","pinned","maxHeight","children"]),y=this.state.open,v=i.charAt(0).toUpperCase().concat(i.slice(1)),b=F["".concat(v,"Button")];return(0,C.jsxs)("div",(e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){nE(e,t,n[t])})}return e}({},h),t=t={className:r,ref:this.props.forwardRef,children:[(0,C.jsx)(b,{forwardRef:this.buttonRef,label:a,themeColor:s,onClick:function(){return n.toggle(!0)},disabled:u,primary:l,secondary:c}),y?(0,C.jsx)(tH.W,{pinned:f,maxHeight:p,portal:!0,portalPosition:{container:this.buttonRef.current,position:["top","right"]},onClickAway:function(){n.toggle(!1)},children:x.Children.map(d,function(e,t){return(0,C.jsx)("div",{onClick:function(t){return n.handleItemClick(t,e)},children:e},t)})}):null]},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e))}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);nE(nD,"displayName","ButtonMenu"),nE(nD,"propTypes",{className:L().string,primary:L().bool,secondary:L().bool,disabled:L().bool,pinned:nv.A,maxHeight:ea.A,type:L().string}),nE(nD,"defaultProps",{type:"flat",pinned:!0}),(0,H.P)(nD);var nN=n(40835);function nA(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nB(e){return(nB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nF=function(){return!!e})()}function nM(e,t){return(nM=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var nL=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=[e],t=nB(t),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,nF()?Reflect.construct(t,r||[],nB(this).constructor):t.apply(this,r))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&nM(n,e),t=[{key:"render",value:function(){var e=V()(this.props.className,"sp-table",{"sp-table-hideable":this.props.hideable,"sp-visible":this.props.visible});return(0,C.jsx)("table",{className:e,children:this.props.children})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);nA(nL,"displayName","DataTable"),nA(nL,"propTypes",{className:L().string,onItemClick:L().func,onItemToggle:L().func,selectedIndex:L().number,hideable:L().bool,visible:L().bool}),nA(nL,"defaultProps",{hideable:!1,visible:!0,onItemClick:function(){},onItemToggle:function(){}});function nU(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nV(e){return(nV=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nz=function(){return!!e})()}function n$(e,t){return(n$=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var nW=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=[e],t=nV(t),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,nz()?Reflect.construct(t,r||[],nV(this).constructor):t.apply(this,r))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&n$(n,e),t=[{key:"render",value:function(){var e=this,t=V()(this.props.className,"sp-table-row",{"sp-is-selected":this.props.selected,"sp-is-disabled":this.props.disabled});return(0,C.jsx)("tr",{className:t,onClick:this.props.onClick,children:x.Children.map(this.props.children,function(t,n){return"header"===e.props.type?(0,C.jsx)("th",{children:t},n):(0,C.jsx)("td",{children:t},n)})})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);nU(nW,"displayName","DataTableRow"),nU(nW,"propTypes",{className:L().string,type:L().string,onClick:L().func,onToggle:L().func,selected:L().bool,disabled:L().bool}),nU(nW,"defaultProps",{type:"body",disabled:!0,onClick:function(){},onToggle:function(){}});var nK=n(71181),nq=n(10222);function nH(e){return(nH=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nZ=function(){return!!e})()}function nJ(e,t){return(nJ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(a="displayName")in(i=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=nH(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,nZ()?Reflect.construct(e,t||[],nH(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&nJ(n,e),t=[{key:"render",value:function(){var e=V()("sp-toolbar-separator");return(0,C.jsx)("div",{className:e})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component))?Object.defineProperty(i,a,{value:"ToolbarSeparator",enumerable:!0,configurable:!0,writable:!0}):i[a]="ToolbarSeparator";var nG=n(49072);function nY(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nX(e){return(nX=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nQ=function(){return!!e})()}function n0(e,t){return(n0=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(0,X.N)((nY(k=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=nX(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,nQ()?Reflect.construct(e,t||[],nX(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&n0(n,e),t=[{key:"render",value:function(){var e=this.props,t=e.themeColor,n=e.leftItem,r=e.rightItems,o=e.children,i=this.props.title;this.props.themeColor&&((0,nG.A)(this.props.themeColor),this.props.themeColor);var a=this.props.getClasses({"sp-is-appbar":!0});return i&&"[object String]"===Object.prototype.toString.call(i)&&(i=(0,C.jsx)("div",{className:"sp-toolbar-title",children:i})),(0,C.jsxs)(nK.M,{className:a,themeColor:t,children:[(0,C.jsxs)(nq.$,{float:"left",children:[n,i]},0),(0,C.jsx)("div",{className:"sp-toolbar__children",children:o}),(0,C.jsx)(nq.$,{float:"right",children:r},1)]})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component),"displayName","AppBar"),nY(k,"propTypes",{className:L().string,title:L().node,themeColor:L().string,leftItem:L().element,rightItems:L().oneOfType([L().element,L().arrayOf(L().element)])}),k));function n1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n2(e){return(n2=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function n3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(n3=function(){return!!e})()}function n5(e,t){return(n5=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(0,X.N)((n1(_=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=n2(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,n3()?Reflect.construct(e,t||[],n2(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&n5(n,e),t=[{key:"render",value:function(){var e=this.props.getClasses("sp-persistent-action-bar");return(0,C.jsx)(nK.M,{className:e,children:(0,C.jsx)(nq.$,{float:this.props.alignment,children:this.props.children})})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component),"displayName","PersistentActionBar"),n1(_,"propTypes",{alignment:L().string}),n1(_,"defaultProps",{alignment:"right"}),_));function n4(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n6(e){return(n6=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function n8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(n8=function(){return!!e})()}function n9(e,t){return(n9=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var n7=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=n6(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,n8()?Reflect.construct(e,t||[],n6(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&n9(n,e),t=[{key:"render",value:function(){var e=this.props,t=e.complete,n=e.leftPos,r=e.width,o=V()("sp-presenter-timeline-marker",{"sp-presenter-timeline-marker-complete":t});return(0,C.jsx)("div",{className:o,style:{left:"".concat(n,"%"),width:"".concat(r,"%")}})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);n4(n7,"displayName","PresenterTimelineMarker"),n4(n7,"propTypes",{complete:L().bool,leftPos:L().number,width:L().number});function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rt(e){return(rt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rn=function(){return!!e})()}function rr(e,t){return(rr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ro=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=rt(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,rn()?Reflect.construct(e,t||[],rt(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&rr(n,e),t=[{key:"render",value:function(){var e=this.props,t=e.leftPos,n=e.image,r=e.title,o=e.offset;return(0,C.jsxs)("div",{className:"sp-presenter-timeline-preview",style:{left:"".concat(t,"%"),marginLeft:"".concat(-100+o.left-o.right,"px")},children:[(0,C.jsx)("h6",{children:r}),(0,C.jsx)("img",{src:n})]})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);re(ro,"displayName","PresenterTimelinePreview"),re(ro,"propTypes",{leftPos:L().number,image:L().string,title:L().string,offset:L().object});function ri(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ra(e){return(ra=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rs=function(){return!!e})()}function rl(e,t){return(rl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var rc=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=[e],r=ra(r),ri(t=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,rs()?Reflect.construct(r,o||[],ra(this).constructor):r.apply(this,o)),"getPercentFromMouse",function(e){var n=t.timeline.getBoundingClientRect(),r=null==n.x?n.left:n.x,o=(e.clientX||e.target.clientX)-r;return{percent:100/n.width*o,offsetLeft:o,offsetRight:n.width-o}}),ri(t,"handleMouseOver",function(e){t.props.showPreview&&t.setState({previewVisible:!0,mousePos:t.getPercentFromMouse(e.touches?e.touches[0]:e)})}),ri(t,"handleMouseMove",function(e){t.props.showPreview&&t.setState({mousePos:t.getPercentFromMouse(e.touches?e.touches[0]:e)})}),ri(t,"handleMouseLeave",function(e){t.setState({previewVisible:!1})}),ri(t,"handleClick",function(e){var n=t.state.mousePos;e.touches&&!e.touches.length||t.getPercentFromMouse(e.touches?e.touches[0]:e);var r=Math.floor(n.percent/100*t.props.slides.length);t.props.onClick(r)}),t.timeline=null,t.state={previewVisible:!1,mousePos:{percent:0,offsetRight:0,offsetLeft:0}},t}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&rl(n,e),t=[{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.markers,o=t.slides,i=t.showPreview,a=t.position,s=this.state,l=s.previewVisible,c=s.mousePos,u=Math.ceil(c.percent/100*o.length),f=o[u-1],p=100/o.length*a,d=100/o.length,h={left:c.offsetLeft<100?100-c.offsetLeft:0,right:c.offsetRight<100?100-c.offsetRight:0},y=V()(n,"sp-presenter-timeline");return(0,C.jsx)("div",{className:y,onTouchStart:this.handleMouseOver,onTouchMove:this.handleMouseMove,onTouchEnd:function(t){e.handleClick(t),e.handleMouseLeave(t)},onMouseUp:this.handleClick,onMouseOver:this.handleMouseOver,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,ref:function(t){return e.timeline=t},children:(0,C.jsxs)("div",{className:"sp-presenter-timeline-bar",children:[l&&i&&f?(0,C.jsx)(ro,{image:f.image,leftPos:c.percent,title:f.title,offset:h}):null,o.map(function(e,t){var n=100/o.length*t;return(0,C.jsx)("div",{className:"sp-presenter-timeline-slide jhelp",style:{left:"".concat(n,"%"),width:"".concat(d,"%")}},e.key)}),r&&r.map(function(e,t){var n=100/o.length*e.index;return(0,C.jsx)(n7,{complete:e.complete,leftPos:n,width:d},t)}),(0,C.jsx)("div",{className:"sp-presenter-timeline-position",style:{left:"".concat(p,"%"),width:"".concat(d,"%")}})]})})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);ri(rc,"displayName","PresenterTimeline"),ri(rc,"propTypes",{className:L().string,markers:L().array,showPreview:L().bool,slides:L().array,onClick:L().func,onClickMarker:L().func,position:L().number}),ri(rc,"defaultProps",{className:"",markers:[],onClickMarker:function(){}});function ru(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rf(e){return(rf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rp=function(){return!!e})()}function rd(e,t){return(rd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var rh=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=[e],r=rf(r),ru(t=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,rp()?Reflect.construct(r,o||[],rf(this).constructor):r.apply(this,o)),"setHidden",function(e){t.setState({hidden:e}),t.fireEvents(e)}),ru(t,"handleMouseLeave",function(){t.timeout&&clearTimeout(t.timeout),t.timeout=setTimeout(function(){t.setHidden(!0)},2e3)}),ru(t,"handleMouseMove",function(){t.timeout&&clearTimeout(t.timeout)}),t.timeout=null,t.state={hidden:!!e.visible},t}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&rd(n,e),t=[{key:"componentDidMount",value:function(){this.fireEvents(this.state.hidden)}},{key:"componentDidUpdate",value:function(e){this.props.touchOnly&&!this.props.visible&&e.visible&&this.setHidden(!0)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeout)}},{key:"fireEvents",value:function(e){e?this.props.onHide():this.props.onShow()}},{key:"render",value:function(){var e,t,n=this,r=this.props,o=r.children,i=r.visible,a=r.showButton,s=r.alwaysShow,l=r.alwaysShowButton,c=r.touchOnly,u=r.hideButtonIcon,f=this.state.hidden,p=V()(this.props.className,"sp-presenter-toolbar",{"sp-presenter-toolbar--hidden":!s&&(a?f:!i),"sp-presenter-toolbar--visible":s||i,"sp-presenter-toolbar--has-icon":!!u}),d=V()("sp-presenter-toolbar--hide-button",{"sp-presenter-toolbar--hidden":!l&&!f&&!s}),h={};return s||c||(h={onMouseLeave:this.handleMouseLeave,onMouseMove:this.handleMouseMove}),(0,C.jsxs)("div",(e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){ru(e,t,n[t])})}return e}({className:p},h),t=t={children:[a?(0,C.jsx)("div",{className:d,onClick:function(){return n.setHidden(!f)},children:(0,C.jsxs)("div",{className:"inner",children:[u||null,(0,C.jsx)(eE.I,{value:f?"expand_less":"expand_more"})]})}):null,o]},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e))}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);ru(rh,"displayName","PresenterToolbar"),ru(rh,"propTypes",{className:L().string,autoHide:L().bool,visible:L().bool,showButton:L().bool,alwaysShow:L().bool,alwaysShowButton:L().bool,touchOnly:L().bool,hideButtonIcon:L().object}),ru(rh,"defaultProps",{visible:!0,alwaysShow:!1,touchOnly:!1,onHide:function(){},onShow:function(){}});function ry(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rv(e){return(rv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rb=function(){return!!e})()}function rg(e,t){return(rg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var rm=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=[e],r=rv(r),(t=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,rb()?Reflect.construct(r,o||[],rv(this).constructor):r.apply(this,o))).containerRef=e.forwardRef||x.createRef(),t}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&rg(n,e),t=[{key:"render",value:function(){var e=this.props,t=e.title,n=e.message;return(0,C.jsx)("div",{className:"sp-presenter-toolbar-notification",ref:this.containerRef,children:(0,C.jsxs)("div",{className:"sp-presenter-toolbar-notification-inner",children:[(0,C.jsx)("h6",{children:t}),n?(0,C.jsx)("p",{children:n}):null]})})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);ry(rm,"displayName","PresenterToolbarNotification"),ry(rm,"propTypes",{title:L().string,message:L().string});var rw=n(5471),rO=n(45940);function rk(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r_(e){return(r_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rj(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rj=function(){return!!e})()}function rS(e,t){return(rS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var rP=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=[e],r=r_(r),(t=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,rj()?Reflect.construct(r,o||[],r_(this).constructor):r.apply(this,o))).transitionRef=x.createRef(),t}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&rS(n,e),t=[{key:"render",value:function(){var e=this,t=this.props,n=t.position,r=t.notifications,o=t.toolbarHasTimeline,i=V()("sp-presenter-toolbar-notification-container",{"align-left":"left"===n,"align-right":"right"===n,"toolbar-has-timeline":o});return(0,C.jsx)("div",{className:i,children:(0,C.jsx)(rw.A,{component:"div",className:"sp-toolbar-notification-css-container",children:r.map(function(t,n){var r,o;return(0,C.jsx)(rO.A,{timeout:500,classNames:"sp-toolbar-notification-css-transition",nodeRef:e.transitionRef,children:(0,C.jsx)(rm,(r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){rk(e,t,n[t])})}return e}({},t),o=o={forwardRef:e.transitionRef},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}),r))},t.title)})})})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);rk(rP,"displayName","PresenterToolbarNotificationContainer"),rk(rP,"propTypes",{position:L().string,notifications:L().array,toolbarHasTimeline:L().bool});var rC=n(23502);function rx(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rE(e){return(rE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rT=function(){return!!e})()}function rI(e,t){return(rI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var rR=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=rE(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,rT()?Reflect.construct(e,t||[],rE(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&rI(n,e),t=[{key:"_onOverlayClick",value:function(){this.props.onOverlayClick()}},{key:"render",value:function(){var e=this,t=V()(this.props.className,"sp-side-nav",{"sp-closed":!this.props.opened,"sp-open":this.props.opened});return(0,C.jsxs)("div",{className:t,children:[this.props.opened&&(0,C.jsx)(rC.h,{onClick:function(t){return e._onOverlayClick(t)}}),(0,C.jsxs)("div",{className:"sp-side-nav-menu",children:[this.props.header,this.props.children]})]})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);rx(rR,"displayName","SideNav"),rx(rR,"propTypes",{opened:L().bool.isRequired,header:L().element,onChange:L().func,selectedIndex:L().number,onOverlayClick:L().func}),rx(rR,"defaultProps",{onOverlayClick:function(){}});function rD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rN(e){return(rN=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rA=function(){return!!e})()}function rB(e,t){return(rB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var rF=(0,e7.tG)("components"),rM=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=rN(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,rA()?Reflect.construct(e,t||[],rN(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&rB(n,e),t=[{key:"componentDidMount",value:function(){this.props.iconName&&this.props.children&&rF.warn("You have set both an iconName and a child icon. It is recommended you use only one method when adding icons to IconButtons.")}},{key:"render",value:function(){var e,t,n=this.props,r=n.children,o=n.width,i=n.active,a=n.disabled,s=n.iconName,l=n.onClick,c=n.label,u=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(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}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(n,["children","width","active","disabled","iconName","onClick","label"]),f="function"===r.type,p=V()("sp-tab-item",{"sp-tab-is-active":i,"sp-tab-disabled":a,"sp-tab-has-icon":s||f});return(0,C.jsxs)("div",(e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){rD(e,t,n[t])})}return e}({},u),t=t={className:p,style:{width:o},onClick:i||a?function(){}:l,label:c,children:[s&&(0,C.jsx)(eE.I,{value:s}),r,c&&(0,C.jsx)("span",{children:c})]},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e))}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);rD(rM,"displayName","Tab"),rD(rM,"propTypes",{onClick:L().func,width:L().any,active:L().bool,iconName:L().string,label:L().string.isRequired,disabled:L().bool,value:L().oneOfType([L().string,L().number]).isRequired}),rD(rM,"defaultProps",{width:"160px",onClick:function(){},active:!1,disabled:!1});function rL(e){return(rL=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rU=function(){return!!e})()}function rV(e,t){return(rV=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var rz=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=rL(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,rU()?Reflect.construct(e,t||[],rL(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&rV(n,e),t=[{key:"render",value:function(){var e={left:this.props.left,width:this.props.width,backgroundColor:this.props.color?this.props.color:null};return(0,C.jsx)("div",{className:"sp-ink-bar",style:e})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);s="propTypes",l={position:L().string,color:L().string},s in rz?Object.defineProperty(rz,s,{value:l,enumerable:!0,configurable:!0,writable:!0}):rz[s]=l;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}function rW(e){return(rW=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rK=function(){return!!e})()}function rq(e,t){return(rq=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function rH(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var rZ=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=rW(e),function(e,t){if(t&&("object"===rH(t)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,rK()?Reflect.construct(e,t||[],rW(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&rq(n,e),t=[{key:"render",value:function(){if(!this.props.children)throw Error("Tabs must contain at least one Tab component as a child");var e,t=!1,n=!1,r=null,o=0,i=[],a=x.Children.map(this.props.children,function(e,o){if(null!==e){var i=!1;this.props.autoWidth&&(i=8*e.props.label.length+50);var a=(function(){e.props.onClick(e,arguments),this.props.onChange(e.props.value,o)}).bind(this);return"object"==rH(e.props.children)&&(t=!0),n=""==e.props.label,this.props.selectedValue===e.props.value&&(r=o),x.cloneElement(e,{key:o,width:this.props.autoWidth?i:e.props.width,onClick:a,active:o===r},e.props.children||[])}},this);if(r=null,x.Children.forEach(a,function(t,n){null!==t&&(t.type.displayName,this.props.selectedValue===t.props.value&&(r=n,e=t.props.width),null===r&&(o+=t.props.width),i.push(t.props.value))},this),null===r)throw Error("Selected value does NOT match any tab value. The options are: ".concat(i.join(", ")));var s=!1,l=null,c=null;if(this.props.themeColor){s=(0,nG.A)(this.props.themeColor),l={backgroundColor:this.props.themeColor};var u,f,p,d=s?"#ffffff":(u=this.props.themeColor,p=(f=(0,eI.A)(u)).clone().greyscale(),(f.toHexString()===p.toHexString()?eI.A.mostReadable(u,[f.clone().darken(30).toHexString(),f.clone().lighten(40).toHexString()]):eI.A.mostReadable(u,[f.clone().darken(20).saturate(50).toHexString(),f.clone().lighten(24).toHexString()])).toHexString());c=this.props.secondaryColor?this.props.secondaryColor:d}var h=V()("sp-tabs-container",{"sp-tabs-proportional":this.props.proportional,"sp-theme-dark":s}),y=V()("sp-tab-item-container",{"sp-tabs-has-icons":t,"sp-tabs-no-labels":n});return(0,C.jsxs)("div",{className:h,children:[(0,C.jsx)("div",{className:y,style:l,children:a}),(0,C.jsx)(rz,{left:o,width:e,color:c})]})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);r$(rZ,"displayName","Tabs"),r$(rZ,"propTypes",{onChange:L().func,autoWidth:L().bool,selectedValue:L().oneOfType([L().string,L().number]).isRequired,themeColor:L().string,secondaryColor:L().string}),r$(rZ,"defaultProps",{onChange:function(){}});function rJ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rG(e){return(rG=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rY=function(){return!!e})()}function rX(e,t){return(rX=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var rQ=(0,X.N)((rJ(j=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=[e],r=rG(r),(t=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,rY()?Reflect.construct(r,o||[],rG(this).constructor):r.apply(this,o))).containerRef=e.forwardRef||x.createRef(),t}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&rX(n,e),t=[{key:"render",value:function(){var e=this.props.action?(0,C.jsx)(ex.k,{className:"sp-snackbar-action",label:this.props.action.label,onClick:this.props.action.onClick}):null,t=this.props.dimissable?(0,C.jsx)(nj.K,{className:"sp-snackbar-close",iconName:"close",onClick:this.props.onClose}):null,n=V()("sp-snackbar",{"is-error":this.props.isError,dismissable:this.props.dimissable});return(0,C.jsx)("div",{className:"sp-snackbar-wrapper",ref:this.containerRef,children:(0,C.jsx)("div",{className:n,children:(0,C.jsxs)("div",{className:"sp-snackbar-container",children:[(0,C.jsx)("span",{className:"sp-snackbar-message",children:this.props.message}),e,t]})})})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component),"displayName","Snackbar"),rJ(j,"propTypes",{action:L().object,isError:L().bool,message:L().string.isRequired,onClose:L().func,dimissable:L().bool}),rJ(j,"defaultProps",{isError:!1,dimissable:!0}),j));function r0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r1(e){return(r1=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function r2(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(r2=function(){return!!e})()}function r3(e,t){return(r3=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var r5=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=[e],r=r1(r),r0(t=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,r2()?Reflect.construct(r,o||[],r1(this).constructor):r.apply(this,o)),"handleSnackBarCloseClicked",function(){clearTimeout(t.timeoutOpen),t.setState({currentSnack:null}),t.props.onSnackbarComplete(),t.delayUntilNextSnack()}),t.timeoutOpen=null,t.timeoutNextSnack=null,t.state={currentSnack:null},t.transitionRef=e.forwardRef||x.createRef(),t}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&r3(n,e),t=[{key:"componentDidMount",value:function(){this.props.snacks.length&&this.recurseSnackStack(this.props.snacks)}},{key:"UNSAFE_componentWillUpdate",value:function(e){null===this.state.currentSnack||e.snacks.length&&("number"!=typeof e.snacks[0].id||this.state.currentSnack.id===e.snacks[0].id)?!this.props.snacks.length&&e.snacks.length&&this.recurseSnackStack(e.snacks):(this.setState({currentSnack:null}),clearTimeout(this.timeoutOpen),clearTimeout(this.timeoutNextSnack),this.delayUntilNextSnack())}},{key:"delayUntilNextSnack",value:function(){var e=this;this.timeoutNextSnack=setTimeout(function(){e.props.snacks.length&&e.recurseSnackStack(e.props.snacks)},this.props.timeBetweenDelay)}},{key:"recurseSnackStack",value:function(e){var t=this;n.snackbarCount++;var r=e[0];void 0===r.delay&&(r.delay=4e3),this.setState({currentSnack:r}),this.timeoutOpen=setTimeout(function(){t.setState({currentSnack:null}),t.props.onSnackbarComplete(),t.delayUntilNextSnack()},r.delay)}},{key:"render",value:function(){var e,t,r=this.state.currentSnack;return(0,C.jsx)(rw.A,{component:"div",className:"sp-snackbar-list",children:r?(0,C.jsx)(rO.A,{timeout:500,classNames:"sp-snackbar",nodeRef:this.transitionRef,children:(0,C.jsx)(rQ,(e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){r0(e,t,n[t])})}return e}({},r),t=t={onClose:this.handleSnackBarCloseClicked,forwardRef:this.transitionRef},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e))},n.snackbarCount):null})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);r0(r5,"displayName","SnackbarList"),r0(r5,"propTypes",{snacks:L().arrayOf(L().object).isRequired,onSnackbarComplete:L().func,timeBetweenDelay:L().number}),r0(r5,"defaultProps",{snacks:[],onSnackbarComplete:function(){},timeBetweenDelay:500}),r0(r5,"snackbarCount",0);function r4(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r6(e){return(r6=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function r8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(r8=function(){return!!e})()}function r9(e,t){return(r9=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var r7=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=[e],r=r6(r),(t=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,r8()?Reflect.construct(r,o||[],r6(this).constructor):r.apply(this,o))).visualiserRef=x.createRef(),t}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&r9(n,e),t=[{key:"componentDidMount",value:function(){this.startAnimate()}},{key:"componentDidUpdate",value:function(){this.startAnimate()}},{key:"componentWillUnmount",value:function(){window.cancelAnimationFrame(this.anim)}},{key:"animate",value:function(){var e=this;if(this.props.stream&&this.visualiserRef.current){var t=this.visualiserRef.current.querySelectorAll("div");this.analyser.getByteTimeDomainData(this.audioData),t.forEach(function(t,n){var r=ei().sum(ei().slice(e.audioData,3*n,3*n+3))/384;t.style.height="".concat((1-r)*500,"px")}),this.anim=window.requestAnimationFrame(function(){return e.animate()})}}},{key:"startAnimate",value:function(){var e=this;window.cancelAnimationFrame(this.anim),this.props.stream&&(this.audioContext=new(window.AudioContext||window.webkitAudioContext),this.analyser=this.audioContext.createAnalyser(),this.source=this.audioContext.createMediaStreamSource(this.props.stream),this.source.connect(this.analyser),this.analyser.fftSize=32,this.bufferLength=this.analyser.frequencyBinCount,this.audioData=new Uint8Array(this.bufferLength),this.anim=window.requestAnimationFrame(function(){return e.animate()}))}},{key:"render",value:function(){return(0,C.jsxs)("div",{className:"sp-visualiser",ref:this.visualiserRef,children:[(0,C.jsx)("div",{}),(0,C.jsx)("div",{}),(0,C.jsx)("div",{}),(0,C.jsx)("div",{}),(0,C.jsx)("div",{})]})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);r4(r7,"displayName","Visualiser"),r4(r7,"propTypes",{className:L().string,stream:L().any});function oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ot(e){return(ot=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function on(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(on=function(){return!!e})()}function or(e,t){return(or=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var oo=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=[e],r=ot(r),(t=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,on()?Reflect.construct(r,o||[],ot(this).constructor):r.apply(this,o))).state={isVisible:!0},t.timeout=!1,t}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&or(n,e),t=[{key:"componentDidMount",value:function(){this.fadeAway()}},{key:"componentDidUpdate",value:function(){this.state.isVisible&&(clearTimeout(this.timeout),this.fadeAway())}},{key:"fadeAway",value:function(){var e=this,t=this.props.duration;t&&(this.timeout=setTimeout(function(){e.setState({isVisible:!1})},t))}},{key:"render",value:function(){var e=this.props.segment,t=this.state.isVisible;return(0,C.jsx)("p",{className:V()("sp-caption",{isVisible:t}),children:(0,C.jsx)("span",{children:e})})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);oe(oo,"displayName","Caption"),oe(oo,"propTypes",{segment:L().string,duration:L().number});function oi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oa(e){return(oa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function os(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(os=function(){return!!e})()}function ol(e,t){return(ol=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var oc=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=oa(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,os()?Reflect.construct(e,t||[],oa(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&ol(n,e),t=[{key:"render",value:function(){var e=this.props,t=e.className,n=e.segments,r=e.duration;return(0,C.jsx)("div",{className:V()("sp-captions-container",t),children:ei().map(n,function(e){return(0,C.jsx)(oo,{segment:e.text,duration:r},e.key)})})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);oi(oc,"displayName","Captions"),oi(oc,"propTypes",{className:L().string,segments:L().array,duration:L().number});function ou(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function of(e){return(of=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function op(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(op=function(){return!!e})()}function od(e,t){return(od=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var oh=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=of(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,op()?Reflect.construct(e,t||[],of(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&od(n,e),t=[{key:"render",value:function(){var e=V()("sp-caption-toolbar",this.props.className);return(0,C.jsxs)("div",{className:e,children:[(0,C.jsx)("p",{children:this.props.text}),this.props.buttons?(0,C.jsx)("div",{className:"sp-caption-toolbar__buttons",children:this.props.buttons}):null]})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);ou(oh,"displayName","CaptionToolbar"),ou(oh,"propTypes",{className:L().string,text:L().string,buttons:L().object});function oy(e){return(oy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ov(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ov=function(){return!!e})()}function ob(e,t){return(ob=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(0,X.N)((c=S=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=oy(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,ov()?Reflect.construct(e,t||[],oy(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&ob(n,e),t=[{key:"render",value:function(){var e=this.props.getClasses({"sp-app-canvas":!0,"sp-predefined-layout-1":1===this.props.predefinedLayout});return(0,C.jsx)("div",{className:e,children:this.props.children})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component),u="propTypes",f={predefinedLayout:L().number},u in c?Object.defineProperty(c,u,{value:f,enumerable:!0,configurable:!0,writable:!0}):c[u]=f,S)),n(6898);function og(e){return(og=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function om(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(om=function(){return!!e})()}function ow(e,t){return(ow=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var oO=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");if(r=n,o=[e],r=og(r),t=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,om()?Reflect.construct(r,o||[],og(this).constructor):r.apply(this,o)),!e.elementID)throw Error("No element provided to editable component");return t}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&ow(n,e),t=[{key:"render",value:function(){return null}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);d={value:null,saved:{value:null,mime:null},accepted:{value:null,mime:null},mime:null,changed:!1,elementID:null,data:null,error:null},(p="defaultProps")in oO?Object.defineProperty(oO,p,{value:d,enumerable:!0,configurable:!0,writable:!0}):oO[p]=d;var ok=n(84497),o_=n.n(ok),oj=n(34209),oS=n.n(oj),oP=(0,e7.Ay)("components"),oC=n(14927);function ox(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function oE(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){ox(i,r,o,a,s,"next",e)}function s(e){ox(i,r,o,a,s,"throw",e)}a(void 0)})}}function oT(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var oI=(n.n(oC))()(),oR=!1;function oD(e,t){return oE(function(e,t){var n,r,o,i,a,s,l,c;return oT(this,function(u){switch(u.label){case 0:if(n=t.width,r=t.height,o=t.mime,i=t.quality,(a=document.createElement("canvas")).width=n,a.height=r,oR)return[3,5];u.label=1;case 1:return u.trys.push([1,4,,5]),[4,oI.resize(e,a)];case 2:return s=u.sent(),[4,oI.toBlob(s,o,i)];case 3:return[2,u.sent()];case 4:return"ERR_GET_IMAGE_DATA"===(l=u.sent()).code?oR=!0:oP.warn("pica could not resize the image, using the canvas",l),[3,5];case 5:return(c=a.getContext("2d")).imageSmoothingQuality="high",c.drawImage(e,0,0,n,r),[2,new Promise(function(e,t){a.toBlob(function(n){return n?e(n):t(Error("The resized image could not be read back."))},o,i)})]}})}).apply(this,arguments)}function oN(e){return oE(function(){var t,n,r,o,i,a;return oT(this,function(s){switch(s.label){case 0:if(e.size<=2097152)return[2,e];return[4,new Promise(function(t,n){var r=new FileReader;r.onload=function(e){var r=new Image;r.onload=function(){return t(r)},r.onerror=function(){return n(Error("The image could not be read."))},r.src=e.target.result},r.onerror=n,r.readAsDataURL(e)})];case 1:n=(t=s.sent()).width,r=t.height,(n>1920||r>1920)&&(o=n/r,n>r?r=(n=1920)/o:n=(r=1920)*o),i=1,s.label=2;case 2:if(!(i>=.1))return[3,5];return[4,oD(t,{width:n,height:r,mime:"image/jpeg",quality:i})];case 3:if((a=s.sent()).size<=2097152)return[2,new File([a],"resized_image.jpg",{type:"image/jpeg"})];s.label=4;case 4:return i-=.1,[3,2];case 5:throw Error("Unable to resize image to fit within 2.5 MB")}})})()}function oA(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(){return t(r.result)},r.onerror=n,r.readAsDataURL(e)})}function oB(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var oF="image/webp";function oM(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){oM(e,t,n[t])})}return e}function oU(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function oV(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function oz(){var e=oV(["",":\n\n You must include both data-save-max-width and data-save-max-height when\n initializing an image.\n\n ",""]);return oz=function(){return e},e}function o$(){var e=oV(["",":\n\n You must specify a data-save-max-width and data-save-max-height that\n matches the aspect ratio for your image element container.\n\n For example if you want it to be 1024x768, but your container element is 100x100,\n it won't work. If your container element something like 256x192 it will.\n\n Consider changing the container size to match the aspect ratio of your\n save-max-width and height, or otherise changing these values to match your\n container's aspect ratio.\n\n Current width and height of container element: "," / ","\n Current aspect ratio: ","\n Expected aspect ratio: ","\n\n ",""]);return o$=function(){return e},e}var oW={autoCropArea:1,modal:!1,guides:!1,highlight:!1,background:!1,center:!1,cropBoxResizable:!1,cropBoxMovable:!1,toggleDragModeOnDblclick:!1,responsive:!1,crossOrigin:"anonymous",ready:function(){}},oK=function(){var e;function t(e){var n=this;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");oM(this,"save",function(){n.allowNav(!1);var e=n.cropperJS.getCroppedCanvas();if(!e)return void n.allowNav(!0);var t=n.cropperJS.imageData,r=t.naturalHeight,o=t.naturalWidth,i=t.rotate,a=n.cropperJS.initialCropBoxData,s=a.maxWidth,l=a.maxHeight,c=n.saveMaxDimensions,u=c.width,f=c.height,p=s,d=l,h=90===i||270===i,y=h?r:o,v=h?o:r;if(!s||!l)return void n.allowNav(!0);if(n.onCropperSaving(!0),u||f){var b="There was an issue with setting the max save width and height for an image cropper",g="Falling back to size of container, ".concat(s,"x").concat(l,"."),m=Math.round(s/l*100)/100,w=u&&f?Math.round(u/f*100)/100:null;u&&f?m!==w?oP.warn(oS()(o$(),b,s,l,m,w,g)):(p=u,d=f):oP.warn(oS()(oz(),b,g))}var O=y/p,k=v/d;(function(e,t){var n;return(n=function(e,t){var n,r;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(o){switch(o.label){case 0:return[4,oD(e,{width:t.width,height:t.height,mime:oF,quality:.9})];case 1:return n=o.sent(),r=oF.split("/")[1],[4,oN(new File([n],"image.".concat(r),{type:oF}))];case 2:return[2,oA.apply(void 0,[o.sent()])]}})},function(){var e=this,t=arguments;return new Promise(function(r,o){var i=n.apply(e,t);function a(e){oB(i,r,o,a,s,"next",e)}function s(e){oB(i,r,o,a,s,"throw",e)}a(void 0)})}).apply(this,arguments)})(e,{width:y/O,height:v/k}).then(function(e){n.updateField(e),n.onCropperSaving(!1)}).catch(function(e){var t;oP.error("An image crop could not be saved",e),n.onCropperSaving(!1),n.allowNav(!0),null==(t=n.onSaveFailed)||t.call(n,e)})}),oM(this,"updateField",function(e){if(null===e)return void n.allowNav(!0);if("data:,"===e){n.resetCropper(),n.allowNav(!0);return}var t="".concat(n.mimeType,";base64");n.rememberSavedCrop(),n.onUpdateField({value:e,mime:t,cropperData:oU(oL({},n.cropperJS.getCanvasData()),{rotation:n.cropperJS.imageData.rotate})}),n.allowNav(!0)}),oM(this,"saveIfMoved",function(){n.readCrop()!==n.savedCrop&&n.save()}),oM(this,"debouncedSave",ei().debounce(this.saveIfMoved,500)),oM(this,"onReady",function(){var e=n.cropperJS.initialCropBoxData;if(e.minWidth=e.maxWidth,e.minHeight=e.maxHeight,n.cropperJS.reset(),n.initial&&!n.resizing&&(n.initial=!1,n.initialCropBoxData)){var t=n.initialCropBoxData,r=t.rotation,o=t.box,i=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(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}(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(t,["rotation","box"]);n.cropperJS.rotateTo(void 0===r?0:r),n.cropperJS.setCanvasData(function(e,t,n){if(!(null==t?void 0:t.width)||!(null==n?void 0:n.offsetWidth))return e;var r,o,i=n.offsetWidth/t.width;return r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),o=o={left:e.left*i,top:e.top*i,width:e.width*i,height:e.height*i},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}),r}(i,o,n.parentEl))}n.rememberSavedCrop(),n.isReady&&n.resizing&&(n.zoomToFit(),n.save()),n.onCropperReady(),setTimeout(function(){n.isReady=!0},50)});var r=e.htmlImageElement,o=e.originalImageURL,i=e.initialCropBoxData,a=e.onUpdateField,s=e.onCropperReady,l=e.onCropperSaving,c=e.onSaveFailed,u=e.domDimensions,f=e.saveMaxDimensions,p=e.hasCroppedValue,d=e.parentEl;(this.parentEl=d,this.htmlImageElement=r,this.originalImageURL=o,this.onUpdateField=a,this.onCropperReady=s,this.onCropperSaving=l,this.onSaveFailed=c,this.domDimensions=u,this.saveMaxDimensions=f,this.hasCroppedValue=p,this.initialCropBoxData=i,this.cropperJS=null,this.isReady=!1,this.initial=!0,this.mimeType=oF,this.htmlImageElement&&null!==this.htmlImageElement.parentNode)?(this.htmlImageElement.addEventListener("cropend",this.debouncedSave),this.htmlImageElement.addEventListener("zoom",this.debouncedSave),this.resetCropper(),window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(function(){n.isReady&&(n.resizing=!0,n.domDimensions=n.parentEl.getBoundingClientRect(),n.resetCropper())}),this.resizeObserver.observe(d))):oP.warn("Cropper was built with an image element that is",this.htmlImageElement?"not on the page":"missing","- the field it is for cannot be cropped.")}return e=[{key:"_zoomTo",value:function(e){var t,n,r=this.cropperJS.getImageData().rotate;null==(t=this.cropperJS)||t.reset(),this.cropperJS.rotateTo(r),null==(n=this.cropperJS)||n.zoomTo(function(e,t,n){if("fit"!==n&&"fill"!==n)throw Error("Invalid zoom type: "+n+". Must be either 'fit' or 'fill'");var r=e.width,o=e.height,i=e.naturalWidth,a=e.naturalHeight,s=e.rotate,l=t.width,c=t.height,u=90===s||270===s,f=u?l:c,p=u?c:l,d=p-r,h=f-o,y=p/i,v=f/a;return"fit"===n?d<h?y:v:d>h?y:v}(this.cropperJS.getImageData(),this.cropperJS.getCropBoxData(),e))}},{key:"zoomToFit",value:function(){this._zoomTo("fit")}},{key:"zoomToFill",value:function(){this._zoomTo("fill")}},{key:"zoomIn",value:function(){var e;null==(e=this.cropperJS)||e.zoom(.1)}},{key:"zoomOut",value:function(){var e;null==(e=this.cropperJS)||e.zoom(-.1)}},{key:"rotateRight",value:function(){var e;null==(e=this.cropperJS)||e.rotate(90),this.debouncedSave()}},{key:"rotateLeft",value:function(){var e;null==(e=this.cropperJS)||e.rotate(-90),this.debouncedSave()}},{key:"allowNav",value:function(e){window.Bridge&&window.Bridge.Navigation.allowNav(e)}},{key:"readCrop",value:function(){return JSON.stringify(oU(oL({},this.cropperJS.getCanvasData()),{rotation:this.cropperJS.imageData.rotate}))}},{key:"rememberSavedCrop",value:function(){this.savedCrop=this.readCrop()}},{key:"resetCropper",value:function(){this.isReady=!1,null==(e=this.cropperJS)||e.destroy();var e,t=oU(oL({},oW),{dragMode:this.hasCroppedValue?"none":"move",zoomOnWheel:!this.hasCroppedValue,zoomOnTouch:!this.hasCroppedValue,minCropBoxWidth:this.domDimensions.width,minCropBoxHeight:this.domDimensions.height,minContainerWidth:this.domDimensions.width,minContainerHeight:this.domDimensions.height,ready:this.onReady});this.htmlImageElement.src=this.originalImageURL,null!==this.htmlImageElement.parentNode&&(this.cropperJS=new(o_())(this.htmlImageElement,t))}},{key:"flushPendingSave",value:function(){this.debouncedSave.flush()}},{key:"destroy",value:function(){var e,t;this.debouncedSave.cancel(),this.htmlImageElement.removeEventListener("cropend",this.debouncedSave),this.htmlImageElement.removeEventListener("zoom",this.debouncedSave),null!==this.htmlImageElement.parentNode&&(null==(t=this.cropperJS)||t.destroy()),null===this||void 0===this||null==(e=this.resizeObserver)||e.disconnect()}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}(),oq=n(51158),oH=n.n(oq),oZ=n(26046);function oJ(e){return"#".concat(e," .presoSlide.current")}function oG(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oY(e){return(oY=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function oX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(oX=function(){return!!e})()}function oQ(e,t){return(oQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o0(e){var t,n=e.title,r=e.icon,o=e.action,i=e.selected,a=e.disabled,s=V()("------modules-editable-components-components-image-ImageToolbar__toolbar-button",(oG(t={},"------modules-editable-components-components-image-ImageToolbar__button-selected",i),oG(t,"------modules-editable-components-components-image-ImageToolbar__button-disabled",a),t));return(0,C.jsx)("div",{className:s,title:n,onClick:a?null:o,children:(0,C.jsx)("div",{className:"------modules-editable-components-components-image-ImageToolbar__toolbar-button-inner",children:(0,C.jsx)("span",{className:"sp-material-icon",children:r})})})}function o1(e){var t=e.title,n=e.action,r=e.disabled,o=V()("------modules-editable-components-components-image-ImageToolbar__menu-item",oG({},"------modules-editable-components-components-image-ImageToolbar__disabled",r));return(0,C.jsx)("div",{className:o,onClick:r?null:n,children:t})}var o2=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t,r;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=oY(t),oG(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,oX()?Reflect.construct(t,r||[],oY(this).constructor):t.apply(this,r)),"state",{top:0,left:0,show:!1,isAbove:!1,showMenu:!1}),oG(e,"menuRef",x.createRef()),oG(e,"checkClickaway",function(t){if(e.state.showMenu){var n=e.menuRef.current.parentNode;n.contains(t.target)||n===t.target||setTimeout(function(){e.setState({showMenu:!1})},0)}}),oG(e,"setResizeTimeout",function(){e.resizeTimeout?clearTimeout(e.resizeTimeout):e.setState({show:!1}),e.resizeTimeout=setTimeout(function(){e.repositionToolbar(),e.setState({show:!0}),e.resizeTimeout=null},200)}),oG(e,"repositionToolbar",function(){var t=e.props,n=t.containerID,r=t.selector,o=oJ(n),i=D()(o).find(r);if(i.length>1&&(i=D()(i.get(0))),0!==i.length){var a=i[0].getBoundingClientRect(),s=D()("#presenter"),l=s.length?s[0].getBoundingClientRect():{},c=a.left+1,u=a.top-41-l.top,f=!0;u<0&&(u=a.top,f=!1),e.setState({top:u,left:c,isAbove:f})}}),oG(e,"handleMenuToggle",function(){e.setState({showMenu:!e.state.showMenu})}),oG(e,"handleMenuItemClick",function(t){e.setState({showMenu:!1}),t()}),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&oQ(n,e),t=[{key:"componentDidMount",value:function(){this.repositionToolbar(),this.setState({show:!0}),D()(window).on("resize",this.setResizeTimeout),D()("body").on("click",this.checkClickaway)}},{key:"componentDidUpdate",value:function(e){this.props.show&&!e.show&&this.repositionToolbar()}},{key:"componentWillUnmount",value:function(){D()(window).off("resize",this.setResizeTimeout),D()("body").off("click",this.checkClickaway)}},{key:"render",value:function(){var e=this;if(!this.state.show||!this.props.show)return null;var t=this.props.hasCroppedValue,n={top:"".concat(this.state.top,"px"),left:"".concat(this.state.left,"px")},r=V()("sp-dropzone__undo-button-container","".concat("------modules-editable-components-components-image-ImageToolbar__image-toolbar"),oG({},"------modules-editable-components-components-image-ImageToolbar__toolbar-solid",this.state.isAbove));return(0,C.jsxs)("div",{id:"".concat(this.props.elementID,"-toolbar"),className:r,style:n,children:[(0,C.jsx)(o0,{title:"Menu",icon:"more_horiz",action:this.handleMenuToggle,selected:this.state.showMenu}),(0,C.jsx)("div",{className:"------modules-editable-components-components-image-ImageToolbar__toolbar-separator"}),(0,C.jsx)(o0,{title:"Zoom out",icon:"zoom_out",action:this.props.onZoomOut,disabled:t}),(0,C.jsx)(o0,{title:"Zoom in",icon:"zoom_in",action:this.props.onZoomIn,disabled:t}),this.state.showMenu?(0,C.jsx)("div",{className:"------modules-editable-components-components-image-ImageToolbar__menu",ref:this.menuRef,children:(0,C.jsxs)("div",{className:"------modules-editable-components-components-image-ImageToolbar__menu-inner",children:[(0,C.jsx)(o1,{title:"Zoom to fit within",action:function(){return e.handleMenuItemClick(e.props.onZoomToFitWithin)},disabled:t}),(0,C.jsx)(o1,{title:"Zoom to entirely cover",action:function(){return e.handleMenuItemClick(e.props.onZoomToCover)},disabled:t}),(0,C.jsx)(o1,{title:"Rotate right",action:function(){return e.handleMenuItemClick(e.props.onRotateImageRight)},disabled:t}),(0,C.jsx)(o1,{title:"Rotate left",action:function(){return e.handleMenuItemClick(e.props.onRotateImageLeft)},disabled:t}),(0,C.jsx)(o1,{title:"Remove",action:function(){return e.handleMenuItemClick(e.props.onRemoveImage)}})]})}):null]})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);oG(o2,"defaultProps",{hasCroppedValue:!1,elementID:null,containerID:null,onZoomIn:function(){},onZoomOut:function(){},onRotateImageRight:function(){},onRotateImageLeft:function(){},onRemoveImage:function(){},onZoomToFitWithin:function(){},onZoomToCover:function(){},onRestorePreviousImage:function(){}});var o3="sp-editable-field-error",o5={"not-an-image-url":"This needs to be a link to an image.","not-a-youtube-video":"This needs to be a YouTube link.","not-permitted":"This formatting isn't allowed here."};function o4(e,t){var n=e.next(".".concat(o3));t?n.length?n.text(t):(e.after('<div class="'.concat(o3,'"></div>')),e.next(".".concat(o3)).text(t)):n.remove()}function o6(){return void 0!==window.__cdk_version__}function o8(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function o9(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o7(e){return(o7=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ie(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ie=function(){return!!e})()}function it(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){o9(e,t,n[t])})}return e}function ir(e,t){return(ir=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var io=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t,r;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=o7(t),o9(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,ie()?Reflect.construct(t,r||[],o7(this).constructor):t.apply(this,r)),"state",{isFocused:!1,hasImage:!1,imageChanged:!1}),o9(e,"dropzone",null),o9(e,"originalImage",null),o9(e,"initialCropBoxData",null),o9(e,"loadingReactRoot",null),o9(e,"lastPushedValue",null),o9(e,"updateField",function(t){var n,r,o,i=t.value,a=t.mime,s=t.cropperData;null==(o=e.imageEl)||o.attr("src",i),e.lastPushedValue=i,e.props.onFieldUpdated({value:i,mime:a,id:e.props.elementID,saved:(n=it({},e.props.saved),r=r={originalImage:e.originalImage,cropperData:s},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n),accepted:it({},e.props.accepted)}),e.setState({hasImage:!!i})}),o9(e,"addFocus",function(){e.setState({isFocused:!0})}),o9(e,"checkClickaway",function(t){if(e.state.isFocused){var n=e.$el[0];if(!n)return void e.setState({isFocused:!1});var r=n.contains(t.target)||n===t.target,o=D()("#".concat(e.props.elementID,"-toolbar")),i=o?o[0]:null,a=i&&i.contains(t.target)||i===t.target;r||a||e.setState({isFocused:!1})}}),o9(e,"handleZoomIn",function(){var t;null==(t=e.cropper)||t.zoomIn()}),o9(e,"handleZoomOut",function(){var t;null==(t=e.cropper)||t.zoomOut()}),o9(e,"handleRotateImageRight",function(){var t;null==(t=e.cropper)||t.rotateRight()}),o9(e,"handleRotateImageLeft",function(){var t;null==(t=e.cropper)||t.rotateLeft()}),o9(e,"handleZoomToCover",function(){var t;null==(t=e.cropper)||t.zoomToFill()}),o9(e,"handleZoomToFitWithin",function(){var t;null==(t=e.cropper)||t.zoomToFit()}),o9(e,"handleRemoveImage",function(){e.updateField({value:null,mime:"image"}),e.showEmpty()}),o9(e,"handleRestoreOriginalImage",function(){e.updateField(e.originalImageData),e.setImage(e.originalImageData),e.setState({imageChanged:!1})}),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&ir(n,e),t=[{key:"componentDidMount",value:function(){var e=this.$el,t=this.props,n=t._orig_value,r=t.value,o=t.cropperData,i=this.props.originalImage,a=this.props.saved;if(i&&(a={originalImage:i,cropperData:o}),r){var s=e.find(".image-background-container");this.backgroundImage=s.length?s.css("background-image"):null,this.hasCroppedValue=!0}else this.backgroundImage=e.css("background-image"),this.hasCroppedValue=!1;if(null==a?void 0:a.originalImage)this.originalImage=a.originalImage,this.initialCropBoxData=a.cropperData,this.hasCroppedValue=!1;else if(r&&!r.startsWith("data")){var l=function(e){if(!e)return null;var t=N.parseUrl(e).query;if(!(null==t?void 0:t.originalImage))return null;var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({width:Number(t.cropperWidth),height:Number(t.cropperHeight),left:Number(t.cropperX),top:Number(t.cropperY),rotation:Number(t.rotation||0)},t.cropperBoxWidth&&{box:{width:Number(t.cropperBoxWidth),height:Number(t.cropperBoxHeight)}}),r=decodeURI((null==t?void 0:t.originalImage)||"")||e;return{cropBoxData:n,originalImage:r.includes("base64")?e:r}}(r);if(l){if(this.initialCropBoxData=l.cropBoxData,this.originalImage=l.originalImage,this.originalImage.includes("filesystem:")){var c=N.parseUrl(null!=n?n:r).url;this.originalImage=c,this.initialCropBoxData=null}this.hasCroppedValue=!1}else this.originalImage=null!=n?n:r}this.originalImage||(this.originalImage=null!=n?n:r),this.setState({hasImage:!!r}),e.children("img[data-presenter-image]").remove(),e.addClass("sp-companywide-editable"),e.addClass("interactive"),e.addClass("------modules-editable-components-components-image-Image__dynamic-image-container"),e.css("height",e.css("height")),e.css("width",e.css("width"));var u=D()("<div>");u.attr("id",this.dropzoneID),u.addClass("dropzone-element"),e.append(u),this.setUpImageElement(),e.on("click",this.addFocus);var f=D()("body");f.on("click",this.checkClickaway),f.on("resize",this.resizeImageElement),this.initialSetup()}},{key:"componentDidUpdate",value:function(e){var t,n,r;if(this.props.error!==e.error&&o4(this.$el,this.props.error),this.props.value!==e.value){if(!this.props.value){e.value&&this.showEmpty();return}this.props.value!==this.lastPushedValue&&(this.originalImage=null!=(t=this.props.originalImage)?t:this.props.value,this.initialCropBoxData=this.props.originalImage&&null!=(n=this.props.cropperData)?n:null,this.$el.removeClass("sp-companywide-empty"),this.setImage(this.originalImage,!1,!this.props.originalImage),null==(r=this.dropzone)||r.disable(),this.setState({hasImage:!0,imageChanged:!!e.value}))}}},{key:"componentWillUnmount",value:function(){var e,t=this.$el;(null==(e=this.imageEl)?void 0:e.attr("src"))&&this.imageEl.css("display",""),this.cropper&&(this.cropper.flushPendingSave(),this.cropper.destroy()),t.removeClass("sp-companywide-editable"),t.find(".sp-dropzone__undo-button-container").remove(),t.find(".sp-dropzone__message").remove(),D()("body").off("click",this.checkClickaway),this.dropzone&&this.dropzone.destroy(),this.$el.find("#".concat(this.dropzoneID)).remove()}},{key:"selector",get:function(){return this.props.selector||'[data-companywide-dynamic-image="'.concat(this.props.elementID,'"]:not([data-readonly])')}},{key:"$el",get:function(){var e=oJ(this.props.containerID),t=D()(e).find(this.selector);return t.length>1?D()(t.get(0)):t}},{key:"imageEl",get:function(){var e=this.$el.find("#".concat(this.imageID));return e.length>0?e:null}},{key:"imageID",get:function(){return"".concat(this.props.elementID,"-image")}},{key:"dropzoneID",get:function(){return"".concat(this.props.elementID,"-dropzone")}},{key:"originalImageData",get:function(){var e=null,t="image";return this.props.data?(e=this.props.data.value,t=this.props.data.mime):this.props.saved&&(e=this.props.saved.value,t=this.props.saved.mime),!e&&this.props.accepted&&(e=this.props.accepted.value,t=this.props.accepted.mime),this.originalImage&&(e=this.originalImage),{value:e,mime:t}}},{key:"initialSetup",value:function(){var e=this.props,t=e.elementID,n=e.value,r=this.$el;if(r&&r.length){r.attr("id")||r.attr("id",this.props.elementID);try{this.addDropzone()}catch(e){oP.error("Could not attach dropzone to element ".concat(t," - "),e);return}n?this.setImage(this.originalImage||n):r.addClass("sp-companywide-empty")}}},{key:"setUpImageElement",value:function(){var e=null;this.$el.find("img").length?e=this.$el.find("img"):(e=D()("<img>"),this.$el.append(e)),e.attr("id",this.imageID),e.addClass("------modules-editable-components-components-image-Image__image-element"),e.css("height",this.$el.css("height")),e.css("width",this.$el.css("width")),e.css("display","none")}},{key:"addDropzone",value:function(){var e=this,t=o6(),n=t?{}:A.Nj.headers,r=t?null:A.jI.getURL(),o=this.props,i=o.willUpload,a=o.translations,s="#".concat(this.dropzoneID);this.dropzone=new(oH())(s,{maxFiles:1,addRemoveLinks:!1,dictCancelUpload:"",url:r?"".concat(r,"images/"):"placeholder.com",headers:n,paramName:"image_original",acceptedFiles:"image/jpeg,image/png,image/gif",dictInvalidFileType:a.invalidFile,dictFileTooBig:"File is too big ({{filesize}}MB). Max filesize: {{maxFilesize}}MB.",clickable:s,maxFilesize:4,accept:function(n){var r;return(r=function(){var e,r,o,a,s;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(l){switch(l.label){case 0:if(!i)return[2];if(t)return this.imageUploaded(URL.createObjectURL(n)),[2];this.addLoadingMessage(),e=new oZ.ImageModel,l.label=1;case 1:return l.trys.push([1,4,,5]),r=e.uploadFile,[4,oN(n)];case 2:return[4,r.apply(e,[l.sent()])];case 3:return l.sent(),this.imageUploaded(e.image_original),[3,5];case 4:return o=l.sent(),oP.error("An image could not be uploaded",o),this.removeLoadingMessage(),this.state.hasImage||this.$el.find("#".concat(this.dropzoneID)).css("display",""),null==(a=(s=this.props).onError)||a.call(s,{message:"This image couldn't be uploaded. Try again."}),[3,5];case 5:return[2]}})},function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function a(e){o8(i,n,o,a,s,"next",e)}function s(e){o8(i,n,o,a,s,"throw",e)}a(void 0)})}).call(e)},thumbnail:function(t){i||"error"===t.status||e.imageUploaded(t.dataURL)}}),this.props.value&&this.dropzone.disable(),this.dropzone.on("processing",function(){e.dropzone.disable()}),this.dropzone.on("error",function(t,n){"Upload canceled."!==n&&e.props.onError({message:n})})}},{key:"addLoadingMessage",value:function(){if(this.$el.length){var e=D()('<div id="dropzone-loader" class="'.concat("------modules-editable-components-components-image-Image__loader",'"></div>'));this.$el.append(e),this.loadingReactRoot=(0,B.createRoot)(this.$el.find("#dropzone-loader").get(0)),this.loadingReactRoot.render((0,C.jsx)(nN.uB,{size:60})),this.$el.find("#".concat(this.dropzoneID)).css("display","none")}}},{key:"removeLoadingMessage",value:function(){var e=this.$el.find("#dropzone-loader");e&&(this.loadingReactRoot&&(this.loadingReactRoot.unmount(),this.loadingReactRoot=null),e.remove())}},{key:"imageUploaded",value:function(e){this.originalImage=e,this.initialCropBoxData=null,this.setImage(e,!0),this.setState({imageChanged:!0}),this.removeLoadingMessage()}},{key:"setImage",value:function(e,t){var n,r,o,i,a,s=this,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,c=this.$el;c.css("background-image","none"),this.imageEl||this.setUpImageElement(),this.imageEl.attr("src",e),c.find("#".concat(this.dropzoneID)).css("display","none"),null==(n=this.cropper)||n.destroy(),this.cropper=new oK({parentEl:c.get(0),originalImageURL:this.originalImage,initialCropBoxData:this.initialCropBoxData,hasCroppedValue:!1,htmlImageElement:null==(o=this.imageEl)||null==(r=o.get)?void 0:r.call(o,0),onUpdateField:this.updateField,onCropperSaving:function(e){e?s.addLoadingMessage():s.removeLoadingMessage()},onSaveFailed:function(){var e,t;return null==(e=(t=s.props).onError)?void 0:e.call(t,{message:"This image change couldn't be saved. Try adjusting it again."})},onCropperReady:function(){t&&s.addFocus(),l&&s.cropper.save(),s.removeLoadingMessage()},saveMaxDimensions:{width:c.data("save-max-width")||null,height:c.data("save-max-height")||null},domDimensions:null==(a=c.get)||null==(i=a.call(c,0))?void 0:i.getBoundingClientRect()}),c.removeClass("sp-companywide-empty")}},{key:"showEmpty",value:function(){var e,t,n,r;this.originalImage=null,null==(e=this.cropper)||e.destroy(),this.cropper=null,null==(t=this.imageEl)||t.removeAttr("src"),null==(n=this.imageEl)||n.css("display","none"),null==(r=this.dropzone)||r.enable(),this.$el.addClass("sp-companywide-empty"),this.$el.find("#".concat(this.dropzoneID)).css("display",""),this.backgroundImage&&this.$el.css("background-image",this.backgroundImage),this.hasCroppedValue=!1,this.setState({hasImage:!1})}},{key:"render",value:function(){var e=this.state.imageChanged&&this.originalImageData.value;return(0,C.jsx)(o2,{hasCroppedValue:this.hasCroppedValue,show:this.state.isFocused&&this.state.hasImage,elementID:this.props.elementID,containerID:this.props.containerID,rootID:this.props.rootID,selector:this.selector,allowRestoreBtn:e,onResize:this.resizeImageElement,onZoomIn:this.handleZoomIn,onZoomOut:this.handleZoomOut,onRotateImageRight:this.handleRotateImageRight,onRotateImageLeft:this.handleRotateImageLeft,onRemoveImage:this.handleRemoveImage,onZoomToCover:this.handleZoomToCover,onZoomToFitWithin:this.handleZoomToFitWithin,onRestorePreviousImage:this.handleRestoreOriginalImage})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(oO);o9(io,"defaultProps",{translations:{invalidFile:"Invalid file type, only images are supported"},onFieldUpdated:function(){},willUpload:!0});var ii=n(75155),ia=n.n(ii);function is(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}n(93242);function il(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ic(e){return(ic=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function iu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(iu=function(){return!!e})()}function ip(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){il(e,t,n[t])})}return e}function id(e,t){return(id=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ih(e){return function(e){if(Array.isArray(e))return is(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return is(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return is(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iy(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var iv=["li","ul","ol","p","div","h1","h2","h3","h4","h5","h6","pre","monospace","blockquote"],ib=["table","thead","tbody","colgroup","col","th","tr","td"],ig=["span","em","strong","b","i","sub","sup"],im=["br","block","span","p","em","i","b","strong","ul","ol","li","h1","h2","h3","h4","h5","h6"];function iw(e,t,n){if(!e)return[];var r="sp-cwe-",o=[],i=!0,a=!1,s=void 0;try{for(var l,c=t[Symbol.iterator]();!(i=(l=c.next()).done);i=!0){var u=l.value;(0!==u.indexOf(r)||-1!==ig.indexOf(e)||0===u.indexOf("".concat(r).concat(e)))&&o.push(u)}}catch(e){a=!0,s=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw s}}var f=(0,eo.flatMap)(n.filter(function(t){return(t.block===e||t.inline===e)&&o.some(function(e){return t.classes.indexOf(e)>-1})}),function(e){return e.classes}),p=o.filter(function(e){return f.indexOf(e)>-1});if(!p.find(function(e){return e.includes(r)})){var d=n.filter(function(t){return t.classes&&(t.block===e||t.inline===e)}).filter(function(e){return p.every(function(t){return e.classes.indexOf(t)>-1})}).filter(function(e){return!p.length||e.classes.length-1===p.length});if(!f.length){var h=d.find(function(e){return 1===(e.classes||[]).length&&(e.classes||[]).find(function(e){return e.indexOf(r)>-1})});if(h)return h.classes.join(" ")}if(d.length)return d[0].classes.join(" ")}return(0,eo.uniq)(p).join(" ")}var iO=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=[e],r=ic(r),il(t=function(e,t){if(t&&("object"===iy(t)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,iu()?Reflect.construct(r,o||[],ic(this).constructor):r.apply(this,o)),"updateValue",function(e){t.pushedValues.push(e),t.pushedValues.length>20&&t.pushedValues.shift(),t.props.onFieldUpdated({id:t.props.elementID,accepted:t.props.accepted,saved:t.props.saved,value:e,mime:"text/plain"})}),t.updateValue=(0,eo.debounce)(t.updateValue,100),t.editor=null,t.editorInitialized=!1,t.pushedValues=[],t}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&id(n,e),t=[{key:"componentDidUpdate",value:function(e){this.props.error!==e.error&&o4(this.$el,this.props.error),!this.editorInitialized||this.props.value===e.value||this.editor.hasFocus()||this.isOwnEdit(this.props.value)||(this.editor.setContent(this.props.value||""),this.checkIsEmpty(this.props.value))}},{key:"isOwnEdit",value:function(e){var t=this.pushedValues.indexOf(e);return -1!==t&&(this.pushedValues=this.pushedValues.slice(t+1),!0)}},{key:"updateValueFromHTML",value:function(e){if(this.editorInitialized){var t,n,r="div"===this.rootBlock?((t=document.createElement("template")).innerHTML=e,(n=ih(t.content.childNodes).filter(function(e){return e.nodeType!==Node.TEXT_NODE||e.textContent.trim()})).length>0&&n.every(function(e){return"DIV"===e.nodeName&&0===e.attributes.length})?n.map(function(e){return e.innerHTML}).join("<br>"):e):e;this.updateValue(r),this.checkIsEmpty(r)}}},{key:"checkIsEmpty",value:function(e){var t="string"==typeof e&&e.trim().length>0;this.$el.toggleClass("sp-companywide-empty",!t)}},{key:"validateToolbar",value:function(e){if(!this.canSupportBlocks&&e){var t=(0,eo.keys)(this.blockToolSets),n=e.split(" ");if((0,eo.intersection)(t,n).length>0){var r="Toolbar '".concat(e,"' not valid for tag '").concat(this.$el.prop("tagName"),"'. only DIV tags support block-level formatting. (").concat(this.elementSelector,")");if(o6())return oP.error(r),!1;oP.warn(r)}}return!0}},{key:"getBridgeOptions",value:function(){var e={};if(!window.Bridge)return e;try{var t=window.Bridge.Companywide.getTextEditorOptions(),n=t.formats,r=t.colors,o=t.spell_check;if(n&&((0,eo.compact)((0,eo.map)(n,"classes")).length>0||(0,eo.compact)((0,eo.map)(n,"inline")).length>0)){var i=[],a=[],s=[],l=!1;n.forEach(function(e){"table"===e.block?a.push((0,eo.pick)(e,["classes","title"])):"tr"===e.block?s.push((0,eo.pick)(e,["classes","title"])):e.block&&iv.indexOf(e.block)>-1?(i.push((0,eo.pick)(e,["block","classes","title"])),"p"===e.block&&(l=!0)):e.inline&&ig.indexOf(e.inline)>-1&&i.push((0,eo.pick)(e,["inline","classes","title"]))}),l||i.unshift({title:"Normal",block:"p"}),a.length>0&&a.unshift({title:"None",classes:""}),s.length>0&&s.unshift({title:"None",classes:""});var c=!0,u=!1,f=void 0;try{for(var p,d=i[Symbol.iterator]();!(c=(p=d.next()).done);c=!0){var h=p.value;h.classes||(h.classes="");var y="".concat(h.block||h.inline,"-").concat((0,eo.kebabCase)(h.title));h.classes+=" sp-cwe-".concat(y," ").concat(h.classes),h.classes=(0,eo.uniq)(h.classes.split(" ")).join(" ").trim()}}catch(e){u=!0,f=e}finally{try{c||null==d.return||d.return()}finally{if(u)throw f}}e.style_formats=i,e.table_class_list=a.map(function(e){return{title:e.title,value:e.classes}}),e.table_row_class_list=s.map(function(e){return{title:e.title,value:e.classes}})}else if(n){var v=[];n.forEach(function(e){e.block&&iv.indexOf(e.block)>-1&&v.push("".concat(e.title,"=").concat(e.block))}),e.block_formats=v.join("; ")}r&&(e.color_map=[],r.forEach(function(t){e.color_map.push(t.color),e.color_map.push(t.title)})),e.browser_spellcheck=o||!1}catch(e){oP.warn("Editable Text: Bridge needs to be updated to support customisable colors and formats")}return e}},{key:"getStartingConfig",value:function(e){var t,n,r,o=this,i={selector:this.elementSelector,plugins:["link","lists"],branding:!1,content_css:!1,skin:!1,preview_styles:!1,style_formats_autohide:!0,body_class:"tinymce-active",paste_remove_styles:!0,paste_remove_styles_if_webkit:!0,paste_strip_class_attributes:!0,paste_webkit_styles:"none",paste_data_images:!1,menubar:!1,inline:!0,contextmenu:!1,browser_spellcheck:!1,custom_colors:!1,remove_linebreaks:!0,valid_styles:{"*":"color, text-decoration, font-style, text-align"},toolbar:["undo redo"],valid_elements:["p","span[style]","p[class]"],target_list:!1,default_link_target:"_blank",link_target_list:!1,link_default_target:"_blank",link_assume_external_targets:"https",link_title:!1,table_sizing_mode:"fixed",object_resizing:!1,table_use_colgroups:!1,table_appearance_options:!1,table_advtab:!1,table_cell_advtab:!1,table_row_advtab:!1,setup:function(e){o.editor=e,e.on("init",function(){var t,n=!0,r=!1,i=void 0;try{for(var a,s=e.contentAreaContainer.querySelectorAll("*")[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var l,c=a.value;if(!(c.className.indexOf("sp-cwe-")>-1)){var u=null==(l=c.tagName)?void 0:l.toLowerCase(),f=iw(u,c.classList,e.options.get("style_formats"));f&&(c.className=f)}}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}var p=o.props.value;null!==p&&(void 0===p?"undefined":iy(p))==="object"&&(p=null!=(t=JSON.stringify(p))?t:""),p&&e.setContent(p),o.editorInitialized=!0,o.checkIsEmpty(e.getContent()),e.on("keyup change undo redo",function(){o.updateValueFromHTML(e.getContent())})}),e.on("ExecCommand",function(e){var t=this;if("mceToggleFormat"===e.command){var n=this.selection.getSelectedBlocks(),r=!0,o=!1,i=void 0;try{for(var a,s=n[Symbol.iterator]();!(r=(a=s.next()).done);r=!0)!function(){var e=a.value,n=e.classList,r=e.tagName.toLowerCase();setTimeout(function(){e.className=iw(r,n,null==t?void 0:t.options.get("style_formats"))},0)}()}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}})}},a=null==(r=D()(this.elementSelector).prop("tagName"))?void 0:r.toLowerCase(),s=["ul","ol","li","dl","dt","dd"].indexOf(a)>-1,l=(t=ip({},i),n=n={valid_elements:["p","span[style]","p[class]","br"],remove_linebreaks:!1,convert_newlines_to_brs:!0,force_br_newlines:!0,newline_behavior:"linebreak",forced_root_block:"div"},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t);return s&&(l.forced_root_block=a),this.canSupportBlocks&&e?i:l}},{key:"getTinymceConfig",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=this.inlineToolSets,r=ip({},this.inlineToolSets,this.blockToolSets),o=this.canSupportBlocks?r:n,i=["undo redo"],a=!1,s=!1,l=im,c=iv;t&&t.length>0&&t.toLowerCase().split(" ").forEach(function(t){var n=o[t];if("format"===t){var r=e.canSupportBlocks?"block":"inline";n=e.formatToolSets[r]}"table"===t&&(s=!0),n&&(n.needBlockSupport&&(a=!0),i.push(n.tools))});var u=this.getStartingConfig(a);if(s){u.plugins.push("table"),l=ih(l).concat(ih(ib)),c=ih(c).concat(ih(ib));for(var f=0,p=["table_advtab","table_cell_advtab","table_row_advtab"];f<p.length;f++)u[p[f]]=!1}u.paste_preprocess=function(e,t){t.content=ia()(t.content,l)},u.object_resizing=!1,u.toolbar=i.join(" | "),u.valid_elements=(0,eo.uniq)(c.concat(ig).concat(["br"])).map(function(e){var t="".concat(e,"[style|class]");return"p"===e?"#".concat(t):t}).concat("a[rel|href|target|title|style]").join(",");var d=this.getBridgeOptions(),h=d.color_map,y=d.style_formats,v=d.block_formats,b=d.table_class_list,g=d.table_row_class_list,m=d.browser_spellcheck;return u.color_map=h,u.style_formats=y||[],u.block_formats=v||[],u.table_class_list=b||[],u.table_row_class_list=g||[],u.browser_spellcheck=m||!1,y&&(u.toolbar=u.toolbar.replace("blocks","styles")),u}},{key:"onSwipe",value:function(e){e.stopPropagation(),e.preventDefault()}},{key:"onContextMenu",value:function(e){e.stopPropagation()}},{key:"onKeyboard",value:function(e){if(e.stopPropagation(),this.shouldWarnOnOverflow){var t=this.$el[0].scrollHeight>this.$el[0].clientHeight;this.$el[t?"addClass":"removeClass"]("overflowing"),t?this.$el.parent().find(".sp-dynamic-text-field-warning").length||this.$el.parent().append('<div class="sp-dynamic-text-field-warning"><span class="sp-material-icon">warning</span>'.concat(this.props.warningMessage||"There’s not enough room for what you’ve typed","</div>")):this.$el.parent().find(".sp-dynamic-text-field-warning").remove()}}},{key:"componentDidMount",value:function(){var e=this;if(this.mounted=!0,this.$el){var t=this.$el.data("toolbar");if(this.validateToolbar(t)){var n=this.getTinymceConfig(t);this.rootBlock=n.forced_root_block,this.$el.addClass("sp-dynamic-text-field"),this.$el.addClass("interactive"),this.shouldWarnOnOverflow&&this.$el.addClass("no-overflow"),this.$el.on("swiperight swipeleft swipeup swipedown",this.onSwipe),this.$el.on("keydown keypress keyup",this.onKeyboard),this.$el.on("blur",this.deselect),this.$el.on("save",function(){e.updateValueFromHTML(e.editor.getContent())}),this.getTinymceConfig().browser_spellcheck&&(this.$el.attr("spellcheck",!0),this.$el.on("contextmenu",this.onContextMenu)),this.shouldWarnOnOverflow&&this.$el.wrap('<div class="sp-dynamic-text-field-wrapper no-overflow"></div>'),e8().init(n)}}}},{key:"deselect",value:function(){var e=null;"getSelection"in window?e=window.getSelection():"selection"in document&&(e=document.selection),"removeAllRanges"in e?e.removeAllRanges():"empty"in e&&e.empty(),this.shouldScrollUpOnBlur&&this.$el.scrollTop(0)}},{key:"componentWillUnmount",value:function(){var e=this;this.editorInitialized=!1,this.editor&&(this.editor.off("blur keyup NodeChange TextColorChange",this.updateValueFromHTML),this.$el.off("swiperight swipeleft swipeup swipedown",this.onSwipe),this.getTinymceConfig().browser_spellcheck&&this.$el.off("contextmenu",this.onContextMenu),this.$el.off("keydown keypress keyup",this.onKeyboard),this.$el.off("save"),this.$el.parent().find(".sp-dynamic-text-field-warning").remove(),this.shouldWarnOnOverflow&&this.$el.unwrap(),e8().EditorManager.remove(this.editor),e8().remove(this.editor),setTimeout(function(){e.editor.destroy()},0))}},{key:"$el",get:function(){var e=oJ(this.props.containerID),t=D()(e).find(this.elementSelector);return t.length>1?D()(t.get(0)):t}},{key:"canSupportBlocks",get:function(){var e;return(null==(e=this.$el.prop("tagName"))?void 0:e.toLowerCase())==="div"}},{key:"shouldWarnOnOverflow",get:function(){return void 0!==this.$el.attr("data-warn-on-overflow")}},{key:"shouldScrollUpOnBlur",get:function(){return void 0!==this.$el.attr("data-scrollup-on-blur")}},{key:"elementSelector",get:function(){return this.props.selector||'[data-companywide-editable="'.concat(this.props.elementID,'"]:not([data-readonly])')}},{key:"inlineToolSets",get:function(){return{style:{tools:"bold italic",elements:["strong","em"],needBlockSupport:!1},color:{tools:"forecolor",elements:[],needBlockSupport:!1},removeformat:{tools:"removeformat",elements:[],needBlockSupport:!1},superscript:{tools:"superscript subscript",elements:["sup","sub"],needBlockSupport:!1},link:{tools:"link unlink",elements:[],needBlockSupport:!1},align:{tools:"alignleft aligncenter alignright alignjustify",elements:[],needBlockSupport:!1}}}},{key:"blockToolSets",get:function(){return{list:{tools:"numlist bullist",elements:["ul","li","ol"],needBlockSupport:!0},table:{tools:"table",elements:ib,needBlockSupport:!0}}}},{key:"formatToolSets",get:function(){return{block:{tools:"blocks",elements:["h1","h2","h3","h4","h5","h6","pre","monospace","blockquote"],needBlockSupport:!0},inline:{tools:"styles",elements:["span","em","b","strong","i"],needBlockSupport:!1}}}},{key:"render",value:function(){return null}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(oO);function ik(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i_(e){return(i_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ij(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ij=function(){return!!e})()}function iS(e,t){return(iS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var iP=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){if(!(this instanceof n))throw TypeError("Cannot call a class as a function");t=n,r=[e],t=i_(t),ik(o=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,ij()?Reflect.construct(t,r||[],i_(this).constructor):t.apply(this,r)),"updateValue",function(e){o.props.onFieldUpdated({id:o.props.elementID,accepted:o.props.accepted,saved:o.props.saved,value:e,mime:"video/mp4"}),o.setState({showVideo:!0,value:e})}),ik(o,"handleClearClick",function(){o.updateValue(""),o.setState({showVideo:!1})}),ik(o,"handleChange",function(e){o.setState({value:e})}),ik(o,"handleUpdateClicked",function(){var e=n.getVideoID(o.state.value);o.updateValue(e)});var t,r,o,i=oJ(o.props.containerID);return o.$container=D()(i).find(o.elementSelector),o.host=document.createElement("div"),o.$container.empty(),o.$container.append(o.host),o.playerFrame=x.createRef(),o.state={value:e.value||"",showVideo:""!==ei().trim(e.value)},o}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&iS(n,e),t=[{key:"elementSelector",get:function(){return this.props.selector||'[data-companywide-youtube-player="'.concat(this.props.elementID,'"]:not([data-readonly])')}},{key:"checkIsEmpty",value:function(){this.$container&&this.$container.length>0&&this.$container.toggleClass("sp-companywide-empty",!this.state.showVideo)}},{key:"componentDidMount",value:function(){this.state.value&&this.addVideo(),this.checkIsEmpty()}},{key:"componentDidUpdate",value:function(e,t){this.props.error!==e.error&&o4(this.$container,this.props.error),this.props.value!==e.value&&this.props.value!==this.state.value&&this.setState({value:this.props.value,showVideo:""!==ei().trim(this.props.value)}),this.state.showVideo&&this.state.value!==t.value?(this.removeVideo(),this.addVideo()):this.player||!this.state.showVideo||t.showVideo?this.player&&!this.state.showVideo&&t.showVideo&&this.removeVideo():this.addVideo(),this.checkIsEmpty()}},{key:"componentWillUnmount",value:function(){this.removeVideo()}},{key:"addVideo",value:function(){var e=this,t=this.$container.height(),n=this.$container.width(),r=function(){var r,o=document.createElement("div");null==(r=e.playerFrame.current)||r.replaceChildren(o),e.player=new window.YT.Player(o,{videoId:e.state.value,width:n,height:t,playerVars:{autohide:1,modestbranding:1,rel:0,fs:0,wmode:"opaque"}})};window.YT?window.YT.ready(r):D().getScript("https://www.youtube.com/iframe_api").then(function(){window.YT.ready(r)})}},{key:"removeVideo",value:function(){this.player&&this.player.destroy(),this.player=null}},{key:"render",value:function(){return this.$container&&this.$container.length&&this.$container[0]?ew.createPortal((0,C.jsxs)(C.Fragment,{children:[this.state.showVideo?(0,C.jsx)("div",{className:"------modules-editable-components-components-youtubePlayer-YoutubePlayer__close","data-testid":"youtube-player",children:(0,C.jsx)(F.IconButton,{iconName:"close",onClick:this.handleClearClick,title:"Remove"})}):(0,C.jsxs)("div",{className:"------modules-editable-components-components-youtubePlayer-YoutubePlayer__inputContainer","data-testid":"youtube-player",children:[(0,C.jsx)("div",{className:"------modules-editable-components-components-youtubePlayer-YoutubePlayer__label",children:"Youtube video URL:"}),(0,C.jsx)("div",{className:"------modules-editable-components-components-youtubePlayer-YoutubePlayer__input",children:(0,C.jsx)(eH.A,{value:this.state.value,onChange:this.handleChange})}),(0,C.jsx)(F.IconButton,{className:"------modules-editable-components-components-youtubePlayer-YoutubePlayer__addButton",iconName:"arrow_forward",onClick:this.handleUpdateClicked})]}),(0,C.jsx)("div",{ref:this.playerFrame})]}),this.host):null}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(oO);function iC(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}ik(iP,"getVideoID",function(e){if(-1===e.indexOf("youtube"))return e.substring(e.length-11);var t=e.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/);return!!t&&11===t[7].length&&t[7]});function ix(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iE(e){return(iE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function iT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(iT=function(){return!!e})()}function iI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){ix(e,t,n[t])})}return e}function iR(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function iD(e,t){return(iD=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function iN(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var iA=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=[e],r=iE(r),(t=function(e,t){if(t&&("object"===iN(t)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,iT()?Reflect.construct(r,o||[],iE(this).constructor):r.apply(this,o))).ref=x.createRef(),t.latestWriteByField={},t.state={forceRerender:!1,errors:{}},t.forceRerender=ei().debounce(t.forceRerender,100),t}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&iD(n,e),t=[{key:"componentDidMount",value:function(){var e=this;this.observer=new MutationObserver(function(t){var n=!0,r=!1,o=void 0;try{for(var i,a=t[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var s=function(){var t,n,r,o,a,s=i.value;return window.nw||(null==(t=s.addedNodes[0])?void 0:t.nodeName)!=="GRAMMARLY-EXTENSION"?(null==(a=s.addedNodes)||null==(o=a[0])||null==(r=o.className)||null==(n=r.includes)?void 0:n.call(r,"sp-dynamic-text-field-warning"))?{v:void 0}:e.props.dataKeys.flatMap(function(e){return Array.from(s.target.querySelectorAll(e))}).length?(e.forceRerender(),"break"):void 0:"continue"}();if("object"===iN(s))return s.v;if("break"===s)break}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}),this.observe()}},{key:"componentDidUpdate",value:function(e,t){var n=this;this.state.forceRerender&&setTimeout(function(){n.setState({forceRerender:!1})},0),t.forceRerender&&!this.state.forceRerender&&this.observe()}},{key:"componentWillUnmount",value:function(){this.observer.disconnect()}},{key:"forceRerender",value:function(){this.observer.disconnect(),this.setState({forceRerender:!0})}},{key:"observe",value:function(){var e=oJ(this.props.containerID),t=document.querySelector(e);if(t)try{this.observer.observe(t,{subtree:!0,childList:!0})}catch(e){oP.error("Failed to add observer to node",t)}}},{key:"getFieldType",value:function(e){return"text/plain"===e||"application/json"===e?"text":"video/mp4"===e?"youtubePlayer":null===e||-1!==e.indexOf("image")?"image":null}},{key:"fieldMap",get:function(){return{text:{field:iO,opts:{}},image:{field:io,opts:{onError:this.props.onError,willUpload:this.props.uploadImages}},youtubePlayer:{field:iP,opts:{fields:ei().cloneDeep(this.fields)}}}}},{key:"fields",get:function(){return this.props.getFields()}},{key:"handleFieldUpdated",value:function(e,t){var n;return(n=function(){var n,r,o,i,a,s,l,c,u;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(f){switch(f.label){case 0:if(!(i=(null!=(n=null==(o=this.props.interfaceFields)?void 0:o.read(e.rendered))?n:{}).field))return this.props.onFieldUpdated(iI({},e,t)),[2];return a={},"image"===this.getFieldType(e.mime)&&(a.editorState={originalImage:null==(s=t.saved)?void 0:s.originalImage,cropperData:null==(l=t.saved)?void 0:l.cropperData}),e.isPersistent&&(a.persistent=e.isPersistent),c=(null!=(r=this.latestWriteByField[e.key])?r:0)+1,this.latestWriteByField[e.key]=c,[4,this.props.interfaceFields.write(i,t.value,a)];case 1:if(u=f.sent().errors,this.latestWriteByField[e.key]!==c)return[2];return this.setState(function(t){var n;return{errors:iR(iI({},t.errors),ix({},e.key,0===(n=Object.keys(null!=u?u:{}).map(function(e){return o5[e]}).filter(Boolean)).length?null:n.join(" ")))}}),[2]}})},function(){var e=this,t=arguments;return new Promise(function(r,o){var i=n.apply(e,t);function a(e){iC(i,r,o,a,s,"next",e)}function s(e){iC(i,r,o,a,s,"throw",e)}a(void 0)})}).call(this)}},{key:"render",value:function(){var e=this,t=this.props.translations,n=this.fields;return this.state.forceRerender||!n.length?null:(0,C.jsx)("div",{className:"dynamic-content-container",ref:this.ref,children:n.map(function(n,r){var o,i=e.getFieldType(n.mime),a=e.fieldMap[i];if(!a)return null;var s=a.field;return(0,x.createElement)(s,iI(iR(iI({},n),{index:r,containerID:e.props.containerID,elementID:n.key,error:null!=(o=e.state.errors[n.key])?o:null,key:n.key,onFieldUpdated:function(t){return e.handleFieldUpdated(n,t)},translations:t[i]}),a.opts))})})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);function iB(e,t,n){if(t.startsWith("companywide-"))return{attribute:"data-".concat(t),value:n};var r="data-companywide-".concat(t),o=e.attr(r);return o?{attribute:r,value:o}:{attribute:"data-".concat(t),value:n}}function iF(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function iM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function iL(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}ix(iA,"propTypes",{uploadImages:L().bool,containerID:L().string,interfaceFields:L().object,onFieldUpdated:L().func,onError:L().func,translations:L().object,dataKeys:L().array,getFields:L().func}),ix(iA,"defaultProps",{uploadImages:!0,containerID:"presenter",onFieldUpdated:function(){},onError:function(){},translations:{},dataKeys:[],getFields:function(){return oP.error("No getFields function was provided to Container. Editable Components will not work"),[]}});var iU={text:"companywide-editable",image:"companywide-dynamic-image",youtubePlayer:"companywide-youtube-player"},iV=Object.values(iU).map(function(e){return"[data-".concat(e,"]")}),iz={value:null,accepted:{value:null,mime:null},saved:{value:null,mime:null},changed:!1,mime:null},i$={text:function(e,t){var n=D()(t).find(".sp-companywide-editable").html()||D()(t).html();n=n.trim();var r="text/plain";return iL(iM({},iz),{value:n,accepted:{value:n,mime:r},saved:{value:n,mime:r},key:e,mime:r})},image:function(e){return iL(iM({},iz),{key:e})},youtubePlayer:function(e){return iL(iM({},iz),{key:e,mime:"video/mp4"})}};function iW(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iK(e){return(iK=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function iq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(iq=function(){return!!e})()}function iH(e,t){return(iH=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var iZ=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t,r;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=iK(t),iW(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,iq()?Reflect.construct(t,r||[],iK(this).constructor):t.apply(this,r)),"getFields",function(){var t=e.props,n=t.containerID,r=t.cmsVals,o=oJ(n);return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#presenter .presoSlide.current",n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).interfaceFields,r=D()(t);return Object.entries(iU).flatMap(function(t){var o=function(e){if(Array.isArray(e))return e}(t)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return iF(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return iF(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=o[0],a=o[1];return r.find("[data-".concat(a,"]:not([data-readonly])")).toArray().map(function(t){var r=D()(t).attr("data-".concat(a));if(!r){var o=t.id||"unknown";return oP.warn("CWE field with ID ".concat(o," has no data value for attribute data-").concat(a)),null}var s=iB(D()(t),a,r),l=function(e){var t,n=e.interfaceFields,r=e.rendered,o=e.contentKey,i=e.deckValues,a=null!=(t=null==n?void 0:n.read(r))?t:{},s=a.field,l=a.value,c=a.editorState;if(s)return iM({key:o},null!==l&&{value:l},c);var u=i.find(function(e){return e&&e.key===o});return u&&iM({},u,u.extraData)}({interfaceFields:n,rendered:s,contentKey:r,deckValues:e});if(l){var c=i$[i];if(c)return iL(iM({},c(r,t),l),{rendered:s,isCWE:!0})}else oP.warn("data-".concat(a," CWE field with key ").concat(r," is not included in the set of valid keys:\n\n").concat(e.map(function(e){return e.key}).join(", ")));return null})}).filter(function(e){return null!==e})}(r,D()(o).get(0),{interfaceFields:e.props.interfaceFields})}),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&iH(n,e),t=[{key:"render",value:function(){var e=this.props,t={uploadImages:e.uploadImages,containerID:e.containerID,onFieldUpdated:e.onFieldUpdated,onError:e.onError,translations:e.translations,cmsVals:e.cmsVals,getFields:this.getFields,interfaceFields:this.props.interfaceFields,dataKeys:iV};return(0,C.jsx)(iA,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){iW(e,t,n[t])})}return e}({},t))}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);iW(iZ,"propTypes",{uploadImages:L().bool,containerID:L().string,interfaceFields:L().object,onFieldUpdated:L().func,onError:L().func,translations:L().object,cmsVals:L().array.isRequired}),iW(iZ,"defaultProps",{uploadImages:!1,containerID:"presenter",onFieldUpdated:function(){},onError:function(){},translations:{}});var iJ=["[data-editable]","[data-dynamic-image]"],iG=function(e){var t=window.Bridge.Context.getPersistent("dynamicImages",{}),n=window.Bridge.Context.getNonPersistent("dynamicImages",{}),r=e.replace(/-(autoadjunct|template-slide)-\d+$/,""),o=ei().extend({},t,n),i=o[r]||o[e];if(i&&"string"==typeof i.image){var a=i.image,s=i.mime||null;if(null===s){var l=a.split(".").pop();s="image/".concat(l)}return{value:a,mime:s,cropperData:i.cropperData||null,originalImage:i.originalImage||null}}return{value:"",mime:"image"}},iY=function(e){var t=window.Bridge.Context.getDict()._cmsVals;if(t){var n=t.filter(function(t){return t.key===e})[0];if(n)return{value:n.value,mime:n.mime}}return{value:"",mime:"image"}};function iX(e,t,n){var r=D()(e).attr(n);r&&"true"!==r||(r=D()(e).attr("id"),D()(e).attr(n,r));var o=D()(e).data("editable-parent");return o||(o=t.find("article").attr("id"),D()(e).attr("data-editable-parent",o)),{elementID:r,editableParent:o,key:"".concat(o,"--").concat(r)}}function iQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i0(e){var t,n,r,o=e.key,i=e.mime,a=e.value,s=e.isPersistent;if(!(null==i?void 0:i.includes("image")))return void window.Bridge.Context.set("_editableContent.".concat(o),{elementID:o,mime:i,value:a},s);var l={image:a,mime:i,originalImage:null==e||null==(n=e.saved)?void 0:n.originalImage,cropperData:null==e||null==(r=e.saved)?void 0:r.cropperData},c=(function(e){if(Array.isArray(e))return e}(t=o.split("--"))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return iQ(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return iQ(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1];c&&window.Bridge.Context.set("dynamicImages.".concat(c),l,s),window.Bridge.Context.set("dynamicImages.".concat(o),l,s)}function i1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i2(e){return(i2=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(i3=function(){return!!e})()}function i5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){i1(e,t,n[t])})}return e}function i4(e,t){return(i4=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var i6=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t,r;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=i2(t),i1(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,i3()?Reflect.construct(t,r||[],i2(this).constructor):t.apply(this,r)),"handleFieldUpdated",function(t,n){var r=i5({},t,n);e.props.onFieldUpdated(r),window.Bridge&&!e.props.preventAutoSave&&i0(r)}),i1(e,"getFields",function(){var t=e.props,n=t.allowImages,r=t.containerID,o=t.interfaceFields,i=oJ(r),a=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).interfaceFields,n=e.find("[data-editable]"),r=[];if(!window.Bridge)return[];var o=window.Bridge.Navigation.getCurrentNav();if(!o)return[];var i={deckID:o.deck,sectionID:o.section,slideID:o.slide};ei().each(n,function(t){var n=iX(t,e,"data-editable"),o=n.key,a=n.elementID,s=n.editableParent,l="text/plain",c="".concat(i.deckID,"_").concat(i.sectionID,"_").concat(i.slideID,"_").concat(a),u=window.Bridge.Context.get(".editedContent.".concat(c),null),f=t.innerHTML;u&&(f=u.content);var p=!!D()(t).data("persistent");r.push({value:f,accepted:{value:f,mime:l},saved:{value:f,mime:l},changed:!1,key:o,rendered:iB(D()(t),"editable",a),mime:l,selector:'[data-editable-parent="'.concat(s,'"][data-editable="').concat(a,'"]'),isPersistent:p})});var a=e.find("[data-dynamic-image]");return ei().each(a,function(n){var o,i=iX(n,e,"data-dynamic-image"),a=i.key,s=i.elementID,l=i.editableParent,c=!!D()(n).data("persistent"),u=iB(D()(n),"dynamic-image",s),f=function(e){var t=e.interfaceFields,n=e.rendered,r=e.keys,o=null!=(f=null==t?void 0:t.read(n))?f:{},i=o.field,a=o.value,s=o.editorState;if(i)return{value:null!=a?a:"",mime:"image",originalImage:null!=(p=null==s?void 0:s.originalImage)?p:null,cropperData:null!=(d=null==s?void 0:s.cropperData)?d:null};var l=!0,c=!1,u=void 0;try{for(var f,p,d,h,y=r.filter(Boolean)[Symbol.iterator]();!(l=(h=y.next()).done);l=!0){var v=h.value,b=iG(v);if(b.value)return b}}catch(e){c=!0,u=e}finally{try{l||null==y.return||y.return()}finally{if(c)throw u}}return{value:"",mime:"image"}}({interfaceFields:t,rendered:u,keys:[a,n.id]}),p=f.value,d=f.mime,h=D()(n).attr("data-companywide-dynamic-image");!p&&h&&(p=(o=iY(h)).value,d=o.mime),r.push({value:p,mime:d,accepted:{value:p,mime:d},saved:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},f),changed:!1,key:a,rendered:u,selector:'[data-editable-parent="'.concat(l,'"][data-dynamic-image="').concat(s,'"]'),isPersistent:c})}),r}(D()(i),{interfaceFields:o});return n?a:a.filter(function(e){return!e.mime.includes("image")})}),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&i4(n,e),t=[{key:"render",value:function(){var e=this.props,t=e.uploadImages,n=e.containerID,r=e.onError,o=e.translations,i=e.preventAutoSave,a={onFieldUpdated:this.handleFieldUpdated,uploadImages:t,containerID:n,onError:r,translations:o,preventAutoSave:i,getFields:this.getFields,interfaceFields:this.props.interfaceFields,dataKeys:iJ};return(0,C.jsx)(iA,i5({},a))}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);i1(i6,"propTypes",{uploadImages:L().bool,containerID:L().string,interfaceFields:L().object,onFieldUpdated:L().func,onError:L().func,translations:L().object,preventAutoSave:L().bool,allowImages:L().bool}),i1(i6,"defaultProps",{uploadImages:!1,containerID:"presenter",onFieldUpdated:function(){},onError:function(){},translations:{},preventAutoSave:!1,allowImages:!0});var i8=[{type:"text",selector:"companywide-editable",prepVersion:"editable",mimeType:"text/plain",isCWE:!0},{type:"image",selector:"companywide-dynamic-image",prepVersion:"dynamic-image",mimeType:"image",isCWE:!0},{type:"youtubePlayer",selector:"companywide-youtube-player",prepVersion:null,mimeType:"video/mp4",isCWE:!0},{type:"image",selector:"dynamic-image",prepVersion:null,mimeType:"image",isCWE:!1},{type:"text",selector:"editable",prepVersion:null,mimeType:"text/plain",isCWE:!1}];function i9(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i7(e){return(i7=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ae(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ae=function(){return!!e})()}function at(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){i9(e,t,n[t])})}return e}function an(e,t){return(an=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ar=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t,r;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=i7(t),i9(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,ae()?Reflect.construct(t,r||[],i7(this).constructor):t.apply(this,r)),"handleFieldUpdated",function(t,n){var r=at({},t,n);e.props.onFieldUpdated(r),window.Bridge&&!e.props.preventAutoSave&&(t.isCWE?e.saveCWEValue(r):i0(r))}),i9(e,"getFields",function(){var t=oJ(e.props.containerID);return function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).interfaceFields,n=D()(e),r=n.find("article").attr("id");return i8.flatMap(function(e){var o=e.type,i=e.prepVersion,a=e.selector,s=e.mimeType,l=e.isCWE;return n.find("[data-".concat(a,"]:not([data-readonly])")).toArray().filter(function(e){return!l||!i||!D()(e).attr("data-".concat(i))}).map(function(e){var n,i,c,u=D()(e).attr("data-".concat(a)),f="".concat(r,"--").concat(u.replace(/-template-\d+$/,"")),p="[data-".concat(a,'="').concat(u,'"]:not([data-readonly])'),d=iB(D()(e),a,u),h=function(e){var t,n,r,o=e.interfaceFields,i=e.rendered,a=e.uniqueKey,s=e.isCWE,l=e.type,c=null!=(t=null==o?void 0:o.read(i))?t:{},u=c.field,f=c.value,p=c.editorState;if(u&&"image"===l)return{value:f,originalImage:null!=(n=null==p?void 0:p.originalImage)?n:null,cropperData:null!=(r=null==p?void 0:p.cropperData)?r:null};if(u)return{value:f};if(s)return window.Bridge.Context.get("_userTemplateCMSvals.".concat(a));if("image"===l){var d=window.Bridge.Context.get("dynamicImages.".concat(a));return d?{value:d.image}:null}return window.Bridge.Context.get("_editableContent.".concat(a))}({interfaceFields:t,rendered:d,uniqueKey:f,isCWE:l,type:o});return n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},h),i=i={key:f,rendered:d,mime:s,isCWE:l,selector:p,value:null!=(c=null==h?void 0:h.value)?c:""},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}),n})})}(D()(t).get(0),{interfaceFields:e.props.interfaceFields})}),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&an(n,e),t=[{key:"saveCWEValue",value:function(e){var t,n,r={key:e.key,mime:e.mime,value:e.value};e.mime.includes("image")&&(r.originalImage=null==e||null==(t=e.saved)?void 0:t.originalImage,r.cropperData=null==e||null==(n=e.saved)?void 0:n.cropperData),window.Bridge.Context.set("_userTemplateCMSvals.".concat(e.key),r,e.isPersistent)}},{key:"render",value:function(){var e=this.props,t=e.uploadImages,n=e.containerID,r=e.onError,o=e.translations,i=e.preventAutoSave,a=i8.map(function(e){var t=e.selector;return"[data-".concat(t,"]")}),s={onFieldUpdated:this.handleFieldUpdated,uploadImages:t,containerID:n,onError:r,translations:o,preventAutoSave:i,getFields:this.getFields,interfaceFields:this.props.interfaceFields,dataKeys:a};return(0,C.jsx)(iA,at({},s))}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(x.Component);function ao(e){var t,n,r,o,i,a=e.isPresomanager,s=e.isEditingTemplate,l=e.cmsVals,c=void 0===l?[]:l,u=e.slidePath,f=e.interfaceFields,p=e.onCMSValChange,d=(n=(t={isPresomanager:a,isEditingTemplate:s}).isPresomanager,r=t.isEditingTemplate,n?iZ:r?ar:i6),h=(null!=(o=null==(i=window.Bridge)?void 0:i.Companywide.getSlideKeys())?o:[]).map(function(e){return c.find(function(t){return t.key===e})||{key:e}}),y=(0,x.useCallback)(function(e){var t=e.key,n=e.value,r=e.mime;null==p||p({key:t,value:n,slidePath:u,mime:r})},[p,u]);return(0,C.jsx)(d,{containerID:"presenter",cmsVals:h,interfaceFields:f,onFieldUpdated:a?y:void 0})}i9(ar,"propTypes",{uploadImages:L().bool,containerID:L().string,interfaceFields:L().object,onFieldUpdated:L().func,onError:L().func,translations:L().object,preventAutoSave:L().bool,cmsVals:L().array.isRequired}),i9(ar,"defaultProps",{uploadImages:!1,containerID:"presenter",onFieldUpdated:function(){},onError:function(){},translations:{},preventAutoSave:!1});var ai=n(23121);function aa(){return(0,C.jsx)("div",{className:"sp-presenter--pagination sp-presenter-navigation-controls",children:(0,C.jsxs)("nav",{className:"sp-pagination-wrapper",children:[(0,C.jsx)("div",{"aria-label":"Previous slide",className:"sp-presenter-navigation-previous previous","data-testid":"prev-slide",children:(0,C.jsx)("span",{})}),(0,C.jsx)("div",{"aria-label":"Next slide",className:"sp-presenter-navigation-next next","data-testid":"next-slide",children:(0,C.jsx)("span",{})})]})})}var as=n(17005),al=n.n(as),ac=n(44178),au=n.n(ac),af=n(35725),ap=(0,e7.tG)("presenter"),ad=(0,e7.tG)("feeds"),ah=function(){var e;function t(e){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this._data=ei().cloneDeep(e),this.useDefaults=!0}return e=[{key:"_matchJSON",value:function(e,t){var n;void 0===t&&(ad.error("No fallback defined: try match(selector, fallback)"),t=null);try{n=au().match(e,this._data)}catch(e){return ad.error(e),t}return this.useDefaults?n.length>=1&&null!==n[0]?n[0]:(ad.warn("".concat(e," returned (fallback) data: "),t),t):n[0]||null}},{key:"_matchHTML",value:function(e,t){if(!this._data)return ad.warn("No HTML feed present. Returned fallback value for selector ",e),af.Hh(t)(e);try{n=af.Hh(this._data)}catch(n){return ad.error(n),af.Hh(t)(e)}var n,r=n(e);return 0===r.length?void 0!==t?(ad.warn('"'.concat(e,'" selector returned (fallback) data: '),t),af.Hh(t)(e)):(ad.warn('"'.concat(e,'" selector returned no results. No fallback set.'),t),null):r}},{key:"match",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"string"==typeof this._data||ei().isEmpty(this._data)&&e.length&&"."!==e[0]?this._matchHTML(e,t):ei().cloneDeep(this._matchJSON(e,t))}},{key:"match_many",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=ei().cloneDeep(n);try{t=ei().cloneDeep(au().match(e,this._data))}catch(e){return ad.error(e),r}return this.useDefaults?t&&t.length>0?t:(ad.warn("".concat(e," returned (fallback) data: "),r),r):t&&t.length>0?t:[]}},{key:"raw",value:function(){return this._data?ei().cloneDeep(this._data):(ad.warn("No raw found, empty object returned"),{})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}(),ay=n(65362),av=n.n(ay);function ab(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ag=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=(t||window.Bridge.presenter.slideshow._currentPreso.current).path_data;return"".concat(n.deck_id,"_").concat(n.section_id,"_").concat(n.slide_id,"_").concat(e)},am=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.some(function(t){return!!(e&&e.tags&&t&&-1!==e.tags.indexOf(t))})},aw=function(e){var t,n,r,o,i,a=(function(e){if(Array.isArray(e))return e}(t=null!=(n=null==(i=window.Bridge.Companywide)||null==(o=i.getWithKeys)?void 0:o.call(i,[e]))?n:[])||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),1!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return ab(e,1);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ab(e,1)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];return null!=(r=null==a?void 0:a.value)?r:null},aO=function(){var e=D()(".presoSlide.current .presenter-content article");if(!e||!e.length)return null;var t=e[0];return D()(t).data("namespace")||null},ak=function(e){var t=e.css("background-image"),n=D()('<div class="image-background-container"></div>');return n.css("background-size","0px"),n.css("background-image",t),n},a_="data-presenter-image";function aj(e,t){var n=e.children("img[".concat(a_,"]")).first(),r=e.hasClass("sp-companywide-editable");if(!t||r){n.remove(),t||e.css("background-image","");return}if(n.length){e.css("background-image","none"),n.attr("src",t);return}e.css("background-image","none"),e.prepend(D()("<img ".concat(a_,' src="').concat(t,'"></img>'))),e.children(".image-background-container").length||e.append(ak(e))}function aS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function aP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function aC(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function ax(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var aE=Object.freeze({DECK:"deck",STORAGE:"storage"}),aT=av().extend({props:{content:{type:"array",default:function(){return[]}},context:"object",envs:"object",debugInfo:"object",feeds:"object",dynamicContent:"object",current:"object",features:"object",flat:"array",options:"object",shareEditors:"object"},derived:{prev:{deps:["index","flat"],fn:function(){var e=this.index;return this.slideAt(e-1)}},next:{deps:["index","flat"],fn:function(){var e=this.index;return this.slideAt(e+1)}},index:{deps:["current","flat"],fn:function(){if(!this.current||!this.flat)return null;var e=this.getIndex(this.current);return -1===e&&ap.warn("Valid index not found!"),e<0?null:e}},isSingle:{deps:["flat"],fn:function(){return!(this.flat.length>1)}},keysList:{deps:["flat"],fn:function(){var e=this,t=[];return ei().each(this.flat,function(n){t.push(e.getFullKey(n.path_data)),n.subslides&&n.subslides.length&&ei().each(n.subslides,function(r,o){t.push(e.getFullKey(aC(aP({},n.path_data),{subslide_key:r.key||"subslide-".concat(o+1)})))})}),t}}},initialize:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=t.options||{};this.options=r,this.name=n||"presentation",this.context=r.context||{},this.debugInfo=r.debugInfo||{},this.feeds=r.feeds||{},this.envs=r.envs||{},this.shareEditors=r.shareEditors||[],this.onImmediateContextSave=r.onImmediateContextSave||function(){return ap.warn("Unable to save context in this context"),null},this.showPreviewOnlySlides=r.showPreviewOnlySlides||!1,r.common?this.common=r.common:(this.common={},ei().each(this.content,function(t){e.common[t.key]=t.common||{};var n=t.html.split("/").slice(0,-1).join("/");n="".concat(n,"/"),e.common[t.key].baseURL=n})),this.dynamicContent=r.dynamicContent||[],this.on("change:dynamicContent",function(){var t=ei().keyBy(e.previous("dynamicContent")||[],"key"),n=!0,r=!1,o=void 0;try{for(var i,a=(e.dynamicContent||[])[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var s,l=i.value,c=l.key,u=l.value;(null==(s=t[c])?void 0:s.value)!==u&&e.trigger("cmsValChanged",c,u,e.current,{origin:aE.STORAGE})}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}),this.features=this.features||{editable:!1,canSave:!1},this.filter=r.filter||function(){return!0},this.flat=this.createFlat(),this.current||this.setCurrent(this.flat[0]),this.on("change:content",function(){var t=e.current,n=null;e.oldFlat=e.flat;var r=e.createFlat();if(t)if(r.find(function(e){return e.path===t.path}))e.current=r.find(function(e){return e.path===t.path});else{var o=ei().findIndex(e.oldFlat,{path:t.path});for(-1===o&&(o=0);o>=0&&null===n;o--){var i=r.find(function(t){return t.path===e.oldFlat[o].path});i&&(n=i)}n||(ap.warn("Couldn't set current slide after content change. This shouldn't happen."),n=r[0]),e.setCurrent(n)}else e.setCurrent(e.flat[0]);e.flat=r})},setCurrent:function(e){var t=this.flat.find(function(t){return ei().isEqual(t.path_data,e.path_data)});t?this.current=t:ap.warn("Tried to set non-present current slide",e)},getContentCopy:function(){var e=this;return this.content.map(function(t){return aC(aP({},t),{path:e.setPath(t).path,sections:t.sections.map(function(n){return aC(aP({},n),{path:e.setPath(t,n).path,slides:n.slides.map(function(r){return aC(aP({},r),{path:e.setPath(t,n,r).path,subslides:(r.subslides||[]).map(function(e){return aP({},e)})})})})})})})},createFlat:function(){var e=this,t=[],n=this.filter;return this.content.forEach(function(n){var r=ei().sortBy(n.sections,"sequence");t.push(e.setPath(n)),r.filter(function(t){return!e.hasPreviewOnlyTag(t)}).forEach(function(r){var o=ei().sortBy(r.slides,"sequence");t.push(e.setPath(n,r)),o.filter(function(t){return!(e.hasPreviewOnlyTag(t)||e.hasPreviewOnlyTag(r))}).forEach(function(o){o.subSlides&&(o.subslides=o.subSlides),o.sub_slides&&(o.subslides=o.sub_slides),t.push(e.setPath(n,r,o))})})}),ei().filter(t,n)},hasPreviewOnlyTag:function(e){return!this.showPreviewOnlySlides&&am(e,["preview-only","prep-only"])},getIterationList:function(){var e=this,t=[];return ei().each(this.flat,function(n){t.push({key:e.getFullKey(n.path_data),path:e.getFullPath(n)}),n.subslides&&n.subslides.length&&ei().each(n.subslides,function(r){t.push({key:e.getFullKey(aC(aP({},n.path_data),{subslide_key:r.key})),path:"".concat(e.getFullPath(n),"/").concat(r.key)})})}),t},getFullKey:function(e){var t=this.content[0],n=t.usesImpostorSections,r=e.section_key&&e.section_key.startsWith("template-");if(n&&!r){var o=e.deck_key,i=e.deck_id,a=e.section_key,s=e.slide_key,l=e.subslide_key,c="".concat(o,":").concat(i);return a&&(c="".concat(c,"/").concat(t.realSection.key)),s?c="".concat(c,"/").concat(s):a&&(c="".concat(c,"/").concat(a)),l&&(c="".concat(c,"/").concat(l)),c}var u=e.deck_key,f=e.deck_id,p=e.section_key,d=e.slide_key,h=e.subslide_key,y="".concat(u,":").concat(f);return y+=p?"/".concat(p):"",y+=d?"/".concat(d):"",y+=h?"/".concat(h):""},setPath:function(e,t,n){var r=arguments[arguments.length-1];r.path_data||(r.path_data={deck_id:e.id,deck_key:e.key,section_id:t?t.id:null,section_key:t?t.key||"custom_slide_".concat(t.id):null,slide_id:n?n.id:null,slide_key:n?n.key||"custom_slide_".concat(n.id):null}),r.path||(r.path=this.getFullPath(r));var o="deck";return n?o="slide":t&&(o="section"),r.type=o,r},getFullPath:function(e){return e.path?e.path:e.path_data?e.path_data.deck_key+(e.path_data.section_key?"/".concat(e.path_data.section_key):"")+(e.path_data.slide_key?"/".concat(e.path_data.slide_key):""):null},getContext:function(){return ei().cloneDeep(this.context)},slideAt:function(e){return this.flat[e]||null},gotoSlide:function(e){var t=e;return this.isSingle?(ap.warn("This is a single-slide presentation, cannot change slides."),!1):ei().isUndefined(t)?(ap.warn("No slide was specified for movement."),!1):!!(t=(void 0===t?"undefined":ax(t))!=="object"?this.search(t):t.path||t.path_data?this.searchByPath(this.getFullPath(t)):this.searchByObject(t))&&t!==this.current&&(this.setCurrent(t),!0)},copy:function(){return this.getAttributes({props:!0,session:!0,derived:!0})},getCurrentDeckKey:function(){return this.current.path_data.deck_key},getCurrentDeck:function(){return this.getSlideDeck(this.index)||{}},getCurrentSection:function(){return this.getSlideSection(this.index)},getSlideDeck:function(e){for(var t=e;null!==this.slideAt(t);t--)if(this.slideAt(t)&&!this.slideAt(t).path_data.section_id)return this.slideAt(t);return null},getSlideSection:function(e){for(var t=e;null!==this.slideAt(t);t--)if(this.slideAt(t)&&!this.slideAt(t).path_data.slide_id)return this.slideAt(t);return null},getIndex:function(e){if(!e.path_data||!this.flat)return -1;var t=this.isSingle?this.flat[0]:this.searchByObject(e);return this.flat.indexOf(t)},search:function(e){switch(void 0===e?"undefined":ax(e)){case"object":return this.searchByObject(e);case"string":return this.searchByPath(e);case"function":return this.searchByFunction(e);case"number":return this.slideAt(e);default:return null}},searchByObject:function(e){var t;if(!ei().isUndefined(e.id)&&e.key){var n=ei().matches({id:e.id,key:e.key}),r=ei().filter(this.flat,n);t=1===r.length?r[0]:null}return!t&&e.path_data&&(t=this.flat.find(function(t){return ei().isEqual(t.path_data,e.path_data)})),t||(t=this.searchByPath(this.getFullPath(e))),t||(t=this.searchByID(e)),t||(t=this.searchByKey(e)),t||null},searchByID:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ei().find(this.flat,function(t){return t.path_data.deck_id===e.deck&&(t.path_data.section_id===e.section||!t.path_data.section_id&&!e.section)&&(t.path_data.slide_id===e.slide||!t.path_data.slide_id&&!e.slide)})},searchByKey:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ei().find(this.flat,function(t){return t.path_data.deck_key===e.deck&&(t.path_data.section_key===e.section||!t.path_data.section_key&&!e.section)&&(t.path_data.slide_key===e.slide||!t.path_data.slide_key&&!e.slide)})},searchByFunction:function(e){return ei().filter(this.flat,e)},searchByPath:function(e){if("string"!=typeof e)return null;var t,n=this.getCurrentDeck(),r=this.getCurrentSection(),o=n?n.key:null,i=r?r.key:null,a=function(e){if(Array.isArray(e))return e}(t=ei().template(e,{interpolate:/\{\{(.+?)\}\}/g})({deck:o,section:i}).split("/"))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),3!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return aS(e,3);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return aS(e,3)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),s=a[0],l=a[1],c=a[2];if(n.usesImpostorSections){var u=c||l||s;return ei().find(this.flat,{key:u})||null}var f={deck:s.toLowerCase(),section:l?l.toLowerCase():null,slide:c?c.toLowerCase():null};return ei().find(this.flat,function(e){var t=(e.path_data.deck_key?e.path_data.deck_key.toLowerCase():null)===f.deck,n=(e.path_data.section_key?e.path_data.section_key.toLowerCase():null)===f.section,r=(e.path_data.slide_key?e.path_data.slide_key.toLowerCase():null)===f.slide;return!!(t&&n&&r)})||null},matchKey:function(e){var t=this.flat.filter(function(t){return t.key===e});if(1===t.length)return t[0];if(!t.length)return null;var n=this.getCurrentSection(),r="".concat(n.path,"/").concat(e);if((t=this.search(r)).length)return t[0];var o=this.getCurrentDeckKey();return(r="".concat(o,"/").concat(e),(t=this.search(r)).length)?t[0]:null},toString:function(){return"[Presentation presentation]"},destroy:function(){this.off()}}),aI=n(34289),aR=n.n(aI),aD=n(82465),aN=n.n(aD),aA=function(){var e;function t(){var e,n,r=this;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");e="updateTransform",n=function(e,t){var n=D()(r.el),o=n.width(),i=(o*r.scale-o)/2,a=n.height(),s=(a*r.scale-a)/2,l=r.x+e,c=r.y+t;l>0&&l>i?l=i:l<0&&l<0-i&&(l=0-i),c>0&&c>s?c=s:c<0&&c<0-s&&(c=0-s),n.css("transform","translate(".concat(l,"px, ").concat(c,"px) scale(").concat(r.scale,")")),r.xTrans=l,r.yTrans=c},e in this?Object.defineProperty(this,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):this[e]=n,this.x=0,this.y=0,this.xTrans=0,this.yTrans=0,this.scale=1,this.scaleDelta=1,this.prevScaleDelta=1}return e=[{key:"addListeners",value:function(e){this.el=e;var t=t1.A.isIOS?"pan-y":"none";this.scalingManager=new(aN()).Manager(e,{touchAction:t}),this.scalingManager.add(new(aN()).Pinch({event:"pinch"})),this.scalingManager.add(new(aN()).Pan({event:"pan"})),this.scalingManager.on("pinch pinchmove",this.handlePinch.bind(this)),this.scalingManager.on("pan",this.handlePan.bind(this)),this.scalingManager.on("pinchend panend pancancel pinchcancel",this.handlePinchEnd.bind(this))}},{key:"handlePinch",value:function(e){var t=e.scale*this.prevScaleDelta;this.scale=ei().clamp(t,1,3),this.updateTransform(e.deltaX,e.deltaY,e.center),e.preventDefault()}},{key:"handlePinchEnd",value:function(){this.prevScaleDelta=ei().clamp(this.scale,1,3)}},{key:"handlePan",value:function(e){this.updateTransform(e.deltaX,e.deltaY,!1),4===e.eventType&&(this.x=this.xTrans,this.y=this.yTrans)}},{key:"destroy",value:function(){this.scalingManager.destroy(),this.scalingManager=null}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}(),aB=n(9001),aF=n.n(aB),aM=n(61452),aL=n.n(aM),aU=[],aV=[];function az(e,t){var n="".concat(e,"-css");return new(aF())(function(r){D()('link[data-id="'.concat(n,'"]')).length>0&&a$(e);var o=D()("<link data-id='".concat(n,"' class='slide-css' rel='stylesheet' type='text/css' />"));o.attr("href","".concat(t,"?_=").concat(Date.now())),o.appendTo("head"),aU.push(e);var i=!1,a=function(e){i=!0,r(e)};o.on("load",function(){a(!0)}),o.on("error",function(){a(!1)}),ei().delay(function(){i||(ap.warn("CSS ".concat(e," failed to load in time: ").concat(t)),a(!1))},3e3)})}function a$(e){D()('link[data-id="'.concat("".concat(e,"-css"),'"]')).remove()}function aW(e){D()('script[data-id="'.concat("".concat(e,"-js"),'"]')).remove()}var aK=function(){var e;function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.slide=e.slide,this.elementID=e.id,this.parentID=e.parentID}return e=[{key:"display",value:function(e){var t,n,r=this.slide.$el.find('[data-dynamic-image="'.concat(this.elementID,'"]'));if(r.length){var o=null==(t=this.slide.fields)?void 0:t.read({attribute:"data-dynamic-image",value:this.elementID});if(null==o?void 0:o.field)return void aj(r,o.value);var i="".concat(this.parentID,"--").concat(this.elementID),a="".concat(this.parentID,"--").concat((0,ai.FP)(this.elementID)),s=this.slide._slide.key?(0,ai.VB)(this.slide._slide.key):null,l=s?"".concat(s,"--").concat(this.elementID):null,c=e[a]||e[i]||l&&e[l],u=(null==c?void 0:c._orig_image)||(null==c?void 0:c.image),f=r.attr("data-companywide-dynamic-image");!u&&f?u=aw(f):u||(u=(null==(n=e[this.elementID])?void 0:n.image)||null),aj(r,u)}}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}(),aq=function(){var e;function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.slide=e.slide,this.elementID=e.id,this.parentID=e.parentID,this.keyFromIDs=ag(this.elementID,this.slide._slide),this.persistent=!1}return e=[{key:"display",value:function(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.slide.$el.find('article [data-editable="'.concat(this.elementID,'"]'));if(this.persistent=!!i.data("persistent"),null==(e=i.get(0))||!e.contains(document.activeElement)){var a=null==(t=this.slide.fields)?void 0:t.read({attribute:"data-editable",value:this.elementID});if(null==a?void 0:a.field)return void i.html(null!=(n=a.value)?n:i.attr("default"));var s="".concat(this.parentID,"--").concat(this.elementID),l="".concat(this.parentID,"--").concat((0,ai.FP)(this.elementID)),c=r[s]||r[l],u=null,f=s.match(/.*-autoadjunct-(\d+)/);if(f){var p=f[1];u="".concat(l,"-").concat(p)}if(u&&(c=c||r[u]),c=c||r[this.elementID],this.slide._slide.key){var d=(0,ai.VB)(this.slide._slide.key);c=c||r["".concat(d,"--").concat(this.elementID)]}var h=o[this.keyFromIDs];c?i.html(c.value):h?i.html(h.content):i.html(i.attr("default"))}}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}();function aH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function aZ(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function aJ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function aG(e,t,n){return t&&aJ(e.prototype,t),n&&aJ(e,n),e}function aY(e){return(aY=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function aX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(aX=function(){return!!e})()}function aQ(e,t){return(aQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a0(e){return function(e){if(Array.isArray(e))return aH(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return aH(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return aH(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a1(e){ap.error("The following error was thrown from an event inside the deck:\n\n",e)}var a2=function(){function e(t){aZ(this,e),this._events={},this.internalEvent=t}return aG(e,[{key:"namespace",set:function(e){this._namespace=e}},{key:"trigger",value:function(e){var t=/^client:/.test(e);(window.Bridge.options.interactionEnabled||t)&&this.triggerEvent.apply(this,arguments)}},{key:"triggerSocketEvent",value:function(){this.triggerEvent.apply(this,arguments)}},{key:"triggerDeckEvent",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=n||[],i=this._events.deck||{};(i&&i[e]?i[e]:[]).forEach(function(e){try{e.apply(void 0,a0(o))}catch(e){a1(e)}})}},{key:"triggerEvent",value:function(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=r||[],a=this._events[this._namespace]||{};(a&&a[e]?a[e]:[]).forEach(function(e){try{e.apply(void 0,a0(i))}catch(e){a1(e)}}),(t=this.internalEvent).trigger.apply(t,arguments)}},{key:"triggerAsync",value:function(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=/^client:/.test(e);if(!(window.Bridge.options.interactionEnabled||i))return aF().resolve();var a=r||[],s=this._events[this._namespace]||{},l=s&&s[e]?s[e]:[],c=[];return l.forEach(function(e){var t=null;if(e.length>a.length){var n=new(aF())(function(e){t=function(){e()},setTimeout(function(){e()},1e4)});c.push(n)}try{e.apply(void 0,a0(a).concat([t]))}catch(e){a1(e),t()}}),(t=this.internalEvent).trigger.apply(t,arguments),aF().all(c)}},{key:"on",value:function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this._namespace;"slideclosed"===e&&ap.warn("Event 'slideclosed' has been deprecated. Use 'slide:closed' instead."),"all"===e?(n=this.internalEvent).on.apply(n,arguments):(this._events[r]||(this._events[r]={}),this._events[r][e]||(this._events[r][e]=[]),this._events[r][e].push(t))}},{key:"once",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this._namespace,r=this,o=function(){for(var i=arguments.length,a=Array(i),s=0;s<i;s++)a[s]=arguments[s];t.apply(void 0,a0(a)),r.off(e,o,n)};this.on(e,o,n)}},{key:"off",value:function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this._namespace;if("all"===e)(n=this.internalEvent).off.apply(n,arguments);else{var o=ei().get(this._events,"".concat(r,".").concat(e),[]),i=o.indexOf(t);-1!==i&&o.splice(i,1)}}},{key:"removeNamespace",value:function(e){this._events[e]&&delete this._events[e]}},{key:"destroy",value:function(){this._events={}}}]),e}(),a3=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function t(){var e,n;return aZ(this,t),n=aY(n=t),(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,aX()?Reflect.construct(n,[],aY(this).constructor):n.apply(this,void 0))).setMaxListeners(12),e}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&aQ(t,e),aG(t,[{key:"trigger",value:function(e){this.emit.apply(this,arguments),this.emit("all",{event:e,args:arguments})}},{key:"on",value:function(e,t){this._events[e]||(this._events[e]=[]),this._events[e].push(t)}},{key:"off",value:function(e,t){if(this._events[e]){var n=this._events[e].indexOf(t);n>=0&&this._events[e].splice(n,1)}}},{key:"destroy",value:function(){this._events={}}}]),t}(aR());function a5(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a4(e){return function(e){if(Array.isArray(e))return a5(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return a5(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return a5(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var a6=null,a8={},a9=["data-companywide-editable","data-companywide-dynamic-image","data-companywide-dynamic-list","data-companywide-youtube-player"],a7=function(){var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");a6=null,a8={}}return e=[{key:"presentation",set:function(e){a6=e}},{key:"contentEditors",get:function(){return this._contentEditors},set:function(e){this._contentEditors=e}},{key:"setContentKeys",value:function(e,t){var n=a9.flatMap(function(e){return ei().uniq(t.find("[".concat(e,"]")).toArray().map(function(t){return D()(t).attr(e)}))});a8[e]=n}},{key:"get",value:function(e,t){var n=a6.dynamicContent.find(function(t){return t.key===e});return void 0!==n?n:t}},{key:"getSlideKeysForArticle",value:function(){return a4(a8[window.Bridge.Slides.getArticle().data("namespace")]||[])}},{key:"getSlideKeys",value:function(){return a4(a8[aO()]||[])}},{key:"getSlideValues",value:function(){var e=this.getSlideKeys();return this.getWithKeys(e)}},{key:"getTextEditorOptions",value:function(){return!!this.contentEditors&&this.contentEditors.text}},{key:"getWithKeys",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t="string"==typeof e?[e]:e;return(a6.dynamicContent||[]).filter(function(e){return -1!==t.indexOf(e.key)})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}();function se(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function st(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function sn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function sr(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function so(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var si=null,sa=/.([A-Za-z0-9_-]+)/g,ss={fields:{},_cmsVals:[]};function sl(e,t,n){var r=ei().cloneDeep(e),o=t.match(sa),i=r;return o.forEach(function(e,t){var r=e.replace(".","");if(t===o.length-1)i[r]=n;else if(void 0===i[r]){var a=o[t+1].replace(".","");parseInt(a,10)-a==0?i[r]=[]:i[r]={}}i=i[r]}),r}var sc={changed:"change:context"};function su(e){var t=sc[e];if(!t){var n=Object.keys(sc).join(", ");throw Error('Bridge.Context has no "'.concat(e,'" event. It has ').concat(n,"."))}return t}var sf=new WeakMap,sp=function(){var e;function t(e){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");!function(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}(this,sf,{writable:!0,value:void 0}),function(e,t,n){var r=st(e,t,"set");if(r.set)r.set.call(e,n);else{if(!r.writable)throw TypeError("attempted to set read only private field");r.value=n}}(this,sf,e)}return e=[{key:"getDict",value:function(){return ei().cloneDeep(this.context)}},{key:"on",value:function(e,t){si.on(su(e),t)}},{key:"off",value:function(e,t){si.off(su(e),t)}},{key:"save",value:function(){var e,t=(e=st(this,sf,"get"),e.get?e.get.call(this):e.value).presenter.getPresentation();return t.onImmediateContextSave(this.context,t)}},{key:"get",value:function(e,t){var n=ei().get(this.context._persistent||{},e),r=ei().get(this.context,e);return void 0!==n?ei().cloneDeep(n):void 0!==r?ei().cloneDeep(r):t}},{key:"getPersistent",value:function(e,t){return this.context._persistent&&e in this.context._persistent?ei().cloneDeep(this.context._persistent[e]):t}},{key:"getNonPersistent",value:function(e,t){return e in this.context?ei().cloneDeep(this.context[e]):t}},{key:"set",value:function(e,t,n){if("_persistent"===e)return ap.warn("Cannot set the _persistent value directly."),!1;var r=function(e,t,n,r){if(r){e._persistent||(e._persistent={});var o=ei().cloneDeep(e._persistent);ei().set(o,t,ei().cloneDeep(n)),e._persistent=o}else ei().set(e,t,ei().cloneDeep(n));return e}(ei().cloneDeep(this.context),e,t,n);return si.context=r,!0}},{key:"setPath",value:function(e,t,n){if("_persistent"===e)return ap.warn("Cannot set the _persistent value directly."),!1;var r,o,i,a=(r=ei().cloneDeep(this.context),o=r,i=ei().cloneDeep(t),n?(o._persistent||(o._persistent={}),o._persistent=sl(o._persistent,e,i)):o=sl(o,e,i),o);return si.context=a,!0}},{key:"presentation",set:function(e){si=e}},{key:"context",get:function(){if(!si)throw Error("Can't find attached presentation");return si.context}},{key:"match",value:function(e,t){var n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(void 0===t)throw Error("No default value provided. Try match(selector, defaultValue, autoCacheURL)");if(n||(a=((function(e){if(Array.isArray(e))return se(e)})(r=ei().initial(e.split(".")))||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e){if(e){if("string"==typeof e)return se(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return se(e,void 0)}}(r)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat(["_orig_".concat(ei().last(e.split(".")))]).join("."),i=(o=ei().cloneDeep(au().match(a,ei().extend({},this.context,sr(sn({},ss),{_persistent:{}}))))).length?ei().cloneDeep(o[0]):void 0),(n||!i)&&(i=(o=ei().cloneDeep(au().match(e,ei().extend({},this.context,sr(sn({},ss),{_persistent:{}}))))).length?ei().cloneDeep(o[0]):void 0),this.context._persistent&&(n||(l=(s=au().match(a,ei().extend({},this.context._persistent,ss))).length?ei().cloneDeep(s[0]):void 0),(n||!l)&&(l=(s=au().match(e,ei().extend({},this.context._persistent,ss))).length?ei().cloneDeep(s[0]):void 0),void 0!==l)){if(void 0!==i&&(void 0===l?"undefined":so(l))==="object"&&(void 0===i?"undefined":so(i))==="object"){var r,o,i,a,s,l,c=ei().merge(i,l);return ap.info("Context match for ".concat(e," merging persistent and non-persistent data:"),c),c}return s.length>1&&ap.warn("Context match for ".concat(e," returned multiple results, returning first result:"),s),l}return void 0!==i?(o.length>1&&ap.warn("Context match for ".concat(e," returned multiple results, returning first result:"),o),i):(ap.warn("No context match for ".concat(e,", returning fallback:"),t),t)}},{key:"match_many",value:function(e,t){if(void 0===t)throw Error("No default value provided. Try match_many(selector, defaultValue)");if(this.context._persistent){var n=au().match(e,this.context._persistent);if(n&&n.length)return ei().cloneDeep(n)}var r=au().match(e,ei().extend({},this.context,ss));return r.length>0?ei().cloneDeep(r):t}},{key:"getAgenda",value:function(){var e=si.flat.map(function(e){return e.path});return ei().map(ei().compact(si.content),function(t){var n=t.sections.filter(function(t){return e.includes(t.path)}),r=ei().map(ei().compact(n),function(t){var n=t.slides.filter(function(t){return e.includes(t.path)}),r=ei().map(ei().compact(n),function(e){var t=ei().map(ei().compact(e.subslides),function(e){return{title:e.title,visible:!0}});return{title:e.title,path:e.path,visible:e.visible,subslides:t}});return{title:t.title,path:t.path,visible:t.visible,slides:r}});return{title:t.title,path:t.key,sections:r,enabled:t.enabled}})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}();function sd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function sh(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function sy(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function sv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return sd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sd(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var sb=new WeakMap,sg=new WeakSet,sm=function(){var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");sh(this,sg),sg.add(this),sh(this,sb),sb.set(this,{writable:!0,value:null})}return e=[{key:"presentation",set:function(e){var t=this,n=sb,r=e,o=sy(t,n,"set");if(o.set)o.set.call(t,r);else{if(!o.writable)throw TypeError("attempted to set read only private field");o.value=r}}},{key:"getSlideValues",value:function(){var e=this.getSlideKeys();return this.getWithKeys(e)}},{key:"getSlideKeys",value:function(){var e=D()("#slideshow #slideshow-slides .presoSlide.current").find("[data-editable]");return ei().map(e,function(e){return D()(e).attr("data-editable")})}},{key:"getWithKey",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=window.Bridge.Context.match("._editableContent .".concat(e),null),r=(function(e,t,n){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return n})(this,sg,sw).call(this,e),o=D()('#slideshow #slideshow-slides [data-editable="'.concat(e,'"]'));return n?{key:n.elementID,value:n.value}:r?{key:r.element_id,value:r.content}:o.length?{key:e,value:o[0].innerHTML}:{key:e,value:t}}},{key:"getWithKeys",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.map(function(t){return e.getWithKey(t)})}},{key:"get",value:function(e){var t,n,r=(t=sy(this,sb,"get"),t.get?t.get.call(this):t.value),o=r.current,i=(0,ai.jZ)(o,"personal");if(o.template&&(0,ai.pB)(e)===e)if(i)n="".concat(e,"-").concat(i);else throw Error("Unknown slide type");else n=e;var a=D()("".concat("#slideshow #slideshow-slides .presoSlide.current"," [data-editable],[data-companywide-editable]")),s=a.filter(function(e,t){var r,i,a=D()(t),s=o.custom||o.autoAdjunctID&&!o.createdByAutoAdjunct;return(null==(r=a.attr("data-editable"))?void 0:r.endsWith(n))||s&&(null==(i=a.attr("data-companywide-editable"))?void 0:i.endsWith(n))});if(1===s.length){var l=s.first(),c=o.custom&&o.template&&l.attr("data-companywide-editable")&&!l.attr("data-editable")?r.context._userTemplateCMSvals:r.context._editableContent;if(!c)return null;var u=Object.keys(c).filter(function(e){var t=sv(e.split("--"),2),r=t[0],i=t[1];return o.template?i.endsWith(n):r===o.key&&i===n});return 1===u.length?c[u[0]].value:null}var f=ei().uniq(a.toArray().flatMap(function(e){var t=D()(e);return ei().compact([t.attr("data-editable"),o.custom&&o.template?t.attr("data-companywide-editable"):null])}).filter(function(e){return!o.template||(0,ai.pB)(e)!==e}).map(function(e){if(o.template){var t,n,r=e;if(null==(n=o.template)||null==(t=n.index_asset)?void 0:t.orig_path){var i=sv(o.template.index_asset.orig_path.split("/"),2)[1];r=e.replace(new RegExp("^".concat(i,"-")),"")}return(0,ai.pB)(r)}return e}));return ap.warn("Couldn't find editable value with key '".concat(e,"'. Possible values: ").concat(f.join(", "))),null}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}();function sw(e){var t=window.Bridge.Context.getPersistent("editedContent",{}),n=window.Bridge.Context.getNonPersistent("editedContent",{});return ei().find(t,function(t){return t.element_id===e})||ei().find(n,function(t){return t.element_id===e})}var sO=null,sk=function(){var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function")}return e=[{key:"canChangeEditor",get:function(){var e=window.Bridge.options.readOnly,t=window.Bridge.options.allowShareEditorChange;return!e&&t&&!!this.users.length}},{key:"users",get:function(){return sO&&sO.shareEditors?ei().cloneDeep(sO.shareEditors):[]}},{key:"editors",get:function(){return this.users.filter(function(e){return e.canEdit})}},{key:"presentation",set:function(e){sO=e}},{key:"canEdit",get:function(){return!window.Bridge.options.readOnly}},{key:"updateEditors",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!Bridge.options.screenshotMode&&this.canChangeEditor){var t=this.users;e.forEach(function(e){var n=t.find(function(t){return t.id===e.id});n?n.canEdit=e.canEdit:ap.error("Could not find user",e)});var n=t.filter(function(e){return e.canEdit}).length;n?n>1?ap.error("Only one editor is allowed - with this update there would be ".concat(n)):sO.shareEditors=t:ap.error("The update should leave at least one editor")}}},{key:"returnControlToCreator",value:function(){if(this.canChangeEditor){var e=this.users;e.forEach(function(e){e.canEdit="creator"===e.type}),sO.shareEditors=e}}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}(),s_=null,sj=function(){var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function")}return e=[{key:"envs",get:function(){if(!s_)throw Error("Can't find attached presentation");return ei().cloneDeep(s_.envs)}},{key:"presentation",get:function(){return s_},set:function(e){s_=e}},{key:"getDict",value:function(){return ei().cloneDeep(this.envs)}},{key:"get",value:function(e,t){return ei().get(this.envs,e,t)}},{key:"match",value:function(e,t){if(void 0===t)throw Error("No default value provided. Try match(selector, defaultValue)");var n=this.match_many(e,t);return Array.isArray(n)?n[0]:n}},{key:"match_many",value:function(e,t){if(void 0===t)throw Error("No default value provided. Try match_many(selector, defaultValue)");var n=au().match(e,ei().extend({},this.envs));return n.length>0?ei().cloneDeep(n):t}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}(),sS=null,sP=function(){var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function")}return e=[{key:"presentation",set:function(e){sS=e}},{key:"feeds",get:function(){return sS.feeds}},{key:"getDebugInfo",value:function(){var e=sS.getCurrentDeckKey();return sS.debugInfo[e]}},{key:"get",value:function(e){var t=window.Bridge.Sub.slide;t&&(!this._slideTitle||this._slideTitle!==t.title)&&(ad.debug(t.title),this._slideTitle=t.title);var n=sS.getCurrentDeckKey(),r=this.feeds[n]?this.feeds[n][e]:null;return r||ad.warn("No feed found for ".concat(e," in\n slide ").concat(window.Bridge.namespace)),new ah(r)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}();function sC(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function sx(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function sE(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function sT(e,t){var n=sE(e,t,"get");return n.get?n.get.call(e):n.value}function sI(e,t,n){sx(e,t),t.set(e,n)}function sR(e,t,n){var r=sE(e,t,"set");if(r.set)r.set.call(e,n);else{if(!r.writable)throw TypeError("attempted to set read only private field");r.value=n}return n}function sD(e,t,n){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return n}function sN(e,t){sx(e,t),t.add(e)}var sA="changed";function sB(e){if(e!==sA)throw Error('Bridge.Interface has no "'.concat(e,'" event. It has "').concat(sA,'".'))}var sF={1:function(e){return{read:function(t){var n=t.slidePath,r=t.field;return e.read({slidePath:n,field:r})},apply:function(t){var n=t.slidePath,r=t.operation,o=t.input;return e.apply({slidePath:n,operation:r,input:o})},register:function(t){var n=t.slidePath,r=t.field,o=t.keys,i=t.module;return e.register({slidePath:n,field:r,keys:o,module:i})},on:function(t,n){return e.on(t,n)},off:function(t,n){return e.off(t,n)}}}},sM=new WeakMap,sL=new WeakMap,sU=new WeakMap,sV=new WeakMap,sz=new WeakMap,s$=new WeakMap,sW=new WeakSet,sK=new WeakSet,sq=new WeakSet,sH=new WeakSet,sZ=function(){var e;function t(e){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");sN(this,sW),sN(this,sK),sN(this,sq),sN(this,sH),sI(this,sM,{writable:!0,value:void 0}),sI(this,sL,{writable:!0,value:null}),sI(this,sU,{writable:!0,value:null}),sI(this,sV,{writable:!0,value:new Map}),sI(this,sz,{writable:!0,value:new Set}),sI(this,s$,{writable:!0,value:null}),sR(this,sM,e)}return e=[{key:"open",value:function(e){var t=sF[e.version];return t?t(this):null}},{key:"hasDeckInterface",get:function(){return null!==sT(this,sL)}},{key:"configure",value:function(e){var t,n=this,r=e.deckInterface,o=e.resolveTarget;null==(t=sT(this,s$))||t.call(this),sR(this,sL,r),sR(this,sU,o),sT(this,sV).clear();var i=function(){return sD(n,sq,sY).call(n)};sT(this,sM).CMSVals.on("changed",i),sT(this,sM).Context.on("changed",i),sR(this,s$,function(){sT(n,sM).CMSVals.off("changed",i),sT(n,sM).Context.off("changed",i)})}},{key:"destroy",value:function(){var e;null==(e=sT(this,s$))||e.call(this),sR(this,sL,null),sR(this,sU,null),sT(this,sV).clear()}},{key:"read",value:function(e){var t=e.slidePath,n=e.field;if(!this.hasDeckInterface)return{state:null,channel:null,provided:{}};var r=sT(this,sU).call(this,t),o=sT(this,sL).readField({target:r,field:n});return sD(this,sK,sG).call(this,{slidePath:t,field:n,target:r,state:o.state}),o}},{key:"apply",value:function(e){var t;return(t=function(e){var t,n,r,o,i,a,s,l,c,u,f,p;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(d){switch(d.label){case 0:if(t=e.slidePath,n=e.operation,r=e.input,o=e.editorState,i=e.persistent,!this.hasDeckInterface)return ap.warn('"'.concat(n,'" was not saved: this deck was built without an interface.')),[2,{errors:{},stored:!1}];return a=sT(this,sU).call(this,t),[4,(0,ai.NS)(sT(this,sL),{target:a,operation:n,input:r,editorState:o,persistent:i,source:ai.aH})];case 1:var h,y;return l=(s=d.sent()).errors,c=s.stored,u=s.value,f=s.refused,p=s.failure,!function(e,t){var n=t.errors,r=t.refused,o=t.failure;if(o)return ap.error('"'.concat(e,'" failed: ').concat(o.message));r&&0===Object.keys(n).length&&ap.warn('"'.concat(e,'" was refused: ').concat((Array.isArray(r)?r:[r]).map(function(e){return e.message}).join(" ")))}(n,{errors:l,refused:f,failure:p}),c&&sD(this,sW,sJ).call(this,t,-1===(y=(h=n).lastIndexOf("."))?h:h.slice(0,y)),[2,{errors:l,stored:c,value:u}]}})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){sC(i,r,o,a,s,"next",e)}function s(e){sC(i,r,o,a,s,"throw",e)}a(void 0)})}).apply(this,arguments)}},{key:"register",value:function(e){var t=e.slidePath,n=e.field,r=e.keys,o=e.module;if(!this.hasDeckInterface)return function(){};var i=sT(this,sL).registerField({target:sT(this,sU).call(this,t),field:n,keys:r,module:o});return sD(this,sq,sY).call(this),i}},{key:"on",value:function(e,t){sB(e),sT(this,sz).add(t)}},{key:"off",value:function(e,t){sB(e),sT(this,sz).delete(t)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}();function sJ(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=sT(this,sz)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0)(0,i.value)({slidePath:e,field:t})}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}function sG(e){var t=this,n=e.slidePath,r=e.field,o=e.target,i=e.state,a="".concat(n,"::").concat(r),s=!sT(this,sV).has(a)&&null===i;sT(this,sV).set(a,{slidePath:n,field:r,target:o,json:JSON.stringify(i)}),s&&sT(this,sL).ready.then(function(){return sD(t,sH,sX).call(t,a)})}function sY(){var e=!0,t=!1,n=void 0;try{for(var r,o=sT(this,sV).keys()[Symbol.iterator]();!(e=(r=o.next()).done);e=!0){var i=r.value;sD(this,sH,sX).call(this,i)}}catch(e){t=!0,n=e}finally{try{e||null==o.return||o.return()}finally{if(t)throw n}}}function sX(e){var t,n,r=sT(this,sV).get(e);if(r){var o=r.slidePath,i=r.field,a=r.target,s=r.json,l=JSON.stringify(sT(this,sL).readField({target:a,field:i}).state);l!==s&&(sT(this,sV).set(e,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},r),n=n={json:l},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)),sD(this,sW,sJ).call(this,o,i))}}var sQ=function(){var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this._locks=null,this._callback=null}return e=[{key:"addLocks",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if(this._callback){ap.error("Tried to add locks while still updating locks"),t(!1);return}e=e.length?e:[e];var n=ei().unionBy(e,this._locks,function(e){var t=e.who,n=e.what;return"".concat(t,"-").concat(n)});if(n.length===this._locks.length){ap.warn("Cannot update locks with no changes"),t(!1);return}this._callback=t,this.saveLocks(n)}},{key:"locksUpdated",value:function(e){var t=this._locks;this._locks=e,window.Bridge.Event.trigger("locksUpdated",e,t),this._callback(!0,e,t),this._callback=null}},{key:"lockUpdateFailed",value:function(e){this._callback(!1,e),this._callback=null}},{key:"locks",get:function(){return this._locks},set:function(e){this._locks?ap.error("You cannot set locks directly. Please use Bridge.Lock.lockFeature."):this._locks=ei().cloneDeep(e)}},{key:"saveLocks",value:function(){ap.error("'Save locks' not set")}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}();function s0(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function s1(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){s0(i,r,o,a,s,"next",e)}function s(e){s0(i,r,o,a,s,"throw",e)}a(void 0)})}}function s2(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function s3(e,t){var n=s2(e,t,"get");return n.get?n.get.call(e):n.value}function s5(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}function s4(e,t,n){var r=s2(e,t,"set");if(r.set)r.set.call(e,n);else{if(!r.writable)throw TypeError("attempted to set read only private field");r.value=n}return n}function s6(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var s8=new WeakMap,s9=new WeakMap,s7=function(){var e;function t(e){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");s5(this,s8,{writable:!0,value:null}),s5(this,s9,{writable:!0,value:null}),this.slides={},this.subslides={},this.history=[],s4(this,s9,e)}return e=[{key:"presentation",set:function(e){s4(this,s8,e)}},{key:"report",value:function(){var e=s3(this,s8).index;return{index:e,position:e+1,total:s3(this,s8).flat.length}}},{key:"gotoSlide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==e&&s3(this,s9).options.navigationEnabled){var t=s3(this,s9).presenter;return aF().resolve(t.whenStarted).timeout(3e4).then(function(){return t.changeSlide(e)}).catch(aF().TimeoutError,function(){return ap.error('Cannot navigate to "'.concat(e,'": the presenter has not started after ').concat(3e4,"ms.")),!1})}return aF().resolve(!1)}},{key:"gotoSlidePage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return s1(function(){var r,o;return s6(this,function(i){switch(i.label){case 0:return r=s3(this,s8).current,o=this.getPath(e,t),e.path!==r.path&&(this.subslides[r.path]=null),this.history.push(o),this.allowNav(!0),[4,s3(this,s9).presenter.gotoSlide(o,n)];case 1:return i.sent(),[4,aF().delay(0)];case 2:return i.sent(),this.subslides[e.path]=t,null!==n&&(this.slides[o].currentPage=n),[4,aF().delay(1e3)];case 3:return i.sent(),[2]}})}).call(this)}},{key:"next",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};return s1(function(){var t,n,r,o,i,a,s;return s6(this,function(l){switch(l.label){case 0:return t=this.getNextSlide(),[4,this.gotoSlidePage(t.slide,t.subslide,t.page)];case 1:return l.sent(),n=!s3(this,s8).next,r=!this.getNextSubslide(),i=(o=s3(this,s9).Sub.currentSubslide)?o.key:null,a=!this.checkPages(s3(this,s8).current,i),s=n&&r&&a,e(t.value,s),[2]}})}).call(this)}},{key:"gotoNamespacedKey",value:function(e){return s1(function(){var t;return s6(this,function(n){switch(n.label){case 0:if(1!==(t=s3(this,s8).searchByFunction(function(t){return t.namespacedKey===e})).length)return[2,null];return[4,this.gotoSlidePage(t[0])];case 1:return[2,n.sent()]}})}).call(this)}},{key:"getContentPath",value:function(){var e=s3(this,s9).presenter.getPresentation(),t=e.current,n=e.getFullPath(t),r=this.subslides[t.path];if(r){var o=s3(this,s9).Sub.getContentKey(r);return"".concat(n,"/").concat(o)}return n}},{key:"getPageData",value:function(){var e=this.getContentPath();return this.slides[e]}},{key:"getServerPath",value:function(){var e=[],t=s3(this,s9).presenter.getPresentation(),n=t.current;e.push(t.getFullKey(n.path_data));var r=this.subslides[n.path];if(r){var o=s3(this,s9).Sub.getServerKey(r);e.push("/"+o)}var i=this.getPageData();return(null==i?void 0:i.currentPage)>0&&e.push("-p"+i.currentPage),e.join("")}},{key:"getPaths",value:function(){return s3(this,s8).flat.map(function(e){return e.path})}},{key:"getNamespacedKeys",value:function(){return s3(this,s8).flat.map(function(e){return e.namespacedKey})}},{key:"getSlidePath",value:function(){return s3(this,s8).getFullPath(s3(this,s8).current)}},{key:"getCurrentNav",value:function(){return this.getIDNav()}},{key:"getIDNav",value:function(){var e,t=null==(e=s3(this,s8))?void 0:e.current;if(!t)return null;var n=s3(this,s9).Sub.getSubslideForSlide(t);return{deck:t.path_data.deck_id,section:t.path_data.section_id,slide:t.path_data.slide_id,subslide:n}}},{key:"getKeyNav",value:function(){var e,t=null==(e=s3(this,s8))?void 0:e.current;if(!t)return null;var n=s3(this,s9).Sub.getSubslideForSlide(t);return{deck:t.path_data.deck_key,section:t.path_data.section_key,slide:t.path_data.slide_key,subslide:n}}},{key:"slideExists",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(s3(this,s8).current.requireRefresh=!0,""!==e){var t=s3(this,s8).searchByPath(e);if(t&&t.visible)return t.visible}return!1}},{key:"allowNav",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];s3(this,s9).presenter.toggleNavigation(e)}},{key:"openExternalLink",value:function(e){var t=window.nw,n=!!t;window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(e,"_system"):n?t.Shell?t.Shell.openExternal(e):ap.error("nw.Shell is not available - link can't be opened"):window.open(e)}},{key:"setPages",value:function(e,t){var n=e.split("/"),r=n[0];if(!r||!t)return void ap.warn("Bridge.Navigation.setPages called without\n necessary arguments (path, pages)");var o=s3(this,s8).matchKey(r);if(!o)return void ap.warn("Could not find slide",r);var i=o.path;n.length>1&&(i="".concat(i,"/").concat(n[1])),this.slides[i]={totalPages:t,currentPage:0}}},{key:"iterate",value:function(){var e=this;this.stopIterating=!1,this.subslides={},this.history=[];var t=function(n,r){if(e.stopIterating){e.stopIterating=!1;return}ap.info(">> path",n,r),r||s3(e,s9).Navigation.next(t)};s3(this,s9).Navigation.next(t)}},{key:"clearIterate",value:function(){this.stopIterating=!0}},{key:"getPath",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.path;return t&&(n="".concat(n,"/").concat(t)),n}},{key:"checkPages",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.slides[this.getPath(e,t)];return n&&n.currentPage<n.totalPages}},{key:"getNextPage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.slides[this.getPath(e,t)];return this.checkPages(e,t)?n.currentPage+1:null}},{key:"getNextSubslide",value:function(){var e=s3(this,s8).current,t=this.subslides[e.path]||null,n=s3(this,s9).Sub.getAllSubslideKeys(e),r=n[0]||null;if(n.length&&t){var o=n.indexOf(t);r=n[o+1]||null}return s3(this,s9).Sub.getContentKey(r)}},{key:"getNextSlide",value:function(){var e=s3(this,s8).current,t=s3(this,s8).next,n=s3(this,s9).Sub.getContentKey(this.subslides[e.path]||null),r=this.checkPages(e),o=this.checkPages(e,n),i=s3(this,s9).Sub.getAllSubslideKeys(e),a=this.getNextSubslide(),s=!this.history.length&&!s3(this,s8).prev,l=this.history.length?this.history[this.history.length-1]:null,c=e.path===l&&i.length&&!n,u=null,f=null;if(s||r)u=e;else if(c)u=e,f=i[0];else if(o)u=e,f=n;else if(a)u=e,f=a;else{if(!t)return ap.error("We're on the last slide"),{};u=t}var p=this.getPath(u,f),d=this.getNextPage(u,f),h=s3(this,s8).getFullKey(u.path_data);if(f){var y=s3(this,s9).Sub.getServerKey(f);h="".concat(h,"/").concat(y)}return d&&(h="".concat(h,"-p").concat(d)),{slide:u,subslide:f,page:d,path:p,value:h}}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}(),le=n(78013),lt=n.n(le),ln=n(72626),lr=n.n(ln),lo=function(e){return ei().reduce(e,function(e,t){return e+t})};function li(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.childWeights=[],this.parent=null,this.percent=0,this.destroyed=!1,ei().defaults(e,{children:[],weight:100}),this.children=e.children,this.weight=e.weight,this.weight<0&&(this.weight=0),this.weight>100&&(this.weight=100),this.calculateChildren()}function la(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ls(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function ll(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){ls(i,r,o,a,s,"next",e)}function s(e){ls(i,r,o,a,s,"throw",e)}a(void 0)})}}ei().extend(li.prototype,lr(),{calculateChildren:function(){if(this.hasChildren()){var e=ei().map(this.children,"weight"),t=lo(e);if(100!==t){var n=t-100;e=ei().map(e,function(r){var o=Math.floor(r-r/100*n);return n>0&&o>0?o:Math.ceil(r+(100-t)/e.length)})}for(;lo(e)>100;){var r=ei().max(e),o=ei().min(e),i=r-o;0===i&&(i=o);for(var a=0;a<e.length&&100!==lo(e);a++)e[a]<=i&&e[a]--}this.childWeights=e}},getChild:function(e){return this.children.length>=e+1?this.children[e]:null},hasChildren:function(){return!!this.children.length},addChild:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new li;if(ei().isNumber(e)){for(var t=[],n=0;n<e;n++)t.push(new li);return this.addChild(t)}var r=this;return ei().isArray(e)?ei().each(e,function(e){e.parent=r,r.children.push(e)}):(e.parent=r,r.children.push(e)),this.calculateChildren(),e},calculateProgress:function(){var e=this.percent;this.hasChildren()&&(e=lo(ei().map(this.children,(function(e,t){var n=this.childWeights[t];return e.percent/100*n}).bind(this)))),this._updateProgress(e)},_updateProgress:function(e){var t=this.percent;if((e=Math.round(e))>100&&(e=100),e<0&&(e=0),!(e<this.percent)){this.percent=e;var n=this.parent;if(null!==n){var r=n.percent;n.calculateProgress(),n.percent!==r&&n.trigger("change",n.percent)}e!==t&&this.trigger("change",e)}},setProgress:function(e){if(!this.destroyed){if(this.hasChildren())throw new ReadOnlyException("Progress objects with children can only be updated through child progress objects.");this._updateProgress(e),e>=100&&this.setComplete()}},setComplete:function(){this._updateProgress(100),this.destroy()},destroy:function(){this.destroyed||(this.hasChildren()&&(ei().each(this.children,function(e){e.parent=null,e.off(),e.setComplete()}),this.children=[],this.childWeights=[]),this.destroyed=!0)},takeProgress:function(e){if(100===e||0===e)throw Error("Can't be 0 or 100");var t=new li({weight:e}),n=new li({weight:100-e});return this.addChild([t,n]),t},getLastChild:function(){return this.hasChildren()?this.children.slice(-1).pop():this},reset:function(){this.destroyed=!1,ei().each(this.children,function(e){e.percent=0,e.trigger("progress",0)}),this.percent=0,this.trigger("process",0)}});function lc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lu(e){return function(e){if(Array.isArray(e))return la(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||lp(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lf(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function lp(e,t){if(e){if("string"==typeof e)return la(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return la(e,t)}}var ld=function(){throw Error("Method not implemented")},lh=function(){var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function")}return e=[{key:"requestFilesystem",value:function(){ld()}},{key:"initialize",value:function(){var e=this;return this.initialized&&this.resourceDir?aF().resolve(this.resourceDir):this.requestFilesystem().bind(this).tap(function(t){e.resourceDir=t,e.initialized=!0})}},{key:"getArchiveResources",value:function(e){return ll(function(){var t,n,r,o,i,a,s,l,c,u,f,p,d;return lf(this,function(h){switch(h.label){case 0:return[4,(t=new(lt())).loadAsync(e)];case 1:n=h.sent(),r=[],o=!0,i=!1,a=void 0,h.label=2;case 2:h.trys.push([2,7,8,9]),s=Object.entries(n.files)[Symbol.iterator](),h.label=3;case 3:var y;if(o=(l=s.next()).done)return[3,6];if(u=(c=function(e){if(Array.isArray(e))return e}(y=l.value)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(y)||lp(y,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],(f=c[1]).dir)return[3,5];return[4,t.file(f.name).async("blob")];case 4:p=h.sent(),r.push([u,p]),h.label=5;case 5:return o=!0,[3,3];case 6:return[3,9];case 7:return d=h.sent(),i=!0,a=d,[3,9];case 8:try{o||null==s.return||s.return()}finally{if(i)throw a}return[7];case 9:return[2,r]}})})()}},{key:"_unpackArchive",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new li,o=new(lt()),i=o.loadAsync(e);return aF().resolve(i).bind(this).then(function(e){var i=ei().keys(e.files);return 0===i.length?aF().reject(Error("No files in archive... nothing to do!")):aF().each(i,function(a,s){var l="/"===a[0]?a.slice(1):a;return aF().resolve().then(function(){var r=!1,i=e.files[a];return i.dir?n.getDirectory(l,!0,t).catch(function(){r=!0}).then(function(){if(r){var e=ei().compact(i.name.split("/"));return n.createDirsRecursively(t,e)}return aF().resolve()}):n.getFile(l,!1,t).then(function(e){return new(aF())(function(t,n){e.remove(t,n)})}).catch(function(){}).then(function(){return n.getFile(l,!0,t)}).catch(function(){r=!0}).then(function(e){if(r){var o=ei().compact(i.name.split("/")).slice(0,-1);return n.createDirsRecursively(t,o).then(function(){return n.getFile(l,!0,t)})}return e}).then(function(e){return aF().resolve(o.file(i.name).async("arraybuffer")).then(function(t){return new(aF())(function(n,r){e.createWriter(function(e){e.onerror=function(e){r(e)},e.onwriteend=function(){n()};var o=new Blob([t]);e.write(o)})})})})}).tap(function(){r.setProgress((s+1)/i.length*100)})})})}},{key:"_writeFile",value:function(e,t,n){var r=this;if(!n)throw Error("An output file name needs to be specified");var o=n.split(".").pop();return this.getFile(n,!1,t).then(function(e){return new(aF())(function(t,n){e.remove(t,n)})}).catch(function(){}).then(function(){return r.getFile(n,!0,t)}).then(function(t){return new(aF())(function(e,n){t.createWriter(e,n)}).then(function(i){return new(aF())(function(a,s){i.onwriteend=function(){r.getFileURL(t.fullPath).then(a).catch(s)},i.onerror=function(){s(Error("Failed to write file ".concat(n)))};var l=new Blob([e],{type:"image/"+o});i.write(l)})})})}},{key:"downloadToDir",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new li,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(){},s=new li({weight:50}),l=new li({weight:50});i.addChild([s,l]);var c=[t,r,o];return this.downloadResource.apply(this,lu([e].concat(lu(c),[s,a]))).then(function(e){return n.unpackResource.apply(n,lu([e].concat(lu(c),[l])))}).tap(function(){return i.setComplete()})}},{key:"downloadResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new li,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(){};return this.downloadAsArrayBuffer(e,o,i)}},{key:"unpackResource",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new li;return aF().resolve().then(function(){return r?n._unpackArchive(e,t,i):n._writeFile(e,t,o)}).tap(function(){return i.setComplete()})}},{key:"toURL",value:function(e){return e.toURL()}},{key:"getDirectory",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return null===e?aF().reject(Error("Path can not be null")):this.initialize().then(function(r){var o=r.root;return(n&&(o=n),ei().isEmpty(e))?o:new(aF())(function(n,r){o.getDirectory(e,{create:t,exclusive:!1},n,r)})})}},{key:"getFile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;return ei().isEmpty(e)?aF().reject(Error("Path must be a string with more than 0 characters")):this.initialize().then(function(r){var o=r.root;return n&&(o=n),new(aF())(function(n,r){o.getFile(e,{create:t},n,r)})})}},{key:"getMetadata",value:function(e){return new(aF())(function(t,n){e.getMetadata(t,n)})}},{key:"getFileURL",value:function(e){var t=this;return ei().isEmpty(e)?aF().reject(Error("Path must be a string with more than 0 characters")):this.initialize().then(function(){return t.getFile(e,!1)}).then(function(e){return t.toURL(e)})}},{key:"getDirectoryURL",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return ei().isEmpty(e)?aF().reject(Error("Path must be a string with more than 0 characters")):this.initialize().then(function(){return t.getDirectory(e,n)}).then(function(e){return t.toURL(e)+"/"})}},{key:"copyEntry",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return ei().isEmpty(e)?aF().reject(Error("entryFrom parameter must be a FileEntry")):ei().isEmpty(t)?aF().reject(Error("entryFrom parameter must be a DirectoryEntry")):this.initialize().then(function(){return new(aF())(function(n,r){t.getFile(e.name,{create:!0},n,r)})}).then(function(e){if(n)return new(aF())(function(t,n){e.remove(t,n)});throw Error("copyEntry failure: can't overwrite file if option not enabled")},function(){}).then(function(){return new(aF())(function(n,r){e.copyTo(t,e.name,n,r)})})}},{key:"deleteDirectory",value:function(e){var t=this;return ei().isEmpty(e)?aF().reject(Error("path parameter must be a string with more than 0 characters")):this.initialize().then(function(){return t.getDirectory(e)}).then(function(e){return new(aF())(function(t,n){e.removeRecursively(t,n)})}).catch(DOMException,function(){})}},{key:"deleteFiles",value:function(e,t){var n=this;return ei().isObject(e)&&"boolean"==typeof e.isDirectory?ei().isArray(t)?this.initialize().bind(this).return(t).map(function(t){var r="".concat(e.name,"/").concat(t);return n.getFile(r).catch(function(){})}).filter(function(e){return(void 0===e?"undefined":e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)=="object"}).each(function(e){return new(aF())(function(t,n){e.remove(t,n)})}):aF().reject(Error("`assetPathList` parameter must be an array of path strings")):aF().reject(Error("`directory` parameter must be a DirectoryEntry"))}},{key:"createDirsRecursively",value:function(e,t){var n=this,r=function(e,t){var o=t;return("."===o[0]||""===o[0])&&(o=o.slice(1)),n.getDirectory(o[0],!0,e).then(function(e){if(o.length-1)return r(e,o.slice(1))})};return this.initialize().bind(this).then(function(){return r(e,t)})}},{key:"urlExists",value:function(){ld()}},{key:"deleteDirRecursively",value:function(e){return this.initialize().then(function(){return new(aF())(function(t,n){e.removeRecursively(t,n)})}).catch(DOMException,function(){})}},{key:"nukeFileSystem",value:function(){var e=this;return navigator.webkitPersistentStorage?this.initialize().bind(this).then(function(){return e.getDirectory()}).then(function(e){var t=e.createReader();return new(aF())(function(e,n){t.readEntries(e,n)})}).map(function(e){return new(aF())(function(t,n){e.isDirectory?e.removeRecursively(t,n):e.remove(t,n)}).catch(function(e){if((null==e?void 0:e.code)!==DOMException.INVALID_MODIFICATION_ERR)throw e})}).tap(function(){e.initialized=!1,e.resourceURL=null}):aF().resolve()}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t,e),t}();lc(lh,"initialized",!1),lc(lh,"quota",1048576e3),lc(lh,"downloadAsArrayBuffer",aF().method(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new li,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};return ll(function(){var r,o,i,a,s,l,c,u,f,p,d;return lf(this,function(h){switch(h.label){case 0:return r={},A.jI.getURL()&&e.indexOf(A.jI.getURL())>-1&&Object.assign(r,A.Nj.headers),[4,fetch(e,{method:"HEAD",headers:r})];case 1:if(!(o=h.sent()).ok)throw Error("Download failed: ".concat(o.status));return i=parseInt(o.headers.get("Content-Length")||"0",10),[4,fetch(e,{headers:r})];case 2:if(!(a=h.sent()).ok)throw Error("Download failed: ".concat(a.status));if(a.body)return[3,4];return[4,a.blob()];case 3:return s=h.sent(),t.setComplete(),[2,s];case 4:l=a.body.getReader(),c=[],u=0,h.label=5;case 5:return[4,l.read()];case 6:if(p=(f=h.sent()).done,d=f.value,p)return[3,7];return c.push(d),n(u+=d.length,i),i>0&&t.setProgress(u/i*100),[3,5];case 7:return t.setComplete(),[2,new Blob(c)]}})})()}));function ly(e){return(ly=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function lv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(lv=function(){return!!e})()}function lb(e,t){return(lb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var lg=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=ly(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,lv()?Reflect.construct(e,t||[],ly(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&lb(n,e),t=[{key:"requestQuota",value:function(){var e=this;return new(aF())(function(t,n){navigator.webkitPersistentStorage.requestQuota(e.quota,t,n)})}},{key:"urlExists",value:function(e){return new(aF())(function(t){window.webkitResolveLocalFileSystemURL(e,function(){return t(!0)},function(){return t(!1)})})}},{key:"requestFilesystem",value:function(){return window.requestFileSystem=window.requestFileSystem||window.webkitRequestFileSystem,this.requestQuota().then(function(e){return new(aF())(function(t,n){window.requestFileSystem(window.PERSISTENT,e,t,n)})})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n,t),n}(lh);function lm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lw(e){return(lw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function lO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(lO=function(){return!!e})()}function lk(e,t){return(lk=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l_=["NOT_FOUND_ERR","SECURITY_ERR","ABORT_ERR","NOT_READABLE_ERR","ENCODING_ERR","NO_MODIFICATION_ALLOWED_ERR","INVALID_STATE_ERR","SYNTAX_ERR","INVALID_MODIFICATION_ERR","QUOTA_EXCEEDED_ERR","TYPE_MISMATCH_ERR","PATH_EXISTS_ERR"],lj=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=lw(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,lO()?Reflect.construct(e,t||[],lw(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&lk(n,e),t=[{key:"initialize",value:function(){return this.resourceDir=window.cordova.file.dataDirectory.replace("NoCloud/",""),new(aF())(function(e,t){window.requestFileSystem(window.PERSISTENT,0,e,function(e){t(Error("Cordova filesystem error while initializing: ".concat(l_[e.code-1])))})})}},{key:"convertFileEntryToUsableURL",value:function(e){return window.WkWebView?window.WkWebView.convertFilePath(e.toURL()):"ios"===window.cordova.platformId?e.toInternalURL():e.toURL()}},{key:"getFileURL",value:function(e){var t=this;return this.initialize().then(function(){return t.getFile(e,!1)}).then(function(e){return t.convertFileEntryToUsableURL(e)})}},{key:"urlExists",value:function(e){return new(aF())(function(t){window.resolveLocalFileSystemURL(e,function(){return t(!0)},function(){return t(!1)})})}},{key:"getDirectoryURL",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.initialize().then(function(){return t.getDirectory(e,n)}).then(function(e){return t.convertFileEntryToUsableURL(e)})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n,t),n}(lh);lm(lj,"resourceDir",""),lm(lj,"initialized",!0),lm(lj,"quota",null);let lS=window.location.href.startsWith("app://")?lj:lg;var lP=function(){throw Error("Method not implemented")};function lC(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function lx(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){lC(i,r,o,a,s,"next",e)}function s(e){lC(i,r,o,a,s,"throw",e)}a(void 0)})}}function lE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lT(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var lI=function(){var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function")}return e=[{key:"getUrlsFromObject",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.URL_REGEX,r=[];return!function e(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];ei().each(t,function(t,a,s){var l;(null!=(l=Array)&&"u">typeof Symbol&&l[Symbol.hasInstance]?!!l[Symbol.hasInstance](t):t instanceof l)?ei().each(t,function(t,l){"string"==typeof t&&n.test(t)?r.push({url:t,key:a,context:s,path:i.concat([l])}):e(t,o+1,i.concat([l]))}):ei().isObject(t)?e(t,o+1,i.concat([a])):n.test(t)&&r.push({url:t,key:a,context:s,path:i.concat([a])})})}(e),ei().uniqBy(r,"url")}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t,e),t}();lE(lI,"URL_REGEX",/^(http|https):.*\.(gif|png|jpg|jpeg|bmp|svg|webp)+(\?.*)?/i),lE(lI,"cache",aF().method(function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1],lx(function(){return lT(this,function(e){return lP(),[2]})})()})),lE(lI,"uncache",aF().method(function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1],lx(function(){return lT(this,function(e){return lP(),[2]})})()})),lE(lI,"cacheObject",aF().method(function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1],arguments.length>2&&void 0!==arguments[2]?arguments[2]:new li,lx(function(){return lT(this,function(e){return lP(),[2]})})()})),lE(lI,"uncacheObject",aF().method(function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1],arguments.length>2&&void 0!==arguments[2]?arguments[2]:new li,lx(function(){return lT(this,function(e){return lP(),[2]})})()}));var lR={},lD=function(){var e;function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"app",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.namespace=e,this.minimumSize=n,lR[e]?n>lR[e].minimumSize&&(lR[e].minimumSize=n):this._init()}return e=[{key:"_init",value:function(){lR[this.namespace]={minimumSize:this.minimumSize,store:{},keys:[]}}},{key:"setItem",value:function(e,t){if(this.isCached(e))this.removeItem(e);else if(lR[this.namespace].keys.length===lR[this.namespace].minimumSize){var n=lR[this.namespace].keys.shift();delete lR[this.namespace].store[n]}lR[this.namespace].store[e]=t,lR[this.namespace].keys.push(e)}},{key:"getItem",value:function(e){return this.isCached(e)?lR[this.namespace].store[e]:null}},{key:"removeItem",value:function(e){this.isCached(e)&&(lR[this.namespace].keys.splice(lR[this.namespace].keys.indexOf(e),1),delete lR[this.namespace].store[e])}},{key:"isCached",value:function(e){return!!lR[this.namespace].store[e]}},{key:"clear",value:function(){this.minimumSize=lR[this.namespace].minimumSize,this._init()}},{key:"length",get:function(){return lR[this.namespace].keys.length}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}(),lN=n(37869),lA=n.n(lN),lB=function(){var e;function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{memCache:!0};if(!(this instanceof t))throw TypeError("Cannot call a class as a function");if(this.db=lA().createInstance({name:e,storeName:"NamespacedCache"}),this.useMemoryCache=!1,n&&n.memCache){this.useMemoryCache=!0;var r=n.memCacheSize?n.memCacheSize:100;this.memoryCache=new lD(e,r)}}return e=[{key:"setItem",value:function(e,t,n){return this.useMemoryCache&&this.memoryCache.setItem(e,t),aF().resolve(this.db.setItem.apply(this.db,arguments))}},{key:"getItem",value:function(e,t){var n=this,r=arguments;if("function"==typeof t){var o=arguments;return this.useMemoryCache&&(o[1]=function(o,i){null!==i&&n.memoryCache.setItem(e,i),t.apply(self,r)}),aF().resolve(this.db.getItem.apply(this.db,o))}return aF().resolve(this.db.getItem.apply(this.db,arguments)).tap(function(t){n.useMemoryCache&&n.memoryCache.setItem(e,t)})}},{key:"removeItem",value:function(e,t){return this.useMemoryCache&&this.memoryCache.removeItem(e),aF().resolve(this.db.removeItem.apply(this.db,arguments))}},{key:"clear",value:function(e){return this.useMemoryCache&&this.memoryCache.clear(),aF().resolve(this.db.clear.apply(this.db,arguments))}},{key:"length",value:function(e){return aF().resolve(this.db.length.apply(this.db,arguments))}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}();let lF=(0,e7.tG)("filesystem");var lM=n(142),lL=n.n(lM);function lU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function lV(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function lz(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){lV(i,r,o,a,s,"next",e)}function s(e){lV(i,r,o,a,s,"throw",e)}a(void 0)})}}function l$(e){return(l$=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function lW(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function lK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(lK=function(){return!!e})()}function lq(e,t){return(lq=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lH(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return lU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lU(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lZ(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var lJ=new lB("filesystem"),lG=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=l$(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,lK()?Reflect.construct(e,t||[],l$(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&lq(n,e),t=[{key:"shaURL",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=lL()(e),r=n.slice(0,2),o=e.split("/").pop(),i=o.split(".");i[0]=i[0].replace(/[^\w\d\s]/g,""),i[1]=i[1].replace(/\?.*$/,"");var a=[r,n+"_"+(o=i.slice(0,2).join("."))];return t?a:a.join("/")}},{key:"getCachedPath",value:function(){return lz(function(){return lZ(this,function(e){return[2,lS.getDirectoryURL("cached",!0)]})})()}},{key:"getCachedDir",value:function(){return lz(function(){return lZ(this,function(e){return[2,lS.getDirectory("cached",!0)]})})()}},{key:"getCachedObject",value:function(e,t){var n=this,r=ei().clone(e),o=function(e){return ei().each(e,function(e,r,i){if(lW(e,Array))i[r]=o(e);else if(ei().isObject(e)&&!e.prototype)lW(e,window.File)||(i[r]=o(e));else if(lI.URL_REGEX.test(e)&&!/(_orig_)/g.test(r)){var a;i["_orig_".concat(r)]=e,e.includes("?")&&(a=e.split("?")[1]),i[r]=t+n.shaURL(e)+"?_=".concat(Number(new Date)).concat(a?"&".concat(a):"")}}),e};return o(r)}},{key:"cache",value:function(e){var t=this,n=e.slice(),r=n;if(A.jI.envs){var o=A.jI.envs.content_proxy_urls_allowed.map(function(t){return RegExp(t).test(e)});ei().some(o)&&(r="".concat(A.jI.getURL(),"proxy/?url=").concat(n))}if(lI.URL_REGEX.test(n)){var i=this.shaURL(e,!0),a=i.join("/"),s=lH(i,2),l=s[0],c=s[1];return lJ.getItem(a).then(function(e){return lz(function(){return lZ(this,function(t){switch(t.label){case 0:if(!e)return[3,2];return[4,lS.urlExists(e)];case 1:if(t.sent())return[2,e];t.label=2;case 2:return[2,this.getCachedDir().then(function(e){return lS.getDirectory(l,!0,e)}).then(function(e){return lS.downloadToDir(r,e,!1,c)}).then(function(e){return lJ.setItem(a,e)})]}})}).call(t)})}}},{key:"uncache",value:function(e){var t=this,n=e.slice();if(lI.URL_REGEX.test(n)){var r=this.shaURL(e,!0),o=r.join("/"),i=lH(r,2),a=i[0],s=i[1];return lJ.getItem(o).then(function(e){return e?t.getCachedDir().then(function(e){return lS.getDirectory(a,!1,e)}).then(function(e){return lS.getFile(s,!1,e)}).then(function(e){return new(aF())(function(t,n){e.remove(t,n)})}).then(function(){return lJ.removeItem(o)}):(lF.warn("Tried to remove url that hasn't been cached: ".concat(n)),aF().resolve())})}}},{key:"cacheObject",value:function(e){return lz(function(e){var t,n,r,o,i,a,s=arguments;return lZ(this,function(l){switch(l.label){case 0:return t=this,n=s.length>1&&void 0!==s[1]?s[1]:20,r=s.length>2&&void 0!==s[2]?s[2]:new li,o=this.getUrlsFromObject(e),i=0,[4,this.getCachedPath()];case 1:return a=l.sent(),[2,aF().map(o,function(e){return t.cache(e.url).catch(function(e){console.error(e)}).tap(function(){i++,r.setProgress((i+1)/o.length*100)},{concurrency:n})}).then(function(){return t.getCachedObject(e,a)}).catch(function(t){return lF.error(t),e}).tap(function(){r.setComplete()})]}})}).apply(this,arguments)}},{key:"uncacheObject",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new li,o=this.getUrlsFromObject(e),i=0;return aF().map(o,function(e){return t.uncache(e.url).tap(function(){i++,r.setProgress((i+1)/o.length*100)}).catch(DOMException,ei().noop)},{concurrency:n}).tap(function(){r.setComplete()})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n,t),n}(lI),lY=n(52835),lX=n(76652);function lQ(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function l0(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){lQ(i,r,o,a,s,"next",e)}function s(e){lQ(i,r,o,a,s,"throw",e)}a(void 0)})}}function l1(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function l2(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function l3(e,t){var n=l2(e,t,"get");return n.get?n.get.call(e):n.value}function l5(e,t,n){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return n}function l4(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function l6(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function l8(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var l9=new WeakMap,l7=new WeakSet,ce=function(){var e;function t(e){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");l1(this,l7),l7.add(this),l1(this,l9),l9.set(this,{writable:!0,value:void 0}),function(e,t,n){var r=l2(e,t,"set");if(r.set)r.set.call(e,n);else{if(!r.writable)throw TypeError("attempted to set read only private field");r.value=n}}(this,l9,e)}return e=[{key:"post",value:function(e){var t=e.message,n=e.url,r=e.encoding;ap.warn(".post() deprecated. Use .create(url, data, options) instead");var o={},i=n;if(i&&"/"===n[0]){var a=A.jI.getURL();i=lX.resolve(a,i),o=l5(this,l7,ct).call(this)}return(0,lY.qn)("POST",i).set(o).type(r||"json").send(t).then(function(e){return e.body||e.text})}},{key:"create",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request(e,"POST",l6(l4({},n),{data:t}))}},{key:"update",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request(e,"PUT",l6(l4({},n),{data:t}))}},{key:"partialUpdate",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request(e,"PATCH",l6(l4({},n),{data:t}))}},{key:"_shouldCacheGet",value:function(e){return!window.Bridge.Status.isOnline&&document.getElementById("spui")&&!navigator.serviceWorker.controller&&/[a-zA-Z0-9]+\.[a-zA-Z]+$/.test(e)}},{key:"get",value:function(e){return l0(function(e){var t,n,r=arguments;return l8(this,function(o){switch(o.label){case 0:if(t=r.length>1&&void 0!==r[1]?r[1]:{},!this._shouldCacheGet(e))return[3,2];return[4,lG.getCachedPath()];case 1:return n=o.sent()+lG.shaURL(e),[2,this.request(n,"GET")];case 2:return[2,this.request(e,"GET",t)]}})}).apply(this,arguments)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request(e,"DELETE",t)}},{key:"setHeaders",value:function(e){l3(this,l9).options.headers=e}},{key:"request",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},o=e,i=A.jI.getURL();i&&o.startsWith(i)&&(r=l5(this,l7,ct).call(this)),o&&"/"===o[0]&&(o=lX.resolve(i,o),r=l5(this,l7,ct).call(this));var a=(0,lY.qn)(t.toUpperCase(),o).set(r);return n.omitContentType||(a=a.type(n.encoding||"json")),n.data&&(a=a.send(n.data)),a.query(n.query).then(function(e){return e.body||e.text})}},{key:"availableSignatureBackends",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return l0(function(){var t,n;return l8(this,function(r){return t=l3(this,l9),n=e||t.Envs.get("contacts").map(function(e){return e.id}),[2,t.Request.get(t.Envs.get("server.api_resources.signing-available-backends"),{query:{user_id:t.Envs.get("user.id"),contact_ids:n}})]})}).call(this)}},{key:"requestSignature",value:function(e){return l0(function(e){var t,n,r,o,i,a,s,l,c,u,f,p,d,h=arguments;return l8(this,function(y){switch(y.label){case 0:if(r=void 0===(n=(t=h.length>1&&void 0!==h[1]?h[1]:{}).contactIDs)?null:n,i=void 0===(o=t.choicelist)?null:o,!e)return[2,Promise.reject(Error("Required arguments: signingBackend"))];return a=l3(this,l9),s=r||a.Envs.get("contacts").map(function(e){return e.id}),[4,a.Context.save()];case 1:if(!(c=null==(l=y.sent())?void 0:l.snapshot))return[2,Promise.reject(Error("Snapshot not returned in response"))];return f=(u=a.Envs.get("server.api_resources")).signingrequests,p=u.contacts,d={snapshot:c,signing_backend:e,signer_set:s.map(function(e){return{contact:"".concat(p).concat(e,"/")}})},i&&(d.choicelist=i),[2,this.create(f,d)]}})}).apply(this,arguments)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}();function ct(){var e,t,n;return null!=(e=null==(n=l3(this,l9))||null==(t=n.options)?void 0:t.headers)?e:A.Nj.headers}function cn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function cr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function co(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function ci(e){return function(e){if(Array.isArray(e))return cn(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return cn(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return cn(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ca=null;function cs(e){e[0].hasChanged=!e[0].hasChanged,ca.content=e}var cl=function(){var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function")}return e=[{key:"presentation",set:function(e){ca=e}},{key:"getArticleID",value:function(){var e=this.getArticle();return e&&e.length?e[0].id:null}},{key:"getArticle",value:function(){var e=D()('article[data-namespace="'.concat(window.Bridge.namespace,'"]'));return e.length?D()(e[0]):D()(".presoSlide.current article").first()}},{key:"updateSelections",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!window.Bridge.options.screenshotMode){var t=ca.getContentCopy(),n=["sections","slides"],r=!1;e.forEach(function(e){var o=e.path.toLowerCase(),i=ca.getCurrentDeck(),a=ca.getCurrentSection(),s=i?i.key:null,l=a?a.key:null,c=ei().template(o,{interpolate:/\{\{(.+?)\}\}/g})({deck:s,section:l}),u=c.split("/"),f="",p=function(e,t){var r=e.find(function(e){return e.key===u[t]});return r&&(f=f+(f?"/":"")+r.key,r&&(u.length!==t+1||f.toLowerCase()===c))?f===c?r:p(r[n[t]],t+1):null},d=p(t,0);d?(Object.keys(e).forEach(function(t){"path"!==t&&d[t]!==e[t]&&(r=!0,d[t]=e[t])}),e.updated=!0):ap.warn("Couldn't find slide ".concat(c," to update"))}),r&&cs(t)}}},{key:"getSections",value:function(){var e=ca.getContentCopy();return e&&e.length?e[0].sections:[]}},{key:"updateSections",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!window.Bridge.options.screenshotMode){var t=!1,n=ca.getContentCopy(),r=n[0],o=r.sections;ei().sortBy(e,"sequence").forEach(function(e,n){var r=o.find(function(t){return t.key===e.key});r&&((r.sequence!==n||r.visible!==e.visible)&&(t=!0,r.sequence=n,r.visible=e.visible),e.slides&&(ei().sortBy(e.slides,"sequence").forEach(function(e,n){var o=r.slides.find(function(t){return t.key===e.key});o&&(o.sequence!==n||o.visible!==e.visible)&&(t=!0,o.sequence=n,o.visible=e.visible)}),r.slides=ei().sortBy(r.slides,"sequence")))}),r.sections=ei().sortBy(o,"sequence"),t&&cs(n)}}},{key:"updateAdjunctSubslides",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!window.Bridge.options.screenshotMode){var n=ca.search(e);if(!n)return void ap.error("Could not find slide at path: ",e);n.subslides=ei().sortBy(t,"sequence"),cs(ca.getContentCopy()),window.Bridge.Sub.updateSubslides(n.path,t)}}},{key:"getSlide",value:function(e){var t=ei().cloneDeep(ca.search(e));return t||"{{deck}}"!==e?t:{}}},{key:"refreshCurrentSlide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};return window.Bridge.presenter.refreshCurrentSlide(e)}},{key:"getSlideList",value:function(){var e={section:null,slide:null,subslide:null};return ei().flattenDeep(ca.content.map(function(t){return[co(cr({},e),{url:t.url,visible:t.visible,deck:t.key})].concat(ci((t.sections||[]).map(function(n){return[co(cr({},e),{url:n.url,visible:n.visible,deck:t.key,section:n.key})].concat(ci((n.slides||[]).map(function(r){return[co(cr({},e),{url:r.url,visible:r.visible,deck:t.key,section:n.key,slide:r.key})].concat(ci((r.subslides||[]).map(function(o){return co(cr({},e),{url:o.url,visible:r.visible&&o.visible,deck:t.key,section:n.key,slide:r.key,subslide:o.key})})))})))})))}))}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}(),cc=null,cu=function(){var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.clientManager={},this._isOnline=!0,document.body.classList.add("online")}return e=[{key:"presentation",set:function(e){cc=e}},{key:"isOnline",get:function(){return this._isOnline},set:function(e){if(e!==this._isOnline){this._isOnline=e;var t=e?"online":"offline";document.body.classList.remove(e?"offline":"online"),document.body.classList.add(t),D()("#slideshow").trigger("connectionChanged",e),window.Bridge.Event.trigger(t)}}},{key:"isReadOnly",get:function(){return window.Bridge.options.readOnly}},{key:"getDeckInfo",value:function(){if(!cc||!cc.content.length)return{};var e=cc.content[0];return{deckTitle:e.title,deckKey:e.key,deckVersion:e.version}}},{key:"getVersionInfo",value:function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},window.getVersionInfo?window.getVersionInfo():{},this.getDeckInfo())}},{key:"printVersionInfo",value:function(){var e=window.printVersionInfo?window.printVersionInfo():"",t=this.getDeckInfo(),n={deckTitle:"Deck title",deckKey:"Deck key",deckVersion:"Deck version"};return ei().reduce(t,function(e,t,r){var o=n[r]||r;return"".concat(e,"\n").concat(o,": ").concat(t)},e)}},{key:"getClientStatus",value:function(){return ap.warn("getClientStatus function not set"),{}}},{key:"clear",value:function(){}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}(),cf=function(){var e;function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.parent=e,this.key=n,this.data=r,this._transitions={},this._animating=!1,this.default_transition_ms=500,this.init()}return e=[{key:"init",value:function(){this._transitions={in:this.default_in,out:this.default_out}}},{key:"el",get:function(){return this._el=D()("#"+this.parent+" #"+this.key).get(0)}},{key:"animating",value:function(e){this._animating=e,!this._animating&&window.Bridge&&Bridge.InternalEvent.trigger("subslide-ready",this.key)}},{key:"default_in",value:function(){var e=this;return D()(this.el).addClass("trans trans-in active"),this.animating(!0),setTimeout(function(){D()(e.el).removeClass("trans trans-in"),e.animating(!1)},this.default_transition_ms),this}},{key:"default_out",value:function(){var e=this;return D()(this.el).addClass("trans trans-out"),this.animating(!0),setTimeout(function(){D()(e.el).removeClass("active trans trans-out"),e.animating(!1)},this.default_transition_ms),this}},{key:"transitions",value:function(e){"in"in e&&(this._transitions.in=e.in),"out"in e&&(this._transitions.out=e.out)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}(),cp=n(91080),cd=n.n(cp),ch=function(){var e;function t(e){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this._namespaces={},this._bridge=e,this.bindable_events=["click","touch"],this._subslideTransitioning=aF().resolve()}return e=[{key:"consume",value:function(e){var t=this,n=D()("<div>".concat(e._originalContent,"</div>")),r=n.find("article"),o=n.find(".subslide-container"),i=r.attr("id"),a=!!o.length;if(this._namespaces[e.namespace]={path:e._slide.path,length:0,subslides:{},title:e.title,slide:e,allSubslides:e.subslides},n.find(".subslide").length||e.subslides&&e.subslides.length){if(e.subslides.some(function(e){return e.custom})){if(!a){var s=n.find("#subslide-1");s.attr("id","subslide-1"),s.attr("data-key","subslide-1"),s.addClass("subslide"),s.addClass("page01"),e.subslides.every(function(e){return e.custom})&&e.subslides.unshift({createdFromSlide:!0,sequence:0,title:"".concat(e.key,"_subslide_1"),visible:!0,key:"subslide-1"})}var l=D()("<div>".concat(e._originalContent,"</div>")).find(".subslide").length+1;cd().sortBy(e.subslides.filter(function(e){return e.custom}),"sequence").forEach(function(e){if(!e.createdFromSlide){var t=D()("<div>".concat(e.html_content,"</div>")),n=t.find(".subslide");if(e.visible){var i="subslide-".concat(l);n.attr("id",i);var s=l>9?"page".concat(l):"page0".concat(l);n.addClass(s),l++}else n.removeClass("subslide"),n.attr("id",null);n.attr("data-key",e.key),a?o.append(t.html()):r.append(t.html())}}),e._content=n.html()}var c=n.find(".subslide");c.each(function(n,r){var o=D()(r),a=o.attr("id"),s=o.attr("data-key"),l=new cf(i,a,s?e.subslides.find(function(e){return e.key===s}):e.subslides[n]);t._namespaces[e.namespace].subslides[a]=l}),this._namespaces[e.namespace].length=c.length,this._namespaces[e.namespace].length&&ap.warn("Subslides should only be used on a slide (not a section)")}}},{key:"updateSubslideNavigation",value:function(e){var t=D()("#".concat(e.key));if(t.length){var n=am(e._slide,["subslide_container","subslide-container"]),r=1;e.subslides.forEach(function(e){if(!n||!e.createdFromSlide){var o=t.find('[data-key="'.concat(e.key,'"]'));if(e.visible){var i="subslide-".concat(r++);o.attr("id",i),o.addClass("subslide")}else o.removeClass("subslide"),o.attr("id",null)}})}}},{key:"getContentKey",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!e)return null;var t=cd().find(this.subslides,function(t){return t.data&&t.data.key===e});return t?t.key:e}},{key:"getServerKey",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!e)return null;var t=cd().find(this.subslides,function(t){return t.key===e});return t&&t.data&&t.data.key?t.data.key:e}},{key:"setupSlide",value:function(e){if(this._bridge.namespace=e.namespace,this.slide.length&&(window.Bridge.Event.on("subslide:show",function(e){window.Bridge.presenter.changeSubslide(e)}),window.Bridge.options.interactionEnabled)){var t=D()("#".concat(e.key));cd().each(t.find("[data-br-role=transition]"),function(e){D()(e).on("click touch",function(){var t=D()(e).attr("data-br-target");window.Bridge.presenter.changeSubslide(t)})})}}},{key:"updateSubslides",value:function(e,t){var n,r=this;Object.keys(this._namespaces).forEach(function(t){r._namespaces[t].path===e&&(n=r._namespaces[t])}),n&&(n.slide.subslides=t,this.consume(n.slide),this.updateSubslideNavigation(n.slide))}},{key:"keys",value:function(){var e=this.slide,t=[];return e&&cd().each(e.subslides,function(e,n){t.push(n)}),t}},{key:"get",value:function(e){var t=this.slide;return("slide"!==t.slide._slide.type&&ap.warn("Subslides should only be used on a slide (not a section)"),e in t.subslides)?t.subslides[e]:(ap.error("SubSlide does not exist: ".concat(e)),null)}},{key:"getAllSubslideKeys",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(e=n?cd().find(this._namespaces,function(e){return e.path===n.path}):this.slide)?e.allSubslides.length?e.allSubslides.map(function(e){return t.getContentKey(e.key)}):Object.keys(e.subslides):[]}},{key:"current_subslide",get:function(){return this.currentSubslide}},{key:"currentSubslide",get:function(){return this.getSubslide(this.slide)}},{key:"getSubslide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!e)return null;var t=D()(".presoSlide.current .subslide.currentpage").attr("id");return e.length>0?t?e.subslides[t]:e.subslides["subslide-1"]:null}},{key:"slide",get:function(){return this._namespaces[this._bridge.namespace]}},{key:"length",get:function(){return this.slide.length}},{key:"subslides",get:function(){var e=this.slide;return e.length?e.subslides:{}}},{key:"nextSubslide",get:function(){var e=this.keys();if(e.length&&this.currentSubslide){var t=e.indexOf(this.currentSubslide.key),n=t+1<e.length?e[t+1]:null;if(n)return this.subslides[n]}return null}},{key:"process_target_key",value:function(e){if(cd()(["prev","next"]).includes(e)){var t=cd().indexOf(this.keys(),this.currentSubslide.key);return t+="prev"===e?-1:1,this.keys()[t]||null}return e}},{key:"place",value:function(e,t){var n=this.keys(),r=n.indexOf(e);return r+=t,this.get(n[r])}},{key:"subslideTransitioning",get:function(){return this._subslideTransitioning}},{key:"getSubslideForSlide",value:function(e){if(!Object.keys(this._namespaces).length)return null;var t=cd().find(this._namespaces,function(t){return t.path===e.path});return t&&this.namespace===t.slide.namespace?this.currentSubslide?this.currentSubslide.key:null:e.subslides&&e.subslides.length?"subslide-1":null}},{key:"show",value:function(e){window.Bridge.presenter.changeSubslide(e)}},{key:"_show",value:function(e,t){var n=this,r=this.process_target_key(e);r?this._subslideTransitioning=new(aF())(function(e){if(!t&&n.currentSubslide&&n.currentSubslide.key===r)return void e();try{var o=n.currentSubslide,i=n.get(r);t||(o.done=!1,cd().bind(o._transitions.out,o,i)()),cd().bind(i._transitions.in,i,o)(),i.done=!1,window.Bridge.InternalEvent.trigger("subslide:start",i);var a=function(t){t===r&&(window.Bridge.InternalEvent.off("subslide-ready",a),e())};window.Bridge.InternalEvent.on("subslide-ready",a)}catch(t){ap.error(t),e()}}):ap.warn("Tried to show nonexistent subslide",r)}},{key:"destroy",value:function(){this._namespaces={}}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}();function cy(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}var cv=new WeakMap,cb=function(){var e;function t(e){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");!function(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}(this,cv,{writable:!0,value:null}),function(e,t,n){var r=cy(e,t,"set");if(r.set)r.set.call(e,n);else{if(!r.writable)throw TypeError("attempted to set read only private field");r.value=n}}(this,cv,e)}return e=[{key:"overlay",get:function(){var e;return(e=cy(this,cv,"get"),e.get?e.get.call(this):e.value).presenter.element.find(".sp-presenter-overlay .current").get(0)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}();function cg(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function cm(e,t){var n=cg(e,t,"get");return n.get?n.get.call(e):n.value}function cw(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}function cO(e,t,n){var r=cg(e,t,"set");if(r.set)r.set.call(e,n);else{if(!r.writable)throw TypeError("attempted to set read only private field");r.value=n}return n}var ck={changed:"cmsValChanged"};function c_(e,t){return(0,ai.kU)(e,(0,ai.z)(t,e))}function cj(e){var t=ck[e];if(!t)throw Error('Bridge.CMSVals has no "'.concat(e,'" event. It has "').concat(Object.keys(ck).join('", "'),'".'));return t}var cS=new WeakMap,cP=new WeakMap,cC=function(){var e;function t(e){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");cw(this,cS,{writable:!0,value:null}),cw(this,cP,{writable:!0,value:null}),cO(this,cP,e)}return e=[{key:"presentation",set:function(e){cO(this,cS,e)}},{key:"getKeys",value:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.slidePath,o=void 0===r?null:r,i=o?cm(this,cS).search(o):cm(this,cP).presenter.getPresentation().current;if(!i)return ap.warn("Slide not found using slidePath: ",o),null;var a=(null==(e=i.key)?void 0:e.startsWith("template-"))?null==(t=i.template)?void 0:t.cmsvalkey_set:i.cmsvalkey_set;return a?a.map(function(e){return(0,ai.kU)(i,e)}):(ap.warn("No cmsvalkey_set found on slide: ",i.key,i),[])}},{key:"getFullKey",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.slidePath,r=void 0===n?null:n,o=r?cm(this,cS).search(r):cm(this,cP).presenter.getPresentation().current;if(!o)return ap.warn("Slide not found using slidePath: ",r),null;var i=c_(o,e);return this.getKeys({slidePath:r}).includes(i)?i:(ap.warn("Key '".concat(i,"' not in available keys: "),o.cmsvalkey_set),null)}},{key:"get",value:function(e){var t,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.slidePath,a=void 0===i?null:i,s=a?cm(this,cS).search(a):cm(this,cP).presenter.getPresentation().current;if(!s)return ap.warn("Slide not found using slidePath: ",a),null;var l=this.getFullKey(e,{slidePath:a});if(!l)return ap.warn("Key '".concat(c_(s,e),"' not in available keys: "),this.getKeys({slidePath:a})),null;var c=(null!=(t=cm(this,cS).dynamicContent)?t:[]).filter(function(e){return e.key===l});return null!=(n=null==(r=c[c.length-1])?void 0:r.value)?n:null}},{key:"set",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.slidePath,o=void 0===r?null:r,i=o?cm(this,cS).search(o):cm(this,cP).presenter.getPresentation().current;if(!i)return ap.warn("Slide not found using slidePath: ",o),null;var a=this.getFullKey(e,{slidePath:o});if(!a)return null;if("string"!=typeof t&&!function(e){try{var t=JSON.stringify(e);if(void 0===t)return!1;var n=JSON.parse(t);return ei().isEqual(e,n)}catch(e){return!1}}(t))throw ap.warn("Can't set CMSVal key '".concat(e,"' to value: "),t),Error("Error setting CMSVal '".concat(e,"' to non-serializable object. See warning above for details."));cm(this,cS).trigger("cmsValChanged",a,t,i,{origin:aE.DECK})}},{key:"on",value:function(e,t){cm(this,cS).on(cj(e),t)}},{key:"off",value:function(e,t){cm(this,cS).off(cj(e),t)}},{key:"canEditKey",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.slidePath,r=void 0===n?null:n,o=r?cm(this,cS).search(r):cm(this,cP).presenter.getPresentation().current;return o?this.getFullKey(e,{slidePath:r})?cm(this,cS).features.editable:(ap.warn("Key '".concat(c_(o,e),"' not in available keys: "),this.getKeys({slidePath:r})),!1):(ap.warn("Slide not found using slidePath: ",r),null)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}();function cx(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function cE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function cT(e,t,n){return t&&cE(e.prototype,t),n&&cE(e,n),e}var cI=new(function(){function e(){cx(this,e),this.presenter=null,this._namespace="bridge",this.InternalEvent=new a3,this.Event=new a2(this.InternalEvent),this.Navigation=new s7(this),this.Context=new sp(this),this.Feed=new sP,this.Sub=new ch(this),this.Status=new cu,this.Slides=new cl,this.Request=new ce(this),this.Lock=new sQ,this.Companywide=new a7(this),this.Envs=new sj,this.Editors=new sk,this.Editable=new sm,this.UI=new cb(this),this.CMSVals=new cC(this),this.Interface=new sZ(this),this._options={}}return cT(e,[{key:"namespace",get:function(){return this._namespace},set:function(e){this._namespace=e,this.Event.namespace=e,this.Sub.namespace=e}},{key:"presentation",set:function(e){this.Context.presentation=e,this.Feed.presentation=e,this.Navigation.presentation=e,this.Slides.presentation=e,this.Editable.presentation=e,this.Companywide.presentation=e,this.Envs.presentation=e,this.Status.presentation=e,this.Editors.presentation=e,this.CMSVals.presentation=e}},{key:"options",get:function(){return this._options},set:function(e){e.locks&&(this.Lock._locks=e.locks),this._options=e,this.Companywide.contentEditors=e.contentEditors}},{key:"destroy",value:function(){this.Sub.destroy(),this.Interface.destroy(),this.namespace=null,this.Event.destroy(),this.InternalEvent.destroy(),this._options=null,this.presentation=null,this.presenter=null}}]),e}()),cR=function(){function e(t){cx(this,e),this.namespace=t.namespace,this.Navigation=cI.Navigation,this.Feed=cI.Feed,this.Context=cI.Context,this.Event=cI.Event,this.Sub=cI.Sub,this.Status=cI.Status,this.Slides=cI.Slides,this.Request=cI.Request,this.Lock=cI.Lock,this.Companywide=cI.Companywide,this.CMSVals=cI.CMSVals,this.Envs=cI.Envs,this.UI=cI.UI,this.activate(),this.Sub.consume(t)}return cT(e,[{key:"activate",value:function(){cI.namespace=this.namespace}},{key:"removeNamespace",value:function(){this.Event.removeNamespace(this.namespace)}}]),e}();function cD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function cN(e){return function(e){if(Array.isArray(e))return cD(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return cD(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return cD(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var cA={next:{left:"100%",other:"prev"},prev:{left:"-100%",other:"next"}},cB={duration:400,easing:"ease"},cF=function(){var e;function t(e){var n;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");(n="overlay")in this?Object.defineProperty(this,n,{value:null,enumerable:!0,configurable:!0,writable:!0}):this[n]=null,this.loadedSuccessfully=!1,this.url=e.url,this._content=null,this._slide=e,this._$el=null,this._loading=null,this.id=ei().uniqueId(),this.namespace="slide-"+this.id,this._editableAreas=[],this._subslides=e.subslides&&e.subslides.length?e.subslides:e.subslide_set&&e.subslide_set.length?e.subslide_set:[],this.features={},this.title=e.title||this.namespace,this._buffering=null,window.Bridge.options.immediateTransitions&&(cB.duration=50)}return e=[{key:"subslides",get:function(){return this._subslides||[]},set:function(e){this._subslides=e}},{key:"$el",get:function(){return this._$el}},{key:"buffering",get:function(){return this._buffering}},{key:"hasBuffered",get:function(){return!!(this._buffering&&this._buffering.isFulfilled()&&this.loadedSuccessfully)}},{key:"loading",get:function(){return this._loading}},{key:"activate",value:function(e,t){var n,r=this;return this._$el=e,this.overlay=t,null==(n=e.get(0))||n.toggleAttribute("inert",!e.hasClass("current")),this._loading=this.buffer().then(function(){var e;if(null==(e=r.features.loadSlideCSS)||e)return r.loadCSS()}).then(function(){return r.initialize(),aF().resolve().then(function(){if(r._scripts)return aF().each(ei().values(r._scripts),function(e,t){var n=r.namespace+"-"+(t+1);return new(aF())(function(t){setTimeout(function(){try{var r,o;r="".concat(n,"-js"),(o=D()('script[data-id="'.concat(r,'"]'))).length>0&&aW(n),(o=document.createElement("script")).type="text/javascript",o.text=e,o.setAttribute("data-id",r),D()("head").append(o),aV.push(n)}finally{t()}},0)})})})}).finally(function(){return r.setContent()}),window.dispatchEvent(new Event("resize")),this._loading}},{key:"cancel",value:function(){this._buffering&&(this._buffering.cancel(),this._buffering=null)}},{key:"getCSSPath",value:function(){return!this._slide.css&&this._slide.html&&(this._slide.css=this._slide.html.split("/").slice(0,-1).join("/")+"/slide.css"),this._slide.css}},{key:"handleExternalLinks",value:function(e){return function(){e.find("a[target=_blank]").on("click",function(e){nw.Shell.openExternal(this.href),e.preventDefault()})}}},{key:"DOMTrigger",value:function(e){var t=this;if(!this.Bridge||!this._$el)return ap.warn("".concat(this.namespace," failed to trigger ").concat(e," on the DOM"),this),aF().resolve();this.Bridge.activate();var n=this._$el.find("article");if(!n||!n.length)return ap.warn("Could not find ".concat(n.attr("id")," to trigger ").concat(e," on the DOM"),this),aF().resolve();var r=D()._data(n.get(0));return r.events&&r.events[e]&&r.events[e].length?r.events[e].length>1?(ap.warn("Article should only have one event of each type. Found ".concat(r.events[e].length," of type '").concat(e,"'")),aF().resolve()):new(aF())(function(o){var i=function(){},a=!1,s=!0,l=!1,c=void 0;try{for(var u,f=r.events[e][Symbol.iterator]();!(s=(u=f.next()).done);s=!0)!function(){var t=u.value;t._origHandler||(t._origHandler=t.handler),t.handler=function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];try{t._origHandler.apply(t,cN(r))}catch(n){a=!0,o(),ap.error("Detected failure in '".concat(e,"' event"),n),t._origHandler.apply(t,cN(r))}}}()}catch(e){l=!0,c=e}finally{try{s||null==f.return||f.return()}finally{if(l)throw c}}if(r.events[e][0]._origHandler.length>=2){var p=setTimeout(function(){a||(ap.warn("Done method added to event, but it wasn't called."),o())},1e4);i=function(){clearTimeout(p),a||o()};try{t.triggerEvent(n,e,i)}catch(e){ei().defer(function(){throw e})}}else{try{t.triggerEvent(n,e)}catch(e){ei().defer(function(){throw e})}o()}}):(this.triggerEvent(n,e),aF().resolve())}},{key:"triggerEvent",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};this.Bridge.activate(),e.trigger(t,n),window.Bridge.Event.triggerDeckEvent(t,e.attr("id")),"slideready"===t&&window.nw&&ei().defer(this.handleExternalLinks(e))}},{key:"DOMTriggerSync",value:function(e){this.Bridge.activate();var t=this._$el.find("article");try{t.trigger(e),window.Bridge.Event.triggerDeckEvent(e,t.attr("id"))}catch(n){ap.error("Detected failure in '".concat(e,"' event"),t,n)}}},{key:"transition",value:function(e){var t=this;return this._$el?this._$el.hasClass("current")?this.DOMTrigger("slide:exiting").then(function(){return t.moveToSide(cA[e].other)}).tap(function(){return t.DOMTrigger("slide:exited")}):this._$el.hasClass(e)?this.DOMTrigger("slide:entering").then(function(){return t.moveToFront(e)}).tap(function(){return t.DOMTrigger("slide:entered")}):(this.deactivate(),aF().resolve()):(ap.warn("Attempted to transition a non-active slide",this),aF().resolve())}},{key:"moveToSide",value:function(e){var t=this;return new(aF())(function(n){aL()(t._$el.get(0),{left:cA[e].left},{duration:cB.duration,easing:cB.easing,progress:function(e){t.overlay&&t.overlay.css("left",D()(e).prop("style").left)},complete:function(){t._$el?(t._$el.removeClass("current swiper-slide-active").addClass(e),t._$el.get(0).toggleAttribute("inert",!0),t.overlay&&t.overlay.removeClass("current swiper-slide-active").addClass(e),t.setContent().finally(function(){n()})):n()}})})}},{key:"moveToFront",value:function(e){var t=this;return new(aF())(function(n){aL()(t._$el.get(0),{left:"0%"},{duration:cB.duration,easing:cB.easing,progress:function(e){t.overlay&&t.overlay.css("left",D()(e).prop("style").left)},complete:function(){t._$el&&(t._$el.removeClass(e).addClass("current swiper-slide-active"),t._$el.get(0).toggleAttribute("inert",!1),t.overlay&&t.overlay.removeClass(e).addClass("current swiper-slide-active")),n()}})})}},{key:"triggerClose",value:function(){this.DOMTriggerSync("slide:closed"),this.DOMTriggerSync("slideclosed")}},{key:"deactivate",value:function(){var e=this;if(!this._loading)return!1;null!==this._$el&&(this.triggerClose(),this._$el.empty(),this._$el=null),this.overlay&&this.overlay.empty(),this._scripts&&ei().each(this._scripts,function(t,n){aW(e.namespace+"-"+(n+1))}),this._loading=null}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}(),cM='<div class="slide-load-error">\n<div class="slide-load-error-wrapper">\n<div class="sp-material-icon sp-cloud-error">cloud_off</div>\n<p>An error occurred while loading the data for this slide.</p>\n<p>Please check your internet connection.</p>\n</div>\n</div>';function cL(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function cU(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cV(e,t,n){return(cV="u">typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=cz(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n||e):o.value}})(e,t,n||e)}function cz(e){return(cz=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c$=function(){return!!e})()}function cW(e,t){return(cW=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function cK(e,t){var n,r="".concat(e,"--").concat((0,ai.gy)(t));return null!=(n=window.Bridge.Context.get("_userTemplateCMSvals.".concat(r)))?n:window.Bridge.Context.get("_userTemplateCMSvals.".concat(t))}var cq=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=[e],r=cz(r),cU(t=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,c$()?Reflect.construct(r,o||[],cz(this).constructor):r.apply(this,o)),"handlePostMessage",function(e){var n;return(n=function(){var n,r,o,i,a,s,l,c,u,f,p,d,h,y;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(v){switch(v.label){case 0:if(t.attemptedYouTubeFixes>3||!e.origin.includes("youtube")||!(null==(n=window.chrome)?void 0:n.browsingData))return[2];if(r=t.$el.get(0),i=(o=JSON.parse(e.data)).event,a=o.info,"onError"!==i||153!==a)return[3,8];t.attemptedYouTubeFixes++,s=r.querySelectorAll("iframe"),l=!0,c=!1,u=void 0,v.label=1;case 1:v.trys.push([1,6,7,8]),f=s[Symbol.iterator](),v.label=2;case 2:if(l=(p=f.next()).done)return[3,5];if(!(d=p.value).src.includes("youtube"))return[3,4];return window.chrome.browsingData.removeCookies({origins:["https://www.youtube.com"]},function(){}),h=d.src,d.src="",[4,aF().delay(1e3)];case 3:v.sent(),d.src=h,v.label=4;case 4:return l=!0,[3,2];case 5:return[3,8];case 6:return y=v.sent(),c=!0,u=y,[3,8];case 7:try{l||null==f.return||f.return()}finally{if(c)throw u}return[7];case 8:return[2]}})},function(){var e=this,t=arguments;return new Promise(function(r,o){var i=n.apply(e,t);function a(e){cL(i,r,o,a,s,"next",e)}function s(e){cL(i,r,o,a,s,"throw",e)}a(void 0)})})()}),t.mimeType="text/html",t._dynamicImageFields=[],t._scripts=[],t._bridge=null,t.youtubePlayers=[],t._contentLoaded=!1,t._reactRootNode=null,t._originalContent=null,t.startObserver=ei().throttle(t.startObserver,10),t.attemptedYouTubeFixes=0,t}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&cW(n,e),t=[{key:"initialize",value:function(){this._content=this._originalContent.slice();var e=D()("<div>".concat(this._originalContent,"</div>"));this.key=e.find("article")[0].id,this.isolateScripts(),window.addEventListener("message",this.handlePostMessage)}},{key:"Bridge",get:function(){return this._bridge||(this._bridge=new cR(this)),this._bridge}},{key:"loadCSS",value:function(){return az(this.namespace,this.getCSSPath())}},{key:"isolateScripts",value:function(){var e=this,t=D()("<div>".concat(this._originalContent,"</div>"));t.length>1&&ap.warn("Slide ".concat(this.key," may have an error in its HTML tags"),t);var n=t.find("article")[0];if(n&&D()(n).attr("data-namespace",this.namespace),this._slide.createdByTemplate&&n){var r=D()(n).attr("id"),o=(0,ai.si)(this._slide,r);o!==r&&D()(n).attr("id",o)}D()(n).attr("data-presentation-key",this._slide.key),this._slide.path&&D()(n).attr("data-slide-path",this._slide.path),this._originalContent=t.html(),t.find("script").each(function(t,n){var r="\n function activateSlide".concat(e.id,"Script").concat(t+1,"() {\n ").concat(n.innerHTML,"\n }\n ");e._scripts.push(r)}),t.find("script").remove(),this._content=t.html()}},{key:"getPrepEditableID",value:function(e,t){var n,r=D()(e).attr("data-".concat(t));return"true"!==r&&!0!==r&&(n=r),n||(n=D()(e).attr("id")),n}},{key:"setupDataKey",value:function(e,t){var n=this,r=e.find("article").get(0);ei().each(e.find("[data-".concat(t,"]")),function(e){var o=n.getPrepEditableID(e,t);r&&D()(e).attr("data-editable-parent",D()(r).attr("id")),D()(e).attr("data-".concat(t),o)})}},{key:"fixEditables",value:function(e){var t=this;if(this._slide.custom||this._slide.createdByTemplate){var n=!this.fields,r=!0,o=!1,i=void 0;try{for(var a,s=["companywide-editable","companywide-dynamic-image","companywide-youtube-player","editable","dynamic-image"][Symbol.iterator]();!(r=(a=s.next()).done);r=!0)!function(){var r=a.value;e.find("[data-".concat(r,"]")).toArray().forEach(function(e){var o=D()(e).attr("data-".concat(r));if(o||(o=D()(e).attr("id"),D()(e).attr("data-".concat(r),o)),n){var i=r.includes("companywide-")?"everyone":"personal",a=(0,ai.tB)(t._slide,o,{channel:i});a!==o&&D()(e).attr("data-".concat(r),a)}})}()}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}ei().each(e.find("[data-editable]"),function(e){var n,r=t.getPrepEditableID(e,"editable"),o=null;(null==(n=t._slide.adjunct)?void 0:n.id)?o="-".concat(t._slide.adjunct.id):t._slide.autoAdjunctID&&(o="-".concat(t._slide.autoAdjunctID)),!o||(null==r?void 0:r.endsWith(o))||D()(e).attr("id","".concat(r).concat(o))})}for(var l=0,c=["editable","dynamic-image"];l<c.length;l++){var u=c[l];this.setupDataKey(e,u)}this.getCompanywideKeys(e)}},{key:"getCompanywideKeys",value:function(e){var t=function(t){return ei().map(e.find("[data-".concat(t,"]")),function(e){return D()(e).attr("data-".concat(t))})};this.companywideTextKeys=t("companywide-editable"),this.companywideImageKeys=t("companywide-dynamic-image"),this.companywideListKeys=t("companywide-dynamic-list"),this.companywideYoutubeKeys=t("companywide-youtube-player")}},{key:"modifyDomElements",value:function(e){var t=D()("<div>".concat(e,"</div>"));return this.fixEditables(t),t.html()}},{key:"addEditableContent",value:function(e){var t=this,n=D()("[data-editable]",e);if(0!==n.length&&!(this._editableAreas.length>0)){var r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){cU(e,t,n[t])})}return e}({slide:this},this.features);ei().each(n,function(e){var n=t.getPrepEditableID(D()(e),"editable");if(!n)return void ap.warn("Could not add editable controls to input with no id on slide ".concat(t.title));var o=D()(e).attr("data-editable-parent");r.id=n,r.parentID=o,t._editableAreas.push(new aq(r))})}}},{key:"addDynamicImageFields",value:function(e){var t=this,n=D()("[data-dynamic-image]",e);n.length&&ei().each(n,function(e){var n=t.getPrepEditableID(D()(e),"dynamic-image");if(n){var r=D()(e).attr("data-editable-parent");t._dynamicImageFields.push(new aK({slide:t,id:n,parentID:r}))}else ap.warn("Cannot attach image field to element with no id",e)})}},{key:"buffer",value:function(){var e=this;return this._buffering&&(this.hasBuffered||!this._buffering.isFulfilled()&&!this.loadedSuccessfully)||(this._buffering=new(aF())(function(t){D().ajax({url:e._slide.html,error:function(n){404===n.status?ap.error("Slide data for ".concat(e.namespace," not found (404)"),n):ap.error("Problem loading slide ".concat(e.namespace,", trying again"),n),t(!1)},success:function(n){e._content=n.slice(),e._originalContent=n.slice(),e.loadedSuccessfully=!0,t(!0)},dataType:"html",timeout:1e4,beforeSend:function(){}})}).then(function(t){return!!t||(e._content=cM,e._originalContent=cM,!1)})),this._buffering}},{key:"setContent",value:function(){var e=this;return this._$el?aF().resolve().then(function(){if(e.$el){e.Bridge.activate(),e.Bridge.removeNamespace(),e._contentLoaded&&(e._contentLoaded=!1,e._$el.find("article").length&&e.triggerClose()),e._editableAreas=[],e._dynamicImageFields=[],e._content=e.modifyDomElements(e._content),e.addEditableContent(e._content),e.addDynamicImageFields(e._content);var t=D()("<div class='presenter-content'>"+e._content+"</div>");t.find("script").remove(),e._$el.html(t),ei().each(e._scripts,function(t,n){var r="activateSlide"+e.id+"Script"+(n+1);if(window[r])try{window[r]()}catch(e){ap.error("The following error was thrown from an event inside the deck:\n\n",e)}}),e.Bridge.Sub.setupSlide(e),e.Bridge.Companywide.setContentKeys(e.namespace,t),e.showCompanywideContent(),(window.PdkConfig&&window.PdkConfig.screenshot_mode||window.Bridge.options.screenshotMode)&&e._$el.find("article").addClass("animation-complete"),e._contentLoaded=!0,e.showCustomContent();var n=e._$el.get(0);return e.observer&&e.observer.disconnect(),e.startObserver(n),aF().delay(0).then(function(){return e.DOMTrigger("sliderendered")})}}):aF().resolve()}},{key:"startObserver",value:function(){var e,t=this,n=null==(e=this._$el)?void 0:e.get(0);if(n){var r=["[data-companywide-editable]","[data-companywide-dynamic-image]","[data-companywide-youtube-player]","[data-editable]","[data-dynamic-image]"];this.observer=new MutationObserver(function(e){var n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done);n=!0)!function(){var e,n=a.value;!window.nw&&(null==(e=n.addedNodes[0])?void 0:e.nodeName)==="GRAMMARLY-EXTENSION"||r.flatMap(function(e){return Array.from(n.target.querySelectorAll(e))}).length&&(t.observer.disconnect(),t._dynamicImageFields=[],t._editableAreas=[],t.fixEditables(t._$el),t.addEditableContent(t._$el),t.addDynamicImageFields(t._$el),t.showCompanywideContent(),t.showCustomContent(),t.startObserver())}()}catch(e){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}});try{this.observer.observe(n,{attributeFilter:["companywide-editable","companywide-dynamic-image","companywide-youtube-player","dynamic-image","editable"],subtree:!0,childList:!0})}catch(e){ap.error("Failed to add observer to node",e)}}}},{key:"fields",get:function(){var e,t;return this._slide.path&&null!=(e=null==(t=this.openFields)?void 0:t.call(this,this._slide.path))?e:null}},{key:"showCustomContent",value:function(){this.showEditableContent(),this.showDynamicImages()}},{key:"showEditableContent",value:function(){if(this._editableAreas.length){var e=this.Bridge.Context.getPersistent(ai.Hm,{}),t=this.Bridge.Context.getNonPersistent(ai.Hm,{}),n=ei().extend({},t,e),r=this.Bridge.Context.getPersistent("editedContent",{}),o=this.Bridge.Context.getNonPersistent("editedContent",{}),i=ei().extend({},o,r);ei().each(this._editableAreas,function(e){e.display(n,i)}),this._$el.addClass("editable")}}},{key:"showDynamicImages",value:function(){if(this._dynamicImageFields.length){var e=this.Bridge.Context.getPersistent(ai.xk,{}),t=this.Bridge.Context.getNonPersistent(ai.xk,{}),n=ei().extend({},e,t);ei().each(this._dynamicImageFields,function(e){e.display(n)})}}},{key:"showCompanywideContent",value:function(){var e=this;if(this._$el){var t=this.Bridge.Companywide.getWithKeys(this.companywideTextKeys),n=this.Bridge.Companywide.getWithKeys(this.companywideImageKeys),r=this.Bridge.Companywide.getWithKeys(this.companywideYoutubeKeys),o=this._$el.find("[data-companywide-editable]"),i=this._$el.find("article").attr("id"),a=this.fields;ei().each(o,function(e){var n,r=D()(e);if(!e.contains(document.activeElement)){var o=r.attr("data-companywide-editable"),s=null==a?void 0:a.read({attribute:"data-companywide-editable",value:o}),l=null!=(n=cK(i,o))?n:t.find(function(e){return e.key===o}),c=(null==s?void 0:s.field)?s.value:null==l?void 0:l.value;if(null!=c){var u="string"==typeof c?c:function(e){try{return JSON.stringify(e)}catch(t){return e}}(c),f=D()("<div>".concat(u,"</div>"));r.text(""),r.append(f.contents())}r.text()||r.addClass("sp-companywide-empty")}});var s=this._$el.find("[data-companywide-dynamic-image]");ei().each(s,function(e){var t,r,o,s=D()(e),l=s.attr("data-companywide-dynamic-image"),c=null==a?void 0:a.read({attribute:"data-companywide-dynamic-image",value:l}),u="".concat(i,"--").concat((0,ai.gy)(l)),f=(null==(t=cK(i,l))?void 0:t.value)||(null==(r=window.Bridge.Context.get("dynamicImages.".concat(u)))?void 0:r.image)||(null==(o=n.find(function(e){return e.key===l}))?void 0:o.value),p=(null==c?void 0:c.field)?c.value:f;if(void 0!==s.attr("data-img"))aj(s,p);else if(p){var d=ak(s);s.css("background-image","url(".concat(p,")")),s.append(d)}s.toggleClass("sp-companywide-empty",!p)}),this.removeYoutubePlayers();var l=this._$el.find("[data-companywide-youtube-player]");ei().each(l,function(t){var n,o=D()(t),s=o.attr("data-companywide-youtube-player"),l=null==a?void 0:a.read({attribute:"data-companywide-youtube-player",value:s}),c=null!=(n=cK(i,s))?n:r.find(function(e){return e.key===s}),u=(null==l?void 0:l.field)?l.value:null==c?void 0:c.value;if(u&&!Array.from(document.body.classList).includes("edit-mode")){o.empty();var f=function(){e.Bridge.activate();var t="iframe-".concat(s);o.find("#".concat(t)).remove(),o.append("<div id='".concat(t,"'>"));var n=o.find("#".concat(t)),r=o.height(),i=o.width(),a=null,l=new window.YT.Player(n[0],{videoId:u,width:i,height:r,playerVars:{autohide:1,modestbranding:1,rel:0,fs:0,wmode:"opaque"}});window.Bridge.Event.on("overlayopened",function(){l&&(a=l.getPlayerState(),l.pauseVideo())}),window.Bridge.Event.on("overlayclosed",function(){setTimeout(function(){l&&1===a&&(l.playVideo(),a=0)},800)}),e.youtubePlayers.push(l)};window.YT?window.YT.ready(f):D().getScript("https://www.youtube.com/iframe_api").then(function(){window.YT.ready(f)})}else o.addClass("sp-companywide-empty")})}}},{key:"removeCSS",value:function(){return a$(this.namespace)}},{key:"removeYoutubePlayers",value:function(){this.youtubePlayers.forEach(function(e){e.destroy()}),this.youtubePlayers=[]}},{key:"deactivate",value:function(){var e=this;this.observer&&(this.observer.disconnect(),this.observer=null),window.removeEventListener("message",this.handlePostMessage),cV(cz(n.prototype),"deactivate",this).call(this),this.removeCSS(),this.removeYoutubePlayers(),ei().each(this._scripts,function(t,n){var r="activateSlide"+e.id+"Script"+(n+1);window[r]&&delete window[r]}),D()("#".concat("react-editable-root")).remove(),this._content=null,this._dynamicImageFields=[],this._scripts=[],this._bridge&&(this._bridge.removeNamespace(),this._bridge=null)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(cF),cH='<article class="sp-loader-article">\n<div class="slide-loading">\n<div class="sp-fixed-loading">\n <div class="sp-fixed-loading-first"></div>\n <div class="sp-fixed-loading-second"></div>\n</div>\n</div></article>';function cZ(e){return(cZ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function cJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(cJ=function(){return!!e})()}function cG(e,t){return(cG=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var cY=/.*\.png$/i,cX=/.*\.gif$/i,cQ=/.*\.(jpeg|jpg)$/i,c0=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e){var t,r,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=[e],r=cZ(r),t=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,cJ()?Reflect.construct(r,o||[],cZ(this).constructor):r.apply(this,o)),e.image.length>2083?t.mimeType="image/wtf":cY.test(e.image)?t.mimeType="image/png":cX.test(e.image)?t.mimeType="image/gif":cQ.test(e.image)&&(t.mimeType="image/jpeg"),t.styleElements=["background-size: contain;","background-repeat: no-repeat;","background-position: center;","background-color: #000;"],t}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&cG(n,e),t=[{key:"initialize",value:function(){this.Bridge=new cR(this)}},{key:"loadCSS",value:function(){}},{key:"buffer",value:function(){var e=this;return this._buffering&&(this.hasBuffered||!this._buffering.isFulfilled()&&!this.loadedSuccessfully)||(this._content=new Image,this._content.onload=function(){e.loadedSuccessfully=!0},this._content.src=this._slide.image,this._buffering=new(aF())(function(e){e(!0)})),this._buffering}},{key:"setContent",value:function(){var e,t=this;if(this.loadedSuccessfully)e=this.getSlideContent();else if(this._slide.image)try{var n=new Image;n.onload=function(){t.loadedSuccessfully=!0,t._$el.html(t.getSlideContent())},n.onerror=function(){t._$el.html(cM)},n.src=this._slide.image,e=cH}catch(t){e=cM,ap.error("Encountered error while setting image slide",t)}else e=cM;return this._$el.html(e),this.DOMTrigger("sliderendered")}},{key:"getSlideContent",value:function(){var e=this.styleElements.join(" ");return"<article style=\"background: url('".concat(this._slide.image,"'); ").concat(e,'"></article>')}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(cF),c1=/(.*\.(jpg|jpeg|gif|png)(\?.*)?$)|((data|blob)\:.*)/im,c2=/.*\.html$/,c3=n(27094);function c5(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c4(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function c6(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c5(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var c8={current:{},next:{left:"-100%",other:"prev"},prev:{left:"100%",other:"next"}},c9=500,c7=function(){var e;function t(e){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.windowDeps=[],this.changeContext=this.changeContext.bind(this),this.changeDynamicContent=this.changeDynamicContent.bind(this),e.immediateTransitions&&(c9=0),this.loading=null,this.loaded=!1,this.started=!1,this.openFields=null,this.presentation=null,this._currentPreso=null,this._updatedPreso=null,this.addDeckDependencies(),this._slides=[],this.refreshCurrent=!1,this._transitioning=aF().resolve()}return e=[{key:"addDeckDependencies",value:function(){window.Bridge||(window.Bridge=cI,this.windowDeps.push("Bridge")),window.moment||(window.moment=e1()),c3||(c3=window.$=D(),this.windowDeps.push("jQuery")),window.Logger||(window.Logger={log:function(e){ap.info(e)},info:function(e){ap.info(e)}},this.windowDeps.push("Logger")),window._!==cd()&&(window._=cd(),this.windowDeps.push("_")),window.requirejs||(window.requirejs=function(e){switch(e){case"moment":return e1();case"underscore":return cd();default:throw Error("This function has been deprecated. Use of moment and underscore are the only values allowed")}},this.windowDeps.push("requirejs"))}},{key:"addPresListeners",value:function(){var e=this;this.presoEventListeners=["change:flat","change:current"],this.presentation.on("change:current",function(){e._addProcess()}),this.presentation.on("change:flat",function(){e._addProcess()})}},{key:"_addProcess",value:function(){this.started&&(!this.processing||this.processing.isFulfilled())&&(this.processing=this.checkPresoForUpdates())}},{key:"_updateSlideshowContent",value:function(){var e=this;return aF().delay(0).then(function(){return e._transitioning}).then(function(){return e.currentChanged&&e._updatedPreso.search(e._currentPreso.current)?e._transition():aF().resolve()}).then(function(){return e.slidesChanged?e._updateContent():aF().resolve()}).then(function(){return e.currentChanged&&e._updatedPreso.search(e._currentPreso.current)?e._transition():aF().resolve()}).then(function(){return e.checkPresoForUpdates()})}},{key:"checkPresoForUpdates",value:function(){this._currentPreso.content=this.presentation.getContentCopy();var e=this._currentPreso.search(this.presentation.current);return(e&&(this._currentPreso.current=e),this.currentChanged||this.slidesChanged)?this._updateSlideshowContent():aF().resolve()}},{key:"slidesChanged",get:function(){return!!this._updatedPreso&&!!this._currentPreso&&!ei().isEqual(this._updatedPreso.keysList,this._currentPreso.keysList)}},{key:"currentChanged",get:function(){return!!this._updatedPreso&&!!this._currentPreso&&!ei().isEqual(this._updatedPreso.current.path_data,this._currentPreso.current.path_data)}},{key:"slides",get:function(){return this._slides}},{key:"slideTransitioning",get:function(){return aF().all([this._transitioning,this.processing])}},{key:"overlayContainerEl",get:function(){return this.slideContainer.closest("#presenter").find(".sp-presenter-overlay")}},{key:"overlays",get:function(){var e=this.overlayContainerEl;return{prev:e.find(".prev"),current:e.find(".current"),next:e.find(".next")}}},{key:"setElement",value:function(e){this.loaded=!1,this.element=e,this.slideContainer=this.element.find("#slideshow-slides")}},{key:"changeContext",value:function(){var e,t,n;window.Bridge&&(window.Bridge.Event.triggerDeckEvent("context:changed",window.Bridge.Context.getDict()),null==(t=this.findSlide(null==(n=this.presentation)?void 0:n.current))||null==(e=t.showCustomContent)||e.call(t))}},{key:"changeDynamicContent",value:function(){var e,t,n;null==(t=this.findSlide(null==(n=this.presentation)?void 0:n.current))||null==(e=t.showCompanywideContent)||e.call(t)}},{key:"setPresentation",value:function(e){if(this.loaded=!1,!e||!e.current)return ap.error("Cannot move to a slide that does not exist",e),aF().reject();window.Bridge.presentation=e,this.presentation=e,this.presentation.off("change:context",this.changeContext),this.presentation.on("change:context",this.changeContext),this.presentation.off("change:dynamicContent",this.changeDynamicContent),this.presentation.on("change:dynamicContent",this.changeDynamicContent);var t=e.getAttributes({props:!0});return this._currentPreso=new aT(t,"currentPreso"),this._updatedPreso=new aT(t,"updatedPreso"),this._transitioning=this._transition(),this._transitioning}},{key:"_transition",value:function(){var e=this,t=this._currentPreso,n=this._getTransType();return this._transitioning=aF().resolve().then(function(){return null===n?aF().resolve():"jump"===n?e._jumpTrans():e._sideTrans(n)}).then(function(){var n,r=e.findSlide(t.current);if(e._updatedPreso.current=t.current,e.started)return null==r||null==(n=r.DOMTrigger)?void 0:n.call(r,"slideready")}),window.Bridge.Navigation.allowNav(!0),this._transitioning}},{key:"_getTransType",value:function(){var e=this._currentPreso,t=null;if(e){var n=this._updatedPreso.next?this._updatedPreso.next.path_data:null,r=this._updatedPreso.prev?this._updatedPreso.prev.path_data:null;ei().isEqual(n,e.current.path_data)?t="next":ei().isEqual(r,e.current.path_data)?t="prev":ei().isEqual(this._updatedPreso.current.path_data,e.current.path_data)||(t="jump")}return t}},{key:"_sideTrans",value:function(e){var t=this,n=this._currentPreso,r=D()(".presoSlide.".concat(c8[e].other)),o=D()('<div class="presoSlide '.concat(e,'"></div>')),i=[];ei().each(c8,function(n,r){var o=t.findSlide(t._updatedPreso[r]);o&&i.push(o.transition(e))});var a=this.overlays[c8[e].other],s=D()("<div class='".concat(e,"'></div>"));return aF().all(i).then(function(){r.remove(),a.remove(),t.overlayContainerEl.append(s),t.slideContainer.append(o);var i=n[e];if(i)return t._setSlide(i,o)}).catch(function(e){ap.error("Transition error",e)})}},{key:"_jumpTrans",value:function(){var e=this,t=this._currentPreso,n=!1;return new(aF())(function(t){e.slideContainer.velocity("fadeOut",{duration:c9,complete:function(){t()}})}).then(function(){return ei().each(c8,function(t,n){e._updatedPreso[n]&&e._unsetSlide(e._updatedPreso[n])}),setTimeout(function(){n||e.showLoader()},1500),aF().each(ei().keysIn(c8),function(n){var r=t[n];return r?e._setSlide(r,e.element.find(".presoSlide.".concat(n))):aF().resolve()})}).then(function(){return n=!0,e.hideLoader(),new(aF())(function(t){e.slideContainer.velocity("fadeIn",{duration:c9,complete:function(){t()}})})})}},{key:"_initialTrans",value:function(){var e=this,t=this._currentPreso;return aF().each(ei().keysIn(c8),function(n){var r=t[n];return r?e._setSlide(r,e.element.find(".presoSlide.".concat(n))):aF().resolve()}).then(function(){return e.processing=e.checkPresoForUpdates(),e.processing}).then(function(){return new(aF())(function(t){e.slideContainer.velocity("fadeIn",{duration:1,complete:function(){t()}})})})}},{key:"_setSlide",value:function(e,t){if(ei().isUndefined(e)||null===e)return aF().resolve();var n=this.findSlide(e),r=null;if(n)if(n._slide===this.presentation.current||t.hasClass("current"))r="current";else if(n._slide===this.presentation.prev||t.hasClass("prev"))r="prev";else{if(!(n._slide===this.presentation.next||t.hasClass("next")))return aF().reject("Failed to figure out overlay");r="next"}return null==n?void 0:n.activate(t,this.overlays[r])}},{key:"_unsetSlide",value:function(e){if(ei().isUndefined(e)||null===e)return!1;var t=this.findSlide(e);t?t.deactivate():ap.warn("Slide to be unset not found",e)}},{key:"_updateSlides",value:function(e){var t=this,n=this._currentPreso,r=this._slides||[],o=r.map(function(e){var t;return null!=(t=null==e?void 0:e._slide.path)?t:null}),i=e.map(function(e){return e.path});if(!ei().isEqual(o,i)){var a=[],s=!0,l=!1,c=void 0;try{for(var u,f=o.entries()[Symbol.iterator]();!(s=(u=f.next()).done);s=!0){var p=c6(u.value,2),d=p[0],h=p[1],y=i.indexOf(h);if(-1===y){r[d]?r[d].deactivate():ap.warn("Could not find slide at index ".concat(d));continue}a[y]=r[d]}}catch(e){l=!0,c=e}finally{try{s||null==f.return||f.return()}finally{if(l)throw c}}var v=!0,b=!1,g=void 0;try{for(var m,w=i.entries()[Symbol.iterator]();!(v=(m=w.next()).done);v=!0){var O=c6(m.value,2),k=O[0],_=O[1];if(!o.includes(_)){if(a[k]=function(e){if(e){if(e.html&&!(e.html.length>2083)&&c2.test(e.html))return new cq(e);if(e.image&&e.image.length>2083?"data"===e.image.substr(0,4):c1.test(e.image))return new c0(e)}return null}(e[k]),!a[k]){ap.error("Slide could not be created",e[k]);continue}a[k].features=n.features,a[k].openFields=function(e){var n,r;return null!=(n=null==(r=t.openFields)?void 0:r.call(t,e))?n:null}}}}catch(e){b=!0,g=e}finally{try{v||null==w.return||w.return()}finally{if(b)throw g}}this._slides=a}}},{key:"_updateContent",value:function(){var e=this,t=this._transitioning,n=this._currentPreso,r=n.current.requireRefresh||this._updatedPreso.current&&this._updatedPreso.current.requireRefresh,o=this.findSlide(n.current);return this._transitioning=new(aF())(function(i){return t.then(function(){var t=e._updatedPreso;return ei().each(c8,function(n,o){t[o]&&("current"!==o||r&&e.refreshCurrent)&&e._unsetSlide(t[o])}),e._updateSlides(n.flat),aF().map(ei().keysIn(c8),function(t){var o=n[t];return o&&("current"!==t||r&&e.refreshCurrent)?e._setSlide(o,e.element.find(".presoSlide.".concat(t))):aF().resolve()},{concurrency:1})}).then(function(){setTimeout(function(){if(o&&(window.Bridge.namespace=o.namespace,r&&e.refreshCurrent))try{e.started&&o.DOMTrigger("slideready")}catch(e){ap.error(e)}e._updatedPreso.content=e._currentPreso.getContentCopy(),i()},0)})}),this._transitioning}},{key:"_attachCommon",value:function(){if(!this.presentation)throw Error("Cannot attach common JS/CSS with no presentation");D()(document).off("deckready");var e=this.presentation.content[0],t=this.presentation.common[e.key];if(!t)return void ap.warn("Common CSS/JS not found",e);var n=[];return window.deckBaseURL=t.baseURL,ei().each(t.js,function(r,o){n.push(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.importModule,o=void 0===r?A.dI:r,i=n.prepareClassicDeck,a=void 0===i?A.he:i;return(0,A.ix)(t)?o("".concat(t,"?_=").concat(Date.now())).catch(function(e){ap.error("Deck module could not be loaded.",e)}):a().catch(function(e){ap.error("SystemJS could not be loaded for an older deck.",e)}).then(function(){var n,r,o,i;return n=e,r=t,o="".concat(n,"-js"),D()('script[data-id="'.concat(o,'"]')).length>0&&aW(n),(i=document.createElement("script")).type="text/javascript",i.src="".concat(r,"?_=").concat(Date.now()),i.setAttribute("data-id",o),new(aF())(function(e){D().ajax({url:i.src,dataType:"script",cache:!0,success:function(){e()},error:function(t,r,o){ap.error("Deck JS could not be loaded.",o),D()("head").append(i),aV.push(n),e()}})})})}(e.key+o,t.baseURL+r))}),ei().each(t.css,function(r,o){n.push(az(e.key+o,t.baseURL+r))}),aF().all(n).then(function(){window.Bridge&&(window.Bridge.Event.triggerDeckEvent("deckready"),D()(document).trigger("deckready"))})}},{key:"findSlide",value:function(e){if(!e)return null;var t,n="string"==typeof e?e:null!=(t=e.path)?t:null;return null===n?null:ei().find(this._slides,function(e){return(null==e?void 0:e._slide.path)===n})}},{key:"preloadSlides",value:function(){var e=this,t=0,n=0===this.presentation.index,r=!0,o=function(){t++,r&&(t<e.slides.length?i():n?r=!1:(n=!0,t=0,i()))},i=function(){var n=e.slides[t];n?n.hasBuffered?o():setTimeout(function(){e._transitioning.then(function(){return n.buffer()}).then(function(t){t?o():e.haltBuffering()})},2e3):o()};this.haltBuffering=function(){if(r){var n;r=!1,null==(n=e.slides[t])||n.cancel()}},i()}},{key:"showLoader",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500,t=this.element.find("#sp-slide-loader-container");t.length||(t=D()('<div id="sp-slide-loader-container" style="display: none; opacity: 0;">'.concat(cH,"</div>")),this.element.append(t)),t.velocity("fadeIn",{duration:e})}},{key:"hideLoader",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500,t=this.element.find("#sp-slide-loader-container");t.length&&t.velocity("fadeOut",{duration:e})}},{key:"refreshCurrentSlide",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},n=this._currentPreso;return this.showLoader(500),aF().delay(500).then(function(){return e._unsetSlide(n.current),t(),e._setSlide(n.current,D()(".presoSlide.current"))}).then(function(){return e.hideLoader(500),aF().delay(500).then(function(){if(e.started){var t,r=e.findSlide(n.current);null==r||null==(t=r.DOMTrigger)||t.call(r,"slideready")}})})}},{key:"changeSlide",value:function(e){return this.presentation.gotoSlide(this.presentation[e]||e)}},{key:"init",value:function(){var e;return(e=function(){var e;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:e=this,t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this._updateSlides(this.presentation.flat)];case 2:case 3:return t.sent(),[3,4];case 4:if(!this.element)return[2,aF().reject("SlideShow started without an attached element")];if(!this.presentation&&!this._transitioning)return[2,aF().reject("SlideShow started without a presentation")];if(0===this._slides.length)return[2,aF().reject("SlideShow started with no slides")];return this.loading=this._transitioning.then(function(){return 0===e._slides.length?aF().reject("SlideShow started with no slides"):(e.addPresListeners(),e._attachCommon())}).then(function(){return e._initialTrans()}).tap(function(){e.loaded=!0}),[2,this.loading]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){c4(i,r,o,a,s,"next",e)}function s(e){c4(i,r,o,a,s,"throw",e)}a(void 0)})}).call(this)}},{key:"start",value:function(){var e=this,t=this.loading;return(!this.loading||this.loading.isResolved()&&!this.loaded)&&(t=this.init()),t.then(function(){e.started=!0;var t,n=e.findSlide(e._currentPreso.current);return null==n||null==(t=n.DOMTrigger)?void 0:t.call(n,"slideready")})}},{key:"destroy",value:function(){var e=this;this.started=!1,this.haltBuffering&&this.haltBuffering(),ei().each(c8,function(t,n){var r=e.findSlide(e._currentPreso[n]);r&&r.deactivate()}),this._slides=[],window.Bridge&&(window.Bridge.InternalEvent.trigger("deck:closed"),window.Bridge.Event.triggerDeckEvent("deck:closed")),this.presentation.destroy(),window.Bridge&&window.Bridge.destroy(),ei().each(this.windowDeps,function(e){delete window[e]}),ei().each(aU,function(e){a$(e)}),aU=[],ei().each(aV,function(e){aW(e)}),aV=[]}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}();function ue(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function ut(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){ue(i,r,o,a,s,"next",e)}function s(e){ue(i,r,o,a,s,"throw",e)}a(void 0)})}}function un(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var ur="\n This deck has an interface, so the presenter needs one to read and write its\n fields. Build it with createPresentationInterface from @livepreso/presenter\n and pass deckInterface and resolveTarget.\n".trim().replace(/\s+/g," "),uo=[404,403],ui="Transform",ua="moz ms o webkit".split(" "),us=window,ul=us.getComputedStyle,uc=document;function uu(e){return e.toUpperCase()}function uf(e){if(!P)for(var t,n=us.getComputedStyle(uc.body),r=0,o=ua.length;r<o&&!((P=ua[r])+ui in n||(P=P.replace(/^(\w)/,uu))+ui in n);r++);return P+e}function up(e){return function(t,n){return function(e,t){var n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],r=function(e){var t=ul(e)[uf(ui)].replace(/[a-z()]/gi,"").split(",");if(t.length<6)return[1,0,0,1,0,0];for(var n=0;n<16;n++)n<t.length&&(t[n]=parseFloat(t[n]));return t}(t);r[0]=e.scale,r[3]=e.scale,r[4]+=e.tx,n&&(r[5]+=e.ty);var o=r.map(function(e){return e.toFixed(6)}).slice(0,6);t.style[uf("TransformOrigin")]="0 0",t.style[uf(ui)]="matrix(".concat(o.join(","),")")}(t,n,e)}}var ud=n(37395),uh=n.n(ud),uy=a9.map(function(e){return"[".concat(e,"]")}).join(","),uv="script, style, noscript, template, .subslide:not(.currentpage)";function ub(e,t){for(var n=[],r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),o=r.nextNode();o;o=r.nextNode()){var i=o.parentElement;if(!(t&&i.closest(t)||i.closest(uv))){var a=o.textContent.replace(/\s+/g," ").trim();a&&n.push(a)}}return n.join("\n")}function ug(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function um(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uw(e){return(uw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function uO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(uO=function(){return!!e})()}function uk(e,t){return(uk=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u_={height:768,width:1024},uj=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(this instanceof n))throw TypeError("Cannot call a class as a function");e=uw(e=n),um(t=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,uO()?Reflect.construct(e,[],uw(this).constructor):e.apply(this,void 0)),"handleSwipe",function(e){if(!D()(":focus").attr("data-companywide-editable")&&!D()(e.target).parents(".sp-presenter-toolbar").length&&1===t.pinchPanManager.scale){var n="touch"===e.pointerType?e.pointers[0]:e.srcEvent,r=document.elementFromPoint(n.clientX-e.deltaX,n.clientY-e.deltaY),o=D()(r);if(!(o.is("input, select, option, textarea")||o.hasClass("interactive")||o.closest(".interactive").length)&&!t.navigationDisabled)switch(e.type){case"swipeup":t.isPortrait||t.changeSubslide("next");break;case"swipedown":t.isPortrait||t.changeSubslide("prev");break;case"swipeleft":t.canNavigate()&&t.changeSlide("next");break;case"swiperight":t.canNavigate()&&t.changeSlide("prev")}}}),um(t,"handleTap",function(e){"touch"!==e.pointerType&&t.toggleNavigationWrapper(!1)}),um(t,"onMouseActivity",function(){t.toggleNavigationWrapper(!0),t.updateMouseMoveTimeout()}),um(t,"onTouchActivity",function(){t.element.find(".sp-pagination-wrapper").hasClass("visible")&&t.updateMouseMoveTimeout()}),um(t,"onKeyDown",function(e){116===e.keyCode&&e.preventDefault()}),um(t,"onKeyUp",function(e){var n=document.activeElement;if("INPUT"!==n.tagName&&"text"!==n.type&&!t.navigationDisabled){var r=cI.Sub.subslideTransitioning&&!cI.Sub.subslideTransitioning.isFulfilled();if(!t.slideshow.slideTransitioning.isFulfilled()||r)return void ap.warn("Current slide hasn't finished loading yet");var o=D()(n),i=o.is("input, select, option, textarea")||o.hasClass("interactive")||!!o.closest(".interactive").length;switch(e.keyCode){case 40:case 66:if(i||t.isPortrait)return;t.changeSubslide("next");break;case 34:case 39:if(!t.canNavigate()||i)return;t.changeSlide("next");break;case 37:case 33:if(!t.canNavigate()||i)return;t.changeSlide("prev");break;case 38:case 116:if(i||t.isPortrait)return;t.changeSubslide("prev");break;default:return}}}),um(t,"onKeyboardPress",function(e){t.onKeyUp(e)}),t.ro=null,cI.presenter=t,t.changingSlide=!1,t._fitScale=null,t.whenStarted=new(aF())(function(e){t._markStarted=e}),t.navigationDisabled=!1;var o=ei().defaults(r,{navigationEnabled:!0,interactionEnabled:!0,keyboardEnabled:!!ei().isUndefined(r.interactionEnabled)||r.interactionEnabled,swipingEnabled:!1,scaleLesser:!1,scaleGreater:!1,supportMode:!1,preloadSlides:!0,screenshotMode:!1,previewMode:!1,dimensions:u_,immediateTransitions:!1,verticalAlign:!1,readOnly:!1,contentEditors:null,allowShareEditorChange:!1,allowEditableImages:!1,headers:null});o.dimensions||(o.dimensions=u_),cI.options=t.options=o;var i=o.interactionEnabled,a=o.keyboardEnabled,s=o.element,l=o.presentation,c=o.dimensions;return t.width=c.width,t.height=c.height,t.isPortrait=t.height>t.width,t.slideshow=new c7(o),i&&a&&(D()(document).on("keydown",t.onKeyDown),D()(document).on("keyup",t.onKeyUp)),s&&t.setElement(s),l&&t.setPresentation(l),t.pinchPanManager=new aA,t.pinchPanManager.addListeners(D()(".sp-presentation-container").get(0)),t.setReadOnlyClass(t.options.readOnly),t.setOverscrollBehavior(!0),setTimeout(function(){t.updateScaling()},0),t}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&uk(n,e),t=[{key:"updateHeaders",value:function(e){cI.options.headers=e}},{key:"init",value:function(){var e=this,t=!(arguments.length>0)||void 0===arguments[0]||arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.loading=aF().resolve(function(e){return ut(function(e){var t,n,r,o,i;return un(this,function(a){switch(a.label){case 0:if(t=e.bridge,n=e.presentation,r=e.deckInterface,o=e.resolveTarget,!r)return[3,2];return[4,r.tools.list_targets({})];case 1:if((null==(i=a.sent().refused)?void 0:i.code)==="no-interface")return[2,null];return t.Interface.configure({deckInterface:r,resolveTarget:o}),[2,function(e){return(0,ai.XF)(r,o(e))}];case 2:var s,l,c,u;return[4,(0,ai.zM)((l=(s=n).content[0],c=s.common[l.key].baseURL,u=ei().once(function(){var e;return e="".concat(c,"interface.index.json"),ut(function(){var t,n;return un(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,fetch(e)];case 1:return t=r.sent(),[3,3];case 2:var o,i;if(o=n=r.sent(),null!=(i=TypeError)&&"u">typeof Symbol&&i[Symbol.hasInstance]?!!i[Symbol.hasInstance](o):o instanceof i)return[2,null];throw n;case 3:if(uo.includes(t.status))return[2,null];if(!t.ok)throw Error("Could not fetch ".concat(e,": ").concat(t.status));return[2,t.json()]}})})()}),(0,ai.Eq)({readIndex:u,importTarget:function(e){return ut(function(){var t,n,r;return un(this,function(o){switch(o.label){case 0:return[4,u()];case 1:var i;if(!(null==(r=null==(n=o.sent())||null==(t=n.targets)?void 0:t.find(function(t){return t.key===e}))?void 0:r.hasInterface))throw Error('This deck has no interface module for "'.concat(e,'".'));return[2,import((i=r.path,"".concat(c).concat([i,"interface.js"].filter(Boolean).join("/"))))]}})})()}})))];case 3:if(a.sent())throw Error(ur);return[2,null]}})}).apply(this,arguments)}({bridge:cI,presentation:this.slideshow.presentation,deckInterface:this.options.deckInterface,resolveTarget:this.options.resolveTarget})).then(function(t){return e.slideshow.openFields=t,e.slideshow.slideTransitioning}).then(function(){return e.slideshow.init(n)}).then(function(){return t?e.start():aF().resolve()}),this.loading}},{key:"start",value:function(){var e=this;return n.isPresenting=!0,this.slideshow.start().then(function(){e._markStarted();var t=e.slideshow.presentation.current;e.emitSlideChangeEvent(t),e.onSubslideChange("begin"),e.options.preloadSlides&&setTimeout(function(){e.slideshow&&e.slideshow.preloadSlides()},4e3)})}},{key:"updating",get:function(){return this.slideshow.slideTransitioning}},{key:"transitioning",get:function(){var e=this;return this.slideshow.slideTransitioning.isFulfilled()&&cI.Sub.subslideTransitioning.isFulfilled()?aF().resolve():aF().delay(0).then(function(){return aF().all([e.slideshow.slideTransitioning,cI.Sub.subslideTransitioning])})}},{key:"setOverscrollBehavior",value:function(e){var t=e?"none":"";document.documentElement.style.overscrollBehavior=t,document.body.style.overscrollBehavior=t}},{key:"setReadOnlyClass",value:function(e){var t=document.body;t&&(e?t.classList.add("preso-readonly"):t.classList.remove("preso-readonly"))}},{key:"updateReadonlyStatus",value:function(e){e!==this.options.readOnly&&(this.options.readOnly=e,this.setReadOnlyClass(e),window.Bridge&&(window.Bridge.Event.trigger("preso-readonly",e),window.Bridge.Event.triggerDeckEvent("preso-readonly",e)))}},{key:"canNavigate",value:function(){return this.options.navigationEnabled&&!D()(".current.editing").length}},{key:"setPresentation",value:function(e){var t=this;e&&(this.slideshow.setPresentation(e),this.slideshow.presentation.on("change:index",function(){setTimeout(function(){t.transitioning.then(function(){t.emitSlideChangeEvent(t.slideshow.presentation.current),t.onSubslideChange()})},0)}),this.setUpEnvironment())}},{key:"setElement",value:function(e){e&&(this.element=e[0]?e:D()(e),this.element.append('\n <div class="sp-presentation-container">\n <div class="sp-presenter-overlay">\n <div class="prev"></div>\n <div class="current swiper-slide-active"></div>\n <div class="next"></div>\n </div>\n <div class="scaling">\n <div class="slideshow-container">\n <div class="slideshow" id="slideshow" style="width: '.concat(this.width,"px; height: ").concat(this.height,'px; transform: matrix(1,0,0,1,0,0);">\n <div id="slideshow-slides">\n <div class="presoSlide prev"></div>\n <div class="presoSlide current swiper-slide-active"></div>\n <div class="presoSlide next"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n ')),this.element.addClass("sp-presenter-specific-styles"),this.isPortrait&&!this.options.previewMode&&this.element.addClass("sp-presenter-portrait-sidebars"),this.isPortrait&&this.element.addClass("sp-presenter-portrait"),this.options.supportMode&&this.element.find("#slideshow").append('<div class="internal-only"></div>'),this.options.reviewMode&&this.element.find("#slideshow").append('\n <div class="review-mode">\n <div>'.concat(this.options.reviewModeLabel,"</div>\n </div>")),this.slideshow.setElement(this.element.find(".slideshow")),this.setUpEnvironment())}},{key:"getPresentation",value:function(){return this.slideshow.presentation}},{key:"getElement",value:function(){return this.element}},{key:"extractText",value:function(){var e,t,n,r=null==(t=this.element)?void 0:t.find(".presoSlide.current")[0];return r?function(e,t){var n={},r=!0,o=!1,i=void 0;try{for(var a,s=e.querySelectorAll(uy)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0)!function(){var e=a.value,r=a9.find(function(t){return e.hasAttribute(t)}),o=e.getAttribute(r)||e.id;o&&!e.closest(uv)&&(n[o]={text:ub(e,null),stored:t.has(o)})}()}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return{static_text:ub(e,uy),editables:n}}(r,new Set((null!=(e=null==(n=this.getPresentation())?void 0:n.dynamicContent)?e:[]).map(function(e){return e.key}))):null}},{key:"setUpEnvironment",value:function(){this.element&&this.slideshow.presentation&&(this.addNavigationListeners(),this.setWindowResize(),this.addSwipeListeners())}},{key:"addSwipeListeners",value:function(){this.options.swipingEnabled&&this.options.interactionEnabled&&(this.mc=new(aN()).Manager(this.element.get(0),{touchAction:"pan-y"}),this.mc.add(new(aN()).Swipe({event:"swipeleft",direction:aN().DIRECTION_LEFT,velocity:.2})),this.mc.add(new(aN()).Swipe({event:"swiperight",direction:aN().DIRECTION_RIGHT,velocity:.2})),this.mc.add(new(aN()).Swipe({event:"swipeup",direction:aN().DIRECTION_UP})),this.mc.add(new(aN()).Swipe({event:"swipedown",direction:aN().DIRECTION_DOWN})),t1.A.isIOS&&this.mc.add(new(aN()).Tap),this.mc.on("swiperight",this.handleSwipe),this.mc.on("swipeleft",this.handleSwipe),this.mc.on("swipeup",this.handleSwipe),this.mc.on("swipedown",this.handleSwipe),t1.A.isIOS&&this.mc.on("tap",this.handleTap))}},{key:"toggleNavigationWrapper",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.element.find(".sp-pagination-wrapper"),n=t.hasClass("visible");n&&!e?(t.removeClass("visible"),this.emit("navigationHidden")):!n&&e&&(t.addClass("visible"),this.emit("navigationShown"))}},{key:"setWindowResize",value:function(){var e=this,t=this.element.find(".slideshow"),n=this.element.find(".sp-presenter-overlay"),r=t.parent(),o=this.element.find(".scaling");if(t.length&&o.length){var i=function(t){e.emit("style",t)},a=this.options,s=a.scaleLesser,l=a.scaleGreater,c=a.verticalAlign,u=function(){if(e.element){t.css({position:"relative"});var a,u=(D()(r).height()-D()(t).height())/2,f=c&&(l||s)?{"-webkit-transform":"matrix(1, 0, 0, 1, 0, ".concat(u,")")}:{"-webkit-transform":"scale(1,1)"},p=o.height()<e.height||o.width()<e.width,d=r.height()>e.height&&r.width()>e.width,h=e.element.find(".slideshow-container"),y=c&&!e.isPortrait?uh().CENTER:uh().TOP;s&&p?e._fitScale=uh()(e.isPortrait?h.get(0):t.get(0),o.get(0),{vAlign:y,hAlign:uh().CENTER},up(!e.isPortrait)):l&&d?e._fitScale=uh()(t.get(0),o.get(0),{vAlign:y,hAlign:uh().CENTER},up(!e.isPortrait)):e.isPortrait?h.css(f):t.css(f);var v=o.get(0).scrollWidth>o.innerWidth();e.element.toggleClass("sp-presenter--horizontal-scroll",!s);var b=t.get(0).getBoundingClientRect(),g=o.get(0).getBoundingClientRect(),m=e.element.get(0).getBoundingClientRect(),w=e.element.find(".sp-presenter--pagination"),O=o.scrollTop();n.css({left:b.left-m.left,top:b.top-m.top,height:b.height,width:b.width});var k={width:b.width,left:b.left};e.isPortrait&&v&&(k.width=g.width,k.left=g.left);var _=k.width,j=k.left-m.x;e.options.previewMode?(j=-46+(g.width-b.width)/2,_=b.width+92):(e.isPortrait&&b.width>e.width+92||!e.isPortrait&&b.left>46?(j-=46,_+=92,w.addClass("sp-presenter-nav-outside")):w.removeClass("sp-presenter-nav-outside"),e.isPortrait&&(_+=156,j-=78),s||t.css({position:"absolute"})),w.css({width:_,height:Math.min(g.height,b.height),top:b.top-m.top+O,left:j}),i(e.isPortrait?h.attr("style"):t.attr("style")),null==(a=window.Bridge)||a.Event.triggerDeckEvent("resize")}};this.updateScaling=ei().debounce(u,100),void 0!==window.ResizeObserver?(this.ro=new window.ResizeObserver(function(){e.updateScaling()}),this.ro.observe(this.element.get(0))):window.addEventListener("resize",this.updateScaling),o.scrollTop(0),setTimeout(function(){return u()},0)}}},{key:"addNavigationListeners",value:function(){var e=this,t=this.element.find(".sp-presenter-navigation-controls");if(this.canNavigate()&&t&&t.length){var n=t.find(".sp-presenter-navigation-previous"),r=t.find(".sp-presenter-navigation-next");n.length&&(n.off(),n.on("click",function(){return e.changeSlide("prev")})),r.length&&(r.off(),r.on("click",function(){return e.changeSlide("next")})),this.slideshow.presentation.on("change:index",function(){setTimeout(function(){e.updateNavDisplay(e.slideshow.presentation)},0)}),this.slideshow.presentation.on("change:flat",function(){setTimeout(function(){e.updateNavDisplay(e.slideshow.presentation)},0)}),this.updateNavDisplay(this.slideshow.presentation);var o=this.element.find(".sp-pagination-wrapper");o.hasClass("visible")||o.addClass("visible"),this.emit("navigationShown"),setTimeout(function(){D()("body").on("mousemove",e.onMouseActivity),D()("body").on("touchmove",e.onTouchActivity),D()("body").on("click",e.onMouseActivity)},1e3),setTimeout(function(){e.toggleNavigationWrapper(!1)},1e4)}}},{key:"toggleNavigation",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=this.element.find(".sp-presenter-navigation-controls");e?(t.removeClass("hidden"),this.navigationDisabled=!1):(t.addClass("hidden"),this.navigationDisabled=!0)}},{key:"updateMouseMoveTimeout",value:function(){var e=this;this.mouseMoveTimeout&&clearTimeout(this.mouseMoveTimeout),this.mouseMoveTimeout=setTimeout(function(){e.toggleNavigationWrapper(!1)},4e3)}},{key:"updateNavDisplay",value:function(e){var t=this.element.find(".sp-presenter-navigation-previous"),n=this.element.find(".sp-presenter-navigation-next");t.length&&(0===e.index?t.addClass("disabled"):t.removeClass("disabled")),n.length&&(e.index===e.flat.length-1?n.addClass("disabled"):n.removeClass("disabled"))}},{key:"changeSubslide",value:function(e){var t=this;if(cI.Sub.currentSubslide){var n=cI.Sub.keys(),r=cI.Sub.process_target_key(e),o=ei().indexOf(n,r);if(!n[o]){var i=ei().find(cI.Sub.subslides,function(e){return e.data.key===r});if(!i)return;r=i.key}cI.Sub.currentSubslide._animating||r===cI.Sub.currentSubslide.key?ap.warn("Current subslide hasn't finished loading yet"):(this.emit("transition",{type:"subslide",status:"transitioning"}),cI.Sub._show(r),this.element.find(".scaling").scrollTop(0),setTimeout(function(){cI.Sub.subslideTransitioning.then(function(){t.onSubslideChange("begin"),t.emit("transition",{type:"subslide",status:"complete"})})},0))}}},{key:"changeSlide",value:function(e){var t,n=this;if(this.navigationDisabled)return ap.warn("Navigation is disabled by the content"),aF().resolve();var r=this.slideshow.presentation,o=null==(t=r.features.waitForSlideLoad)||t,i=[this.changingSlide&&"a slide change is already running",!this.slideshow.loaded&&"the slideshow has not finished loading",!this.slideshow.started&&"the slideshow has not started",!this.slideshow.slideTransitioning.isFulfilled()&&"a slide transition is running",cI.Sub.subslideTransitioning&&!cI.Sub.subslideTransitioning.isFulfilled()&&"a subslide transition is running"].filter(Boolean);if(o&&i.length)return ap.warn('Cannot navigate to "'.concat(e,'": ').concat(i.join("; "))),aF().resolve();if(this.element.attr("locked"))return ap.warn("Cannot navigate while presenter is locked for editing"),aF().resolve();var a=r.current,s=r[e]||r.search(e);if(!s)return ap.warn('Cannot navigate: no slide matches "'.concat(e,'"')),aF().resolve();var l=this.element.find(".scaling"),c=this.element.find(".presoSlide.current"),u=l.scrollTop();if(this._fitScale&&u){l.scrollTop(0);var f=-(u/l.prop("scrollHeight")*c.height());c.css({top:f})}return(this.changingSlide=!0,this.slideshow.changeSlide(e))?(this.emit("transition",{type:"slide",status:"transitioning",path:r.getFullPath(s),currentSlide:a,nextSlide:s}),this.slideshow.slideTransitioning.then(function(){c.css({top:0}),n.changingSlide=!1,n.emit("transition",{type:"slide",status:"complete",path:r.getFullPath(s),currentSlide:s})})):(this.changingSlide=!1,aF().resolve())}},{key:"refreshCurrentSlide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};return this.slideshow.refreshCurrentSlide(e)}},{key:"emitSlideChangeEvent",value:function(e){this.emit("change",e.url)}},{key:"onSubslideChange",value:function(){if(cI.Sub.keys().length){var e=cI.Sub.currentSubslide;e&&e.data&&!e.data.createdFromSlide&&e.data.url&&this.emit("change",e.data.url)}}},{key:"gotoSlide",value:function(e){var t,n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=this.slideshow.presentation.searchByPath(e),i=function(e){if(Array.isArray(e))return e}(t=e.split(/([\w-]+)\/?([\w-]+)?\/?([\w-]+)?\/?([\w-]+)?/))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),5!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return ug(e,5);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ug(e,5)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[2],s=i[3],l=i[4],c=[null!=s?s:a,l].filter(Boolean).join("/"),u=function(){return r?cI.Event.triggerAsync("showpage:".concat(c),r):aF().resolve()};return o?o!==this.slideshow.presentation.current?this.changeSlide(o).then(function(){return u()}):l&&cI.Sub.currentSubslide&&l!==cI.Sub.currentSubslide.key?this.transitioning.then(function(){return n.changeSubslide(l),cI.Sub._subslideTransitioning.then(function(){return u()})}):u():aF().resolve()}},{key:"destroy",value:function(){this.mc&&this.mc.destroy(),this.element&&(this.ro?this.ro.unobserve(this.element.get(0)):window.removeEventListener("resize",this.updateScaling)),this.setReadOnlyClass(!1),this.setOverscrollBehavior(!1),this.slideshow.destroy(),this.mouseMoveTimeout&&clearTimeout(this.mouseMoveTimeout),D()("body").off("mousemove",this.onMouseActivity),D()("body").off("click",this.onMouseActivity),D()("body").off("touchmove",this.onTouchActivity),D()(document).off("keydown",this.onKeyDown),D()(document).off("keyup",this.onKeyUp),this.element.find(".sp-presentation-container").remove(),n.isPresenting=!1}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(aR());um(uj,"isPresenting",!1);var uS=n(84373);function uP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function uC(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function ux(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||uE(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uE(e,t){if(e){if("string"==typeof e)return uP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uP(e,t)}}function uT(e){return e.split("/").slice(1)}var uI=(0,x.createContext)(),uR=n(60025);function uD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function uN(e){var t,n=e.ref,r=e.children,o=e.onSlideChange,i=e.onSettled,a=e.onContextChange,s=e.onCMSValChange,l=e.deckInterface,c=e.resolveTarget,u=e.presentation,f=e.selectedSlide,p=e.dimensions,d=e.context,h=e.feeds,y=e.envs,v=e.cmsVals,b=e.isScreenshot,g=e.isPresomanager,m=e.isEditingTemplate,w=e.isReadOnly,O=e.modePath,k=e.showEditables,_=(0,x.useRef)(),j=function(e){if(Array.isArray(e))return e}(t=(0,x.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return uD(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return uD(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),S=j[0],P=j[1],E=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.currentSlide,o=void 0===r?null:r,i=n.onSlideChange,a=n.onSettled,s=void 0===a?function(){}:a,l=n.onContextChange,c=void 0===l?function(){}:l,u=n.onCMSValChange,f=n.deckInterface,p=n.resolveTarget,d=n.context,h=void 0===d?{}:d,y=n.feeds,v=void 0===y?{}:y,b=n.dynamicContent,g=void 0===b?null:b,m=n.dimensions,w=void 0===m?{width:1024,height:768}:m,O=n.envs,k=void 0===O?{}:O,_=n.isScreenshot,j=void 0!==_&&_,S=n.isEditable,P=void 0!==S&&S,C=n.isPresomanager,E=n.isReadOnly,T=void 0!==E&&E,I=n.modePath,R=ux((0,x.useState)(0),2),D=R[0],N=R[1],A=ux((0,x.useState)(!1),2),B=A[0],F=A[1],M=ux((0,x.useState)(null),2),L=M[0],U=M[1],V=(0,x.useRef)(null),z=(0,x.useRef)(null),$=(0,x.useRef)(!1),W=(0,x.useRef)(!1),K=(0,x.useRef)(u),q=(0,x.useRef)(i),H=(0,x.useRef)(s),Z=(0,x.useRef)(c),J=(0,x.useRef)(o),G=(0,x.useRef)(h),Y=(0,x.useRef)(v),X=(0,x.useRef)(w),Q=(0,x.useRef)(k),ee=(0,x.useRef)(j),et=(0,x.useRef)(T),en=(0,x.useRef)(P),er=(0,x.useRef)(g),eo=(0,x.useRef)(!1),ei=(0,x.useRef)(f),ea=(0,x.useRef)(p),es=(0,x.useRef)({findFieldKey:function(e){var t;return null==(t=ei.current)?void 0:t.findFieldKey(e)},readField:function(e){var t;return null==(t=ei.current)?void 0:t.readField(e)},registerField:function(e){var t;return null==(t=ei.current)?void 0:t.registerField(e)},tools:{list_targets:function(e){var t;return null==(t=ei.current)?void 0:t.tools.list_targets(e)}},apply:function(e,t){var n;return null==(n=ei.current)?void 0:n.apply(e,t)},get ready(){var e,t;return null!=(e=null==(t=ei.current)?void 0:t.ready)?e:Promise.resolve()}}).current;if(K.current=u,q.current=i,H.current=s,Z.current=c,J.current=o,G.current=h,Y.current=v,X.current=w,Q.current=k,ee.current=j,et.current=T,en.current=P,er.current=g,ei.current=f,ea.current=p,!(null==e?void 0:e.decks))throw Error("No decks found");function el(){var e,t;W.current=!1,null==(t=V.current)||null==(e=t.destroy)||e.call(t),V.current=null,z.current=null}return(0,x.useEffect)(function(){var n,r=!0;return(n=function(){var n,o,i;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(a){switch(a.label){case 0:return el(),(n=z.current=new aT({features:{editable:en.current,waitForSlideLoad:!1,loadSlideCSS:!1},content:e.decks,options:{context:structuredClone(G.current),feeds:Y.current,envs:Q.current,dynamicContent:er.current,filter:function(){return!0}}})).on("cmsValChanged",function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=ux(t,4),o=r[0],i=r[1],a=r[3];(null==a?void 0:a.origin)!==aE.STORAGE&&K.current({key:o,value:i,slidePath:J.current})}),n.on("change:context",function(){for(var e,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];eo.current||null==(e=Z.current)||e.call.apply(e,[Z].concat(function(e){if(Array.isArray(e))return uP(e)}(n)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||uE(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))}),o=J.current,[4,n.gotoSlide((0,uS.Lh)(o))];case 1:if(a.sent(),!r)return[2];return[4,(i=V.current=new uj({navigationEnabled:!0,interactionEnabled:!0,keyboardEnabled:!0,scaleLesser:!0,scaleGreater:!0,swipingEnabled:!0,screenshotMode:ee.current,readOnly:et.current,verticalAlign:!0,presentation:n,deckInterface:es,resolveTarget:function(e){return ea.current(e)},dimensions:X.current,element:t.current})).init(!0,!1)];case 2:if(a.sent(),!r)return V.current===i&&el(),[2];if(W.current=!0,F(!0),i.on("transition",function(e){var t=e.type,n=e.path,r=e.status;"slide"===t&&"complete"===r&&(q.current(uT(n)),U(uT(n)),H.current(uT(n)))}),J.current!==o)return i.gotoSlide((0,uS.Lh)(J.current)),[2];return U(o.split("/")),H.current(o.split("/")),[2]}})},function(){var e=this,t=arguments;return new Promise(function(r,o){var i=n.apply(e,t);function a(e){uC(i,r,o,a,s,"next",e)}function s(e){uC(i,r,o,a,s,"throw",e)}a(void 0)})})(),function(){r=!1,F(!1),U(null),el()}},[t,D]),(0,x.useEffect)(function(){if(!$.current){$.current=!0;return}N(function(e){return e+1})},[e,P,void 0!==C&&C,T,j,JSON.stringify(k),JSON.stringify(v),JSON.stringify(w),void 0===I?null:I]),(0,x.useEffect)(function(){if(z.current){eo.current=!0;try{z.current.context=structuredClone(h)}finally{eo.current=!1}}},[JSON.stringify(h)]),(0,x.useEffect)(function(){z.current&&(z.current.dynamicContent=g)},[JSON.stringify(g)]),{setCurrentSlide:function(e){var t=V.current;t&&W.current&&t.gotoSlide(e)},reload:(0,x.useCallback)(function(){N(function(e){return e+1})},[]),refresh:(0,x.useCallback)(function(){var e,t;return null!=(e=null==(t=V.current)?void 0:t.refreshCurrentSlide())?e:Promise.resolve()},[]),isReady:B,settledSlide:L}}(u,_,{currentSlide:f.join("/"),onSlideChange:o,onSettled:i,onContextChange:void 0===a?function(){}:a,onCMSValChange:s,deckInterface:l,resolveTarget:c,dynamicContent:v,isScreenshot:b,isEditable:k,isPresomanager:g,isReadOnly:w,modePath:O,dimensions:p,context:d,feeds:h,envs:y}),T=E.setCurrentSlide,I=E.reload,R=E.refresh,D=E.isReady,N=E.settledSlide,A=(0,x.useMemo)(function(){return al()(function(){P(!0),I()},100)},[I]);(0,x.useImperativeHandle)(n,function(){return{reload:A,refresh:R}},[A,R]);var B=(0,x.useRef)(k);(0,x.useEffect)(function(){B.current!==k&&(B.current=k,A())},[k]),(0,x.useEffect)(function(){if(D){var e=setTimeout(function(){P(!1)},500);return function(){return clearTimeout(e)}}},[D]),(0,x.useEffect)(function(){T((0,uS.Lh)(f.join("/")))},[f]);var F=f.join("/"),M=(0,x.useMemo)(function(){return{reload:A,slidePath:F}},[A,F]),L=(0,x.useMemo)(function(){return l?(0,ai.XF)(l,c((0,uS.Lh)(F))):null},[l,c,F]);return(0,C.jsxs)(uI,{value:M,children:[(0,C.jsx)("div",{id:"presenter",ref:_,children:(0,C.jsx)(aa,{})}),!S&&k&&(0,uR._G)(N,f)&&(0,C.jsx)(ao,{isPresomanager:g,isEditingTemplate:m,cmsVals:null!=v?v:[],slidePath:F,interfaceFields:L,onCMSValChange:s}),r]})}var uA=n(47087),uB=n(57862),uF=n(97167),uM=n(40438),uL=n(70660),uU=n(41523),uV=n(96154),uz=n(75234),u$=n(97356),uW=n(10127),uK=n(22648),uq=n(19490),uH=n(68599),uZ=n(11316),uJ=n(24405);function uG(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function uY(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return uG(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uG(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var uX={width:1024,height:768};function uQ(e,t){(0,uV.c)("The deck threw an error while rendering.".concat(t),e)}var u0=uL.P||uU.Q?{duration:0}:{type:"spring",stiffness:320,damping:40,mass:.9};function u1(e){var t,n,r,o,i,a,s,l,c,u,f,p,d,h,y,v=e.children,b=(n=(t=uY((0,x.useState)(null),2))[0],r=t[1],i=(o=uY((0,x.useState)(!0),2))[0],a=o[1],(0,x.useEffect)(function(){var e;return!function t(){e=requestAnimationFrame(t);var n=document.querySelector("[".concat(uF.ev,"]"));if(!n)return void r(null);a(n.getAttribute(uF.ev)===uF.$P);var o=n.getBoundingClientRect();o.width<40||o.height<30||r(function(e){var t,n;return(t=e,n=o,t&&.5>Math.abs(t.left-n.left)&&.5>Math.abs(t.top-n.top)&&.5>Math.abs(t.width-n.width)&&.5>Math.abs(t.height-n.height))?e:o})}(),function(){return cancelAnimationFrame(e)}},[]),{rect:n,hasArrows:i}),g=b.rect,m=b.hasArrows,w=(0,uM.F)(),O=(0,uH.C)(),k=O.tab,_=O.selectedSlide,j=O.goToSlide,S=(0,uF.Oc)(),P=S.stageRef,R=S.reloadStage,D=S.refreshStage,N=(0,uq.k)().slides,A=(0,uz.g)();(0,uZ.k)(N),s=(0,uz.g)().bodyClasses,l=(0,x.useRef)(new Set([])),(0,x.useEffect)(function(){var e=document.body.classList,t=!0,n=!1,r=void 0;try{for(var o,i=s[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;l.current.add(a),e.add(a)}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return function(){var e=document.body.classList;l.current.forEach(function(t){e.remove(t)})}},[s]);var B=(0,T.U)((0,uB.N8)()).data,F=A.showEditables&&B,M=(0,uK.mS)(),L=M.isStageCleared,U=M.reportSettled;(0,uW.v)({enabled:!0,selectedSlide:_,onNavigate:j,onReload:R,onRefresh:D});var V=null!=(c=null==w?void 0:w.dimensions)?c:uX,z=V.width,$=V.height,W=46*!!m,K=(null!=(u=null==g?void 0:g.width)?u:z)-2*W,q=null!=(f=null==g?void 0:g.height)?f:$,H=(0,x.useMemo)(function(){return(0,u$.Cp)(A,null!=w?w:{})},[A,w]);return!L&&(null==w?void 0:w.presentation)&&(k!==uJ.QT||w.templates.length)?(0,C.jsx)("div",{style:{position:"fixed",left:null!=(p=null==g?void 0:g.left)?p:0,top:null!=(d=null==g?void 0:g.top)?d:0,width:null!=(h=null==g?void 0:g.width)?h:0,height:null!=(y=null==g?void 0:g.height)?y:0,overflow:"hidden",pointerEvents:g?"auto":"none",zIndex:1},children:(0,C.jsx)(I.t,{resetKey:"".concat(A.path,":").concat(null==_?void 0:_.join("/")),title:"The deck could not be rendered",Fallback:uA.b,onCaught:uQ,children:(0,C.jsx)(E.P.div,{animate:{opacity:+!!g},transition:u0,initial:!1,style:{position:"absolute",top:0,left:W,width:K,height:q,transformOrigin:"top left","--stage-nav-display":m?"block":"none"},children:(0,C.jsx)(uN,{ref:P,isScreenshot:A.isScreenshot,presentation:w.presentation,selectedSlide:_,dimensions:V,context:(0,u$.i6)(A,w.context),feeds:w.feeds,envs:w.envs,cmsVals:H,onSlideChange:j,onSettled:U,onContextChange:w.onContextChange,onCMSValChange:w.onCMSValChange,deckInterface:w.deckInterface,resolveTarget:w.resolveTarget,showEditables:F,isPresomanager:A.isPresomanager,isEditingTemplate:(0,u$.ZM)(A),isReadOnly:(0,ai.L$)((0,u$.lq)(A)),modePath:A.path,children:v})})})}):null}},19490(e,t,n){"use strict";var r=n(9051),o=n(60025),i=n(24405),a=n(40438),s=n(68599);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(){var e=(0,a.F)(),t=(0,s.C)(),n=t.tab,c=t.selectedSlide,u=(0,r.useMemo)(function(){var t,r=(function(e){if(Array.isArray(e))return e}(t=e.presentation.decks)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),1!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return l(e,1);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,1)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];return n===i.QT?(0,o.eG)(r):(0,o.zy)(r)},[e.presentation,n]),f=(0,o.P5)(u,c);return{slides:u,at:f,current:u[f],previous:f>0?u[f-1]:null,next:f>-1&&f<u.length-1?u[f+1]:null}}n.d(t,{k:()=>c})}}]);
|
|
2
|
+
//# sourceMappingURL=256.js.map
|