(()=>{"use strict";const e=window.wp.blocks,t=window.wp.i18n,r=window.React,o=window.wp.blockEditor,a=window.wp.components,i=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"raptorize/invisible-raptor","version":"1.0.0","title":"Invisible Raptor","category":"widgets","icon":"visibility","description":"Add raptor functionality to your page with Konami Code or timer activation.","keywords":["raptor","easter egg","konami","fun"],"textDomain":"raptorize-it","supports":{"html":false,"multiple":false},"attributes":{"enableKonamiCode":{"type":"boolean","default":true},"enableTimer":{"type":"boolean","default":false},"timerDelay":{"type":"number","default":5000}}}');(0,e.registerBlockType)(i.name,{...i,edit:function({attributes:e,setAttributes:i}){const{enableKonamiCode:n,enableTimer:l,timerDelay:s}=e,p=(0,o.useBlockProps)({className:"raptorize-invisible-block"});return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(a.PanelBody,{title:(0,t.__)("Raptor Settings","raptorize-it")},(0,r.createElement)(a.ToggleControl,{label:(0,t.__)("Enable Konami Code","raptorize-it"),help:(0,t.__)("Trigger raptor with ↑ ↑ ↓ ↓ ← → ← → B A","raptorize-it"),checked:n,onChange:e=>i({enableKonamiCode:e})}),(0,r.createElement)(a.ToggleControl,{label:(0,t.__)("Enable Timer","raptorize-it"),help:(0,t.__)("Automatically trigger after page load","raptorize-it"),checked:l,onChange:e=>i({enableTimer:e})}),l&&(0,r.createElement)(a.RangeControl,{label:(0,t.__)("Timer Delay (ms)","raptorize-it"),value:s,onChange:e=>i({timerDelay:e}),min:1e3,max:3e4,step:1e3}))),(0,r.createElement)("div",{...p},(0,r.createElement)("div",{className:"raptorize-invisible-block__content"},(0,r.createElement)("h3",null,(0,t.__)("Raptor Enabled","raptorize-it")),(0,r.createElement)("p",null,n&&(0,t.__)("✓ Konami Code active","raptorize-it")),l&&(0,r.createElement)("p",null,(0,t.__)(`✓ Timer active (${s/1e3}s delay)`,"raptorize-it")),!n&&!l&&(0,r.createElement)("p",{className:"raptorize-warning"},(0,t.__)("⚠ No trigger enabled","raptorize-it")))))},save:()=>null});const n=window.wp.hooks,l=window.wp.compose;(0,e.registerBlockVariation)("core/button",{name:"raptorize-button",title:(0,t.__)("Raptorize Button","raptorize-it"),description:(0,t.__)("A button that triggers the raptor effect","raptorize-it"),icon:"welcome-view-site",attributes:{className:"is-style-raptorize",isRaptorizeButton:!0}}),(0,n.addFilter)("blocks.registerBlockType","raptorize/button-attribute",function(e,t){return"core/button"!==t?e:{...e,attributes:{...e.attributes,isRaptorizeButton:{type:"boolean",default:!1}}}});const s=(0,l.createHigherOrderComponent)(e=>i=>{if("core/button"!==i.name)return(0,r.createElement)(e,{...i});const{attributes:n,setAttributes:l}=i,{isRaptorizeButton:s}=n;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(e,{...i}),(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(a.PanelBody,{title:(0,t.__)("Raptorize Settings","raptorize-it"),initialOpen:!1},(0,r.createElement)(a.ToggleControl,{label:(0,t.__)("Raptorize Button","raptorize-it"),help:(0,t.__)("Make this button trigger a raptor","raptorize-it"),checked:s,onChange:e=>{l({isRaptorizeButton:e,className:e?"is-style-raptorize":""})}}))))},"withRaptorizeControls");(0,n.addFilter)("editor.BlockEdit","raptorize/with-raptorize-controls",s),(0,n.addFilter)("blocks.getSaveContent.extraProps","raptorize/add-raptorize-class",function(e,t,r){return"core/button"!==t.name?e:r.isRaptorizeButton?{...e,className:`${e.className||""} raptorize-button`.trim()}:e})})();