/*! For license information please see widget.js.LICENSE.txt */ (()=>{var __webpack_modules__={891:function(module,exports,__webpack_require__){var factory;"undefined"!=typeof document&&"undefined"!=typeof navigator&&(factory=function(){"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(t){_useWebWorker=!!t},getWebWorker=function(){return _useWebWorker},setLocationHref=function(t){locationHref=t},getLocationHref=function(){return locationHref};function createTag(t){return document.createElement(t)}function extendPrototype(t,e){var r,i,a=t.length;for(r=0;r1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[2]+=e,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[0]+=e/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var t,e,r=[];for(t=0;t<256;t+=1)e=t.toString(16),r[t]=1===e.length?"0"+e:e;return function(t,e,i){return t<0&&(t=0),e<0&&(e=0),i<0&&(i=0),"#"+r[t]+r[e]+r[i]}}(),setSubframeEnabled=function(t){subframeEnabled=!!t},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(t){expressionsPlugin=t},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(t){expressionsInterfaces=t},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(t){defaultCurveSegments=t},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(t){idPrefix$1=t},getIdPrefix=function(){return idPrefix$1};function createNS(t){return document.createElementNS(svgNS,t)}function _typeof$5(t){return _typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$5(t)}var dataManager=function(){var t,e,r=1,i=[],a={onmessage:function(){},postMessage:function(e){t({data:e})}},n={postMessage:function(t){a.onmessage({data:t})}};function s(){e||(e=function(e){if(window.Worker&&window.Blob&&getWebWorker()){var r=new Blob(["var _workerSelf = self; self.onmessage = ",e.toString()],{type:"text/javascript"}),i=URL.createObjectURL(r);return new Worker(i)}return t=e,a}((function(t){if(n.dataManager||(n.dataManager=function(){function t(a,n){var s,o,l,h,p,d,f=a.length;for(o=0;o=0;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)i(t[e].ks.k);else for(n=t[e].ks.k.length,a=0;ar[0]||!(r[0]>t[0])&&(t[1]>r[1]||!(r[1]>t[1])&&(t[2]>r[2]||!(r[2]>t[2])&&null))}var n,s=function(){var t=[4,4,14];function e(t){var e,r,i,a=t.length;for(e=0;e=0;r-=1)if("sh"===t[r].ty)if(t[r].ks.k.i)t[r].ks.k.c=t[r].closed;else for(a=t[r].ks.k.length,i=0;i500)&&(this._imageLoaded(),clearInterval(r)),e+=1}.bind(this),50)}function n(t){var e={assetData:t},r=i(t,this.assetsPath,this.path);return dataManager.loadData(r,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}function s(){this._imageLoaded=e.bind(this),this._footageLoaded=r.bind(this),this.testImageLoaded=a.bind(this),this.createFootageData=n.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return s.prototype={loadAssets:function(t,e){var r;this.imagesLoadedCb=e;var i=t.length;for(r=0;rthis.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,r,i=this.animationData.layers,a=i.length,n=t.layers,s=n.length;for(r=0;rthis.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,r=0;r=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(r=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),r&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFramee&&(r=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==r&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"===_typeof$4(t[0])){var r,i=t.length;for(r=0;r=0;r-=1)e[r].animation.destroy(t)},t.freeze=function(){s=!0},t.unfreeze=function(){s=!1,C()},t.setVolume=function(t,r){var a;for(a=0;a=.001?function(t,e,r,i){for(var a=0;a<4;++a){var n=h(e,r,i);if(0===n)return e;e-=(l(e,r,i)-t)/n}return e}(t,c,e,a):0===d?c:function(t,e,r,i,a){var n,s,o=0;do{(n=l(s=e+(r-e)/2,i,a)-t)>0?r=s:e=s}while(Math.abs(n)>1e-7&&++o<10);return s}(t,s,s+i,e,a)}},t}(),pooling={double:function(t){return t.concat(createSizedArray(t.length))}},poolFactory=function(t,e,r){var i=0,a=t,n=createSizedArray(a);return{newElement:function(){return i?n[i-=1]:e()},release:function(t){i===a&&(n=pooling.double(n),a*=2),r&&r(t),n[i]=t,i+=1}}},bezierLengthPool=poolFactory(8,(function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}})),segmentsLengthPool=poolFactory(8,(function(){return{lengths:[],totalLength:0}}),(function(t){var e,r=t.lengths.length;for(e=0;e-.001&&s<.001}var r=function(t,e,r,i){var a,n,s,o,l,h,p=getDefaultCurveSegments(),c=0,d=[],f=[],C=bezierLengthPool.newElement();for(s=r.length,a=0;as?-1:1,h=!0;h;)if(i[n]<=s&&i[n+1]>s?(o=(s-i[n])/(i[n+1]-i[n]),h=!1):n+=l,n<0||n>=a-1){if(n===a-1)return r[n];h=!1}return r[n]+(r[n+1]-r[n])*o}var l=createTypedArray("float32",8);return{getSegmentsLength:function(t){var e,i=segmentsLengthPool.newElement(),a=t.c,n=t.v,s=t.o,o=t.i,l=t._length,h=i.lengths,p=0;for(e=0;e1&&(n=1);var p,c=o(n,h),d=o(s=s>1?1:s,h),f=e.length,C=1-c,u=1-d,m=C*C*C,g=c*C*C*3,y=c*c*C*3,v=c*c*c,b=C*C*u,x=c*C*u+C*c*u+C*C*d,M=c*c*u+C*c*d+c*C*d,w=c*c*d,P=C*u*u,_=c*u*u+C*d*u+C*u*d,E=c*d*u+C*d*d+c*u*d,S=c*d*d,k=u*u*u,F=d*u*u+u*d*u+u*u*d,A=d*d*u+u*d*d+d*u*d,L=d*d*d;for(p=0;pf?d>C?d-f-C:C-f-d:C>f?C-f-d:f-d-C)>-1e-4&&c<1e-4}}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(t,e){var r,i=this.offsetTime;"multidimensional"===this.propType&&(r=createTypedArray("float32",this.pv.length));for(var a,n,s,o,l,h,p,c,d,f=e.lastIndex,C=f,u=this.keyframes.length-1,m=!0;m;){if(a=this.keyframes[C],n=this.keyframes[C+1],C===u-1&&t>=n.t-i){a.h&&(a=n),f=0;break}if(n.t-i>t){f=C;break}C=y||t=y?b.points.length-1:0;for(l=b.points[x].point.length,o=0;o=P&&w=y?(r[0]=g[0],r[1]=g[1],r[2]=g[2]):t<=v?(r[0]=a.s[0],r[1]=a.s[1],r[2]=a.s[2]):quaternionToEuler(r,slerp(createQuaternion(a.s),createQuaternion(g),(t-v)/(y-v)));else for(C=0;C=y?h=1:t1e-6?(i=Math.acos(a),n=Math.sin(i),s=Math.sin((1-r)*i)/n,o=Math.sin(r*i)/n):(s=1-r,o=r),l[0]=s*h+o*f,l[1]=s*p+o*C,l[2]=s*c+o*u,l[3]=s*d+o*m,l}function quaternionToEuler(t,e){var r=e[0],i=e[1],a=e[2],n=e[3],s=Math.atan2(2*i*n-2*r*a,1-2*i*i-2*a*a),o=Math.asin(2*r*i+2*a*n),l=Math.atan2(2*r*n-2*i*a,1-2*r*r-2*a*a);t[0]=s/degToRads,t[1]=o/degToRads,t[2]=l/degToRads}function createQuaternion(t){var e=t[0]*degToRads,r=t[1]*degToRads,i=t[2]*degToRads,a=Math.cos(e/2),n=Math.cos(r/2),s=Math.cos(i/2),o=Math.sin(e/2),l=Math.sin(r/2),h=Math.sin(i/2);return[o*l*s+a*n*h,o*n*s+a*l*h,a*l*s-o*n*h,a*n*s-o*l*h]}function getValueAtCurrentTime(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=r&&t>=r||this._caching.lastFrame=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var i=this.interpolateValue(t,this._caching);this.pv=i}return this._caching.lastFrame=t,this.pv}function setVValue(t){var e;if("unidimensional"===this.propType)e=t*this.mult,mathAbs(this.v-e)>1e-5&&(this.v=e,this._mdf=!0);else for(var r=0,i=this.v.length;r1e-5&&(this.v[r]=e,this._mdf=!0),r+=1}function processEffectsSequence(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(t=0;t=this._maxLength&&this.doubleArrayLength(),r){case"v":n=this.v;break;case"i":n=this.i;break;case"o":n=this.o;break;default:n=[]}(!n[i]||n[i]&&!a)&&(n[i]=pointPool.newElement()),n[i][0]=t,n[i][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,i,a,n,s,o){this.setXYAt(t,e,"v",s,o),this.setXYAt(r,i,"o",s,o),this.setXYAt(a,n,"i",s,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,i=this.i,a=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],r[0][0],r[0][1],0,!1),a=1);var n,s=this._length-1,o=this._length;for(n=a;n=f[f.length-1].t-this.offsetTime)i=f[f.length-1].s?f[f.length-1].s[0]:f[f.length-2].e[0],n=!0;else{for(var C,u,m,g=d,y=f.length-1,v=!0;v&&(C=f[g],!((u=f[g+1]).t-this.offsetTime>t));)g=u.t-this.offsetTime)p=1;else if(ti&&e>i)||(this._caching.lastIndex=a0||t>-1e-6&&t<0?i(1e4*t)/1e4:t}function D(){var t=this.props;return"matrix("+T(t[0])+","+T(t[1])+","+T(t[4])+","+T(t[5])+","+T(t[12])+","+T(t[13])+")"}return function(){this.reset=a,this.rotate=n,this.rotateX=s,this.rotateY=o,this.rotateZ=l,this.skew=p,this.skewFromAxis=c,this.shear=h,this.scale=d,this.setTransform=f,this.translate=C,this.transform=u,this.multiply=m,this.applyToPoint=x,this.applyToX=M,this.applyToY=w,this.applyToZ=P,this.applyToPointArray=F,this.applyToTriplePoints=k,this.applyToPointStringified=A,this.toCSS=L,this.to2dCSS=D,this.clone=v,this.cloneFromProps=b,this.equals=y,this.inversePoints=S,this.inversePoint=E,this.getInverseMatrix=_,this._t=this.transform,this.isIdentity=g,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(t){return _typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$3(t)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="";function setLocation(t){setLocationHref(t)}function searchAnimations(){!0===standalone?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(t){setSubframeEnabled(t)}function setPrefix(t){setIdPrefix(t)}function loadAnimation(t){return!0===standalone&&(t.animationData=JSON.parse(animationData)),animationManager.loadAnimation(t)}function setQuality(t){if("string"==typeof t)switch(t){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(t)&&t>1&&setDefaultCurveSegments(t);getDefaultCurveSegments()>=50?roundValues(!1):roundValues(!0)}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(t,e){"expressions"===t&&setExpressionsPlugin(e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),r=0;r=1?n.push({s:t-1,e:e-1}):(n.push({s:t,e:1}),n.push({s:0,e:e-1}));var s,o,l=[],h=n.length;for(s=0;si+r||(p=o.s*a<=i?0:(o.s*a-i)/r,c=o.e*a>=i+r?1:(o.e*a-i)/r,l.push([p,c]))}return l.length||l.push([0,0]),l},TrimModifier.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;e1?1+n:this.s.v<0?0+n:this.s.v+n)>(r=this.e.v>1?1+n:this.e.v<0?0+n:this.e.v+n)){var s=e;e=r,r=s}e=1e-4*Math.round(1e4*e),r=1e-4*Math.round(1e4*r),this.sValue=e,this.eValue=r}else e=this.sValue,r=this.eValue;var o,l,h,p,c,d=this.shapes.length,f=0;if(r===e)for(a=0;a=0;a-=1)if((C=this.shapes[a]).shape._mdf){for((u=C.localShapeCollection).releaseShapes(),2===this.m&&d>1?(g=this.calculateShapeEdges(e,r,C.totalShapeLength,b,f),b+=C.totalShapeLength):g=[[y,v]],l=g.length,o=0;o=1?m.push({s:C.totalShapeLength*(y-1),e:C.totalShapeLength*(v-1)}):(m.push({s:C.totalShapeLength*y,e:C.totalShapeLength}),m.push({s:0,e:C.totalShapeLength*(v-1)}));var x=this.addShapes(C,m[0]);if(m[0].s!==m[0].e){if(m.length>1)if(C.shape.paths.shapes[C.shape.paths._length-1].c){var M=x.pop();this.addPaths(x,u),x=this.addShapes(C,m[1],M)}else this.addPaths(x,u),x=this.addShapes(C,m[1]);this.addPaths(x,u)}}C.shape.paths=u}}},TrimModifier.prototype.addPaths=function(t,e){var r,i=t.length;for(r=0;re.e){r.c=!1;break}e.s<=C&&e.e>=C+s.addedLength?(this.addSegment(d[i].v[a-1],d[i].o[a-1],d[i].i[a],d[i].v[a],r,o,m),m=!1):(h=bez.getNewSegment(d[i].v[a-1],d[i].v[a],d[i].o[a-1],d[i].i[a],(e.s-C)/s.addedLength,(e.e-C)/s.addedLength,l[a-1]),this.addSegmentFromArray(h,r,o,m),m=!1,r.c=!1),C+=s.addedLength,o+=1}if(d[i].c&&l.length){if(s=l[a-1],C<=e.e){var g=l[a-1].addedLength;e.s<=C&&e.e>=C+g?(this.addSegment(d[i].v[a-1],d[i].o[a-1],d[i].i[0],d[i].v[0],r,o,m),m=!1):(h=bez.getNewSegment(d[i].v[a-1],d[i].v[0],d[i].o[a-1],d[i].i[0],(e.s-C)/g,(e.e-C)/g,l[a-1]),this.addSegmentFromArray(h,r,o,m),m=!1,r.c=!1)}else r.c=!1;C+=s.addedLength,o+=1}if(r._length&&(r.setXYAt(r.v[p][0],r.v[p][1],"i",p),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),C>e.e)break;i=this.p.keyframes[this.p.keyframes.length-1].t?(i=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/r,0),a=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/r,0)):(i=this.p.pv,a=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/r,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){i=[],a=[];var n=this.px,s=this.py;n._caching.lastFrame+n.offsetTime<=n.keyframes[0].t?(i[0]=n.getValueAtTime((n.keyframes[0].t+.01)/r,0),i[1]=s.getValueAtTime((s.keyframes[0].t+.01)/r,0),a[0]=n.getValueAtTime(n.keyframes[0].t/r,0),a[1]=s.getValueAtTime(s.keyframes[0].t/r,0)):n._caching.lastFrame+n.offsetTime>=n.keyframes[n.keyframes.length-1].t?(i[0]=n.getValueAtTime(n.keyframes[n.keyframes.length-1].t/r,0),i[1]=s.getValueAtTime(s.keyframes[s.keyframes.length-1].t/r,0),a[0]=n.getValueAtTime((n.keyframes[n.keyframes.length-1].t-.01)/r,0),a[1]=s.getValueAtTime((s.keyframes[s.keyframes.length-1].t-.01)/r,0)):(i=[n.pv,s.pv],a[0]=n.getValueAtTime((n._caching.lastFrame+n.offsetTime-.01)/r,n.offsetTime),a[1]=s.getValueAtTime((s._caching.lastFrame+s.offsetTime-.01)/r,s.offsetTime))}else i=a=t;this.v.rotate(-Math.atan2(i[1]-a[1],i[0]-a[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],e),e.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},e.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(t,r,i){return new e(t,r,i)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function floatEqual(t,e){return 1e5*Math.abs(t-e)<=Math.min(Math.abs(t),Math.abs(e))}function floatZero(t){return Math.abs(t)<=1e-5}function lerp(t,e,r){return t*(1-r)+e*r}function lerpPoint(t,e,r){return[lerp(t[0],e[0],r),lerp(t[1],e[1],r)]}function quadRoots(t,e,r){if(0===t)return[];var i=e*e-4*t*r;if(i<0)return[];var a=-e/(2*t);if(0===i)return[a];var n=Math.sqrt(i)/(2*t);return[a-n,a+n]}function polynomialCoefficients(t,e,r,i){return[3*e-t-3*r+i,3*t-6*e+3*r,-3*t+3*e,t]}function singlePoint(t){return new PolynomialBezier(t,t,t,t,!1)}function PolynomialBezier(t,e,r,i,a){a&&pointEqual(t,e)&&(e=lerpPoint(t,i,1/3)),a&&pointEqual(r,i)&&(r=lerpPoint(t,i,2/3));var n=polynomialCoefficients(t[0],e[0],r[0],i[0]),s=polynomialCoefficients(t[1],e[1],r[1],i[1]);this.a=[n[0],s[0]],this.b=[n[1],s[1]],this.c=[n[2],s[2]],this.d=[n[3],s[3]],this.points=[t,e,r,i]}function extrema(t,e){var r=t.points[0][e],i=t.points[t.points.length-1][e];if(r>i){var a=i;i=r,r=a}for(var n=quadRoots(3*t.a[e],2*t.b[e],t.c[e]),s=0;s0&&n[s]<1){var o=t.point(n[s])[e];oi&&(i=o)}return{min:r,max:i}}function intersectData(t,e,r){var i=t.boundingBox();return{cx:i.cx,cy:i.cy,width:i.width,height:i.height,bez:t,t:(e+r)/2,t1:e,t2:r}}function splitData(t){var e=t.bez.split(.5);return[intersectData(e[0],t.t1,t.t),intersectData(e[1],t.t,t.t2)]}function boxIntersect(t,e){return 2*Math.abs(t.cx-e.cx)=n||t.width<=i&&t.height<=i&&e.width<=i&&e.height<=i)a.push([t.t,e.t]);else{var s=splitData(t),o=splitData(e);intersectsImpl(s[0],o[0],r+1,i,a,n),intersectsImpl(s[0],o[1],r+1,i,a,n),intersectsImpl(s[1],o[0],r+1,i,a,n),intersectsImpl(s[1],o[1],r+1,i,a,n)}}function crossProduct(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function lineIntersection(t,e,r,i){var a=[t[0],t[1],1],n=[e[0],e[1],1],s=[r[0],r[1],1],o=[i[0],i[1],1],l=crossProduct(crossProduct(a,n),crossProduct(s,o));return floatZero(l[2])?null:[l[0]/l[2],l[1]/l[2]]}function polarOffset(t,e,r){return[t[0]+Math.cos(e)*r,t[1]-Math.sin(e)*r]}function pointDistance(t,e){return Math.hypot(t[0]-e[0],t[1]-e[1])}function pointEqual(t,e){return floatEqual(t[0],e[0])&&floatEqual(t[1],e[1])}function ZigZagModifier(){}function setPoint(t,e,r,i,a,n,s){var o=r-Math.PI/2,l=r+Math.PI/2,h=e[0]+Math.cos(r)*i*a,p=e[1]-Math.sin(r)*i*a;t.setTripleAt(h,p,h+Math.cos(o)*n,p-Math.sin(o)*n,h+Math.cos(l)*s,p-Math.sin(l)*s,t.length())}function getPerpendicularVector(t,e){var r=[e[0]-t[0],e[1]-t[1]],i=.5*-Math.PI;return[Math.cos(i)*r[0]-Math.sin(i)*r[1],Math.sin(i)*r[0]+Math.cos(i)*r[1]]}function getProjectingAngle(t,e){var r=0===e?t.length()-1:e-1,i=(e+1)%t.length(),a=getPerpendicularVector(t.v[r],t.v[i]);return Math.atan2(0,1)-Math.atan2(a[1],a[0])}function zigZagCorner(t,e,r,i,a,n,s){var o=getProjectingAngle(e,r),l=e.v[r%e._length],h=e.v[0===r?e._length-1:r-1],p=e.v[(r+1)%e._length],c=2===n?Math.sqrt(Math.pow(l[0]-h[0],2)+Math.pow(l[1]-h[1],2)):0,d=2===n?Math.sqrt(Math.pow(l[0]-p[0],2)+Math.pow(l[1]-p[1],2)):0;setPoint(t,e.v[r%e._length],o,s,i,d/(2*(a+1)),c/(2*(a+1)),n)}function zigZagSegment(t,e,r,i,a,n){for(var s=0;s1&&e.length>1&&(a=getIntersection(t[0],e[e.length-1]))?[[t[0].split(a[0])[0]],[e[e.length-1].split(a[1])[1]]]:[r,i]}function pruneIntersections(t){for(var e,r=1;r1&&(e=pruneSegmentIntersection(t[t.length-1],t[0]),t[t.length-1]=e[0],t[0]=e[1]),t}function offsetSegmentSplit(t,e){var r,i,a,n,s=t.inflectionPoints();if(0===s.length)return[offsetSegment(t,e)];if(1===s.length||floatEqual(s[1],1))return r=(a=t.split(s[0]))[0],i=a[1],[offsetSegment(r,e),offsetSegment(i,e)];r=(a=t.split(s[0]))[0];var o=(s[1]-s[0])/(1-s[0]);return n=(a=a[1].split(o))[0],i=a[1],[offsetSegment(r,e),offsetSegment(n,e),offsetSegment(i,e)]}function OffsetPathModifier(){}function getFontProperties(t){for(var e=t.fStyle?t.fStyle.split(" "):[],r="normal",i="normal",a=e.length,n=0;n0;)r-=1,this._elements.unshift(e[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,r=t.length;for(e=0;e0?Math.floor(d):Math.ceil(d),u=this.pMatrix.props,m=this.rMatrix.props,g=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var y,v,b=0;if(d>0){for(;bC;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),b-=1;f&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-f,!0),b-=f)}for(i=1===this.data.m?0:this._currentCopies-1,a=1===this.data.m?1:-1,n=this._currentCopies;n;){if(v=(r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==b){for((0!==i&&1===a||i!==this._currentCopies-1&&-1===a)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],m[11],m[12],m[13],m[14],m[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),y=0;y0&&i<1?[e]:[]:[e-i,e+i].filter((function(t){return t>0&&t<1}))},PolynomialBezier.prototype.split=function(t){if(t<=0)return[singlePoint(this.points[0]),this];if(t>=1)return[this,singlePoint(this.points[this.points.length-1])];var e=lerpPoint(this.points[0],this.points[1],t),r=lerpPoint(this.points[1],this.points[2],t),i=lerpPoint(this.points[2],this.points[3],t),a=lerpPoint(e,r,t),n=lerpPoint(r,i,t),s=lerpPoint(a,n,t);return[new PolynomialBezier(this.points[0],e,a,s,!0),new PolynomialBezier(s,n,i,this.points[3],!0)]},PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var t=this.bounds();return{left:t.x.min,right:t.x.max,top:t.y.min,bottom:t.y.max,width:t.x.max-t.x.min,height:t.y.max-t.y.min,cx:(t.x.max+t.x.min)/2,cy:(t.y.max+t.y.min)/2}},PolynomialBezier.prototype.intersections=function(t,e,r){void 0===e&&(e=2),void 0===r&&(r=7);var i=[];return intersectsImpl(intersectData(this,0,1),intersectData(t,0,1),0,e,i,r),i},PolynomialBezier.shapeSegment=function(t,e){var r=(e+1)%t.length();return new PolynomialBezier(t.v[e],t.o[e],t.i[r],t.v[r],!0)},PolynomialBezier.shapeSegmentInverted=function(t,e){var r=(e+1)%t.length();return new PolynomialBezier(t.v[r],t.i[r],t.o[e],t.v[e],!0)},extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(t,e.s,0,null,this),this.frequency=PropertyFactory.getProp(t,e.r,0,null,this),this.pointsType=PropertyFactory.getProp(t,e.pt,0,null,this),this._isAnimated=0!==this.amplitude.effectsSequence.length||0!==this.frequency.effectsSequence.length||0!==this.pointsType.effectsSequence.length},ZigZagModifier.prototype.processPath=function(t,e,r,i){var a=t._length,n=shapePool.newElement();if(n.c=t.c,t.c||(a-=1),0===a)return n;var s=-1,o=PolynomialBezier.shapeSegment(t,0);zigZagCorner(n,t,0,e,r,i,s);for(var l=0;l=0;n-=1)o=PolynomialBezier.shapeSegmentInverted(t,n),h.push(offsetSegmentSplit(o,e));h=pruneIntersections(h);var p=null,c=null;for(n=0;n=55296&&r<=56319){var i=t.charCodeAt(1);i>=56320&&i<=57343&&(e=1024*(r-55296)+i-56320+65536)}return e}function o(t){var e=s(t);return e>=127462&&e<=127487}var l=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};l.isModifier=function(t,e){var r=t.toString(16)+e.toString(16);return-1!==i.indexOf(r)},l.isZeroWidthJoiner=function(t){return 8205===t},l.isFlagEmoji=function(t){return o(t.substr(0,2))&&o(t.substr(2,2))},l.isRegionalCode=o,l.isCombinedCharacter=function(t){return-1!==e.indexOf(t)},l.isRegionalFlag=function(t,e){var i=s(t.substr(e,2));if(i!==r)return!1;var a=0;for(e+=2;a<5;){if((i=s(t.substr(e,2)))<917601||i>917626)return!1;a+=1,e+=2}return 917631===s(t.substr(e,2))},l.isVariationSelector=function(t){return 65039===t},l.BLACK_FLAG_CODE_POINT=r;var h={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var r,i,a=t.length,n=this.chars.length;for(e=0;e0&&(p=!1),p){var c=createTag("style");c.setAttribute("f-forigin",i[r].fOrigin),c.setAttribute("f-origin",i[r].origin),c.setAttribute("f-family",i[r].fFamily),c.type="text/css",c.innerText="@font-face {font-family: "+i[r].fFamily+"; font-style: normal; src: url('"+i[r].fPath+"');}",e.appendChild(c)}}else if("g"===i[r].fOrigin||1===i[r].origin){for(l=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),h=0;ht?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this._volumeMultiplier=t,this._previousVolume=t*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(t){var e,r,i=this.layers.length;for(this.completeLayers=!0,e=i-1;e>=0;e-=1)this.elements[e]||(r=this.layers[e]).ip-r.st<=t-this.layers[e].st&&r.op-r.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:default:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t0&&(this.maskElement.setAttribute("id",m),this.element.maskedElement.setAttribute(y,"url("+getLocationHref()+"#"+m+")"),n.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}TransformElement.prototype={initTransform:function(){var t=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:t,localMat:t,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,r=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;r1&&(n+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),r.lastPath!==n){var s="";r.elem&&(e.c&&(s=t.inv?this.solidPath+n:n),r.elem.setAttribute("d",s)),r.lastPath=n}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var t={createFilter:function(t,e){var r=createNS("filter");return r.setAttribute("id",t),!0!==e&&(r.setAttribute("filterUnits","objectBoundingBox"),r.setAttribute("x","0%"),r.setAttribute("y","0%"),r.setAttribute("width","100%"),r.setAttribute("height","100%")),r},createAlphaToLuminanceFilter:function(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),t}};return t}(),featureSupport=function(){var t={maskType:!0,svgLumaHidden:!0,offscreenCanvas:"undefined"!=typeof OffscreenCanvas};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.maskType=!1),/firefox/i.test(navigator.userAgent)&&(t.svgLumaHidden=!1),t}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(t){var e,r,i="SourceGraphic",a=t.data.ef?t.data.ef.length:0,n=createElementID(),s=filtersFactory.createFilter(n,!0),o=0;for(this.filters=[],e=0;e=0&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,r=0,i=e.length;r.01)return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t0;)l=i.transformers[C].mProps._mdf||l,f-=1,C-=1;if(l)for(f=m-i.styles[p].lvl,C=i.transformers.length-1;f>0;)d.multiply(i.transformers[C].mProps.v),f-=1,C-=1}else d=t;if(s=(c=i.sh.paths)._length,l){for(o="",n=0;n=1?y=.99:y<=-1&&(y=-.99);var v=o*y,b=Math.cos(g+e.a.v)*v+p[0],x=Math.sin(g+e.a.v)*v+p[1];l.setAttribute("fx",b),l.setAttribute("fy",x),h&&!e.g._collapsable&&(e.of.setAttribute("fx",b),e.of.setAttribute("fy",x))}}function l(t,e,r){var i=e.style,a=e.d;a&&(a._mdf||r)&&a.dashStr&&(i.pElem.setAttribute("stroke-dasharray",a.dashStr),i.pElem.setAttribute("stroke-dashoffset",a.dashoffset[0])),e.c&&(e.c._mdf||r)&&i.pElem.setAttribute("stroke","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r)&&i.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||r)&&(i.pElem.setAttribute("stroke-width",e.w.v),i.msElem&&i.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return n;case"gf":return o;case"gs":return s;case"st":return l;case"sh":case"el":case"rc":case"sr":return a;case"tr":return r;case"no":return i;default:return null}}}}();function SVGShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,r),this.prevViewData=[]}function LetterProps(t,e,r,i,a,n){this.o=t,this.sw=e,this.sc=r,this.fc=i,this.m=a,this.p=n,this._mdf={o:!0,sw:!!e,sc:!!r,fc:!!i,m:!0,p:!0}}function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,e.d&&e.d.sid&&(e.d=t.globalData.slotManager.getProp(e.d)),this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e,r,i,a=this.shapes.length,n=this.stylesList.length,s=[],o=!1;for(r=0;r1&&o&&this.setShapesAsAnimated(s)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,r=t.length;for(e=0;e=0;o-=1){if((d=this.searchProcessedElement(t[o]))?e[o]=r[d-1]:t[o]._render=s,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty||"no"===t[o].ty)d?e[o].style.closed=t[o].hd:e[o]=this.createStyleElement(t[o],a),t[o]._render&&e[o].style.pElem.parentNode!==i&&i.appendChild(e[o].style.pElem),u.push(e[o].style);else if("gr"===t[o].ty){if(d)for(h=e[o].it.length,l=0;l1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,r=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var a=this.effectsSequence.length,n=t||this.data.d.k[this.keysIndex].s;for(i=0;ie);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,r,i=[],a=0,n=t.length,s=!1,o=!1,l="";a=55296&&e<=56319?FontManager.isRegionalFlag(t,a)?l=t.substr(a,14):(r=t.charCodeAt(a+1))>=56320&&r<=57343&&(FontManager.isModifier(e,r)?(l=t.substr(a,2),s=!0):l=FontManager.isFlagEmoji(t.substr(a,4))?t.substr(a,4):t.substr(a,2)):e>56319?(r=t.charCodeAt(a+1),FontManager.isVariationSelector(e)&&(s=!0)):FontManager.isZeroWidthJoiner(e)&&(s=!0,o=!0),s?(i[i.length-1]+=l,s=!1):i.push(l),a+=l.length;return i},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,r,i,a,n,s,o,l=this.elem.globalData.fontManager,h=this.data,p=[],c=0,d=h.m.g,f=0,C=0,u=0,m=[],g=0,y=0,v=l.getFontByName(t.f),b=0,x=getFontProperties(v);t.fWeight=x.weight,t.fStyle=x.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),r=t.finalText.length,t.finalLineHeight=t.lh;var M,w=t.tr/1e3*t.finalSize;if(t.sz)for(var P,_,E=!0,S=t.sz[0],k=t.sz[1];E;){P=0,g=0,r=(_=this.buildFinalText(t.t)).length,w=t.tr/1e3*t.finalSize;var F=-1;for(e=0;eS&&" "!==_[e]?(-1===F?r+=1:e=F,P+=t.finalLineHeight||1.2*t.finalSize,_.splice(e,F===e?1:0,"\r"),F=-1,g=0):(g+=b,g+=w);P+=v.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&ky?g:y,g=-2*w,a="",i=!0,u+=1):a=A,l.chars?(o=l.getCharData(A,v.fStyle,l.getFontByName(t.f).fFamily),b=i?0:o.w*t.finalSize/100):b=l.measureText(a,t.f,t.finalSize)," "===A?L+=b+w:(g+=b+w+L,L=0),p.push({l:b,an:b,add:f,n:i,anIndexes:[],val:a,line:u,animatorJustifyOffset:0}),2==d){if(f+=b,""===a||" "===a||e===r-1){for(""!==a&&" "!==a||(f-=b);C<=e;)p[C].an=f,p[C].ind=c,p[C].extra=b,C+=1;c+=1,f=0}}else if(3==d){if(f+=b,""===a||e===r-1){for(""===a&&(f-=b);C<=e;)p[C].an=f,p[C].ind=c,p[C].extra=b,C+=1;f=0,c+=1}}else p[c].ind=c,p[c].extra=0,c+=1;if(t.l=p,y=g>y?g:y,m.push(g),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=y,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=m;var T,D,I,B,V=h.a;s=V.length;var Z=[];for(n=0;n0?a=this.ne.v/100:n=-this.ne.v/100,this.xe.v>0?s=1-this.xe.v/100:o=1+this.xe.v/100;var l=BezierFactory.getBezierEasing(a,n,s,o).get,h=0,p=this.finalS,c=this.finalE,d=this.data.sh;if(2===d)h=l(h=c===p?i>=c?1:0:t(0,e(.5/(c-p)+(i-p)/(c-p),1)));else if(3===d)h=l(h=c===p?i>=c?0:1:1-t(0,e(.5/(c-p)+(i-p)/(c-p),1)));else if(4===d)c===p?h=0:(h=t(0,e(.5/(c-p)+(i-p)/(c-p),1)))<.5?h*=2:h=1-2*(h-.5),h=l(h);else if(5===d){if(c===p)h=0;else{var f=c-p,C=-f/2+(i=e(t(0,i+.5-p),c-p)),u=f/2;h=Math.sqrt(1-C*C/(u*u))}h=l(h)}else 6===d?(c===p?h=0:(i=e(t(0,i+.5-p),c-p),h=(1+Math.cos(Math.PI+2*Math.PI*i/(c-p)))/2),h=l(h)):(i>=r(p)&&(h=t(0,e(i-p<0?e(c,1)-(p-i):c-i,1))),h=l(h));if(100!==this.sm.v){var m=.01*this.sm.v;0===m&&(m=1e-8);var g=.5-.5*m;h1&&(h=1)}return h*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,r=this.o.v/e,i=this.s.v/e+r,a=this.e.v/e+r;if(i>a){var n=i;i=a,a=n}this.finalS=i,this.finalE=a}},extendPrototype([DynamicPropertyContainer],i),{getTextSelectorProp:function(t,e,r){return new i(t,e,r)}}}();function TextAnimatorDataProperty(t,e,r){var i={propType:!1},a=PropertyFactory.getProp,n=e.a;this.a={r:n.r?a(t,n.r,0,degToRads,r):i,rx:n.rx?a(t,n.rx,0,degToRads,r):i,ry:n.ry?a(t,n.ry,0,degToRads,r):i,sk:n.sk?a(t,n.sk,0,degToRads,r):i,sa:n.sa?a(t,n.sa,0,degToRads,r):i,s:n.s?a(t,n.s,1,.01,r):i,a:n.a?a(t,n.a,1,0,r):i,o:n.o?a(t,n.o,0,.01,r):i,p:n.p?a(t,n.p,1,0,r):i,sw:n.sw?a(t,n.sw,0,0,r):i,sc:n.sc?a(t,n.sc,1,0,r):i,fc:n.fc?a(t,n.fc,1,0,r):i,fh:n.fh?a(t,n.fh,0,0,r):i,fs:n.fs?a(t,n.fs,0,.01,r):i,fb:n.fb?a(t,n.fb,0,.01,r):i,t:n.t?a(t,n.t,0,0,r):i},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,r),this.s.t=e.s.t}function TextAnimatorProperty(t,e,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var t,e,r=this._textData.a.length,i=PropertyFactory.getProp;for(t=0;t=o+ot||!C?(y=(o+ot-h)/l.partialLength,R=f.point[0]+(l.point[0]-f.point[0])*y,$=f.point[1]+(l.point[1]-f.point[1])*y,P.translate(-x[0]*S[a].an*.005,-x[1]*B*.01),p=!1):C&&(h+=l.partialLength,(c+=1)>=C.length&&(c=0,u[d+=1]?C=u[d].points:b.v.c?(c=0,C=u[d=0].points):(h-=l.partialLength,C=null)),C&&(f=l,m=(l=C[c]).partialLength));Z=S[a].an/2-S[a].add,P.translate(-Z,0,0)}else Z=S[a].an/2-S[a].add,P.translate(-Z,0,0),P.translate(-x[0]*S[a].an*.005,-x[1]*B*.01,0);for(L=0;Lt?this.textSpans[t].span:createNS(l?"g":"text"),m<=t){if(s.setAttribute("stroke-linecap","butt"),s.setAttribute("stroke-linejoin","round"),s.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=s,l){var g=createNS("g");s.appendChild(g),this.textSpans[t].childSpan=g}this.textSpans[t].span=s,this.layerElement.appendChild(s)}s.style.display="inherit"}if(h.reset(),p&&(o[t].n&&(c=-C,d+=r.yOffset,d+=f?1:0,f=!1),this.applyTextPropertiesToMatrix(r,h,o[t].line,c,d),c+=o[t].l||0,c+=C),l){var y;if(1===(u=this.globalData.fontManager.getCharData(r.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily)).t)y=new SVGCompElement(u.data,this.globalData,this);else{var v=emptyShapeData;u.data&&u.data.shapes&&(v=this.buildShapeData(u.data,r.finalSize)),y=new SVGShapeElement(v,this.globalData,this)}if(this.textSpans[t].glyph){var b=this.textSpans[t].glyph;this.textSpans[t].childSpan.removeChild(b.layerElement),b.destroy()}this.textSpans[t].glyph=y,y._debug=!0,y.prepareFrame(0),y.renderFrame(),this.textSpans[t].childSpan.appendChild(y.layerElement),1===u.t&&this.textSpans[t].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else p&&s.setAttribute("transform","translate("+h.props[12]+","+h.props[13]+")"),s.textContent=o[t].val,s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}p&&s&&s.setAttribute("d","")}else{var x=this.textContainer,M="start";switch(r.j){case 1:M="end";break;case 2:M="middle";break;default:M="start"}x.setAttribute("text-anchor",M),x.setAttribute("letter-spacing",C);var w=this.buildTextContents(r.finalText);for(e=w.length,d=r.ps?r.ps[1]+r.ascent:0,t=0;t=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e=0;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t=0;r-=1)t.finalTransform.multiply(t.transforms[r].transform.mProps.v);t._mdf=a},processSequences:function(t){var e,r=this.sequenceList.length;for(e=0;e=1){this.buffers=[];var t=this.globalData.canvasContext,e=assetLoader.createCanvas(t.canvas.width,t.canvas.height);this.buffers.push(e);var r=assetLoader.createCanvas(t.canvas.width,t.canvas.height);this.buffers.push(r),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=getBlendMode(this.data.bm);t.canvasContext.globalCompositeOperation=e}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(t){t.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var t=this.buffers[0].getContext("2d");this.clearCanvas(t),t.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var t=this.buffers[1],e=t.getContext("2d");if(this.clearCanvas(e),e.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform),this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1).renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var r=assetLoader.getLumaCanvas(this.canvasContext.canvas);r.getContext("2d").drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(r,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(t,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(t){if(!this.hidden&&!this.data.hd&&(1!==this.data.td||t)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var e=0===this.data.ty;this.prepareLayer(),this.globalData.renderer.save(e),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(e),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(t,e){var r={data:t,type:t.ty,preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],elements:[],closed:!0===t.hd},i={};if("fl"===t.ty||"st"===t.ty?(i.c=PropertyFactory.getProp(this,t.c,1,255,this),i.c.k||(r.co="rgb("+bmFloor(i.c.v[0])+","+bmFloor(i.c.v[1])+","+bmFloor(i.c.v[2])+")")):"gf"!==t.ty&&"gs"!==t.ty||(i.s=PropertyFactory.getProp(this,t.s,1,null,this),i.e=PropertyFactory.getProp(this,t.e,1,null,this),i.h=PropertyFactory.getProp(this,t.h||{k:0},0,.01,this),i.a=PropertyFactory.getProp(this,t.a||{k:0},0,degToRads,this),i.g=new GradientProperty(this,t.g,this)),i.o=PropertyFactory.getProp(this,t.o,0,.01,this),"st"===t.ty||"gs"===t.ty){if(r.lc=lineCapEnum[t.lc||2],r.lj=lineJoinEnum[t.lj||2],1==t.lj&&(r.ml=t.ml),i.w=PropertyFactory.getProp(this,t.w,0,null,this),i.w.k||(r.wi=i.w.v),t.d){var a=new DashProperty(this,t.d,"canvas",this);i.d=a,i.d.k||(r.da=i.d.dashArray,r.do=i.d.dashoffset[0])}}else r.r=2===t.r?"evenodd":"nonzero";return this.stylesList.push(r),i.style=r,i},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(t){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,t.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,t,this)}}},CVShapeElement.prototype.createShapeElement=function(t){var e=new CVShapeData(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e},CVShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t=0;n-=1){if((l=this.searchProcessedElement(t[n]))?e[n]=r[l-1]:t[n]._shouldRender=i,"fl"===t[n].ty||"st"===t[n].ty||"gf"===t[n].ty||"gs"===t[n].ty)l?e[n].style.closed=!1:e[n]=this.createStyleElement(t[n],C),d.push(e[n].style);else if("gr"===t[n].ty){if(l)for(o=e[n].it.length,s=0;s=0;a-=1)"tr"===e[a].ty?(n=r[a].transform,this.renderShapeTransform(t,n)):"sh"===e[a].ty||"el"===e[a].ty||"rc"===e[a].ty||"sr"===e[a].ty?this.renderPath(e[a],r[a]):"fl"===e[a].ty?this.renderFill(e[a],r[a],n):"st"===e[a].ty?this.renderStroke(e[a],r[a],n):"gf"===e[a].ty||"gs"===e[a].ty?this.renderGradientFill(e[a],r[a],n):"gr"===e[a].ty?this.renderShape(n,e[a].it,r[a].it):e[a].ty;i&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var r,i,a,n=t.trNodes,s=e.paths,o=s._length;n.length=0;var l=t.transforms.finalTransform;for(a=0;a=1?c=.99:c<=-1&&(c=-.99);var d=h*c,f=Math.cos(p+e.a.v)*d+o[0],C=Math.sin(p+e.a.v)*d+o[1];i=s.createRadialGradient(f,C,0,o[0],o[1],h)}var u=t.g.p,m=e.g.c,g=1;for(n=0;no&&"xMidYMid slice"===l||sa&&"meet"===o||na&&"slice"===o)?(r-this.transformCanvas.w*(i/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===h&&(na&&"slice"===o)?(r-this.transformCanvas.w*(i/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===p&&(n>a&&"meet"===o||na&&"meet"===o||n=0;t-=1)this.elements[t]&&this.elements[t].destroy&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||!0!==this.renderConfig.clearCanvas||e)&&!this.destroyed&&-1!==t){var r;this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var i=this.layers.length;for(this.completeLayers||this.checkLayers(t),r=i-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(t-this.layers[r].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),r=i-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){var r=this.createItem(this.layers[t],this,this.globalData);e[t]=r,r.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},CVContextData.prototype.duplicate=function(){var t=2*this._length,e=0;for(e=this._length;e=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){var t;for(t=this.layers.length-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var t=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var e=this.finalTransform.mat.toCSS();t.transform=e,t.webkitTransform=e}this.finalTransform._opMdf&&(t.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var t;this.data.hasMask?((t=createNS("rect")).setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((t=createTag("div")).style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var t;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=createNS("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=t},HShapeElement.prototype.getTransformedPoint=function(t,e){var r,i=t.length;for(r=0;r0&&o<1&&c[d].push(this.calculateF(o,t,e,r,i,d)):(l=n*n-4*s*a)>=0&&((h=(-n+bmSqrt(l))/(2*a))>0&&h<1&&c[d].push(this.calculateF(h,t,e,r,i,d)),(p=(-n-bmSqrt(l))/(2*a))>0&&p<1&&c[d].push(this.calculateF(p,t,e,r,i,d))));this.shapeBoundingBox.left=bmMin.apply(null,c[0]),this.shapeBoundingBox.top=bmMin.apply(null,c[1]),this.shapeBoundingBox.right=bmMax.apply(null,c[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,c[1])},HShapeElement.prototype.calculateF=function(t,e,r,i,a,n){return bmPow(1-t,3)*e[n]+3*bmPow(1-t,2)*t*r[n]+3*(1-t)*bmPow(t,2)*i[n]+bmPow(t,3)*a[n]},HShapeElement.prototype.calculateBoundingBox=function(t,e){var r,i=t.length;for(r=0;rr&&(r=a)}r*=t.mult}else r=t.v*t.mult;e.x-=r,e.xMax+=r,e.y-=r,e.yMax+=r},HShapeElement.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMax=0;t-=1){var i=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-i.p.v[0],-i.p.v[1],i.p.v[2]),this.mat.rotateX(-i.or.v[0]).rotateY(-i.or.v[1]).rotateZ(i.or.v[2]),this.mat.rotateX(-i.rx.v).rotateY(-i.ry.v).rotateZ(i.rz.v),this.mat.scale(1/i.s.v[0],1/i.s.v[1],1/i.s.v[2]),this.mat.translate(i.a.v[0],i.a.v[1],i.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var a;a=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var n=Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2)+Math.pow(a[2],2)),s=[a[0]/n,a[1]/n,a[2]/n],o=Math.sqrt(s[2]*s[2]+s[0]*s[0]),l=Math.atan2(s[1],o),h=Math.atan2(s[0],-s[2]);this.mat.rotateY(h).rotateX(-l)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var p=!this._prevMat.equals(this.mat);if((p||this.pe._mdf)&&this.comp.threeDElements){var c,d,f;for(e=this.comp.threeDElements.length,t=0;t=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(t,e){var r,i,a=createTag("div");styleDiv(a);var n=createTag("div");if(styleDiv(n),"3d"===e){(r=a.style).width=this.globalData.compSize.w+"px",r.height=this.globalData.compSize.h+"px";var s="50% 50%";r.webkitTransformOrigin=s,r.mozTransformOrigin=s,r.transformOrigin=s;var o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(i=n.style).transform=o,i.webkitTransform=o}a.appendChild(n);var l={container:n,perspectiveElem:a,startPos:t,endPos:t,type:e};return this.threeDElements.push(l),l},HybridRendererBase.prototype.build3dContainers=function(){var t,e,r=this.layers.length,i="";for(t=0;t=0;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(t,e){for(var r=0,i=this.threeDElements.length;rs?(t=a/this.globalData.compSize.w,e=a/this.globalData.compSize.w,r=0,i=(n-this.globalData.compSize.h*(a/this.globalData.compSize.w))/2):(t=n/this.globalData.compSize.h,e=n/this.globalData.compSize.h,r=(a-this.globalData.compSize.w*(n/this.globalData.compSize.h))/2,i=0);var o=this.resizerElem.style;o.webkitTransform="matrix3d("+t+",0,0,0,0,"+e+",0,0,0,0,1,0,"+r+","+i+",0,1)",o.transform=o.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t,e=this.globalData.compSize.w,r=this.globalData.compSize.h,i=this.threeDElements.length;for(t=0;t=o;)t/=2,e/=2,r>>>=1;return(t+r)/e};return v.int32=function(){return 0|y.g(4)},v.quick=function(){return y.g(4)/4294967296},v.double=v,d(f(y.S),t),(C.pass||u||function(t,r,i,n){return n&&(n.S&&p(n,y),t.state=function(){return p(y,{})}),i?(e[a]=t,r):t})(v,g,"global"in C?C.global:this==e,C.state)},d(e.random(),t)}function initialize$2(t){seedRandom([],t)}var propTypes={SHAPE:"shape"};function _typeof$1(t){return _typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$1(t)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return"number"===t||e instanceof Number||"boolean"===t||"string"===t}function $bm_neg(t){var e=_typeof$1(t);if("number"===e||t instanceof Number||"boolean"===e)return-t;if($bm_isInstanceOfArray(t)){var r,i=t.length,a=[];for(r=0;rr){var i=r;r=e,e=i}return Math.min(Math.max(t,e),r)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);var r;e||(e=helperLengthArray);var i=Math.min(t.length,e.length),a=0;for(r=0;r.5?h/(2-s-o):h/(s+o),s){case i:e=(a-n)/h+(a1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function hslToRgb(t){var e,r,i,a=t[0],n=t[1],s=t[2];if(0===n)e=s,i=s,r=s;else{var o=s<.5?s*(1+n):s+n-s*n,l=2*s-o;e=hue2rgb(l,o,a+1/3),r=hue2rgb(l,o,a),i=hue2rgb(l,o,a-1/3)}return[e,r,i,t[3]]}function linear(t,e,r,i,a){if(void 0!==i&&void 0!==a||(i=e,a=r,e=0,r=1),r=r)return a;var s,o=r===e?0:(t-e)/(r-e);if(!i.length)return i+(a-i)*o;var l=i.length,h=createTypedArray("float32",l);for(s=0;s1){for(i=0;i1?e=1:e<0&&(e=0);var s=t(e);if($bm_isInstanceOfArray(a)){var o,l=a.length,h=createTypedArray("float32",l);for(o=0;odata.k[e].t&&tdata.k[e+1].t-t?(r=e+2,i=data.k[e+1].t):(r=e+1,i=data.k[e].t);break}}-1===r&&(r=e+1,i=data.k[e].t)}else r=0,i=0;var n={};return n.index=r,n.time=i/elem.comp.globalData.frameRate,n}function key(t){var e,r,i;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var a=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(i=a.length,r=0;rh.length-1)&&(e=h.length-1),i=p-(a=h[h.length-1-e].t)),"pingpong"===t){if(Math.floor((l-a)/i)%2!=0)return this.getValueAtTime((i-(l-a)%i+a)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var c=this.getValueAtTime(a/this.comp.globalData.frameRate,0),d=this.getValueAtTime(p/this.comp.globalData.frameRate,0),f=this.getValueAtTime(((l-a)%i+a)/this.comp.globalData.frameRate,0),C=Math.floor((l-a)/i);if(this.pv.length){for(s=(o=new Array(c.length)).length,n=0;n=p)return this.pv;if(r?a=p+(i=e?Math.abs(this.elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-p)):((!e||e>h.length-1)&&(e=h.length-1),i=(a=h[e].t)-p),"pingpong"===t){if(Math.floor((p-l)/i)%2==0)return this.getValueAtTime(((p-l)%i+p)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var c=this.getValueAtTime(p/this.comp.globalData.frameRate,0),d=this.getValueAtTime(a/this.comp.globalData.frameRate,0),f=this.getValueAtTime((i-(p-l)%i+p)/this.comp.globalData.frameRate,0),C=Math.floor((p-l)/i)+1;if(this.pv.length){for(s=(o=new Array(c.length)).length,n=0;n1?(a+t-n)/(e-1):1,o=0,l=0;for(r=this.pv.length?createTypedArray("float32",this.pv.length):0;os){var p=o,c=r.c&&o===l-1?0:o+1,d=(s-h)/n[o].addedLength;i=bez.getPointInSegment(r.v[p],r.v[c],r.o[p],r.i[c],d,n[o]);break}h+=n[o].addedLength,o+=1}return i||(i=r.c?[r.v[0][0],r.v[0][1]]:[r.v[r._length-1][0],r.v[r._length-1][1]]),i},vectorOnPath:function(t,e,r){1==t?t=this.v.c:0==t&&(t=.999);var i=this.pointOnPath(t,e),a=this.pointOnPath(t+.001,e),n=a[0]-i[0],s=a[1]-i[1],o=Math.sqrt(Math.pow(n,2)+Math.pow(s,2));return 0===o?[0,0]:"tangent"===r?[n/o,s/o]:[-s/o,n/o]},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([h],o),extendPrototype([h],l),l.prototype.getValueAtTime=function(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime=h?f<0?i:a:i+d*Math.pow((n-t)/f,1/r),p[c]=s,c+=1,o+=256/255;return p.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,r=this.filterManager.effectElements;this.feFuncRComposed&&(t||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(e=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(e=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(e=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(e=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(e=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*degToRads,a=r*Math.cos(i),n=r*Math.sin(i);this.feOffset.setAttribute("dx",a),this.feOffset.setAttribute("dy",n)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,r){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=r,r.matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}function SVGGaussianBlurEffect(t,e,r,i){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var a=createNS("feGaussianBlur");a.setAttribute("result",i),t.appendChild(a),this.feGaussianBlur=a}function TransformEffect(){}function SVGTransformEffect(t,e){this.init(e)}function CVTransformEffect(t){this.init(t)}return SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,r=_svgMatteSymbols.length;e{var i={"./1/max.json":[175,175],"./1/telegram.json":[528,528],"./1/viber.json":[571,571],"./1/whatsapp.json":[925,306],"./2/max-phone.json":[803,803],"./2/telegram-max.json":[716,716],"./2/telegram-phone.json":[838,838],"./2/telegram-viber.json":[436,436],"./2/viber-max.json":[453,453],"./2/viber-phone.json":[759,759],"./2/whatsapp-max.json":[881,881],"./2/whatsapp-phone.json":[275,275],"./2/whatsapp-telegram.json":[294,294],"./2/whatsapp-viber.json":[121,121],"./3/telegram-max-phone.json":[272,272],"./3/telegram-viber-max.json":[654,654],"./3/telegram-viber-phone.json":[216,216],"./3/viber-max-phone.json":[795,795],"./3/whatsapp-max-phone.json":[813,813],"./3/whatsapp-telegram-max.json":[34,34],"./3/whatsapp-telegram-phone.json":[844,844],"./3/whatsapp-telegram-viber.json":[998,998],"./3/whatsapp-viber-max.json":[819,819],"./3/whatsapp-viber-phone.json":[306,925],"./4/telegram-viber-max-phone.json":[688,688],"./4/whatsapp-telegram-max-phone.json":[450,450],"./4/whatsapp-telegram-viber-max.json":[804,804],"./4/whatsapp-telegram-viber-phone.json":[598,598],"./4/whatsapp-viber-max-phone.json":[445,445],"./5/whatsapp-telegram-viber-max-phone.json":[78,78]};function a(t){if(!r.o(i,t))return Promise.resolve().then((()=>{var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}));var e=i[t],a=e[0];return r.e(e[1]).then((()=>r.t(a,19)))}a.keys=()=>Object.keys(i),a.id=90,t.exports=a}},__webpack_module_cache__={},leafPrototypes,getProto,inProgress,dataWebpackPrefix;function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var r=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdO={},__webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},getProto=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,__webpack_require__.t=function(t,e){if(1&e&&(t=this(t)),8&e)return t;if("object"==typeof t&&t){if(4&e&&t.__esModule)return t;if(16&e&&"function"==typeof t.then)return t}var r=Object.create(null);__webpack_require__.r(r);var i={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var a=2&e&&t;"object"==typeof a&&!~leafPrototypes.indexOf(a);a=getProto(a))Object.getOwnPropertyNames(a).forEach((e=>i[e]=()=>t[e]));return i.default=()=>t,__webpack_require__.d(r,i),r},__webpack_require__.d=(t,e)=>{for(var r in e)__webpack_require__.o(e,r)&&!__webpack_require__.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},__webpack_require__.f={},__webpack_require__.e=t=>Promise.all(Object.keys(__webpack_require__.f).reduce(((e,r)=>(__webpack_require__.f[r](t,e),e)),[])),__webpack_require__.u=t=>t+".widget.js",__webpack_require__.miniCssF=t=>{},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),inProgress={},dataWebpackPrefix="external-script:",__webpack_require__.l=(t,e,r,i)=>{if(inProgress[t])inProgress[t].push(e);else{var a,n;if(void 0!==r)for(var s=document.getElementsByTagName("script"),o=0;o{a.onerror=a.onload=null,clearTimeout(p);var i=inProgress[t];if(delete inProgress[t],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((t=>t(r))),e)return e(r)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=h.bind(null,a.onerror),a.onload=h.bind(null,a.onload),n&&document.head.appendChild(a)}},__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;__webpack_require__.g.importScripts&&(t=__webpack_require__.g.location+"");var e=__webpack_require__.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var i=r.length-1;i>-1&&(!t||!/^http(s?):/.test(t));)t=r[i--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=t})(),(()=>{var t={792:0};__webpack_require__.f.j=(e,r)=>{var i=__webpack_require__.o(t,e)?t[e]:void 0;if(0!==i)if(i)r.push(i[2]);else{var a=new Promise(((r,a)=>i=t[e]=[r,a]));r.push(i[2]=a);var n=__webpack_require__.p+__webpack_require__.u(e),s=new Error;__webpack_require__.l(n,(r=>{if(__webpack_require__.o(t,e)&&(0!==(i=t[e])&&(t[e]=void 0),i)){var a=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;s.message="Loading chunk "+e+" failed.\n("+a+": "+n+")",s.name="ChunkLoadError",s.type=a,s.request=n,i[1](s)}}),"chunk-"+e,e)}};var e=(e,r)=>{var i,a,n=r[0],s=r[1],o=r[2],l=0;if(n.some((e=>0!==t[e]))){for(i in s)__webpack_require__.o(s,i)&&(__webpack_require__.m[i]=s[i]);if(o)o(__webpack_require__)}for(e&&e(r);l{"use strict";const t="https://widget.yourgood.app/",e="https://widget.profeat.team/",r="Free",i=["#open","#whatsapp","#telegram","#viber","#max"],a=["whatsapp","telegram","viber","max"],n="whatsapp",s="telegram",o="viber",l="max",h="phone";!function(t){const e=[],r=1<= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=Math.floor;String.fromCharCode;function S(t){throw new RangeError(_[t])}function k(t,e){const r=t.split("@");let i="";r.length>1&&(i=r[0]+"@",t=r[1]);const a=function(t,e){const r=[];let i=t.length;for(;i--;)r[i]=e(t[i]);return r}((t=t.replace(P,".")).split("."),e).join(".");return i+a}const F=function(t,e,r){let i=0;for(t=r?E(t/700):t>>1,t+=E(t/e);t>455;i+=M)t=E(t/35);return E(i+36*t/(t+38))},A=function(t){const e=[],r=t.length;let i=0,a=128,n=72,s=t.lastIndexOf("-");s<0&&(s=0);for(let r=0;r=128&&S("not-basic"),e.push(t.charCodeAt(r));for(let l=s>0?s+1:0;l=r&&S("invalid-input");const s=(o=t.charCodeAt(l++))>=48&&o<58?o-48+26:o>=65&&o<91?o-65:o>=97&&o<123?o-97:M;s>=M&&S("invalid-input"),s>E((x-i)/e)&&S("overflow"),i+=s*e;const h=a<=n?1:a>=n+26?26:a-n;if(sE(x/p)&&S("overflow"),e*=p}const h=e.length+1;n=F(i-s,h,0==s),E(i/h)>x-a&&S("overflow"),a+=E(i/h),i%=h,e.splice(i++,0,a)}var o;return String.fromCodePoint(...e)},L=function(t){return k(t,(function(t){return w.test(t)?A(t.slice(4).toLowerCase()):t}))};function T(t){return t.background.theme.color}function D(t){return t.background.theme.layoutColor}function I(t){return B(t.whatsappEnabled,t.telegramEnabled,t.viberEnabled,t.maxEnabled,t.phoneCallNumber)}const B=(t,e,r,i,a)=>{const p={whatsapp:t,telegram:e,viber:r,max:i,phone:a};return[n,s,o,l,h].filter((t=>p[t])).join("-and-")||""};function V(t,e){return a.includes(t)&&!e?t:void 0}const Z=window,R=Z.ShadowRoot&&(void 0===Z.ShadyCSS||Z.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$=Symbol(),z=new WeakMap;class O{constructor(t,e,r){if(this._$cssResult$=!0,r!==$)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(R&&void 0===t){const r=void 0!==e&&1===e.length;r&&(t=z.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&z.set(e,t))}return t}toString(){return this.cssText}}const H=(t,...e)=>{const r=1===t.length?t[0]:e.reduce(((e,r,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[i+1]),t[0]);return new O(r,t,$)},N=R?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const r of t.cssRules)e+=r.cssText;return(t=>new O("string"==typeof t?t:t+"",void 0,$))(e)})(t):t;var G;const j=window,W=j.trustedTypes,q=W?W.emptyScript:"",U=j.reactiveElementPolyfillSupport,Y={toAttribute(t,e){switch(e){case Boolean:t=t?q:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=null!==t;break;case Number:r=null===t?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch(t){r=null}}return r}},Q=(t,e)=>e!==t&&(e==e||t==t),J={attribute:!0,type:String,converter:Y,reflect:!1,hasChanged:Q},X="finalized";class K extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,r)=>{const i=this._$Ep(r,e);void 0!==i&&(this._$Ev.set(i,r),t.push(i))})),t}static createProperty(t,e=J){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const r="symbol"==typeof t?Symbol():"__"+t,i=this.getPropertyDescriptor(t,r,e);void 0!==i&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,r){return{get(){return this[e]},set(i){const a=this[t];this[e]=i,this.requestUpdate(t,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||J}static finalize(){if(this.hasOwnProperty(X))return!1;this[X]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const r of e)this.createProperty(r,t[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const t of r)e.unshift(N(t))}else void 0!==t&&e.push(N(t));return e}static _$Ep(t,e){const r=e.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,r;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(r=t.hostConnected)||void 0===r||r.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{R?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const r=document.createElement("style"),i=Z.litNonce;void 0!==i&&r.setAttribute("nonce",i),r.textContent=e.cssText,t.appendChild(r)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$EO(t,e,r=J){var i;const a=this.constructor._$Ep(t,r);if(void 0!==a&&!0===r.reflect){const n=(void 0!==(null===(i=r.converter)||void 0===i?void 0:i.toAttribute)?r.converter:Y).toAttribute(e,r.type);this._$El=t,null==n?this.removeAttribute(a):this.setAttribute(a,n),this._$El=null}}_$AK(t,e){var r;const i=this.constructor,a=i._$Ev.get(t);if(void 0!==a&&this._$El!==a){const t=i.getPropertyOptions(a),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(r=t.converter)||void 0===r?void 0:r.fromAttribute)?t.converter:Y;this._$El=a,this[a]=n.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,r){let i=!0;void 0!==t&&(((r=r||this.constructor.getPropertyOptions(t)).hasChanged||Q)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===r.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,r))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(r)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(r)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}var tt;K[X]=!0,K.elementProperties=new Map,K.elementStyles=[],K.shadowRootOptions={mode:"open"},null==U||U({ReactiveElement:K}),(null!==(G=j.reactiveElementVersions)&&void 0!==G?G:j.reactiveElementVersions=[]).push("1.6.3");const et=window,rt=et.trustedTypes,it=rt?rt.createPolicy("lit-html",{createHTML:t=>t}):void 0,at="$lit$",nt=`lit$${(Math.random()+"").slice(9)}$`,st="?"+nt,ot=`<${st}>`,lt=document,ht=()=>lt.createComment(""),pt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,ct=Array.isArray,dt=t=>ct(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),ft="[ \t\n\f\r]",Ct=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ut=/-->/g,mt=/>/g,gt=RegExp(`>|${ft}(?:([^\\s"'>=/]+)(${ft}*=${ft}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),yt=/'/g,vt=/"/g,bt=/^(?:script|style|textarea|title)$/i,xt=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),Mt=xt(1),wt=(xt(2),Symbol.for("lit-noChange")),Pt=Symbol.for("lit-nothing"),_t=new WeakMap,Et=lt.createTreeWalker(lt,129,null,!1);function St(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==it?it.createHTML(e):e}const kt=(t,e)=>{const r=t.length-1,i=[];let a,n=2===e?"":"",s=Ct;for(let e=0;e"===l[0]?(s=null!=a?a:Ct,h=-1):void 0===l[1]?h=-2:(h=s.lastIndex-l[2].length,o=l[1],s=void 0===l[3]?gt:'"'===l[3]?vt:yt):s===vt||s===yt?s=gt:s===ut||s===mt?s=Ct:(s=gt,a=void 0);const c=s===gt&&t[e+1].startsWith("/>")?" ":"";n+=s===Ct?r+ot:h>=0?(i.push(o),r.slice(0,h)+at+r.slice(h)+nt+c):r+nt+(-2===h?(i.push(void 0),e):c)}return[St(t,n+(t[r]||"")+(2===e?"":"")),i]};class Ft{constructor({strings:t,_$litType$:e},r){let i;this.parts=[];let a=0,n=0;const s=t.length-1,o=this.parts,[l,h]=kt(t,e);if(this.el=Ft.createElement(l,r),Et.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(i=Et.nextNode())&&o.length0){i.textContent=rt?rt.emptyScript:"";for(let r=0;r2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=Pt}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,r,i){const a=this.strings;let n=!1;if(void 0===a)t=At(this,t,e,0),n=!pt(t)||t!==this._$AH&&t!==wt,n&&(this._$AH=t);else{const i=t;let s,o;for(t=a[0],s=0;s{var i,a;const n=null!==(i=null==r?void 0:r.renderBefore)&&void 0!==i?i:e;let s=n._$litPart$;if(void 0===s){const t=null!==(a=null==r?void 0:r.renderBefore)&&void 0!==a?a:null;n._$litPart$=s=new Tt(e.insertBefore(ht(),t),t,void 0,null!=r?r:{})}return s._$AI(t),s};var Ht,Nt;class Gt extends K{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const r=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=r.firstChild),r}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ot(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return wt}}Gt.finalized=!0,Gt._$litElement$=!0,null===(Ht=globalThis.litElementHydrateSupport)||void 0===Ht||Ht.call(globalThis,{LitElement:Gt});const jt=globalThis.litElementPolyfillSupport;null==jt||jt({LitElement:Gt});function Wt(t,e,r){return t?e():null==r?void 0:r()}function qt(){try{if(window.ym){const t=document.cookie.match("(?:^|;)\\s*_ym_uid=([^;]*)");return t?decodeURIComponent(t[1]):void 0}}catch(t){return}}function Ut(){try{if(window.ga){return window.ga.getAll()[0].get("clientId")}}catch(t){return}}function Yt(){let t=!1;return function(e){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0)}(navigator.userAgent||navigator.vendor||window.opera),t}(null!==(Nt=globalThis.litElementVersions)&&void 0!==Nt?Nt:globalThis.litElementVersions=[]).push("3.3.3");const Qt=Symbol("isLocationPatched");function Jt(){return Yt()?"mobile":"desktop"}const Xt=t=>t&&t[0].toUpperCase()+t.slice(1)||"",Kt=t=>t.replaceAll("\ufeff","").replaceAll("","");function te(t){const e=function(t){const e=JSON.stringify(Object.entries(t).sort())===JSON.stringify(Object.entries(y).sort()),r=JSON.stringify(Object.entries(t).sort())===JSON.stringify(Object.entries(f).sort());return e?"ru":!!r&&"en"}(t);let r=(navigator.language||navigator.userLanguage).slice(0,2);return r=r.includes("ru")?"ru":"en",e?"ru"===e?r!==e?f:t:"en"===e?r!==e?y:t:void 0:t}const ee=t=>{const e=t.language||t.userLanguage;return/ru/i.test(e)?"сделано в ":"made in"};const re=(t,e,r,i,a,n)=>{const s=(o=n)?o.toLowerCase().split(/-and-|\s+|-/).filter(Boolean):[];var o;const h=((t,e,r,i)=>({max:i,whatsapp:t,telegram:e,viber:r}))(t,e,r,i),p=s.includes(l),c=s.filter((t=>t!==l)).map((t=>h[t])).filter(Boolean);return p?[h[l],...c]:c},ie=(t,e,r,i,a)=>Mt` `,ae=t=>{if(!t)return!0;if(t.name===r)return!0;return new Date(t.dueDate).getTime()t.json())).then((t=>{let{data:e}=t;return e}))}function se(t,e){let{name:r,wazzupId:i,hid:a,integrations:n}=e;const s=Jt();/^\d{8}$/.test(i)&&(i="mobile"===s?"WM"+i:"WW"+i);const o={settingsId:t,wazzupId:i,hid:a,name:r,cookies:document.cookie,referrer:document.referrer,url:window.location.toString(),ymId:qt(),gaId:Ut(),deviceType:s,coMagicId:window?.Comagic?.getSessionId(),callTouchId:window.call_value||null,isAdblockDetected:Boolean(localStorage.getItem("hasAdblock"))};return fetch("https://widget.yourgood.app/api/statistics",{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"},body:JSON.stringify(o)}).then((t=>t.json())).then((t=>{let{data:e}=t;return e}))}function oe(t){return fetch(`https://widget.yourgood.app/api/integrations/by-settings?id=${t}`).then((t=>(t.ok||console.warn("Can not get integrations. Http",t.status),t.json()))).then((t=>{let{data:e}=t;return e??[]})).catch((()=>[]))}function le(t){return fetch(`https://widget.yourgood.app/api/statistics/dialog-events?settingsId=${t}`).then((t=>t.json())).then((t=>{let{data:e}=t;return e??[]})).catch((()=>[]))}function he(t){return fetch(`https://widget.yourgood.app/api/tariff/external?widgetId=${t}`).then((t=>t.json())).then((t=>{let{data:e}=t;return e})).catch((()=>null))}function pe(t){const e={settingsId:t.settingsId,wazzupId:t.wazzupId,error:t.error,metric:t.metric,type:t.type};return fetch("https://widget.yourgood.app/api/statistics/send-dialog-event-info",{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"},body:JSON.stringify(e)}).then((t=>t.json())).then((t=>{let{data:e}=t;return e}))}let ce=t=>crypto.getRandomValues(new Uint8Array(t)),de=(t,e=21)=>((t,e,r)=>{let i=(2<{let s="";for(;;){let e=r(a),o=a;for(;o--;)if(s+=t[e[o]&i]||"",s.length===n)return s}}})(t,e,ce);function fe(t){for(var e=1;e(...e)=>({_$litDirective$:t,values:e});class ve{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this._$Ct=t,this._$AM=e,this._$Ci=r}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const be=(t,e)=>{var r,i;const a=t._$AN;if(void 0===a)return!1;for(const t of a)null===(i=(r=t)._$AO)||void 0===i||i.call(r,e,!1),be(t,e);return!0},xe=t=>{let e,r;do{if(void 0===(e=t._$AM))break;r=e._$AN,r.delete(t),t=e}while(0===(null==r?void 0:r.size))},Me=t=>{for(let e;e=t._$AM;t=e){let r=e._$AN;if(void 0===r)e._$AN=r=new Set;else if(r.has(t))break;r.add(t),_e(e)}};function we(t){void 0!==this._$AN?(xe(this),this._$AM=t,Me(this)):this._$AM=t}function Pe(t,e=!1,r=0){const i=this._$AH,a=this._$AN;if(void 0!==a&&0!==a.size)if(e)if(Array.isArray(i))for(let t=r;t{var e,r,i,a;t.type==ge&&(null!==(e=(i=t)._$AP)&&void 0!==e||(i._$AP=Pe),null!==(r=(a=t)._$AQ)&&void 0!==r||(a._$AQ=we))};class Ee extends ve{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,r){super._$AT(t,e,r),Me(this),this.isConnected=t._$AU}_$AO(t,e=!0){var r,i;t!==this.isConnected&&(this.isConnected=t,t?null===(r=this.reconnected)||void 0===r||r.call(this):null===(i=this.disconnected)||void 0===i||i.call(this)),e&&(be(this,t),xe(this))}setValue(t){if((t=>void 0===t.strings)(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class Se{constructor(t){this.G=t}disconnect(){this.G=void 0}reconnect(t){this.G=t}deref(){return this.G}}class ke{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){var t;null!==(t=this.Y)&&void 0!==t||(this.Y=new Promise((t=>this.Z=t)))}resume(){var t;null===(t=this.Z)||void 0===t||t.call(this),this.Y=this.Z=void 0}}const Fe=t=>!(t=>null===t||"object"!=typeof t&&"function"!=typeof t)(t)&&"function"==typeof t.then,Ae=1073741823;const Le=ye(class extends Ee{constructor(){super(...arguments),this._$C_t=Ae,this._$Cwt=[],this._$Cq=new Se(this),this._$CK=new ke}render(...t){var e;return null!==(e=t.find((t=>!Fe(t))))&&void 0!==e?e:wt}update(t,e){const r=this._$Cwt;let i=r.length;this._$Cwt=e;const a=this._$Cq,n=this._$CK;this.isConnected||this.disconnected();for(let t=0;tthis._$C_t);t++){const s=e[t];if(!Fe(s))return this._$C_t=t,s;t{for(;n.get();)await n.get();const e=a.deref();if(void 0!==e){const r=e._$Cwt.indexOf(s);r>-1&&r2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,r)=>{const i=t[r];return null==i?e:e+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:r}=t.element;if(void 0===this.ht){this.ht=new Set;for(const t in e)this.ht.add(t);return this.render(e)}this.ht.forEach((t=>{null==e[t]&&(this.ht.delete(t),t.includes("-")?r.removeProperty(t):r[t]="")}));for(const t in e){const i=e[t];if(null!=i){this.ht.add(t);const e="string"==typeof i&&i.endsWith(De);t.includes("-")||e?r.setProperty(t,e?i.slice(0,-11):i,e?Te:""):r[t]=i}}return wt}}),Be=ye(class extends ve{constructor(t){var e;if(super(t),t.type!==me||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var r,i;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(r=this.nt)||void 0===r?void 0:r.has(t))&&this.it.add(t);return this.render(e)}const a=t.element.classList;this.it.forEach((t=>{t in e||(a.remove(t),this.it.delete(t))}));for(const t in e){const r=!!e[t];r===this.it.has(t)||(null===(i=this.nt)||void 0===i?void 0:i.has(t))||(r?(a.add(t),this.it.add(t)):(a.remove(t),this.it.delete(t)))}return wt}}),Ve=()=>`https://widget.yourgood.ru/?utm_source=${encodeURIComponent(window.location.host)}&utm_medium=cta_modal&utm_content=viral`,Ze=H` .PFMessage, .PFChat, .PFModal { --pf-primary: #212121; --pf-secondary: #757575; --pf-disabled: #9e9e9e; --pf-main-blue: #2962ff; --pf-main-blue-dark: #1d4ed6; --pf-main-blue-light: #5481ff; --pf-blue-shade-50: #94b0ff; --pf-blue-shade-8: #eef3ff; --pf-blue-shade-4: #f7f9ff; --pf-background: #f8f9fb; --pf-main-yellow: #ffa726; --pf-yellow-shade-12: #fff4e5; --pf-main-green: #4caf50; --pf-green-shade-8: #f3faf3; --pf-main-red: #d32f2f; --pf-red-shade-50: #e99797; --pf-red-shade-8: #fbeeee; --pf-red-shade-4: #fdf7f7; --pf-grey-900: #212121; --pf-grey-800: #424242; --pf-grey-700: #616161; --pf-grey-600: #757575; --pf-grey-500: #9e9e9e; --pf-grey-400: #bdbdbd; --pf-grey-300: #e0e0e0; --pf-grey-200: #eee; --pf-grey-100: #f5f5f5; --pf-white: #fff; --pf-modal-telegram-color: #2aabee; --pf-modal-whatsapp-color: #5ed169; --pf-modal-viber-color: #655cac; --pf-modal-max-color: linear-gradient(92.92deg, #19D1F5 18%, #5F3AEF 82%); --pf-modal-telegram-color-icon: #1A9ADA; --pf-modal-whatsapp-color-icon: #37BE4F; --pf-modal-viber-color-icon: #59509B; --pf-modal-max-color-icon: #1DB7F3; --common-asphalt: #91A0AE; --common-smog: #E5EBF0; --common-darkWater: #5D7285; --main-blue: #1C7EF1; } `,Re=H` .PFModalButtonWhatsapp .PFModalButtonIcon { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M4 20L5.27221 15.3802C4.48567 14.0242 4.07307 12.4886 4.07736 10.9187C4.07736 5.99952 8.10028 2 13.0387 2C15.437 2 17.6891 2.92823 19.3782 4.61359C21.0716 6.29895 22.0043 8.5404 22 10.923C22 15.8422 17.9771 19.8417 13.0344 19.8417H13.0301C11.5301 19.8417 10.0559 19.4653 8.74498 18.7552L4 20ZM8.97278 17.1426L9.24355 17.3051C10.3868 17.981 11.6977 18.336 13.0344 18.3403H13.0387C17.1433 18.3403 20.4871 15.0166 20.4871 10.9273C20.4871 8.94677 19.7135 7.08603 18.308 5.68298C16.9026 4.27994 15.0286 3.50998 13.0387 3.50998C8.93409 3.5057 5.59026 6.82937 5.59026 10.9187C5.59026 12.3175 5.98137 13.682 6.72922 14.8626L6.90544 15.145L6.15329 17.8783L8.97278 17.1426Z' fill='url(%23paint0_linear_1767_5881)'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M10.7994 7.18869C10.6317 6.81654 10.4555 6.80799 10.2965 6.80371C10.1676 6.79943 10.0171 6.79943 9.86669 6.79943C9.71626 6.79943 9.47557 6.85504 9.26927 7.07747C9.06297 7.29991 8.48704 7.83888 8.48704 8.93821C8.48704 10.0333 9.29076 11.0941 9.40251 11.2438C9.51426 11.3935 10.9541 13.7163 13.2277 14.6103C15.1188 15.3546 15.5057 15.2048 15.914 15.1664C16.3223 15.1279 17.2377 14.6274 17.4269 14.1055C17.6117 13.5837 17.6117 13.1388 17.5558 13.0447C17.4999 12.9506 17.3495 12.895 17.126 12.7837C16.9025 12.6725 15.8022 12.1336 15.5959 12.0566C15.3896 11.9838 15.2392 11.9453 15.093 12.1678C14.9426 12.3902 14.5128 12.8907 14.3839 13.0404C14.2549 13.1901 14.1217 13.2072 13.8982 13.096C13.6747 12.9848 12.9526 12.7495 12.0973 11.9881C11.4312 11.3978 10.9799 10.6664 10.8509 10.4439C10.722 10.2215 10.838 10.1017 10.9498 9.9905C11.0486 9.89211 11.1733 9.72956 11.285 9.60124C11.3968 9.47291 11.4355 9.3788 11.5085 9.22909C11.5816 9.07937 11.5472 8.95105 11.4913 8.83983C11.4355 8.73289 10.9971 7.62928 10.7994 7.18869Z' fill='white'/%3E%3Cdefs%3E%3ClinearGradient id='paint0_linear_1767_5881' x1='13.0018' y1='19.9983' x2='13.0018' y2='2' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23F9F9F9'/%3E%3Cstop offset='1' stop-color='white'/%3E%3C/linearGradient%3E%3C/defs%3E%3C/svg%3E"); } .PFModalButtonTelegram .PFModalButtonIcon { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.24138 11.8319C7.90571 9.79974 11.016 8.46001 12.5722 7.81272C17.0156 5.96457 17.9389 5.64353 18.5407 5.63293C18.673 5.63059 18.969 5.6634 19.1607 5.81895C19.3226 5.95029 19.3671 6.12772 19.3884 6.25225C19.4097 6.37677 19.4363 6.66045 19.4152 6.88211C19.1744 9.41209 18.1325 15.5517 17.6024 18.3853C17.3781 19.5843 16.9365 19.9863 16.509 20.0257C15.5798 20.1112 14.8743 19.4116 13.9743 18.8217C12.5661 17.8986 11.7706 17.324 10.4037 16.4232C8.82398 15.3822 9.84803 14.8101 10.7483 13.875C10.9839 13.6303 15.0778 9.90662 15.157 9.56882C15.1669 9.52657 15.1761 9.3691 15.0826 9.28594C14.989 9.20279 14.8509 9.23122 14.7513 9.25384C14.61 9.28589 12.3604 10.7728 8.00238 13.7146C7.36383 14.1531 6.78545 14.3667 6.26725 14.3555C5.69596 14.3432 4.59704 14.0325 3.78011 13.767C2.77811 13.4412 1.98174 13.269 2.05108 12.7159C2.0872 12.4278 2.48397 12.1331 3.24138 11.8319Z' fill='white'/%3E%3C/svg%3E"); } .PFModalButtonViber .PFModalButtonIcon { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M19.6455 8.13866L19.6408 8.11973C19.2578 6.57115 17.5308 4.9095 15.9449 4.56381L15.927 4.56011C13.3619 4.07078 10.7609 4.07078 8.19632 4.56011L8.17789 4.56381C6.59252 4.9095 4.86552 6.57126 4.48197 8.11973L4.47771 8.13866C4.00417 10.3012 4.00417 12.4944 4.47771 14.657L4.48197 14.6759C4.84922 16.1584 6.44753 17.7438 7.97428 18.1797V19.9083C7.97428 20.534 8.73672 20.8413 9.17028 20.3898L10.9217 18.5693C11.3016 18.5905 11.6817 18.6024 12.0616 18.6024C13.3528 18.6024 14.6447 18.4802 15.927 18.2356L15.9448 18.2319C17.5308 17.8862 19.2577 16.2245 19.6408 14.676L19.6455 14.6571C20.119 12.4944 20.119 10.3013 19.6455 8.13866ZM18.2594 14.3435C18.0037 15.3538 16.6925 16.6097 15.6507 16.8418C14.2868 17.1012 12.912 17.212 11.5387 17.174C11.5113 17.1732 11.4851 17.1839 11.4661 17.2035C11.2711 17.4035 10.1873 18.5162 10.1873 18.5162L8.82717 19.9122C8.72771 20.0159 8.55299 19.9453 8.55299 19.8022V16.9386C8.55299 16.8913 8.51922 16.8511 8.47274 16.8419C8.47246 16.8418 8.47223 16.8418 8.47195 16.8418C7.43012 16.6097 6.11937 15.3537 5.86317 14.3434C5.43695 12.3887 5.43695 10.407 5.86317 8.45226C6.11937 7.44196 7.43012 6.18598 8.47195 5.95391C10.854 5.50087 13.2692 5.50087 15.6507 5.95391C16.6931 6.18598 18.0037 7.44196 18.2595 8.45226C18.6862 10.4071 18.6862 12.3887 18.2594 14.3435Z' fill='white'/%3E%3Cpath d='M14.3275 15.6661C14.1673 15.6174 14.0147 15.5848 13.8729 15.526C12.4039 14.9166 11.0521 14.1303 9.98127 12.9251C9.37232 12.2398 8.8957 11.466 8.49284 10.6472C8.30176 10.2589 8.14076 9.85542 7.97662 9.45445C7.82699 9.08888 8.04741 8.71121 8.27947 8.43569C8.49726 8.17714 8.77754 7.97934 9.08106 7.83346C9.31795 7.71967 9.55158 7.7853 9.72462 7.98606C10.0986 8.42018 10.4422 8.87647 10.7203 9.37969C10.8914 9.68921 10.8445 10.0675 10.5344 10.2782C10.459 10.3293 10.3904 10.3895 10.3202 10.4473C10.2586 10.498 10.2007 10.5492 10.1585 10.6178C10.0813 10.7432 10.0777 10.8914 10.1273 11.0278C10.5096 12.0785 11.154 12.8955 12.2116 13.3356C12.3808 13.406 12.5507 13.4879 12.7457 13.4653C13.0722 13.4271 13.1779 13.069 13.4067 12.8819C13.6303 12.699 13.9162 12.6966 14.157 12.849C14.398 13.0016 14.6315 13.1652 14.8637 13.3307C15.0916 13.4931 15.3185 13.6519 15.5286 13.8371C15.7308 14.0151 15.8004 14.2486 15.6866 14.4901C15.4782 14.9326 15.175 15.3006 14.7377 15.5356C14.6142 15.6017 14.4667 15.6232 14.3275 15.6661C14.4667 15.6232 14.1673 15.6174 14.3275 15.6661Z' fill='white'/%3E%3Cpath d='M12.0655 7.32718C13.9868 7.38105 15.565 8.65612 15.9032 10.5557C15.9608 10.8793 15.9813 11.2102 16.0069 11.5388C16.0177 11.6769 15.9394 11.8082 15.7904 11.81C15.6364 11.8119 15.5671 11.683 15.557 11.5449C15.5372 11.2715 15.5235 10.9968 15.4858 10.7258C15.287 9.29448 14.1457 8.11034 12.721 7.85627C12.5066 7.81802 12.2873 7.808 12.0701 7.7852C11.9328 7.77081 11.7531 7.76252 11.7227 7.59183C11.6972 7.44875 11.8179 7.33485 11.9542 7.32751C11.9911 7.32533 12.0283 7.32706 12.0655 7.32718C13.9869 7.38105 12.0283 7.32706 12.0655 7.32718Z' fill='white'/%3E%3Cpath d='M14.9856 11.1117C14.9824 11.1357 14.9808 11.1921 14.9667 11.2452C14.9158 11.4381 14.6232 11.4622 14.5559 11.2676C14.536 11.2099 14.533 11.1441 14.5329 11.082C14.5322 10.6751 14.4438 10.2685 14.2385 9.91443C14.0276 9.55048 13.7052 9.24466 13.3273 9.05947C13.0987 8.94758 12.8516 8.87797 12.601 8.83659C12.4915 8.81844 12.3809 8.80752 12.2708 8.79218C12.1375 8.77364 12.0663 8.68869 12.0727 8.55731C12.0785 8.43422 12.1685 8.34557 12.3027 8.35325C12.7436 8.37822 13.1695 8.47365 13.5616 8.68118C14.3587 9.10337 14.8141 9.76967 14.9471 10.6595C14.953 10.6998 14.9627 10.7397 14.9658 10.7801C14.9733 10.8799 14.978 10.9799 14.9856 11.1117C14.9824 11.1356 14.978 10.9799 14.9856 11.1117Z' fill='white'/%3E%3Cpath d='M13.7897 11.0654C13.629 11.0683 13.543 10.9793 13.5263 10.832C13.5148 10.7293 13.5057 10.6251 13.4811 10.5251C13.4329 10.3282 13.3282 10.1457 13.1625 10.025C13.0844 9.96809 12.9957 9.9266 12.9029 9.89972C12.785 9.86561 12.6625 9.87502 12.545 9.84624C12.4172 9.81493 12.3466 9.71144 12.3667 9.59166C12.3849 9.48257 12.491 9.39745 12.6102 9.40613C13.3551 9.45989 13.8875 9.845 13.9635 10.722C13.969 10.7839 13.9752 10.8492 13.9615 10.9085C13.9379 11.0097 13.8628 11.0605 13.7897 11.0654C13.8628 11.0605 13.6289 11.0683 13.7897 11.0654Z' fill='white'/%3E%3Cpath d='M19.6445 8.13837L19.6398 8.11944C19.4251 7.25138 18.788 6.34786 17.9902 5.6604L16.9117 6.61622C17.553 7.12722 18.1025 7.83513 18.2586 8.45192C18.6853 10.4067 18.6853 12.3883 18.2586 14.3432C18.0028 15.3535 16.6916 16.6095 15.6498 16.8415C14.2859 17.1009 12.9112 17.2117 11.5378 17.1737C11.5105 17.1729 11.4842 17.1836 11.4652 17.2032C11.2703 17.4032 10.1864 18.5159 10.1864 18.5159L8.8263 19.9119C8.72685 20.0156 8.55213 19.9451 8.55213 19.8019V16.9383C8.55213 16.891 8.51836 16.8508 8.47188 16.8416C8.4716 16.8416 8.47137 16.8415 8.47109 16.8415C7.879 16.7096 7.20033 16.2469 6.67751 15.6867L5.61182 16.6311C6.27738 17.3551 7.13582 17.9404 7.97325 18.1795V19.9082C7.97325 20.5339 8.73569 20.8411 9.16925 20.3896L10.9207 18.5691C11.3006 18.5903 11.6805 18.6022 12.0606 18.6022C13.3518 18.6022 14.6436 18.48 15.9259 18.2354L15.9438 18.2318C17.5297 17.8861 19.2567 16.2245 19.6397 14.6759L19.6444 14.6569C20.118 12.4941 20.118 10.3011 19.6445 8.13837Z' fill='white'/%3E%3Cpath d='M15.5289 13.8359C15.3187 13.6509 15.0918 13.492 14.864 13.3296C14.6318 13.1641 14.3983 13.0005 14.1573 12.8479C13.9164 12.6955 13.6307 12.6979 13.407 12.8807C13.1782 13.0678 13.0725 13.426 12.746 13.4642C12.551 13.4868 12.3811 13.4048 12.2118 13.3345C11.5612 13.0638 11.0675 12.6499 10.6943 12.1272L9.90137 12.83C9.9283 12.8612 9.95401 12.8932 9.98139 12.924C11.0522 14.1292 12.4041 14.9155 13.873 15.5249C14.0147 15.5837 14.1674 15.6164 14.3276 15.665C14.1674 15.6163 14.4669 15.6221 14.3276 15.665C14.4669 15.6221 14.6143 15.6006 14.7379 15.5344C15.1753 15.2994 15.4785 14.9314 15.6868 14.489C15.8007 14.2475 15.7311 14.014 15.5289 13.8359Z' fill='white'/%3E%3Cpath d='M14.819 8.46826L14.481 8.76792C15.0122 9.28481 15.3786 9.96986 15.4833 10.7237C15.5209 10.9949 15.5348 11.2695 15.5545 11.5429C15.5646 11.681 15.6338 11.8099 15.7879 11.8081C15.937 11.8062 16.0153 11.675 16.0045 11.5368C15.9787 11.2083 15.9583 10.8773 15.9007 10.5537C15.7527 9.72223 15.367 9.0104 14.819 8.46826Z' fill='white'/%3E%3Cpath d='M14.9446 10.6577C14.8478 10.0093 14.5788 9.48024 14.132 9.07715L13.7949 9.37591C13.9693 9.53064 14.1201 9.71236 14.2362 9.91279C14.4414 10.2669 14.5299 10.6734 14.5305 11.0803C14.5307 11.1425 14.5336 11.2082 14.5536 11.2661C14.621 11.4608 14.9134 11.4367 14.9644 11.2437C14.9785 11.1905 14.9801 11.1341 14.9833 11.1102C14.9756 10.9784 14.9801 11.1342 14.9833 11.1102C14.9756 10.9784 14.9709 10.8784 14.9633 10.7785C14.9603 10.7379 14.9507 10.698 14.9446 10.6577Z' fill='white'/%3E%3Cpath d='M13.4501 9.68457L13.1069 9.98877C13.1259 10.0002 13.1444 10.0122 13.1624 10.0253C13.328 10.146 13.4327 10.3284 13.481 10.5254C13.5055 10.6254 13.5146 10.7294 13.5262 10.8322C13.542 10.973 13.6219 11.0595 13.769 11.0645C13.7797 11.0643 13.7902 11.064 13.7969 11.064C13.8676 11.0561 13.9386 11.0065 13.9613 10.9086C13.975 10.8494 13.9687 10.784 13.9633 10.7221C13.9206 10.2318 13.7353 9.89541 13.4501 9.68457Z' fill='white'/%3E%3C/svg%3E"); } .PFModalButtonMax .PFModalButtonIcon { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='16' viewBox='-2 0 19 15' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.20226 15.8098C6.7223 15.8098 6.03454 15.5938 4.83905 14.7296C4.08287 15.7018 1.68829 16.4616 1.58386 15.1617C1.58386 14.1858 1.36781 13.3612 1.12295 12.461C0.83128 11.3519 0.5 10.1168 0.5 8.32721C0.5 4.05298 4.00725 0.837402 8.16265 0.837402C12.3217 0.837402 15.5804 4.21142 15.5804 8.36682C15.5872 10.3317 14.814 12.2189 13.4308 13.6143C12.0475 15.0097 10.1671 15.7993 8.20226 15.8098ZM8.26348 4.5319C6.23979 4.42747 4.66261 5.82821 4.31332 8.02474C4.02525 9.84318 4.53658 12.0577 4.97228 12.1729C5.18113 12.2234 5.70686 11.7985 6.03454 11.4708C6.57637 11.8451 7.20733 12.0699 7.86378 12.1225C8.87176 12.171 9.85853 11.8221 10.612 11.1508C11.3655 10.4795 11.8255 9.53934 11.8932 8.53246C11.9326 7.52351 11.5743 6.5394 10.8955 5.7919C10.2167 5.04439 9.27155 4.59324 8.26348 4.5355V4.5319Z' fill='white'/%3E%3C/svg%3E"); } `,$e=H` .PFModalDualCardItemButtonFooter { all: unset; width: 100%; display: flex; box-sizing: border-box; } .PFModalDualCardItemButton { all: unset; width: 100%; display: flex; position: relative; flex-direction: column; align-items: center; gap: calc(16px * var(--pf-modal-scale)); } .PFModalButton { all: unset; box-sizing: border-box; display: flex; align-items: center; cursor: pointer; height: 48px; position: relative; z-index: 2; width: 100%; background-color: var(--pf-grey-200); color: var(--pf-white); user-select: none; font-family: 'Inter', sans-serif !important; font-style: normal; font-weight: 600; font-size: calc(14px * var(--pf-modal-scale)); line-height: calc(20px * var(--pf-modal-scale)); letter-spacing: calc(0.17px * var(--pf-modal-scale)); box-shadow: 0 1px 5px rgba(89, 104, 143, 0.06); text-align: center; white-space: nowrap; overflow: hidden; justify-content: space-around; width: 100%; border-radius: calc(8px * var(--pf-modal-scale)); border: none; } .PFModalButton:hover { background-color: currentColor; opacity: 0.8; } .PFModalButton.PFModalButtonWhatsapp { background-color: var(--pf-modal-whatsapp-color); } .PFModalButton.PFModalButtonTelegram { background-color: var(--pf-modal-telegram-color); } .PFModalButton.PFModalButtonViber { background-color: var(--pf-modal-viber-color); } .PFModalButton.PFModalButtonMax { background: var(--pf-modal-max-color); } .PFModalButtonIcon { --s: calc(24px * var(--pf-modal-scale)); all: unset; box-sizing: border-box; width: var(--s); height: var(--s); mask: var(--icon); -webkit-mask: var(--icon); mask-size: 100% 100%; -webkit-mask-size: 100% 100%; background-color: currentColor; flex-shrink: 0; background-color: var(--white); } .PFButtons { display: flex; flex-direction: column; justify-content: center; align-items: center; border-radius: 16px; max-width: 328px; padding: calc(16px * var(--pf-modal-scale)); } .PFButtonsContainer { width: 100%; display: flex; flex-direction: column; gap: 12px; align-items: center; padding: 24px 16px; justify-content: center; border-radius: 16px; width: 184px; overflow: hidden; height: 168px; } .PFQrActionAllChannels.PFButtonsContainer { gap: 8px; padding: 16px; height: 100%; .PFModalButton { height: 40px; } } .PFModalButtonIconContainer { display: flex; justify-content: center; align-items: center; border-radius: calc(8px * var(--pf-modal-scale)) 0 0 calc(8px * var(--pf-modal-scale)); padding: calc(12px * var(--pf-modal-scale)); &.PFModalButtonWhatsapp { background-color: var(--pf-modal-whatsapp-color-icon); } &.PFModalButtonTelegram { background-color: var(--pf-modal-telegram-color-icon); } &.PFModalButtonMax { background-color: var(--pf-modal-max-color-icon); } &.PFModalButtonViber { background-color: var(--pf-modal-viber-color-icon); } } .PFModalButtonText { display: flex; width: 100%; justify-content: center; align-items: center; font-size: calc(14px * var(--pf-modal-scale)); padding: 10px 16px; } .PFPhoneCallSection { display: flex; box-sizing: border-box; flex-direction: row; justify-content: space-around; align-items: center; gap: 16px; width: 328px; border-radius: 16px; padding: 16px; } .PFDisabledButtonsPhoneCallMessage > :not(.PFPhoneCallNumberDescriptionContainer):not(.PFPhoneCallMessage) { opacity: 0.4; pointer-events: none; } .PFPhoneCallMessage { font-family: 'Inter', sans-serif; font-size: 14px; text-align: center; width: 129px; line-height: 20px; overflow-wrap: break-word; } .PFDisabledButtons .PFQrScanImage, .PFDisabledButtons .PFQrActions .PFButtonsContainer .PFModalDualCardItemButton .PFModalDualCardItemButtonFooter, .PFDisabledButtons .PFModalDualCardItemButton .PFModalDualCardItemButtonFooter, .PFDisabledButtons .PFButtonsContainer .PFMobileModalButtonContainer { opacity: 0.4; pointer-events: none; } .PFDisabledButtons .PFButtonsContainer .PFBackgroundSvg { opacity: 0; } .PFDataProcessingAndMarketingConsentContainer { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: calc(16px * var(--pf-modal-scale)); padding: calc(4px * var(--pf-modal-scale)) calc(4px * var(--pf-modal-scale)) } .PFMobileConsentContainer { margin-top: 24px; width: 300px; display: flex; flex-direction: column; gap: 8px; align-items: center; } .PFDataProcessingAndMarketingConsentContainerMobile { all: unset; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 100%; border-radius: calc(16px * var(--pf-modal-scale)); padding: 0px; } .PFQrWrapper { position: relative; display: flex; padding: 24px; border-radius: 16px; justify-content: center; align-items: center; box-sizing: border-box; width: 216px; height: 216px; } .PFQrOverlay { position: absolute; inset: 0; width: calc(216px * var(--pf-modal-scale)); height: calc(216px * var(--pf-modal-scale)); display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); background-color: transparent; border-radius: inherit; } .PFQrOverlaySvg { display: flex; width: calc(48.5px * var(--pf-modal-scale)); height: calc(48.5px * var(--pf-modal-scale)); border-radius: 100px; background-color: var(--common-smog); justify-content: center; align-items: center; border: calc(4px * var(--pf-modal-scale)) solid var(--white); svg { width: calc(24px * var(--pf-modal-scale)); height: calc(26px * var(--pf-modal-scale)); color: var(--white); } } .PFTextUnderline { background-image: linear-gradient(currentColor, currentColor); background-position: 0 100%; background-size: 100% calc(1px * var(--pf-modal-scale)); background-repeat: no-repeat; padding-bottom: 0.5px; cursor: pointer; } .PFConsentSection { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; width: 100%; height: calc(24px * var(--pf-modal-scale)); margin-left: calc(12px * var(--pf-modal-scale)); gap: 8px; font-size: calc(10px * var(--pf-modal-scale)); line-height: calc(14px * var(--pf-modal-scale)); font-weight: 400; color: var(--common-asphalt); opacity: 0.8; font-family: "Inter", sans-serif; } .PFConsentContainerMobile { width: 100%; font-size: 12px; line-height: 16px; margin-left: 0px; padding: 0px; height: 48px; width: 328px; box-sizing: border-box; padding-left: 12px; border-radius: calc(16px * var(--pf-modal-scale)); } .PFCheckbox { appearance: none; -webkit-appearance: none; -moz-appearance: none; width: 12px; height: 12px; border-radius: 3px; border: 1px solid #B6D7FF; /* обводка */ background: transparent; cursor: pointer; padding: 0; position: relative; /* для центрирования псевдоэлемента */ display: inline-block; } .PFCheckbox:checked { background: #B6D7FF; } .PFCheckbox:checked::after { content: ""; position: absolute; top: 50%; left: 50%; width: 10px; height: 6px; transform: translate(-50%, -50%); background: url("data:image/svg+xml;utf8,") no-repeat center; } .PFConsentSectionDarkText { color: var(--common-black); } .PFModalButtonPhoneCall { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--main-blue); font-weight: 600; line-height: 28px; font-family: "Inter", sans-serif; font-size: 18px; letter-spacing: -0.18px; text-decoration: underline dotted; text-underline-offset: 4px; } `,ze="::$wazzupIdPlaceholder";function Oe(t,e){const r=((t,e,r)=>{let i=r?.telegramGreetingMessage?r.telegramGreetingMessage:t.telegramGreetingMessage;return t.telegramAppendWazzupId&&(i.includes(` ${ze} `)&&(i=i.replaceAll(ze,`${e}`)),i=i.replaceAll(ze,` ${e} `)),Kt(i)})(t,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null),i=t.telegramAppendTextMessage?`?text=${r}`:"";if(t.telegramUsername.startsWith("https://t.me/"))return`${t.telegramUsername}${i}`;if(t.telegramUsername.startsWith("t.me"))return`https://${t.telegramUsername}${i}`;let a=t.telegramUsername;return a.includes("@")&&(a=a.replaceAll("@","")),t.telegramUsername.toLowerCase().endsWith("bot")?`https://t.me/${encodeURIComponent(a)}?start=${e}`:`https://t.me/${encodeURIComponent(a)}${i}`}const He="::$wazzupIdPlaceholder";function Ne(t,e){const r=((t,e,r)=>{let i=r?.whatsappGreetingMessage?r.whatsappGreetingMessage:t.whatsappGreetingMessage;return t.whatsappAppendWazzupId&&(i.includes(` ${He} `)&&(i=i.replaceAll(He,`${e}`)),i=i.replaceAll(He,` ${e} `)),Kt(i)})(t,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null),i=t.whatsappAppendTextMessage?`?text=${encodeURIComponent(r)}`:"";return`https://wa.me/${encodeURIComponent(t.whatsappNumber.replace("+",""))}${i}`}function Ge(t){return t.viberUsername.includes("viber://pa?chatURI=")?`${t.viberUsername}`:`viber://chat?number=${t.viberUsername}`}function je(t){return t.maxUsername}function We(t,e,r,i,a,n){const s=Yt()?`WM${r}`:`WW${r}`;if(n)try{a.fireEvent("WP_click_widget"),se(t.id,{name:"click",wazzupId:s,hid:i}),a.fireEvent("WP_click_whatsapp"),se(t.id,{name:"whatsapp_click",wazzupId:s,hid:i}),window.open(Ne(t,s,e),"_blank")}catch(t){console.error(t)}else se(t.id,{name:"whatsapp_click",wazzupId:s,hid:i}),a.fireEvent("WP_click_whatsapp"),window.open(Ne(t,s,e),"_blank")}function qe(t,e,r,i,a,n){const s=Yt()?`WM${r}`:`WW${r}`;if(n)try{a.fireEvent("WP_click_widget"),se(t.id,{name:"click",wazzupId:s,hid:i}),a.fireEvent("WP_click_telegram"),se(t.id,{name:"telegram_click",wazzupId:s,hid:i}),window.open(Oe(t,s,e),"_blank")}catch(t){console.error(t)}else se(t.id,{name:"telegram_click",wazzupId:s,hid:i}),a.fireEvent("WP_click_telegram"),window.open(Oe(t,s,e),"_blank")}function Ue(t,e,r,i,a,n){const s=Yt()?`WM${r}`:`WW${r}`;if(n)try{a.fireEvent("WP_click_widget"),se(t.id,{name:"click",wazzupId:s,hid:i}),a.fireEvent("WP_click_viber"),se(t.id,{name:"viber_click",wazzupId:s,hid:i});const e=Ge(t);window.open(e,"_blank")}catch(t){console.error(t)}else{se(t.id,{name:"viber_click",wazzupId:s,hid:i}),a.fireEvent("WP_click_viber");const e=Ge(t);window.open(e,"_blank")}}function Ye(t,e,r,i,a,n){const s=Yt()?`WM${r}`:`WW${r}`;if(n)try{a.fireEvent("WP_click_widget"),se(t.id,{name:"click",wazzupId:s,hid:i}),a.fireEvent("WP_click_max"),se(t.id,{name:"max_click",wazzupId:s,hid:i});const e=je(t);window.open(e,"_blank")}catch(t){console.error(t)}else{se(t.id,{name:"max_click",wazzupId:s,hid:i}),a.fireEvent("WP_click_max");const e=je(t);window.open(e,"_blank")}}function Qe(t){window.open(`${t}`,"_blank")}function Je(t,e){return`https://widget.yourgood.app/bridge?wid=${t}&sid=${e}&domain=${(t=>{const{hostname:e}=new URL(t);try{return L(e)}catch{return e}})(document.URL)}`}function Xe(t){if(t!==p.Black)return Mt` `;const e="white";return Mt` `}const Ke=(t,e,r)=>{se(t,{name:"logo_redirect",wazzupId:e,hid:r})},tr=(t,e)=>Mt` `;const er=H` .PFQrImageContainer { position: relative; display: inline-block; box-sizing: border-box; height: 168px; } .PFQrCorners { position: absolute; top: -6px; left: -6px; right: -6px; bottom: -6px; pointer-events: none; z-index: 1; } .PFQrCorner { position: absolute; width: 15px; height: 15px; border: 3px solid #B6D7FF; opacity: 0; animation: cornerFly 4.5s infinite; animation-delay: 2s; } .PFQrCornerTl { top: 0; left: 0; border-right: none; border-bottom: none; border-radius: 8px 0px 8px; --tx: -10px; --ty: -10px; } .PFQrCornerTr { top: 0; right: 0; border-left: none; border-bottom: none; border-radius: 0px 8px 0 8px; --tx: 10px; --ty: -10px; } .PFQrCornerBl { bottom: 0; left: 0; border-right: none; border-top: none; border-radius: 0px 8px 0px 8px; --tx: -10px; --ty: 10px; } .PFQrCornerBr { bottom: 0; right: 0; border-left: none; border-top: none; border-radius: 8px 0 8px 0; --tx: 10px; --ty: 10px; } @keyframes cornerFly { 0% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0.8); } 10% { opacity: 1; transform: translate(0,0) scale(1); } 20% { opacity: 1; transform: translate(0,0) scale(1.05); } 30% { opacity: 1; transform: translate(0,0) scale(1); } 40% { opacity: 1; transform: translate(0,0) scale(1); } 50% { opacity: 1; transform: translate(0,0) scale(1); } 60% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0.8); } 100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0.8); } } .PFQrScanLine { position: absolute; width: 156px; display: flex; justify-content: center; align-items: center; left: 5px; height: 70px; border-radius: 4px; background: linear-gradient(to bottom, rgba(182,215,255,0.9) 0%, rgba(182,215,255,0.6) 20%, rgba(182,215,255,0.3) 40%, transparent 60%); opacity: 0; animation: scanAnim 4.5s infinite; animation-delay: 2s; pointer-events: none; z-index: 2; } @keyframes scanAnim { 0% { top: 10%; opacity: 0; } 30% { top: 0%; opacity: 0; } /* ждём прилёта углов */ 35% { top: 0%; opacity: 1; } /* линия появляется сверху QR */ 50% { top: calc(100% - 40px); opacity: 1; } /* линия идет до низа QR */ 55% { top: calc(100% - 40px); opacity: 0; } /* исчезает внизу */ 60% { top: 0%; opacity: 0; } /* возвращается в старт */ 100% { top: 10%; opacity: 0; } /* пауза 1 секунда */ } `;class rr extends Gt{timerIdForAnimation=null;parser=(()=>new DOMParser)();actionBody={id:"default-uuid",widgetSettings:this.widget?.widgetSettings,backgroundImage:{url:null},logoImage:{url:null},isAppearance:!0};static properties=(()=>({_isOpen:{type:Boolean},widget:{type:Object},wazzupId:{type:String},integrationsService:{type:Object},isModal:{type:Boolean},tariff:{type:Object}}))();constructor(){super()}afterTransition(t){t.target.classList.contains("PFHidden")&&(t.target.style.display="none")}open(t){this._isOpen=!0,this.actionBody=t;const e=this.shadowRoot.getElementById("PFModalOverlay"),r=this.shadowRoot.getElementById("PFModal");clearTimeout(this.timerIdForAnimation),e.addEventListener("transitionend",this.afterTransition,!0),e.addEventListener("webkitTransitionEnd",this.afterTransition,!0),e.addEventListener("click",this.handleOverlayClick.bind(this)),r.classList.remove("PFModalAnimateOut"),r.classList.add("PFModalAnimateIn","PFAnimated"),e.classList.remove("PFHidden"),e.style.display="flex",this.timerIdForAnimation=setTimeout((()=>{e.style.opacity=1,r.classList.remove("PFAnimated")}),100)}close(){this._isOpen=!1,this.integrationsService.fireEvent("WP_modal_close"),this.dispatchEvent(new CustomEvent("close"));const t=this.shadowRoot.getElementById("PFModalOverlay"),e=this.shadowRoot.getElementById("PFModal");e.classList.remove("PFModalAnimateIn"),t.removeEventListener("click",this.handleOverlayClick.bind(this)),e.classList.add("PFModalAnimateOut","PFAnimated"),t.classList.add("PFHidden"),this.timerIdForAnimation=setTimeout((()=>{t.style.opacity=0,e.classList.remove("PFAnimated")}),100)}QrCodeSection(t){const e=t.name===p.Black,r=I(this.widget),i=this.widget.dataProcessingConsent,n=navigator.language||navigator.userLanguage,s=/ru/i.test(n)?"Сканируйте QR с телефона":"Scan QR with phone",o=(l=this.handleWhatsappOpenClick,Mt`
`);var l;const c=((t,e)=>Mt`
`)(this.handleTelegramOpenClick,u),d=((t,e)=>Mt`
`)(this.handleViberOpenClick,m),f=((t,e)=>Mt`
`)(this.handleMaxOpenClick,g),y=(ie(r,this.handleWhatsappOpenClick,this.handleTelegramOpenClick,this.handleViberOpenClick,this.handleMaxOpenClick),r.includes("-and-")?r.split("-and-"):[r]),v=a.every((t=>y.includes(t)));let b=function(t,e){const r=new URL("https://widget.yourgood.app");return r.pathname="/api/qr/generate",r.searchParams.append("url",t),r.searchParams.append("type",e),r.toString()}(Je(this.wazzupId,this.widget.id),r);const x=re(o,c,d,f,0,r),M=i.link&&i.active&&i.link.length>0&&!i.defaultEnabled,w=y.filter((t=>r.includes(t)&&t!==h)),P=1===w.length,_=P?(t=>{switch(t){case"telegram":case"max":default:return"#1C7EF1";case"whatsapp":return"#24C28A";case"viber":return"#9C65D9"}})(w[0]):null;return Mt`
${M?"":Mt`
${s}
`}
${Wt(!M,(()=>Mt`
`),(()=>Pt))}
${Wt(M,(()=>Mt`
${Mt` `}
`),(()=>Pt))}
${Wt(!0,(()=>Mt`
${Wt(!0,(()=>Mt` ${x} `))} ${Wt(P,(()=>Mt`
${Mt` `}
`))}
`),(()=>Pt))}
`}handleOverlayClick(t){t.target===this.shadowRoot.getElementById("PFModalOverlay")&&this.close()}cButtonClose(){return Mt`
`}BackgroundImageSection(){const{widgetSettings:{backgroundImageEnabled:t},backgroundImage:e}=this.widget;return t?Mt`
`:""}logoFileSection(){const{widgetSettings:{logoEnabled:t},logoImage:e}=this.widget;return t?Mt` `:""}defaultLogo(){const t=d(navigator.language||navigator.userLanguage);return Mt` `}cFooter(){const{widgetSettings:t}=this.widget,e=t.background.theme.name!==p.Black?"var(--common-black)":"var(--white)";return Mt` `}render(){const{backgroundImage:t,logoImage:e,widgetSettings:r}=this.widget,i=r.background.theme.name!==p.Black,a=r.hideBranding,n=r.textSettings.header,s=r.textSettings.text,o=this.parser.parseFromString(n,"text/html").body.textContent.trim(),l=this.parser.parseFromString(s,"text/html").body.textContent.trim(),h=o.length,c=l.length,d=this.widget.dataProcessingConsent.active&&this.widget.dataProcessingConsent.link&&this.widget.dataProcessingConsent.link.length>0,f=this.widget.marketingConsent.active;return Mt`
${this.cButtonClose()} ${Wt(t&&r.backgroundImageEnabled,(()=>this.BackgroundImageSection()),(()=>Pt))}
${Wt(e&&r.logoEnabled,(()=>this.logoFileSection()),(()=>Wt(!e&&r.logoEnabled,(()=>this.defaultLogo()),(()=>Pt))))} ${Wt(c||h,(()=>Mt`
${Wt(o?.length,(()=>Mt`
${o}
`))} ${Wt(l?.length,(()=>Mt`
${l}
`))}
`))}
${this.QrCodeSection(r.background.theme)} ${this.widget.phoneCallNumber?this.phoneCallSection():""} ${d||f?this.consentSection():""}
${Wt(!a,(()=>this.cFooter()),(()=>Pt))}
`}phoneCallSection(){const{widgetSettings:t,phoneCallMessage:e,phoneCallNumber:r,dataProcessingConsent:i}=this.widget,a=t.background?.theme?.layoutColor,n=t.background?.theme.name===p.Black,s=t.background?.theme.name===p.White,o=i.link&&i.active&&i.link.length>0&&!i.defaultEnabled;return Mt`
${e}
${r}
`}consentSection(){const{widgetSettings:t,dataProcessingConsent:e,marketingConsent:r}=this.widget,i=e.link&&e.active&&e.link.length>0,a=r.active,n=t.background?.theme?.layoutColor,s=t.background?.theme.name===p.Grass;return Mt`
${Wt(i,(()=>Mt`
${tr(e.defaultEnabled,this.handleDataProcessingConsentChange)} Я прочитал(а) и согласен(а) с Политикой обработки данных
`),(()=>Pt))} ${Wt(a,(()=>Mt`
${tr(r.defaultEnabled,this.handleMarketingConsentChange)}
Я согласен(а) на инфо- и рекламные сообщения
`))}
`}handleWhatsappOpenClick(){We(this.widget,this.actionBody,this.wazzupId,this.hid,this.integrationsService)}handleTelegramOpenClick(){qe(this.widget,this.actionBody,this.wazzupId,this.hid,this.integrationsService)}handleViberOpenClick(){Ue(this.widget,this.actionBody,this.wazzupId,this.hid,this.integrationsService)}handleMaxOpenClick(){Ye(this.widget,this.actionBody,this.wazzupId,this.hid,this.integrationsService)}handleBrandingClick(){Ke(this.widget.id,this.wazzupId,this.hid)}openLink(){Qe(this.widget.dataProcessingConsent.link)}handleDataProcessingConsentChange(t){this.widget={...this.widget,dataProcessingConsent:{...this.widget.dataProcessingConsent,defaultEnabled:t.target.checked}}}handleMarketingConsentChange(t){this.widget={...this.widget,marketingConsent:{...this.widget.marketingConsent,defaultEnabled:t.target.checked}}}static styles=(()=>H` ${Ze} ${Re} ${$e} ${er} .PFModalOverlay { --pf-modal-scale: 1; --common-black: #2b3238; --common-rain: #D0DBE4; --white: #FFFFFF; --primary: #212121; --common-dullSky: #B6C7D6; --common-dark: #1B1B1B; all: unset; position: fixed; left: 0; box-sizing: border-box; z-index: 9999; top: 0; bottom: 0; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: center; background-color: rgba(0, 0, 0, 0.23); opacity: 0; transition: 0.6s cubic-bezier(0.175, 0.885, 0.32, 1) opacity !important; display: none; } .PFModal { all: unset; position: relative; display: flex; width: 100%; flex-direction: column; overflow-x: visible; overflow-y: scroll; scrollbar-width: none; -ms-overflow-style: none; min-width: calc(480px * var(--pf-modal-scale)); max-width: calc(530px * var(--pf-modal-scale)); } .PFModal.PFModalBgLeft, .PFModal.PFModalBgRight { max-width: calc(708px * var(--pf-modal-scale)); } .PFModal.PFModalBgRight { flex-direction: row-reverse; justify-content: flex-end; max-width: 760px; .PFModalBackground { border-radius: 0px calc(16px * var(--pf-modal-scale)) calc(16px * var(--pf-modal-scale)) 0px; } .PFModalBody { border-radius: calc(16px * var(--pf-modal-scale)) 0px 0px calc(16px * var(--pf-modal-scale)); } .PFModalButtonClose { right: calc(5px * var(--pf-modal-scale)); } .PFCloseButtonContainer { width: 54px; } } .PFModalBgLeft { flex-direction: row; justify-content: flex-start; max-width: 750px !important; .PFModalBackground { border-radius: calc(16px * var(--pf-modal-scale)) 0px 0px calc(16px * var(--pf-modal-scale)); } .PFModalBody { border-radius: 0px calc(16px * var(--pf-modal-scale)) calc(16px * var(--pf-modal-scale)) 0px; } .PFModalButtonClose { right: calc(1px * var(--pf-modal-scale)); } } .PFModal.PFModalBgLeft .PFModalBackground, .PFModal.PFModalBgRight .PFModalBackground { width: calc(228px * var(--pf-modal-scale)); height: 100%; } .PFModal.PFModalBgTop .PFModalBackground { width: calc(480px * var(--pf-modal-scale)); height: calc(164px * var(--pf-modal-scale)); } .PFModal.PFModalBgTop .PFModalBackground .PFModalHeader { min-width: 302px; } .PFModal.PFModalBgTop { flex-direction: column; .PFModalBackground { width: 100%; height: calc(164px * var(--pf-modal-scale)); border-radius: calc(16px * var(--pf-modal-scale)) calc(16px * var(--pf-modal-scale)) 0px 0px; } .PFModalBody { border-radius: 0px 0px calc(16px * var(--pf-modal-scale)) calc(16px * var(--pf-modal-scale)); } .PFCloseButtonContainer { width: 60px; } } .PFModal.PFModalWithoutBg { height: auto !important; } .PFModal.PFModalWithoutBg .PFModalHeader:has(.PFModalHeaderLogo) { padding-top: 0px; } .PFModal:has(.PFModalHeaderLogo):has(.PFModalHeaderTitleDark) { .PFModalHeaderTextDark { width: calc(400px * var(--pf-modal-scale)); } } .PFModal:has(.PFModalHeaderLogo):has(.PFModalHeaderTitle) { .PFModalHeaderText { width: calc(400px * var(--pf-modal-scale)); } } .PFModalButtonClose { --s: calc(36px * var(--pf-modal-scale)); all: unset; position: absolute; right: calc(8px * var(--pf-modal-scale)); z-index: 1; display: flex; align-items: center; justify-content: center; width: var(--s); height: var(--s); border-radius: 50%; cursor: pointer; background: rgba(27, 27, 27, 0.30); color: white; } .PFModalButtonCloseIcon { --s: calc(20px * var(--pf-modal-scale)); all: unset; width: var(--s); height: var(--s); padding: calc(8px * var(--pf-modal-scale)); color: white; border-radius: 100px; } .PFModalBody { all: unset; position: relative; box-sizing: border-box; padding: 16px; width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: calc(16px * var(--pf-modal-scale)); overflow-y: scroll; scrollbar-width: none; -ms-overflow-style: none; box-shadow: 0 10px 20px 1px rgba(33, 33, 33, 0.04); border-radius: calc(16px * var(--pf-modal-scale)); scrollbar-width: none; -ms-overflow-style: none; } .PFModalFooter { all: unset; align-items: center; // padding-bottom: calc(16px * var(--pf-modal-scale)); display: flex; justify-content: center; text-align: center; color: inherit; gap: calc(10px * var(--pf-modal-scale)); width: 100%; height: calc(24px * var(--pf-modal-scale)); & svg { width: calc(120px * var(--pf-modal-scale)); height: calc(20px * var(--pf-modal-scale)); } } .PFModalFooter a { color: inherit; cursor: pointer; text-decoration: none; display: flex; flex-direction: row; gap: 4px; justify-content: center; align-items: center; & span { text-align: center; font-family: 'Inter', sans-serif; font-size: 14px; font-style: normal; font-weight: 400; line-height: 14px; } } .PFModalHeader { all: unset; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 0px 20px 16px 20px; } .PFModalHeaderLogo { all: unset; box-sizing: border-box; display: flex; height: calc(56px * var(--pf-modal-scale)) !important; width: calc(100px * var(--pf-modal-scale)) !important; } .PFModalHeaderLogoImage { all: unset; object-fit: cover; width: 100%; height: 100%; overflow: clip !important; overflow-clip-margin: content-box !important; } .PFModalHeaderLogoImageDefault { display: flex; max-height: 56px; padding: 0px 12px; justify-content: center; align-items: center; justify-content: center; align-items: center; border-radius: 8px; border: 1px dashed var(--common-rain); background: white; color: var(--common-dark); text-align: center; font-family: 'Inter', sans-serif; font-size: 12px; font-style: normal; font-weight: 600; line-height: 16px; width: 100px; text-wrap: nowrap; } .PFModalHeaderTitle { word-wrap: anywhere !important; white-space: pre-line; font-family: 'Inter', sans-serif; font-size: calc(22px * var(--pf-modal-scale)); font-style: normal; width: calc(400px * var(--pf-modal-scale)); align-items: center; display: flex; font-weight: 600; justify-content: center; line-height: calc(32px * var(--pf-modal-scale)); /* 145.455% */ letter-spacing: calc(-0.22px * var(--pf-modal-scale)); color: white; } .PFModalHeaderTitleDark { display: flex; align-items: center; justify-content: center; text-align: center; word-wrap: anywhere !important; white-space: pre-line; font-family: 'Inter', sans-serif; font-size: calc(22px * var(--pf-modal-scale)); font-style: normal; width: calc(400px * var(--pf-modal-scale)); font-weight: 600; line-height: calc(32px * var(--pf-modal-scale)); /* 145.455% */ letter-spacing: calc(-0.22px * var(--pf-modal-scale)); color: var(--common-black); } .PFModalHeaderTextContent { display: flex; width: calc(394px * var(--pf-modal-scale)); flex-direction: column; gap: calc(4px * var(--pf-modal-scale)); align-items: center; } .PFModalHeaderTitleContainer { display: flex; flex-direction: row; width: 100%; justify-content: center; align-items: center; } .PFModalHeaderTextContainer { display: flex; flex-direction: row; width: 100%; gap: calc(8px * var(--pf-modal-scale)); } .PFModalHeaderText { flex-wrap: wrap; color: var(--primary); word-wrap: anywhere !important; font-family: 'Inter', sans-serif; font-size: calc(14px * var(--pf-modal-scale)); font-style: normal; font-weight: 400; line-height: calc(20px * var(--pf-modal-scale)); color: var(--white); text-align: center; display: flex; align-items: center; justify-content: center; width: calc(400px * var(--pf-modal-scale)); } .PFModalHeaderTextDark { display: flex; flex-wrap: wrap; color: var(--primary); word-wrap: anywhere !important; text-align: center; align-items: center; font-family: 'Inter', sans-serif; font-size: calc(14px * var(--pf-modal-scale)); font-style: normal; font-weight: 400; justify-content: center; line-height: calc(20px * var(--pf-modal-scale)); color: var(--common-black); width: calc(400px * var(--pf-modal-scale)); } .PFModalBackground { all: unset; display: flex; flex-shrink: 0; overflow: hidden; width: 100%; max-width: 480px; height: calc(240px * var(--pf-modal-scale)); } .PFModalBackgroundImage { all: unset; object-fit: cover; width: 100%; height: 100%; } .PFQrActionsContainer { width: auto; display: flex; flex-direction: row; justify-content: center; align-items: center; border-radius: 16px; gap: calc(20px * var(--pf-modal-scale)); } .PFActionsContainerWithoutQr { display: block !important; } .PFQrActions { width: 100%; display: flex; justify-content: center; align-items: center; } .PFQrScan { display: flex; flex-direction: row; align-items: center; height: 100%; position: relative; gap: calc(12px * var(--pf-modal-scale)); } .PFQrScanText { height: 42px; color: #212121; text-align: center; font-feature-settings: 'clig' off, 'liga' off; font-family: Roboto, sans-serif; font-size: 14px; font-style: normal; font-weight: 400; line-height: 143%; letter-spacing: 0.17px; } .PFQrActionsContainer.dark .PFQrScanText{ color: #fff; } .PFQrScanImage { width: calc(168px * var(--pf-modal-scale)); height: calc(168px * var(--pf-modal-scale)); border-radius: calc(11px * var(--pf-modal-scale)); overflow: hidden; } .PFQrTextContainer { display: flex; flex-direction: row; align-items: center; position: absolute; top: -10px; left: 27px; padding: 4px 12px; z-index: 111; text-align: center; justify-content: center; border-radius: 4px; } .PFQrText { color: var(--common-black); text-align: center; font-family: 'Inter', sans-serif; font-size: calc(10px * var(--pf-modal-scale)); font-style: normal; font-weight: 600; display: flex; text-align: center; justify-content: center; width: 136px; text-wrap: nowrap; line-height: calc(14px * var(--pf-modal-scale)); } .PFQrTextDark { color: var(--white); text-align: center; font-family: 'Inter', sans-serif; font-size: calc(10px * var(--pf-modal-scale)); font-style: normal; font-weight: 600; display: flex; text-align: center; justify-content: center; width: 136px; text-wrap: nowrap; line-height: calc(14px * var(--pf-modal-scale)); } .PFQrActionsTitleContainer { height: 42px; display: flex; justify-content: center; align-items: center; margin-bottom: 12px; } .PFQrActionsTitleContainerWithoutQr { all: unset; display: block; margin-bottom: 18px; } .PFQrActionsTitle { width: 100%; margin: 0; text-align: center; color: #212121; font-feature-settings: 'clig' off, 'liga' off; font-family: Roboto, sans-serif; font-size: 14px; font-style: normal; font-weight: 400; line-height: 143%; letter-spacing: 0.17px; } .PFQrActionsContainer.dark .PFQrActionsTitle{ color: #fff; } .PFModalDualCardItem { all: unset; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: calc(24px * var(--pf-modal-scale)); background-color: transparent; border-width: 0; box-sizing: border-box; padding-top: calc(16px * var(--pf-modal-scale)); padding-left: calc(16px * var(--pf-modal-scale)); padding-right: calc(16px * var(--pf-modal-scale)); } .PFModalAnimateIn { transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1) !important; transform: translate3d(0, 0, 0); } .PFModalAnimateIn.PFAnimated { transform: translate3d(0, 100%, 0); } .PFModalAnimateOut { transition: transform 0.27s cubic-bezier(0.175, 0.885, 0.32, 1) !important; transform: translate3d(0, 100%, 0); } .PFQrContainer { all: unset; display: flex; flex-direction: column; font-family: 'Inter', sans-serif; gap: calc(16px * var(--pf-modal-scale)); } .PFPhoneCallContainer { display: flex; flex-direction: row; gap: 75px; align-items: center; justify-content: center; padding: calc(12px * var(--pf-modal-scale)) calc(38px * var(--pf-modal-scale)) calc(12px * var(--pf-modal-scale)) calc(20px * var(--pf-modal-scale)); border-radius: calc(16px * var(--pf-modal-scale)); } .PFPhoneCallNumberContainer { width: 194px !important; height: 40px !important; border-radius: calc(8px * var(--pf-modal-scale)); display: flex; flex-direction: row; justify-content: center; align-items: center; } .PFPhoneCallNumberContent { font-size: calc(18px * var(--pf-modal-scale)); font-weight: calc(600 * var(--pf-modal-scale)); line-height: calc(28px * var(--pf-modal-scale)); color: var(--common-black); letter-spacing: 0.18px; } .PFPhoneCallNumberDescriptionContainer { font-size: calc(14px * var(--pf-modal-scale)); text-align: center; font-family: 'Inter', sans-serif; overflow-wrap: break-word; font-weight: 400; width: 190px; color: var(--common-darkWater); line-height: calc(20px * var(--pf-modal-scale)); } .PFTextWhite { color: var(--white); } .PFQrActionSingleChannel { position: relative; } .PFQrActionSingleChannel .PFBackgroundSvg { position: absolute; top: 0; left: 0; width: 300%; height: 300%; opacity: 1; pointer-events: none; z-index: 0; color: var(--single-channel-color); } .PFCloseButtonContainer { all: unset; position: absolute; right: 0; width: 41px; z-index: 1; height: 100%; display: flex; justify-content: flex-start; } `)()}customElements.get("pf-modal")||customElements.define("pf-modal",rr),customElements.get("pf-default")||customElements.define("pf-default",class extends rr{});const ir=(t,e,r,i)=>{let a,h;const c=i===p.Black;switch(r){case n:a=Mt` `,h="#00D95F";break;case s:a=Mt` `,h="#34AADF";break;case o:a=Mt` `,h="#655CAC";break;case l:a=Mt` `,h="linear-gradient(93deg, #19D1F5 1.05%, #5F3AEF 98.84%)"}return Mt`
${a}
${e}
`},ar=H` .PFMobileModalButtonContainer { display: flex; justify-content: center; align-items: center; gap: 8px; flex-direction: column; } .PFMobileModalButton { display: flex; justify-content: center; align-items: center; padding: 10px 15px; border-radius: 16px; svg { height: 50px; width: 50px; } } .PFMobileModalButtonText { text-align: center; font-family: "Inter", sans-serif; font-weight: 600; line-height: 20px; font-size: 14px; color: var(--common-black); } `;class nr extends Gt{parser=(()=>new DOMParser)();constructor(){super(),this.startY=0,this.currentY=0,this.dragThreshold=200,this.initialScrollTop=0,this.scrollY=0,this.handleOrientationChange=this.handleOrientationChange.bind(this)}afterTransition(t){t.target.classList.contains("PFHidden")&&(t.target.style.display="none")}preventBodyScroll(){this.scrollY=window.scrollY,document.body.classList.add("pf-modal-open"),document.body.style.position="fixed",document.body.style.top=`-${this.scrollY}px`,document.body.style.overflow="hidden",document.body.style.width="100%"}restoreBodyScroll(){document.body.classList.remove("pf-modal-open"),document.body.style.position="",document.body.style.top="",document.body.style.overflow="",document.body.style.width="",window.scrollTo(0,this.scrollY)}handleOrientationChange(){setTimeout((()=>{this._isOpen&&this.requestUpdate()}),100)}handleOverlayClick(t){t.target===this.shadowRoot.getElementById("PFModalOverlay")&&this.close()}handleOverlayTouchMove(t){const e=t.target,r=this.shadowRoot.querySelector(".PFModalBody");r&&r.contains(e)&&e!==r||t.cancelable&&t.preventDefault()}handleTouchStart(t){this.startY=t.touches[0].clientY,this.currentY=this.startY;const e=this.shadowRoot.querySelector(".PFModalBody");this.initialScrollTop=e?e.scrollTop:0;const r=this.shadowRoot.querySelector(".PFModalAnimatedContainer");r&&(r.style.transition="none")}handleTouchMove(t){this.currentY=t.touches[0].clientY;const e=this.currentY-this.startY;if(e>0){const r=t.target,i=this.shadowRoot.querySelector(".PFModalBody");if(this.initialScrollTop>0)return;if(i&&i.contains(r)&&r!==i){const t=i.scrollTop;if(i.scrollHeight>i.clientHeight&&t>0)return}t.cancelable&&t.preventDefault();const a=this.shadowRoot.querySelector(".PFModalAnimatedContainer");a&&(a.style.transform=`translateY(${e}px)`)}}handleTouchEnd(t){const e=this.currentY-this.startY,r=this.shadowRoot.querySelector(".PFModalAnimatedContainer");r&&(r.style.transition="0.6s cubic-bezier(0.175, 0.885, 0.32, 1) all",e>this.dragThreshold&&0===this.initialScrollTop?this.close():r.style.transform="translateY(0)")}open(t){this._isOpen=!0,this.actionBody=t,this.startY=0,this.currentY=0,this.initialScrollTop=0,this.preventBodyScroll();const e=this.shadowRoot.getElementById("PFModalOverlay"),r=this.shadowRoot.querySelector(".PFModalAnimatedContainer");clearTimeout(this.timerIdForAnimation),r&&(r.style.transform="",r.style.transition=""),e.addEventListener("transitionend",this.afterTransition,!0),e.addEventListener("webkitTransitionEnd",this.afterTransition,!0),e.addEventListener("click",this.handleOverlayClick.bind(this)),e.addEventListener("touchmove",this.handleOverlayTouchMove.bind(this),{passive:!1}),window.addEventListener("orientationchange",this.handleOrientationChange),window.addEventListener("resize",this.handleOrientationChange),r.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!0}),r.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!1}),r.addEventListener("touchend",this.handleTouchEnd.bind(this),{passive:!0}),e.classList.remove("PFHidden"),e.style.display="flex",this.timerIdForAnimation=setTimeout((()=>{e.style.opacity=1,r&&r.classList.add("PFModalAnimateIn");const t=this.shadowRoot.querySelector(".PFModalBody");t&&(t.scrollTop=0)}),100)}close(){this._isOpen=!1,this.integrationsService.fireEvent("WP_modal_close"),this.dispatchEvent(new CustomEvent("close")),this.startY=0,this.currentY=0,this.initialScrollTop=0,this.restoreBodyScroll();const t=this.shadowRoot.getElementById("PFModalOverlay"),e=this.shadowRoot.querySelector(".PFModalAnimatedContainer");t.removeEventListener("click",this.handleOverlayClick.bind(this)),t.removeEventListener("touchmove",this.handleOverlayTouchMove.bind(this)),window.removeEventListener("orientationchange",this.handleOrientationChange),window.removeEventListener("resize",this.handleOrientationChange),e&&(e.removeEventListener("touchstart",this.handleTouchStart.bind(this)),e.removeEventListener("touchmove",this.handleTouchMove.bind(this)),e.removeEventListener("touchend",this.handleTouchEnd.bind(this)),e.classList.remove("PFModalAnimateIn")),t.classList.add("PFHidden"),this.timerIdForAnimation=setTimeout((()=>{t.style.opacity=0}),100)}telegramClick(){const t=I(this.widget);qe(this.widget,t,this.wazzupId,this.hid,this.integrationsService)}whatsappClick(){const t=I(this.widget);We(this.widget,t,this.wazzupId,this.hid,this.integrationsService)}viberClick(){I(this.widget);Ue(this.widget,0,this.wazzupId,this.hid,this.integrationsService)}maxClick(){I(this.widget);Ye(this.widget,0,this.wazzupId,this.hid,this.integrationsService)}phoneCallClick(){window.location.href=`tel:${this.widget.phoneCallNumber}`}openLink(){Qe(this.widget.dataProcessingConsent.link)}handleBrandingClick(){Ke(this.widget.id,this.wazzupId,this.hid)}handleDataProcessingConsentChange(t){this.widget={...this.widget,dataProcessingConsent:{...this.widget.dataProcessingConsent,defaultEnabled:t.target.checked}},this.requestUpdate()}handleMarketingConsentChange(t){this.widget={...this.widget,marketingConsent:{...this.widget.marketingConsent,defaultEnabled:t.target.checked}},this.requestUpdate()}consentSection(){const{widgetSettings:t,dataProcessingConsent:e,marketingConsent:r}=this.widget,i=e.link&&e.active&&e.link.length>0,a=r.active,n=t.background?.theme?.layoutColor,s=t.background?.theme.name===p.Grass;return Mt`
${Wt(i,(()=>Mt`
${tr(e.defaultEnabled,this.handleDataProcessingConsentChange)} Я прочитал(а) и согласен(а)
с Политикой обработки данных
`),(()=>Pt))} ${Wt(a,(()=>Mt`
${tr(r.defaultEnabled,this.handleMarketingConsentChange)}
Я согласен(а) на инфо- и рекламные
сообщения
`))}
`}buttonsSection(){const t=I(this.widget),e=this.widget.dataProcessingConsent,r=this.widget.marketingConsent,i=e.link&&e.active&&e.link.length>0,h=r.active,c=this.widget.widgetSettings.background.theme.name,d=i&&!e.defaultEnabled,f=ir(this.whatsappClick,C,n,c),y=ir(this.telegramClick,u,s,c),v=ir(this.viberClick,m,o,c),b=ir(this.maxClick,g,l,c),x=(ie(t,this.whatsappClick,this.telegramClick,this.viberClick,this.maxClick),re(f,y,v,b,0,t)),M=t.includes("-and-")?t.split("-and-"):[t],w=a.every((t=>M.includes(t))),P=function(t,e,r,i){let a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const n=i?.background?.theme?.name===p.Black;return Mt`
${r}
${e}
`}(this.phoneCallClick,this.widget.phoneCallNumber,this.widget.phoneCallMessage,this.widget.widgetSettings,d);return Mt`
${x}
${this.widget.phoneCallNumber?P:""} ${Wt(h||i,(()=>Mt` ${this.consentSection()} `),(()=>Pt))}
`}cFooter(){const{widgetSettings:t}=this.widget,e=t.background.theme.name===p.Black?"var(--white)":"var(--common-black)";return Mt` `}logoFileSection(){const{widgetSettings:{logoEnabled:t},logoImage:e,phoneCallNumber:r}=this.widget;return t?Mt` `:""}defaultLogo(){const t=d(navigator.language||navigator.userLanguage);return Mt` `}backgroundImageSection(){const{widgetSettings:{backgroundImageEnabled:t},backgroundImage:e}=this.widget;return t?Mt`
`:""}textContent(t,e){const{header:r,text:i}=e.textSettings,a=this.parser.parseFromString(r,"text/html").body.textContent?.trim()||"",n=this.parser.parseFromString(i,"text/html").body.textContent?.trim()||"";if(!a&&!n)return Pt;const s=Be({PFModalHeaderTitle:t,PFModalHeaderTitleDark:!t}),o=Be({PFModalHeaderText:t,PFModalHeaderTextDark:!t});return Mt`
${a?Mt`
${a}
`:Pt} ${n?Mt`
${n}
`:Pt}
`}render(){const{logoImage:t,widgetSettings:e,backgroundImage:r}=this.widget,i=e.background.theme.name===p.Black,a=e.hideBranding;return Mt`
${Wt(r&&e.backgroundImageEnabled,(()=>this.backgroundImageSection()),(()=>Pt))}
${Wt(t&&e.logoEnabled,(()=>this.logoFileSection()),(()=>Wt(!t&&e.logoEnabled,(()=>this.defaultLogo()),(()=>Pt))))} ${this.textContent(i,e)}
${this.buttonsSection()} ${Wt(!a,(()=>this.cFooter()),(()=>Pt))}
`}static styles=(()=>H` ${Ze} ${Re} ${$e} ${ar} .PFModalOverlay { --pf-modal-scale: 1; --additional-pale-blue: #CEEAFF; --additional-pale-purple: #EEE5FF; --additional-pale-green: #DDF8DF; --additional-pale-orange: #FBE6DD; --additional-pale-pink: #F7DEEC; --common-black: #2b3238; --common-rain: #D0DBE4; --common-fog: #F1F5F9; --white: #FFFFFF; --primary: #212121; --common-dark: #1B1B1B; all: unset; position: fixed; left: 0; box-sizing: border-box; z-index: 21474836472; top: 0; bottom: 0; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: flex-end; background-color: rgba(0, 0, 0, 0.23); opacity: 0; transition: 0.6s cubic-bezier(0.175, 0.885, 0.32, 1) opacity !important; display: none; } .PFModal { all: unset; position: relative; display: flex; justify-content: center; max-height: 80vh; width: inherit; flex-direction: column; overflow-y: scroll; } /* Адаптация для портретной ориентации */ @media screen and (orientation: portrait) { .PFModal { max-height: 85vh; } } @media screen and (orientation: landscape) { .PFModal { max-height: 70vh; } .PFModalBackground { height: 230px !important; } } .PFModalAnimatedContainer { opacity: 0; transform: translateY(100%); width: 100%; transition: 0.6s cubic-bezier(0.175, 0.885, 0.32, 1) all; touch-action: pan-y; user-select: none; } .PFModalAnimatedContainer.PFModalAnimateIn { opacity: 1; transform: translateY(0); } .PFModalButtonClose { --s: calc(36px * var(--pf-modal-scale)); all: unset; position: absolute; z-index: 2; display: flex; top: 20px; right: 20px; align-items: center; justify-content: center; width: var(--s); height: var(--s); border-radius: 50%; cursor: pointer; } .PFModalButtonCloseIcon { --s: calc(20px * var(--pf-modal-scale)); width: var(--s); height: var(--s); padding: calc(8px * var(--pf-modal-scale)); border-radius: 100px; } .PFModalBody { all: unset; width: 100%; z-index: 9999; margin: 0px auto; display: flex; flex-direction: column; align-items: center; overflow-y: scroll; scrollbar-width: none; -ms-overflow-style: none; border-radius: 16px 16px 0 0; position: relative; } .PFModalBody::-webkit-scrollbar { display: none; } .PFModalContent { position: relative; z-index: 2; border-radius: 16px 16px 0 0; width: 100%; display: flex; flex-direction: column; align-items: center; } .PFModalContent:has(:not(.PFModalHeaderTextContent)) .PFButtons { margin-top: 24px; } .PFModalFooter { all: unset; align-self: stretch; padding: 24px 0px 32px 0px; width: 100%; margin: 0px auto; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; z-index: 2; & svg { width: calc(90px * var(--pf-modal-scale)); height: calc(16px * var(--pf-modal-scale)); } } .PFModalFooter a { color: inherit; cursor: pointer; text-decoration: none; display: flex; flex-direction: row; gap: 4px; justify-content: center; align-items: center; & span { color: var(--common-black); text-align: center; font-family: 'Inter', sans-serif; font-size: 12px; font-style: normal; font-weight: 400; line-height: 16px; } } .PFModalHeader { all: unset; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; padding-top: 32px; width: 100%; z-index: 2; gap: 16px; } .PFModalSiteContainer { display: flex; left: 50%; justify-content: center; align-items: center; border-radius: 32px; margin-bottom: 40px; margin-top: 40px; } .PFModalHeaderLogo { all: unset; box-sizing: border-box; display: flex; height: calc(50px * var(--pf-modal-scale)); width: calc(100px * var(--pf-modal-scale)); min-height: 56px; overflow: hidden; align-items: center; justify-content: center; padding: 3px; position: relative; z-index: 2; } .PFModalHeaderLogoImage { all: unset; object-fit: cover; width: 100%; height: 100%; } .PFModalHeaderLogoImageDefault { display: flex; height: 100%; padding: 0px 14px; justify-content: center; align-items: center; border-radius: 8px; border: 1px dashed var(--common-rain); background: white; color: var(--common-dark); text-align: center; font-family: 'Inter', sans-serif; font-size: 12px; font-style: normal; font-weight: 600; line-height: 16px; min-width: 100px; } .PFModalHeaderTitle { text-align: center; word-wrap: anywhere !important; white-space: pre-line; font-family: 'Inter', sans-serif; font-size: calc(22px * var(--pf-modal-scale)); font-style: normal; font-weight: 600; width: 100%; max-width: 80vw; box-sizing: border-box; line-height: 28px; letter-spacing: -0.18px; color: var(--white); } .PFModalHeaderTitleDark { text-align: center; word-wrap: anywhere !important; font-family: 'Inter', sans-serif; font-size: calc(22px * var(--pf-modal-scale)); font-style: normal; width: 100%; max-width: 80vw; font-weight: 600; line-height: 32px; box-sizing: border-box; letter-spacing: -0.18px; color: var(--common-black); } .PFModalHeaderTextContent { display: flex; width: 100%; max-width: 80vw; flex-direction: column; gap: calc(12px * var(--pf-modal-scale)); align-items: center; padding-top: 4px; margin-bottom: 24px; border-radius: 16px 16px 0 0; box-sizing: border-box; } /* Адаптация для маленьких экранов */ @media screen and (max-width: 480px) { .PFModalHeaderTextContent { max-width: 95vw; margin-bottom: 16px; } } .PFModalHeaderText { display: flex; flex-wrap: wrap; color: var(--primary); word-wrap: anywhere !important; text-align: center; font-family: 'Inter', sans-serif; font-size: calc(16px * var(--pf-modal-scale)); font-style: normal; font-weight: 400; justify-content: center; width: 100%; max-width: 80vw; box-sizing: border-box; line-height: calc(20px * var(--pf-modal-scale)); color: var(--white); } .PFModalHeaderTextDark { display: flex; flex-wrap: wrap; word-wrap: anywhere !important; text-align: center; font-family: 'Inter', sans-serif; font-size: calc(16px * var(--pf-modal-scale)); font-style: normal; font-weight: 400; justify-content: center; width: 100%; max-width: 80vw; line-height: calc(24px * var(--pf-modal-scale)); color: var(--common-black); } .PFModalAnimateIn { transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1) !important; transform: translate3d(0, 0, 0); } .PFModalAnimateIn.PFAnimated { transform: translate3d(0, 100%, 0); } .PFModalAnimateOut { transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1) !important; transform: translate3d(0, 100%, 0); } .PFButtonsContainer { display: flex; flex-direction: row; gap: 20px; width: 100%; min-width: 280px; max-width: 80vw; align-items: center; flex-wrap: wrap; padding: 16px 24px; height: auto; box-sizing: border-box; } /* Адаптация для маленьких экранов */ @media screen and (max-width: 480px) { .PFButtonsContainer { min-width: 260px; gap: 16px; padding: 12px 16px; } } .PFButtons { padding: 0px; position: relative; z-index: 2; border-radius: 0 0 16px 16px; margin-bottom: 16px; } .PFHasAllChannels { padding: 16px 24px; gap: 16px 24px; } .PFPhoneCallSection { margin-top: 12px; } .PFMobileConsentContainer { margin-top: 12px; width: 100%; max-width: 90vw; box-sizing: border-box; } /* Адаптация для маленьких экранов */ @media screen and (max-width: 480px) { .PFMobileConsentContainer { max-width: 95vw; margin-top: 8px; } } .PFModalBackground { position: sticky; top: 0; width: 100%; height: 180px; box-sizing: border-box; z-index: 1; } .PFModalBackgroundImage { all: unset; object-fit: cover; width: 100%; height: 100%; overflow: hidden; } `)()}customElements.get("pf-modal-mobile")||customElements.define("pf-modal-mobile",nr);var sr=__webpack_require__(891),or=__webpack_require__.n(sr);class lr extends Gt{static properties=(()=>({animationData:{type:Object},loop:{type:Boolean},autoplay:{type:Boolean},width:{type:Number},height:{type:Number}}))();constructor(){super(),this.loop=!0,this.autoplay=!0,this.width=64,this.height=64,this.animationInstance=null}firstUpdated(){this.loadAnimation()}updated(t){t.has("animationData")&&this.animationData&&this.loadAnimation()}loadAnimation(){if(this.animationData)try{this.animationInstance&&this.animationInstance.destroy();const t=this.shadowRoot.querySelector(".lottie-container");if(!t)return;this.animationInstance=or().loadAnimation({container:t,renderer:"svg",loop:this.loop,autoplay:this.autoplay,animationData:this.animationData})}catch(t){return void console.error("Fail to load animation for widget",t)}}disconnectedCallback(){super.disconnectedCallback(),this.animationInstance&&this.animationInstance.destroy()}static styles=(()=>H` .lottie-container { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; } `)();render(){return Mt`
`}}function hr(t){if(!t)return null;const e=t.split("-and-");return`${e.length}/${e.join("-")}`}customElements.define("lottie-animation",lr);const pr=new Map;pr.set("default","pf-default"),pr.set("message","pf-message"),pr.set("chat","pf-chat"),pr.set("modal","pf-modal"),pr.set("mobile","pf-modal-mobile");class cr extends Gt{static properties=(()=>({widget:{type:Object},wazzupId:{type:String},hid:{type:String},integrationsService:{type:Object},tariff:{type:Object},anyActionPassed$:{type:Object},modalStateChange$:{type:Object},tests:{type:Object}}))();constructor(){super()}getBodyForDefaultModal(){const{widgetSettings:t}=this.widget,e=this.widget.whatsappGreetingMessage;return{redirect:I(this.widget),backgroundPosition:"left",text:t.textSettings.header,whatsappButtonText:t.whatsappBtn,telegramButtonText:t.telegramBtn,viberButtonText:t.viberBtn,background:t.background.theme.color,hideBranding:t.hideBranding,whatsappGreetingMessage:e,backgroundImage:this.widget.backgroundImage,logoImage:this.widget.logoImage,whatsappEnabled:this.widget.whatsappEnabled,telegramEnabled:this.widget.telegramEnabled,viberEnabled:this.widget.viberEnabled,maxEnabled:this.widget.maxEnabled,phoneCallNumber:this.widget.phoneCallNumber}}open(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pf-default",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const i=this.shadowRoot.querySelector(t),a=e||this.getBodyForDefaultModal();i&&(i.open(a),r&&this.integrationsService.fireEvent("WP_click_widget"))}closeModal(){this.shadowRoot.querySelector("pf-default").close()}menuClick(){const t=this.getBodyForDefaultModal(),e=V(I(this.widget),ae(this.tariff));if(e)switch(e){case n:We(this.widget,t,this.wazzupId,this.hid,this.integrationsService,e);break;case s:qe(this.widget,t,this.wazzupId,this.hid,this.integrationsService,e);break;case o:Ue(this.widget,0,this.wazzupId,this.hid,this.integrationsService,e);break;case l:Ye(this.widget,0,this.wazzupId,this.hid,this.integrationsService,e)}else se(this.widget.id,{name:"click",wazzupId:this.wazzupId,hid:this.hid}),this.open()}menuClickMobile(){const t=this.getBodyForDefaultModal(),e=V(I(this.widget),ae(this.tariff));if(e)switch(e){case n:We(this.widget,t,this.wazzupId,this.hid,this.integrationsService,e);break;case s:qe(this.widget,t,this.wazzupId,this.hid,this.integrationsService,e);break;case o:Ue(this.widget,0,this.wazzupId,this.hid,this.integrationsService,e);break;case l:Ye(this.widget,0,this.wazzupId,this.hid,this.integrationsService,e)}else se(this.widget.id,{name:"click",wazzupId:this.wazzupId,hid:this.hid}),this.open("pf-modal-mobile")}telegramClick(){const t=this.getBodyForDefaultModal();qe(this.widget,t,this.wazzupId,this.hid,this.integrationsService)}whatsappClick(){const t=this.getBodyForDefaultModal();We(this.widget,t,this.wazzupId,this.hid,this.integrationsService)}viberClick(){this.getBodyForDefaultModal();Ue(this.widget,0,this.wazzupId,this.hid,this.integrationsService)}maxClick(){this.getBodyForDefaultModal();Ye(this.widget,0,this.wazzupId,this.hid,this.integrationsService)}convertDataProfeatToHref(t){t.forEach((t=>{t.hasAttribute("href")&&(t.setAttribute("data-profeat",t.getAttribute("href")),t.removeAttribute("href"))}))}initMagicUrlListener(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const a=r.length?r:document.querySelectorAll("[data-profeat], [href]"),n=Array.from(a).filter((r=>{const a=r.getAttribute("data-profeat"),n=r.getAttribute("href"),s=a&&a?.includes(t)||n&&n?.includes(t),o=a&&a?.includes(e)||n&&n?.includes(e);return!(!s&&!o||null===s&&null===o)&&i.some((t=>{const e=n?.includes(t),r=a?.includes(t);return r||e}))}));this.convertDataProfeatToHref(n),n.forEach((t=>{const e=t.getAttribute("data-profeat"),r=t.getAttribute("href")||e;r&&null!==r&&t.addEventListener("click",(t=>{this.onMagicUrlElementClick(t,this,r)}))}))}onMagicUrlElementClick(t,e,r){t.preventDefault(),t.stopPropagation();const i=r?.split("#")[1],a=e.widget,n=a.whatsappEnabled,s=a.telegramEnabled,o=a.viberEnabled,l=a.maxEnabled,h=a.phoneCallNumber&&a.phoneCallNumber.length>0,p=ae(this.tariff);this.handleMessengerClickForMyButton(i,p,a,e,n,s,o,l,h)}handleMessengerClickForMyButton(t,e,r,i,a,p,c,d,f){const C=[{name:n,ready:a},{name:s,ready:p},{name:o,ready:c},{name:l,ready:d},{name:h,ready:f}].filter((t=>t.ready)),u=Yt()?"pf-modal-mobile":"pf-default";switch(t){case"open":return 0===C.length?void 0:1===C.length?this.handleMessengerClickForMyButton(C[0].name,e,r,i,a,p,c,d):i.open(u,{...r});case"whatsapp":if(!a)break;return e?i.open(u):i.whatsappClick();case"telegram":if(!p)break;return e?i.open(u):i.telegramClick();case"viber":if(!c)break;return e?i.open(u):i.viberClick();case"max":if(!d)break;return e?i.open(u):i.maxClick()}}setWidgetVisibility(t){const e=this.shadowRoot.getElementById("PWPreviewWidgetButtonWrapper");e&&(t?e.classList.add("PWPreviewWidgetButtonWrapperVisible"):e.classList.remove("PWPreviewWidgetButtonWrapperVisible"))}connectedCallback(){super.connectedCallback(),this.initMagicUrlListener();const t=this.widget.hidden;t&&document.addEventListener("hideWidgetComponent",(()=>{this.setWidgetVisibility(!1)})),setTimeout((()=>{t||this.setWidgetVisibility(!0),this.anyActionPassed$.subscribe((t=>{t&&(Yt()?this.open("pf-modal-mobile"):this.open())})),this.modalStateChange$.subscribe((t=>{t?this.open("pf-default"):(this._isOpen=!1,this.closeModal())}))}),0)}getTransformWidget(){const{offset:t}=this.widget.widgetSettings;let e=Yt()?16:32,r=Yt()?24:32;return e=`calc(100% - ${e}px - 64px)`,r=`${r}px`,Yt()&&t.bottomOffsetEnable&&(r=`${24+t.bottomOffset}px`),{left:e,bottom:r}}cModalSlot(){return Mt` `}async lottieMessengerButton(){const t=function(t){const e=B(t.whatsappEnabled,t.telegramEnabled,t.viberEnabled,t.maxEnabled);return t.phoneCallNumber?e?`${e}-and-${h}`:null:e}(this.getBodyForDefaultModal());if(!function(t){return!!hr(t)}(t))return;const e=await async function(t){const e=hr(t);if(!e)return console.warn(`Animation not found for redirect: ${t}`),null;try{return(await __webpack_require__(90)(`./${e}.json`)).default}catch(e){return console.error(`Failed to load animation for redirect: ${t}`,e),null}}(t);return e?Mt` `:void 0}render(){const t=I(this.widget);let e=null;e=Yt()?"mobile":"menu",this.watchChangeContentAndAddMyButtonHandler();const r={whatsapp:this.whatsappClick,telegram:this.telegramClick,menu:this.menuClick,mobile:this.menuClickMobile},i=this.getTransformWidget(),a=r[e];if(t&&t!==h)return Mt` ${this.cModalSlot()} ${Mt`
${Le(this.lottieMessengerButton())}
`} `}watchChangeContentAndAddMyButtonHandler(){let t=[];const e=function(t,e){let r;return function(){if(!r){for(var i=arguments.length,a=new Array(i),n=0;nr=!1),e)}}}((()=>{t.length&&(this.initMagicUrlListener(t),t=[])}),500);new MutationObserver((r=>{r.forEach((e=>{let{addedNodes:r}=e;r.forEach((e=>{e.nodeType===Node.ELEMENT_NODE&&(e.matches?.("[href], [data-profeat]")&&t.push(e),e.querySelectorAll?.("[href], [data-profeat]")?.forEach((e=>{t.push(e)})))}))})),e()})).observe(document.body,{childList:!0,subtree:!0})}static styles=(()=>H` .PWPreviewWidgetButtonWrapper { all: unset; position: fixed; display: none; aspect-ratio: 1 / 1; z-index: 2147483646; } .PWPreviewWidgetButtonWrapperVisible { display: flex; } .PWPreviewWidgetButton { all: unset; position: absolute; z-index: 3; width: 100%; border-radius: 50%; aspect-ratio: 1 / 1; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.5), opacity 0.3s cubic-bezier(0.175, 0.885, 0.32, 1) !important; transform: scale(1); color: white; user-select: none; -webkit-tap-highlight-color: rgba(255, 255, 255, 0); -webkit-tap-highlight-color: transparent; } .PWPreviewWidgetButton:focus, .PWPreviewWidgetButton:active { outline: none; } .PWPreviewWidgetButtonIsHidden { opacity: 0 !important; } .PWPreviewWidgetButton:hover { transform: scale(1.15); } .PWPreviewWidgetButton:active { transform: scale(1.2); } lottie-animation { all: unset; display: block; max-width: 100%; aspect-ratio: 1 / 1; border-radius: 50%; overflow: hidden; } `)()}customElements.get("pf-widget")||customElements.define("pf-widget",cr);class dr{integrations=[];constructor(t){this.integrations=t}insertIntegrations(){const t={ym:this.#t,ga:this.#e,callTouch:()=>{},coMagic:()=>{},uis:()=>{},callTracking:()=>{}};for(const e of this.integrations){const r=t[e?.type];r?r(e):console.error(`integrationMapItem is undefined for integration.type: ${e?.type}`)}}#e(t){if(!window.gtag){const e=document.createElement("script");function r(){dataLayer.push(arguments)}e.src=`https://www.googletagmanager.com/gtag/js?id=${t.ga.counter}`,e.async=!0,document.head.appendChild(e),window.dataLayer=window.dataLayer||[],r("js",new Date),window.gtag=r,window.gtag("config",t.ga.counter)}}#t(t){!function(t,e,r,i,a,n,s){t[a]=t[a]||function(){(t[a].a=t[a].a||[]).push(arguments)},t[a].l=1*new Date;for(var o=0;o{switch(r.type){case"ym":if(r.ym.isApi)t.includes("WP_dialog")||window.ym(r.ym.counter,"reachGoal",t);else{let i=!1;try{window.ym(r.ym.counter,"reachGoal",t)}catch(t){i=!0}t.includes("WP_dialog")&&e&&await pe({settingsId:e?.settingsId,wazzupId:e?.wazzupId,error:i,type:e?.transport,metric:"yandex"})}break;case"ga":if(r.ga.isApi)t.includes("WP_dialog")||window.gtag("event",t,{send_to:r.ga.counter});else{let i=!1;try{window.gtag("event",t,{send_to:r.ga.counter})}catch(t){i=!0}t.includes("WP_dialog")&&e&&await pe({settingsId:e?.settingsId,wazzupId:e?.wazzupId,error:i,type:e?.transport,metric:"google"})}break;case"uis":case"coMagic":window.Comagic&&window.Comagic.trackEvent("profeat",t)}}))}async handleDialogEvents(t){for(const e of t)[c.telegram,c.tgApi].includes(e.transport)?await this.fireEvent("WP_dialog_telegram",e):await this.fireEvent("WP_dialog_whatsapp",e)}}var fr=function(t,e){return fr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},fr(t,e)};function Cr(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}fr(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function ur(t,e,r,i){return new(r||(r=Promise))((function(a,n){function s(t){try{l(i.next(t))}catch(t){n(t)}}function o(t){try{l(i.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?a(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,o)}l((i=i.apply(t,e||[])).next())}))}function mr(t,e){var r,i,a,n={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=o(0),s.throw=o(1),s.return=o(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(o){return function(l){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,o[0]&&(n=0)),n;)try{if(r=1,i&&(a=2&o[0]?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(!(a=n.trys,(a=a.length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){n=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function yr(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var i,a,n=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(t){a={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s}function vr(t,e,r){if(r||2===arguments.length)for(var i,a=0,n=e.length;a1||o(t,e)}))},e&&(i[t]=e(i[t])))}function o(t,e){try{!function(t){t.value instanceof br?Promise.resolve(t.value.v).then(l,h):p(n[0][2],t)}(a[t](e))}catch(t){p(n[0][3],t)}}function l(t){o("next",t)}function h(t){o("throw",t)}function p(t,e){t(e),n.shift(),n.length&&o(n[0][0],n[0][1])}}function Mr(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=gr(t),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(r){e[r]=t[r]&&function(e){return new Promise((function(i,a){(function(t,e,r,i){Promise.resolve(i).then((function(e){t({value:e,done:r})}),e)})(i,a,(e=t[r](e)).done,e.value)}))}}}Object.create;"function"==typeof SuppressedError&&SuppressedError;function wr(t){return"function"==typeof t}function Pr(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var _r=Pr((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function Er(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var Sr=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}var e;return t.prototype.unsubscribe=function(){var t,e,r,i,a;if(!this.closed){this.closed=!0;var n=this._parentage;if(n)if(this._parentage=null,Array.isArray(n))try{for(var s=gr(n),o=s.next();!o.done;o=s.next()){o.value.remove(this)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else n.remove(this);var l=this.initialTeardown;if(wr(l))try{l()}catch(t){a=t instanceof _r?t.errors:[t]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var p=gr(h),c=p.next();!c.done;c=p.next()){var d=c.value;try{Ar(d)}catch(t){a=null!=a?a:[],t instanceof _r?a=vr(vr([],yr(a)),yr(t.errors)):a.push(t)}}}catch(t){r={error:t}}finally{try{c&&!c.done&&(i=p.return)&&i.call(p)}finally{if(r)throw r.error}}}if(a)throw new _r(a)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)Ar(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Er(e,t)},t.prototype.remove=function(e){var r=this._finalizers;r&&Er(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),kr=Sr.EMPTY;function Fr(t){return t instanceof Sr||t&&"closed"in t&&wr(t.remove)&&wr(t.add)&&wr(t.unsubscribe)}function Ar(t){wr(t)?t():t.unsubscribe()}var Lr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Tr={setTimeout:function(t,e){for(var r=[],i=2;iLi(t.active).pipe(Ti((e=>e?zi(1e3*t.value).pipe(wi((()=>!0)),Gi(!1)):Li(!0)))),scroll:t=>Li(t.active).pipe(Ti((e=>{return e?Ui(window,"scroll").pipe(wi((()=>window.scrollY/(document.documentElement.scrollHeight-window.innerHeight)*100)),(r=e=>ee>=t.value)),wi((()=>!0)),Gi(0)):Li(!0);var r,i}))),device:t=>{if(!t.mobile&&!t.desktop)return Li(!1);return Li(t[Jt()])},leftSite:t=>Li(t).pipe(Ti((t=>t?Ui(document,"mouseout").pipe(wi((t=>{const e=t.clientY<=0,r="pf_widget_leave_modal";return!window.sessionStorage.getItem(r)&&(e&&setTimeout((()=>{window.sessionStorage.setItem(r,!0)}),250),e)})),Qi((t=>t)),wi((()=>!0)),Gi(!1)):Li(!1))))},Xi=t=>(t=>{const e=Object.entries(t);let r=!1;const i=e[3][1].active,a=e[1][1].active;return i||a||(r=!0),Fi(e.map((t=>{let[e,r]=t;return(0,Ji[e])(r)})).filter(Boolean)).pipe(wi((e=>{const i=Object.keys(t).indexOf("leftSite"),a=e[i],n=e.filter(((t,e)=>e!==i)).every(Boolean);return r?n&&a:n||!0===a})))})(t);var Ki=Pr((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),ta=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return Cr(e,t),e.prototype.lift=function(t){var e=new ea(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new Ki},e.prototype.next=function(t){var e=this;Rr((function(){var r,i;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var a=gr(e.currentObservers),n=a.next();!n.done;n=a.next()){n.value.next(t)}}catch(t){r={error:t}}finally{try{n&&!n.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}}}))},e.prototype.error=function(t){var e=this;Rr((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var r=e.observers;r.length;)r.shift().error(t)}}))},e.prototype.complete=function(){var t=this;Rr((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,r=this,i=r.hasError,a=r.isStopped,n=r.observers;return i||a?kr:(this.currentObservers=null,n.push(t),new Sr((function(){e.currentObservers=null,Er(n,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,r=e.hasError,i=e.thrownError,a=e.isStopped;r?t.error(i):a&&t.complete()},e.prototype.asObservable=function(){var t=new Qr;return t.source=this,t},e.create=function(t,e){return new ea(t,e)},e}(Qr),ea=function(t){function e(e,r){var i=t.call(this)||this;return i.destination=e,i.source=r,i}return Cr(e,t),e.prototype.next=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===r||r.call(e,t)},e.prototype.error=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===r||r.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,r;return null!==(r=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==r?r:kr},e}(ta),ra=function(t){function e(e){var r=t.call(this)||this;return r._value=e,r}return Cr(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(e){var r=t.prototype._subscribe.call(this,e);return!r.closed&&e.next(this._value),r},e.prototype.getValue=function(){var t=this,e=t.hasError,r=t.thrownError,i=t._value;if(e)throw r;return this._throwIfClosed(),i},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(ta);function ia(){return document.getElementById("kSELUFVYyGJm")?(localStorage.removeItem("hasAdblock"),!1):(localStorage.setItem("hasAdblock",!0),!0)}const aa="0123456789abcdef";class na{constructor(t){this.bytes=t}static ofInner(t){if(16!==t.length)throw new TypeError("not 128-bit length");return new na(t)}static fromFieldsV7(t,e,r,i){if(!Number.isInteger(t)||!Number.isInteger(e)||!Number.isInteger(r)||!Number.isInteger(i)||t<0||e<0||r<0||i<0||t>0xffffffffffff||e>4095||r>1073741823||i>4294967295)throw new RangeError("invalid field value");const a=new Uint8Array(16);return a[0]=t/2**40,a[1]=t/2**32,a[2]=t/2**24,a[3]=t/65536,a[4]=t/256,a[5]=t,a[6]=112|e>>>8,a[7]=e,a[8]=128|r>>>24,a[9]=r>>>16,a[10]=r>>>8,a[11]=r,a[12]=i>>>24,a[13]=i>>>16,a[14]=i>>>8,a[15]=i,new na(a)}static parse(t){var e,r,i,a;let n;switch(t.length){case 32:n=null===(e=/^[0-9a-f]{32}$/i.exec(t))||void 0===e?void 0:e[0];break;case 36:n=null===(r=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(t))||void 0===r?void 0:r.slice(1,6).join("");break;case 38:n=null===(i=/^\{([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})\}$/i.exec(t))||void 0===i?void 0:i.slice(1,6).join("");break;case 45:n=null===(a=/^urn:uuid:([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(t))||void 0===a?void 0:a.slice(1,6).join("")}if(n){const t=new Uint8Array(16);for(let e=0;e<16;e+=4){const r=parseInt(n.substring(2*e,2*e+8),16);t[e+0]=r>>>24,t[e+1]=r>>>16,t[e+2]=r>>>8,t[e+3]=r}return new na(t)}throw new SyntaxError("could not parse UUID string")}toString(){let t="";for(let e=0;e>>4),t+=aa.charAt(15&this.bytes[e]),3!==e&&5!==e&&7!==e&&9!==e||(t+="-");return t}toHex(){let t="";for(let e=0;e>>4),t+=aa.charAt(15&this.bytes[e]);return t}toJSON(){return this.toString()}getVariant(){const t=this.bytes[8]>>>4;if(t<0)throw new Error("unreachable");if(t<=7)return this.bytes.every((t=>0===t))?"NIL":"VAR_0";if(t<=11)return"VAR_10";if(t<=13)return"VAR_110";if(t<=15)return this.bytes.every((t=>255===t))?"MAX":"VAR_RESERVED";throw new Error("unreachable")}getVersion(){return"VAR_10"===this.getVariant()?this.bytes[6]>>>4:void 0}clone(){return new na(this.bytes.slice(0))}equals(t){return 0===this.compareTo(t)}compareTo(t){for(let e=0;e<16;e++){const r=this.bytes[e]-t.bytes[e];if(0!==r)return Math.sign(r)}return 0}}class sa{constructor(t){this.timestamp=0,this.counter=0,this.random=null!=t?t:oa()}generate(){return this.generateOrResetCore(Date.now(),1e4)}generateOrAbort(){return this.generateOrAbortCore(Date.now(),1e4)}generateOrResetCore(t,e){let r=this.generateOrAbortCore(t,e);return void 0===r&&(this.timestamp=0,r=this.generateOrAbortCore(t,e)),r}generateOrAbortCore(t,e){if(!Number.isInteger(t)||t<1||t>0xffffffffffff)throw new RangeError("`unixTsMs` must be a 48-bit positive integer");if(e<0||e>0xffffffffffff)throw new RangeError("`rollbackAllowance` out of reasonable range");if(t>this.timestamp)this.timestamp=t,this.resetCounter();else{if(!(t+e>=this.timestamp))return;this.counter++,this.counter>4398046511103&&(this.timestamp++,this.resetCounter())}return na.fromFieldsV7(this.timestamp,Math.trunc(this.counter/2**30),this.counter&2**30-1,this.random.nextUint32())}resetCounter(){this.counter=1024*this.random.nextUint32()+(1023&this.random.nextUint32())}generateV4(){const t=new Uint8Array(Uint32Array.of(this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32()).buffer);return t[6]=64|t[6]>>>4,t[8]=128|t[8]>>>2,na.ofInner(t)}}const oa=()=>{if("undefined"!=typeof crypto&&void 0!==crypto.getRandomValues)return new la;if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");return{nextUint32:()=>65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random())}};class la{constructor(){this.buffer=new Uint32Array(8),this.cursor=65535}nextUint32(){return this.cursor>=this.buffer.length&&(crypto.getRandomValues(this.buffer),this.cursor=0),this.buffer[this.cursor++]}}let ha;const pa=()=>(ha||(ha=new sa)).generate();function ca(t){Promise.all([ne(t),oe(t),le(t),he(t),ma()]).then((e=>{let[r,i,a,n,s]=e;if(!r)return void console.error("Can not find widget with id",t);!function(){const t=document.createElement("link");t.rel="stylesheet",t.href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;500;700&display=swap",document.head.appendChild(t)}();const o=function(){const t=new ra(!1);return window.pfWidget={open:()=>t.next(!0),close:()=>t.next(!1)},{modalStateChange$:t.pipe((e=1,Qi((function(t,r){return e<=r}))))};var e}(),l=ua(),h=new dr(i);h.insertIntegrations(),h.handleDialogEvents(a),setInterval((()=>{le(t).then((t=>h.handleDialogEvents(t)))}),9e4);const p=Xi(r.widgetSettings.actions);!function(t){let{widget:e,wazzupId:r,hid:i,integrationsService:a,tariff:n,anyActionPassed$:s,modalStateChange$:o,tests:l}=t;e.widgetSettings.textSettings=te(e.widgetSettings.textSettings),e.phoneCallMessage=function(t){let e=(navigator.language||navigator.userLanguage).slice(0,2);return e=e.includes("ru")?"ru":"en",t===v&&"ru"!==e?b:t===b&&"en"!==e?v:t}(e.phoneCallMessage);const h=Mt` `;Ot(h,document.body)}({widget:r,wazzupId:l,hid:s,integrationsService:h,tariff:n,anyActionPassed$:p,modalStateChange$:o.modalStateChange$});const c=document.createElement("script");c.src="https://widget.yourgood.app/script/ads.bundle.min.js",document.body.appendChild(c),c.onload=()=>{ia(),se(t,{name:"enter",wazzupId:l,hid:s,integrations:i})},c.onerror=e=>{ia(),se(t,{name:"enter",wazzupId:l,hid:s,integrations:i})}}))}const da="__buttonly_id",fa="__hid",Ca=730;function ua(){!function(){const t=Ce.get(da);t&&t.includes("-")&&Ce.set(da,t.replace("-",""),{expires:Ca})}();let t=de("123456789",8)();return Ce.get(da)||Ce.set(da,t,{expires:Ca,sameSite:"none",secure:!0}),Ce.get(da)}function ma(){const t=Ce.get(fa);if(!t){const t=pa().toString();return Ce.set(fa,t,{expires:Ca,sameSite:"none",secure:!0}),t}return t}!function(){const t=function(){if(window.ygWidgetId)return null;const t=document.head.querySelectorAll("[data-pf-id]"),e=t.length>1?t[0].dataset.pfId:document.currentScript.dataset.pfId;return window.ygWidgetId=e,e}();t?(!function(){if(!0===window[Qt])return;window[Qt]=!0;let t=history.pushState;history.pushState=function(){let e=t.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),e};let e=history.replaceState;history.replaceState=function(){let t=e.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),t}}(),function(t,e){const r=Date.now(),i=setInterval((()=>{Date.now()-r>=t&&(clearInterval(i),e())}),100)}(5e3,(()=>{(function(){try{return window.self!==window.top}catch{return!0}})()||function(t){let{widgetId:e,referrer:r}=t;const i=document.currentScript?.src?.includes("https://widget.profeat.team")??null;fetch("https://widget.yourgood.app/api/statistics-inner/create-setup-event",{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"},body:JSON.stringify({settingsId:e,referrer:r,...i?{legacy:!0}:{}})}).then((t=>t.json())).catch((()=>{}))}({widgetId:t,referrer:window.location.href})})),new Promise(((t,e)=>{t()})).then((()=>ne(t))).then((e=>{var r;e.seoOptimization?(r=3e3,new Promise((t=>setTimeout(t,r)))).then((()=>ca(t))):ca(t)}))):console.error("You can only install 1 of widget")}()})()})();