(()=>{var e,t={572:(e,t,o)=>{"use strict";const n=window.React,i=window.kadence.icons;var a=o(5556);function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t,o){return t&&l(e.prototype,t),o&&l(e,o),e}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var o,n=c(e);if(t){var i=c(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,o)}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,o=String(e);if(0===t)return o;var n,i=o.match(/(.*?)([0-9]+)(.*)/),a=i?i[1]:"",r=i?i[3]:"",l=i?i[2]:o,d=l.length>=t?l:((n=Array(t),function(e){if(Array.isArray(e))return m(e)}(n)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?m(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(){return"0"})).join("")+l).slice(-1*t);return"".concat(a).concat(d).concat(r)}var v={daysInHours:!1,zeroPadTime:2};function b(e,t){var o=e.days,n=e.hours,i=e.minutes,a=e.seconds,r=Object.assign(Object.assign({},v),t),l=r.daysInHours,d=r.zeroPadTime,s=r.zeroPadDays,c=void 0===s?d:s,u=Math.min(2,d),p=l?g(n+24*o,d):g(n,u);return{days:l?"":g(o,c),hours:p,minutes:g(i,u),seconds:g(a,u)}}var f=function(e){s(o,e);var t=p(o);function o(){var e;return r(this,o),(e=t.apply(this,arguments)).state={count:e.props.count||3},e.startCountdown=function(){e.interval=window.setInterval((function(){0==e.state.count-1?(e.stopCountdown(),e.props.onComplete&&e.props.onComplete()):e.setState((function(e){return{count:e.count-1}}))}),1e3)},e.stopCountdown=function(){clearInterval(e.interval)},e.addTime=function(t){e.stopCountdown(),e.setState((function(e){return{count:e.count+t}}),e.startCountdown)},e}return d(o,[{key:"componentDidMount",value:function(){this.startCountdown()}},{key:"componentWillUnmount",value:function(){clearInterval(this.interval)}},{key:"render",value:function(){return this.props.children?(0,n.cloneElement)(this.props.children,{count:this.state.count}):null}}]),o}(n.Component);f.propTypes={count:a.number,children:a.element,onComplete:a.func};var k=function(e){s(o,e);var t=p(o);function o(e){var i;if(r(this,o),(i=t.call(this,e)).mounted=!1,i.initialTimestamp=i.calcOffsetStartTimestamp(),i.offsetStartTimestamp=i.props.autoStart?0:i.initialTimestamp,i.offsetTime=0,i.legacyMode=!1,i.legacyCountdownRef=(0,n.createRef)(),i.tick=function(){var e=i.calcTimeDelta(),t=e.completed&&!i.props.overtime?void 0:i.props.onTick;i.setTimeDeltaState(e,void 0,t)},i.start=function(){if(!i.isStarted()){var e=i.offsetStartTimestamp;i.offsetStartTimestamp=0,i.offsetTime+=e?i.calcOffsetStartTimestamp()-e:0;var t=i.calcTimeDelta();i.setTimeDeltaState(t,"STARTED",i.props.onStart),i.props.controlled||t.completed&&!i.props.overtime||(i.clearTimer(),i.interval=window.setInterval(i.tick,i.props.intervalDelay))}},i.pause=function(){i.isPaused()||(i.clearTimer(),i.offsetStartTimestamp=i.calcOffsetStartTimestamp(),i.setTimeDeltaState(i.state.timeDelta,"PAUSED",i.props.onPause))},i.stop=function(){i.isStopped()||(i.clearTimer(),i.offsetStartTimestamp=i.calcOffsetStartTimestamp(),i.offsetTime=i.offsetStartTimestamp-i.initialTimestamp,i.setTimeDeltaState(i.calcTimeDelta(),"STOPPED",i.props.onStop))},i.isStarted=function(){return i.isStatus("STARTED")},i.isPaused=function(){return i.isStatus("PAUSED")},i.isStopped=function(){return i.isStatus("STOPPED")},i.isCompleted=function(){return i.isStatus("COMPLETED")},i.handleOnComplete=function(e){i.props.onComplete&&i.props.onComplete(e)},e.date){var a=i.calcTimeDelta();i.state={timeDelta:a,status:a.completed?"COMPLETED":"STOPPED"}}else i.legacyMode=!0;return i}return d(o,[{key:"componentDidMount",value:function(){this.legacyMode||(this.mounted=!0,this.props.onMount&&this.props.onMount(this.calcTimeDelta()),this.props.autoStart&&this.start())}},{key:"componentDidUpdate",value:function(e){this.legacyMode||this.props.date!==e.date&&(this.initialTimestamp=this.calcOffsetStartTimestamp(),this.offsetStartTimestamp=this.initialTimestamp,this.offsetTime=0,this.setTimeDeltaState(this.calcTimeDelta()))}},{key:"componentWillUnmount",value:function(){this.legacyMode||(this.mounted=!1,this.clearTimer())}},{key:"calcTimeDelta",value:function(){var e=this.props,t=e.date,o=e.now,n=e.precision,i=e.controlled,a=e.overtime;return function(e){var t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=o.now,i=void 0===n?Date.now:n,a=o.precision,r=void 0===a?0:a,l=o.controlled,d=o.offsetTime,s=void 0===d?0:d,c=o.overtime;t="string"==typeof e?new Date(e).getTime():e instanceof Date?e.getTime():e,l||(t+=s);var u=l?t:t-i(),p=Math.min(20,Math.max(0,r)),m=Math.round(1e3*parseFloat(((c?u:Math.max(0,u))/1e3).toFixed(p))),g=Math.abs(m)/1e3;return{total:m,days:Math.floor(g/86400),hours:Math.floor(g/3600%24),minutes:Math.floor(g/60%60),seconds:Math.floor(g%60),milliseconds:Number((g%1*1e3).toFixed()),completed:m<=0}}(t,{now:o,precision:n,controlled:i,offsetTime:this.offsetTime,overtime:a})}},{key:"calcOffsetStartTimestamp",value:function(){return Date.now()}},{key:"addTime",value:function(e){this.legacyCountdownRef.current.addTime(e)}},{key:"clearTimer",value:function(){window.clearInterval(this.interval)}},{key:"isStatus",value:function(e){return this.state.status===e}},{key:"setTimeDeltaState",value:function(e,t,o){var n,i=this;if(this.mounted)return!this.state.timeDelta.completed&&e.completed&&(this.props.overtime||this.clearTimer(),n=this.handleOnComplete),this.setState((function(o){var n=t||o.status;return e.completed&&!i.props.overtime?n="COMPLETED":t||"COMPLETED"!==n||(n="STOPPED"),{timeDelta:e,status:n}}),(function(){o&&o(i.state.timeDelta),n&&n(i.state.timeDelta)}))}},{key:"getApi",value:function(){return this.api=this.api||{start:this.start,pause:this.pause,stop:this.stop,isStarted:this.isStarted,isPaused:this.isPaused,isStopped:this.isStopped,isCompleted:this.isCompleted}}},{key:"getRenderProps",value:function(){var e=this.props,t=e.daysInHours,o=e.zeroPadTime,n=e.zeroPadDays,i=this.state.timeDelta;return Object.assign(Object.assign({},i),{api:this.getApi(),props:this.props,formatted:b(i,{daysInHours:t,zeroPadTime:o,zeroPadDays:n})})}},{key:"render",value:function(){if(this.legacyMode){var e=this.props,t=e.count,o=e.children,i=e.onComplete;return(0,n.createElement)(f,{ref:this.legacyCountdownRef,count:t,onComplete:i},o)}var a=this.props,r=a.className,l=a.overtime,d=a.children,s=a.renderer,c=this.getRenderProps();if(s)return s(c);if(d&&this.state.timeDelta.completed&&!l)return(0,n.cloneElement)(d,{countdown:c});var u=c.formatted,p=u.days,m=u.hours,g=u.minutes,v=u.seconds;return(0,n.createElement)("span",{className:r},c.total<0?"-":"",p,p?":":"",m,":",g,":",v)}}]),o}(n.Component);k.defaultProps=Object.assign(Object.assign({},v),{controlled:!1,intervalDelay:1e3,precision:0,autoStart:!0}),k.propTypes={date:(0,a.oneOfType)([(0,a.instanceOf)(Date),a.string,a.number]),daysInHours:a.bool,zeroPadTime:a.number,zeroPadDays:a.number,controlled:a.bool,intervalDelay:a.number,precision:a.number,autoStart:a.bool,overtime:a.bool,className:a.string,children:a.element,renderer:a.func,now:a.func,onMount:a.func,onStart:a.func,onPause:a.func,onStop:a.func,onTick:a.func,onComplete:a.func};const y=k,h=window.wp.i18n,w=window.wp.blockEditor,T=window.wp.compose,S=window.wp.element,C=window.wp.data,_=window.kadence.helpers,E=(0,T.compose)([(0,C.withSelect)(((e,t)=>{const{clientId:o}=t,{getBlockRootClientId:n,getBlocksByClientId:i}=e("core/block-editor"),a=n(o);return{parentBlock:i(a),rootID:a}}))])((function(e){const{attributes:t,setAttributes:o,clientId:i,parentBlock:a}=e,{uniqueID:r}=t,l=void 0!==a[0].attributes.uniqueID?a[0].attributes.uniqueID:rootID,{addUniqueID:d}=(0,C.useDispatch)("kadenceblocks/data"),{isUniqueID:s,isUniqueBlock:c,parentData:u}=(0,C.useSelect)((e=>({isUniqueID:t=>e("kadenceblocks/data").isUniqueID(t),isUniqueBlock:(t,o)=>e("kadenceblocks/data").isUniqueBlock(t,o),parentData:{rootBlock:e("core/block-editor").getBlock(e("core/block-editor").getBlockHierarchyRootClientId(i)),postId:e("core/editor")?.getCurrentPostId()?e("core/editor")?.getCurrentPostId():"",reusableParent:e("core/block-editor").getBlockAttributes(e("core/block-editor").getBlockParentsByBlockName(i,"core/block").slice(-1)[0]),editedPostId:!!e("core/edit-site")&&e("core/edit-site").getEditedPostId()}})),[i]);(0,S.useEffect)((()=>{const n=(0,_.getPostOrFseId)(e,u),a=(0,_.getUniqueId)(r,i,s,c,n);a!==r?(t.uniqueID=a,o({uniqueID:a}),d(a,i)):d(r,i)}),[]);const p=a[0].attributes.units,m={};m.days=a[0].attributes.daysLabel?a[0].attributes.daysLabel:(0,h.__)("Days","kadence-blocks"),m.hours=a[0].attributes.hoursLabel?a[0].attributes.hoursLabel:(0,h.__)("Hrs","kadence-blocks"),m.minutes=a[0].attributes.minutesLabel?a[0].attributes.minutesLabel:(0,h.__)("Mins","kadence-blocks"),m.seconds=a[0].attributes.secondsLabel?a[0].attributes.secondsLabel:(0,h.__)("Secs","kadence-blocks");const g=a[0].attributes.preLabel?(0,n.createElement)("div",{className:"kb-countdown-item kb-pre-timer"},(0,n.createElement)("span",{className:"kb-pre-timer-inner"},a[0].attributes.preLabel)):"",v=a[0].attributes.postLabel?(0,n.createElement)("div",{className:"kb-countdown-item kb-post-timer"},(0,n.createElement)("span",{className:"kb-post-timer-inner"},a[0].attributes.postLabel)):"",b=!!a[0].attributes.timeNumbers,f=!(void 0===a[0].attributes.timerLayout||"inline"===a[0].attributes.timerLayout||!a[0].attributes.countdownDivider),k=e=>b?e>9?""+e:"0"+e:e,T=(0,w.useBlockProps)({className:`kb-countdown-timer kb-countdown-timer-${r}`});return(0,n.createElement)("div",{...T,id:`kb-timer-${l}`},(0,n.createElement)(y,{date:(()=>{const e=new Date,t=new Date(a[0].attributes.timestamp),o=!(a[0].attributes.stopRepeating&&new Date(a[0].attributes.endDate)<=new Date(e));if(e>=t&&a[0].attributes.repeat&&""!==a[0].attributes.frequency&&o){const o=t.getSeconds(),n=t.getMinutes(),i=t.getHours();let r=new Date;const l=Math.floor((e.getTime()-t.getTime())/864e5);let d=0,s=t.getDate();const c=e.getDate(),u=t.getMonth(),p=11===e.getMonth()?0:c>=s?e.getMonth()+1:e.getMonth();let m=11===e.getMonth()?e.getFullYear()+1:e.getFullYear();const g=new Date(m,p+1,0).getDate();switch(a[0].attributes.frequency){case"daily":d=l+1,r.setDate(t.getDate()+d),r.setHours(i),r.setMinutes(n),r.setSeconds(o);break;case"weekly":d=l+(7-l%7),r.setDate(t.getDate()+d),r.setHours(i),r.setMinutes(n),r.setSeconds(o);break;case"monthly":31===s&&30===g?s=30:0===p&&s>=29&&(s=29===s?s:28),r=new Date(m,p,s,i,n,o);break;case"yearly":m=e.getMonth()<=t.getMonth()&&e.getDate()<=t.getDate()&&e.getHours()<=i&&e.getMinutes()<=n&&e.getSeconds()<=o?e.getFullYear():e.getFullYear()+1,r=new Date(m,u,s,i,n,o)}return r}return new Date(a[0].attributes.timestamp)})(),renderer:({total:e,days:t,hours:o,minutes:i,seconds:a,completed:r})=>{if(r){const e={};void 0===p||void 0===p[0]||void 0===p[0].days||p[0].days?(e.days=0,e.hours=0,e.minutes=0,e.seconds=0):void 0===p||void 0===p[0]||void 0===p[0].hours||p[0].hours?(e.hours=0,e.minutes=0,e.seconds=0):void 0===p||void 0===p[0]||void 0===p[0].minutes||p[0].minutes?(e.minutes=0,e.seconds=0):e.seconds=0;const t=Object.keys(e).map((t=>"seconds"!==t&&f?(0,n.createElement)(S.Fragment,null,(0,n.createElement)("div",{className:`kb-countdown-date-item kb-countdown-item kb-countdown-date-item-${t}`},(0,n.createElement)("span",{className:"kb-countdown-number"},k(e[t])),(0,n.createElement)("span",{className:"kb-countdown-label"},m[t])),(0,n.createElement)("div",{className:`kb-countdown-item kb-countdown-date-item kb-countdown-divider-item kb-countdown-divider-item-${t}`},(0,n.createElement)("span",{className:"kb-countdown-number"},":"),(0,n.createElement)("span",{className:"kb-countdown-label"}," "))):(0,n.createElement)("div",{className:`kb-countdown-date-item kb-countdown-item kb-countdown-date-item-${t}`},(0,n.createElement)("span",{className:"kb-countdown-number"},k(e[t])),(0,n.createElement)("span",{className:"kb-countdown-label"},m[t]))));return(0,n.createElement)(S.Fragment,null,g,t,v)}const l={};let d=Math.floor(e/36e5%24),s=Math.floor(e/1e3/60%60),c=Math.floor(e/1e3%60);void 0===p||void 0===p[0]||void 0===p[0].days||p[0].days?(l.days=Math.floor(e/864e5),l.hours=d,l.minutes=s,l.seconds=c):(d=Math.floor(e/36e5),void 0===p||void 0===p[0]||void 0===p[0].hours||p[0].hours?(l.hours=d,l.minutes=s,l.seconds=c):(s=Math.floor(e/1e3/60),void 0===p||void 0===p[0]||void 0===p[0].minutes||p[0].minutes?(l.minutes=s,l.seconds=c):(c=Math.floor(e/1e3),l.seconds=c)));const u=Object.keys(l).map((e=>"seconds"!==e&&f?(0,n.createElement)(S.Fragment,null,(0,n.createElement)("div",{className:`kb-countdown-date-item kb-countdown-item kb-countdown-date-item-${e}`},(0,n.createElement)("span",{className:"kb-countdown-number"},k(l[e])),(0,n.createElement)("span",{className:"kb-countdown-label"},m[e])),(0,n.createElement)("div",{className:`kb-countdown-item kb-countdown-date-item kb-countdown-divider-item kb-countdown-divider-item-${e}`},(0,n.createElement)("span",{className:"kb-countdown-number"},":"),(0,n.createElement)("span",{className:"kb-countdown-label"}," "))):(0,n.createElement)("div",{className:`kb-countdown-date-item kb-countdown-item kb-countdown-date-item-${e}`},(0,n.createElement)("span",{className:"kb-countdown-number"},k(l[e])),(0,n.createElement)("span",{className:"kb-countdown-label"},m[e]))));return(0,n.createElement)(S.Fragment,null,g,u,v)}}))})),P=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"title":"Countdown Timer","name":"kadence/countdown-timer","category":"kadence-blocks","textdomain":"kadence-blocks","parent":["kadence/countdown"],"description":"","attributes":{"uniqueID":{"type":"string"}},"supports":{"inserter":false,"reusable":false,"html":false,"kbMetadata":true}}'),z=window.wp.blocks;(0,z.registerBlockType)("kadence/countdown-timer",{...P,title:(0,h.__)("Countdown Timer","kadence-blocks"),description:(0,h.__)("The countdown timer","kadence-blocks"),keywords:[(0,h.__)("countdown","kadence-blocks"),(0,h.__)("timer","kadence-blocks"),"KB"],icon:i.countdownInnerIcon,edit:E,save:e=>{const{attributes:{uniqueID:t,className:o}}=e,i=w.useBlockProps.save({className:`kb-countdown-timer-${t} kb-countdown-timer${o?" "+o:""}`});return(0,n.createElement)("div",{...i},(0,n.createElement)("div",{className:"kb-countdown-item kb-countdown-date-item"},(0,n.createElement)("span",{className:"kb-countdown-number"}," "),(0,n.createElement)("span",{className:"kb-countdown-label"}," ")))}});const D=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"title":"Countdown Content","name":"kadence/countdown-inner","category":"kadence-blocks","textdomain":"kadence-blocks","parent":["kadence/countdown"],"description":"","attributes":{"uniqueID":{"type":"string"},"location":{"type":"string"}},"supports":{"inserter":false,"reusable":false,"html":false,"kbMetadata":true}}');(0,z.registerBlockType)("kadence/countdown-inner",{...D,title:(0,h.__)("Countdown Content","kadence-blocks"),description:(0,h.__)("Inner Container for Countdown Block","kadence-blocks"),keywords:[(0,h.__)("countdown","kadence-blocks"),(0,h.__)("timer","kadence-blocks"),"KB"],icon:i.countdownInnerIcon,edit:function(e){const{attributes:t,clientId:o,setAttributes:i}=e,{location:a,uniqueID:r}=t,{addUniqueID:l}=(0,C.useDispatch)("kadenceblocks/data"),{isUniqueID:d,isUniqueBlock:s,parentData:c}=(0,C.useSelect)((e=>({isUniqueID:t=>e("kadenceblocks/data").isUniqueID(t),isUniqueBlock:(t,o)=>e("kadenceblocks/data").isUniqueBlock(t,o),parentData:{rootBlock:e("core/block-editor").getBlock(e("core/block-editor").getBlockHierarchyRootClientId(o)),postId:e("core/editor")?.getCurrentPostId()?e("core/editor")?.getCurrentPostId():"",reusableParent:e("core/block-editor").getBlockAttributes(e("core/block-editor").getBlockParentsByBlockName(o,"core/block").slice(-1)[0]),editedPostId:!!e("core/edit-site")&&e("core/edit-site").getEditedPostId()}})),[o]);(0,S.useEffect)((()=>{const n=(0,_.getPostOrFseId)(e,c),a=(0,_.getUniqueId)(r,o,d,s,n);a!==r?(t.uniqueID=a,i({uniqueID:a}),l(a,o)):l(r,o)}),[]);const u=wp.data.select("core/block-editor").getBlockOrder(o).length>0,p=(0,w.useBlockProps)({className:`kb-countdown-inner kb-countdown-inner-${a} kb-countdown-inner-${r}`});return(0,n.createElement)("div",{...p},(0,n.createElement)(w.InnerBlocks,{templateLock:!1,renderAppender:u?void 0:w.InnerBlocks.ButtonBlockAppender}))},save({attributes:e}){const{location:t,uniqueID:o}=e,i=w.useBlockProps.save({className:`kb-countdown-inner kb-countdown-inner-${t} kb-countdown-inner-${o}`});return(0,n.createElement)("div",{...i},(0,n.createElement)(w.InnerBlocks.Content,null))}});var O=o(2485),x=o.n(O);const I=window.lodash,B=window.kadence.components,L=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"title":"Countdown","name":"kadence/countdown","category":"kadence-blocks","textdomain":"kadence-blocks","description":"","attributes":{"uniqueID":{"type":"string","default":""},"countdownType":{"type":"string","default":"date"},"date":{"type":"string","default":""},"endDate":{"type":"string","default":""},"timezone":{"type":"string","default":""},"timestamp":{"type":"number","default":""},"timeOffset":{"type":"number","default":""},"expireAction":{"type":"string","default":"none"},"redirectURL":{"type":"string","default":""},"campaignID":{"type":"string"},"evergreenHours":{"type":"number","default":0},"evergreenMinutes":{"type":"number","default":0},"evergreenReset":{"type":"number","default":30},"evergreenStrict":{"type":"boolean","default":false},"repeat":{"type":"boolean","default":false},"stopRepeating":{"type":"boolean","default":false},"frequency":{"type":"string","default":"daily"},"enableTimer":{"type":"boolean","default":true},"revealOnLoad":{"type":"boolean","default":false},"units":{"type":"array","default":[{"days":true,"hours":true,"minutes":true,"seconds":true}]},"timerLayout":{"type":"string","default":"block"},"timeNumbers":{"type":"boolean","default":false},"countdownDivider":{"type":"boolean","default":false},"preLabel":{"type":"string","default":""},"postLabel":{"type":"string","default":""},"daysLabel":{"type":"string","default":""},"hoursLabel":{"type":"string","default":""},"minutesLabel":{"type":"string","default":""},"secondsLabel":{"type":"string","default":""},"numberColor":{"type":"string"},"numberFont":{"type":"array","default":[{"size":["","",""],"sizeType":"px","lineHeight":["","",""],"lineType":"px","letterSpacing":["","",""],"letterType":"px","textTransform":"","family":"","google":false,"style":"","weight":"","variant":"","subset":"","loadGoogle":true}]},"itemBackground":{"type":"string","default":""},"itemBorder":{"type":"string","default":""},"itemBorderWidth":{"type":"array","default":["","","",""]},"itemTabletBorderWidth":{"type":"array","default":["","","",""]},"itemMobileBorderWidth":{"type":"array","default":["","","",""]},"itemBorderRadius":{"type":"array","default":[0,0,0,0]},"itemPaddingType":{"type":"string","default":"px"},"itemPadding":{"type":"array","default":["","","",""]},"itemTabletPadding":{"type":"array","default":["","","",""]},"itemMobilePadding":{"type":"array","default":["","","",""]},"labelColor":{"type":"string"},"labelFont":{"type":"array","default":[{"size":["","",""],"sizeType":"px","lineHeight":["","",""],"lineType":"px","letterSpacing":["","",""],"letterType":"px","textTransform":"","family":"","google":false,"style":"","weight":"","variant":"","subset":"","loadGoogle":true}]},"preLabelColor":{"type":"string"},"preLabelFont":{"type":"array","default":[{"size":["","",""],"sizeType":"px","lineHeight":["","",""],"lineType":"px","letterSpacing":["","",""],"letterType":"px","textTransform":"","family":"","google":false,"style":"","weight":"","variant":"","subset":"","loadGoogle":true}]},"postLabelColor":{"type":"string"},"postLabelFont":{"type":"array","default":[{"size":["","",""],"sizeType":"px","lineHeight":["","",""],"lineType":"px","letterSpacing":["","",""],"letterType":"px","textTransform":"","family":"","google":false,"style":"","weight":"","variant":"","subset":"","loadGoogle":true}]},"counterAlign":{"type":"array","default":["","",""]},"border":{"type":"string","default":""},"borderWidth":{"type":"array","default":[0,0,0,0]},"tabletBorderWidth":{"type":"array","default":["","","",""]},"mobileBorderWidth":{"type":"array","default":["","","",""]},"borderRadius":{"type":"array","default":[0,0,0,0]},"background":{"type":"string","default":""},"paddingType":{"type":"string","default":"px"},"containerPadding":{"type":"array","default":["","","",""]},"containerTabletPadding":{"type":"array","default":["","","",""]},"containerMobilePadding":{"type":"array","default":["","","",""]},"marginType":{"type":"string","default":"px"},"containerMargin":{"type":"array","default":["","","",""]},"containerTabletMargin":{"type":"array","default":["","","",""]},"containerMobileMargin":{"type":"array","default":["","","",""]},"vsdesk":{"type":"boolean","default":false},"vstablet":{"type":"boolean","default":false},"vsmobile":{"type":"boolean","default":false}},"supports":{"anchor":true,"align":["wide","full"],"reusable":false,"html":false,"kbMetadata":true}}'),F=window.wp.date,M=window.wp.hooks,H=window.wp.components,$=[["kadence/countdown-timer",{}]],R=[["kadence/countdown-timer",{}],["kadence/countdown-inner",{location:"complete"}]],N=[["kadence/countdown-inner",{location:"first"}],["kadence/countdown-inner",{location:"complete"}]],A=[["kadence/countdown-inner",{location:"first"}]],q=[{value:"date",label:(0,h.__)("Date","kadence-blocks"),disabled:!1},{value:"evergreen",label:(0,h.__)("Evergreen (Pro addon)","kadence-blocks"),disabled:!0}],U=[{value:"none",label:(0,h.__)("Show Timer at Zero","kadence-blocks"),disabled:!1},{value:"hide",label:(0,h.__)("Hide (Pro addon)","kadence-blocks"),disabled:!0},{value:"message",label:(0,h.__)("Replace with Content (Pro addon)","kadence-blocks"),disabled:!0},{value:"redirect",label:(0,h.__)("Redirect (Pro addon)","kadence-blocks"),disabled:!0}],W=[{value:"daily",label:(0,h.__)("Daily","kadence-blocks"),disabled:!1},{value:"weekly",label:(0,h.__)("Weekly","kadence-blocks"),disabled:!1},{value:"monthly",label:(0,h.__)("Monthly","kadence-blocks"),disabled:!1},{value:"yearly",label:(0,h.__)("Yearly","kadence-blocks"),disabled:!1}],j=/[\s#]/g;(0,z.registerBlockType)("kadence/countdown",{...L,title:(0,h._x)("Countdown","block title","kadence-blocks"),description:(0,h.__)("The countdown timer","kadence-blocks"),keywords:[(0,h.__)("countdown","kadence-blocks"),(0,h.__)("timer","kadence-blocks"),"KB"],icon:i.countdownIcon,edit:function(e){const{attributes:t,setAttributes:o,className:a,clientId:r}=e,{uniqueID:l,expireAction:d,units:s,enableTimer:c,evergreenHours:u,evergreenMinutes:p,repeat:m,stopRepeating:g,frequency:v,redirectURL:b,timerLayout:f,date:k,endDate:y,timestamp:T,evergreenReset:E,timezone:P,timeOffset:z,preLabel:D,postLabel:O,daysLabel:V,hoursLabel:G,minutesLabel:K,secondsLabel:Y,counterAlign:J,campaignID:Z,numberColor:Q,numberFont:X,labelColor:ee,labelFont:te,preLabelColor:oe,preLabelFont:ne,postLabelColor:ie,postLabelFont:ae,border:re,borderRadius:le,borderWidth:de,mobileBorderWidth:se,tabletBorderWidth:ce,background:ue,vsdesk:pe,vstablet:me,vsmobile:ge,countdownType:ve,paddingType:be,marginType:fe,containerMobilePadding:ke,containerTabletPadding:ye,containerPadding:he,containerMobileMargin:we,containerTabletMargin:Te,containerMargin:Se,itemBorder:Ce,itemBorderWidth:_e,itemBackground:Ee,itemTabletBorderWidth:Pe,itemMobileBorderWidth:ze,itemPadding:De,itemTabletPadding:Oe,itemMobilePadding:xe,itemBorderRadius:Ie,itemPaddingType:Be,timeNumbers:Le,countdownDivider:Fe,revealOnLoad:Me,evergreenStrict:He}=t,{addUniqueID:$e}=(0,C.useDispatch)("kadenceblocks/data"),{selectBlock:Re}=(0,C.useDispatch)("core/block-editor"),{isUniqueID:Ne,isUniqueBlock:Ae,previewDevice:qe,parentData:Ue,isNested:We,parentBlock:je}=(0,C.useSelect)((e=>{const{getBlock:t,getBlockParentsByBlockName:o}=e("core/block-editor"),n=o(r,"kadence/countdown"),i=n.length&&void 0!==n[0]&&""!==n[0];return{isUniqueID:t=>e("kadenceblocks/data").isUniqueID(t),isUniqueBlock:t=>e("kadenceblocks/data").isUniqueBlock(t,r),previewDevice:e("kadenceblocks/data").getPreviewDeviceType(),parentData:{rootBlock:e("core/block-editor").getBlock(e("core/block-editor").getBlockHierarchyRootClientId(r)),postId:e("core/editor")?.getCurrentPostId()?e("core/editor")?.getCurrentPostId():"",reusableParent:e("core/block-editor").getBlockAttributes(e("core/block-editor").getBlockParentsByBlockName(r,"core/block").slice(-1)[0]),editedPostId:!!e("core/edit-site")&&e("core/edit-site").getEditedPostId()},isNested:i,parentBlock:i?t(n[0]):""}}),[r]);(0,S.useEffect)((()=>{(0,_.setBlockDefaults)("kadence/countdown",t);const n=(0,_.getPostOrFseId)(e,Ue),i=(0,_.getUniqueId)(l,r,Ne,Ae,n);if(i!==l?(t.uniqueID=i,o({uniqueID:i}),$e(i,r)):$e(l,r),le&&le[0]===le[1]&&le[0]===le[2]&&le[0]===le[3]?Ye("linked"):Ye("individual"),!k){dt=(0,F.getSettings)();const{timezone:e}=dt,t=new Date,n=new Date;n.setDate(t.getDate()+2);const i=e&&e.offset?e.offset:0,a=st(n,i);o({date:n,timestamp:a,timezone:e&&e.string?e.string:"",timeOffset:i})}}),[]);const[Ve,Ge]=(0,S.useState)("individual"),[Ke,Ye]=(0,S.useState)("linked"),[Je,Ze]=(0,S.useState)("individual"),[Qe,Xe]=(0,S.useState)("linked"),[et,tt]=(0,S.useState)("linked"),[ot,nt]=(0,S.useState)(!1),[it,at]=(0,S.useState)("general"),rt=(0,_.mouseOverVisualizer)(),lt=(0,_.mouseOverVisualizer)();let dt={};const st=(e,t)=>{const o=(new Date).getTimezoneOffset()/60*-1;return Number(t)===o?new Date(e).getTime():ct(e,t)},ct=(e,t)=>{const o=(new Date).getTimezoneOffset()/60*-1-t,n=new Date(e);return new Date(n.getTime()+60*o*60*1e3).getTime()},ut=(0,M.applyFilters)("kadence.countdownTypes",q),pt=(0,M.applyFilters)("kadence.countdownActions",U);dt=(0,F.getSettings)();const mt=/a(?!\\)/i.test(dt.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join("")),gt=e=>{const t=s.map(((t,o)=>(0===o&&(t={...t,...e}),t)));o({units:t})},vt=e=>{const t=X.map(((t,o)=>(0===o&&(t={...t,...e}),t)));o({numberFont:t})},bt=e=>{const t=te.map(((t,o)=>(0===o&&(t={...t,...e}),t)));o({labelFont:t})},ft=e=>{const t=ne.map(((t,o)=>(0===o&&(t={...t,...e}),t)));o({preLabelFont:t})},kt=e=>{const t=ae.map(((t,o)=>(0===o&&(t={...t,...e}),t)));o({postLabelFont:t})},yt={google:{families:[(void 0!==X&&void 0!==X[0]&&void 0!==X[0].family&&""!==X[0].family&&X[0].google?X[0].family:"")+(void 0!==X&&void 0!==X[0]&&void 0!==X[0].variant&&""!==X[0].variant?":"+X[0].variant:"")]}},ht={google:{families:[(void 0!==te&&void 0!==te[0]&&void 0!==te[0].family&&""!==te[0].family&&te[0].google?te[0].family:"")+(void 0!==te&&void 0!==te[0]&&void 0!==te[0].variant&&""!==te[0].variant?":"+te[0].variant:"")]}},wt={google:{families:[(void 0!==ne&&void 0!==ne[0]&&void 0!==ne[0].family&&""!==ne[0].family&&ne[0].google?ne[0].family:"")+(void 0!==ne&&void 0!==ne[0]&&void 0!==ne[0].variant&&""!==ne[0].variant?":"+ne[0].variant:"")]}},Tt={google:{families:[(void 0!==ae&&void 0!==ae[0]&&void 0!==ae[0].family&&""!==ae[0].family&&ae[0].google?ae[0].family:"")+(void 0!==ae&&void 0!==ae[0]&&void 0!==ae[0].variant&&""!==ae[0].variant?":"+ae[0].variant:"")]}},St=void 0!==X&&void 0!==X[0]&&void 0!==X[0].family&&""!==X[0].family&&X[0].google?yt:"",Ct=void 0!==te&&void 0!==te[0]&&void 0!==te[0].family&&""!==te[0].family&&te[0].google?ht:"",_t=void 0!==ne&&void 0!==ne[0]&&void 0!==ne[0].family&&""!==ne[0].family&&ne[0].google?wt:"",Et=void 0!==ae&&void 0!==ae[0]&&void 0!==ae[0].family&&""!==ae[0].family&&ae[0].google?Tt:"",Pt="message"===d?R:$,zt="message"===d?N:A,Dt="em"===fe||"rem"===fe?-25:-999,Ot="em"===fe||"rem"===fe?25:999,xt="em"===fe||"rem"===fe?.1:1,It="em"===be||"rem"===be?25:999,Bt="em"===be||"rem"===be?.1:1,Lt=void 0!==be?be:"px",Ft="em"===Be||"rem"===Be?12:999,Mt="em"===Be||"rem"===Be?.1:1,Ht=void 0!==Be?Be:"px",$t=void 0!==fe?fe:"px",Rt=(0,_.getPreviewSize)(qe,void 0!==Se&&void 0!==Se[0]?Se[0]:"",void 0!==Te&&void 0!==Te[0]?Te[0]:"",void 0!==we&&void 0!==we[0]?we[0]:""),Nt=(0,_.getPreviewSize)(qe,void 0!==Se&&void 0!==Se[1]?Se[1]:"",void 0!==Te&&void 0!==Te[1]?Te[1]:"",void 0!==we&&void 0!==we[1]?we[1]:""),At=(0,_.getPreviewSize)(qe,void 0!==Se&&void 0!==Se[2]?Se[2]:"",void 0!==Te&&void 0!==Te[2]?Te[2]:"",void 0!==we&&void 0!==we[2]?we[2]:""),qt=(0,_.getPreviewSize)(qe,void 0!==Se&&void 0!==Se[3]?Se[3]:"",void 0!==Te&&void 0!==Te[3]?Te[3]:"",void 0!==we&&void 0!==we[3]?we[3]:""),Ut=(0,_.getPreviewSize)(qe,void 0!==he&&void 0!==he[0]?he[0]:"",void 0!==ye&&void 0!==ye[0]?ye[0]:"",void 0!==ke&&void 0!==ke[0]?ke[0]:""),Wt=(0,_.getPreviewSize)(qe,void 0!==he&&void 0!==he[1]?he[1]:"",void 0!==ye&&void 0!==ye[1]?ye[1]:"",void 0!==ke&&void 0!==ke[1]?ke[1]:""),jt=(0,_.getPreviewSize)(qe,void 0!==he&&void 0!==he[2]?he[2]:"",void 0!==ye&&void 0!==ye[2]?ye[2]:"",void 0!==ke&&void 0!==ke[2]?ke[2]:""),Vt=(0,_.getPreviewSize)(qe,void 0!==he&&void 0!==he[3]?he[3]:"",void 0!==ye&&void 0!==ye[3]?ye[3]:"",void 0!==ke&&void 0!==ke[3]?ke[3]:""),Gt=(0,_.getPreviewSize)(qe,void 0!==de?de[0]:"",void 0!==ce?ce[0]:"",void 0!==se?se[0]:""),Kt=(0,_.getPreviewSize)(qe,void 0!==de?de[1]:"",void 0!==ce?ce[1]:"",void 0!==se?se[1]:""),Yt=(0,_.getPreviewSize)(qe,void 0!==de?de[2]:"",void 0!==ce?ce[2]:"",void 0!==se?se[2]:""),Jt=(0,_.getPreviewSize)(qe,void 0!==de?de[3]:"",void 0!==ce?ce[3]:"",void 0!==se?se[3]:""),Zt=(0,_.getPreviewSize)(qe,void 0!==De&&void 0!==De[0]?De[0]:"",void 0!==Oe&&void 0!==Oe[0]?Oe[0]:"",void 0!==xe&&void 0!==xe[0]?xe[0]:""),Qt=(0,_.getPreviewSize)(qe,void 0!==De&&void 0!==De[1]?De[1]:"",void 0!==Oe&&void 0!==Oe[1]?Oe[1]:"",void 0!==xe&&void 0!==xe[1]?xe[1]:""),Xt=(0,_.getPreviewSize)(qe,void 0!==De&&void 0!==De[2]?De[2]:"",void 0!==Oe&&void 0!==Oe[2]?Oe[2]:"",void 0!==xe&&void 0!==xe[2]?xe[2]:""),eo=(0,_.getPreviewSize)(qe,void 0!==De&&void 0!==De[3]?De[3]:"",void 0!==Oe&&void 0!==Oe[3]?Oe[3]:"",void 0!==xe&&void 0!==xe[3]?xe[3]:""),to=(0,_.getPreviewSize)(qe,void 0!==_e?_e[0]:"",void 0!==Pe?Pe[0]:"",void 0!==ze?ze[0]:""),oo=(0,_.getPreviewSize)(qe,void 0!==_e?_e[1]:"",void 0!==Pe?Pe[1]:"",void 0!==ze?ze[1]:""),no=(0,_.getPreviewSize)(qe,void 0!==_e?_e[2]:"",void 0!==Pe?Pe[2]:"",void 0!==ze?ze[2]:""),io=(0,_.getPreviewSize)(qe,void 0!==_e?_e[3]:"",void 0!==Pe?Pe[3]:"",void 0!==ze?ze[3]:""),ao=void 0!==X&&void 0!==X[0]&&""!==X[0].sizeType?X[0].sizeType:"px",ro=void 0!==X&&void 0!==X[0]&&""!==X[0].lineType?X[0].lineType:"px",lo=void 0!==X&&void 0!==X[0]&&""!==X[0].letterType?X[0].letterType:"px",so=(0,_.getPreviewSize)(qe,void 0!==X&&void 0!==X[0]&&void 0!==X[0].size&&void 0!==X[0].size[0]&&""!==X[0].size[0]?X[0].size[0]:"",void 0!==X&&void 0!==X[0]&&void 0!==X[0].size&&void 0!==X[0].size[1]&&""!==X[0].size[1]?X[0].size[1]:"",void 0!==X&&void 0!==X[0]&&void 0!==X[0].size&&void 0!==X[0].size[2]&&""!==X[0].size[2]?X[0].size[2]:""),co=(0,_.getPreviewSize)(qe,void 0!==X&&void 0!==X[0]&&void 0!==X[0].lineHeight&&void 0!==X[0].lineHeight[0]&&""!==X[0].lineHeight[0]?X[0].lineHeight[0]:"",void 0!==X&&void 0!==X[0]&&void 0!==X[0].lineHeight&&void 0!==X[0].lineHeight[1]&&""!==X[0].lineHeight[1]?X[0].lineHeight[1]:"",void 0!==X&&void 0!==X[0]&&void 0!==X[0].lineHeight&&void 0!==X[0].lineHeight[2]&&""!==X[0].lineHeight[2]?X[0].lineHeight[2]:""),uo=(0,_.getPreviewSize)(qe,void 0!==X&&void 0!==X[0]&&void 0!==X[0].letterSpacing&&void 0!==X[0].letterSpacing[0]&&""!==X[0].letterSpacing[0]?X[0].letterSpacing[0]:"",void 0!==X&&void 0!==X[0]&&void 0!==X[0].letterSpacing&&void 0!==X[0].letterSpacing[1]&&""!==X[0].letterSpacing[1]?X[0].letterSpacing[1]:"",void 0!==X&&void 0!==X[0]&&void 0!==X[0].letterSpacing&&void 0!==X[0].letterSpacing[2]&&""!==X[0].letterSpacing[2]?X[0].letterSpacing[2]:""),po=void 0!==te&&void 0!==te[0]&&""!==te[0].sizeType?te[0].sizeType:"px",mo=void 0!==te&&void 0!==te[0]&&""!==te[0].lineType?te[0].lineType:"px",go=void 0!==te&&void 0!==te[0]&&""!==te[0].letterType?te[0].letterType:"px",vo=(0,_.getPreviewSize)(qe,void 0!==te&&void 0!==te[0]&&void 0!==te[0].size&&void 0!==te[0].size[0]&&""!==te[0].size[0]?te[0].size[0]:"",void 0!==te&&void 0!==te[0]&&void 0!==te[0].size&&void 0!==te[0].size[1]&&""!==te[0].size[1]?te[0].size[1]:"",void 0!==te&&void 0!==te[0]&&void 0!==te[0].size&&void 0!==te[0].size[2]&&""!==te[0].size[2]?te[0].size[2]:""),bo=(0,_.getPreviewSize)(qe,void 0!==te&&void 0!==te[0]&&void 0!==te[0].lineHeight&&void 0!==te[0].lineHeight[0]&&""!==te[0].lineHeight[0]?te[0].lineHeight[0]:"",void 0!==te&&void 0!==te[0]&&void 0!==te[0].lineHeight&&void 0!==te[0].lineHeight[1]&&""!==te[0].lineHeight[1]?te[0].lineHeight[1]:"",void 0!==te&&void 0!==te[0]&&void 0!==te[0].lineHeight&&void 0!==te[0].lineHeight[2]&&""!==te[0].lineHeight[2]?te[0].lineHeight[2]:""),fo=(0,_.getPreviewSize)(qe,void 0!==te&&void 0!==te[0]&&void 0!==te[0].letterSpacing&&void 0!==te[0].letterSpacing[0]&&""!==te[0].letterSpacing[0]?te[0].letterSpacing[0]:"",void 0!==te&&void 0!==te[0]&&void 0!==te[0].letterSpacing&&void 0!==te[0].letterSpacing[1]&&""!==te[0].letterSpacing[1]?te[0].letterSpacing[1]:"",void 0!==te&&void 0!==te[0]&&void 0!==te[0].letterSpacing&&void 0!==te[0].letterSpacing[2]&&""!==te[0].letterSpacing[2]?te[0].letterSpacing[2]:""),ko=void 0!==ne&&void 0!==ne[0]&&""!==ne[0].sizeType?ne[0].sizeType:"px",yo=void 0!==ne&&void 0!==ne[0]&&""!==ne[0].lineType?ne[0].lineType:"px",ho=void 0!==ne&&void 0!==ne[0]&&""!==ne[0].letterType?ne[0].letterType:"px",wo=(0,_.getPreviewSize)(qe,void 0!==ne&&void 0!==ne[0]&&void 0!==ne[0].size&&void 0!==ne[0].size[0]&&""!==ne[0].size[0]?ne[0].size[0]:"",void 0!==ne&&void 0!==ne[0]&&void 0!==ne[0].size&&void 0!==ne[0].size[1]&&""!==ne[0].size[1]?ne[0].size[1]:"",void 0!==ne&&void 0!==ne[0]&&void 0!==ne[0].size&&void 0!==ne[0].size[2]&&""!==ne[0].size[2]?ne[0].size[2]:""),To=(0,_.getPreviewSize)(qe,void 0!==ne&&void 0!==ne[0]&&void 0!==ne[0].lineHeight&&void 0!==ne[0].lineHeight[0]&&""!==ne[0].lineHeight[0]?ne[0].lineHeight[0]:"",void 0!==ne&&void 0!==ne[0]&&void 0!==ne[0].lineHeight&&void 0!==ne[0].lineHeight[1]&&""!==ne[0].lineHeight[1]?ne[0].lineHeight[1]:"",void 0!==ne&&void 0!==ne[0]&&void 0!==ne[0].lineHeight&&void 0!==ne[0].lineHeight[2]&&""!==ne[0].lineHeight[2]?ne[0].lineHeight[2]:""),So=(0,_.getPreviewSize)(qe,void 0!==ne&&void 0!==ne[0]&&void 0!==ne[0].letterSpacing&&void 0!==ne[0].letterSpacing[0]&&""!==ne[0].letterSpacing[0]?ne[0].letterSpacing[0]:"",void 0!==ne&&void 0!==ne[0]&&void 0!==ne[0].letterSpacing&&void 0!==ne[0].letterSpacing[1]&&""!==ne[0].letterSpacing[1]?ne[0].letterSpacing[1]:"",void 0!==ne&&void 0!==ne[0]&&void 0!==ne[0].letterSpacing&&void 0!==ne[0].letterSpacing[2]&&""!==ne[0].letterSpacing[2]?ne[0].letterSpacing[2]:""),Co=void 0!==ae&&void 0!==ae[0]&&""!==ae[0].sizeType?ae[0].sizeType:"px",_o=void 0!==ae&&void 0!==ae[0]&&""!==ae[0].lineType?ae[0].lineType:"px",Eo=void 0!==ae&&void 0!==ae[0]&&""!==ae[0].letterType?ae[0].letterType:"px",Po=(0,_.getPreviewSize)(qe,void 0!==ae&&void 0!==ae[0]&&void 0!==ae[0].size&&void 0!==ae[0].size[0]&&""!==ae[0].size[0]?ae[0].size[0]:"",void 0!==ae&&void 0!==ae[0]&&void 0!==ae[0].size&&void 0!==ae[0].size[1]&&""!==ae[0].size[1]?ae[0].size[1]:"",void 0!==ae&&void 0!==ae[0]&&void 0!==ae[0].size&&void 0!==ae[0].size[2]&&""!==ae[0].size[2]?ae[0].size[2]:""),zo=(0,_.getPreviewSize)(qe,void 0!==ae&&void 0!==ae[0]&&void 0!==ae[0].lineHeight&&void 0!==ae[0].lineHeight[0]&&""!==ae[0].lineHeight[0]?ae[0].lineHeight[0]:"",void 0!==ae&&void 0!==ae[0]&&void 0!==ae[0].lineHeight&&void 0!==ae[0].lineHeight[1]&&""!==ae[0].lineHeight[1]?ae[0].lineHeight[1]:"",void 0!==ae&&void 0!==ae[0]&&void 0!==ae[0].lineHeight&&void 0!==ae[0].lineHeight[2]&&""!==ae[0].lineHeight[2]?ae[0].lineHeight[2]:""),Do=(0,_.getPreviewSize)(qe,void 0!==ae&&void 0!==ae[0]&&void 0!==ae[0].letterSpacing&&void 0!==ae[0].letterSpacing[0]&&""!==ae[0].letterSpacing[0]?ae[0].letterSpacing[0]:"",void 0!==ae&&void 0!==ae[0]&&void 0!==ae[0].letterSpacing&&void 0!==ae[0].letterSpacing[1]&&""!==ae[0].letterSpacing[1]?ae[0].letterSpacing[1]:"",void 0!==ae&&void 0!==ae[0]&&void 0!==ae[0].letterSpacing&&void 0!==ae[0].letterSpacing[2]&&""!==ae[0].letterSpacing[2]?ae[0].letterSpacing[2]:""),Oo=x()({"kb-countdown-container":!0,[`kb-countdown-container-${l}`]:l,[`kb-countdown-timer-layout-${f}`]:f&&c,"kb-countdown-enable-dividers":"inline"!==f&&Fe&&c,"kb-countdown-has-timer":c,"kb-countdown-preview-expired":ot,[`kb-countdown-align-${J[0]}`]:!(void 0===J||void 0===J[0]||!c)&&J[0],[`kb-countdown-align-tablet-${J[1]}`]:!(void 0===J||void 0===J[1]||!c)&&J[1],[`kb-countdown-align-mobile-${J[2]}`]:!(void 0===J||void 0===J[2]||!c)&&J[2],"kvs-lg-false":"undefined"!==pe&&pe,"kvs-md-false":"undefined"!==me&&me,"kvs-sm-false":"undefined"!==ge&&ge,[a]:a});We&&je&&(void 0!==je.attributes.countdownType&&je.attributes.countdownType!==ve&&o({countdownType:je.attributes.countdownType}),void 0!==je.attributes.evergreenMinutes&&je.attributes.evergreenMinutes!==p&&o({evergreenMinutes:je.attributes.evergreenMinutes}),void 0!==je.attributes.timeOffset&&je.attributes.timeOffset!==z&&o({timeOffset:je.attributes.timeOffset}),void 0!==je.attributes.timezone&&je.attributes.timezone!==P&&o({timezone:je.attributes.timezone}),void 0!==je.attributes.timestamp&&je.attributes.timestamp!==T&&o({timestamp:je.attributes.timestamp}),void 0!==je.attributes.evergreenHours&&je.attributes.evergreenHours!==u&&o({evergreenHours:je.attributes.evergreenHours}),void 0!==je.attributes.date&&je.attributes.date!==k&&o({date:je.attributes.date}),void 0!==je.attributes.campaignID&&je.attributes.campaignID!==Z&&o({campaignID:je.attributes.campaignID}),void 0!==je.attributes.evergreenReset&&je.attributes.evergreenReset!==E&&o({evergreenReset:je.attributes.evergreenReset}),void 0!==je.attributes.evergreenStrict&&je.attributes.evergreenStrict!==He&&o({evergreenStrict:je.attributes.evergreenStrict}));const xo=["date","timestamp"],Io=(0,w.useBlockProps)({className:Oo});return(0,n.createElement)("div",{...Io,style:{background:ue?(0,_.KadenceColorOutput)(ue):void 0,borderColor:re?(0,_.KadenceColorOutput)(re):void 0,borderTopWidth:Gt?Gt+"px":void 0,borderRightWidth:Kt?Kt+"px":void 0,borderBottomWidth:Yt?Yt+"px":void 0,borderLeftWidth:Jt?Jt+"px":void 0,borderTopLeftRadius:le&&le[0]?le[0]+"px":void 0,borderTopRightRadius:le&&le[1]?le[1]+"px":void 0,borderBottomRightRadius:le&&le[2]?le[2]+"px":void 0,borderBottomLeftRadius:le&&le[3]?le[3]+"px":void 0,paddingTop:""!==Ut?(0,_.getSpacingOptionOutput)(Ut,Lt):void 0,paddingRight:""!==Wt?(0,_.getSpacingOptionOutput)(Wt,Lt):void 0,paddingBottom:""!==jt?(0,_.getSpacingOptionOutput)(jt,Lt):void 0,paddingLeft:""!==Vt?(0,_.getSpacingOptionOutput)(Vt,Lt):void 0,marginTop:Rt?(0,_.getSpacingOptionOutput)(Rt,$t):void 0,marginRight:Nt?(0,_.getSpacingOptionOutput)(Nt,$t):void 0,marginBottom:At?(0,_.getSpacingOptionOutput)(At,$t):void 0,marginLeft:qt?(0,_.getSpacingOptionOutput)(qt,$t):void 0}},(0,n.createElement)("style",null,`.kb-countdown-container #kb-timer-${l} .kb-countdown-date-item .kb-countdown-number {`,Q?`color: ${(0,_.KadenceColorOutput)(Q)};`:"",X&&X[0]&&X[0].family?`font-family: ${X[0].family};`:"",X&&X[0]&&X[0].textTransform?`text-transform: ${X[0].textTransform};`:"",X&&X[0]&&X[0].weight?`font-weight: ${X[0].weight};`:"",X&&X[0]&&X[0].style?`font-style: ${X[0].style};`:"",so?`font-size: ${(0,_.getFontSizeOptionOutput)(so,ao)};`:"",co?`line-height: ${co+ro};`:"",uo?`letter-spacing: ${uo+lo};`:"","}",`.kb-countdown-container #kb-timer-${l} .kb-countdown-date-item {`,so?`font-size: ${(0,_.getFontSizeOptionOutput)(so,ao)};`:"","}",`#kb-timer-${l} .kb-countdown-date-item .kb-countdown-label {`,ee?`color: ${(0,_.KadenceColorOutput)(ee)};`:"",te&&te[0]&&te[0].family?`font-family: ${te[0].family};`:"",te&&te[0]&&te[0].textTransform?`text-transform: ${te[0].textTransform};`:"",te&&te[0]&&te[0].weight?`font-weight: ${te[0].weight};`:"",te&&te[0]&&te[0].style?`font-style: ${te[0].style};`:"",vo?`font-size: ${(0,_.getFontSizeOptionOutput)(vo,po)};`:"",bo?`line-height: ${bo+mo};`:"",fo?`letter-spacing: ${fo+go};`:"","}",""!==D&&(0,n.createElement)(n.Fragment,null,`#kb-timer-${l} .kb-countdown-item.kb-pre-timer {`,oe?`color: ${(0,_.KadenceColorOutput)(oe)};`:"",ne&&ne[0]&&ne[0].family?`font-family: ${ne[0].family};`:"",ne&&ne[0]&&ne[0].textTransform?`text-transform: ${ne[0].textTransform};`:"",ne&&ne[0]&&ne[0].weight?`font-weight: ${ne[0].weight};`:"",ne&&ne[0]&&ne[0].style?`font-style: ${ne[0].style};`:"",wo?`font-size: ${(0,_.getFontSizeOptionOutput)(wo,ko)};`:"",To?`line-height: ${To+yo};`:"",So?`letter-spacing: ${So+ho};`:"","}"),""!==O&&(0,n.createElement)(n.Fragment,null,`#kb-timer-${l} .kb-countdown-item.kb-post-timer {`,ie?`color: ${(0,_.KadenceColorOutput)(ie)};`:"",ae&&ae[0]&&ae[0].family?`font-family: ${ae[0].family};`:"",ae&&ae[0]&&ae[0].textTransform?`text-transform: ${ae[0].textTransform};`:"",ae&&ae[0]&&ae[0].weight?`font-weight: ${ae[0].weight};`:"",ae&&ae[0]&&ae[0].style?`font-style: ${ae[0].style};`:"",Po?`font-size: ${(0,_.getFontSizeOptionOutput)(Po,Co)};`:"",zo?`line-height: ${zo+_o};`:"",Do?`letter-spacing: ${Do+Eo};`:"","}"),`.kb-countdown-container #kb-timer-${l} .kb-countdown-date-item:not( .kb-countdown-divider-item ) {`,Ee?`background: ${(0,_.KadenceColorOutput)(Ee)};`:"",Ce?`border-color: ${(0,_.KadenceColorOutput)(Ce)};`:"",Ie&&Ie[0]?`border-top-left-radius: ${Ie[0]+"px"};`:"",Ie&&Ie[1]?`border-top-right-radius: ${Ie[1]+"px"};`:"",Ie&&Ie[2]?`border-bottom-right-radius: ${Ie[2]+"px"};`:"",Ie&&Ie[3]?`border-bottom-left-radius: ${Ie[3]+"px"};`:"",to?`border-top-width: ${to+"px"};`:"",oo?`border-right-width: ${oo+"px"};`:"",no?`border-bottom-width: ${no+"px"};`:"",io?`border-left-width: ${io+"px"};`:"",Zt?`padding-top: ${Zt+Ht};`:"",Qt?`padding-right: ${Qt+Ht};`:"",Xt?`padding-bottom: ${Xt+Ht};`:"",eo?`padding-left: ${eo+Ht};`:"","}",`.kb-countdown-container #kb-timer-${l} .kb-countdown-date-item.kb-countdown-divider-item {`,to?`border-top-width: ${to+"px"};`:"",no?`border-bottom-width: ${no+"px"};`:"",Zt?`padding-top: ${Zt+Ht};`:"",Xt?`padding-bottom: ${Xt+Ht};`:"","}"),(0,_.showSettings)("allSettings","kadence/countdown")&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(w.BlockControls,null,c&&(0,n.createElement)(w.AlignmentToolbar,{value:void 0!==J&&void 0!==J[0]?J[0]:"",onChange:e=>o({counterAlign:[e,void 0!==J&&void 0!==J[1]?J[1]:"",void 0!==J&&void 0!==J[2]?J[2]:""]})}),"message"===d&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(H.ToolbarGroup,null,(0,n.createElement)(H.Button,{className:"components-tab-button",isPressed:!ot,onClick:()=>nt(!1)},(0,n.createElement)("span",null,(0,h.__)("Live","kadence-blocks"))),(0,n.createElement)(H.Button,{className:"components-tab-button",isPressed:ot,onClick:()=>nt(!0)},(0,n.createElement)("span",null,(0,h.__)("Expired","kadence-blocks"))))),(0,n.createElement)(B.CopyPasteAttributes,{attributes:t,excludedAttrs:xo,defaultAttributes:L.attributes,blockSlug:L.name,onPaste:e=>o(e)})),(0,n.createElement)(w.InspectorControls,null,(0,n.createElement)(B.InspectorControlTabs,{panelName:"countdown",setActiveTab:e=>at(e),activeTab:it}),"general"===it&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(H.Panel,{className:"components-panel__body is-opened"},1===We&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)("h2",null,(0,h.__)("Countdown Time Settings Synced to Parent Block","kadence-blocks")),(0,n.createElement)(H.Button,{className:"kb-select-parent-button",isSecondary:!0,onClick:()=>Re(je.clientId)},(0,n.createElement)("span",null,(0,h.__)("Edit Settings","kadence-blocks")))),!We&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(H.SelectControl,{label:(0,h.__)("Countdown Type","kadence-blocks"),options:ut,value:ve,onChange:e=>o({countdownType:e})}),"date"===ve&&(0,n.createElement)("div",{className:"components-base-control kb-datepicker-fix"},(0,n.createElement)(H.DateTimePicker,{currentDate:k||void 0,onChange:e=>{(e=>{const t=(0,I.get)(dt,["timezone","string"],""),n=(0,I.get)(dt,["timezone","offset"],0),i=st(e,n);o({date:e,timestamp:i,timezone:t,timeOffset:n})})(e)},is12Hour:mt,help:(0,h.__)("Date set according to your sites timezone","kadence-blocks")})),"evergreen"===ve&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(B.RangeControl,{label:(0,h.__)("Evergreen Hours","kadence-blocks"),value:u,onChange:e=>{(e=>{const t=void 0!==e?e:0,n=(e=>{const t=new Date;return t.setTime(t.getTime()+60*Number(e)*60*1e3),t.setTime(t.getTime()+60*(p?Number(p):0)*1e3),t.getTime()})(t);o({evergreenHours:t,timestamp:n})})(e)},min:0,max:100,step:1}),(0,n.createElement)(B.RangeControl,{label:(0,h.__)("Evergreen Minutes","kadence-blocks"),value:p,onChange:e=>{(e=>{const t=void 0!==e?e:0,n=(e=>{const t=new Date;return t.setTime(t.getTime()+60*(u?Number(u):0)*60*1e3),t.setTime(t.getTime()+60*Number(e)*1e3),t.getTime()})(t);o({evergreenMinutes:t,timestamp:n})})(e)},min:0,max:59,step:1}),(0,n.createElement)(H.TextControl,{label:(0,h.__)("Campaign ID","kadence-blocks"),help:(0,h.__)("Create a unique ID. To reset the timer for everyone change this id. To link with other timers give them all the same ID.","kadence-blocks"),value:Z||"",onChange:e=>{e=e.replace(j,"-"),o({campaignID:e})}}),(0,n.createElement)(B.RangeControl,{label:(0,h.__)("Amount of days to wait until the evergreen is reset for visitors","kadence-blocks"),value:E,onChange:e=>{o({evergreenReset:e})},min:0,max:100,step:1}),(0,n.createElement)(H.ToggleControl,{label:(0,h.__)("Verify by IP Address","kadence-blocks"),checked:He,onChange:e=>o({evergreenStrict:e}),help:(0,h.__)("This will add a delay to the rendering of the countdown if no cookie found as it will query the server database to see if the user can be found by their IP address","kadence-blocks")})),(0,n.createElement)(H.SelectControl,{label:(0,h.__)("Action on Expire","kadence-blocks"),options:pt,value:d,onChange:e=>o({expireAction:e})}),"redirect"===d&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(B.URLInputControl,{label:(0,h.__)("Redirect URL","kadence-blocks"),url:b,onChangeUrl:e=>o({redirectURL:e}),additionalControls:!1})),d&&"none"!==d&&(0,n.createElement)(H.ToggleControl,{label:(0,h.__)("Reveal onLoad","kadence-blocks"),checked:Me,onChange:e=>o({revealOnLoad:e})}))),"true"===kadence_blocks_params.pro&&"evergreen"!==ve&&(0,n.createElement)(B.KadencePanelBody,{title:(0,h.__)("Countdown Auto Repeater","kadence-blocks"),initialOpen:!1,panelName:"kb-countdown-repeater"},(0,n.createElement)(H.ToggleControl,{label:(0,h.__)("Repeat Countdown","kadence-blocks"),checked:m,onChange:e=>o({repeat:e}),help:(0,h.__)("After the coutdown reaches zero, repeat instead of expiring.","kadence-blocks")}),m&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(H.SelectControl,{label:(0,h.__)("Frequency","kadence-blocks"),options:W,value:v,onChange:e=>o({frequency:e})}),(0,n.createElement)(H.ToggleControl,{label:(0,h.__)("Repeat Until","kadence-blocks"),checked:g,onChange:e=>o({stopRepeating:e}),help:(0,h.__)("The countdown will stop repeating and expire after the given date.","kadence-blocks")}),g&&(0,n.createElement)("div",{className:"components-base-control kb-datepicker-fix"},(0,n.createElement)(H.DateTimePicker,{currentDate:y||void 0,onChange:e=>o({endDate:e}),is12Hour:mt})))),(0,n.createElement)(B.KadencePanelBody,{title:(0,h.__)("Countdown Layout","kadence-blocks"),initialOpen:!1,panelName:"kb-countdown-layout"},d&&"none"!==d&&(0,n.createElement)(H.ToggleControl,{label:(0,h.__)("Display Countdown","kadence-blocks"),checked:c,onChange:e=>o({enableTimer:e})}),c&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(B.ResponsiveAlignControls,{label:(0,h.__)("Countdown Alignment","kadence-blocks"),value:void 0!==J&&void 0!==J[0]?J[0]:"",tabletValue:void 0!==J&&void 0!==J[1]?J[1]:"",mobileValue:void 0!==J&&void 0!==J[2]?J[2]:"",onChange:e=>o({counterAlign:[e,void 0!==J&&void 0!==J[1]?J[1]:"",void 0!==J&&void 0!==J[2]?J[2]:""]}),onChangeTablet:e=>o({counterAlign:[void 0!==J&&void 0!==J[0]?J[0]:"",e,void 0!==J&&void 0!==J[2]?J[2]:""]}),onChangeMobile:e=>o({counterAlign:[void 0!==J&&void 0!==J[0]?J[0]:"",void 0!==J&&void 0!==J[1]?J[1]:"",e]})}),(0,n.createElement)(B.KadenceRadioButtons,{label:(0,h.__)("Countdown Layout","kadence-blocks"),value:f,options:[{value:"block",label:(0,h.__)("Block","kadence-blocks")},{value:"inline",label:(0,h.__)("Inline","kadence-blocks")}],onChange:e=>o({timerLayout:e})}),"inline"!==f&&(0,n.createElement)(H.ToggleControl,{label:(0,h.__)("Enable Divider","kadence-blocks"),checked:Fe,onChange:e=>o({countdownDivider:e})}),(0,n.createElement)(H.ToggleControl,{label:(0,h.__)("Enable 00 Number format","kadence-blocks"),checked:Le,onChange:e=>o({timeNumbers:e})}),(0,n.createElement)(H.TextControl,{label:(0,h.__)("Countdown Pre Text","kadence-blocks"),value:D,onChange:e=>o({preLabel:e})}),(0,n.createElement)(H.TextControl,{label:(0,h.__)("Countdown Post Text","kadence-blocks"),value:O,onChange:e=>o({postLabel:e})}),(0,n.createElement)(H.ToggleControl,{label:(0,h.__)("Display Days Unit","kadence-blocks"),checked:void 0===s||void 0===s[0]||void 0===s[0].days||s[0].days,onChange:e=>gt({days:e})}),void 0!==s&&void 0!==s[0]&&void 0!==s[0].days&&!s[0].days&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(H.ToggleControl,{label:(0,h.__)("Hours","kadence-blocks"),checked:void 0===s||void 0===s[0]||void 0===s[0].hours||s[0].hours,onChange:e=>gt({hours:e})}),void 0!==s&&void 0!==s[0]&&void 0!==s[0].hours&&!s[0].hours&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(H.ToggleControl,{label:(0,h.__)("Minutes","kadence-blocks"),checked:void 0===s||void 0===s[0]||void 0===s[0].minutes||s[0].minutes,onChange:e=>gt({minutes:e})}))),(0,n.createElement)("h2",null,(0,h.__)("Labels","kadence-blocks")),(0,n.createElement)(H.TextControl,{label:(0,h.__)("Days Label","kadence-blocks"),value:V,onChange:e=>o({daysLabel:e})}),(0,n.createElement)(H.TextControl,{label:(0,h.__)("Hours Label","kadence-blocks"),value:G,onChange:e=>o({hoursLabel:e})}),(0,n.createElement)(H.TextControl,{label:(0,h.__)("Minutes Label","kadence-blocks"),value:K,onChange:e=>o({minutesLabel:e})}),(0,n.createElement)(H.TextControl,{label:(0,h.__)("Seconds Label","kadence-blocks"),value:Y,onChange:e=>o({secondsLabel:e})})))),"style"===it&&(0,n.createElement)(n.Fragment,null,c&&(0,n.createElement)(B.KadencePanelBody,{title:(0,h.__)("Count Item Settings","kadence-blocks"),panelName:"itemStyle",blockSlug:"kadence/countdown"},(0,n.createElement)(B.PopColorControl,{label:(0,h.__)("Background Color","kadence-blocks"),value:Ee||"",default:"",onChange:e=>o({itemBackground:e})}),(0,n.createElement)(B.PopColorControl,{label:(0,h.__)("Border Color","kadence-blocks"),value:Ce||"",default:"",onChange:e=>o({itemBorder:e})}),(0,n.createElement)(B.ResponsiveMeasurementControls,{label:(0,h.__)("Border Width","kadence-blocks"),value:_e,control:Je,tabletValue:Pe,mobileValue:ze,onChange:e=>o({itemBorderWidth:e}),onChangeTablet:e=>o({itemTabletBorderWidth:e}),onChangeMobile:e=>o({itemMobileBorderWidth:e}),onChangeControl:e=>Ze(e),min:0,max:40,step:1,unit:"px",units:["px"],showUnit:!0,preset:[0,1,2,3,4,5,6,7,8,9]}),(0,n.createElement)(B.MeasurementControls,{label:(0,h.__)("Border Radius","kadence-blocks"),measurement:Ie,control:Qe,onChange:e=>o({itemBorderRadius:e}),onControl:e=>Xe(e),min:0,max:200,step:1,controlTypes:[{key:"linked",name:(0,h.__)("Linked","kadence-blocks"),icon:i.radiusLinkedIcon},{key:"individual",name:(0,h.__)("Individual","kadence-blocks"),icon:i.radiusIndividualIcon}],firstIcon:i.topLeftIcon,secondIcon:i.topRightIcon,thirdIcon:i.bottomRightIcon,fourthIcon:i.bottomLeftIcon}),(0,n.createElement)(B.ResponsiveMeasurementControls,{label:(0,h.__)("Padding","kadence-blocks"),value:De,control:et,tabletValue:Oe,mobileValue:xe,onChange:e=>o({itemPadding:e}),onChangeTablet:e=>o({itemTabletPadding:e}),onChangeMobile:e=>o({itemMobilePadding:e}),onChangeControl:e=>tt(e),min:0,max:Ft,step:Mt,unit:Be,units:["px","em","rem","%"],onUnit:e=>o({itemPaddingType:e})})),c&&(0,n.createElement)(B.KadencePanelBody,{title:(0,h.__)("Number Settings","kadence-blocks"),initialOpen:!1,panelName:"numberStyle",blockSlug:"kadence/countdown"},(0,n.createElement)(B.PopColorControl,{label:(0,h.__)("Color","kadence-blocks"),value:Q||"",default:"",onChange:e=>o({numberColor:e})}),(0,n.createElement)(B.TypographyControls,{fontGroup:"body",fontSize:X[0].size,onFontSize:e=>vt({size:e}),fontSizeType:X[0].sizeType,onFontSizeType:e=>vt({sizeType:e}),lineHeight:X[0].lineHeight,onLineHeight:e=>vt({lineHeight:e}),lineHeightType:X[0].lineType,onLineHeightType:e=>vt({lineType:e}),reLetterSpacing:X[0].letterSpacing,onLetterSpacing:e=>vt({letterSpacing:e}),letterSpacingType:X[0].letterType,onLetterSpacingType:e=>vt({letterType:e}),textTransform:X[0].textTransform,onTextTransform:e=>vt({textTransform:e}),fontFamily:X[0].family,onFontFamily:e=>vt({family:e}),onFontChange:e=>{vt({family:e.value,google:e.google})},onFontArrayChange:e=>vt(e),googleFont:X[0].google,onGoogleFont:e=>vt({google:e}),loadGoogleFont:X[0].loadGoogle,onLoadGoogleFont:e=>vt({loadGoogle:e}),fontVariant:X[0].variant,onFontVariant:e=>vt({variant:e}),fontWeight:X[0].weight,onFontWeight:e=>vt({weight:e}),fontStyle:X[0].style,onFontStyle:e=>vt({style:e}),fontSubset:X[0].subset,onFontSubset:e=>vt({subset:e})})),c&&(0,n.createElement)(B.KadencePanelBody,{title:(0,h.__)("Label Settings","kadence-blocks"),initialOpen:!1,panelName:"labelStyle",blockSlug:"kadence/countdown"},(0,n.createElement)(B.PopColorControl,{label:(0,h.__)("Color","kadence-blocks"),value:ee||"",default:"",onChange:e=>o({labelColor:e})}),(0,n.createElement)(B.TypographyControls,{fontGroup:"body",fontSize:te[0].size,onFontSize:e=>bt({size:e}),fontSizeType:te[0].sizeType,onFontSizeType:e=>bt({sizeType:e}),lineHeight:te[0].lineHeight,onLineHeight:e=>bt({lineHeight:e}),lineHeightType:te[0].lineType,onLineHeightType:e=>bt({lineType:e}),reLetterSpacing:te[0].letterSpacing,onLetterSpacing:e=>bt({letterSpacing:e}),letterSpacingType:te[0].letterType,onLetterSpacingType:e=>bt({letterType:e}),textTransform:te[0].textTransform,onTextTransform:e=>bt({textTransform:e}),fontFamily:te[0].family,onFontFamily:e=>bt({family:e}),onFontChange:e=>{bt({family:e.value,google:e.google})},onFontArrayChange:e=>bt(e),googleFont:te[0].google,onGoogleFont:e=>bt({google:e}),loadGoogleFont:te[0].loadGoogle,onLoadGoogleFont:e=>bt({loadGoogle:e}),fontVariant:te[0].variant,onFontVariant:e=>bt({variant:e}),fontWeight:te[0].weight,onFontWeight:e=>bt({weight:e}),fontStyle:te[0].style,onFontStyle:e=>bt({style:e}),fontSubset:te[0].subset,onFontSubset:e=>bt({subset:e})})),c&&""!==D&&(0,n.createElement)(B.KadencePanelBody,{title:(0,h.__)("Pre Text","kadence-blocks"),initialOpen:!1,panelName:"kb-countdown-pre-text"},(0,n.createElement)(B.PopColorControl,{label:(0,h.__)("Color","kadence-blocks"),value:oe||"",default:"",onChange:e=>o({preLabelColor:e})}),(0,n.createElement)(B.TypographyControls,{fontGroup:"body",fontSize:ne[0].size,onFontSize:e=>ft({size:e}),fontSizeType:ne[0].sizeType,onFontSizeType:e=>ft({sizeType:e}),lineHeight:ne[0].lineHeight,onLineHeight:e=>ft({lineHeight:e}),lineHeightType:ne[0].lineType,onLineHeightType:e=>ft({lineType:e}),reLetterSpacing:ne[0].letterSpacing,onLetterSpacing:e=>ft({letterSpacing:e}),letterSpacingType:ne[0].letterType,onLetterSpacingType:e=>ft({letterType:e}),textTransform:ne[0].textTransform,onTextTransform:e=>ft({textTransform:e}),fontFamily:ne[0].family,onFontFamily:e=>ft({family:e}),onFontChange:e=>{ft({family:e.value,google:e.google})},onFontArrayChange:e=>ft(e),googleFont:ne[0].google,onGoogleFont:e=>ft({google:e}),loadGoogleFont:ne[0].loadGoogle,onLoadGoogleFont:e=>ft({loadGoogle:e}),fontVariant:ne[0].variant,onFontVariant:e=>ft({variant:e}),fontWeight:ne[0].weight,onFontWeight:e=>ft({weight:e}),fontStyle:ne[0].style,onFontStyle:e=>ft({style:e}),fontSubset:ne[0].subset,onFontSubset:e=>ft({subset:e})})),c&&""!==O&&(0,n.createElement)(B.KadencePanelBody,{title:(0,h.__)("Post Text","kadence-blocks"),initialOpen:!1,panelName:"kb-countdown-post-text"},(0,n.createElement)(B.PopColorControl,{label:(0,h.__)("Color","kadence-blocks"),value:ie||"",default:"",onChange:e=>o({postLabelColor:e})}),(0,n.createElement)(B.TypographyControls,{fontGroup:"body",fontSize:ae[0].size,onFontSize:e=>kt({size:e}),fontSizeType:ae[0].sizeType,onFontSizeType:e=>kt({sizeType:e}),lineHeight:ae[0].lineHeight,onLineHeight:e=>kt({lineHeight:e}),lineHeightType:ae[0].lineType,onLineHeightType:e=>kt({lineType:e}),reLetterSpacing:ae[0].letterSpacing,onLetterSpacing:e=>kt({letterSpacing:e}),letterSpacingType:ae[0].letterType,onLetterSpacingType:e=>kt({letterType:e}),textTransform:ae[0].textTransform,onTextTransform:e=>kt({textTransform:e}),fontFamily:ae[0].family,onFontFamily:e=>kt({family:e}),onFontChange:e=>{kt({family:e.value,google:e.google})},onFontArrayChange:e=>kt(e),googleFont:ae[0].google,onGoogleFont:e=>kt({google:e}),loadGoogleFont:ae[0].loadGoogle,onLoadGoogleFont:e=>kt({loadGoogle:e}),fontVariant:ae[0].variant,onFontVariant:e=>kt({variant:e}),fontWeight:ae[0].weight,onFontWeight:e=>kt({weight:e}),fontStyle:ae[0].style,onFontStyle:e=>kt({style:e}),fontSubset:ae[0].subset,onFontSubset:e=>kt({subset:e})}))),"advanced"===it&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(B.KadencePanelBody,{panelName:"kb-countdown-spacing-settings"},(0,n.createElement)(B.ResponsiveMeasureRangeControl,{label:(0,h.__)("Padding","kadence-blocks"),value:he,tabletValue:ye,mobileValue:ke,onChange:e=>o({containerPadding:e}),onChangeTablet:e=>o({containerTabletPadding:e}),onChangeMobile:e=>o({containerMobilePadding:e}),min:0,max:It,step:Bt,unit:be,units:["px","em","rem","%"],onUnit:e=>o({paddingType:e}),onMouseOver:rt.onMouseOver,onMouseOut:rt.onMouseOut}),(0,n.createElement)(B.ResponsiveMeasureRangeControl,{label:(0,h.__)("Margin","kadence-blocks"),value:Se,tabletValue:Te,mobileValue:we,onChange:e=>o({containerMargin:e}),onChangeTablet:e=>o({containerTabletMargin:e}),onChangeMobile:e=>o({containerMobileMargin:e}),min:Dt,max:Ot,step:xt,unit:fe,units:["px","em","rem","%","vh"],onUnit:e=>o({marginType:e}),onMouseOver:lt.onMouseOver,onMouseOut:lt.onMouseOut,allowAuto:!0})),(0,n.createElement)("div",{className:"kt-sidebar-settings-spacer"}),(0,n.createElement)(B.KadencePanelBody,{title:(0,h.__)("Container Settings","kadence-blocks"),panelName:"containerSettings",blockSlug:"kadence/countdown"},(0,n.createElement)(B.PopColorControl,{label:(0,h.__)("Background Color","kadence-blocks"),value:ue||"",default:"",onChange:e=>o({background:e})}),(0,n.createElement)(B.PopColorControl,{label:(0,h.__)("Border Color","kadence-blocks"),value:re||"",default:"",onChange:e=>o({border:e})}),(0,n.createElement)(B.ResponsiveMeasurementControls,{label:(0,h.__)("Border Width","kadence-blocks"),value:de,control:Ve,tabletValue:ce,mobileValue:se,onChange:e=>o({borderWidth:e}),onChangeTablet:e=>o({tabletBorderWidth:e}),onChangeMobile:e=>o({mobileBorderWidth:e}),onChangeControl:e=>Ge(e),min:0,max:40,step:1,unit:"px",units:["px"],showUnit:!0,preset:[0,1,2,3,4,5,6,7,8,9]}),(0,n.createElement)(B.MeasurementControls,{label:(0,h.__)("Border Radius","kadence-blocks"),measurement:le,control:Ke,onChange:e=>o({borderRadius:e}),onControl:e=>Ye(e),min:0,max:200,step:1,controlTypes:[{key:"linked",name:(0,h.__)("Linked","kadence-blocks"),icon:i.radiusLinkedIcon},{key:"individual",name:(0,h.__)("Individual","kadence-blocks"),icon:i.radiusIndividualIcon}],firstIcon:i.topLeftIcon,secondIcon:i.topRightIcon,thirdIcon:i.bottomRightIcon,fourthIcon:i.bottomLeftIcon})),(0,n.createElement)(B.KadencePanelBody,{title:(0,h.__)("Visibility Settings","kadence-blocks"),initialOpen:!1,panelName:"visibilitySettings",blockSlug:"kadence/countdown"},(0,n.createElement)(H.ToggleControl,{label:(0,h.__)("Hide on Desktop","kadence-blocks"),checked:void 0!==pe&&pe,onChange:e=>o({vsdesk:e})}),(0,n.createElement)(H.ToggleControl,{label:(0,h.__)("Hide on Tablet","kadence-blocks"),checked:void 0!==me&&me,onChange:e=>o({vstablet:e})}),(0,n.createElement)(H.ToggleControl,{label:(0,h.__)("Hide on Mobile","kadence-blocks"),checked:void 0!==ge&&ge,onChange:e=>o({vsmobile:e})})),(0,n.createElement)(B.KadenceBlockDefaults,{attributes:t,defaultAttributes:L.attributes,blockSlug:L.name,excludedAttrs:xo})))),void 0!==X&&void 0!==X[0]&&void 0!==X[0].family&&""!==X[0].family&&X[0].google&&(0,n.createElement)(B.WebfontLoader,{config:St}),void 0!==te&&void 0!==te[0]&&void 0!==te[0].family&&""!==te[0].family&&te[0].google&&(0,n.createElement)(B.WebfontLoader,{config:Ct}),""!==D&&void 0!==ne&&void 0!==ne[0]&&void 0!==ne[0].family&&""!==ne[0].family&&ne[0].google&&(0,n.createElement)(B.WebfontLoader,{config:_t}),""!==O&&void 0!==ae&&void 0!==ae[0]&&void 0!==ae[0].family&&""!==ae[0].family&&ae[0].google&&(0,n.createElement)(B.WebfontLoader,{config:Et}),(0,n.createElement)(w.InnerBlocks,{templateLock:"all",template:c?Pt:zt}),(0,n.createElement)(B.SpacingVisualizer,{style:{marginLeft:void 0!==qt?(0,_.getSpacingOptionOutput)(qt,$t):void 0,marginRight:void 0!==Nt?(0,_.getSpacingOptionOutput)(Nt,$t):void 0,marginTop:void 0!==Rt?(0,_.getSpacingOptionOutput)(Rt,$t):void 0,marginBottom:void 0!==At?(0,_.getSpacingOptionOutput)(At,$t):void 0},type:"inside",forceShow:lt.isMouseOver,spacing:[(0,_.getSpacingOptionOutput)(Rt,$t),(0,_.getSpacingOptionOutput)(Nt,$t),(0,_.getSpacingOptionOutput)(At,$t),(0,_.getSpacingOptionOutput)(qt,$t)]}),(0,n.createElement)(B.SpacingVisualizer,{type:"inside",forceShow:rt.isMouseOver,spacing:[(0,_.getSpacingOptionOutput)(Ut,Lt),(0,_.getSpacingOptionOutput)(Wt,Lt),(0,_.getSpacingOptionOutput)(jt,Lt),(0,_.getSpacingOptionOutput)(Vt,Lt)]}))},save:function({attributes:e}){const{uniqueID:t,vsdesk:o,vstablet:i,vsmobile:a,timerLayout:r,countdownDivider:l,enableTimer:d,counterAlign:s,revealOnLoad:c}=e,u=x()({"kb-countdown-container":!0,[`kb-countdown-container-${t}`]:t,[`kb-countdown-timer-layout-${r}`]:d&&r,"kb-countdown-has-timer":d,"kb-countdown-reveal-on-load":c,"kb-countdown-enable-dividers":"inline"!==r&&l&&d,[`kb-countdown-align-${s[0]}`]:!(void 0===s||void 0===s[0]||!d)&&s[0],[`kb-countdown-align-tablet-${s[1]}`]:!(void 0===s||void 0===s[1]||!d)&&s[1],[`kb-countdown-align-mobile-${s[2]}`]:!(void 0===s||void 0===s[2]||!d)&&s[2],"kvs-lg-false":"undefined"!==o&&o,"kvs-md-false":"undefined"!==i&&i,"kvs-sm-false":"undefined"!==a&&a}),p=w.useBlockProps.save({className:u});return(0,n.createElement)("div",{...p,"data-id":t},(0,n.createElement)(w.InnerBlocks.Content,null))},example:{innerBlocks:[{name:"kadence/countdown-timer",attributes:{}}]}})},2485:(e,t)=>{var o;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var a=typeof o;if("string"===a||"number"===a)e.push(o);else if(Array.isArray(o)){if(o.length){var r=i.apply(null,o);r&&e.push(r)}}else if("object"===a)if(o.toString===Object.prototype.toString)for(var l in o)n.call(o,l)&&o[l]&&e.push(l);else e.push(o.toString())}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(o=function(){return i}.apply(t,[]))||(e.exports=o)}()},2694:(e,t,o)=>{"use strict";var n=o(6925);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,o,i,a,r){if(r!==n){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return o.PropTypes=o,o}},5556:(e,t,o)=>{e.exports=o(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},o={};function n(e){var i=o[e];if(void 0!==i)return i.exports;var a=o[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.m=t,e=[],n.O=(t,o,i,a)=>{if(!o){var r=1/0;for(c=0;c<e.length;c++){o=e[c][0],i=e[c][1],a=e[c][2];for(var l=!0,d=0;d<o.length;d++)(!1&a||r>=a)&&Object.keys(n.O).every((e=>n.O[e](o[d])))?o.splice(d--,1):(l=!1,a<r&&(r=a));if(l){e.splice(c--,1);var s=i();void 0!==s&&(t=s)}}return t}a=a||0;for(var c=e.length;c>0&&e[c-1][2]>a;c--)e[c]=e[c-1];e[c]=[o,i,a]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={723:0,402:0};n.O.j=t=>0===e[t];var t=(t,o)=>{var i,a,r=o[0],l=o[1],d=o[2],s=0;if(r.some((t=>0!==e[t]))){for(i in l)n.o(l,i)&&(n.m[i]=l[i]);if(d)var c=d(n)}for(t&&t(o);s<r.length;s++)a=r[s],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return n.O(c)},o=self.webpackChunkkadence=self.webpackChunkkadence||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var i=n.O(void 0,[402],(()=>n(572)));i=n.O(i),(this.kadence=this.kadence||{})["blocks-countdown"]=i})();