@crystaldesign/diva-web-planner-react 25.11.0-rc.8 → 25.11.0-rc.9
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/build/umd/1578.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3378.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3909.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4115.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4219.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4269.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4818.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5552.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5552.diva-web-planner-react.umd.min.js.LICENSE.txt +6 -0
- package/build/umd/6132.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6665.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/6665.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7052.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7415.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8584.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/859.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8717.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9073.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/report.html +1 -1
- package/package.json +10 -10
- package/build/umd/4788.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/4788.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see 1578.diva-web-planner-react.umd.min.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[1578,
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[1578,6665],{91578:(t,i,o)=>{o.r(i),o.d(i,{default:()=>D});var a=o(65515),r=o.n(a),l=(o(87363),o(68692)),c=o(93379),d=o.n(c),u=o(7795),p=o.n(u),f=o(90569),v=o.n(f),b=o(3565),m=o.n(b),y=o(19216),g=o.n(y),k=o(44589),w=o.n(k),x=o(75581),C={};C.styleTagTransform=w(),C.setAttributes=m(),C.insert=v().bind(null,"head"),C.domAPI=p(),C.insertStyleElement=g();d()(x.ZP,C);x.ZP&&x.ZP.locals&&x.ZP.locals;var S=o(47514);const D=function Toggle(t){var i,o=t.onChange,a=t.val,c=t.state,d=t.on,u=t.off,p=t.alwaysActiveColor,f=t.height,v=void 0===f?40:f,b=t.width,m=void 0===b?80:b,y=t.handleDiameter,g=void 0===y?32:y,k=t.toggleTextClassName,w=void 0===k?x.f6:k,C=null===(i=getComputedStyle(document.documentElement).getPropertyValue("--primaryColor"))||void 0===i?void 0:i.replace(/ /g,"");return(0,S.jsx)(l.Z,{className:"no-swiping",checkedIcon:d?(0,S.jsx)("div",{className:r()(w),id:"yes",children:d}):(0,S.jsx)(S.Fragment,{}),uncheckedIcon:u?(0,S.jsx)("div",{className:r()(w),id:"no",children:u}):(0,S.jsx)(S.Fragment,{}),onChange:function onChange(){return o(null!=a?a:!c)},checked:c,onColor:C,offColor:p?C:"#CACACA",height:v,width:m,handleDiameter:g})}},75581:(t,i,o)=>{o.d(i,{ZP:()=>u,f6:()=>d});var a=o(8081),r=o.n(a),l=o(23645),c=o.n(l)()(r());c.push([t.id,".index-module--lgscn {\n display: flex;\n font-weight: 300;\n line-height: 40px;\n gap: 24px;\n}\n\n.index-module--D7_Ss {\n padding-left: 16px;\n color: white;\n line-height: 40px;\n font-weight: 300;\n}\n\n.index-module--D7_Ss#yes {\n padding-left: 16px;\n}\n\n.index-module--D7_Ss#no {\n padding-left: 4px;\n}\n",""]);var d="index-module--D7_Ss";const u=c},68692:(t,i,o)=>{o.d(i,{Z:()=>c});var a=o(87363);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])}return t},s.apply(this,arguments)}var r=a.createElement("svg",{viewBox:"-2 -5 14 20",height:"100%",width:"100%",style:{position:"absolute",top:0}},a.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"})),l=a.createElement("svg",{height:"100%",width:"100%",viewBox:"-2 -5 17 21",style:{position:"absolute",top:0}},a.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}));function h(t){if(7===t.length)return t;for(var i="#",o=1;o<4;o+=1)i+=t[o]+t[o];return i}function e(t,i,o,a,r){return function(t,i,o,a,r){var l=(t-o)/(i-o);if(0===l)return a;if(1===l)return r;for(var c="#",d=1;d<6;d+=2){var u=parseInt(a.substr(d,2),16),p=parseInt(r.substr(d,2),16),f=Math.round((1-l)*u+l*p).toString(16);1===f.length&&(f="0"+f),c+=f}return c}(t,i,o,h(a),h(r))}var c=function(t){function n(i){t.call(this,i);var o=i.height,a=i.width,r=i.checked;this.t=i.handleDiameter||o-2,this.i=Math.max(a-o,a-(o+this.t)/2),this.o=Math.max(0,(o-this.t)/2),this.state={h:r?this.i:this.o},this.l=0,this.u=0,this.p=this.p.bind(this),this.v=this.v.bind(this),this.k=this.k.bind(this),this.m=this.m.bind(this),this.M=this.M.bind(this),this.T=this.T.bind(this),this.$=this.$.bind(this),this.C=this.C.bind(this),this.D=this.D.bind(this),this.O=this.O.bind(this),this.S=this.S.bind(this),this.W=this.W.bind(this)}return t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n,n.prototype.componentDidMount=function(){this.I=!0},n.prototype.componentDidUpdate=function(t){t.checked!==this.props.checked&&this.setState({h:this.props.checked?this.i:this.o})},n.prototype.componentWillUnmount=function(){this.I=!1},n.prototype.H=function(t){this.R.focus(),this.setState({j:t,B:!0,L:Date.now()})},n.prototype.N=function(t){var i=this.state,o=i.j,a=i.h,r=(this.props.checked?this.i:this.o)+t-o;i.U||t===o||this.setState({U:!0});var l=Math.min(this.i,Math.max(this.o,r));l!==a&&this.setState({h:l})},n.prototype.A=function(t){var i=this.state,o=i.h,a=i.U,r=i.L,l=this.props.checked,c=(this.i+this.o)/2;this.setState({h:this.props.checked?this.i:this.o});var d=Date.now()-r;(!a||d<250||l&&o<=c||!l&&o>=c)&&this.X(t),this.I&&this.setState({U:!1,B:!1}),this.l=Date.now()},n.prototype.p=function(t){t.preventDefault(),"number"==typeof t.button&&0!==t.button||(this.H(t.clientX),window.addEventListener("mousemove",this.v),window.addEventListener("mouseup",this.k))},n.prototype.v=function(t){t.preventDefault(),this.N(t.clientX)},n.prototype.k=function(t){this.A(t),window.removeEventListener("mousemove",this.v),window.removeEventListener("mouseup",this.k)},n.prototype.m=function(t){this.F=null,this.H(t.touches[0].clientX)},n.prototype.M=function(t){this.N(t.touches[0].clientX)},n.prototype.T=function(t){t.preventDefault(),this.A(t)},n.prototype.C=function(t){Date.now()-this.l>50&&(this.X(t),Date.now()-this.u>50&&this.I&&this.setState({B:!1}))},n.prototype.D=function(){this.u=Date.now()},n.prototype.O=function(){this.setState({B:!0})},n.prototype.S=function(){this.setState({B:!1})},n.prototype.W=function(t){this.R=t},n.prototype.$=function(t){t.preventDefault(),this.R.focus(),this.X(t),this.I&&this.setState({B:!1})},n.prototype.X=function(t){var i=this.props;(0,i.onChange)(!i.checked,t,i.id)},n.prototype.render=function(){var t=this.props,i=t.checked,o=t.disabled,r=t.className,l=t.offColor,c=t.onColor,d=t.offHandleColor,u=t.onHandleColor,p=t.checkedIcon,f=t.uncheckedIcon,v=t.checkedHandleIcon,b=t.uncheckedHandleIcon,m=t.boxShadow,y=t.activeBoxShadow,g=t.height,k=t.width,w=t.borderRadius,x=function(t,i){var o={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&-1===i.indexOf(a)&&(o[a]=t[a]);return o}(t,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),C=this.state,S=C.h,D=C.U,M=C.B,T={position:"relative",display:"inline-block",textAlign:"left",opacity:o?.5:1,direction:"ltr",borderRadius:g/2,WebkitTransition:"opacity 0.25s",MozTransition:"opacity 0.25s",transition:"opacity 0.25s",touchAction:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},E={height:g,width:k,margin:Math.max(0,(this.t-g)/2),position:"relative",background:e(S,this.i,this.o,l,c),borderRadius:"number"==typeof w?w:g/2,cursor:o?"default":"pointer",WebkitTransition:D?null:"background 0.25s",MozTransition:D?null:"background 0.25s",transition:D?null:"background 0.25s"},I={height:g,width:Math.min(1.5*g,k-(this.t+g)/2+1),position:"relative",opacity:(S-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:D?null:"opacity 0.25s",MozTransition:D?null:"opacity 0.25s",transition:D?null:"opacity 0.25s"},W={height:g,width:Math.min(1.5*g,k-(this.t+g)/2+1),position:"absolute",opacity:1-(S-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:D?null:"opacity 0.25s",MozTransition:D?null:"opacity 0.25s",transition:D?null:"opacity 0.25s"},H={height:this.t,width:this.t,background:e(S,this.i,this.o,d,u),display:"inline-block",cursor:o?"default":"pointer",borderRadius:"number"==typeof w?w-1:"50%",position:"absolute",transform:"translateX("+S+"px)",top:Math.max(0,(g-this.t)/2),outline:0,boxShadow:M?y:m,border:0,WebkitTransition:D?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:D?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:D?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},B={height:this.t,width:this.t,opacity:Math.max(2*(1-(S-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:D?null:"opacity 0.25s",MozTransition:D?null:"opacity 0.25s",transition:D?null:"opacity 0.25s"},j={height:this.t,width:this.t,opacity:Math.max(2*((S-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:D?null:"opacity 0.25s",MozTransition:D?null:"opacity 0.25s",transition:D?null:"opacity 0.25s"};return a.createElement("div",{className:r,style:T},a.createElement("div",{className:"react-switch-bg",style:E,onClick:o?null:this.$,onMouseDown:function(t){return t.preventDefault()}},p&&a.createElement("div",{style:I},p),f&&a.createElement("div",{style:W},f)),a.createElement("div",{className:"react-switch-handle",style:H,onClick:function(t){return t.preventDefault()},onMouseDown:o?null:this.p,onTouchStart:o?null:this.m,onTouchMove:o?null:this.M,onTouchEnd:o?null:this.T,onTouchCancel:o?null:this.S},b&&a.createElement("div",{style:B},b),v&&a.createElement("div",{style:j},v)),a.createElement("input",s({},{type:"checkbox",role:"switch","aria-checked":i,checked:i,disabled:o,style:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}},x,{ref:this.W,onFocus:this.O,onBlur:this.S,onKeyUp:this.D,onChange:this.C})))},n}(a.Component);c.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:r,checkedIcon:l,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56}}}]);
|
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see 3378.diva-web-planner-react.umd.min.js.LICENSE.txt */
|
2
|
-
(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[3378,1578,6071,5552,8291],{65526:(t,i,o)=>{"use strict";var r=o(65807);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,t.exports=function(){function shim(t,i,o,a,l,c){if(c!==r){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}function getShim(){return shim}shim.isRequired=shim;var t={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return t.PropTypes=t,t}},36653:(t,i,o)=>{t.exports=o(65526)()},65807:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},91578:(t,i,o)=>{"use strict";o.r(i),o.d(i,{default:()=>T});var r=o(65515),a=o.n(r),l=(o(87363),o(68692)),c=o(93379),p=o.n(c),u=o(7795),d=o.n(u),f=o(90569),m=o.n(f),y=o(3565),b=o.n(y),v=o(19216),g=o.n(v),k=o(44589),w=o.n(k),x=o(75581),S={};S.styleTagTransform=w(),S.setAttributes=b(),S.insert=m().bind(null,"head"),S.domAPI=d(),S.insertStyleElement=g();p()(x.ZP,S);x.ZP&&x.ZP.locals&&x.ZP.locals;var C=o(47514);const T=function Toggle(t){var i,o=t.onChange,r=t.val,c=t.state,p=t.on,u=t.off,d=t.alwaysActiveColor,f=t.height,m=void 0===f?40:f,y=t.width,b=void 0===y?80:y,v=t.handleDiameter,g=void 0===v?32:v,k=t.toggleTextClassName,w=void 0===k?x.f6:k,S=null===(i=getComputedStyle(document.documentElement).getPropertyValue("--primaryColor"))||void 0===i?void 0:i.replace(/ /g,"");return(0,C.jsx)(l.Z,{className:"no-swiping",checkedIcon:p?(0,C.jsx)("div",{className:a()(w),id:"yes",children:p}):(0,C.jsx)(C.Fragment,{}),uncheckedIcon:u?(0,C.jsx)("div",{className:a()(w),id:"no",children:u}):(0,C.jsx)(C.Fragment,{}),onChange:function onChange(){return o(null!=r?r:!c)},checked:c,onColor:S,offColor:d?S:"#CACACA",height:m,width:b,handleDiameter:g})}},75581:(t,i,o)=>{"use strict";o.d(i,{ZP:()=>u,f6:()=>p});var r=o(8081),a=o.n(r),l=o(23645),c=o.n(l)()(a());c.push([t.id,".index-module--lgscn {\n display: flex;\n font-weight: 300;\n line-height: 40px;\n gap: 24px;\n}\n\n.index-module--D7_Ss {\n padding-left: 16px;\n color: white;\n line-height: 40px;\n font-weight: 300;\n}\n\n.index-module--D7_Ss#yes {\n padding-left: 16px;\n}\n\n.index-module--D7_Ss#no {\n padding-left: 4px;\n}\n",""]);var p="index-module--D7_Ss";const u=c},88291:(t,i,o)=>{"use strict";function _objectDestructuringEmpty(t){if(null==t)throw new TypeError("Cannot destructure "+t)}o.d(i,{Z:()=>_objectDestructuringEmpty})},68692:(t,i,o)=>{"use strict";o.d(i,{Z:()=>c});var r=o(87363);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t},s.apply(this,arguments)}var a=r.createElement("svg",{viewBox:"-2 -5 14 20",height:"100%",width:"100%",style:{position:"absolute",top:0}},r.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"})),l=r.createElement("svg",{height:"100%",width:"100%",viewBox:"-2 -5 17 21",style:{position:"absolute",top:0}},r.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}));function h(t){if(7===t.length)return t;for(var i="#",o=1;o<4;o+=1)i+=t[o]+t[o];return i}function e(t,i,o,r,a){return function(t,i,o,r,a){var l=(t-o)/(i-o);if(0===l)return r;if(1===l)return a;for(var c="#",p=1;p<6;p+=2){var u=parseInt(r.substr(p,2),16),d=parseInt(a.substr(p,2),16),f=Math.round((1-l)*u+l*d).toString(16);1===f.length&&(f="0"+f),c+=f}return c}(t,i,o,h(r),h(a))}var c=function(t){function n(i){t.call(this,i);var o=i.height,r=i.width,a=i.checked;this.t=i.handleDiameter||o-2,this.i=Math.max(r-o,r-(o+this.t)/2),this.o=Math.max(0,(o-this.t)/2),this.state={h:a?this.i:this.o},this.l=0,this.u=0,this.p=this.p.bind(this),this.v=this.v.bind(this),this.k=this.k.bind(this),this.m=this.m.bind(this),this.M=this.M.bind(this),this.T=this.T.bind(this),this.$=this.$.bind(this),this.C=this.C.bind(this),this.D=this.D.bind(this),this.O=this.O.bind(this),this.S=this.S.bind(this),this.W=this.W.bind(this)}return t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n,n.prototype.componentDidMount=function(){this.I=!0},n.prototype.componentDidUpdate=function(t){t.checked!==this.props.checked&&this.setState({h:this.props.checked?this.i:this.o})},n.prototype.componentWillUnmount=function(){this.I=!1},n.prototype.H=function(t){this.R.focus(),this.setState({j:t,B:!0,L:Date.now()})},n.prototype.N=function(t){var i=this.state,o=i.j,r=i.h,a=(this.props.checked?this.i:this.o)+t-o;i.U||t===o||this.setState({U:!0});var l=Math.min(this.i,Math.max(this.o,a));l!==r&&this.setState({h:l})},n.prototype.A=function(t){var i=this.state,o=i.h,r=i.U,a=i.L,l=this.props.checked,c=(this.i+this.o)/2;this.setState({h:this.props.checked?this.i:this.o});var p=Date.now()-a;(!r||p<250||l&&o<=c||!l&&o>=c)&&this.X(t),this.I&&this.setState({U:!1,B:!1}),this.l=Date.now()},n.prototype.p=function(t){t.preventDefault(),"number"==typeof t.button&&0!==t.button||(this.H(t.clientX),window.addEventListener("mousemove",this.v),window.addEventListener("mouseup",this.k))},n.prototype.v=function(t){t.preventDefault(),this.N(t.clientX)},n.prototype.k=function(t){this.A(t),window.removeEventListener("mousemove",this.v),window.removeEventListener("mouseup",this.k)},n.prototype.m=function(t){this.F=null,this.H(t.touches[0].clientX)},n.prototype.M=function(t){this.N(t.touches[0].clientX)},n.prototype.T=function(t){t.preventDefault(),this.A(t)},n.prototype.C=function(t){Date.now()-this.l>50&&(this.X(t),Date.now()-this.u>50&&this.I&&this.setState({B:!1}))},n.prototype.D=function(){this.u=Date.now()},n.prototype.O=function(){this.setState({B:!0})},n.prototype.S=function(){this.setState({B:!1})},n.prototype.W=function(t){this.R=t},n.prototype.$=function(t){t.preventDefault(),this.R.focus(),this.X(t),this.I&&this.setState({B:!1})},n.prototype.X=function(t){var i=this.props;(0,i.onChange)(!i.checked,t,i.id)},n.prototype.render=function(){var t=this.props,i=t.checked,o=t.disabled,a=t.className,l=t.offColor,c=t.onColor,p=t.offHandleColor,u=t.onHandleColor,d=t.checkedIcon,f=t.uncheckedIcon,m=t.checkedHandleIcon,y=t.uncheckedHandleIcon,b=t.boxShadow,v=t.activeBoxShadow,g=t.height,k=t.width,w=t.borderRadius,x=function(t,i){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&-1===i.indexOf(r)&&(o[r]=t[r]);return o}(t,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),S=this.state,C=S.h,T=S.U,D=S.B,E={position:"relative",display:"inline-block",textAlign:"left",opacity:o?.5:1,direction:"ltr",borderRadius:g/2,WebkitTransition:"opacity 0.25s",MozTransition:"opacity 0.25s",transition:"opacity 0.25s",touchAction:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},M={height:g,width:k,margin:Math.max(0,(this.t-g)/2),position:"relative",background:e(C,this.i,this.o,l,c),borderRadius:"number"==typeof w?w:g/2,cursor:o?"default":"pointer",WebkitTransition:T?null:"background 0.25s",MozTransition:T?null:"background 0.25s",transition:T?null:"background 0.25s"},I={height:g,width:Math.min(1.5*g,k-(this.t+g)/2+1),position:"relative",opacity:(C-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:T?null:"opacity 0.25s",MozTransition:T?null:"opacity 0.25s",transition:T?null:"opacity 0.25s"},W={height:g,width:Math.min(1.5*g,k-(this.t+g)/2+1),position:"absolute",opacity:1-(C-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:T?null:"opacity 0.25s",MozTransition:T?null:"opacity 0.25s",transition:T?null:"opacity 0.25s"},O={height:this.t,width:this.t,background:e(C,this.i,this.o,p,u),display:"inline-block",cursor:o?"default":"pointer",borderRadius:"number"==typeof w?w-1:"50%",position:"absolute",transform:"translateX("+C+"px)",top:Math.max(0,(g-this.t)/2),outline:0,boxShadow:D?v:b,border:0,WebkitTransition:T?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:T?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:T?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},R={height:this.t,width:this.t,opacity:Math.max(2*(1-(C-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:T?null:"opacity 0.25s",MozTransition:T?null:"opacity 0.25s",transition:T?null:"opacity 0.25s"},_={height:this.t,width:this.t,opacity:Math.max(2*((C-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:T?null:"opacity 0.25s",MozTransition:T?null:"opacity 0.25s",transition:T?null:"opacity 0.25s"};return r.createElement("div",{className:a,style:E},r.createElement("div",{className:"react-switch-bg",style:M,onClick:o?null:this.$,onMouseDown:function(t){return t.preventDefault()}},d&&r.createElement("div",{style:I},d),f&&r.createElement("div",{style:W},f)),r.createElement("div",{className:"react-switch-handle",style:O,onClick:function(t){return t.preventDefault()},onMouseDown:o?null:this.p,onTouchStart:o?null:this.m,onTouchMove:o?null:this.M,onTouchEnd:o?null:this.T,onTouchCancel:o?null:this.S},y&&r.createElement("div",{style:R},y),m&&r.createElement("div",{style:_},m)),r.createElement("input",s({},{type:"checkbox",role:"switch","aria-checked":i,checked:i,disabled:o,style:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}},x,{ref:this.W,onFocus:this.O,onBlur:this.S,onKeyUp:this.D,onChange:this.C})))},n}(r.Component);c.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:a,checkedIcon:l,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56}}}]);
|
2
|
+
(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[3378,1578,6071,6665,8291],{65526:(t,i,o)=>{"use strict";var r=o(65807);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,t.exports=function(){function shim(t,i,o,a,l,c){if(c!==r){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}function getShim(){return shim}shim.isRequired=shim;var t={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return t.PropTypes=t,t}},36653:(t,i,o)=>{t.exports=o(65526)()},65807:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},91578:(t,i,o)=>{"use strict";o.r(i),o.d(i,{default:()=>T});var r=o(65515),a=o.n(r),l=(o(87363),o(68692)),c=o(93379),p=o.n(c),u=o(7795),d=o.n(u),f=o(90569),m=o.n(f),y=o(3565),b=o.n(y),v=o(19216),g=o.n(v),k=o(44589),w=o.n(k),x=o(75581),S={};S.styleTagTransform=w(),S.setAttributes=b(),S.insert=m().bind(null,"head"),S.domAPI=d(),S.insertStyleElement=g();p()(x.ZP,S);x.ZP&&x.ZP.locals&&x.ZP.locals;var C=o(47514);const T=function Toggle(t){var i,o=t.onChange,r=t.val,c=t.state,p=t.on,u=t.off,d=t.alwaysActiveColor,f=t.height,m=void 0===f?40:f,y=t.width,b=void 0===y?80:y,v=t.handleDiameter,g=void 0===v?32:v,k=t.toggleTextClassName,w=void 0===k?x.f6:k,S=null===(i=getComputedStyle(document.documentElement).getPropertyValue("--primaryColor"))||void 0===i?void 0:i.replace(/ /g,"");return(0,C.jsx)(l.Z,{className:"no-swiping",checkedIcon:p?(0,C.jsx)("div",{className:a()(w),id:"yes",children:p}):(0,C.jsx)(C.Fragment,{}),uncheckedIcon:u?(0,C.jsx)("div",{className:a()(w),id:"no",children:u}):(0,C.jsx)(C.Fragment,{}),onChange:function onChange(){return o(null!=r?r:!c)},checked:c,onColor:S,offColor:d?S:"#CACACA",height:m,width:b,handleDiameter:g})}},75581:(t,i,o)=>{"use strict";o.d(i,{ZP:()=>u,f6:()=>p});var r=o(8081),a=o.n(r),l=o(23645),c=o.n(l)()(a());c.push([t.id,".index-module--lgscn {\n display: flex;\n font-weight: 300;\n line-height: 40px;\n gap: 24px;\n}\n\n.index-module--D7_Ss {\n padding-left: 16px;\n color: white;\n line-height: 40px;\n font-weight: 300;\n}\n\n.index-module--D7_Ss#yes {\n padding-left: 16px;\n}\n\n.index-module--D7_Ss#no {\n padding-left: 4px;\n}\n",""]);var p="index-module--D7_Ss";const u=c},88291:(t,i,o)=>{"use strict";function _objectDestructuringEmpty(t){if(null==t)throw new TypeError("Cannot destructure "+t)}o.d(i,{Z:()=>_objectDestructuringEmpty})},68692:(t,i,o)=>{"use strict";o.d(i,{Z:()=>c});var r=o(87363);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t},s.apply(this,arguments)}var a=r.createElement("svg",{viewBox:"-2 -5 14 20",height:"100%",width:"100%",style:{position:"absolute",top:0}},r.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"})),l=r.createElement("svg",{height:"100%",width:"100%",viewBox:"-2 -5 17 21",style:{position:"absolute",top:0}},r.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}));function h(t){if(7===t.length)return t;for(var i="#",o=1;o<4;o+=1)i+=t[o]+t[o];return i}function e(t,i,o,r,a){return function(t,i,o,r,a){var l=(t-o)/(i-o);if(0===l)return r;if(1===l)return a;for(var c="#",p=1;p<6;p+=2){var u=parseInt(r.substr(p,2),16),d=parseInt(a.substr(p,2),16),f=Math.round((1-l)*u+l*d).toString(16);1===f.length&&(f="0"+f),c+=f}return c}(t,i,o,h(r),h(a))}var c=function(t){function n(i){t.call(this,i);var o=i.height,r=i.width,a=i.checked;this.t=i.handleDiameter||o-2,this.i=Math.max(r-o,r-(o+this.t)/2),this.o=Math.max(0,(o-this.t)/2),this.state={h:a?this.i:this.o},this.l=0,this.u=0,this.p=this.p.bind(this),this.v=this.v.bind(this),this.k=this.k.bind(this),this.m=this.m.bind(this),this.M=this.M.bind(this),this.T=this.T.bind(this),this.$=this.$.bind(this),this.C=this.C.bind(this),this.D=this.D.bind(this),this.O=this.O.bind(this),this.S=this.S.bind(this),this.W=this.W.bind(this)}return t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n,n.prototype.componentDidMount=function(){this.I=!0},n.prototype.componentDidUpdate=function(t){t.checked!==this.props.checked&&this.setState({h:this.props.checked?this.i:this.o})},n.prototype.componentWillUnmount=function(){this.I=!1},n.prototype.H=function(t){this.R.focus(),this.setState({j:t,B:!0,L:Date.now()})},n.prototype.N=function(t){var i=this.state,o=i.j,r=i.h,a=(this.props.checked?this.i:this.o)+t-o;i.U||t===o||this.setState({U:!0});var l=Math.min(this.i,Math.max(this.o,a));l!==r&&this.setState({h:l})},n.prototype.A=function(t){var i=this.state,o=i.h,r=i.U,a=i.L,l=this.props.checked,c=(this.i+this.o)/2;this.setState({h:this.props.checked?this.i:this.o});var p=Date.now()-a;(!r||p<250||l&&o<=c||!l&&o>=c)&&this.X(t),this.I&&this.setState({U:!1,B:!1}),this.l=Date.now()},n.prototype.p=function(t){t.preventDefault(),"number"==typeof t.button&&0!==t.button||(this.H(t.clientX),window.addEventListener("mousemove",this.v),window.addEventListener("mouseup",this.k))},n.prototype.v=function(t){t.preventDefault(),this.N(t.clientX)},n.prototype.k=function(t){this.A(t),window.removeEventListener("mousemove",this.v),window.removeEventListener("mouseup",this.k)},n.prototype.m=function(t){this.F=null,this.H(t.touches[0].clientX)},n.prototype.M=function(t){this.N(t.touches[0].clientX)},n.prototype.T=function(t){t.preventDefault(),this.A(t)},n.prototype.C=function(t){Date.now()-this.l>50&&(this.X(t),Date.now()-this.u>50&&this.I&&this.setState({B:!1}))},n.prototype.D=function(){this.u=Date.now()},n.prototype.O=function(){this.setState({B:!0})},n.prototype.S=function(){this.setState({B:!1})},n.prototype.W=function(t){this.R=t},n.prototype.$=function(t){t.preventDefault(),this.R.focus(),this.X(t),this.I&&this.setState({B:!1})},n.prototype.X=function(t){var i=this.props;(0,i.onChange)(!i.checked,t,i.id)},n.prototype.render=function(){var t=this.props,i=t.checked,o=t.disabled,a=t.className,l=t.offColor,c=t.onColor,p=t.offHandleColor,u=t.onHandleColor,d=t.checkedIcon,f=t.uncheckedIcon,m=t.checkedHandleIcon,y=t.uncheckedHandleIcon,b=t.boxShadow,v=t.activeBoxShadow,g=t.height,k=t.width,w=t.borderRadius,x=function(t,i){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&-1===i.indexOf(r)&&(o[r]=t[r]);return o}(t,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),S=this.state,C=S.h,T=S.U,D=S.B,E={position:"relative",display:"inline-block",textAlign:"left",opacity:o?.5:1,direction:"ltr",borderRadius:g/2,WebkitTransition:"opacity 0.25s",MozTransition:"opacity 0.25s",transition:"opacity 0.25s",touchAction:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},M={height:g,width:k,margin:Math.max(0,(this.t-g)/2),position:"relative",background:e(C,this.i,this.o,l,c),borderRadius:"number"==typeof w?w:g/2,cursor:o?"default":"pointer",WebkitTransition:T?null:"background 0.25s",MozTransition:T?null:"background 0.25s",transition:T?null:"background 0.25s"},I={height:g,width:Math.min(1.5*g,k-(this.t+g)/2+1),position:"relative",opacity:(C-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:T?null:"opacity 0.25s",MozTransition:T?null:"opacity 0.25s",transition:T?null:"opacity 0.25s"},W={height:g,width:Math.min(1.5*g,k-(this.t+g)/2+1),position:"absolute",opacity:1-(C-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:T?null:"opacity 0.25s",MozTransition:T?null:"opacity 0.25s",transition:T?null:"opacity 0.25s"},O={height:this.t,width:this.t,background:e(C,this.i,this.o,p,u),display:"inline-block",cursor:o?"default":"pointer",borderRadius:"number"==typeof w?w-1:"50%",position:"absolute",transform:"translateX("+C+"px)",top:Math.max(0,(g-this.t)/2),outline:0,boxShadow:D?v:b,border:0,WebkitTransition:T?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:T?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:T?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},R={height:this.t,width:this.t,opacity:Math.max(2*(1-(C-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:T?null:"opacity 0.25s",MozTransition:T?null:"opacity 0.25s",transition:T?null:"opacity 0.25s"},_={height:this.t,width:this.t,opacity:Math.max(2*((C-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:T?null:"opacity 0.25s",MozTransition:T?null:"opacity 0.25s",transition:T?null:"opacity 0.25s"};return r.createElement("div",{className:a,style:E},r.createElement("div",{className:"react-switch-bg",style:M,onClick:o?null:this.$,onMouseDown:function(t){return t.preventDefault()}},d&&r.createElement("div",{style:I},d),f&&r.createElement("div",{style:W},f)),r.createElement("div",{className:"react-switch-handle",style:O,onClick:function(t){return t.preventDefault()},onMouseDown:o?null:this.p,onTouchStart:o?null:this.m,onTouchMove:o?null:this.M,onTouchEnd:o?null:this.T,onTouchCancel:o?null:this.S},y&&r.createElement("div",{style:R},y),m&&r.createElement("div",{style:_},m)),r.createElement("input",s({},{type:"checkbox",role:"switch","aria-checked":i,checked:i,disabled:o,style:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}},x,{ref:this.W,onFocus:this.O,onBlur:this.S,onKeyUp:this.D,onChange:this.C})))},n}(r.Component);c.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:a,checkedIcon:l,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56}}}]);
|
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see 3909.diva-web-planner-react.umd.min.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[3909,1578,5552],{93909:(t,i,o)=>{o.r(i),o.d(i,{default:()=>T});var a=o(88130),r=o(9420),l=(o(87363),o(88683)),c=o(93379),d=o.n(c),u=o(7795),p=o.n(u),f=o(90569),g=o.n(f),m=o(3565),v=o.n(m),b=o(19216),y=o.n(b),x=o(44589),w=o.n(x),k=o(18939),S={};S.styleTagTransform=w(),S.setAttributes=v(),S.insert=g().bind(null,"head"),S.domAPI=p(),S.insertStyleElement=y();d()(k.ZP,S);k.ZP&&k.ZP.locals&&k.ZP.locals;var C=o(91578),D=o(47514);const T=(0,r.Pi)((function SettingsConfigSingle(t){var i=(0,a.NP)(),o=(0,l.useTranslation)().t;return(0,D.jsx)("div",{className:k.jl,id:"wcConfigSingleCheckbox",title:i.settingsState.doConfigSingle?o("configurator.configSingleExplanation"):o("configurator.configAllExplanation"),children:(0,D.jsx)(C.default,{onChange:function configSingleIsChanged(){i.paletteViewHandler.configSingleIsChanged()},state:!i.settingsState.doConfigSingle,width:76,height:25,handleDiameter:20,off:o("configurator.single"),on:o("configurator.all"),toggleTextClassName:k.fL})})}))},91578:(t,i,o)=>{o.r(i),o.d(i,{default:()=>D});var a=o(65515),r=o.n(a),l=(o(87363),o(68692)),c=o(93379),d=o.n(c),u=o(7795),p=o.n(u),f=o(90569),g=o.n(f),m=o(3565),v=o.n(m),b=o(19216),y=o.n(b),x=o(44589),w=o.n(x),k=o(75581),S={};S.styleTagTransform=w(),S.setAttributes=v(),S.insert=g().bind(null,"head"),S.domAPI=p(),S.insertStyleElement=y();d()(k.ZP,S);k.ZP&&k.ZP.locals&&k.ZP.locals;var C=o(47514);const D=function Toggle(t){var i,o=t.onChange,a=t.val,c=t.state,d=t.on,u=t.off,p=t.alwaysActiveColor,f=t.height,g=void 0===f?40:f,m=t.width,v=void 0===m?80:m,b=t.handleDiameter,y=void 0===b?32:b,x=t.toggleTextClassName,w=void 0===x?k.f6:x,S=null===(i=getComputedStyle(document.documentElement).getPropertyValue("--primaryColor"))||void 0===i?void 0:i.replace(/ /g,"");return(0,C.jsx)(l.Z,{className:"no-swiping",checkedIcon:d?(0,C.jsx)("div",{className:r()(w),id:"yes",children:d}):(0,C.jsx)(C.Fragment,{}),uncheckedIcon:u?(0,C.jsx)("div",{className:r()(w),id:"no",children:u}):(0,C.jsx)(C.Fragment,{}),onChange:function onChange(){return o(null!=a?a:!c)},checked:c,onColor:S,offColor:p?S:"#CACACA",height:g,width:v,handleDiameter:y})}},18939:(t,i,o)=>{o.d(i,{ZP:()=>p,fL:()=>u,jl:()=>d});var a=o(8081),r=o.n(a),l=o(23645),c=o.n(l)()(r());c.push([t.id,".index-module--uljig {\n min-height: 26px;\n margin-top: 2px;\n width: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.index-module--q2WSH {\n font-size: 11px;\n font-weight: 200;\n color: #fff;\n line-height: 26px;\n width: 46px;\n}\n\n.index-module--q2WSH#yes {\n padding-left: 22px;\n}\n\n.index-module--q2WSH#no {\n transform: translateX(-12px);\n}\n",""]);var d="index-module--uljig",u="index-module--q2WSH";const p=c},75581:(t,i,o)=>{o.d(i,{ZP:()=>u,f6:()=>d});var a=o(8081),r=o.n(a),l=o(23645),c=o.n(l)()(r());c.push([t.id,".index-module--lgscn {\n display: flex;\n font-weight: 300;\n line-height: 40px;\n gap: 24px;\n}\n\n.index-module--D7_Ss {\n padding-left: 16px;\n color: white;\n line-height: 40px;\n font-weight: 300;\n}\n\n.index-module--D7_Ss#yes {\n padding-left: 16px;\n}\n\n.index-module--D7_Ss#no {\n padding-left: 4px;\n}\n",""]);var d="index-module--D7_Ss";const u=c},68692:(t,i,o)=>{o.d(i,{Z:()=>c});var a=o(87363);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])}return t},s.apply(this,arguments)}var r=a.createElement("svg",{viewBox:"-2 -5 14 20",height:"100%",width:"100%",style:{position:"absolute",top:0}},a.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"})),l=a.createElement("svg",{height:"100%",width:"100%",viewBox:"-2 -5 17 21",style:{position:"absolute",top:0}},a.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}));function h(t){if(7===t.length)return t;for(var i="#",o=1;o<4;o+=1)i+=t[o]+t[o];return i}function e(t,i,o,a,r){return function(t,i,o,a,r){var l=(t-o)/(i-o);if(0===l)return a;if(1===l)return r;for(var c="#",d=1;d<6;d+=2){var u=parseInt(a.substr(d,2),16),p=parseInt(r.substr(d,2),16),f=Math.round((1-l)*u+l*p).toString(16);1===f.length&&(f="0"+f),c+=f}return c}(t,i,o,h(a),h(r))}var c=function(t){function n(i){t.call(this,i);var o=i.height,a=i.width,r=i.checked;this.t=i.handleDiameter||o-2,this.i=Math.max(a-o,a-(o+this.t)/2),this.o=Math.max(0,(o-this.t)/2),this.state={h:r?this.i:this.o},this.l=0,this.u=0,this.p=this.p.bind(this),this.v=this.v.bind(this),this.k=this.k.bind(this),this.m=this.m.bind(this),this.M=this.M.bind(this),this.T=this.T.bind(this),this.$=this.$.bind(this),this.C=this.C.bind(this),this.D=this.D.bind(this),this.O=this.O.bind(this),this.S=this.S.bind(this),this.W=this.W.bind(this)}return t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n,n.prototype.componentDidMount=function(){this.I=!0},n.prototype.componentDidUpdate=function(t){t.checked!==this.props.checked&&this.setState({h:this.props.checked?this.i:this.o})},n.prototype.componentWillUnmount=function(){this.I=!1},n.prototype.H=function(t){this.R.focus(),this.setState({j:t,B:!0,L:Date.now()})},n.prototype.N=function(t){var i=this.state,o=i.j,a=i.h,r=(this.props.checked?this.i:this.o)+t-o;i.U||t===o||this.setState({U:!0});var l=Math.min(this.i,Math.max(this.o,r));l!==a&&this.setState({h:l})},n.prototype.A=function(t){var i=this.state,o=i.h,a=i.U,r=i.L,l=this.props.checked,c=(this.i+this.o)/2;this.setState({h:this.props.checked?this.i:this.o});var d=Date.now()-r;(!a||d<250||l&&o<=c||!l&&o>=c)&&this.X(t),this.I&&this.setState({U:!1,B:!1}),this.l=Date.now()},n.prototype.p=function(t){t.preventDefault(),"number"==typeof t.button&&0!==t.button||(this.H(t.clientX),window.addEventListener("mousemove",this.v),window.addEventListener("mouseup",this.k))},n.prototype.v=function(t){t.preventDefault(),this.N(t.clientX)},n.prototype.k=function(t){this.A(t),window.removeEventListener("mousemove",this.v),window.removeEventListener("mouseup",this.k)},n.prototype.m=function(t){this.F=null,this.H(t.touches[0].clientX)},n.prototype.M=function(t){this.N(t.touches[0].clientX)},n.prototype.T=function(t){t.preventDefault(),this.A(t)},n.prototype.C=function(t){Date.now()-this.l>50&&(this.X(t),Date.now()-this.u>50&&this.I&&this.setState({B:!1}))},n.prototype.D=function(){this.u=Date.now()},n.prototype.O=function(){this.setState({B:!0})},n.prototype.S=function(){this.setState({B:!1})},n.prototype.W=function(t){this.R=t},n.prototype.$=function(t){t.preventDefault(),this.R.focus(),this.X(t),this.I&&this.setState({B:!1})},n.prototype.X=function(t){var i=this.props;(0,i.onChange)(!i.checked,t,i.id)},n.prototype.render=function(){var t=this.props,i=t.checked,o=t.disabled,r=t.className,l=t.offColor,c=t.onColor,d=t.offHandleColor,u=t.onHandleColor,p=t.checkedIcon,f=t.uncheckedIcon,g=t.checkedHandleIcon,m=t.uncheckedHandleIcon,v=t.boxShadow,b=t.activeBoxShadow,y=t.height,x=t.width,w=t.borderRadius,k=function(t,i){var o={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&-1===i.indexOf(a)&&(o[a]=t[a]);return o}(t,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),S=this.state,C=S.h,D=S.U,T=S.B,M={position:"relative",display:"inline-block",textAlign:"left",opacity:o?.5:1,direction:"ltr",borderRadius:y/2,WebkitTransition:"opacity 0.25s",MozTransition:"opacity 0.25s",transition:"opacity 0.25s",touchAction:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},E={height:y,width:x,margin:Math.max(0,(this.t-y)/2),position:"relative",background:e(C,this.i,this.o,l,c),borderRadius:"number"==typeof w?w:y/2,cursor:o?"default":"pointer",WebkitTransition:D?null:"background 0.25s",MozTransition:D?null:"background 0.25s",transition:D?null:"background 0.25s"},I={height:y,width:Math.min(1.5*y,x-(this.t+y)/2+1),position:"relative",opacity:(C-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:D?null:"opacity 0.25s",MozTransition:D?null:"opacity 0.25s",transition:D?null:"opacity 0.25s"},P={height:y,width:Math.min(1.5*y,x-(this.t+y)/2+1),position:"absolute",opacity:1-(C-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:D?null:"opacity 0.25s",MozTransition:D?null:"opacity 0.25s",transition:D?null:"opacity 0.25s"},W={height:this.t,width:this.t,background:e(C,this.i,this.o,d,u),display:"inline-block",cursor:o?"default":"pointer",borderRadius:"number"==typeof w?w-1:"50%",position:"absolute",transform:"translateX("+C+"px)",top:Math.max(0,(y-this.t)/2),outline:0,boxShadow:T?b:v,border:0,WebkitTransition:D?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:D?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:D?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},j={height:this.t,width:this.t,opacity:Math.max(2*(1-(C-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:D?null:"opacity 0.25s",MozTransition:D?null:"opacity 0.25s",transition:D?null:"opacity 0.25s"},H={height:this.t,width:this.t,opacity:Math.max(2*((C-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:D?null:"opacity 0.25s",MozTransition:D?null:"opacity 0.25s",transition:D?null:"opacity 0.25s"};return a.createElement("div",{className:r,style:M},a.createElement("div",{className:"react-switch-bg",style:E,onClick:o?null:this.$,onMouseDown:function(t){return t.preventDefault()}},p&&a.createElement("div",{style:I},p),f&&a.createElement("div",{style:P},f)),a.createElement("div",{className:"react-switch-handle",style:W,onClick:function(t){return t.preventDefault()},onMouseDown:o?null:this.p,onTouchStart:o?null:this.m,onTouchMove:o?null:this.M,onTouchEnd:o?null:this.T,onTouchCancel:o?null:this.S},m&&a.createElement("div",{style:j},m),g&&a.createElement("div",{style:H},g)),a.createElement("input",s({},{type:"checkbox",role:"switch","aria-checked":i,checked:i,disabled:o,style:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}},k,{ref:this.W,onFocus:this.O,onBlur:this.S,onKeyUp:this.D,onChange:this.C})))},n}(a.Component);c.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:r,checkedIcon:l,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56}}}]);
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[3909,1578,6665],{93909:(t,i,o)=>{o.r(i),o.d(i,{default:()=>T});var a=o(88130),r=o(9420),l=(o(87363),o(88683)),c=o(93379),d=o.n(c),u=o(7795),p=o.n(u),f=o(90569),g=o.n(f),m=o(3565),v=o.n(m),b=o(19216),y=o.n(b),x=o(44589),w=o.n(x),k=o(18939),S={};S.styleTagTransform=w(),S.setAttributes=v(),S.insert=g().bind(null,"head"),S.domAPI=p(),S.insertStyleElement=y();d()(k.ZP,S);k.ZP&&k.ZP.locals&&k.ZP.locals;var C=o(91578),D=o(47514);const T=(0,r.Pi)((function SettingsConfigSingle(t){var i=(0,a.NP)(),o=(0,l.useTranslation)().t;return(0,D.jsx)("div",{className:k.jl,id:"wcConfigSingleCheckbox",title:i.settingsState.doConfigSingle?o("configurator.configSingleExplanation"):o("configurator.configAllExplanation"),children:(0,D.jsx)(C.default,{onChange:function configSingleIsChanged(){i.paletteViewHandler.configSingleIsChanged()},state:!i.settingsState.doConfigSingle,width:76,height:25,handleDiameter:20,off:o("configurator.single"),on:o("configurator.all"),toggleTextClassName:k.fL})})}))},91578:(t,i,o)=>{o.r(i),o.d(i,{default:()=>D});var a=o(65515),r=o.n(a),l=(o(87363),o(68692)),c=o(93379),d=o.n(c),u=o(7795),p=o.n(u),f=o(90569),g=o.n(f),m=o(3565),v=o.n(m),b=o(19216),y=o.n(b),x=o(44589),w=o.n(x),k=o(75581),S={};S.styleTagTransform=w(),S.setAttributes=v(),S.insert=g().bind(null,"head"),S.domAPI=p(),S.insertStyleElement=y();d()(k.ZP,S);k.ZP&&k.ZP.locals&&k.ZP.locals;var C=o(47514);const D=function Toggle(t){var i,o=t.onChange,a=t.val,c=t.state,d=t.on,u=t.off,p=t.alwaysActiveColor,f=t.height,g=void 0===f?40:f,m=t.width,v=void 0===m?80:m,b=t.handleDiameter,y=void 0===b?32:b,x=t.toggleTextClassName,w=void 0===x?k.f6:x,S=null===(i=getComputedStyle(document.documentElement).getPropertyValue("--primaryColor"))||void 0===i?void 0:i.replace(/ /g,"");return(0,C.jsx)(l.Z,{className:"no-swiping",checkedIcon:d?(0,C.jsx)("div",{className:r()(w),id:"yes",children:d}):(0,C.jsx)(C.Fragment,{}),uncheckedIcon:u?(0,C.jsx)("div",{className:r()(w),id:"no",children:u}):(0,C.jsx)(C.Fragment,{}),onChange:function onChange(){return o(null!=a?a:!c)},checked:c,onColor:S,offColor:p?S:"#CACACA",height:g,width:v,handleDiameter:y})}},18939:(t,i,o)=>{o.d(i,{ZP:()=>p,fL:()=>u,jl:()=>d});var a=o(8081),r=o.n(a),l=o(23645),c=o.n(l)()(r());c.push([t.id,".index-module--uljig {\n min-height: 26px;\n margin-top: 2px;\n width: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.index-module--q2WSH {\n font-size: 11px;\n font-weight: 200;\n color: #fff;\n line-height: 26px;\n width: 46px;\n}\n\n.index-module--q2WSH#yes {\n padding-left: 22px;\n}\n\n.index-module--q2WSH#no {\n transform: translateX(-12px);\n}\n",""]);var d="index-module--uljig",u="index-module--q2WSH";const p=c},75581:(t,i,o)=>{o.d(i,{ZP:()=>u,f6:()=>d});var a=o(8081),r=o.n(a),l=o(23645),c=o.n(l)()(r());c.push([t.id,".index-module--lgscn {\n display: flex;\n font-weight: 300;\n line-height: 40px;\n gap: 24px;\n}\n\n.index-module--D7_Ss {\n padding-left: 16px;\n color: white;\n line-height: 40px;\n font-weight: 300;\n}\n\n.index-module--D7_Ss#yes {\n padding-left: 16px;\n}\n\n.index-module--D7_Ss#no {\n padding-left: 4px;\n}\n",""]);var d="index-module--D7_Ss";const u=c},68692:(t,i,o)=>{o.d(i,{Z:()=>c});var a=o(87363);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])}return t},s.apply(this,arguments)}var r=a.createElement("svg",{viewBox:"-2 -5 14 20",height:"100%",width:"100%",style:{position:"absolute",top:0}},a.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"})),l=a.createElement("svg",{height:"100%",width:"100%",viewBox:"-2 -5 17 21",style:{position:"absolute",top:0}},a.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}));function h(t){if(7===t.length)return t;for(var i="#",o=1;o<4;o+=1)i+=t[o]+t[o];return i}function e(t,i,o,a,r){return function(t,i,o,a,r){var l=(t-o)/(i-o);if(0===l)return a;if(1===l)return r;for(var c="#",d=1;d<6;d+=2){var u=parseInt(a.substr(d,2),16),p=parseInt(r.substr(d,2),16),f=Math.round((1-l)*u+l*p).toString(16);1===f.length&&(f="0"+f),c+=f}return c}(t,i,o,h(a),h(r))}var c=function(t){function n(i){t.call(this,i);var o=i.height,a=i.width,r=i.checked;this.t=i.handleDiameter||o-2,this.i=Math.max(a-o,a-(o+this.t)/2),this.o=Math.max(0,(o-this.t)/2),this.state={h:r?this.i:this.o},this.l=0,this.u=0,this.p=this.p.bind(this),this.v=this.v.bind(this),this.k=this.k.bind(this),this.m=this.m.bind(this),this.M=this.M.bind(this),this.T=this.T.bind(this),this.$=this.$.bind(this),this.C=this.C.bind(this),this.D=this.D.bind(this),this.O=this.O.bind(this),this.S=this.S.bind(this),this.W=this.W.bind(this)}return t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n,n.prototype.componentDidMount=function(){this.I=!0},n.prototype.componentDidUpdate=function(t){t.checked!==this.props.checked&&this.setState({h:this.props.checked?this.i:this.o})},n.prototype.componentWillUnmount=function(){this.I=!1},n.prototype.H=function(t){this.R.focus(),this.setState({j:t,B:!0,L:Date.now()})},n.prototype.N=function(t){var i=this.state,o=i.j,a=i.h,r=(this.props.checked?this.i:this.o)+t-o;i.U||t===o||this.setState({U:!0});var l=Math.min(this.i,Math.max(this.o,r));l!==a&&this.setState({h:l})},n.prototype.A=function(t){var i=this.state,o=i.h,a=i.U,r=i.L,l=this.props.checked,c=(this.i+this.o)/2;this.setState({h:this.props.checked?this.i:this.o});var d=Date.now()-r;(!a||d<250||l&&o<=c||!l&&o>=c)&&this.X(t),this.I&&this.setState({U:!1,B:!1}),this.l=Date.now()},n.prototype.p=function(t){t.preventDefault(),"number"==typeof t.button&&0!==t.button||(this.H(t.clientX),window.addEventListener("mousemove",this.v),window.addEventListener("mouseup",this.k))},n.prototype.v=function(t){t.preventDefault(),this.N(t.clientX)},n.prototype.k=function(t){this.A(t),window.removeEventListener("mousemove",this.v),window.removeEventListener("mouseup",this.k)},n.prototype.m=function(t){this.F=null,this.H(t.touches[0].clientX)},n.prototype.M=function(t){this.N(t.touches[0].clientX)},n.prototype.T=function(t){t.preventDefault(),this.A(t)},n.prototype.C=function(t){Date.now()-this.l>50&&(this.X(t),Date.now()-this.u>50&&this.I&&this.setState({B:!1}))},n.prototype.D=function(){this.u=Date.now()},n.prototype.O=function(){this.setState({B:!0})},n.prototype.S=function(){this.setState({B:!1})},n.prototype.W=function(t){this.R=t},n.prototype.$=function(t){t.preventDefault(),this.R.focus(),this.X(t),this.I&&this.setState({B:!1})},n.prototype.X=function(t){var i=this.props;(0,i.onChange)(!i.checked,t,i.id)},n.prototype.render=function(){var t=this.props,i=t.checked,o=t.disabled,r=t.className,l=t.offColor,c=t.onColor,d=t.offHandleColor,u=t.onHandleColor,p=t.checkedIcon,f=t.uncheckedIcon,g=t.checkedHandleIcon,m=t.uncheckedHandleIcon,v=t.boxShadow,b=t.activeBoxShadow,y=t.height,x=t.width,w=t.borderRadius,k=function(t,i){var o={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&-1===i.indexOf(a)&&(o[a]=t[a]);return o}(t,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),S=this.state,C=S.h,D=S.U,T=S.B,M={position:"relative",display:"inline-block",textAlign:"left",opacity:o?.5:1,direction:"ltr",borderRadius:y/2,WebkitTransition:"opacity 0.25s",MozTransition:"opacity 0.25s",transition:"opacity 0.25s",touchAction:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},E={height:y,width:x,margin:Math.max(0,(this.t-y)/2),position:"relative",background:e(C,this.i,this.o,l,c),borderRadius:"number"==typeof w?w:y/2,cursor:o?"default":"pointer",WebkitTransition:D?null:"background 0.25s",MozTransition:D?null:"background 0.25s",transition:D?null:"background 0.25s"},I={height:y,width:Math.min(1.5*y,x-(this.t+y)/2+1),position:"relative",opacity:(C-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:D?null:"opacity 0.25s",MozTransition:D?null:"opacity 0.25s",transition:D?null:"opacity 0.25s"},P={height:y,width:Math.min(1.5*y,x-(this.t+y)/2+1),position:"absolute",opacity:1-(C-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:D?null:"opacity 0.25s",MozTransition:D?null:"opacity 0.25s",transition:D?null:"opacity 0.25s"},W={height:this.t,width:this.t,background:e(C,this.i,this.o,d,u),display:"inline-block",cursor:o?"default":"pointer",borderRadius:"number"==typeof w?w-1:"50%",position:"absolute",transform:"translateX("+C+"px)",top:Math.max(0,(y-this.t)/2),outline:0,boxShadow:T?b:v,border:0,WebkitTransition:D?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:D?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:D?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},j={height:this.t,width:this.t,opacity:Math.max(2*(1-(C-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:D?null:"opacity 0.25s",MozTransition:D?null:"opacity 0.25s",transition:D?null:"opacity 0.25s"},H={height:this.t,width:this.t,opacity:Math.max(2*((C-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:D?null:"opacity 0.25s",MozTransition:D?null:"opacity 0.25s",transition:D?null:"opacity 0.25s"};return a.createElement("div",{className:r,style:M},a.createElement("div",{className:"react-switch-bg",style:E,onClick:o?null:this.$,onMouseDown:function(t){return t.preventDefault()}},p&&a.createElement("div",{style:I},p),f&&a.createElement("div",{style:P},f)),a.createElement("div",{className:"react-switch-handle",style:W,onClick:function(t){return t.preventDefault()},onMouseDown:o?null:this.p,onTouchStart:o?null:this.m,onTouchMove:o?null:this.M,onTouchEnd:o?null:this.T,onTouchCancel:o?null:this.S},m&&a.createElement("div",{style:j},m),g&&a.createElement("div",{style:H},g)),a.createElement("input",s({},{type:"checkbox",role:"switch","aria-checked":i,checked:i,disabled:o,style:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}},k,{ref:this.W,onFocus:this.O,onBlur:this.S,onKeyUp:this.D,onChange:this.C})))},n}(a.Component);c.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:r,checkedIcon:l,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56}}}]);
|
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see 4115.diva-web-planner-react.umd.min.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[4115],{34115:(e,t,n)=>{n.r(t),n.d(t,{default:()=>f});var r=n(13125),i=n(43860),a=n(80248),o=n(72463),s=n(88683),d={uniforms:{tDiffuse:{value:null},opacity:{value:1},backgroundImg:{value:null}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float opacity;","uniform sampler2D tDiffuse;","uniform sampler2D backgroundImg;","varying vec2 vUv;","void main() {","\tvec4 texelForground = texture2D( tDiffuse, vUv );"," float brightness = 0.34 * texelForground.x + 0.5 *texelForground.y + 0.16 * texelForground.z; ","\tvec4 texelBackground = texture2D( backgroundImg, vUv );"," if( texelForground.w < 0.001){"," gl_FragColor = vec4(0, 0, 0, 0.0);"," }"," else if( texelBackground.x < 0.3 ){"," gl_FragColor = vec4(brightness,brightness,brightness, texelForground.w)* 0.8;"," }"," else {"," gl_FragColor = (1.0 - opacity) * vec4(brightness,brightness,brightness,texelForground.w);"," }","}"].join("\n")},l=n(82042),c=n(26831),h=n(92528),g=n(3259),u=n(48655),v=n(27754),m=(0,s.getLogger)("Planner","Planner3DGrid"),P=function(){return(0,i.Z)((function Planner3DGrid(e,t){var n=this;(0,r.Z)(this,Planner3DGrid),(0,a.Z)(this,"autoDockingDistance",40),(0,a.Z)(this,"threeContainer",void 0),(0,a.Z)(this,"doShow3DGrid",!1),(0,a.Z)(this,"updatePlannerTrans",void 0),(0,a.Z)(this,"clearSelectionFrom3DGrid",void 0),(0,a.Z)(this,"getAllPlannedElements",void 0),(0,a.Z)(this,"groundPlane",void 0),(0,a.Z)(this,"camera",void 0),(0,a.Z)(this,"renderer",void 0),(0,a.Z)(this,"scene",void 0),(0,a.Z)(this,"sceneTree",void 0),(0,a.Z)(this,"backgroundTex",void 0),(0,a.Z)(this,"backGroundTexChanged",!1),(0,a.Z)(this,"canvasWidth",void 0),(0,a.Z)(this,"canvasHeight",void 0),(0,a.Z)(this,"moveIconPerspective",void 0),(0,a.Z)(this,"rotateIconPerspective",void 0),(0,a.Z)(this,"rotationCenter",void 0),(0,a.Z)(this,"isTransforming",!1),(0,a.Z)(this,"transformWorldPosLastFrame",void 0),(0,a.Z)(this,"curSelectedElement",void 0),(0,a.Z)(this,"blenderPass",null),(0,a.Z)(this,"composer",null),(0,a.Z)(this,"onMouseUpClearSelection",(function(e){n.clearSelectionFrom3DGrid(),n.threeContainer.removeEventListener("mouseup",n.onMouseUpClearSelection)})),(0,a.Z)(this,"getIntersectsGroundPlane",(function(e,t){if(n.camera){var r=new c.iMs,i=new c.Pa4;return e=e/n.canvasWidth*2-1,t=-t/n.canvasHeight*2+1,i.set(e,t,.5),r.setFromCamera(new c.FM8(i.x,i.y),n.camera),r.intersectObject(n.groundPlane,!0)}})),(0,a.Z)(this,"startMove",(function(e,t){n.isTransforming=!0;var r=n.getAllPlannedElements();r.has(e)&&(n.clearSceneTree(),r.forEach((function(e,t){for(var r=0;r<e.length;r++)n.updatePlannerElement(e[r])})),m.debug("Start transforming","Planner3DGrid"),n.updatePlannerTrans(e,t,new o.P(0,0,0),0,5,"START",n.autoDockingDistance))})),(0,a.Z)(this,"stopMove",(function(e,t){m.debug("Stop transforming","Planner3DGrid"),n.isTransforming=!1,n.transformWorldPosLastFrame=void 0,null!=n.curSelectedElement&&n.updatePlannerTrans(e,t,new o.P(0,0,0),0,5,"END",n.autoDockingDistance)})),(0,a.Z)(this,"startRotation",(function(e,t){n.isTransforming=!0;var r=n.getAllPlannedElements();r.has(e)&&(n.clearSceneTree(),r.forEach((function(e,t){for(var r=0;r<e.length;r++)n.updatePlannerElement(e[r])})),n.rotationCenter=void 0,n.updatePlannerTrans(e,t,new o.P(0,0,0),0,5,"START",n.autoDockingDistance))})),(0,a.Z)(this,"stopRotation",(function(e,t){n.isTransforming=!1,n.rotationCenter=void 0,n.updatePlannerTrans(e,t,new o.P(0,0,0),0,5,"END",n.autoDockingDistance)})),(0,a.Z)(this,"handleTranslation",(function(e,t,r){var i=n.getIntersectsGroundPlane(r.x,r.y);if(i.length>0){var a,s=new o.FM(i[0].point.x,i[0].point.z);if(m.debug("MOVE TO WORLD POS "+s.toString(),"Planner3DGrid"),!n.transformWorldPosLastFrame)return void(n.transformWorldPosLastFrame=s);var d=new o.FM(s.x-n.transformWorldPosLastFrame.x,s.y-n.transformWorldPosLastFrame.y),l=null===(a=n.sceneTree)||void 0===a?void 0:a.get(e).get(t);if(!l)return;l.position.x+=d.x,l.position.z+=d.y,null!=n.curSelectedElement&&n.updatePlannerTrans(n.curSelectedElement.getSetId(),n.curSelectedElement.getElementId(),new o.P(100*d.x,0,100*d.y),0,5,"UPDATE",n.autoDockingDistance),n.transformWorldPosLastFrame=s}})),(0,a.Z)(this,"handleRotation",(function(e,t,r){var i=n.getIntersectsGroundPlane(r.x,r.y);if(i.length>0){var a,s=null===(a=n.sceneTree)||void 0===a?void 0:a.get(e).get(t);if(!s)return;var d=new o.FM(i[0].point.x,i[0].point.z);if(n.rotationCenter){var l=new o.FM(d.x-s.position.x,d.y-s.position.z),c=new o.FM(0,1),h=o.FM.angleRad(l,c);d.x<s.position.x&&(h=2*Math.PI-h);var g=s.rotation.z-h;s.rotation.z=h,null!=n.curSelectedElement&&n.updatePlannerTrans(n.curSelectedElement.getSetId(),n.curSelectedElement.getElementId(),new o.P(0,0,0),180*g/Math.PI,5,"UPDATE",n.autoDockingDistance)}else n.rotationCenter=d}})),(0,a.Z)(this,"run",(function(){if(n.doShow3DGrid&&null!=n.renderer&&null!=n.backgroundTex){var e=n,t=n.isTransforming?30:10;setTimeout((function(){var t;null===(t=requestAnimationFrame)||void 0===t||t(e.run)}),1e3/t),n.backGroundTexChanged&&(n.backGroundTexChanged=!1,n.blenderPass.uniforms.backgroundImg.value=n.backgroundTex),n.composer.render()}})),this.getAllPlannedElements=t,this.sceneTree=new Map,this.curSelectedElement=void 0,this.threeContainer=null}),[{key:"setCallbackMethods",value:function setCallbackMethods(e){this.updatePlannerTrans=e}},{key:"initialize",value:function initialize(e,t){if(m.debug("Initialize Planner3D Grid! ","ViewPlanner3DGrid - initialize"),this.canvasWidth=e,this.canvasHeight=t,this.threeContainer=document.getElementById("diva3dImg_3DGrid"),this.threeContainer){this.scene=new c.xsS,this.camera=new c.cPb(24,e/t,.1,1e3),this.renderer=new l.CP7({alpha:!0,antialias:!0}),this.renderer.setClearColor(0,0),this.renderer.setSize(e,t);var n=new c._12(100,100),r=new c.YBo({color:255,transparent:!0,opacity:0});this.groundPlane=new c.Kj0(n,r),this.groundPlane.rotation.x=-Math.PI/2,this.scene.add(this.groundPlane),this.camera.position.z=-3,this.backgroundTex=new c.xEZ,this.threeContainer.appendChild(this.renderer.domElement),this.doShow3DGrid=!1,this.composer=new h.x(this.renderer),this.composer.addPass(new g.C(this.scene,this.camera)),this.blenderPass=new u.T(d),this.blenderPass.uniforms.opacity.value=.92,this.blenderPass.renderToScreen=!0,this.composer.addPass(this.blenderPass)}}},{key:"destroy",value:function destroy(e){var t;this.threeContainer&&(m.debug("Destroy Planner3D Grid! ","ViewPlanner3DGrid - destroy"),this.hide3DGrid(),e.clear3DGridUI(),this.clearSceneTree(),this.hide3DGrid(),this.scene=void 0,this.sceneTree.clear(),null!==(t=this.threeContainer)&&void 0!==t&&t.firstChild&&this.threeContainer.removeChild(this.threeContainer.firstChild),this.backgroundTex=null,this.composer=null,this.blenderPass=null,this.camera=void 0,this.moveIconPerspective=null,this.rotateIconPerspective=null,this.groundPlane=null,this.renderer=void 0)}},{key:"rotToThreeRot",value:function rotToThreeRot(e){var t=new c._fP;t.setFromEuler(new c.USm(e.x*Math.PI/180,e.y*Math.PI/180,e.z*Math.PI/180)),t.w*=-1;var n=new c.USm;return n.setFromQuaternion(t),n.y+=Math.PI,n.z*=-1,n}},{key:"posToThreePos",value:function posToThreePos(e){return new o.P(e.x/100,e.y/100,e.z/100)}},{key:"clearSceneTree",value:function clearSceneTree(){var e=this;this.sceneTree.forEach((function(t,n){t.forEach((function(t,n){e.scene.remove(t)}))}))}},{key:"updateCamera",value:function updateCamera(e){if(this.camera){var t=e.getCamInfo();if(t){var n=this.posToThreePos(t.pos);this.camera.rotation.copy(this.rotToThreeRot(t.rot)),this.camera.position.x=n.x,this.camera.position.y=n.y,this.camera.position.z=n.z,this.camera.updateMatrixWorld()}}}},{key:"updateInteractionIcons",value:function updateInteractionIcons(e,t){var n=new o.FM(-.15,t.getHeightOLT()/100/2+.15);n=o.FM.rotateOrigin(n,t.getRotDeg());var r=new c.Pa4(t.getWorldPosCenter().x/100+n.x,0,t.getWorldPosCenter().z/100+n.y),i=o.FM.convertToVector2(this.convertWorldPosToScreenPos(r));if(null!=i){var a=new o.FM(.15,t.getHeightOLT()/100/2+.15);a=o.FM.rotateOrigin(a,t.getRotDeg());var s=new c.Pa4(t.getWorldPosCenter().x/100+a.x,0,t.getWorldPosCenter().z/100+a.y),d=o.FM.convertToVector2(this.convertWorldPosToScreenPos(s));if(null!=d){var l=new o.FM((i.x+(null==d?void 0:d.x))/2,(i.y+d.y)/2),h=o.FM.getDirection(i,l),g=o.FM.getDirection(d,l),u=o.FM.add(o.FM.mulNum(o.FM.normalize(h),32),l);u.interpretation="pixel";var v=o.FM.add(o.FM.mulNum(o.FM.normalize(g),32),l);v.interpretation="pixel",e.addMove3DGrid(t.getSetId(),t.getElementId(),u,this.startMove,this.handleTranslation,this.stopMove),e.addRot3DGrid(t.getSetId(),t.getElementId(),v,this.startRotation,this.handleRotation,this.stopRotation)}}}},{key:"updatePlannerElement",value:function updatePlannerElement(e){if(e.hasSvgDataOLTBase64()&&this.renderer&&this.scene){var t=(new c.dpR).load(e.getSvgDataOLTBase64());t.wrapS=c.rpg,t.wrapT=c.rpg,t.generateMipmaps=!0,t.anisotropy=this.renderer.capabilities.getMaxAnisotropy();var n=e.getWidthOLT()/100,r=e.getHeightOLT()/100,i=new c._12(n,r),a=new c.vBJ({map:t}),o=new c.Kj0(i,a);o.rotation.z=-e.getRotRad(),o.rotation.x=-Math.PI/2,o.position.x=e.getWorldPosCenter().x/100,o.position.y=e.getLayer()/500,o.position.z=e.getWorldPosCenter().z/100,this.sceneTree.has(e.getSetId())||this.sceneTree.set(e.getSetId(),new Map),this.sceneTree.get(e.getSetId()).set(e.getElementId(),o),this.scene.add(o)}}},{key:"updateScene",value:function updateScene(e,t,n,r,i){var a=this;if(this.renderer||this.camera){e.clear3DGridUI(),this.show3DGrid(),this.clearSceneTree(),this.curSelectedElement=n,this.initBackgroundScene(t),this.canvasWidth=i.imgWidth,this.canvasHeight=i.imgHeight;var o=t.getCamInfo();(this.renderer&&this.renderer.getSize(new c.FM8).x!=i.imgWidth||this.renderer.getSize(new c.FM8).y!=i.imgHeight||(null==o?void 0:o.vertFov)!=this.camera.fov)&&(this.camera.fov=o.vertFov,this.camera.aspect=i.imgWidth/i.imgHeight,this.camera.updateProjectionMatrix(),this.renderer.setSize(i.imgWidth,i.imgHeight)),this.updateCamera(t),r.forEach((function(t,r){for(var i=0;i<t.length;i++)null!=n&&t[i].getElementId()==n.getElementId()&&a.updateInteractionIcons(e,t[i])}))}}},{key:"initBackgroundScene",value:function initBackgroundScene(e){if(!e.HasLayerMaskThreeTexture){var t=new c.dpR;e.LayerMaskThreeTexture=t.load(e.getLayerMaskForSrc())}this.backgroundTex=e.LayerMaskThreeTexture,this.backGroundTexChanged=!0}},{key:"isInTrasnformMode",value:function isInTrasnformMode(){return this.isTransforming}},{key:"show3DGrid",value:function show3DGrid(){this.doShow3DGrid||(this.doShow3DGrid=!0,this.run())}},{key:"hide3DGrid",value:function hide3DGrid(){this.renderer&&this.doShow3DGrid&&(this.renderer.clear(),this.doShow3DGrid=!1)}},{key:"updateUI",value:function updateUI(e,t){e.clear3DGridUI(),this.curSelectedElement=t,this.show3DGrid(),this.updateInteractionIcons(e,t)}},{key:"getPositionOfCanvasContainer",value:function getPositionOfCanvasContainer(){return new o.FM(0,0)}},{key:"convertWorldPosToScreenPos",value:function convertWorldPosToScreenPos(e){var t=e.clone();t.project(this.camera);var n=this.canvasWidth/2,r=this.canvasHeight/2;return t.x=t.x*n+n,t.y=-t.y*r+r,new v.F(t.x,t.y)}}])}(),I=function(){return(0,i.Z)((function Planner3DImageUI(e,t,n){(0,r.Z)(this,Planner3DImageUI),this.settingsState=n,(0,a.Z)(this,"uiHTMLContainer",void 0),(0,a.Z)(this,"classUI","wc3DImageUI"),(0,a.Z)(this,"getConfiguratorState",void 0),(0,a.Z)(this,"plannerPaletteViewInfo",void 0),this.getConfiguratorState=e,this.plannerPaletteViewInfo=t}),[{key:"addDelIcon",value:function addDelIcon(e,t,n,r){n>100||n<0||r>100||r<0||e.addTrashIconUI(t.getSetId(),t.getElementId(),t.getRotDeg(),new o.FM(n,r,"percentage"),"BOX"==t.getPlannerType()?"BOX":"3D")}},{key:"addDimensionInfo",value:function addDimensionInfo(e,t,n,r){var i=r.getAlternateRenderInfo();if(!r.getAlternateRenderingsExist()||null!=i){var a=n.parentElementId+"."+n.shelfGridId+"."+n.shelfRasterHeight,o=r.getLeftBottomFrontUIPos(t,a);if(o&&!(o.x<0||o.x>100||o.y<0||o.y>100)){var s=Math.round(r.getDistanceToGround(t,a));-1!=s&&e.addDistanceFromGround(t,n.parentElementId,s,o)}}}},{key:"addPosNrUI",value:function addPosNrUI(e,t,n,r,i,a){var s;n<0&&(n=0),n>100&&(n=100),r<0&&(r=0),r>100&&(r=100),e.addPosNrUI(t.getSetId(),t.getElementId(),t.getIsDockedAccessoire(),new o.FM(n,r,"percentage"),t.getRotDeg(),1,null===(s=e.getPosNrByBasketId(t.getBasketId()))||void 0===s?void 0:s.toString(),i?"selected":a?"selectable":"unselectable","3D")}},{key:"addBoxPlannerDockingPoints",value:function addBoxPlannerDockingPoints(e,t,n){var r=!1,i=t.getFreeDockingPointByTypeAndNumber("AVO",1);null==i||i.IsDisabled||(r=!0);var a=n.getBoxPlannerCornerUIPos(t.getSetId(),t.getElementId(),"LEFTCENTER");a&&e.addCopy(t.getSetId(),t.getElementId(),"BoxCopyLeft",a,"3D");var o=n.getBoxPlannerCornerUIPos(t.getSetId(),t.getElementId(),"RIGHTCENTER");if(o&&e.addCopy(t.getSetId(),t.getElementId(),"BoxCopyRight",o,"3D"),r){var s=n.getBoxPlannerCornerUIPos(t.getSetId(),t.getElementId(),"TOPCENTER");s&&e.addCopy(t.getSetId(),t.getElementId(),"BoxCopyTop",s,"3D")}}},{key:"addCopyIcon",value:function addCopyIcon(e,t){e.addCopy(t.getSetId(),t.getElementId(),"CopyElement",new o.FM(0,0),"3D")}},{key:"addAccDockingPoints",value:function addAccDockingPoints(e,t,n,r){for(var i=t.getAllDockingPoints(),a=0;a<i.length;a++){var s,d=i[a];if(!(null!==(s=this.plannerPaletteViewInfo)&&void 0!==s&&null!==(s=s.plannerConfiguration.hideAVButtons)&&void 0!==s&&s.includes(d.Type)||this.settingsState.planner2Dot0Active)&&(("AVO"==d.Type||"AVC"==d.Type||"AVU"==d.Type||"AVS"==d.Type||"AVN"==d.Type)&&null==r||r===d.Type))for(var l=0;l<n.length;l++)d.Name==n[l].N&&e.addDP(t.getSetId(),t.getElementId(),d.DpId,"ACC",d.IsDocking?"DOCKING":"NOT_DOCKING",d.OnElementId,t.getRotDeg(),0,new o.FM(n[l].x,n[l].y,"percentage"),"3D")}}},{key:"addOutlinePolygon",value:function addOutlinePolygon(e,t,n,r,i){var a=t.getOutlinePolygonForSVG(n.getSetId(),n.getElementId(),i);a&&e.addOutline3D(n.getSetId(),n.getElementId(),a.points,a.avgCamDist,r,"BOX"==n.getPlannerType())}},{key:"initialize",value:function initialize(e){this.uiHTMLContainer||(this.uiHTMLContainer=document.createElement("div"),this.uiHTMLContainer.classList.add(this.classUI),e.appendChild(this.uiHTMLContainer))}},{key:"updateUI",value:function updateUI(e,t,n,r,i,a,o,s,d){var l=this;e.clear2D3DViewerUI(),t.forEach((function(t,n){for(var s=0;s<t.length;s++){var c=t[s];if(r.hasUIInfosOfElement(c.getSetId(),c.getElementId())){var h=!1,g=o;if(i.has(n))h=i.get(n).map((function(e){return e.getElementId()})).includes(c.getElementId());if(!h&&!o&&a.has(n))for(var u=a.get(n),v=0;v<u.length;v++)if(c.getElementId()==u[v].getElementId()){g=!0;break}switch(l.addOutlinePolygon(e,r,c,h?"selected":g?"selectable":"unselectable",d),c.getPlannerType()){case"STD":var m=["PLANNER","PRODUCTS","PROMOTED","PLANNER_2.0"].includes(l.getConfiguratorState()),P=r.getLeftTopBackUIPos(c.getSetId(),c.getElementId());if(!P||l.settingsState.posNrAreHidden&&!m||l.addPosNrUI(e,c,P.x,P.y,h,g),h&&m){c.getIsDockedAccessoire()?l.addAccDockingPoints(e,c,r.getAllDockingPoints(c.getSetId(),c.getElementId()),"AVO"):l.addAccDockingPoints(e,c,r.getAllDockingPoints(c.getSetId(),c.getElementId()));var I=r.getRightTopBackUIPos(c.getSetId(),c.getElementId());l.addDelIcon(e,c,I.x,I.y),l.addCopyIcon(e,c)}if("ACC_PLANNER"==l.getConfiguratorState()&&c.getIsDockedAccessoire()){var f=r.getRightTopBackUIPos(c.getSetId(),c.getElementId());l.addDelIcon(e,c,f.x,f.y)}break;case"BOX":var p=r.getBoxPlannerCornerUIPos(c.getSetId(),c.getElementId(),"RIGHTTOPFRONT");if(p&&l.addPosNrUI(e,c,p.x,p.y,h,g),h&&(l.addBoxPlannerDockingPoints(e,c,r),!l.checkBoxPlannerSingleElement(t)&&null!=c.getFreeDockingPointByTypeAndNumber("AVO",1))){var D=r.getBoxPlannerCornerUIPos(c.getSetId(),c.getElementId(),"RIGHTTOPFRONT");D&&l.addDelIcon(e,c,D.x,D.y)}}}}})),n.forEach((function(t,n){for(var i=0;i<t.length;i++){var a=t[i];a.isShelfAcc&&l.addDimensionInfo(e,n,a,r)}}))}},{key:"checkBoxPlannerSingleElement",value:function checkBoxPlannerSingleElement(e){if(1==e.length)return!0;if(2==e.length)for(var t=e[0].getAllDockingPoints(),n=e[0].getAllDockingPoints(),r=0;r<t.length;r++)for(var i=t[r],a=0;a<n.length;a++){var o=n[a];if(i.IsDocking&&o.IsDocking&&2==i.Number&&2==o.Number&&("AVO"==i.Type||"AVU"==i.Type))return!0}return!1}},{key:"Class3DUI",get:function get(){return this.classUI}}])}(),f=function(){return(0,i.Z)((function Planner3DImage(e,t,n,i,s,d,l){(0,r.Z)(this,Planner3DImage),(0,a.Z)(this,"imageContainer",void 0),(0,a.Z)(this,"UIHandler",void 0),(0,a.Z)(this,"curRendering",void 0),(0,a.Z)(this,"planner3DGrid",void 0),(0,a.Z)(this,"update3DImgSrcInView",void 0),(0,a.Z)(this,"onDoShowNav3DChanged",void 0),(0,a.Z)(this,"enablePlanner3DGrid",void 0),this.UIHandler=new I(e,d,l),this.curRendering=new o.Oy("Placeholder","Placeholder","",-1,-1,!1,!1,0,!1,!1,"STREAM"),this.planner3DGrid=new P(n,s),this.onDoShowNav3DChanged=i,this.enablePlanner3DGrid=!1,this.update3DImgSrcInView=t}),[{key:"initialize",value:function initialize(e,t){this.imageContainer=document.getElementById(e),this.planner3DGrid.setCallbackMethods(t),this.imageContainer&&this.UIHandler.initialize(this.imageContainer)}},{key:"handlePlanner3DGridChanged",value:function handlePlanner3DGridChanged(e,t,n,r){if(n)this.enablePlanner3DGrid&&(this.enablePlanner3DGrid=!1,this.planner3DGrid.destroy(e));else{var i=this.enablePlanner3DGrid;this.enablePlanner3DGrid=!!r||!this.enablePlanner3DGrid,i&&!this.enablePlanner3DGrid?this.planner3DGrid.destroy(e):!i&&this.enablePlanner3DGrid&&this.planner3DGrid.initialize(t.imgWidth,t.imgHeight)}}},{key:"clearView",value:function clearView(e){this.planner3DGrid.destroy(e),this.curRendering=new o.Oy("Placeholder","Placeholder","",-1,-1,!1,!1,0,!1,!1,"STREAM"),this.update3DImgSrcInView("data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==")}},{key:"getPlanner3DGridEnabled",value:function getPlanner3DGridEnabled(){return this.enablePlanner3DGrid}},{key:"getPlanner3DGridIsInTransformMode",value:function getPlanner3DGridIsInTransformMode(){return this.planner3DGrid.isInTrasnformMode()}},{key:"updateUI",value:function updateUI(e,t,n,r,i,a,o,s){var d=this;this.enablePlanner3DGrid&&(r.size>0?r.forEach((function(t,n){for(var r=0;r<t.length;r++)d.planner3DGrid.updateUI(e,t[r])})):e.clear2D3DViewerUI()),this.UIHandler.updateUI(e,t,n,this.curRendering,r,i,a,o,s)}},{key:"updatePlannerView",value:function updatePlannerView(e,t,n,r,i){var a=this.curRendering.getHasStaticBackground(),o=t.getHasStaticBackground();if(a!=o&&this.onDoShowNav3DChanged(!o),this.curRendering=t,this.update3DImgSrcInView(t.getImageForSrc()),this.enablePlanner3DGrid){var s=void 0;r.size>0&&r.forEach((function(e,t){null==s&&e.length>0&&(s=e[0])})),this.planner3DGrid.updateScene(e,t,s,n,i)}}},{key:"resetSelectedElementsOnEnterPlannerMode",value:function resetSelectedElementsOnEnterPlannerMode(){return!1}}])}()}}]);
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[4115],{34115:(e,t,n)=>{n.r(t),n.d(t,{default:()=>I});var r=n(13125),i=n(43860),a=n(80248),o=n(72463),s=n(88683),d={uniforms:{tDiffuse:{value:null},opacity:{value:1},backgroundImg:{value:null}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float opacity;","uniform sampler2D tDiffuse;","uniform sampler2D backgroundImg;","varying vec2 vUv;","void main() {","\tvec4 texelForground = texture2D( tDiffuse, vUv );"," float brightness = 0.34 * texelForground.x + 0.5 *texelForground.y + 0.16 * texelForground.z; ","\tvec4 texelBackground = texture2D( backgroundImg, vUv );"," if( texelForground.w < 0.001){"," gl_FragColor = vec4(0, 0, 0, 0.0);"," }"," else if( texelBackground.x < 0.3 ){"," gl_FragColor = vec4(brightness,brightness,brightness, texelForground.w)* 0.8;"," }"," else {"," gl_FragColor = (1.0 - opacity) * vec4(brightness,brightness,brightness,texelForground.w);"," }","}"].join("\n")},l=n(82042),c=n(92528),h=n(3259),g=n(48655),u=n(27754),v=(0,s.getLogger)("Planner","Planner3DGrid"),m=function(){return(0,i.Z)((function Planner3DGrid(e,t){var n=this;(0,r.Z)(this,Planner3DGrid),(0,a.Z)(this,"autoDockingDistance",40),(0,a.Z)(this,"threeContainer",void 0),(0,a.Z)(this,"doShow3DGrid",!1),(0,a.Z)(this,"updatePlannerTrans",void 0),(0,a.Z)(this,"clearSelectionFrom3DGrid",void 0),(0,a.Z)(this,"getAllPlannedElements",void 0),(0,a.Z)(this,"groundPlane",void 0),(0,a.Z)(this,"camera",void 0),(0,a.Z)(this,"renderer",void 0),(0,a.Z)(this,"scene",void 0),(0,a.Z)(this,"sceneTree",void 0),(0,a.Z)(this,"backgroundTex",void 0),(0,a.Z)(this,"backGroundTexChanged",!1),(0,a.Z)(this,"canvasWidth",void 0),(0,a.Z)(this,"canvasHeight",void 0),(0,a.Z)(this,"moveIconPerspective",void 0),(0,a.Z)(this,"rotateIconPerspective",void 0),(0,a.Z)(this,"rotationCenter",void 0),(0,a.Z)(this,"isTransforming",!1),(0,a.Z)(this,"transformWorldPosLastFrame",void 0),(0,a.Z)(this,"curSelectedElement",void 0),(0,a.Z)(this,"blenderPass",null),(0,a.Z)(this,"composer",null),(0,a.Z)(this,"onMouseUpClearSelection",(function(e){n.clearSelectionFrom3DGrid(),n.threeContainer.removeEventListener("mouseup",n.onMouseUpClearSelection)})),(0,a.Z)(this,"getIntersectsGroundPlane",(function(e,t){if(n.camera){var r=new l.iMs,i=new l.Pa4;return e=e/n.canvasWidth*2-1,t=-t/n.canvasHeight*2+1,i.set(e,t,.5),r.setFromCamera(new l.FM8(i.x,i.y),n.camera),r.intersectObject(n.groundPlane,!0)}})),(0,a.Z)(this,"startMove",(function(e,t){n.isTransforming=!0;var r=n.getAllPlannedElements();r.has(e)&&(n.clearSceneTree(),r.forEach((function(e,t){for(var r=0;r<e.length;r++)n.updatePlannerElement(e[r])})),v.debug("Start transforming","Planner3DGrid"),n.updatePlannerTrans(e,t,new o.P(0,0,0),0,5,"START",n.autoDockingDistance))})),(0,a.Z)(this,"stopMove",(function(e,t){v.debug("Stop transforming","Planner3DGrid"),n.isTransforming=!1,n.transformWorldPosLastFrame=void 0,null!=n.curSelectedElement&&n.updatePlannerTrans(e,t,new o.P(0,0,0),0,5,"END",n.autoDockingDistance)})),(0,a.Z)(this,"startRotation",(function(e,t){n.isTransforming=!0;var r=n.getAllPlannedElements();r.has(e)&&(n.clearSceneTree(),r.forEach((function(e,t){for(var r=0;r<e.length;r++)n.updatePlannerElement(e[r])})),n.rotationCenter=void 0,n.updatePlannerTrans(e,t,new o.P(0,0,0),0,5,"START",n.autoDockingDistance))})),(0,a.Z)(this,"stopRotation",(function(e,t){n.isTransforming=!1,n.rotationCenter=void 0,n.updatePlannerTrans(e,t,new o.P(0,0,0),0,5,"END",n.autoDockingDistance)})),(0,a.Z)(this,"handleTranslation",(function(e,t,r){var i=n.getIntersectsGroundPlane(r.x,r.y);if(i.length>0){var a,s=new o.FM(i[0].point.x,i[0].point.z);if(v.debug("MOVE TO WORLD POS "+s.toString(),"Planner3DGrid"),!n.transformWorldPosLastFrame)return void(n.transformWorldPosLastFrame=s);var d=new o.FM(s.x-n.transformWorldPosLastFrame.x,s.y-n.transformWorldPosLastFrame.y),l=null===(a=n.sceneTree)||void 0===a?void 0:a.get(e).get(t);if(!l)return;l.position.x+=d.x,l.position.z+=d.y,null!=n.curSelectedElement&&n.updatePlannerTrans(n.curSelectedElement.getSetId(),n.curSelectedElement.getElementId(),new o.P(100*d.x,0,100*d.y),0,5,"UPDATE",n.autoDockingDistance),n.transformWorldPosLastFrame=s}})),(0,a.Z)(this,"handleRotation",(function(e,t,r){var i=n.getIntersectsGroundPlane(r.x,r.y);if(i.length>0){var a,s=null===(a=n.sceneTree)||void 0===a?void 0:a.get(e).get(t);if(!s)return;var d=new o.FM(i[0].point.x,i[0].point.z);if(n.rotationCenter){var l=new o.FM(d.x-s.position.x,d.y-s.position.z),c=new o.FM(0,1),h=o.FM.angleRad(l,c);d.x<s.position.x&&(h=2*Math.PI-h);var g=s.rotation.z-h;s.rotation.z=h,null!=n.curSelectedElement&&n.updatePlannerTrans(n.curSelectedElement.getSetId(),n.curSelectedElement.getElementId(),new o.P(0,0,0),180*g/Math.PI,5,"UPDATE",n.autoDockingDistance)}else n.rotationCenter=d}})),(0,a.Z)(this,"run",(function(){if(n.doShow3DGrid&&null!=n.renderer&&null!=n.backgroundTex){var e=n,t=n.isTransforming?30:10;setTimeout((function(){var t;null===(t=requestAnimationFrame)||void 0===t||t(e.run)}),1e3/t),n.backGroundTexChanged&&(n.backGroundTexChanged=!1,n.blenderPass.uniforms.backgroundImg.value=n.backgroundTex),n.composer.render()}})),this.getAllPlannedElements=t,this.sceneTree=new Map,this.curSelectedElement=void 0,this.threeContainer=null}),[{key:"setCallbackMethods",value:function setCallbackMethods(e){this.updatePlannerTrans=e}},{key:"initialize",value:function initialize(e,t){if(v.debug("Initialize Planner3D Grid! ","ViewPlanner3DGrid - initialize"),this.canvasWidth=e,this.canvasHeight=t,this.threeContainer=document.getElementById("diva3dImg_3DGrid"),this.threeContainer){this.scene=new l.xsS,this.camera=new l.cPb(24,e/t,.1,1e3),this.renderer=new l.CP7({alpha:!0,antialias:!0}),this.renderer.setClearColor(0,0),this.renderer.setSize(e,t);var n=new l._12(100,100),r=new l.YBo({color:255,transparent:!0,opacity:0});this.groundPlane=new l.Kj0(n,r),this.groundPlane.rotation.x=-Math.PI/2,this.scene.add(this.groundPlane),this.camera.position.z=-3,this.backgroundTex=new l.xEZ,this.threeContainer.appendChild(this.renderer.domElement),this.doShow3DGrid=!1,this.composer=new c.x(this.renderer),this.composer.addPass(new h.C(this.scene,this.camera)),this.blenderPass=new g.T(d),this.blenderPass.uniforms.opacity.value=.92,this.blenderPass.renderToScreen=!0,this.composer.addPass(this.blenderPass)}}},{key:"destroy",value:function destroy(e){var t;this.threeContainer&&(v.debug("Destroy Planner3D Grid! ","ViewPlanner3DGrid - destroy"),this.hide3DGrid(),e.clear3DGridUI(),this.clearSceneTree(),this.hide3DGrid(),this.scene=void 0,this.sceneTree.clear(),null!==(t=this.threeContainer)&&void 0!==t&&t.firstChild&&this.threeContainer.removeChild(this.threeContainer.firstChild),this.backgroundTex=null,this.composer=null,this.blenderPass=null,this.camera=void 0,this.moveIconPerspective=null,this.rotateIconPerspective=null,this.groundPlane=null,this.renderer=void 0)}},{key:"rotToThreeRot",value:function rotToThreeRot(e){var t=new l._fP;t.setFromEuler(new l.USm(e.x*Math.PI/180,e.y*Math.PI/180,e.z*Math.PI/180)),t.w*=-1;var n=new l.USm;return n.setFromQuaternion(t),n.y+=Math.PI,n.z*=-1,n}},{key:"posToThreePos",value:function posToThreePos(e){return new o.P(e.x/100,e.y/100,e.z/100)}},{key:"clearSceneTree",value:function clearSceneTree(){var e=this;this.sceneTree.forEach((function(t,n){t.forEach((function(t,n){e.scene.remove(t)}))}))}},{key:"updateCamera",value:function updateCamera(e){if(this.camera){var t=e.getCamInfo();if(t){var n=this.posToThreePos(t.pos);this.camera.rotation.copy(this.rotToThreeRot(t.rot)),this.camera.position.x=n.x,this.camera.position.y=n.y,this.camera.position.z=n.z,this.camera.updateMatrixWorld()}}}},{key:"updateInteractionIcons",value:function updateInteractionIcons(e,t){var n=new o.FM(-.15,t.getHeightOLT()/100/2+.15);n=o.FM.rotateOrigin(n,t.getRotDeg());var r=new l.Pa4(t.getWorldPosCenter().x/100+n.x,0,t.getWorldPosCenter().z/100+n.y),i=o.FM.convertToVector2(this.convertWorldPosToScreenPos(r));if(null!=i){var a=new o.FM(.15,t.getHeightOLT()/100/2+.15);a=o.FM.rotateOrigin(a,t.getRotDeg());var s=new l.Pa4(t.getWorldPosCenter().x/100+a.x,0,t.getWorldPosCenter().z/100+a.y),d=o.FM.convertToVector2(this.convertWorldPosToScreenPos(s));if(null!=d){var c=new o.FM((i.x+(null==d?void 0:d.x))/2,(i.y+d.y)/2),h=o.FM.getDirection(i,c),g=o.FM.getDirection(d,c),u=o.FM.add(o.FM.mulNum(o.FM.normalize(h),32),c);u.interpretation="pixel";var v=o.FM.add(o.FM.mulNum(o.FM.normalize(g),32),c);v.interpretation="pixel",e.addMove3DGrid(t.getSetId(),t.getElementId(),u,this.startMove,this.handleTranslation,this.stopMove),e.addRot3DGrid(t.getSetId(),t.getElementId(),v,this.startRotation,this.handleRotation,this.stopRotation)}}}},{key:"updatePlannerElement",value:function updatePlannerElement(e){if(e.hasSvgDataOLTBase64()&&this.renderer&&this.scene){var t=(new l.dpR).load(e.getSvgDataOLTBase64());t.wrapS=l.rpg,t.wrapT=l.rpg,t.generateMipmaps=!0,t.anisotropy=this.renderer.capabilities.getMaxAnisotropy();var n=e.getWidthOLT()/100,r=e.getHeightOLT()/100,i=new l._12(n,r),a=new l.vBJ({map:t}),o=new l.Kj0(i,a);o.rotation.z=-e.getRotRad(),o.rotation.x=-Math.PI/2,o.position.x=e.getWorldPosCenter().x/100,o.position.y=e.getLayer()/500,o.position.z=e.getWorldPosCenter().z/100,this.sceneTree.has(e.getSetId())||this.sceneTree.set(e.getSetId(),new Map),this.sceneTree.get(e.getSetId()).set(e.getElementId(),o),this.scene.add(o)}}},{key:"updateScene",value:function updateScene(e,t,n,r,i){var a=this;if(this.renderer||this.camera){e.clear3DGridUI(),this.show3DGrid(),this.clearSceneTree(),this.curSelectedElement=n,this.initBackgroundScene(t),this.canvasWidth=i.imgWidth,this.canvasHeight=i.imgHeight;var o=t.getCamInfo();(this.renderer&&this.renderer.getSize(new l.FM8).x!=i.imgWidth||this.renderer.getSize(new l.FM8).y!=i.imgHeight||(null==o?void 0:o.vertFov)!=this.camera.fov)&&(this.camera.fov=o.vertFov,this.camera.aspect=i.imgWidth/i.imgHeight,this.camera.updateProjectionMatrix(),this.renderer.setSize(i.imgWidth,i.imgHeight)),this.updateCamera(t),r.forEach((function(t,r){for(var i=0;i<t.length;i++)null!=n&&t[i].getElementId()==n.getElementId()&&a.updateInteractionIcons(e,t[i])}))}}},{key:"initBackgroundScene",value:function initBackgroundScene(e){if(!e.HasLayerMaskThreeTexture){var t=new l.dpR;e.LayerMaskThreeTexture=t.load(e.getLayerMaskForSrc())}this.backgroundTex=e.LayerMaskThreeTexture,this.backGroundTexChanged=!0}},{key:"isInTrasnformMode",value:function isInTrasnformMode(){return this.isTransforming}},{key:"show3DGrid",value:function show3DGrid(){this.doShow3DGrid||(this.doShow3DGrid=!0,this.run())}},{key:"hide3DGrid",value:function hide3DGrid(){this.renderer&&this.doShow3DGrid&&(this.renderer.clear(),this.doShow3DGrid=!1)}},{key:"updateUI",value:function updateUI(e,t){e.clear3DGridUI(),this.curSelectedElement=t,this.show3DGrid(),this.updateInteractionIcons(e,t)}},{key:"getPositionOfCanvasContainer",value:function getPositionOfCanvasContainer(){return new o.FM(0,0)}},{key:"convertWorldPosToScreenPos",value:function convertWorldPosToScreenPos(e){var t=e.clone();t.project(this.camera);var n=this.canvasWidth/2,r=this.canvasHeight/2;return t.x=t.x*n+n,t.y=-t.y*r+r,new u.F(t.x,t.y)}}])}(),P=function(){return(0,i.Z)((function Planner3DImageUI(e,t,n){(0,r.Z)(this,Planner3DImageUI),this.settingsState=n,(0,a.Z)(this,"uiHTMLContainer",void 0),(0,a.Z)(this,"classUI","wc3DImageUI"),(0,a.Z)(this,"getConfiguratorState",void 0),(0,a.Z)(this,"plannerPaletteViewInfo",void 0),this.getConfiguratorState=e,this.plannerPaletteViewInfo=t}),[{key:"addDelIcon",value:function addDelIcon(e,t,n,r){n>100||n<0||r>100||r<0||e.addTrashIconUI(t.getSetId(),t.getElementId(),t.getRotDeg(),new o.FM(n,r,"percentage"),"BOX"==t.getPlannerType()?"BOX":"3D")}},{key:"addDimensionInfo",value:function addDimensionInfo(e,t,n,r){var i=r.getAlternateRenderInfo();if(!r.getAlternateRenderingsExist()||null!=i){var a=n.parentElementId+"."+n.shelfGridId+"."+n.shelfRasterHeight,o=r.getLeftBottomFrontUIPos(t,a);if(o&&!(o.x<0||o.x>100||o.y<0||o.y>100)){var s=Math.round(r.getDistanceToGround(t,a));-1!=s&&e.addDistanceFromGround(t,n.parentElementId,s,o)}}}},{key:"addPosNrUI",value:function addPosNrUI(e,t,n,r,i,a){var s;n<0&&(n=0),n>100&&(n=100),r<0&&(r=0),r>100&&(r=100),e.addPosNrUI(t.getSetId(),t.getElementId(),t.getIsDockedAccessoire(),new o.FM(n,r,"percentage"),t.getRotDeg(),1,null===(s=e.getPosNrByBasketId(t.getBasketId()))||void 0===s?void 0:s.toString(),i?"selected":a?"selectable":"unselectable","3D")}},{key:"addBoxPlannerDockingPoints",value:function addBoxPlannerDockingPoints(e,t,n){var r=!1,i=t.getFreeDockingPointByTypeAndNumber("AVO",1);null==i||i.IsDisabled||(r=!0);var a=n.getBoxPlannerCornerUIPos(t.getSetId(),t.getElementId(),"LEFTCENTER");a&&e.addCopy(t.getSetId(),t.getElementId(),"BoxCopyLeft",a,"3D");var o=n.getBoxPlannerCornerUIPos(t.getSetId(),t.getElementId(),"RIGHTCENTER");if(o&&e.addCopy(t.getSetId(),t.getElementId(),"BoxCopyRight",o,"3D"),r){var s=n.getBoxPlannerCornerUIPos(t.getSetId(),t.getElementId(),"TOPCENTER");s&&e.addCopy(t.getSetId(),t.getElementId(),"BoxCopyTop",s,"3D")}}},{key:"addCopyIcon",value:function addCopyIcon(e,t){e.addCopy(t.getSetId(),t.getElementId(),"CopyElement",new o.FM(0,0),"3D")}},{key:"addAccDockingPoints",value:function addAccDockingPoints(e,t,n,r){for(var i=t.getAllDockingPoints(),a=0;a<i.length;a++){var s,d=i[a];if(!(null!==(s=this.plannerPaletteViewInfo)&&void 0!==s&&null!==(s=s.plannerConfiguration.hideAVButtons)&&void 0!==s&&s.includes(d.Type)||this.settingsState.planner2Dot0Active)&&(("AVO"==d.Type||"AVC"==d.Type||"AVU"==d.Type||"AVS"==d.Type||"AVN"==d.Type)&&null==r||r===d.Type))for(var l=0;l<n.length;l++)d.Name==n[l].N&&e.addDP(t.getSetId(),t.getElementId(),d.DpId,"ACC",d.IsDocking?"DOCKING":"NOT_DOCKING",d.OnElementId,t.getRotDeg(),0,new o.FM(n[l].x,n[l].y,"percentage"),"3D")}}},{key:"addOutlinePolygon",value:function addOutlinePolygon(e,t,n,r,i){var a=t.getOutlinePolygonForSVG(n.getSetId(),n.getElementId(),i);a&&e.addOutline3D(n.getSetId(),n.getElementId(),a.points,a.avgCamDist,r,"BOX"==n.getPlannerType())}},{key:"initialize",value:function initialize(e){this.uiHTMLContainer||(this.uiHTMLContainer=document.createElement("div"),this.uiHTMLContainer.classList.add(this.classUI),e.appendChild(this.uiHTMLContainer))}},{key:"updateUI",value:function updateUI(e,t,n,r,i,a,o,s,d){var l=this;e.clear2D3DViewerUI(),t.forEach((function(t,n){for(var s=0;s<t.length;s++){var c=t[s];if(r.hasUIInfosOfElement(c.getSetId(),c.getElementId())){var h=!1,g=o;if(i.has(n))h=i.get(n).map((function(e){return e.getElementId()})).includes(c.getElementId());if(!h&&!o&&a.has(n))for(var u=a.get(n),v=0;v<u.length;v++)if(c.getElementId()==u[v].getElementId()){g=!0;break}switch(l.addOutlinePolygon(e,r,c,h?"selected":g?"selectable":"unselectable",d),c.getPlannerType()){case"STD":var m=["PLANNER","PRODUCTS","PROMOTED","PLANNER_2.0"].includes(l.getConfiguratorState()),P=r.getLeftTopBackUIPos(c.getSetId(),c.getElementId());if(!P||l.settingsState.posNrAreHidden&&!m||l.addPosNrUI(e,c,P.x,P.y,h,g),h&&m){c.getIsDockedAccessoire()?l.addAccDockingPoints(e,c,r.getAllDockingPoints(c.getSetId(),c.getElementId()),"AVO"):l.addAccDockingPoints(e,c,r.getAllDockingPoints(c.getSetId(),c.getElementId()));var I=r.getRightTopBackUIPos(c.getSetId(),c.getElementId());l.addDelIcon(e,c,I.x,I.y),l.addCopyIcon(e,c)}if("ACC_PLANNER"==l.getConfiguratorState()&&c.getIsDockedAccessoire()){var f=r.getRightTopBackUIPos(c.getSetId(),c.getElementId());l.addDelIcon(e,c,f.x,f.y)}break;case"BOX":var p=r.getBoxPlannerCornerUIPos(c.getSetId(),c.getElementId(),"RIGHTTOPFRONT");if(p&&l.addPosNrUI(e,c,p.x,p.y,h,g),h&&(l.addBoxPlannerDockingPoints(e,c,r),!l.checkBoxPlannerSingleElement(t)&&null!=c.getFreeDockingPointByTypeAndNumber("AVO",1))){var D=r.getBoxPlannerCornerUIPos(c.getSetId(),c.getElementId(),"RIGHTTOPFRONT");D&&l.addDelIcon(e,c,D.x,D.y)}}}}})),n.forEach((function(t,n){for(var i=0;i<t.length;i++){var a=t[i];a.isShelfAcc&&l.addDimensionInfo(e,n,a,r)}}))}},{key:"checkBoxPlannerSingleElement",value:function checkBoxPlannerSingleElement(e){if(1==e.length)return!0;if(2==e.length)for(var t=e[0].getAllDockingPoints(),n=e[0].getAllDockingPoints(),r=0;r<t.length;r++)for(var i=t[r],a=0;a<n.length;a++){var o=n[a];if(i.IsDocking&&o.IsDocking&&2==i.Number&&2==o.Number&&("AVO"==i.Type||"AVU"==i.Type))return!0}return!1}},{key:"Class3DUI",get:function get(){return this.classUI}}])}(),I=function(){return(0,i.Z)((function Planner3DImage(e,t,n,i,s,d,l){(0,r.Z)(this,Planner3DImage),(0,a.Z)(this,"imageContainer",void 0),(0,a.Z)(this,"UIHandler",void 0),(0,a.Z)(this,"curRendering",void 0),(0,a.Z)(this,"planner3DGrid",void 0),(0,a.Z)(this,"update3DImgSrcInView",void 0),(0,a.Z)(this,"onDoShowNav3DChanged",void 0),(0,a.Z)(this,"enablePlanner3DGrid",void 0),this.UIHandler=new P(e,d,l),this.curRendering=new o.Oy("Placeholder","Placeholder","",-1,-1,!1,!1,0,!1,!1,"STREAM"),this.planner3DGrid=new m(n,s),this.onDoShowNav3DChanged=i,this.enablePlanner3DGrid=!1,this.update3DImgSrcInView=t}),[{key:"initialize",value:function initialize(e,t){this.imageContainer=document.getElementById(e),this.planner3DGrid.setCallbackMethods(t),this.imageContainer&&this.UIHandler.initialize(this.imageContainer)}},{key:"handlePlanner3DGridChanged",value:function handlePlanner3DGridChanged(e,t,n,r){if(n)this.enablePlanner3DGrid&&(this.enablePlanner3DGrid=!1,this.planner3DGrid.destroy(e));else{var i=this.enablePlanner3DGrid;this.enablePlanner3DGrid=!!r||!this.enablePlanner3DGrid,i&&!this.enablePlanner3DGrid?this.planner3DGrid.destroy(e):!i&&this.enablePlanner3DGrid&&this.planner3DGrid.initialize(t.imgWidth,t.imgHeight)}}},{key:"clearView",value:function clearView(e){this.planner3DGrid.destroy(e),this.curRendering=new o.Oy("Placeholder","Placeholder","",-1,-1,!1,!1,0,!1,!1,"STREAM"),this.update3DImgSrcInView("data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==")}},{key:"getPlanner3DGridEnabled",value:function getPlanner3DGridEnabled(){return this.enablePlanner3DGrid}},{key:"getPlanner3DGridIsInTransformMode",value:function getPlanner3DGridIsInTransformMode(){return this.planner3DGrid.isInTrasnformMode()}},{key:"updateUI",value:function updateUI(e,t,n,r,i,a,o,s){var d=this;this.enablePlanner3DGrid&&(r.size>0?r.forEach((function(t,n){for(var r=0;r<t.length;r++)d.planner3DGrid.updateUI(e,t[r])})):e.clear2D3DViewerUI()),this.UIHandler.updateUI(e,t,n,this.curRendering,r,i,a,o,s)}},{key:"updatePlannerView",value:function updatePlannerView(e,t,n,r,i){var a=this.curRendering.getHasStaticBackground(),o=t.getHasStaticBackground();if(a!=o&&this.onDoShowNav3DChanged(!o),this.curRendering=t,this.update3DImgSrcInView(t.getImageForSrc()),this.enablePlanner3DGrid){var s=void 0;r.size>0&&r.forEach((function(e,t){null==s&&e.length>0&&(s=e[0])})),this.planner3DGrid.updateScene(e,t,s,n,i)}}},{key:"resetSelectedElementsOnEnterPlannerMode",value:function resetSelectedElementsOnEnterPlannerMode(){return!1}}])}()}}]);
|
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see 4219.diva-web-planner-react.umd.min.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[4219,1578,5552],{91578:(t,i,o)=>{o.r(i),o.d(i,{default:()=>T});var a=o(65515),r=o.n(a),l=(o(87363),o(68692)),c=o(93379),d=o.n(c),u=o(7795),p=o.n(u),f=o(90569),v=o.n(f),g=o(3565),m=o.n(g),b=o(19216),y=o.n(b),w=o(44589),k=o.n(w),x=o(75581),C={};C.styleTagTransform=k(),C.setAttributes=m(),C.insert=v().bind(null,"head"),C.domAPI=p(),C.insertStyleElement=y();d()(x.ZP,C);x.ZP&&x.ZP.locals&&x.ZP.locals;var S=o(47514);const T=function Toggle(t){var i,o=t.onChange,a=t.val,c=t.state,d=t.on,u=t.off,p=t.alwaysActiveColor,f=t.height,v=void 0===f?40:f,g=t.width,m=void 0===g?80:g,b=t.handleDiameter,y=void 0===b?32:b,w=t.toggleTextClassName,k=void 0===w?x.f6:w,C=null===(i=getComputedStyle(document.documentElement).getPropertyValue("--primaryColor"))||void 0===i?void 0:i.replace(/ /g,"");return(0,S.jsx)(l.Z,{className:"no-swiping",checkedIcon:d?(0,S.jsx)("div",{className:r()(k),id:"yes",children:d}):(0,S.jsx)(S.Fragment,{}),uncheckedIcon:u?(0,S.jsx)("div",{className:r()(k),id:"no",children:u}):(0,S.jsx)(S.Fragment,{}),onChange:function onChange(){return o(null!=a?a:!c)},checked:c,onColor:C,offColor:p?C:"#CACACA",height:v,width:m,handleDiameter:y})}},54219:(t,i,o)=>{o.r(i),o.d(i,{default:()=>E});o(87363);var a=o(93379),r=o.n(a),l=o(7795),c=o.n(l),d=o(90569),u=o.n(d),p=o(3565),f=o.n(p),v=o(19216),g=o.n(v),m=o(44589),b=o.n(m),y=o(29112),w={};w.styleTagTransform=b(),w.setAttributes=f(),w.insert=u().bind(null,"head"),w.domAPI=c(),w.insertStyleElement=g();r()(y.Z,w);y.Z&&y.Z.locals&&y.Z.locals;var k=o(88130),x=o(91578),C=o(9420),S=o(88683),T=o(35907),D=o(47514),M=(0,S.getLogger)("Planner","ToggleHandler");const E=(0,C.Pi)((function ToggleHeader(t){var i,o,a=t.item,r=(0,k.NP)(),l=a.groups[0].items;if(!l)return(0,D.jsx)(D.Fragment,{});for(var c=0;c<l.length;c++){var d,u;null!==(d=l[c].codex)&&void 0!==d&&d.startsWith("OPVNEIN")&&(o=l[c]),null!==(u=l[c].codex)&&void 0!==u&&u.startsWith("OPVJA")&&(i=l[c])}return o&&i||(2==l.length&&(o=l[0],i=l[1]),o&&i)?(0,D.jsx)("div",{className:y.R,children:(0,D.jsx)(x.default,{onChange:function onChange(){r.paletteViewHandler.clickedOnConfigPalette(o.sel?i:o,void 0,a.id)},val:a,state:0==o.sel,off:o.text,on:i.text})}):(M.error(new T.GE("Achtung! Bei der Option: "+l[0].op+" gibt es keine eindeutige werte für JA und NEIN",{code:"WC_0011"})),(0,D.jsx)(D.Fragment,{}))}))},75581:(t,i,o)=>{o.d(i,{ZP:()=>u,f6:()=>d});var a=o(8081),r=o.n(a),l=o(23645),c=o.n(l)()(r());c.push([t.id,".index-module--lgscn {\n display: flex;\n font-weight: 300;\n line-height: 40px;\n gap: 24px;\n}\n\n.index-module--D7_Ss {\n padding-left: 16px;\n color: white;\n line-height: 40px;\n font-weight: 300;\n}\n\n.index-module--D7_Ss#yes {\n padding-left: 16px;\n}\n\n.index-module--D7_Ss#no {\n padding-left: 4px;\n}\n",""]);var d="index-module--D7_Ss";const u=c},29112:(t,i,o)=>{o.d(i,{R:()=>d,Z:()=>u});var a=o(8081),r=o.n(a),l=o(23645),c=o.n(l)()(r());c.push([t.id,".index-module--ydvXj {\n float: right;\n}\n",""]);var d="index-module--ydvXj";const u=c},68692:(t,i,o)=>{o.d(i,{Z:()=>c});var a=o(87363);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])}return t},s.apply(this,arguments)}var r=a.createElement("svg",{viewBox:"-2 -5 14 20",height:"100%",width:"100%",style:{position:"absolute",top:0}},a.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"})),l=a.createElement("svg",{height:"100%",width:"100%",viewBox:"-2 -5 17 21",style:{position:"absolute",top:0}},a.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}));function h(t){if(7===t.length)return t;for(var i="#",o=1;o<4;o+=1)i+=t[o]+t[o];return i}function e(t,i,o,a,r){return function(t,i,o,a,r){var l=(t-o)/(i-o);if(0===l)return a;if(1===l)return r;for(var c="#",d=1;d<6;d+=2){var u=parseInt(a.substr(d,2),16),p=parseInt(r.substr(d,2),16),f=Math.round((1-l)*u+l*p).toString(16);1===f.length&&(f="0"+f),c+=f}return c}(t,i,o,h(a),h(r))}var c=function(t){function n(i){t.call(this,i);var o=i.height,a=i.width,r=i.checked;this.t=i.handleDiameter||o-2,this.i=Math.max(a-o,a-(o+this.t)/2),this.o=Math.max(0,(o-this.t)/2),this.state={h:r?this.i:this.o},this.l=0,this.u=0,this.p=this.p.bind(this),this.v=this.v.bind(this),this.k=this.k.bind(this),this.m=this.m.bind(this),this.M=this.M.bind(this),this.T=this.T.bind(this),this.$=this.$.bind(this),this.C=this.C.bind(this),this.D=this.D.bind(this),this.O=this.O.bind(this),this.S=this.S.bind(this),this.W=this.W.bind(this)}return t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n,n.prototype.componentDidMount=function(){this.I=!0},n.prototype.componentDidUpdate=function(t){t.checked!==this.props.checked&&this.setState({h:this.props.checked?this.i:this.o})},n.prototype.componentWillUnmount=function(){this.I=!1},n.prototype.H=function(t){this.R.focus(),this.setState({j:t,B:!0,L:Date.now()})},n.prototype.N=function(t){var i=this.state,o=i.j,a=i.h,r=(this.props.checked?this.i:this.o)+t-o;i.U||t===o||this.setState({U:!0});var l=Math.min(this.i,Math.max(this.o,r));l!==a&&this.setState({h:l})},n.prototype.A=function(t){var i=this.state,o=i.h,a=i.U,r=i.L,l=this.props.checked,c=(this.i+this.o)/2;this.setState({h:this.props.checked?this.i:this.o});var d=Date.now()-r;(!a||d<250||l&&o<=c||!l&&o>=c)&&this.X(t),this.I&&this.setState({U:!1,B:!1}),this.l=Date.now()},n.prototype.p=function(t){t.preventDefault(),"number"==typeof t.button&&0!==t.button||(this.H(t.clientX),window.addEventListener("mousemove",this.v),window.addEventListener("mouseup",this.k))},n.prototype.v=function(t){t.preventDefault(),this.N(t.clientX)},n.prototype.k=function(t){this.A(t),window.removeEventListener("mousemove",this.v),window.removeEventListener("mouseup",this.k)},n.prototype.m=function(t){this.F=null,this.H(t.touches[0].clientX)},n.prototype.M=function(t){this.N(t.touches[0].clientX)},n.prototype.T=function(t){t.preventDefault(),this.A(t)},n.prototype.C=function(t){Date.now()-this.l>50&&(this.X(t),Date.now()-this.u>50&&this.I&&this.setState({B:!1}))},n.prototype.D=function(){this.u=Date.now()},n.prototype.O=function(){this.setState({B:!0})},n.prototype.S=function(){this.setState({B:!1})},n.prototype.W=function(t){this.R=t},n.prototype.$=function(t){t.preventDefault(),this.R.focus(),this.X(t),this.I&&this.setState({B:!1})},n.prototype.X=function(t){var i=this.props;(0,i.onChange)(!i.checked,t,i.id)},n.prototype.render=function(){var t=this.props,i=t.checked,o=t.disabled,r=t.className,l=t.offColor,c=t.onColor,d=t.offHandleColor,u=t.onHandleColor,p=t.checkedIcon,f=t.uncheckedIcon,v=t.checkedHandleIcon,g=t.uncheckedHandleIcon,m=t.boxShadow,b=t.activeBoxShadow,y=t.height,w=t.width,k=t.borderRadius,x=function(t,i){var o={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&-1===i.indexOf(a)&&(o[a]=t[a]);return o}(t,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),C=this.state,S=C.h,T=C.U,D=C.B,M={position:"relative",display:"inline-block",textAlign:"left",opacity:o?.5:1,direction:"ltr",borderRadius:y/2,WebkitTransition:"opacity 0.25s",MozTransition:"opacity 0.25s",transition:"opacity 0.25s",touchAction:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},E={height:y,width:w,margin:Math.max(0,(this.t-y)/2),position:"relative",background:e(S,this.i,this.o,l,c),borderRadius:"number"==typeof k?k:y/2,cursor:o?"default":"pointer",WebkitTransition:T?null:"background 0.25s",MozTransition:T?null:"background 0.25s",transition:T?null:"background 0.25s"},I={height:y,width:Math.min(1.5*y,w-(this.t+y)/2+1),position:"relative",opacity:(S-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:T?null:"opacity 0.25s",MozTransition:T?null:"opacity 0.25s",transition:T?null:"opacity 0.25s"},P={height:y,width:Math.min(1.5*y,w-(this.t+y)/2+1),position:"absolute",opacity:1-(S-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:T?null:"opacity 0.25s",MozTransition:T?null:"opacity 0.25s",transition:T?null:"opacity 0.25s"},W={height:this.t,width:this.t,background:e(S,this.i,this.o,d,u),display:"inline-block",cursor:o?"default":"pointer",borderRadius:"number"==typeof k?k-1:"50%",position:"absolute",transform:"translateX("+S+"px)",top:Math.max(0,(y-this.t)/2),outline:0,boxShadow:D?b:m,border:0,WebkitTransition:T?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:T?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:T?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},j={height:this.t,width:this.t,opacity:Math.max(2*(1-(S-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:T?null:"opacity 0.25s",MozTransition:T?null:"opacity 0.25s",transition:T?null:"opacity 0.25s"},N={height:this.t,width:this.t,opacity:Math.max(2*((S-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:T?null:"opacity 0.25s",MozTransition:T?null:"opacity 0.25s",transition:T?null:"opacity 0.25s"};return a.createElement("div",{className:r,style:M},a.createElement("div",{className:"react-switch-bg",style:E,onClick:o?null:this.$,onMouseDown:function(t){return t.preventDefault()}},p&&a.createElement("div",{style:I},p),f&&a.createElement("div",{style:P},f)),a.createElement("div",{className:"react-switch-handle",style:W,onClick:function(t){return t.preventDefault()},onMouseDown:o?null:this.p,onTouchStart:o?null:this.m,onTouchMove:o?null:this.M,onTouchEnd:o?null:this.T,onTouchCancel:o?null:this.S},g&&a.createElement("div",{style:j},g),v&&a.createElement("div",{style:N},v)),a.createElement("input",s({},{type:"checkbox",role:"switch","aria-checked":i,checked:i,disabled:o,style:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}},x,{ref:this.W,onFocus:this.O,onBlur:this.S,onKeyUp:this.D,onChange:this.C})))},n}(a.Component);c.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:r,checkedIcon:l,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56}}}]);
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[4219,1578,6665],{91578:(t,i,o)=>{o.r(i),o.d(i,{default:()=>T});var a=o(65515),r=o.n(a),l=(o(87363),o(68692)),c=o(93379),d=o.n(c),u=o(7795),p=o.n(u),f=o(90569),v=o.n(f),g=o(3565),m=o.n(g),b=o(19216),y=o.n(b),w=o(44589),k=o.n(w),x=o(75581),C={};C.styleTagTransform=k(),C.setAttributes=m(),C.insert=v().bind(null,"head"),C.domAPI=p(),C.insertStyleElement=y();d()(x.ZP,C);x.ZP&&x.ZP.locals&&x.ZP.locals;var S=o(47514);const T=function Toggle(t){var i,o=t.onChange,a=t.val,c=t.state,d=t.on,u=t.off,p=t.alwaysActiveColor,f=t.height,v=void 0===f?40:f,g=t.width,m=void 0===g?80:g,b=t.handleDiameter,y=void 0===b?32:b,w=t.toggleTextClassName,k=void 0===w?x.f6:w,C=null===(i=getComputedStyle(document.documentElement).getPropertyValue("--primaryColor"))||void 0===i?void 0:i.replace(/ /g,"");return(0,S.jsx)(l.Z,{className:"no-swiping",checkedIcon:d?(0,S.jsx)("div",{className:r()(k),id:"yes",children:d}):(0,S.jsx)(S.Fragment,{}),uncheckedIcon:u?(0,S.jsx)("div",{className:r()(k),id:"no",children:u}):(0,S.jsx)(S.Fragment,{}),onChange:function onChange(){return o(null!=a?a:!c)},checked:c,onColor:C,offColor:p?C:"#CACACA",height:v,width:m,handleDiameter:y})}},54219:(t,i,o)=>{o.r(i),o.d(i,{default:()=>E});o(87363);var a=o(93379),r=o.n(a),l=o(7795),c=o.n(l),d=o(90569),u=o.n(d),p=o(3565),f=o.n(p),v=o(19216),g=o.n(v),m=o(44589),b=o.n(m),y=o(29112),w={};w.styleTagTransform=b(),w.setAttributes=f(),w.insert=u().bind(null,"head"),w.domAPI=c(),w.insertStyleElement=g();r()(y.Z,w);y.Z&&y.Z.locals&&y.Z.locals;var k=o(88130),x=o(91578),C=o(9420),S=o(88683),T=o(35907),D=o(47514),M=(0,S.getLogger)("Planner","ToggleHandler");const E=(0,C.Pi)((function ToggleHeader(t){var i,o,a=t.item,r=(0,k.NP)(),l=a.groups[0].items;if(!l)return(0,D.jsx)(D.Fragment,{});for(var c=0;c<l.length;c++){var d,u;null!==(d=l[c].codex)&&void 0!==d&&d.startsWith("OPVNEIN")&&(o=l[c]),null!==(u=l[c].codex)&&void 0!==u&&u.startsWith("OPVJA")&&(i=l[c])}return o&&i||(2==l.length&&(o=l[0],i=l[1]),o&&i)?(0,D.jsx)("div",{className:y.R,children:(0,D.jsx)(x.default,{onChange:function onChange(){r.paletteViewHandler.clickedOnConfigPalette(o.sel?i:o,void 0,a.id)},val:a,state:0==o.sel,off:o.text,on:i.text})}):(M.error(new T.GE("Achtung! Bei der Option: "+l[0].op+" gibt es keine eindeutige werte für JA und NEIN",{code:"WC_0011"})),(0,D.jsx)(D.Fragment,{}))}))},75581:(t,i,o)=>{o.d(i,{ZP:()=>u,f6:()=>d});var a=o(8081),r=o.n(a),l=o(23645),c=o.n(l)()(r());c.push([t.id,".index-module--lgscn {\n display: flex;\n font-weight: 300;\n line-height: 40px;\n gap: 24px;\n}\n\n.index-module--D7_Ss {\n padding-left: 16px;\n color: white;\n line-height: 40px;\n font-weight: 300;\n}\n\n.index-module--D7_Ss#yes {\n padding-left: 16px;\n}\n\n.index-module--D7_Ss#no {\n padding-left: 4px;\n}\n",""]);var d="index-module--D7_Ss";const u=c},29112:(t,i,o)=>{o.d(i,{R:()=>d,Z:()=>u});var a=o(8081),r=o.n(a),l=o(23645),c=o.n(l)()(r());c.push([t.id,".index-module--ydvXj {\n float: right;\n}\n",""]);var d="index-module--ydvXj";const u=c},68692:(t,i,o)=>{o.d(i,{Z:()=>c});var a=o(87363);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])}return t},s.apply(this,arguments)}var r=a.createElement("svg",{viewBox:"-2 -5 14 20",height:"100%",width:"100%",style:{position:"absolute",top:0}},a.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"})),l=a.createElement("svg",{height:"100%",width:"100%",viewBox:"-2 -5 17 21",style:{position:"absolute",top:0}},a.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}));function h(t){if(7===t.length)return t;for(var i="#",o=1;o<4;o+=1)i+=t[o]+t[o];return i}function e(t,i,o,a,r){return function(t,i,o,a,r){var l=(t-o)/(i-o);if(0===l)return a;if(1===l)return r;for(var c="#",d=1;d<6;d+=2){var u=parseInt(a.substr(d,2),16),p=parseInt(r.substr(d,2),16),f=Math.round((1-l)*u+l*p).toString(16);1===f.length&&(f="0"+f),c+=f}return c}(t,i,o,h(a),h(r))}var c=function(t){function n(i){t.call(this,i);var o=i.height,a=i.width,r=i.checked;this.t=i.handleDiameter||o-2,this.i=Math.max(a-o,a-(o+this.t)/2),this.o=Math.max(0,(o-this.t)/2),this.state={h:r?this.i:this.o},this.l=0,this.u=0,this.p=this.p.bind(this),this.v=this.v.bind(this),this.k=this.k.bind(this),this.m=this.m.bind(this),this.M=this.M.bind(this),this.T=this.T.bind(this),this.$=this.$.bind(this),this.C=this.C.bind(this),this.D=this.D.bind(this),this.O=this.O.bind(this),this.S=this.S.bind(this),this.W=this.W.bind(this)}return t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n,n.prototype.componentDidMount=function(){this.I=!0},n.prototype.componentDidUpdate=function(t){t.checked!==this.props.checked&&this.setState({h:this.props.checked?this.i:this.o})},n.prototype.componentWillUnmount=function(){this.I=!1},n.prototype.H=function(t){this.R.focus(),this.setState({j:t,B:!0,L:Date.now()})},n.prototype.N=function(t){var i=this.state,o=i.j,a=i.h,r=(this.props.checked?this.i:this.o)+t-o;i.U||t===o||this.setState({U:!0});var l=Math.min(this.i,Math.max(this.o,r));l!==a&&this.setState({h:l})},n.prototype.A=function(t){var i=this.state,o=i.h,a=i.U,r=i.L,l=this.props.checked,c=(this.i+this.o)/2;this.setState({h:this.props.checked?this.i:this.o});var d=Date.now()-r;(!a||d<250||l&&o<=c||!l&&o>=c)&&this.X(t),this.I&&this.setState({U:!1,B:!1}),this.l=Date.now()},n.prototype.p=function(t){t.preventDefault(),"number"==typeof t.button&&0!==t.button||(this.H(t.clientX),window.addEventListener("mousemove",this.v),window.addEventListener("mouseup",this.k))},n.prototype.v=function(t){t.preventDefault(),this.N(t.clientX)},n.prototype.k=function(t){this.A(t),window.removeEventListener("mousemove",this.v),window.removeEventListener("mouseup",this.k)},n.prototype.m=function(t){this.F=null,this.H(t.touches[0].clientX)},n.prototype.M=function(t){this.N(t.touches[0].clientX)},n.prototype.T=function(t){t.preventDefault(),this.A(t)},n.prototype.C=function(t){Date.now()-this.l>50&&(this.X(t),Date.now()-this.u>50&&this.I&&this.setState({B:!1}))},n.prototype.D=function(){this.u=Date.now()},n.prototype.O=function(){this.setState({B:!0})},n.prototype.S=function(){this.setState({B:!1})},n.prototype.W=function(t){this.R=t},n.prototype.$=function(t){t.preventDefault(),this.R.focus(),this.X(t),this.I&&this.setState({B:!1})},n.prototype.X=function(t){var i=this.props;(0,i.onChange)(!i.checked,t,i.id)},n.prototype.render=function(){var t=this.props,i=t.checked,o=t.disabled,r=t.className,l=t.offColor,c=t.onColor,d=t.offHandleColor,u=t.onHandleColor,p=t.checkedIcon,f=t.uncheckedIcon,v=t.checkedHandleIcon,g=t.uncheckedHandleIcon,m=t.boxShadow,b=t.activeBoxShadow,y=t.height,w=t.width,k=t.borderRadius,x=function(t,i){var o={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&-1===i.indexOf(a)&&(o[a]=t[a]);return o}(t,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),C=this.state,S=C.h,T=C.U,D=C.B,M={position:"relative",display:"inline-block",textAlign:"left",opacity:o?.5:1,direction:"ltr",borderRadius:y/2,WebkitTransition:"opacity 0.25s",MozTransition:"opacity 0.25s",transition:"opacity 0.25s",touchAction:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},E={height:y,width:w,margin:Math.max(0,(this.t-y)/2),position:"relative",background:e(S,this.i,this.o,l,c),borderRadius:"number"==typeof k?k:y/2,cursor:o?"default":"pointer",WebkitTransition:T?null:"background 0.25s",MozTransition:T?null:"background 0.25s",transition:T?null:"background 0.25s"},I={height:y,width:Math.min(1.5*y,w-(this.t+y)/2+1),position:"relative",opacity:(S-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:T?null:"opacity 0.25s",MozTransition:T?null:"opacity 0.25s",transition:T?null:"opacity 0.25s"},P={height:y,width:Math.min(1.5*y,w-(this.t+y)/2+1),position:"absolute",opacity:1-(S-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:T?null:"opacity 0.25s",MozTransition:T?null:"opacity 0.25s",transition:T?null:"opacity 0.25s"},W={height:this.t,width:this.t,background:e(S,this.i,this.o,d,u),display:"inline-block",cursor:o?"default":"pointer",borderRadius:"number"==typeof k?k-1:"50%",position:"absolute",transform:"translateX("+S+"px)",top:Math.max(0,(y-this.t)/2),outline:0,boxShadow:D?b:m,border:0,WebkitTransition:T?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:T?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:T?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},j={height:this.t,width:this.t,opacity:Math.max(2*(1-(S-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:T?null:"opacity 0.25s",MozTransition:T?null:"opacity 0.25s",transition:T?null:"opacity 0.25s"},N={height:this.t,width:this.t,opacity:Math.max(2*((S-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:T?null:"opacity 0.25s",MozTransition:T?null:"opacity 0.25s",transition:T?null:"opacity 0.25s"};return a.createElement("div",{className:r,style:M},a.createElement("div",{className:"react-switch-bg",style:E,onClick:o?null:this.$,onMouseDown:function(t){return t.preventDefault()}},p&&a.createElement("div",{style:I},p),f&&a.createElement("div",{style:P},f)),a.createElement("div",{className:"react-switch-handle",style:W,onClick:function(t){return t.preventDefault()},onMouseDown:o?null:this.p,onTouchStart:o?null:this.m,onTouchMove:o?null:this.M,onTouchEnd:o?null:this.T,onTouchCancel:o?null:this.S},g&&a.createElement("div",{style:j},g),v&&a.createElement("div",{style:N},v)),a.createElement("input",s({},{type:"checkbox",role:"switch","aria-checked":i,checked:i,disabled:o,style:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}},x,{ref:this.W,onFocus:this.O,onBlur:this.S,onKeyUp:this.D,onChange:this.C})))},n}(a.Component);c.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:r,checkedIcon:l,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56}}}]);
|
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see 4269.diva-web-planner-react.umd.min.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[4269,1578,5552],{10304:(t,o,i)=>{o.Z=void 0;var r=function _interopRequireWildcard(t){if(t&&t.__esModule)return t;if(null===t||"object"!==_typeof(t)&&"function"!=typeof t)return{default:t};var o=_getRequireWildcardCache();if(o&&o.has(t))return o.get(t);var i={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var l=r?Object.getOwnPropertyDescriptor(t,a):null;l&&(l.get||l.set)?Object.defineProperty(i,a,l):i[a]=t[a]}i.default=t,o&&o.set(t,i);return i}(i(87363)),a=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(i(65515));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return t},t}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _extends(){return _extends=Object.assign||function(t){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},_extends.apply(this,arguments)}function ownKeys(t,o){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);o&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),i.push.apply(i,r)}return i}function _defineProperty(t,o,i){return o in t?Object.defineProperty(t,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[o]=i,t}function _defineProperties(t,o){for(var i=0;i<o.length;i++){var r=o[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _setPrototypeOf(t,o){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,o){return t.__proto__=o,t},_setPrototypeOf(t,o)}var l="Select...",c=function(t){function Dropdown(t){var o;return function _classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,Dropdown),(o=function _possibleConstructorReturn(t,o){return!o||"object"!==_typeof(o)&&"function"!=typeof o?_assertThisInitialized(t):o}(this,_getPrototypeOf(Dropdown).call(this,t))).state={selected:o.parseValue(t.value,t.options)||{label:void 0===t.placeholder?l:t.placeholder,value:""},isOpen:!1},o.dropdownRef=(0,r.createRef)(),o.mounted=!0,o.handleDocumentClick=o.handleDocumentClick.bind(_assertThisInitialized(o)),o.fireChangeEvent=o.fireChangeEvent.bind(_assertThisInitialized(o)),o}return function _inherits(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),o&&_setPrototypeOf(t,o)}(Dropdown,t),function _createClass(t,o,i){return o&&_defineProperties(t.prototype,o),i&&_defineProperties(t,i),t}(Dropdown,[{key:"componentDidUpdate",value:function componentDidUpdate(t){if(this.props.value!==t.value)if(this.props.value){var o=this.parseValue(this.props.value,this.props.options);o!==this.state.selected&&this.setState({selected:o})}else this.setState({selected:{label:void 0===this.props.placeholder?l:this.props.placeholder,value:""}})}},{key:"componentDidMount",value:function componentDidMount(){document.addEventListener("click",this.handleDocumentClick,!1),document.addEventListener("touchend",this.handleDocumentClick,!1)}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.mounted=!1,document.removeEventListener("click",this.handleDocumentClick,!1),document.removeEventListener("touchend",this.handleDocumentClick,!1)}},{key:"handleMouseDown",value:function handleMouseDown(t){this.props.onFocus&&"function"==typeof this.props.onFocus&&this.props.onFocus(this.state.isOpen),"mousedown"===t.type&&0!==t.button||(t.stopPropagation(),t.preventDefault(),this.props.disabled||this.setState({isOpen:!this.state.isOpen}))}},{key:"parseValue",value:function parseValue(t,o){var i;if("string"==typeof t)for(var r=0,a=o.length;r<a;r++)if("group"===o[r].type){var l=o[r].items.filter((function(o){return o.value===t}));l.length&&(i=l[0])}else void 0!==o[r].value&&o[r].value===t&&(i=o[r]);return i||t}},{key:"setValue",value:function setValue(t,o){var i={selected:{value:t,label:o},isOpen:!1};this.fireChangeEvent(i),this.setState(i)}},{key:"fireChangeEvent",value:function fireChangeEvent(t){t.selected!==this.state.selected&&this.props.onChange&&this.props.onChange(t.selected)}},{key:"renderOption",value:function renderOption(t){var o,i=t.value;void 0===i&&(i=t.label||t);var l=t.label||t.value||t,c=i===this.state.selected.value||i===this.state.selected,u=(_defineProperty(o={},"".concat(this.props.baseClassName,"-option"),!0),_defineProperty(o,t.className,!!t.className),_defineProperty(o,"is-selected",c),o),d=(0,a.default)(u),p=Object.keys(t.data||{}).reduce((function(o,i){return function _objectSpread(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(i,!0).forEach((function(o){_defineProperty(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(i).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(i,o))}))}return t}({},o,_defineProperty({},"data-".concat(i),t.data[i]))}),{});return r.default.createElement("div",_extends({key:i,className:d,onMouseDown:this.setValue.bind(this,i,l),onClick:this.setValue.bind(this,i,l),role:"option","aria-selected":c?"true":"false"},p),l)}},{key:"buildMenu",value:function buildMenu(){var t=this,o=this.props,i=o.options,a=o.baseClassName,l=i.map((function(o){if("group"===o.type){var i=r.default.createElement("div",{className:"".concat(a,"-title")},o.name),l=o.items.map((function(o){return t.renderOption(o)}));return r.default.createElement("div",{className:"".concat(a,"-group"),key:o.name,role:"listbox",tabIndex:"-1"},i,l)}return t.renderOption(o)}));return l.length?l:r.default.createElement("div",{className:"".concat(a,"-noresults")},"No options found")}},{key:"handleDocumentClick",value:function handleDocumentClick(t){this.mounted&&(this.dropdownRef.current.contains(t.target)||this.state.isOpen&&this.setState({isOpen:!1}))}},{key:"isValueSelected",value:function isValueSelected(){return"string"==typeof this.state.selected||""!==this.state.selected.value}},{key:"render",value:function render(){var t,o,i,l,c,u=this.props,d=u.baseClassName,p=u.controlClassName,f=u.placeholderClassName,y=u.menuClassName,v=u.arrowClassName,m=u.arrowClosed,b=u.arrowOpen,g=u.className,w=this.props.disabled?"Dropdown-disabled":"",k="string"==typeof this.state.selected?this.state.selected:this.state.selected.label,_=(0,a.default)((_defineProperty(t={},"".concat(d,"-root"),!0),_defineProperty(t,g,!!g),_defineProperty(t,"is-open",this.state.isOpen),t)),O=(0,a.default)((_defineProperty(o={},"".concat(d,"-control"),!0),_defineProperty(o,p,!!p),_defineProperty(o,w,!!w),o)),C=(0,a.default)((_defineProperty(i={},"".concat(d,"-placeholder"),!0),_defineProperty(i,f,!!f),_defineProperty(i,"is-selected",this.isValueSelected()),i)),P=(0,a.default)((_defineProperty(l={},"".concat(d,"-menu"),!0),_defineProperty(l,y,!!y),l)),D=(0,a.default)((_defineProperty(c={},"".concat(d,"-arrow"),!0),_defineProperty(c,v,!!v),c)),x=r.default.createElement("div",{className:C},k),S=this.state.isOpen?r.default.createElement("div",{className:P,"aria-expanded":"true"},this.buildMenu()):null;return r.default.createElement("div",{ref:this.dropdownRef,className:_},r.default.createElement("div",{className:O,onMouseDown:this.handleMouseDown.bind(this),onTouchEnd:this.handleMouseDown.bind(this),"aria-haspopup":"listbox"},x,r.default.createElement("div",{className:"".concat(d,"-arrow-wrapper")},b&&m?this.state.isOpen?b:m:r.default.createElement("span",{className:D}))),S)}}]),Dropdown}(r.Component);c.defaultProps={baseClassName:"Dropdown"};var u=c;o.Z=u},91578:(t,o,i)=>{i.r(o),i.d(o,{default:()=>P});var r=i(65515),a=i.n(r),l=(i(87363),i(68692)),c=i(93379),u=i.n(c),d=i(7795),p=i.n(d),f=i(90569),y=i.n(f),v=i(3565),m=i.n(v),b=i(19216),g=i.n(b),w=i(44589),k=i.n(w),_=i(75581),O={};O.styleTagTransform=k(),O.setAttributes=m(),O.insert=y().bind(null,"head"),O.domAPI=p(),O.insertStyleElement=g();u()(_.ZP,O);_.ZP&&_.ZP.locals&&_.ZP.locals;var C=i(47514);const P=function Toggle(t){var o,i=t.onChange,r=t.val,c=t.state,u=t.on,d=t.off,p=t.alwaysActiveColor,f=t.height,y=void 0===f?40:f,v=t.width,m=void 0===v?80:v,b=t.handleDiameter,g=void 0===b?32:b,w=t.toggleTextClassName,k=void 0===w?_.f6:w,O=null===(o=getComputedStyle(document.documentElement).getPropertyValue("--primaryColor"))||void 0===o?void 0:o.replace(/ /g,"");return(0,C.jsx)(l.Z,{className:"no-swiping",checkedIcon:u?(0,C.jsx)("div",{className:a()(k),id:"yes",children:u}):(0,C.jsx)(C.Fragment,{}),uncheckedIcon:d?(0,C.jsx)("div",{className:a()(k),id:"no",children:d}):(0,C.jsx)(C.Fragment,{}),onChange:function onChange(){return i(null!=r?r:!c)},checked:c,onColor:O,offColor:p?O:"#CACACA",height:y,width:m,handleDiameter:g})}},75581:(t,o,i)=>{i.d(o,{ZP:()=>d,f6:()=>u});var r=i(8081),a=i.n(r),l=i(23645),c=i.n(l)()(a());c.push([t.id,".index-module--lgscn {\n display: flex;\n font-weight: 300;\n line-height: 40px;\n gap: 24px;\n}\n\n.index-module--D7_Ss {\n padding-left: 16px;\n color: white;\n line-height: 40px;\n font-weight: 300;\n}\n\n.index-module--D7_Ss#yes {\n padding-left: 16px;\n}\n\n.index-module--D7_Ss#no {\n padding-left: 4px;\n}\n",""]);var u="index-module--D7_Ss";const d=c},68692:(t,o,i)=>{i.d(o,{Z:()=>c});var r=i(87363);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},s.apply(this,arguments)}var a=r.createElement("svg",{viewBox:"-2 -5 14 20",height:"100%",width:"100%",style:{position:"absolute",top:0}},r.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"})),l=r.createElement("svg",{height:"100%",width:"100%",viewBox:"-2 -5 17 21",style:{position:"absolute",top:0}},r.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}));function h(t){if(7===t.length)return t;for(var o="#",i=1;i<4;i+=1)o+=t[i]+t[i];return o}function e(t,o,i,r,a){return function(t,o,i,r,a){var l=(t-i)/(o-i);if(0===l)return r;if(1===l)return a;for(var c="#",u=1;u<6;u+=2){var d=parseInt(r.substr(u,2),16),p=parseInt(a.substr(u,2),16),f=Math.round((1-l)*d+l*p).toString(16);1===f.length&&(f="0"+f),c+=f}return c}(t,o,i,h(r),h(a))}var c=function(t){function n(o){t.call(this,o);var i=o.height,r=o.width,a=o.checked;this.t=o.handleDiameter||i-2,this.i=Math.max(r-i,r-(i+this.t)/2),this.o=Math.max(0,(i-this.t)/2),this.state={h:a?this.i:this.o},this.l=0,this.u=0,this.p=this.p.bind(this),this.v=this.v.bind(this),this.k=this.k.bind(this),this.m=this.m.bind(this),this.M=this.M.bind(this),this.T=this.T.bind(this),this.$=this.$.bind(this),this.C=this.C.bind(this),this.D=this.D.bind(this),this.O=this.O.bind(this),this.S=this.S.bind(this),this.W=this.W.bind(this)}return t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n,n.prototype.componentDidMount=function(){this.I=!0},n.prototype.componentDidUpdate=function(t){t.checked!==this.props.checked&&this.setState({h:this.props.checked?this.i:this.o})},n.prototype.componentWillUnmount=function(){this.I=!1},n.prototype.H=function(t){this.R.focus(),this.setState({j:t,B:!0,L:Date.now()})},n.prototype.N=function(t){var o=this.state,i=o.j,r=o.h,a=(this.props.checked?this.i:this.o)+t-i;o.U||t===i||this.setState({U:!0});var l=Math.min(this.i,Math.max(this.o,a));l!==r&&this.setState({h:l})},n.prototype.A=function(t){var o=this.state,i=o.h,r=o.U,a=o.L,l=this.props.checked,c=(this.i+this.o)/2;this.setState({h:this.props.checked?this.i:this.o});var u=Date.now()-a;(!r||u<250||l&&i<=c||!l&&i>=c)&&this.X(t),this.I&&this.setState({U:!1,B:!1}),this.l=Date.now()},n.prototype.p=function(t){t.preventDefault(),"number"==typeof t.button&&0!==t.button||(this.H(t.clientX),window.addEventListener("mousemove",this.v),window.addEventListener("mouseup",this.k))},n.prototype.v=function(t){t.preventDefault(),this.N(t.clientX)},n.prototype.k=function(t){this.A(t),window.removeEventListener("mousemove",this.v),window.removeEventListener("mouseup",this.k)},n.prototype.m=function(t){this.F=null,this.H(t.touches[0].clientX)},n.prototype.M=function(t){this.N(t.touches[0].clientX)},n.prototype.T=function(t){t.preventDefault(),this.A(t)},n.prototype.C=function(t){Date.now()-this.l>50&&(this.X(t),Date.now()-this.u>50&&this.I&&this.setState({B:!1}))},n.prototype.D=function(){this.u=Date.now()},n.prototype.O=function(){this.setState({B:!0})},n.prototype.S=function(){this.setState({B:!1})},n.prototype.W=function(t){this.R=t},n.prototype.$=function(t){t.preventDefault(),this.R.focus(),this.X(t),this.I&&this.setState({B:!1})},n.prototype.X=function(t){var o=this.props;(0,o.onChange)(!o.checked,t,o.id)},n.prototype.render=function(){var t=this.props,o=t.checked,i=t.disabled,a=t.className,l=t.offColor,c=t.onColor,u=t.offHandleColor,d=t.onHandleColor,p=t.checkedIcon,f=t.uncheckedIcon,y=t.checkedHandleIcon,v=t.uncheckedHandleIcon,m=t.boxShadow,b=t.activeBoxShadow,g=t.height,w=t.width,k=t.borderRadius,_=function(t,o){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&-1===o.indexOf(r)&&(i[r]=t[r]);return i}(t,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),O=this.state,C=O.h,P=O.U,D=O.B,x={position:"relative",display:"inline-block",textAlign:"left",opacity:i?.5:1,direction:"ltr",borderRadius:g/2,WebkitTransition:"opacity 0.25s",MozTransition:"opacity 0.25s",transition:"opacity 0.25s",touchAction:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},S={height:g,width:w,margin:Math.max(0,(this.t-g)/2),position:"relative",background:e(C,this.i,this.o,l,c),borderRadius:"number"==typeof k?k:g/2,cursor:i?"default":"pointer",WebkitTransition:P?null:"background 0.25s",MozTransition:P?null:"background 0.25s",transition:P?null:"background 0.25s"},E={height:g,width:Math.min(1.5*g,w-(this.t+g)/2+1),position:"relative",opacity:(C-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:P?null:"opacity 0.25s",MozTransition:P?null:"opacity 0.25s",transition:P?null:"opacity 0.25s"},M={height:g,width:Math.min(1.5*g,w-(this.t+g)/2+1),position:"absolute",opacity:1-(C-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:P?null:"opacity 0.25s",MozTransition:P?null:"opacity 0.25s",transition:P?null:"opacity 0.25s"},j={height:this.t,width:this.t,background:e(C,this.i,this.o,u,d),display:"inline-block",cursor:i?"default":"pointer",borderRadius:"number"==typeof k?k-1:"50%",position:"absolute",transform:"translateX("+C+"px)",top:Math.max(0,(g-this.t)/2),outline:0,boxShadow:D?b:m,border:0,WebkitTransition:P?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:P?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:P?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},N={height:this.t,width:this.t,opacity:Math.max(2*(1-(C-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:P?null:"opacity 0.25s",MozTransition:P?null:"opacity 0.25s",transition:P?null:"opacity 0.25s"},T={height:this.t,width:this.t,opacity:Math.max(2*((C-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:P?null:"opacity 0.25s",MozTransition:P?null:"opacity 0.25s",transition:P?null:"opacity 0.25s"};return r.createElement("div",{className:a,style:x},r.createElement("div",{className:"react-switch-bg",style:S,onClick:i?null:this.$,onMouseDown:function(t){return t.preventDefault()}},p&&r.createElement("div",{style:E},p),f&&r.createElement("div",{style:M},f)),r.createElement("div",{className:"react-switch-handle",style:j,onClick:function(t){return t.preventDefault()},onMouseDown:i?null:this.p,onTouchStart:i?null:this.m,onTouchMove:i?null:this.M,onTouchEnd:i?null:this.T,onTouchCancel:i?null:this.S},v&&r.createElement("div",{style:N},v),y&&r.createElement("div",{style:T},y)),r.createElement("input",s({},{type:"checkbox",role:"switch","aria-checked":o,checked:o,disabled:i,style:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}},_,{ref:this.W,onFocus:this.O,onBlur:this.S,onKeyUp:this.D,onChange:this.C})))},n}(r.Component);c.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:a,checkedIcon:l,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56}}}]);
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[4269,1578,6665],{10304:(t,o,i)=>{o.Z=void 0;var r=function _interopRequireWildcard(t){if(t&&t.__esModule)return t;if(null===t||"object"!==_typeof(t)&&"function"!=typeof t)return{default:t};var o=_getRequireWildcardCache();if(o&&o.has(t))return o.get(t);var i={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var l=r?Object.getOwnPropertyDescriptor(t,a):null;l&&(l.get||l.set)?Object.defineProperty(i,a,l):i[a]=t[a]}i.default=t,o&&o.set(t,i);return i}(i(87363)),a=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(i(65515));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return t},t}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _extends(){return _extends=Object.assign||function(t){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},_extends.apply(this,arguments)}function ownKeys(t,o){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);o&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),i.push.apply(i,r)}return i}function _defineProperty(t,o,i){return o in t?Object.defineProperty(t,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[o]=i,t}function _defineProperties(t,o){for(var i=0;i<o.length;i++){var r=o[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _setPrototypeOf(t,o){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,o){return t.__proto__=o,t},_setPrototypeOf(t,o)}var l="Select...",c=function(t){function Dropdown(t){var o;return function _classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,Dropdown),(o=function _possibleConstructorReturn(t,o){return!o||"object"!==_typeof(o)&&"function"!=typeof o?_assertThisInitialized(t):o}(this,_getPrototypeOf(Dropdown).call(this,t))).state={selected:o.parseValue(t.value,t.options)||{label:void 0===t.placeholder?l:t.placeholder,value:""},isOpen:!1},o.dropdownRef=(0,r.createRef)(),o.mounted=!0,o.handleDocumentClick=o.handleDocumentClick.bind(_assertThisInitialized(o)),o.fireChangeEvent=o.fireChangeEvent.bind(_assertThisInitialized(o)),o}return function _inherits(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),o&&_setPrototypeOf(t,o)}(Dropdown,t),function _createClass(t,o,i){return o&&_defineProperties(t.prototype,o),i&&_defineProperties(t,i),t}(Dropdown,[{key:"componentDidUpdate",value:function componentDidUpdate(t){if(this.props.value!==t.value)if(this.props.value){var o=this.parseValue(this.props.value,this.props.options);o!==this.state.selected&&this.setState({selected:o})}else this.setState({selected:{label:void 0===this.props.placeholder?l:this.props.placeholder,value:""}})}},{key:"componentDidMount",value:function componentDidMount(){document.addEventListener("click",this.handleDocumentClick,!1),document.addEventListener("touchend",this.handleDocumentClick,!1)}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.mounted=!1,document.removeEventListener("click",this.handleDocumentClick,!1),document.removeEventListener("touchend",this.handleDocumentClick,!1)}},{key:"handleMouseDown",value:function handleMouseDown(t){this.props.onFocus&&"function"==typeof this.props.onFocus&&this.props.onFocus(this.state.isOpen),"mousedown"===t.type&&0!==t.button||(t.stopPropagation(),t.preventDefault(),this.props.disabled||this.setState({isOpen:!this.state.isOpen}))}},{key:"parseValue",value:function parseValue(t,o){var i;if("string"==typeof t)for(var r=0,a=o.length;r<a;r++)if("group"===o[r].type){var l=o[r].items.filter((function(o){return o.value===t}));l.length&&(i=l[0])}else void 0!==o[r].value&&o[r].value===t&&(i=o[r]);return i||t}},{key:"setValue",value:function setValue(t,o){var i={selected:{value:t,label:o},isOpen:!1};this.fireChangeEvent(i),this.setState(i)}},{key:"fireChangeEvent",value:function fireChangeEvent(t){t.selected!==this.state.selected&&this.props.onChange&&this.props.onChange(t.selected)}},{key:"renderOption",value:function renderOption(t){var o,i=t.value;void 0===i&&(i=t.label||t);var l=t.label||t.value||t,c=i===this.state.selected.value||i===this.state.selected,u=(_defineProperty(o={},"".concat(this.props.baseClassName,"-option"),!0),_defineProperty(o,t.className,!!t.className),_defineProperty(o,"is-selected",c),o),d=(0,a.default)(u),p=Object.keys(t.data||{}).reduce((function(o,i){return function _objectSpread(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(i,!0).forEach((function(o){_defineProperty(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(i).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(i,o))}))}return t}({},o,_defineProperty({},"data-".concat(i),t.data[i]))}),{});return r.default.createElement("div",_extends({key:i,className:d,onMouseDown:this.setValue.bind(this,i,l),onClick:this.setValue.bind(this,i,l),role:"option","aria-selected":c?"true":"false"},p),l)}},{key:"buildMenu",value:function buildMenu(){var t=this,o=this.props,i=o.options,a=o.baseClassName,l=i.map((function(o){if("group"===o.type){var i=r.default.createElement("div",{className:"".concat(a,"-title")},o.name),l=o.items.map((function(o){return t.renderOption(o)}));return r.default.createElement("div",{className:"".concat(a,"-group"),key:o.name,role:"listbox",tabIndex:"-1"},i,l)}return t.renderOption(o)}));return l.length?l:r.default.createElement("div",{className:"".concat(a,"-noresults")},"No options found")}},{key:"handleDocumentClick",value:function handleDocumentClick(t){this.mounted&&(this.dropdownRef.current.contains(t.target)||this.state.isOpen&&this.setState({isOpen:!1}))}},{key:"isValueSelected",value:function isValueSelected(){return"string"==typeof this.state.selected||""!==this.state.selected.value}},{key:"render",value:function render(){var t,o,i,l,c,u=this.props,d=u.baseClassName,p=u.controlClassName,f=u.placeholderClassName,y=u.menuClassName,v=u.arrowClassName,m=u.arrowClosed,b=u.arrowOpen,g=u.className,w=this.props.disabled?"Dropdown-disabled":"",k="string"==typeof this.state.selected?this.state.selected:this.state.selected.label,_=(0,a.default)((_defineProperty(t={},"".concat(d,"-root"),!0),_defineProperty(t,g,!!g),_defineProperty(t,"is-open",this.state.isOpen),t)),O=(0,a.default)((_defineProperty(o={},"".concat(d,"-control"),!0),_defineProperty(o,p,!!p),_defineProperty(o,w,!!w),o)),C=(0,a.default)((_defineProperty(i={},"".concat(d,"-placeholder"),!0),_defineProperty(i,f,!!f),_defineProperty(i,"is-selected",this.isValueSelected()),i)),P=(0,a.default)((_defineProperty(l={},"".concat(d,"-menu"),!0),_defineProperty(l,y,!!y),l)),D=(0,a.default)((_defineProperty(c={},"".concat(d,"-arrow"),!0),_defineProperty(c,v,!!v),c)),x=r.default.createElement("div",{className:C},k),S=this.state.isOpen?r.default.createElement("div",{className:P,"aria-expanded":"true"},this.buildMenu()):null;return r.default.createElement("div",{ref:this.dropdownRef,className:_},r.default.createElement("div",{className:O,onMouseDown:this.handleMouseDown.bind(this),onTouchEnd:this.handleMouseDown.bind(this),"aria-haspopup":"listbox"},x,r.default.createElement("div",{className:"".concat(d,"-arrow-wrapper")},b&&m?this.state.isOpen?b:m:r.default.createElement("span",{className:D}))),S)}}]),Dropdown}(r.Component);c.defaultProps={baseClassName:"Dropdown"};var u=c;o.Z=u},91578:(t,o,i)=>{i.r(o),i.d(o,{default:()=>P});var r=i(65515),a=i.n(r),l=(i(87363),i(68692)),c=i(93379),u=i.n(c),d=i(7795),p=i.n(d),f=i(90569),y=i.n(f),v=i(3565),m=i.n(v),b=i(19216),g=i.n(b),w=i(44589),k=i.n(w),_=i(75581),O={};O.styleTagTransform=k(),O.setAttributes=m(),O.insert=y().bind(null,"head"),O.domAPI=p(),O.insertStyleElement=g();u()(_.ZP,O);_.ZP&&_.ZP.locals&&_.ZP.locals;var C=i(47514);const P=function Toggle(t){var o,i=t.onChange,r=t.val,c=t.state,u=t.on,d=t.off,p=t.alwaysActiveColor,f=t.height,y=void 0===f?40:f,v=t.width,m=void 0===v?80:v,b=t.handleDiameter,g=void 0===b?32:b,w=t.toggleTextClassName,k=void 0===w?_.f6:w,O=null===(o=getComputedStyle(document.documentElement).getPropertyValue("--primaryColor"))||void 0===o?void 0:o.replace(/ /g,"");return(0,C.jsx)(l.Z,{className:"no-swiping",checkedIcon:u?(0,C.jsx)("div",{className:a()(k),id:"yes",children:u}):(0,C.jsx)(C.Fragment,{}),uncheckedIcon:d?(0,C.jsx)("div",{className:a()(k),id:"no",children:d}):(0,C.jsx)(C.Fragment,{}),onChange:function onChange(){return i(null!=r?r:!c)},checked:c,onColor:O,offColor:p?O:"#CACACA",height:y,width:m,handleDiameter:g})}},75581:(t,o,i)=>{i.d(o,{ZP:()=>d,f6:()=>u});var r=i(8081),a=i.n(r),l=i(23645),c=i.n(l)()(a());c.push([t.id,".index-module--lgscn {\n display: flex;\n font-weight: 300;\n line-height: 40px;\n gap: 24px;\n}\n\n.index-module--D7_Ss {\n padding-left: 16px;\n color: white;\n line-height: 40px;\n font-weight: 300;\n}\n\n.index-module--D7_Ss#yes {\n padding-left: 16px;\n}\n\n.index-module--D7_Ss#no {\n padding-left: 4px;\n}\n",""]);var u="index-module--D7_Ss";const d=c},68692:(t,o,i)=>{i.d(o,{Z:()=>c});var r=i(87363);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},s.apply(this,arguments)}var a=r.createElement("svg",{viewBox:"-2 -5 14 20",height:"100%",width:"100%",style:{position:"absolute",top:0}},r.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"})),l=r.createElement("svg",{height:"100%",width:"100%",viewBox:"-2 -5 17 21",style:{position:"absolute",top:0}},r.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}));function h(t){if(7===t.length)return t;for(var o="#",i=1;i<4;i+=1)o+=t[i]+t[i];return o}function e(t,o,i,r,a){return function(t,o,i,r,a){var l=(t-i)/(o-i);if(0===l)return r;if(1===l)return a;for(var c="#",u=1;u<6;u+=2){var d=parseInt(r.substr(u,2),16),p=parseInt(a.substr(u,2),16),f=Math.round((1-l)*d+l*p).toString(16);1===f.length&&(f="0"+f),c+=f}return c}(t,o,i,h(r),h(a))}var c=function(t){function n(o){t.call(this,o);var i=o.height,r=o.width,a=o.checked;this.t=o.handleDiameter||i-2,this.i=Math.max(r-i,r-(i+this.t)/2),this.o=Math.max(0,(i-this.t)/2),this.state={h:a?this.i:this.o},this.l=0,this.u=0,this.p=this.p.bind(this),this.v=this.v.bind(this),this.k=this.k.bind(this),this.m=this.m.bind(this),this.M=this.M.bind(this),this.T=this.T.bind(this),this.$=this.$.bind(this),this.C=this.C.bind(this),this.D=this.D.bind(this),this.O=this.O.bind(this),this.S=this.S.bind(this),this.W=this.W.bind(this)}return t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n,n.prototype.componentDidMount=function(){this.I=!0},n.prototype.componentDidUpdate=function(t){t.checked!==this.props.checked&&this.setState({h:this.props.checked?this.i:this.o})},n.prototype.componentWillUnmount=function(){this.I=!1},n.prototype.H=function(t){this.R.focus(),this.setState({j:t,B:!0,L:Date.now()})},n.prototype.N=function(t){var o=this.state,i=o.j,r=o.h,a=(this.props.checked?this.i:this.o)+t-i;o.U||t===i||this.setState({U:!0});var l=Math.min(this.i,Math.max(this.o,a));l!==r&&this.setState({h:l})},n.prototype.A=function(t){var o=this.state,i=o.h,r=o.U,a=o.L,l=this.props.checked,c=(this.i+this.o)/2;this.setState({h:this.props.checked?this.i:this.o});var u=Date.now()-a;(!r||u<250||l&&i<=c||!l&&i>=c)&&this.X(t),this.I&&this.setState({U:!1,B:!1}),this.l=Date.now()},n.prototype.p=function(t){t.preventDefault(),"number"==typeof t.button&&0!==t.button||(this.H(t.clientX),window.addEventListener("mousemove",this.v),window.addEventListener("mouseup",this.k))},n.prototype.v=function(t){t.preventDefault(),this.N(t.clientX)},n.prototype.k=function(t){this.A(t),window.removeEventListener("mousemove",this.v),window.removeEventListener("mouseup",this.k)},n.prototype.m=function(t){this.F=null,this.H(t.touches[0].clientX)},n.prototype.M=function(t){this.N(t.touches[0].clientX)},n.prototype.T=function(t){t.preventDefault(),this.A(t)},n.prototype.C=function(t){Date.now()-this.l>50&&(this.X(t),Date.now()-this.u>50&&this.I&&this.setState({B:!1}))},n.prototype.D=function(){this.u=Date.now()},n.prototype.O=function(){this.setState({B:!0})},n.prototype.S=function(){this.setState({B:!1})},n.prototype.W=function(t){this.R=t},n.prototype.$=function(t){t.preventDefault(),this.R.focus(),this.X(t),this.I&&this.setState({B:!1})},n.prototype.X=function(t){var o=this.props;(0,o.onChange)(!o.checked,t,o.id)},n.prototype.render=function(){var t=this.props,o=t.checked,i=t.disabled,a=t.className,l=t.offColor,c=t.onColor,u=t.offHandleColor,d=t.onHandleColor,p=t.checkedIcon,f=t.uncheckedIcon,y=t.checkedHandleIcon,v=t.uncheckedHandleIcon,m=t.boxShadow,b=t.activeBoxShadow,g=t.height,w=t.width,k=t.borderRadius,_=function(t,o){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&-1===o.indexOf(r)&&(i[r]=t[r]);return i}(t,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),O=this.state,C=O.h,P=O.U,D=O.B,x={position:"relative",display:"inline-block",textAlign:"left",opacity:i?.5:1,direction:"ltr",borderRadius:g/2,WebkitTransition:"opacity 0.25s",MozTransition:"opacity 0.25s",transition:"opacity 0.25s",touchAction:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},S={height:g,width:w,margin:Math.max(0,(this.t-g)/2),position:"relative",background:e(C,this.i,this.o,l,c),borderRadius:"number"==typeof k?k:g/2,cursor:i?"default":"pointer",WebkitTransition:P?null:"background 0.25s",MozTransition:P?null:"background 0.25s",transition:P?null:"background 0.25s"},E={height:g,width:Math.min(1.5*g,w-(this.t+g)/2+1),position:"relative",opacity:(C-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:P?null:"opacity 0.25s",MozTransition:P?null:"opacity 0.25s",transition:P?null:"opacity 0.25s"},M={height:g,width:Math.min(1.5*g,w-(this.t+g)/2+1),position:"absolute",opacity:1-(C-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:P?null:"opacity 0.25s",MozTransition:P?null:"opacity 0.25s",transition:P?null:"opacity 0.25s"},j={height:this.t,width:this.t,background:e(C,this.i,this.o,u,d),display:"inline-block",cursor:i?"default":"pointer",borderRadius:"number"==typeof k?k-1:"50%",position:"absolute",transform:"translateX("+C+"px)",top:Math.max(0,(g-this.t)/2),outline:0,boxShadow:D?b:m,border:0,WebkitTransition:P?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:P?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:P?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},N={height:this.t,width:this.t,opacity:Math.max(2*(1-(C-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:P?null:"opacity 0.25s",MozTransition:P?null:"opacity 0.25s",transition:P?null:"opacity 0.25s"},T={height:this.t,width:this.t,opacity:Math.max(2*((C-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:P?null:"opacity 0.25s",MozTransition:P?null:"opacity 0.25s",transition:P?null:"opacity 0.25s"};return r.createElement("div",{className:a,style:x},r.createElement("div",{className:"react-switch-bg",style:S,onClick:i?null:this.$,onMouseDown:function(t){return t.preventDefault()}},p&&r.createElement("div",{style:E},p),f&&r.createElement("div",{style:M},f)),r.createElement("div",{className:"react-switch-handle",style:j,onClick:function(t){return t.preventDefault()},onMouseDown:i?null:this.p,onTouchStart:i?null:this.m,onTouchMove:i?null:this.M,onTouchEnd:i?null:this.T,onTouchCancel:i?null:this.S},v&&r.createElement("div",{style:N},v),y&&r.createElement("div",{style:T},y)),r.createElement("input",s({},{type:"checkbox",role:"switch","aria-checked":o,checked:o,disabled:i,style:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}},_,{ref:this.W,onFocus:this.O,onBlur:this.S,onKeyUp:this.D,onChange:this.C})))},n}(r.Component);c.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:a,checkedIcon:l,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56}}}]);
|
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see 4818.diva-web-planner-react.umd.min.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[4818,5406,1578,4269,152,5301,6071,5552,8291,8488],{10304:(t,o,i)=>{o.Z=void 0;var r=function _interopRequireWildcard(t){if(t&&t.__esModule)return t;if(null===t||"object"!==_typeof(t)&&"function"!=typeof t)return{default:t};var o=_getRequireWildcardCache();if(o&&o.has(t))return o.get(t);var i={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var c=r?Object.getOwnPropertyDescriptor(t,a):null;c&&(c.get||c.set)?Object.defineProperty(i,a,c):i[a]=t[a]}i.default=t,o&&o.set(t,i);return i}(i(87363)),a=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(i(65515));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return t},t}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _extends(){return _extends=Object.assign||function(t){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},_extends.apply(this,arguments)}function ownKeys(t,o){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);o&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),i.push.apply(i,r)}return i}function _defineProperty(t,o,i){return o in t?Object.defineProperty(t,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[o]=i,t}function _defineProperties(t,o){for(var i=0;i<o.length;i++){var r=o[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _setPrototypeOf(t,o){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,o){return t.__proto__=o,t},_setPrototypeOf(t,o)}var c="Select...",l=function(t){function Dropdown(t){var o;return function _classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,Dropdown),(o=function _possibleConstructorReturn(t,o){return!o||"object"!==_typeof(o)&&"function"!=typeof o?_assertThisInitialized(t):o}(this,_getPrototypeOf(Dropdown).call(this,t))).state={selected:o.parseValue(t.value,t.options)||{label:void 0===t.placeholder?c:t.placeholder,value:""},isOpen:!1},o.dropdownRef=(0,r.createRef)(),o.mounted=!0,o.handleDocumentClick=o.handleDocumentClick.bind(_assertThisInitialized(o)),o.fireChangeEvent=o.fireChangeEvent.bind(_assertThisInitialized(o)),o}return function _inherits(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),o&&_setPrototypeOf(t,o)}(Dropdown,t),function _createClass(t,o,i){return o&&_defineProperties(t.prototype,o),i&&_defineProperties(t,i),t}(Dropdown,[{key:"componentDidUpdate",value:function componentDidUpdate(t){if(this.props.value!==t.value)if(this.props.value){var o=this.parseValue(this.props.value,this.props.options);o!==this.state.selected&&this.setState({selected:o})}else this.setState({selected:{label:void 0===this.props.placeholder?c:this.props.placeholder,value:""}})}},{key:"componentDidMount",value:function componentDidMount(){document.addEventListener("click",this.handleDocumentClick,!1),document.addEventListener("touchend",this.handleDocumentClick,!1)}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.mounted=!1,document.removeEventListener("click",this.handleDocumentClick,!1),document.removeEventListener("touchend",this.handleDocumentClick,!1)}},{key:"handleMouseDown",value:function handleMouseDown(t){this.props.onFocus&&"function"==typeof this.props.onFocus&&this.props.onFocus(this.state.isOpen),"mousedown"===t.type&&0!==t.button||(t.stopPropagation(),t.preventDefault(),this.props.disabled||this.setState({isOpen:!this.state.isOpen}))}},{key:"parseValue",value:function parseValue(t,o){var i;if("string"==typeof t)for(var r=0,a=o.length;r<a;r++)if("group"===o[r].type){var c=o[r].items.filter((function(o){return o.value===t}));c.length&&(i=c[0])}else void 0!==o[r].value&&o[r].value===t&&(i=o[r]);return i||t}},{key:"setValue",value:function setValue(t,o){var i={selected:{value:t,label:o},isOpen:!1};this.fireChangeEvent(i),this.setState(i)}},{key:"fireChangeEvent",value:function fireChangeEvent(t){t.selected!==this.state.selected&&this.props.onChange&&this.props.onChange(t.selected)}},{key:"renderOption",value:function renderOption(t){var o,i=t.value;void 0===i&&(i=t.label||t);var c=t.label||t.value||t,l=i===this.state.selected.value||i===this.state.selected,u=(_defineProperty(o={},"".concat(this.props.baseClassName,"-option"),!0),_defineProperty(o,t.className,!!t.className),_defineProperty(o,"is-selected",l),o),d=(0,a.default)(u),p=Object.keys(t.data||{}).reduce((function(o,i){return function _objectSpread(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(i,!0).forEach((function(o){_defineProperty(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(i).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(i,o))}))}return t}({},o,_defineProperty({},"data-".concat(i),t.data[i]))}),{});return r.default.createElement("div",_extends({key:i,className:d,onMouseDown:this.setValue.bind(this,i,c),onClick:this.setValue.bind(this,i,c),role:"option","aria-selected":l?"true":"false"},p),c)}},{key:"buildMenu",value:function buildMenu(){var t=this,o=this.props,i=o.options,a=o.baseClassName,c=i.map((function(o){if("group"===o.type){var i=r.default.createElement("div",{className:"".concat(a,"-title")},o.name),c=o.items.map((function(o){return t.renderOption(o)}));return r.default.createElement("div",{className:"".concat(a,"-group"),key:o.name,role:"listbox",tabIndex:"-1"},i,c)}return t.renderOption(o)}));return c.length?c:r.default.createElement("div",{className:"".concat(a,"-noresults")},"No options found")}},{key:"handleDocumentClick",value:function handleDocumentClick(t){this.mounted&&(this.dropdownRef.current.contains(t.target)||this.state.isOpen&&this.setState({isOpen:!1}))}},{key:"isValueSelected",value:function isValueSelected(){return"string"==typeof this.state.selected||""!==this.state.selected.value}},{key:"render",value:function render(){var t,o,i,c,l,u=this.props,d=u.baseClassName,p=u.controlClassName,A=u.placeholderClassName,f=u.menuClassName,y=u.arrowClassName,g=u.arrowClosed,m=u.arrowOpen,b=u.className,v=this.props.disabled?"Dropdown-disabled":"",w="string"==typeof this.state.selected?this.state.selected:this.state.selected.label,P=(0,a.default)((_defineProperty(t={},"".concat(d,"-root"),!0),_defineProperty(t,b,!!b),_defineProperty(t,"is-open",this.state.isOpen),t)),O=(0,a.default)((_defineProperty(o={},"".concat(d,"-control"),!0),_defineProperty(o,p,!!p),_defineProperty(o,v,!!v),o)),C=(0,a.default)((_defineProperty(i={},"".concat(d,"-placeholder"),!0),_defineProperty(i,A,!!A),_defineProperty(i,"is-selected",this.isValueSelected()),i)),k=(0,a.default)((_defineProperty(c={},"".concat(d,"-menu"),!0),_defineProperty(c,f,!!f),c)),D=(0,a.default)((_defineProperty(l={},"".concat(d,"-arrow"),!0),_defineProperty(l,y,!!y),l)),x=r.default.createElement("div",{className:C},w),j=this.state.isOpen?r.default.createElement("div",{className:k,"aria-expanded":"true"},this.buildMenu()):null;return r.default.createElement("div",{ref:this.dropdownRef,className:P},r.default.createElement("div",{className:O,onMouseDown:this.handleMouseDown.bind(this),onTouchEnd:this.handleMouseDown.bind(this),"aria-haspopup":"listbox"},x,r.default.createElement("div",{className:"".concat(d,"-arrow-wrapper")},m&&g?this.state.isOpen?m:g:r.default.createElement("span",{className:D}))),j)}}]),Dropdown}(r.Component);l.defaultProps={baseClassName:"Dropdown"};var u=l;o.Z=u},34384:(t,o,i)=>{i.r(o),i.d(o,{default:()=>y});var r=i(80248),a=i(34988),c=i(9420),l=i(87363),u=i(29523),d=i(88130),p=i(88683),A=i(47514);function ownKeys(t,o){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);o&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),i.push.apply(i,r)}return i}function _objectSpread(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(Object(i),!0).forEach((function(o){(0,r.Z)(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(i,o))}))}return t}var f=(0,p.getLogger)("Planner","InfoBox");const y=(0,c.Pi)((function ContentItemWrapper(t){var o=t.direction,i=t.mountElementId,r=t.drawerStyle,c=(0,d.NP)(),y=(0,l.useState)(!1),g=(0,a.Z)(y,2),m=g[0],b=g[1],v=(0,p.useDivaCore)().actions,w=v.openDrawerMenu,P=v.closeDrawerMenu;return(0,l.useEffect)((function(){if(c.settingsState.contentItemVisible&&c.settingsState.contentItemId){b(!0);var t=c.getIsInMobileView(),a=function onClose(){c.settingsState.setContentItemId()},l=(0,A.jsx)(u.Q,{onClose:function onClose(){a(),P("content-item")},contentItemId:c.settingsState.contentItemId,wrapperStyle:{display:"flex",flexDirection:"column"},onContentItemLoaded:function onContentItemLoaded(t){f.businessEvent("onLoadInfoBox","InfoBox","Lade Infobox",{id:c.settingsState.contentItemId,title:null!=t?t:void 0})}});w(t?{id:"content-item",content:l,onClose:a,open:!0,hideCloseButton:!0,showOverlay:!0,noModal:!1,snapPoints:[.9],direction:"bottom",mountElementId:"wcConfigurator-mobile-wrapper",handleInternScroll:!0}:{id:"content-item",content:l,onClose:a,open:!0,hideCloseButton:!0,showOverlay:!1,noModal:!0,direction:o,mountElementId:null!=i?i:"wcConfigurator-product",handleInternScroll:!0,drawerStyle:_objectSpread({position:"absolute",zIndex:550,maxHeight:600,top:0,bottom:"unset"},r)})}else m&&(P("content-item"),setTimeout((function(){b(!1)}),400))}),[c.settingsState.contentItemVisible,c.settingsState.contentItemId]),(0,A.jsx)(A.Fragment,{})}))},50638:(t,o,i)=>{i.r(o),i.d(o,{default:()=>E});var r=i(80248),a=i(72874),c=i(87363),l=i(88130),u=i(9420),d=i(29211),p=i(19715),A=i(93379),f=i.n(A),y=i(7795),g=i.n(y),m=i(90569),b=i.n(m),v=i(3565),w=i.n(v),P=i(19216),O=i.n(P),C=i(44589),k=i.n(C),D=i(23522),x={};x.styleTagTransform=k(),x.setAttributes=w(),x.insert=b().bind(null,"head"),x.domAPI=g(),x.insertStyleElement=O();f()(D.Z,x);D.Z&&D.Z.locals&&D.Z.locals;var j=i(34384),M=i(47514),I=["contentItemStartPos"];function ownKeys(t,o){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);o&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),i.push.apply(i,r)}return i}function _objectSpread(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(Object(i),!0).forEach((function(o){(0,r.Z)(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(i,o))}))}return t}const E=(0,u.Pi)((function Product(t){var o,i=t.contentItemStartPos,r=(0,a.Z)(t,I),u=(0,l.NP)(),A=(0,c.useRef)(null),f=function onClick(){if(A.current){var t=A.current.getBoundingClientRect().height;A.current.scrollTop>100&&(t=0),A.current.scrollTo({top:t,behavior:"smooth"})}};return(0,c.useEffect)((function(){A&&u.productState.setProductElement(A.current)}),[A]),(0,c.useEffect)((function(){var t;!u.uiState.isLoading&&null!==(t=u.configState.paramters)&&void 0!==t&&t.checkout&&f()}),[null===(o=u.configState.paramters)||void 0===o?void 0:o.checkout,u.uiState.isLoading]),(0,M.jsxs)("div",_objectSpread(_objectSpread({ref:A},r),{},{id:"wcConfigurator-product",children:[!u.uiState.isLoading&&(0,M.jsx)("div",{className:D.x,onClick:f}),(0,M.jsx)(p.default,{style:{height:"calc(100% - 40px)",width:"calc(100% - 40px)",top:0,margin:"20px"}}),!u.uiState.isLoading&&void 0!==u.divaWebPlanner.getBasket()&&(0,M.jsx)(d.default,{}),(0,M.jsx)(j.default,{direction:i})]}))}))},91578:(t,o,i)=>{i.r(o),i.d(o,{default:()=>k});var r=i(65515),a=i.n(r),c=(i(87363),i(68692)),l=i(93379),u=i.n(l),d=i(7795),p=i.n(d),A=i(90569),f=i.n(A),y=i(3565),g=i.n(y),m=i(19216),b=i.n(m),v=i(44589),w=i.n(v),P=i(75581),O={};O.styleTagTransform=w(),O.setAttributes=g(),O.insert=f().bind(null,"head"),O.domAPI=p(),O.insertStyleElement=b();u()(P.ZP,O);P.ZP&&P.ZP.locals&&P.ZP.locals;var C=i(47514);const k=function Toggle(t){var o,i=t.onChange,r=t.val,l=t.state,u=t.on,d=t.off,p=t.alwaysActiveColor,A=t.height,f=void 0===A?40:A,y=t.width,g=void 0===y?80:y,m=t.handleDiameter,b=void 0===m?32:m,v=t.toggleTextClassName,w=void 0===v?P.f6:v,O=null===(o=getComputedStyle(document.documentElement).getPropertyValue("--primaryColor"))||void 0===o?void 0:o.replace(/ /g,"");return(0,C.jsx)(c.Z,{className:"no-swiping",checkedIcon:u?(0,C.jsx)("div",{className:a()(w),id:"yes",children:u}):(0,C.jsx)(C.Fragment,{}),uncheckedIcon:d?(0,C.jsx)("div",{className:a()(w),id:"no",children:d}):(0,C.jsx)(C.Fragment,{}),onChange:function onChange(){return i(null!=r?r:!l)},checked:l,onColor:O,offColor:p?O:"#CACACA",height:f,width:g,handleDiameter:b})}},23522:(t,o,i)=>{i.d(o,{Z:()=>g,x:()=>y});var r=i(8081),a=i.n(r),c=i(23645),l=i.n(c),u=i(61667),d=i.n(u),p=new URL(i(66993),i.b),A=l()(a()),f=d()(p);A.push([t.id,".index-module--IAoMi {\n bottom: 40px;\n right: 8px;\n position: absolute;\n width: 70px;\n height: 55px;\n transform: rotate(90deg);\n background-image: url("+f+");\n background-repeat: no-repeat;\n background-position: center center;\n background-size: contain;\n z-index: 300;\n}\n",""]);var y="index-module--IAoMi";const g=A},75581:(t,o,i)=>{i.d(o,{ZP:()=>d,f6:()=>u});var r=i(8081),a=i.n(r),c=i(23645),l=i.n(c)()(a());l.push([t.id,".index-module--lgscn {\n display: flex;\n font-weight: 300;\n line-height: 40px;\n gap: 24px;\n}\n\n.index-module--D7_Ss {\n padding-left: 16px;\n color: white;\n line-height: 40px;\n font-weight: 300;\n}\n\n.index-module--D7_Ss#yes {\n padding-left: 16px;\n}\n\n.index-module--D7_Ss#no {\n padding-left: 4px;\n}\n",""]);var u="index-module--D7_Ss";const d=l},27557:t=>{t.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMzgiIHZpZXdCb3g9IjAgMCAxMyAzOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyIDFMMC45OTk5OTggMTkuMTgxOEwxMiAzNyIgc3Ryb2tlPSIjNEI0QjRCIiBzdHJva2Utd2lkdGg9IjEuMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo="},66993:t=>{t.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNiAxMCI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOm5vbmU7c3Ryb2tlOiM2ZjZmNmY7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO308L3N0eWxlPjwvZGVmcz48dGl0bGU+RWxlbWVudCAxPC90aXRsZT48ZyBpZD0iRWJlbmVfMiIgZGF0YS1uYW1lPSJFYmVuZSAyIj48ZyBpZD0iRWJlbmVfMS0yIiBkYXRhLW5hbWU9IkViZW5lIDEiPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTEwLjUuNWw1LDQuMjktNSw0LjcxIi8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNLjUuNWw1LDQuMjlMLjUsOS41Ii8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMjAuNS41bDUsNC4yOS01LDQuNzEiLz48L2c+PC9nPjwvc3ZnPg=="},64197:t=>{t.exports="data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA"},88291:(t,o,i)=>{function _objectDestructuringEmpty(t){if(null==t)throw new TypeError("Cannot destructure "+t)}i.d(o,{Z:()=>_objectDestructuringEmpty})},68692:(t,o,i)=>{i.d(o,{Z:()=>l});var r=i(87363);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},s.apply(this,arguments)}var a=r.createElement("svg",{viewBox:"-2 -5 14 20",height:"100%",width:"100%",style:{position:"absolute",top:0}},r.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"})),c=r.createElement("svg",{height:"100%",width:"100%",viewBox:"-2 -5 17 21",style:{position:"absolute",top:0}},r.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}));function h(t){if(7===t.length)return t;for(var o="#",i=1;i<4;i+=1)o+=t[i]+t[i];return o}function e(t,o,i,r,a){return function(t,o,i,r,a){var c=(t-i)/(o-i);if(0===c)return r;if(1===c)return a;for(var l="#",u=1;u<6;u+=2){var d=parseInt(r.substr(u,2),16),p=parseInt(a.substr(u,2),16),A=Math.round((1-c)*d+c*p).toString(16);1===A.length&&(A="0"+A),l+=A}return l}(t,o,i,h(r),h(a))}var l=function(t){function n(o){t.call(this,o);var i=o.height,r=o.width,a=o.checked;this.t=o.handleDiameter||i-2,this.i=Math.max(r-i,r-(i+this.t)/2),this.o=Math.max(0,(i-this.t)/2),this.state={h:a?this.i:this.o},this.l=0,this.u=0,this.p=this.p.bind(this),this.v=this.v.bind(this),this.k=this.k.bind(this),this.m=this.m.bind(this),this.M=this.M.bind(this),this.T=this.T.bind(this),this.$=this.$.bind(this),this.C=this.C.bind(this),this.D=this.D.bind(this),this.O=this.O.bind(this),this.S=this.S.bind(this),this.W=this.W.bind(this)}return t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n,n.prototype.componentDidMount=function(){this.I=!0},n.prototype.componentDidUpdate=function(t){t.checked!==this.props.checked&&this.setState({h:this.props.checked?this.i:this.o})},n.prototype.componentWillUnmount=function(){this.I=!1},n.prototype.H=function(t){this.R.focus(),this.setState({j:t,B:!0,L:Date.now()})},n.prototype.N=function(t){var o=this.state,i=o.j,r=o.h,a=(this.props.checked?this.i:this.o)+t-i;o.U||t===i||this.setState({U:!0});var c=Math.min(this.i,Math.max(this.o,a));c!==r&&this.setState({h:c})},n.prototype.A=function(t){var o=this.state,i=o.h,r=o.U,a=o.L,c=this.props.checked,l=(this.i+this.o)/2;this.setState({h:this.props.checked?this.i:this.o});var u=Date.now()-a;(!r||u<250||c&&i<=l||!c&&i>=l)&&this.X(t),this.I&&this.setState({U:!1,B:!1}),this.l=Date.now()},n.prototype.p=function(t){t.preventDefault(),"number"==typeof t.button&&0!==t.button||(this.H(t.clientX),window.addEventListener("mousemove",this.v),window.addEventListener("mouseup",this.k))},n.prototype.v=function(t){t.preventDefault(),this.N(t.clientX)},n.prototype.k=function(t){this.A(t),window.removeEventListener("mousemove",this.v),window.removeEventListener("mouseup",this.k)},n.prototype.m=function(t){this.F=null,this.H(t.touches[0].clientX)},n.prototype.M=function(t){this.N(t.touches[0].clientX)},n.prototype.T=function(t){t.preventDefault(),this.A(t)},n.prototype.C=function(t){Date.now()-this.l>50&&(this.X(t),Date.now()-this.u>50&&this.I&&this.setState({B:!1}))},n.prototype.D=function(){this.u=Date.now()},n.prototype.O=function(){this.setState({B:!0})},n.prototype.S=function(){this.setState({B:!1})},n.prototype.W=function(t){this.R=t},n.prototype.$=function(t){t.preventDefault(),this.R.focus(),this.X(t),this.I&&this.setState({B:!1})},n.prototype.X=function(t){var o=this.props;(0,o.onChange)(!o.checked,t,o.id)},n.prototype.render=function(){var t=this.props,o=t.checked,i=t.disabled,a=t.className,c=t.offColor,l=t.onColor,u=t.offHandleColor,d=t.onHandleColor,p=t.checkedIcon,A=t.uncheckedIcon,f=t.checkedHandleIcon,y=t.uncheckedHandleIcon,g=t.boxShadow,m=t.activeBoxShadow,b=t.height,v=t.width,w=t.borderRadius,P=function(t,o){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&-1===o.indexOf(r)&&(i[r]=t[r]);return i}(t,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),O=this.state,C=O.h,k=O.U,D=O.B,x={position:"relative",display:"inline-block",textAlign:"left",opacity:i?.5:1,direction:"ltr",borderRadius:b/2,WebkitTransition:"opacity 0.25s",MozTransition:"opacity 0.25s",transition:"opacity 0.25s",touchAction:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},j={height:b,width:v,margin:Math.max(0,(this.t-b)/2),position:"relative",background:e(C,this.i,this.o,c,l),borderRadius:"number"==typeof w?w:b/2,cursor:i?"default":"pointer",WebkitTransition:k?null:"background 0.25s",MozTransition:k?null:"background 0.25s",transition:k?null:"background 0.25s"},M={height:b,width:Math.min(1.5*b,v-(this.t+b)/2+1),position:"relative",opacity:(C-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:k?null:"opacity 0.25s",MozTransition:k?null:"opacity 0.25s",transition:k?null:"opacity 0.25s"},I={height:b,width:Math.min(1.5*b,v-(this.t+b)/2+1),position:"absolute",opacity:1-(C-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:k?null:"opacity 0.25s",MozTransition:k?null:"opacity 0.25s",transition:k?null:"opacity 0.25s"},E={height:this.t,width:this.t,background:e(C,this.i,this.o,u,d),display:"inline-block",cursor:i?"default":"pointer",borderRadius:"number"==typeof w?w-1:"50%",position:"absolute",transform:"translateX("+C+"px)",top:Math.max(0,(b-this.t)/2),outline:0,boxShadow:D?m:g,border:0,WebkitTransition:k?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:k?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:k?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},S={height:this.t,width:this.t,opacity:Math.max(2*(1-(C-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:k?null:"opacity 0.25s",MozTransition:k?null:"opacity 0.25s",transition:k?null:"opacity 0.25s"},B={height:this.t,width:this.t,opacity:Math.max(2*((C-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:k?null:"opacity 0.25s",MozTransition:k?null:"opacity 0.25s",transition:k?null:"opacity 0.25s"};return r.createElement("div",{className:a,style:x},r.createElement("div",{className:"react-switch-bg",style:j,onClick:i?null:this.$,onMouseDown:function(t){return t.preventDefault()}},p&&r.createElement("div",{style:M},p),A&&r.createElement("div",{style:I},A)),r.createElement("div",{className:"react-switch-handle",style:E,onClick:function(t){return t.preventDefault()},onMouseDown:i?null:this.p,onTouchStart:i?null:this.m,onTouchMove:i?null:this.M,onTouchEnd:i?null:this.T,onTouchCancel:i?null:this.S},y&&r.createElement("div",{style:S},y),f&&r.createElement("div",{style:B},f)),r.createElement("input",s({},{type:"checkbox",role:"switch","aria-checked":o,checked:o,disabled:i,style:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}},P,{ref:this.W,onFocus:this.O,onBlur:this.S,onKeyUp:this.D,onChange:this.C})))},n}(r.Component);l.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:a,checkedIcon:c,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56}}}]);
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[4818,5406,1578,4269,152,5301,6071,6665,8291,8488],{10304:(t,o,i)=>{o.Z=void 0;var r=function _interopRequireWildcard(t){if(t&&t.__esModule)return t;if(null===t||"object"!==_typeof(t)&&"function"!=typeof t)return{default:t};var o=_getRequireWildcardCache();if(o&&o.has(t))return o.get(t);var i={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var c=r?Object.getOwnPropertyDescriptor(t,a):null;c&&(c.get||c.set)?Object.defineProperty(i,a,c):i[a]=t[a]}i.default=t,o&&o.set(t,i);return i}(i(87363)),a=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(i(65515));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return t},t}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _extends(){return _extends=Object.assign||function(t){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},_extends.apply(this,arguments)}function ownKeys(t,o){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);o&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),i.push.apply(i,r)}return i}function _defineProperty(t,o,i){return o in t?Object.defineProperty(t,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[o]=i,t}function _defineProperties(t,o){for(var i=0;i<o.length;i++){var r=o[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _setPrototypeOf(t,o){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,o){return t.__proto__=o,t},_setPrototypeOf(t,o)}var c="Select...",l=function(t){function Dropdown(t){var o;return function _classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,Dropdown),(o=function _possibleConstructorReturn(t,o){return!o||"object"!==_typeof(o)&&"function"!=typeof o?_assertThisInitialized(t):o}(this,_getPrototypeOf(Dropdown).call(this,t))).state={selected:o.parseValue(t.value,t.options)||{label:void 0===t.placeholder?c:t.placeholder,value:""},isOpen:!1},o.dropdownRef=(0,r.createRef)(),o.mounted=!0,o.handleDocumentClick=o.handleDocumentClick.bind(_assertThisInitialized(o)),o.fireChangeEvent=o.fireChangeEvent.bind(_assertThisInitialized(o)),o}return function _inherits(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),o&&_setPrototypeOf(t,o)}(Dropdown,t),function _createClass(t,o,i){return o&&_defineProperties(t.prototype,o),i&&_defineProperties(t,i),t}(Dropdown,[{key:"componentDidUpdate",value:function componentDidUpdate(t){if(this.props.value!==t.value)if(this.props.value){var o=this.parseValue(this.props.value,this.props.options);o!==this.state.selected&&this.setState({selected:o})}else this.setState({selected:{label:void 0===this.props.placeholder?c:this.props.placeholder,value:""}})}},{key:"componentDidMount",value:function componentDidMount(){document.addEventListener("click",this.handleDocumentClick,!1),document.addEventListener("touchend",this.handleDocumentClick,!1)}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.mounted=!1,document.removeEventListener("click",this.handleDocumentClick,!1),document.removeEventListener("touchend",this.handleDocumentClick,!1)}},{key:"handleMouseDown",value:function handleMouseDown(t){this.props.onFocus&&"function"==typeof this.props.onFocus&&this.props.onFocus(this.state.isOpen),"mousedown"===t.type&&0!==t.button||(t.stopPropagation(),t.preventDefault(),this.props.disabled||this.setState({isOpen:!this.state.isOpen}))}},{key:"parseValue",value:function parseValue(t,o){var i;if("string"==typeof t)for(var r=0,a=o.length;r<a;r++)if("group"===o[r].type){var c=o[r].items.filter((function(o){return o.value===t}));c.length&&(i=c[0])}else void 0!==o[r].value&&o[r].value===t&&(i=o[r]);return i||t}},{key:"setValue",value:function setValue(t,o){var i={selected:{value:t,label:o},isOpen:!1};this.fireChangeEvent(i),this.setState(i)}},{key:"fireChangeEvent",value:function fireChangeEvent(t){t.selected!==this.state.selected&&this.props.onChange&&this.props.onChange(t.selected)}},{key:"renderOption",value:function renderOption(t){var o,i=t.value;void 0===i&&(i=t.label||t);var c=t.label||t.value||t,l=i===this.state.selected.value||i===this.state.selected,u=(_defineProperty(o={},"".concat(this.props.baseClassName,"-option"),!0),_defineProperty(o,t.className,!!t.className),_defineProperty(o,"is-selected",l),o),d=(0,a.default)(u),p=Object.keys(t.data||{}).reduce((function(o,i){return function _objectSpread(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(i,!0).forEach((function(o){_defineProperty(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(i).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(i,o))}))}return t}({},o,_defineProperty({},"data-".concat(i),t.data[i]))}),{});return r.default.createElement("div",_extends({key:i,className:d,onMouseDown:this.setValue.bind(this,i,c),onClick:this.setValue.bind(this,i,c),role:"option","aria-selected":l?"true":"false"},p),c)}},{key:"buildMenu",value:function buildMenu(){var t=this,o=this.props,i=o.options,a=o.baseClassName,c=i.map((function(o){if("group"===o.type){var i=r.default.createElement("div",{className:"".concat(a,"-title")},o.name),c=o.items.map((function(o){return t.renderOption(o)}));return r.default.createElement("div",{className:"".concat(a,"-group"),key:o.name,role:"listbox",tabIndex:"-1"},i,c)}return t.renderOption(o)}));return c.length?c:r.default.createElement("div",{className:"".concat(a,"-noresults")},"No options found")}},{key:"handleDocumentClick",value:function handleDocumentClick(t){this.mounted&&(this.dropdownRef.current.contains(t.target)||this.state.isOpen&&this.setState({isOpen:!1}))}},{key:"isValueSelected",value:function isValueSelected(){return"string"==typeof this.state.selected||""!==this.state.selected.value}},{key:"render",value:function render(){var t,o,i,c,l,u=this.props,d=u.baseClassName,p=u.controlClassName,A=u.placeholderClassName,f=u.menuClassName,y=u.arrowClassName,g=u.arrowClosed,m=u.arrowOpen,b=u.className,v=this.props.disabled?"Dropdown-disabled":"",w="string"==typeof this.state.selected?this.state.selected:this.state.selected.label,P=(0,a.default)((_defineProperty(t={},"".concat(d,"-root"),!0),_defineProperty(t,b,!!b),_defineProperty(t,"is-open",this.state.isOpen),t)),O=(0,a.default)((_defineProperty(o={},"".concat(d,"-control"),!0),_defineProperty(o,p,!!p),_defineProperty(o,v,!!v),o)),C=(0,a.default)((_defineProperty(i={},"".concat(d,"-placeholder"),!0),_defineProperty(i,A,!!A),_defineProperty(i,"is-selected",this.isValueSelected()),i)),k=(0,a.default)((_defineProperty(c={},"".concat(d,"-menu"),!0),_defineProperty(c,f,!!f),c)),D=(0,a.default)((_defineProperty(l={},"".concat(d,"-arrow"),!0),_defineProperty(l,y,!!y),l)),x=r.default.createElement("div",{className:C},w),j=this.state.isOpen?r.default.createElement("div",{className:k,"aria-expanded":"true"},this.buildMenu()):null;return r.default.createElement("div",{ref:this.dropdownRef,className:P},r.default.createElement("div",{className:O,onMouseDown:this.handleMouseDown.bind(this),onTouchEnd:this.handleMouseDown.bind(this),"aria-haspopup":"listbox"},x,r.default.createElement("div",{className:"".concat(d,"-arrow-wrapper")},m&&g?this.state.isOpen?m:g:r.default.createElement("span",{className:D}))),j)}}]),Dropdown}(r.Component);l.defaultProps={baseClassName:"Dropdown"};var u=l;o.Z=u},34384:(t,o,i)=>{i.r(o),i.d(o,{default:()=>y});var r=i(80248),a=i(34988),c=i(9420),l=i(87363),u=i(29523),d=i(88130),p=i(88683),A=i(47514);function ownKeys(t,o){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);o&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),i.push.apply(i,r)}return i}function _objectSpread(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(Object(i),!0).forEach((function(o){(0,r.Z)(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(i,o))}))}return t}var f=(0,p.getLogger)("Planner","InfoBox");const y=(0,c.Pi)((function ContentItemWrapper(t){var o=t.direction,i=t.mountElementId,r=t.drawerStyle,c=(0,d.NP)(),y=(0,l.useState)(!1),g=(0,a.Z)(y,2),m=g[0],b=g[1],v=(0,p.useDivaCore)().actions,w=v.openDrawerMenu,P=v.closeDrawerMenu;return(0,l.useEffect)((function(){if(c.settingsState.contentItemVisible&&c.settingsState.contentItemId){b(!0);var t=c.getIsInMobileView(),a=function onClose(){c.settingsState.setContentItemId()},l=(0,A.jsx)(u.Q,{onClose:function onClose(){a(),P("content-item")},contentItemId:c.settingsState.contentItemId,wrapperStyle:{display:"flex",flexDirection:"column"},onContentItemLoaded:function onContentItemLoaded(t){f.businessEvent("onLoadInfoBox","InfoBox","Lade Infobox",{id:c.settingsState.contentItemId,title:null!=t?t:void 0})}});w(t?{id:"content-item",content:l,onClose:a,open:!0,hideCloseButton:!0,showOverlay:!0,noModal:!1,snapPoints:[.9],direction:"bottom",mountElementId:"wcConfigurator-mobile-wrapper",handleInternScroll:!0}:{id:"content-item",content:l,onClose:a,open:!0,hideCloseButton:!0,showOverlay:!1,noModal:!0,direction:o,mountElementId:null!=i?i:"wcConfigurator-product",handleInternScroll:!0,drawerStyle:_objectSpread({position:"absolute",zIndex:550,maxHeight:600,top:0,bottom:"unset"},r)})}else m&&(P("content-item"),setTimeout((function(){b(!1)}),400))}),[c.settingsState.contentItemVisible,c.settingsState.contentItemId]),(0,A.jsx)(A.Fragment,{})}))},50638:(t,o,i)=>{i.r(o),i.d(o,{default:()=>E});var r=i(80248),a=i(72874),c=i(87363),l=i(88130),u=i(9420),d=i(29211),p=i(19715),A=i(93379),f=i.n(A),y=i(7795),g=i.n(y),m=i(90569),b=i.n(m),v=i(3565),w=i.n(v),P=i(19216),O=i.n(P),C=i(44589),k=i.n(C),D=i(23522),x={};x.styleTagTransform=k(),x.setAttributes=w(),x.insert=b().bind(null,"head"),x.domAPI=g(),x.insertStyleElement=O();f()(D.Z,x);D.Z&&D.Z.locals&&D.Z.locals;var j=i(34384),M=i(47514),I=["contentItemStartPos"];function ownKeys(t,o){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);o&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),i.push.apply(i,r)}return i}function _objectSpread(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(Object(i),!0).forEach((function(o){(0,r.Z)(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(i,o))}))}return t}const E=(0,u.Pi)((function Product(t){var o,i=t.contentItemStartPos,r=(0,a.Z)(t,I),u=(0,l.NP)(),A=(0,c.useRef)(null),f=function onClick(){if(A.current){var t=A.current.getBoundingClientRect().height;A.current.scrollTop>100&&(t=0),A.current.scrollTo({top:t,behavior:"smooth"})}};return(0,c.useEffect)((function(){A&&u.productState.setProductElement(A.current)}),[A]),(0,c.useEffect)((function(){var t;!u.uiState.isLoading&&null!==(t=u.configState.paramters)&&void 0!==t&&t.checkout&&f()}),[null===(o=u.configState.paramters)||void 0===o?void 0:o.checkout,u.uiState.isLoading]),(0,M.jsxs)("div",_objectSpread(_objectSpread({ref:A},r),{},{id:"wcConfigurator-product",children:[!u.uiState.isLoading&&(0,M.jsx)("div",{className:D.x,onClick:f}),(0,M.jsx)(p.default,{style:{height:"calc(100% - 40px)",width:"calc(100% - 40px)",top:0,margin:"20px"}}),!u.uiState.isLoading&&void 0!==u.divaWebPlanner.getBasket()&&(0,M.jsx)(d.default,{}),(0,M.jsx)(j.default,{direction:i})]}))}))},91578:(t,o,i)=>{i.r(o),i.d(o,{default:()=>k});var r=i(65515),a=i.n(r),c=(i(87363),i(68692)),l=i(93379),u=i.n(l),d=i(7795),p=i.n(d),A=i(90569),f=i.n(A),y=i(3565),g=i.n(y),m=i(19216),b=i.n(m),v=i(44589),w=i.n(v),P=i(75581),O={};O.styleTagTransform=w(),O.setAttributes=g(),O.insert=f().bind(null,"head"),O.domAPI=p(),O.insertStyleElement=b();u()(P.ZP,O);P.ZP&&P.ZP.locals&&P.ZP.locals;var C=i(47514);const k=function Toggle(t){var o,i=t.onChange,r=t.val,l=t.state,u=t.on,d=t.off,p=t.alwaysActiveColor,A=t.height,f=void 0===A?40:A,y=t.width,g=void 0===y?80:y,m=t.handleDiameter,b=void 0===m?32:m,v=t.toggleTextClassName,w=void 0===v?P.f6:v,O=null===(o=getComputedStyle(document.documentElement).getPropertyValue("--primaryColor"))||void 0===o?void 0:o.replace(/ /g,"");return(0,C.jsx)(c.Z,{className:"no-swiping",checkedIcon:u?(0,C.jsx)("div",{className:a()(w),id:"yes",children:u}):(0,C.jsx)(C.Fragment,{}),uncheckedIcon:d?(0,C.jsx)("div",{className:a()(w),id:"no",children:d}):(0,C.jsx)(C.Fragment,{}),onChange:function onChange(){return i(null!=r?r:!l)},checked:l,onColor:O,offColor:p?O:"#CACACA",height:f,width:g,handleDiameter:b})}},23522:(t,o,i)=>{i.d(o,{Z:()=>g,x:()=>y});var r=i(8081),a=i.n(r),c=i(23645),l=i.n(c),u=i(61667),d=i.n(u),p=new URL(i(66993),i.b),A=l()(a()),f=d()(p);A.push([t.id,".index-module--IAoMi {\n bottom: 40px;\n right: 8px;\n position: absolute;\n width: 70px;\n height: 55px;\n transform: rotate(90deg);\n background-image: url("+f+");\n background-repeat: no-repeat;\n background-position: center center;\n background-size: contain;\n z-index: 300;\n}\n",""]);var y="index-module--IAoMi";const g=A},75581:(t,o,i)=>{i.d(o,{ZP:()=>d,f6:()=>u});var r=i(8081),a=i.n(r),c=i(23645),l=i.n(c)()(a());l.push([t.id,".index-module--lgscn {\n display: flex;\n font-weight: 300;\n line-height: 40px;\n gap: 24px;\n}\n\n.index-module--D7_Ss {\n padding-left: 16px;\n color: white;\n line-height: 40px;\n font-weight: 300;\n}\n\n.index-module--D7_Ss#yes {\n padding-left: 16px;\n}\n\n.index-module--D7_Ss#no {\n padding-left: 4px;\n}\n",""]);var u="index-module--D7_Ss";const d=l},27557:t=>{t.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMzgiIHZpZXdCb3g9IjAgMCAxMyAzOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyIDFMMC45OTk5OTggMTkuMTgxOEwxMiAzNyIgc3Ryb2tlPSIjNEI0QjRCIiBzdHJva2Utd2lkdGg9IjEuMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo="},66993:t=>{t.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNiAxMCI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOm5vbmU7c3Ryb2tlOiM2ZjZmNmY7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO308L3N0eWxlPjwvZGVmcz48dGl0bGU+RWxlbWVudCAxPC90aXRsZT48ZyBpZD0iRWJlbmVfMiIgZGF0YS1uYW1lPSJFYmVuZSAyIj48ZyBpZD0iRWJlbmVfMS0yIiBkYXRhLW5hbWU9IkViZW5lIDEiPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTEwLjUuNWw1LDQuMjktNSw0LjcxIi8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNLjUuNWw1LDQuMjlMLjUsOS41Ii8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMjAuNS41bDUsNC4yOS01LDQuNzEiLz48L2c+PC9nPjwvc3ZnPg=="},64197:t=>{t.exports="data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA"},88291:(t,o,i)=>{function _objectDestructuringEmpty(t){if(null==t)throw new TypeError("Cannot destructure "+t)}i.d(o,{Z:()=>_objectDestructuringEmpty})},68692:(t,o,i)=>{i.d(o,{Z:()=>l});var r=i(87363);function s(){return s=Object.assign?Object.assign.bind():function(t){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},s.apply(this,arguments)}var a=r.createElement("svg",{viewBox:"-2 -5 14 20",height:"100%",width:"100%",style:{position:"absolute",top:0}},r.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"})),c=r.createElement("svg",{height:"100%",width:"100%",viewBox:"-2 -5 17 21",style:{position:"absolute",top:0}},r.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}));function h(t){if(7===t.length)return t;for(var o="#",i=1;i<4;i+=1)o+=t[i]+t[i];return o}function e(t,o,i,r,a){return function(t,o,i,r,a){var c=(t-i)/(o-i);if(0===c)return r;if(1===c)return a;for(var l="#",u=1;u<6;u+=2){var d=parseInt(r.substr(u,2),16),p=parseInt(a.substr(u,2),16),A=Math.round((1-c)*d+c*p).toString(16);1===A.length&&(A="0"+A),l+=A}return l}(t,o,i,h(r),h(a))}var l=function(t){function n(o){t.call(this,o);var i=o.height,r=o.width,a=o.checked;this.t=o.handleDiameter||i-2,this.i=Math.max(r-i,r-(i+this.t)/2),this.o=Math.max(0,(i-this.t)/2),this.state={h:a?this.i:this.o},this.l=0,this.u=0,this.p=this.p.bind(this),this.v=this.v.bind(this),this.k=this.k.bind(this),this.m=this.m.bind(this),this.M=this.M.bind(this),this.T=this.T.bind(this),this.$=this.$.bind(this),this.C=this.C.bind(this),this.D=this.D.bind(this),this.O=this.O.bind(this),this.S=this.S.bind(this),this.W=this.W.bind(this)}return t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n,n.prototype.componentDidMount=function(){this.I=!0},n.prototype.componentDidUpdate=function(t){t.checked!==this.props.checked&&this.setState({h:this.props.checked?this.i:this.o})},n.prototype.componentWillUnmount=function(){this.I=!1},n.prototype.H=function(t){this.R.focus(),this.setState({j:t,B:!0,L:Date.now()})},n.prototype.N=function(t){var o=this.state,i=o.j,r=o.h,a=(this.props.checked?this.i:this.o)+t-i;o.U||t===i||this.setState({U:!0});var c=Math.min(this.i,Math.max(this.o,a));c!==r&&this.setState({h:c})},n.prototype.A=function(t){var o=this.state,i=o.h,r=o.U,a=o.L,c=this.props.checked,l=(this.i+this.o)/2;this.setState({h:this.props.checked?this.i:this.o});var u=Date.now()-a;(!r||u<250||c&&i<=l||!c&&i>=l)&&this.X(t),this.I&&this.setState({U:!1,B:!1}),this.l=Date.now()},n.prototype.p=function(t){t.preventDefault(),"number"==typeof t.button&&0!==t.button||(this.H(t.clientX),window.addEventListener("mousemove",this.v),window.addEventListener("mouseup",this.k))},n.prototype.v=function(t){t.preventDefault(),this.N(t.clientX)},n.prototype.k=function(t){this.A(t),window.removeEventListener("mousemove",this.v),window.removeEventListener("mouseup",this.k)},n.prototype.m=function(t){this.F=null,this.H(t.touches[0].clientX)},n.prototype.M=function(t){this.N(t.touches[0].clientX)},n.prototype.T=function(t){t.preventDefault(),this.A(t)},n.prototype.C=function(t){Date.now()-this.l>50&&(this.X(t),Date.now()-this.u>50&&this.I&&this.setState({B:!1}))},n.prototype.D=function(){this.u=Date.now()},n.prototype.O=function(){this.setState({B:!0})},n.prototype.S=function(){this.setState({B:!1})},n.prototype.W=function(t){this.R=t},n.prototype.$=function(t){t.preventDefault(),this.R.focus(),this.X(t),this.I&&this.setState({B:!1})},n.prototype.X=function(t){var o=this.props;(0,o.onChange)(!o.checked,t,o.id)},n.prototype.render=function(){var t=this.props,o=t.checked,i=t.disabled,a=t.className,c=t.offColor,l=t.onColor,u=t.offHandleColor,d=t.onHandleColor,p=t.checkedIcon,A=t.uncheckedIcon,f=t.checkedHandleIcon,y=t.uncheckedHandleIcon,g=t.boxShadow,m=t.activeBoxShadow,b=t.height,v=t.width,w=t.borderRadius,P=function(t,o){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&-1===o.indexOf(r)&&(i[r]=t[r]);return i}(t,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),O=this.state,C=O.h,k=O.U,D=O.B,x={position:"relative",display:"inline-block",textAlign:"left",opacity:i?.5:1,direction:"ltr",borderRadius:b/2,WebkitTransition:"opacity 0.25s",MozTransition:"opacity 0.25s",transition:"opacity 0.25s",touchAction:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},j={height:b,width:v,margin:Math.max(0,(this.t-b)/2),position:"relative",background:e(C,this.i,this.o,c,l),borderRadius:"number"==typeof w?w:b/2,cursor:i?"default":"pointer",WebkitTransition:k?null:"background 0.25s",MozTransition:k?null:"background 0.25s",transition:k?null:"background 0.25s"},M={height:b,width:Math.min(1.5*b,v-(this.t+b)/2+1),position:"relative",opacity:(C-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:k?null:"opacity 0.25s",MozTransition:k?null:"opacity 0.25s",transition:k?null:"opacity 0.25s"},I={height:b,width:Math.min(1.5*b,v-(this.t+b)/2+1),position:"absolute",opacity:1-(C-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:k?null:"opacity 0.25s",MozTransition:k?null:"opacity 0.25s",transition:k?null:"opacity 0.25s"},E={height:this.t,width:this.t,background:e(C,this.i,this.o,u,d),display:"inline-block",cursor:i?"default":"pointer",borderRadius:"number"==typeof w?w-1:"50%",position:"absolute",transform:"translateX("+C+"px)",top:Math.max(0,(b-this.t)/2),outline:0,boxShadow:D?m:g,border:0,WebkitTransition:k?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:k?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:k?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},S={height:this.t,width:this.t,opacity:Math.max(2*(1-(C-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:k?null:"opacity 0.25s",MozTransition:k?null:"opacity 0.25s",transition:k?null:"opacity 0.25s"},B={height:this.t,width:this.t,opacity:Math.max(2*((C-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:k?null:"opacity 0.25s",MozTransition:k?null:"opacity 0.25s",transition:k?null:"opacity 0.25s"};return r.createElement("div",{className:a,style:x},r.createElement("div",{className:"react-switch-bg",style:j,onClick:i?null:this.$,onMouseDown:function(t){return t.preventDefault()}},p&&r.createElement("div",{style:M},p),A&&r.createElement("div",{style:I},A)),r.createElement("div",{className:"react-switch-handle",style:E,onClick:function(t){return t.preventDefault()},onMouseDown:i?null:this.p,onTouchStart:i?null:this.m,onTouchMove:i?null:this.M,onTouchEnd:i?null:this.T,onTouchCancel:i?null:this.S},y&&r.createElement("div",{style:S},y),f&&r.createElement("div",{style:B},f)),r.createElement("input",s({},{type:"checkbox",role:"switch","aria-checked":o,checked:o,disabled:i,style:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}},P,{ref:this.W,onFocus:this.O,onBlur:this.S,onKeyUp:this.D,onChange:this.C})))},n}(r.Component);l.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:a,checkedIcon:c,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56}}}]);
|