tweb/public/554.7d2b9a9c4096088ac7e1.ch...

2 lines
9.5 KiB
JavaScript

"use strict";(this.webpackChunktweb=this.webpackChunktweb||[]).push([[554],{9818:(t,e,n)=>{n.d(e,{Z:()=>h});var i=n(410),s=n(4762),o=n(5003),a=n(8799),r=n(3910),d=n(3444),c=n(1655);const l=new class{constructor(){this.navigations=[],this.id=Date.now(),this.manual=!1,this.log=(0,o.kg)("NC"),this.debug=!0,this.currentHash=window.location.hash;let t=!1;if(window.addEventListener("popstate",(e=>{if(this.debug&&this.log("popstate",e,t),window.location.hash!==this.currentHash)return this.onHashChange&&this.onHashChange(),void this.replaceState();if(this.currentHash=window.location.hash,e.state!==this.id)return void this.pushState();const n=this.navigations.pop();n?(this.manual=!t,this.handleItem(n)):this.pushState()})),window.addEventListener("keydown",(t=>{const e=this.navigations[this.navigations.length-1];e&&("Escape"!==t.key||e.onEscape&&!e.onEscape()||((0,r.d)(t),this.back(e.type)))}),{capture:!0,passive:!1}),s.IS_MOBILE_SAFARI){const e={passive:!0};window.addEventListener("touchstart",(e=>{e.touches.length>1||(this.debug&&this.log("touchstart"),(0,d.Z)(e)&&(t=!0,window.addEventListener("touchend",(()=>{setTimeout((()=>{t=!1}),100)}),{passive:!0,once:!0})))}),e)}history.scrollRestoration="manual",this.pushState()}handleItem(t){const e=t.onPop(!!this.manual&&void 0);this.debug&&this.log("popstate, navigation:",t,this.navigations),!1===e?this.pushItem(t):t.noBlurOnPop||(0,a.Z)(),this.manual=!1}findItemByType(t){for(let e=this.navigations.length-1;e>=0;--e){const n=this.navigations[e];if(n.type===t)return{item:n,index:e}}}back(t){if(t){const e=this.findItemByType(t);if(e)return void this.backByItem(e.item,e.index)}history.back()}backByItem(t,e=this.navigations.indexOf(t)){this.manual=!0,this.navigations.splice(e,1),this.handleItem(t)}onItemAdded(t){this.debug&&this.log("pushstate",t,this.navigations),t.noHistory||this.pushState()}pushItem(t){this.navigations.push(t),this.onItemAdded(t)}unshiftItem(t){this.navigations.unshift(t),this.onItemAdded(t)}pushState(){this.manual=!1,history.pushState(this.id,"")}replaceState(){history.replaceState(this.id,"",location.origin+location.pathname)}removeItem(t){t&&(0,c.Z)(this.navigations,t)}removeByType(t,e=!1){for(let n=this.navigations.length-1;n>=0&&(this.navigations[n].type!==t||(this.navigations.splice(n,1),!e));--n);}};i.GO.appNavigationController=l;const h=l},4494:(t,e,n)=>{n.d(e,{Z:()=>o});var i=n(4727),s=n(1405);const o=(t,e={})=>{const n=document.createElement(e.asDiv?"div":"button");return n.className=t+(e.icon?" tgico-"+e.icon:""),e.noRipple||(e.rippleSquare&&n.classList.add("rp-square"),(0,s.ripple)(n)),e.onlyMobile&&n.classList.add("only-handhelds"),e.disabled&&n.setAttribute("disabled","true"),e.text&&n.append((0,i.i18n)(e.text)),n}},6858:(t,e,n)=>{n.d(e,{Eo:()=>I,UR:()=>v,YP:()=>E,oy:()=>L,px:()=>u,s3:()=>S,y7:()=>h});var i=n(410),s=n(3910),o=n(2738),a=n(4755),r=n(5432),d=n(4762),c=n(3512),l=n(9818);function h(t,e=!1){const n='\n <svg xmlns="http://www.w3.org/2000/svg" class="preloader-circular" viewBox="25 25 50 50">\n <circle class="preloader-path" cx="50" cy="50" r="20" fill="none" stroke-miterlimit="10"/>\n </svg>';if(e){const e=document.createElement("div");return e.classList.add("preloader"),e.innerHTML=n,t&&t.appendChild(e),e}return t.insertAdjacentHTML("beforeend",n),t.lastElementChild}function u(t,e="check"){return t.classList.remove("tgico-"+e),t.disabled=!0,h(t),()=>{t.innerHTML="",t.classList.add("tgico-"+e),t.removeAttribute("disabled")}}i.GO.putPreloader=h;let p=t=>{let e=g.getBoundingClientRect(),{clientX:n,clientY:i}=t,s=n>=e.right?n-e.right:e.left-n,o=i>=e.bottom?i-e.bottom:e.top-i;(s>=100||o>=100)&&v()};const m=t=>{v()},v=()=>{g&&(g.classList.remove("active"),g.parentElement.classList.remove("menu-open"),f&&f.remove(),g=null,c.default.dispatchEvent("context_menu_toggle",!1)),w&&(w(),w=null),r.IS_TOUCH_SUPPORTED||(window.removeEventListener("mousemove",p),window.removeEventListener("contextmenu",m)),document.removeEventListener(o.pf,m),d.IS_MOBILE_SAFARI||l.Z.removeByType("menu")};window.addEventListener("resize",(()=>{g&&v()}));let g=null,w=null,f=null;function E(t,e){v(),d.IS_MOBILE_SAFARI||l.Z.pushItem({type:"menu",onPop:t=>{v()}}),g=t,g.classList.add("active"),g.parentElement.classList.add("menu-open"),f||(f=document.createElement("div"),f.classList.add("btn-menu-overlay"),f.addEventListener(o.pf,(t=>{(0,s.d)(t),m()}))),g.parentElement.insertBefore(f,g),w=e,r.IS_TOUCH_SUPPORTED||(window.addEventListener("mousemove",p),window.addEventListener("contextmenu",m,{once:!0})),document.addEventListener(o.pf,m),c.default.dispatchEvent("context_menu_toggle",!0)}function L({pageX:t,pageY:e},n,i,s){const o=Array.from(n.children).find((t=>t.classList.contains("btn-menu-item")&&!t.classList.contains("hide")))||n;let{scrollWidth:r}=o,{scrollHeight:d}=n;const c=document.body.getBoundingClientRect(),l=c.width,h=c.height;let u=8,p=8,m=8,v=8;s&&(s.top&&s.top,s.right&&(p+=s.right),s.bottom&&(m+=s.bottom),s.left&&(v+=s.left)),i=a.ZP.isMobile?"right":"left";let g="top";const w=h-d-m,f=l-r-p,E=v,L={x:{left:t,right:Math.min(f,t-r)},intermediateX:"right"===i?E:f,y:{top:e,bottom:e-d},intermediateY:w},b={left:L.x.left+r+p<=l,right:L.x.right>=v},y={top:L.y.top+d+m<=h,bottom:L.y.bottom-m>=m};{let t;t=b[i]?L.x[i]:(i="center",L.intermediateX),n.style.left=t+"px"}{let t;t=y[g]?L.y[g]:(g="center",L.intermediateY),n.style.top=t+"px"}return n.className=n.className.replace(/(top|center|bottom)-(left|center|right)/g,""),n.classList.add(("center"===g?g:"bottom")+"-"+("center"===i?i:"left"===i?"right":"left")),{width:r,height:d}}let b=!1,y=0;function S(){y&&clearTimeout(y),y=window.setTimeout((()=>{y=0,b=!1}),400),b=!0}function I(t,e,n){const i=n?n.add(t):t.addEventListener.bind(t),o=n?n.removeManual.bind(n,t):t.removeEventListener.bind(t);if(d.IS_APPLE&&r.IS_TOUCH_SUPPORTED){let n;const a={capture:!0},r=()=>{clearTimeout(n),o("touchmove",r,a),o("touchend",r,a),o("touchcancel",r,a)};i("touchstart",(o=>{o.touches.length>1?r():(i("touchmove",r,a),i("touchend",r,a),i("touchcancel",r,a),n=window.setTimeout((()=>{b?r():(e(o.touches[0]),r(),g&&t.addEventListener("touchend",s.d,{once:!0}))}),400))}))}else i("contextmenu",r.IS_TOUCH_SUPPORTED?n=>{e(n),g&&t.addEventListener("touchend",s.d,{once:!0})}:e)}},1405:(t,e,n)=>{n.r(e),n.d(e,{ripple:()=>c});var i=n(8497),s=n(9674),o=n(5432),a=n(3512),r=n(5975);let d=0;function c(t,e=(()=>Promise.resolve()),n=null,c=!1,l=t){if(t.querySelector(".c-ripple"))return;t.classList.add("rp");let h,u=document.createElement("div");u.classList.add("c-ripple"),t.classList.contains("rp-square")&&u.classList.add("is-square"),t[c?"prepend":"append"](u);const p=(t,i)=>{const a=Date.now(),r=document.createElement("div"),c=d++,l=1e3*+window.getComputedStyle(u).getPropertyValue("--ripple-duration").replace("s","");h=()=>{let t=Date.now()-a;const e=()=>{s.Z.mutate((()=>{r.remove()})),n&&n(c)};if(t<l){let n=Math.max(l-t,l/2);setTimeout((()=>r.classList.add("hiding")),Math.max(n-l/2,0)),setTimeout(e,n)}else r.classList.add("hiding"),setTimeout(e,l/2);o.IS_TOUCH_SUPPORTED||window.removeEventListener("contextmenu",h),h=null,v=!1},e&&e(c),window.requestAnimationFrame((()=>{const e=u.getBoundingClientRect();r.classList.add("c-ripple__circle");const n=t-e.left,s=i-e.top,o=Math.sqrt(Math.pow(Math.abs(s-e.height/2)+e.height/2,2)+Math.pow(Math.abs(n-e.width/2)+e.width/2,2)),a=n-o/2,d=s-o/2;r.style.width=r.style.height=o+"px",r.style.left=a+"px",r.style.top=d+"px",u.append(r)}))},m=e=>e.target!==t&&(["BUTTON","A"].includes(e.target.tagName)||(0,i.Z)(e.target,"c-ripple")!==u)&&(l===t||!(0,r.Z)(e.target,l));let v=!1;if(o.IS_TOUCH_SUPPORTED){let t=()=>{h&&h()};l.addEventListener("touchstart",(e=>{if(!a.default.settings.animationsEnabled)return;if(e.touches.length>1||v||m(e))return;v=!0;let{clientX:n,clientY:i}=e.touches[0];p(n,i),l.addEventListener("touchend",t,{once:!0}),window.addEventListener("touchmove",(e=>{e.cancelBubble=!0,e.stopPropagation(),t(),l.removeEventListener("touchend",t)}),{once:!0})}),{passive:!0})}else l.addEventListener("mousedown",(t=>{if(![0,2].includes(t.button))return;if(!a.default.settings.animationsEnabled)return;if("0"===l.dataset.ripple||m(t))return;if(v)return void(v=!1);let{clientX:e,clientY:n}=t;p(e,n),window.addEventListener("mouseup",h,{once:!0,passive:!0}),window.addEventListener("contextmenu",h,{once:!0,passive:!0})}),{passive:!0})}},2738:(t,e,n)=>{n.d(e,{EN:()=>r,fc:()=>a,pf:()=>o,tH:()=>d});var i=n(5432),s=n(6669);const o=i.IS_TOUCH_SUPPORTED?"mousedown":"click";function a(t,e,n={}){const i=n.listenerSetter?n.listenerSetter.add(t):t.addEventListener.bind(t);n.touchMouseDown=!0,i(o,e,n)}function r(t,e,n){t.removeEventListener(o,e,n)}function d(t){(0,s.Z)(t,o)}},6669:(t,e,n)=>{function i(t,e){const n=new Event(e,{bubbles:!0,cancelable:!0});t.dispatchEvent(n)}n.d(e,{Z:()=>i})},3444:(t,e,n)=>{n.d(e,{Z:()=>s});var i=n(4762);function s(t){return i.IS_MOBILE_SAFARI&&t instanceof TouchEvent&&t.touches[0].clientX<30}},9674:(t,e,n)=>{n.d(e,{Z:()=>d});var i=n(3035),s=n(3725),o=n(410),a=n(8487);const r=new class{constructor(){this.promises={},this.raf=i.T2.bind(null),this.scheduled=!1}do(t,e){let n=this.promises[t];return n||(this.scheduleFlush(),n=this.promises[t]=(0,s.b)()),void 0!==e&&n.then((()=>e())),n}measure(t){return this.do("read",t)}mutate(t){return this.do("write",t)}mutateElement(t,e){const n=(0,a.Z)(t),i=n?this.mutate():Promise.resolve();return void 0!==e&&(n?e():i.then((()=>e()))),i}scheduleFlush(){this.scheduled||(this.scheduled=!0,this.raf((()=>{this.promises.read&&this.promises.read.resolve(),this.promises.write&&this.promises.write.resolve(),this.scheduled=!1,this.promises={}})))}};o.GO&&(o.GO.sequentialDom=r);const d=r}}]);
//# sourceMappingURL=554.7d2b9a9c4096088ac7e1.chunk.js.map