!function(){"use strict";var e,l={427:function(e){e.exports=window.wp.components},715:function(e){e.exports=window.wp.blockEditor},723:function(e){e.exports=window.wp.i18n},790:function(e){e.exports=window.ReactJSXRuntime},967:function(e,l,o){var s=o(997),r=o(715),n=o(427),a=o(723),i=o(790),t=JSON.parse('{"UU":"blynex/scroll-progress-indicator"}');(0,s.registerBlockType)(t.UU,{edit:function({attributes:e,setAttributes:l}){const{displayType:o,position:s,barColor:t,backgroundColor:c,height:x,circularSize:b,borderRadius:d,opacity:p,animationSpeed:h,showLabel:u,labelFontSize:g,labelFontWeight:_,labelColor:m,labelPrefix:y,labelSuffix:f,labelPosition:v,isFixed:j,zIndex:C,hideOnMobile:k,hideOnScrollDown:w,strokeWidth:S}=e,N=(0,r.useBlockProps)({className:`blynex-scroll-progress ${o} position-${s} ${j?"is-fixed":""} ${k?"hide-on-mobile":""}`,style:{"--scroll-bar-color":t,"--scroll-bg-color":c,"--scroll-height":"linear"===o?`${x}px`:"auto","--scroll-border-radius":`${d}px`,"--scroll-opacity":p/100,"--scroll-animation-speed":`${h}ms`,"--scroll-label-size":`${g}px`,"--scroll-label-weight":_,"--scroll-label-color":m,"--scroll-z-index":C,"--circular-size":`${b}px`,"--stroke-width":`${S}px`}});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.InspectorControls,{children:[(0,i.jsxs)(n.PanelBody,{title:(0,a.__)("Display Settings","blynex"),initialOpen:!0,children:[(0,i.jsx)(n.SelectControl,{label:(0,a.__)("Display Type","blynex"),value:o,options:[{label:(0,a.__)("Linear Bar","blynex"),value:"linear"},{label:(0,a.__)("Circular","blynex"),value:"circular"}],onChange:e=>l({displayType:e})}),"linear"===o&&(0,i.jsx)(n.SelectControl,{label:(0,a.__)("Position","blynex"),value:s,options:[{label:(0,a.__)("Top","blynex"),value:"top"},{label:(0,a.__)("Bottom","blynex"),value:"bottom"}],onChange:e=>l({position:e})}),"circular"===o&&(0,i.jsx)(n.SelectControl,{label:(0,a.__)("Position","blynex"),value:s,options:[{label:(0,a.__)("Bottom Right","blynex"),value:"bottom-right"},{label:(0,a.__)("Bottom Left","blynex"),value:"bottom-left"},{label:(0,a.__)("Top Right","blynex"),value:"top-right"},{label:(0,a.__)("Top Left","blynex"),value:"top-left"}],onChange:e=>l({position:e})}),(0,i.jsx)(n.ToggleControl,{label:(0,a.__)("Fixed Position","blynex"),checked:j,onChange:e=>l({isFixed:e}),help:(0,a.__)("Keep the indicator visible while scrolling","blynex")}),(0,i.jsx)(n.RangeControl,{label:(0,a.__)("Z-Index","blynex"),value:C,onChange:e=>l({zIndex:e}),min:1,max:99999,step:1}),(0,i.jsx)(n.ToggleControl,{label:(0,a.__)("Hide on Mobile","blynex"),checked:k,onChange:e=>l({hideOnMobile:e})}),(0,i.jsx)(n.ToggleControl,{label:(0,a.__)("Hide on Scroll Down","blynex"),checked:w,onChange:e=>l({hideOnScrollDown:e}),help:(0,a.__)("Hide indicator when scrolling down, show when scrolling up","blynex")})]}),(0,i.jsxs)(n.PanelBody,{title:(0,a.__)("Style Settings","blynex"),initialOpen:!1,children:[(0,i.jsx)(n.__experimentalText,{className:"components-base-control__label",children:(0,a.__)("Bar Color","blynex")}),(0,i.jsx)(n.ColorPicker,{color:t,onChangeComplete:e=>l({barColor:e.hex})}),(0,i.jsx)(n.__experimentalText,{className:"components-base-control__label",style:{marginTop:"16px"},children:(0,a.__)("Background Color","blynex")}),(0,i.jsx)(n.ColorPicker,{color:c,onChangeComplete:e=>l({backgroundColor:e.hex})}),"linear"===o&&(0,i.jsx)(n.RangeControl,{label:(0,a.__)("Height","blynex"),value:x,onChange:e=>l({height:e}),min:1,max:50,step:1}),"circular"===o&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.RangeControl,{label:(0,a.__)("Circular Size","blynex"),value:b,onChange:e=>l({circularSize:e}),min:40,max:200,step:5}),(0,i.jsx)(n.RangeControl,{label:(0,a.__)("Stroke Width","blynex"),value:S,onChange:e=>l({strokeWidth:e}),min:2,max:20,step:1})]}),(0,i.jsx)(n.RangeControl,{label:(0,a.__)("Border Radius","blynex"),value:d,onChange:e=>l({borderRadius:e}),min:0,max:50,step:1}),(0,i.jsx)(n.RangeControl,{label:(0,a.__)("Opacity (%)","blynex"),value:p,onChange:e=>l({opacity:e}),min:0,max:100,step:5}),(0,i.jsx)(n.RangeControl,{label:(0,a.__)("Animation Speed (ms)","blynex"),value:h,onChange:e=>l({animationSpeed:e}),min:0,max:1e3,step:50})]}),(0,i.jsxs)(n.PanelBody,{title:(0,a.__)("Label Settings","blynex"),initialOpen:!1,children:[(0,i.jsx)(n.ToggleControl,{label:(0,a.__)("Show Percentage Label","blynex"),checked:u,onChange:e=>l({showLabel:e})}),u&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.SelectControl,{label:(0,a.__)("Label Position","blynex"),value:v,options:[{label:(0,a.__)("Inside","blynex"),value:"inside"},{label:(0,a.__)("Outside","blynex"),value:"outside"}],onChange:e=>l({labelPosition:e})}),(0,i.jsx)(n.TextControl,{label:(0,a.__)("Prefix Text","blynex"),value:y,onChange:e=>l({labelPrefix:e}),help:(0,a.__)('Text before percentage (e.g., "Reading progress: ")',"blynex")}),(0,i.jsx)(n.TextControl,{label:(0,a.__)("Suffix Text","blynex"),value:f,onChange:e=>l({labelSuffix:e})}),(0,i.jsx)(n.RangeControl,{label:(0,a.__)("Font Size","blynex"),value:g,onChange:e=>l({labelFontSize:e}),min:10,max:32,step:1}),(0,i.jsx)(n.SelectControl,{label:(0,a.__)("Font Weight","blynex"),value:_,options:[{label:(0,a.__)("Light (300)","blynex"),value:"300"},{label:(0,a.__)("Normal (400)","blynex"),value:"400"},{label:(0,a.__)("Medium (500)","blynex"),value:"500"},{label:(0,a.__)("Semi-Bold (600)","blynex"),value:"600"},{label:(0,a.__)("Bold (700)","blynex"),value:"700"}],onChange:e=>l({labelFontWeight:e})}),(0,i.jsx)(n.__experimentalText,{className:"components-base-control__label",children:(0,a.__)("Label Color","blynex")}),(0,i.jsx)(n.ColorPicker,{color:m,onChangeComplete:e=>l({labelColor:e.hex})})]})]})]}),(0,i.jsxs)("div",{...N,children:[(0,i.jsx)("div",{className:"scroll-progress-preview-note",children:(0,i.jsx)("p",{children:(0,a.__)("📊 Scroll Progress Indicator (Editor Preview - Shows 45%)","blynex")})}),"linear"===o?(0,i.jsxs)("div",{className:"scroll-progress-linear",children:[(0,i.jsx)("div",{className:"scroll-progress-track",children:(0,i.jsx)("div",{className:"scroll-progress-bar",style:{width:"45%"},children:u&&"inside"===v&&(0,i.jsxs)("span",{className:"scroll-progress-label",children:[y,45,f]})})}),u&&"outside"===v&&(0,i.jsxs)("div",{className:"scroll-progress-label-outside",children:[y,45,f]})]}):(()=>{const e=(b-S)/2,l=2*Math.PI*e,o=l-.45*l;return(0,i.jsxs)("div",{className:"scroll-progress-circular",children:[(0,i.jsxs)("svg",{width:b,height:b,className:"circular-svg",children:[(0,i.jsx)("circle",{cx:b/2,cy:b/2,r:e,stroke:c,strokeWidth:S,fill:"none"}),(0,i.jsx)("circle",{cx:b/2,cy:b/2,r:e,stroke:t,strokeWidth:S,fill:"none",strokeDasharray:l,strokeDashoffset:o,strokeLinecap:"round",className:"progress-circle",style:{transform:"rotate(-90deg)",transformOrigin:"center"}})]}),u&&(0,i.jsxs)("div",{className:"scroll-progress-label-circular",children:[y,45,f]})]})})()]})]})},save:function({attributes:e}){const{displayType:l,position:o,barColor:s,backgroundColor:n,height:a,circularSize:t,borderRadius:c,opacity:x,animationSpeed:b,showLabel:d,labelFontSize:p,labelFontWeight:h,labelColor:u,labelPrefix:g,labelSuffix:_,labelPosition:m,isFixed:y,zIndex:f,hideOnMobile:v,hideOnScrollDown:j,strokeWidth:C}=e,k=r.useBlockProps.save({className:`blynex-scroll-progress ${l} position-${o} ${y?"is-fixed":""} ${v?"hide-on-mobile":""} ${j?"hide-on-scroll-down":""}`,style:{"--scroll-bar-color":s,"--scroll-bg-color":n,"--scroll-height":"linear"===l?`${a}px`:"auto","--scroll-border-radius":`${c}px`,"--scroll-opacity":x/100,"--scroll-animation-speed":`${b}ms`,"--scroll-label-size":`${p}px`,"--scroll-label-weight":h,"--scroll-label-color":u,"--scroll-z-index":f,"--circular-size":`${t}px`,"--stroke-width":`${C}px`},"data-display-type":l,"data-show-label":d,"data-label-prefix":g,"data-label-suffix":_,"data-label-position":m,"data-circular-size":t,"data-stroke-width":C});return(0,i.jsx)("div",{...k,children:"linear"===l?(0,i.jsxs)("div",{className:"scroll-progress-linear",children:[(0,i.jsx)("div",{className:"scroll-progress-track",children:(0,i.jsx)("div",{className:"scroll-progress-bar","data-progress":"0",children:d&&"inside"===m&&(0,i.jsxs)("span",{className:"scroll-progress-label",children:[(0,i.jsx)("span",{className:"label-prefix",children:g}),(0,i.jsx)("span",{className:"label-value",children:"0"}),(0,i.jsx)("span",{className:"label-suffix",children:_})]})})}),d&&"outside"===m&&(0,i.jsxs)("div",{className:"scroll-progress-label-outside",children:[(0,i.jsx)("span",{className:"label-prefix",children:g}),(0,i.jsx)("span",{className:"label-value",children:"0"}),(0,i.jsx)("span",{className:"label-suffix",children:_})]})]}):(()=>{const e=(t-C)/2,l=2*Math.PI*e;return(0,i.jsxs)("div",{className:"scroll-progress-circular",children:[(0,i.jsxs)("svg",{width:t,height:t,className:"circular-svg",children:[(0,i.jsx)("circle",{cx:t/2,cy:t/2,r:e,stroke:n,strokeWidth:C,fill:"none"}),(0,i.jsx)("circle",{cx:t/2,cy:t/2,r:e,stroke:s,strokeWidth:C,fill:"none",strokeDasharray:l,strokeDashoffset:l,strokeLinecap:"round",className:"progress-circle","data-circumference":l,style:{transform:"rotate(-90deg)",transformOrigin:"center"}})]}),d&&(0,i.jsxs)("div",{className:"scroll-progress-label-circular",children:[(0,i.jsx)("span",{className:"label-prefix",children:g}),(0,i.jsx)("span",{className:"label-value",children:"0"}),(0,i.jsx)("span",{className:"label-suffix",children:_})]})]})})()})}})},997:function(e){e.exports=window.wp.blocks}},o={};function s(e){var r=o[e];if(void 0!==r)return r.exports;var n=o[e]={exports:{}};return l[e](n,n.exports,s),n.exports}s.m=l,e=[],s.O=function(l,o,r,n){if(!o){var a=1/0;for(x=0;x=n)&&Object.keys(s.O).every((function(e){return s.O[e](o[t])}))?o.splice(t--,1):(i=!1,n0&&e[x-1][2]>n;x--)e[x]=e[x-1];e[x]=[o,r,n]},s.o=function(e,l){return Object.prototype.hasOwnProperty.call(e,l)},function(){var e={707:0,350:0};s.O.j=function(l){return 0===e[l]};var l=function(l,o){var r,n,a=o[0],i=o[1],t=o[2],c=0;if(a.some((function(l){return 0!==e[l]}))){for(r in i)s.o(i,r)&&(s.m[r]=i[r]);if(t)var x=t(s)}for(l&&l(o);c