!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("preact/compat"));else if("function"==typeof define&&define.amd)define(["preact/compat"],t);else{var r="object"==typeof exports?t(require("preact/compat")):t(e.PreactCompat);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(Depicter,(e=>(()=>{"use strict";var t={314:t=>{t.exports=e}},r={};function o(e){var s=r[e];if(void 0!==s)return s.exports;var n=r[e]={exports:{}};return t[e](n,n.exports,o),n.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return(()=>{o.r(s),o.d(s,{dpcCircleTimer:()=>u});var e,t=o(314);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},r.apply(this,arguments)}const n=o=>t.createElement("svg",r({width:12,height:16,viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),e||(e=t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.99805 14.0029V1.99902C7.99805 0.89453 8.89453 0 9.99805 0C11.1035 0 11.9981 0.89453 11.9981 1.99902V14.0029C11.9981 15.1035 11.1035 16.0029 9.99805 16.0029C8.89453 16.0029 7.99805 15.1035 7.99805 14.0029ZM0 14.0029V1.99902C0 0.89453 0.89453 0 2 0C3.10547 0 4 0.89453 4 1.99902V14.0029C4 15.1035 3.10547 16.0029 2 16.0029C0.89453 16.0029 0 15.1035 0 14.0029Z"})));var a;function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},c.apply(this,arguments)}const i=e=>t.createElement("svg",c({width:11,height:16,viewBox:"0 0 11 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{left:"8%"}},e),a||(a=t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0541 7.22605C10.5431 7.62615 10.5431 8.37385 10.0541 8.77395L1.63338 15.6637C0.980451 16.1979 0.000137329 15.7334 0.000137329 14.8897L0.000137329 1.11026C0.000137329 0.266631 0.98045 -0.197916 1.63338 0.336306L10.0541 7.22605Z"}))),l=e=>{const{className:r="dpc-circle-timer",progress:o=50,lineCap:s=!1,thickness:a=10,status:c="play",showSymbol:l=!1,changeStatusOnClick:p=!1,showSymbolOnHover:u=!1,onPause:d,onResume:f}=e,h=50-a/2,m=(0,t.useMemo)((()=>{const e=2*Math.PI*h;return{strokeDasharray:e,strokeDashoffset:e*((100-Math.min(100,Math.max(0,o)))/100)}}),[o,h]),b=(0,t.useMemo)((()=>({inset:`${a+22}%`})),[a]),y=(0,t.useCallback)((()=>{p&&("play"===c?d?.():f?.())}),[d,f,p,c]);return Depicter.h("div",{className:r+(p?" dpc-circle-timer-clickable":""),onClick:y},Depicter.h("svg",{width:"100%",height:"100%",viewBox:"0 0 100 100"},Depicter.h("circle",{className:"dpc-circle-timer-bg-bar",r:h,cx:"50%",cy:"50%",fill:"transparent",stroke:"#e0e0e0",strokeWidth:a}),Depicter.h("circle",{className:"dpc-circle-timer-progress-bar",r:h,cx:"50%",cy:"50%",fill:"transparent",stroke:"#60e6a8",strokeWidth:a,strokeLinecap:s?"round":void 0,style:m})),l&&Depicter.h("div",{className:`dpc-circle-timer-symbol ${u?"dpc-circle-timer-hover-symbol":""} `,style:b},"play"!==c?Depicter.h(i,null):Depicter.h(n,null)))};function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},p.apply(this,arguments)}const u={component:e=>{const{composer:r,...o}=e,[s,n]=(0,t.useState)(0),[a,c]=(0,t.useState)("play"),i=(0,t.useRef)(0),u=(0,t.useRef)(0);(0,t.useEffect)((()=>{let e;const t=()=>{const r=u.current+(i.current-u.current)/10;Math.abs(i.current-u.current)>=.02&&n(r),u.current=r,e=window.requestAnimationFrame(t)};return t(),()=>{e&&window.cancelAnimationFrame(e)}}),[]);const d=(0,t.useCallback)(((e,t)=>{i.current=t/100*115}),[]),f=(0,t.useCallback)((()=>{c("pause")}),[]),h=(0,t.useCallback)((()=>{c("play")}),[]),m=(0,t.useCallback)((()=>{r.slideshow.pause()}),[r.slideshow]),b=(0,t.useCallback)((()=>{r.slideshow.resume()}),[r.slideshow]);return(0,t.useEffect)((()=>(r.on("slideshowTimerUpdate",d),r.on("slideshowPaused",f),r.on("slideshowStart",h),()=>{r.off("slideshowTimerUpdate",d),r.off("slideshowPaused",f),r.off("slideshowStart",h)})),[r,f,d,h]),Depicter.h(l,p({},o,{progress:s,status:a,onPause:m,onResume:b}))},async:!1}})(),s})()));