{"version":3,"file":"PDFButton.CyiPCLeF.mjs","names":["useState","useRef","useCallback"],"sources":["https:/framerusercontent.com/modules/6WoU0A67rFklKX9pH2AF/9OeWfYGznYZCkDj6yw9w/PDFButton.js"],"sourcesContent":["// Get Started: https://www.framer.com/developers\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";import{useCallback,useState,useEffect,useRef}from\"react\";/**\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function PDFButton(props){const{action,source,pdfUrl,pdfFile,htmlSelector,fileName,corsProxy,buttonText,backgroundColor,textColor,fontSize,fontFamily,borderRadius,paddingX,paddingY,borderWidth,borderColor,hoverColor,showPreview,previewWidth,previewHeight,previewBorderRadius,layout,showButton,hideButtonOnPrint,hiddenSelectors}=props;const[isProcessing,setIsProcessing]=useState(false);const[pdfPreviewError,setPdfPreviewError]=useState(false);const[isBrowser,setIsBrowser]=useState(false);const canvasRef=useRef(null);const buttonRef=useRef(null);useEffect(()=>{setIsBrowser(typeof window!==\"undefined\");},[]);// ── Library loaders ───────────────────────────────────────────\nconst loadScript=useCallback((src,globalKey)=>new Promise((resolve,reject)=>{if(window[globalKey])return resolve(window[globalKey]);const s=document.createElement(\"script\");s.src=src;s.async=true;s.onload=()=>window[globalKey]?resolve(window[globalKey]):reject(new Error(`${globalKey} not found after load`));s.onerror=()=>reject(new Error(`Failed to load ${src}`));document.head.appendChild(s);}),[]);const loadHtml2Canvas=useCallback(()=>loadScript(\"https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js\",\"html2canvas\"),[loadScript]);const loadJsPDF=useCallback(()=>loadScript(\"https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js\",\"jspdf\"),[loadScript]);const loadPrintJS=useCallback(async()=>{if(!isBrowser)return null;try{const{default:p}=await import(\"print-js\");return p;}catch{return null;}},[isBrowser]);const loadPDFJS=useCallback(async()=>{if(!isBrowser)return null;if(window.pdfjsLib)return window.pdfjsLib;return new Promise((resolve,reject)=>{const s=document.createElement(\"script\");s.src=\"https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.min.js\";s.async=true;s.onload=()=>{const lib=window.pdfjsLib;if(lib){lib.GlobalWorkerOptions.workerSrc=\"https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.worker.min.js\";resolve(lib);}else reject(new Error(\"pdfjsLib not found\"));};s.onerror=()=>reject(new Error(\"script load failed\"));document.head.appendChild(s);});},[isBrowser]);// ── PDF preview ───────────────────────────────────────────────\nconst renderPDFPreview=useCallback(async url=>{if(!isBrowser||!canvasRef.current)return;try{setPdfPreviewError(false);const lib=await loadPDFJS();if(!lib)return;const pdf=await lib.getDocument(url).promise;const page=await pdf.getPage(1);const canvas=canvasRef.current;const ctx=canvas.getContext(\"2d\");const vp0=page.getViewport({scale:1});const scale=Math.min((previewWidth-4)/vp0.width,(previewHeight-4)/vp0.height);const vp=page.getViewport({scale});canvas.width=vp.width;canvas.height=vp.height;await page.render({canvasContext:ctx,viewport:vp}).promise;}catch{setPdfPreviewError(true);}},[previewWidth,previewHeight,loadPDFJS,isBrowser]);useEffect(()=>{if(isBrowser&&source===\"file\"&&pdfFile&&showPreview)renderPDFPreview(pdfFile);},[source,pdfFile,showPreview,renderPDFPreview,isBrowser]);const resolveUrl=useCallback(src=>{if(!src)return src;if(src.startsWith(\"data:\"))return src;if(src.startsWith(\"http://\")||src.startsWith(\"https://\"))return src;try{return new URL(src,window.location.href).href;}catch{return src;}},[]);const proxyBase=(corsProxy||\"https://cors-anywhere-zq.herokuapp.com/\").replace(/\\/$/,\"\")+\"/\";const toBase64=useCallback(async rawSrc=>{const src=resolveUrl(rawSrc);if(!src)return null;if(src.startsWith(\"data:\"))return src;const blobToBase64=blob=>new Promise((resolve,reject)=>{const reader=new FileReader;reader.onload=()=>resolve(reader.result);reader.onerror=reject;reader.readAsDataURL(blob);});try{const res=await fetch(src,{mode:\"cors\"});if(res.ok)return await blobToBase64(await res.blob());}catch(_){/* try next */}try{const res=await fetch(proxyBase+src);if(res.ok)return await blobToBase64(await res.blob());}catch(_){/* try next */}return new Promise(resolve=>{const img=new Image;img.crossOrigin=\"anonymous\";const timer=setTimeout(()=>{img.src=\"\";resolve(null);},8e3);img.onload=()=>{clearTimeout(timer);try{const c=document.createElement(\"canvas\");c.width=img.naturalWidth||img.width;c.height=img.naturalHeight||img.height;c.getContext(\"2d\").drawImage(img,0,0);resolve(c.toDataURL(\"image/png\"));}catch{resolve(null);}};img.onerror=()=>{clearTimeout(timer);resolve(null);};img.src=src+(src.includes(\"?\")?\"&\":\"?\")+\"_cb=\"+Date.now();});},[resolveUrl,proxyBase]);// ── embedFonts ────────────────────────────────────────────────\nconst embedFonts=useCallback(async root=>{if(!isBrowser)return null;try{const fontFaceRules=[];Array.from(document.styleSheets).forEach(sheet=>{try{Array.from(sheet.cssRules||[]).forEach(rule=>{if(rule instanceof CSSFontFaceRule)fontFaceRules.push(rule);});}catch{/* cross-origin sheet */}});if(fontFaceRules.length===0)return null;const parts=[];await Promise.all(fontFaceRules.map(async rule=>{let text=rule.cssText;const urlMatches=Array.from(text.matchAll(/url\\([\"']?([^\"')]+)[\"']?\\)/g));await Promise.all(urlMatches.map(async m=>{const rawUrl=m[1];if(rawUrl.startsWith(\"data:\"))return;const b64=await toBase64(rawUrl);if(b64)text=text.replace(m[0],`url(\"${b64}\")`);}));parts.push(text);}));if(parts.length===0)return null;const styleEl=document.createElement(\"style\");styleEl.id=\"pdf-btn-embedded-fonts\";styleEl.textContent=parts.join(\"\\n\");document.head.appendChild(styleEl);return styleEl;}catch{return null;}},[isBrowser,toBase64]);const resolveColor=useCallback((value,contextEl)=>{if(!value)return value;if(value.includes(\"var(\")){value=value.replace(/var\\((--[\\w-]+)[^)]*\\)/g,(_,prop)=>{const v=getComputedStyle(contextEl).getPropertyValue(prop).trim();return v||\"black\";});}if(value===\"currentColor\")return getComputedStyle(contextEl).color||\"black\";return value;},[]);// ── prepareSvgForSerialisation (v10 + <use href=\"#id\"> fix) ───\nconst prepareSvgForSerialisation=useCallback((liveSvg,cloneSvg)=>{const rect=liveSvg.getBoundingClientRect();const w=Math.round(rect.width);const h=Math.round(rect.height);if(w>0)cloneSvg.setAttribute(\"width\",String(w));if(h>0)cloneSvg.setAttribute(\"height\",String(h));if(!cloneSvg.getAttribute(\"viewBox\")&&w>0&&h>0)cloneSvg.setAttribute(\"viewBox\",`0 0 ${w} ${h}`);if(!cloneSvg.getAttribute(\"xmlns\"))cloneSvg.setAttribute(\"xmlns\",\"http://www.w3.org/2000/svg\");const liveEls=Array.from(liveSvg.querySelectorAll(\"*\"));const cloneEls=Array.from(cloneSvg.querySelectorAll(\"*\"));liveEls.forEach((liveEl,i)=>{const cloneEl=cloneEls[i];if(!cloneEl)return;const cs=window.getComputedStyle(liveEl);const fill=cloneEl.getAttribute(\"fill\")||cs.fill;if(fill&&fill!==\"none\")cloneEl.setAttribute(\"fill\",resolveColor(fill,liveEl));const stroke=cloneEl.getAttribute(\"stroke\")||cs.stroke;if(stroke&&stroke!==\"none\")cloneEl.setAttribute(\"stroke\",resolveColor(stroke,liveEl));const stopColor=cloneEl.getAttribute(\"stop-color\");if(stopColor)cloneEl.setAttribute(\"stop-color\",resolveColor(stopColor,liveEl));cloneEl.removeAttribute(\"class\");});cloneSvg.querySelectorAll(\"use\").forEach(useEl=>{const href=useEl.getAttribute(\"href\")||useEl.getAttribute(\"xlink:href\")||\"\";if(!href||!useEl.parentNode)return;let refEl=null;if(href.startsWith(\"#\")){refEl=document.getElementById(href.slice(1))||liveSvg.querySelector(href);}if(!refEl)return;const isSymbol=refEl.tagName.toLowerCase()===\"symbol\";const viewBox=refEl.getAttribute(\"viewBox\");if(isSymbol&&viewBox){const inner=document.createElementNS(\"http://www.w3.org/2000/svg\",\"svg\");inner.setAttribute(\"viewBox\",viewBox);inner.setAttribute(\"x\",useEl.getAttribute(\"x\")||\"0\");inner.setAttribute(\"y\",useEl.getAttribute(\"y\")||\"0\");const uw=useEl.getAttribute(\"width\");const uh=useEl.getAttribute(\"height\");if(uw)inner.setAttribute(\"width\",uw);else if(w>0)inner.setAttribute(\"width\",String(w));if(uh)inner.setAttribute(\"height\",uh);else if(h>0)inner.setAttribute(\"height\",String(h));inner.setAttribute(\"overflow\",\"visible\");inner.setAttribute(\"xmlns\",\"http://www.w3.org/2000/svg\");Array.from(refEl.childNodes).forEach(c=>inner.appendChild(c.cloneNode(true)));useEl.parentNode.replaceChild(inner,useEl);}else{const g=document.createElementNS(\"http://www.w3.org/2000/svg\",\"g\");Array.from(useEl.attributes).forEach(a=>{if(a.name!==\"href\"&&a.name!==\"xlink:href\")g.setAttribute(a.name,a.value);});Array.from(refEl.childNodes).forEach(c=>g.appendChild(c.cloneNode(true)));useEl.parentNode.replaceChild(g,useEl);}});},[resolveColor]);const svgToDataURI=useCallback(cloneSvg=>{const serialised=new XMLSerializer().serializeToString(cloneSvg);const b64=btoa(unescape(encodeURIComponent(serialised)));return`data:image/svg+xml;base64,${b64}`;},[]);// ── convertAllImages (v10 unchanged) ─────────────────────────\nconst convertAllImages=useCallback(async(cloneRoot,liveRoot)=>{// ── Step A: gather ALL image data from the LIVE DOM ───\n// getBoundingClientRect() works only on elements in the live DOM.\n// We collect everything we need before touching the clone.\n// A1. Framer background-image wrappers\nconst liveWrappers=Array.from(liveRoot.querySelectorAll('[data-framer-background-image-wrapper=\"true\"]'));const wrapperData=await Promise.all(liveWrappers.map(async(liveWrapper,idx)=>{const liveImg=liveWrapper.querySelector(\"img\");const rect=liveWrapper.getBoundingClientRect();const cW=Math.round(rect.width);const cH=Math.round(rect.height);const rawSrc=liveImg?.currentSrc||liveImg?.src||liveImg?.getAttribute(\"src\")||\"\";const base64=rawSrc?rawSrc.startsWith(\"data:\")?rawSrc:await toBase64(rawSrc):null;return{idx,cW,cH,base64};}));// A2. Regular imgs (not in a framer wrapper)\nconst liveRegularImgs=Array.from(liveRoot.querySelectorAll(\"img\")).filter(img=>!img.closest('[data-framer-background-image-wrapper=\"true\"]'));const imgData=await Promise.all(liveRegularImgs.map(async(liveImg,idx)=>{const rect=liveImg.getBoundingClientRect();let w=Math.round(rect.width);let h=Math.round(rect.height);if(!w||!h){w=w||liveImg.naturalWidth||0;h=h||liveImg.naturalHeight||0;}if(!w||!h){const pr=liveImg.parentElement?.getBoundingClientRect();if(pr?.width)w=w||Math.round(pr.width);if(pr?.height)h=h||Math.round(pr.height);}const rawSrc=liveImg.currentSrc||liveImg.src||liveImg.getAttribute(\"src\")||\"\";const base64=rawSrc&&!rawSrc.startsWith(\"data:\")?await toBase64(rawSrc):rawSrc||null;const cs=getComputedStyle(liveImg);return{idx,w,h,base64,objectFit:cs.objectFit||\"fill\",objectPosition:cs.objectPosition||\"50% 50%\"};}));// A3. SVG sizes from live DOM\nconst liveSvgs=Array.from(liveRoot.querySelectorAll(\"svg\"));const svgSizes=liveSvgs.map(svg=>{const r=svg.getBoundingClientRect();return{w:Math.round(r.width),h:Math.round(r.height)};});// A4. CSS background-image on live elements\nconst liveAllEls=Array.from(liveRoot.querySelectorAll(\"*\"));const bgData=[];await Promise.all(liveAllEls.map(async(el,idx)=>{if(el.closest('[data-framer-background-image-wrapper=\"true\"]'))return;const bg=getComputedStyle(el).backgroundImage;if(!bg||bg===\"none\"||!bg.includes(\"url(\"))return;const match=bg.match(/url\\([\"']?([^\"')]+)[\"']?\\)/);if(!match||match[1].startsWith(\"data:\"))return;const b64=await toBase64(match[1]);if(b64)bgData.push({idx,base64:b64});}));// ── Step B: apply everything to the CLONE ─────────────\n// B1. Framer wrappers → canvas object-fit:cover\nconst cloneWrappers=Array.from(cloneRoot.querySelectorAll('[data-framer-background-image-wrapper=\"true\"]'));await Promise.all(wrapperData.map(async({idx,cW,cH,base64})=>{const cloneWrapper=cloneWrappers[idx];if(!cloneWrapper||!base64||!cW||!cH)return;const cloneImg=cloneWrapper.querySelector(\"img\");await new Promise(resolve=>{const tmp=new Image;const draw=()=>{if(!tmp.naturalWidth||!tmp.naturalHeight){resolve();return;}const canvas=document.createElement(\"canvas\");canvas.width=cW;canvas.height=cH;const ctx=canvas.getContext(\"2d\");const scale=Math.max(cW/tmp.naturalWidth,cH/tmp.naturalHeight);const dw=tmp.naturalWidth*scale;const dh=tmp.naturalHeight*scale;ctx.drawImage(tmp,(cW-dw)/2,(cH-dh)/2,dw,dh);canvas.style.cssText=`display:block;width:${cW}px;height:${cH}px;`+`position:absolute;top:0;left:0;border-radius:inherit;`;cloneWrapper.appendChild(canvas);if(cloneImg){// Hide original img for canvas-based renderers (html2canvas/PDF)\ncloneImg.style.setProperty(\"display\",\"none\",\"important\");// But also inline the base64 src so print iframe\n// can use it if canvas serialisation falls back to <img>\ncloneImg.setAttribute(\"src\",base64);cloneImg.removeAttribute(\"srcset\");cloneImg.removeAttribute(\"loading\");cloneImg.style.setProperty(\"width\",cW+\"px\",\"important\");cloneImg.style.setProperty(\"height\",cH+\"px\",\"important\");cloneImg.style.setProperty(\"object-fit\",\"cover\",\"important\");cloneImg.style.setProperty(\"max-width\",\"none\",\"important\");}resolve();};// Handle both cached and uncached images\nif(tmp.complete&&tmp.naturalWidth>0){tmp.src=base64;draw();}else{tmp.onload=draw;tmp.onerror=()=>resolve();tmp.src=base64;// Safety: if already complete by the time onload wires up\nif(tmp.complete&&tmp.naturalWidth>0){draw();}}});}));// B2. Regular imgs\nconst cloneRegularImgs=Array.from(cloneRoot.querySelectorAll(\"img\")).filter(img=>!img.closest('[data-framer-background-image-wrapper=\"true\"]'));imgData.forEach(({idx,w,h,base64,objectFit,objectPosition})=>{const cloneImg=cloneRegularImgs[idx];if(!cloneImg)return;if(!base64){if(w)cloneImg.style.setProperty(\"width\",w+\"px\",\"important\");if(h)cloneImg.style.setProperty(\"height\",h+\"px\",\"important\");cloneImg.style.setProperty(\"visibility\",\"hidden\",\"important\");return;}cloneImg.setAttribute(\"src\",base64);cloneImg.removeAttribute(\"srcset\");cloneImg.removeAttribute(\"loading\");if(w)cloneImg.style.setProperty(\"width\",w+\"px\",\"important\");if(h)cloneImg.style.setProperty(\"height\",h+\"px\",\"important\");cloneImg.style.setProperty(\"max-width\",\"none\",\"important\");cloneImg.style.setProperty(\"flex-shrink\",\"0\",\"important\");cloneImg.style.setProperty(\"object-fit\",objectFit,\"important\");cloneImg.style.setProperty(\"object-position\",objectPosition,\"important\");});// B3. SVGs → inline as <img> data-URI\nconst cloneSvgs=Array.from(cloneRoot.querySelectorAll(\"svg\"));cloneSvgs.forEach((cloneSvg,idx)=>{const liveSvg=liveSvgs[idx];if(!liveSvg||!cloneSvg.parentNode)return;const{w,h}=svgSizes[idx]||{w:0,h:0};if(!w||!h)return;prepareSvgForSerialisation(liveSvg,cloneSvg);try{const dataUri=svgToDataURI(cloneSvg);const img=document.createElement(\"img\");img.src=dataUri;img.style.setProperty(\"width\",w+\"px\",\"important\");img.style.setProperty(\"height\",h+\"px\",\"important\");img.style.setProperty(\"display\",\"block\",\"important\");img.style.setProperty(\"max-width\",\"none\",\"important\");const d=window.getComputedStyle(liveSvg).display;if(d&&d!==\"inline\")img.style.setProperty(\"display\",d,\"important\");cloneSvg.parentNode.replaceChild(img,cloneSvg);}catch(e){console.warn(\"[PDFButton] SVG serialise failed:\",e);}});// B4. CSS background-image\nconst cloneAllEls=Array.from(cloneRoot.querySelectorAll(\"*\"));bgData.forEach(({idx,base64})=>{const el=cloneAllEls[idx];if(el)el.style.setProperty(\"background-image\",`url(\"${base64}\")`,\"important\");});},[toBase64,prepareSvgForSerialisation,svgToDataURI]);const resolveHiddenElements=useCallback(()=>{const els=[];if(hideButtonOnPrint!==false&&buttonRef.current)els.push(buttonRef.current);if(hiddenSelectors?.trim()){hiddenSelectors.split(\",\").map(s=>s.trim()).filter(Boolean).forEach(s=>{try{document.querySelectorAll(s).forEach(el=>els.push(el));}catch{/* invalid selector */}});}return els;},[hideButtonOnPrint,hiddenSelectors]);// ── resolveAllCustomProps ─────────────────────────────────────\nconst resolveAllCustomProps=useCallback(el=>{const result={};const cs=getComputedStyle(el);const styleAttr=el.getAttribute(\"style\")||\"\";const rawCustom={};styleAttr.split(/;(?![^(]*\\))/).forEach(decl=>{const colon=decl.indexOf(\":\");if(colon<0)return;const prop=decl.slice(0,colon).trim();const val=decl.slice(colon+1).trim();if(prop.startsWith(\"--\")&&val)rawCustom[prop]=val;});const framerPropNames=[];try{Array.from(document.styleSheets).forEach(sheet=>{try{Array.from(sheet.cssRules||[]).forEach(rule=>{if(rule instanceof CSSStyleRule||rule instanceof CSSKeyframesRule){for(const m of rule.cssText.matchAll(/(--[\\w-]+)\\s*:/g))framerPropNames.push(m[1]);}});}catch{/* cross-origin */}});}catch{/* ok */}framerPropNames.forEach(name=>{if(rawCustom[name])return;const v=cs.getPropertyValue(name).trim();if(v)rawCustom[name]=v;});const resolveVal=(val,depth=0)=>{if(depth>8||!val.includes(\"var(\"))return val;return val.replace(/var\\((--[\\w-]+)(?:\\s*,\\s*([^)]*))?\\)/g,(_,name,fallback)=>{if(rawCustom[name])return resolveVal(rawCustom[name],depth+1);const cv=cs.getPropertyValue(name).trim();if(cv)return cv;let el2=el.parentElement;while(el2){const pv=getComputedStyle(el2).getPropertyValue(name).trim();if(pv)return pv;el2=el2.parentElement;}return fallback?resolveVal(fallback.trim(),depth+1):\"initial\";});};Object.keys(rawCustom).forEach(k=>{result[k]=resolveVal(rawCustom[k]);});return result;},[]);const NON_INHERITED_PROPS=new Set([\"display\",\"position\",\"top\",\"right\",\"bottom\",\"left\",\"z-index\",\"float\",\"clear\",\"overflow\",\"overflow-x\",\"overflow-y\",\"opacity\",\"pointer-events\",\"visibility\",\"width\",\"height\",\"min-width\",\"min-height\",\"max-width\",\"max-height\",\"box-sizing\",\"margin-top\",\"margin-right\",\"margin-bottom\",\"margin-left\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\",\"border-top-width\",\"border-right-width\",\"border-bottom-width\",\"border-left-width\",\"border-top-style\",\"border-right-style\",\"border-bottom-style\",\"border-left-style\",\"border-top-color\",\"border-right-color\",\"border-bottom-color\",\"border-left-color\",\"border-top-left-radius\",\"border-top-right-radius\",\"border-bottom-right-radius\",\"border-bottom-left-radius\",\"outline-width\",\"outline-style\",\"outline-color\",\"outline-offset\",\"background-color\",\"background-image\",\"background-repeat\",\"background-position\",\"background-size\",\"background-attachment\",\"background-origin\",\"background-clip\",\"box-shadow\",\"flex-direction\",\"flex-wrap\",\"justify-content\",\"align-items\",\"align-content\",\"align-self\",\"flex-grow\",\"flex-shrink\",\"flex-basis\",\"gap\",\"row-gap\",\"column-gap\",\"order\",\"grid-template-columns\",\"grid-template-rows\",\"grid-template-areas\",\"grid-column\",\"grid-row\",\"grid-auto-flow\",\"transform\",\"transform-origin\",\"transform-style\",\"perspective\",\"clip-path\",\"mask\",\"mask-image\",\"mask-size\",\"mask-position\",\"mask-repeat\",\"filter\",\"backdrop-filter\",\"object-fit\",\"object-position\",\"vertical-align\",\"table-layout\",\"border-collapse\",\"border-spacing\",\"content\"]);const INHERITED_PROPS=new Set([\"color\",\"font-family\",\"font-size\",\"font-weight\",\"font-style\",\"font-variant\",\"line-height\",\"letter-spacing\",\"word-spacing\",\"text-align\",\"text-decoration\",\"text-transform\",\"text-indent\",\"white-space\",\"word-break\",\"overflow-wrap\",\"text-shadow\",\"cursor\",\"user-select\",\"list-style-type\",\"list-style-position\",\"list-style-image\"]);const defaultStyleCache=useRef(new Map);const getDefaultStyle=useCallback(tagName=>{const cached=defaultStyleCache.current.get(tagName);if(cached)return cached;const dummy=document.createElement(tagName);dummy.style.cssText=\"\";document.body.appendChild(dummy);const cs=window.getComputedStyle(dummy);const result={};NON_INHERITED_PROPS.forEach(prop=>{result[prop]=cs.getPropertyValue(prop);});document.body.removeChild(dummy);defaultStyleCache.current.set(tagName,result);return result;},[]);// ── inlineAllStyles (v10 unchanged) ───────────────────────────\nconst inlineAllStyles=useCallback((live,clone,parentLive=null)=>{const cs=window.getComputedStyle(live);const parentCs=parentLive?window.getComputedStyle(parentLive):null;const customProps=resolveAllCustomProps(live);const defaults=getDefaultStyle(live.tagName.toLowerCase());const resolveVal=(val,depth=0)=>{if(depth>8||!val.includes(\"var(\"))return val;return val.replace(/var\\((--[\\w-]+)(?:\\s*,\\s*([^)]*))?\\)/g,(_,name,fallback)=>{if(customProps[name])return customProps[name];const cv=cs.getPropertyValue(name).trim();if(cv)return cv;let el2=live.parentElement;while(el2){const pv=getComputedStyle(el2).getPropertyValue(name).trim();if(pv)return pv;el2=el2.parentElement;}return fallback?resolveVal(fallback.trim(),depth+1):\"initial\";});};let cssText=\"\";NON_INHERITED_PROPS.forEach(prop=>{if(prop===\"transition\"||prop===\"animation\")return;if(prop===\"content\"&&live.tagName.toLowerCase()===\"li\")return;let val=cs.getPropertyValue(prop);if(!val)return;if(val.includes(\"var(\"))val=resolveVal(val);const defaultVal=defaults[prop]||\"\";if(!defaultVal||val!==defaultVal)cssText+=`${prop}:${val};`;});INHERITED_PROPS.forEach(prop=>{let val=cs.getPropertyValue(prop);if(!val)return;if(val.includes(\"var(\"))val=resolveVal(val);if(parentCs){if(val===parentCs.getPropertyValue(prop))return;}cssText+=`${prop}:${val};`;});Array.from(cs).forEach(prop=>{if(NON_INHERITED_PROPS.has(prop)||INHERITED_PROPS.has(prop))return;if(prop===\"transition\"||prop===\"animation\")return;let val=cs.getPropertyValue(prop);if(!val)return;if(val.includes(\"var(\"))val=resolveVal(val);cssText+=`${prop}:${val};`;});Object.entries(customProps).forEach(([k,v])=>{cssText+=`${k}:${v};`;});const ownStyle=live.getAttribute(\"style\")||\"\";const hasBorderVar=ownStyle.includes(\"--border-\")||ownStyle.includes(\"--framer-border-\");if(hasBorderVar){const btw=customProps[\"--border-top-width\"]||customProps[\"--framer-border-top-width\"]||\"\";const brw=customProps[\"--border-right-width\"]||customProps[\"--framer-border-right-width\"]||\"\";const bbw=customProps[\"--border-bottom-width\"]||customProps[\"--framer-border-bottom-width\"]||\"\";const blw=customProps[\"--border-left-width\"]||customProps[\"--framer-border-left-width\"]||\"\";const bc=customProps[\"--border-color\"]||customProps[\"--framer-border-color\"]||\"\";const bs=customProps[\"--border-style\"]||customProps[\"--framer-border-style\"]||\"solid\";if(bc){if(btw&&btw!==\"0px\")cssText+=`border-top:${btw} ${bs} ${bc};`;if(brw&&brw!==\"0px\")cssText+=`border-right:${brw} ${bs} ${bc};`;if(bbw&&bbw!==\"0px\")cssText+=`border-bottom:${bbw} ${bs} ${bc};`;if(blw&&blw!==\"0px\")cssText+=`border-left:${blw} ${bs} ${bc};`;}}const hasRadiusVar=ownStyle.includes(\"--border-top-left-radius\")||ownStyle.includes(\"--border-top-right-radius\")||ownStyle.includes(\"--border-bottom-right-radius\")||ownStyle.includes(\"--border-bottom-left-radius\")||ownStyle.includes(\"--framer-border-top-left-radius\");if(hasRadiusVar){const rtl=customProps[\"--border-top-left-radius\"]||customProps[\"--framer-border-top-left-radius\"]||\"\";const rtr=customProps[\"--border-top-right-radius\"]||customProps[\"--framer-border-top-right-radius\"]||\"\";const rbr=customProps[\"--border-bottom-right-radius\"]||customProps[\"--framer-border-bottom-right-radius\"]||\"\";const rbl=customProps[\"--border-bottom-left-radius\"]||customProps[\"--framer-border-bottom-left-radius\"]||\"\";if(rtl)cssText+=`border-top-left-radius:${rtl};`;if(rtr)cssText+=`border-top-right-radius:${rtr};`;if(rbr)cssText+=`border-bottom-right-radius:${rbr};`;if(rbl)cssText+=`border-bottom-left-radius:${rbl};`;}cssText+=\"transition:none!important;animation:none!important;box-sizing:border-box;\";const _tag=live.tagName.toLowerCase();if(_tag===\"ol\"||_tag===\"ul\"||_tag===\"li\"){cssText+=\"list-style:none!important;\"+\"list-style-type:none!important;\"+\"counter-increment:none!important;\"+\"counter-reset:none!important;\"+\"marker:none!important;\";}clone.setAttribute(\"style\",cssText);[\"before\",\"after\"].forEach(pseudo=>{const pcs=window.getComputedStyle(live,`::${pseudo}`);const content=pcs.getPropertyValue(\"content\");const _t=live.tagName.toLowerCase();if(_t===\"li\"||_t===\"ol\"||_t===\"ul\"){// console.log(`[PDFButton:inlineStyles] <${_t}> ::${pseudo} content=\"${content}\"`, { closest_ol: !!live.closest(\"ol\") });\n}// Skip ALL ::before/::after for <li> inside <ol> or <ul> —\n// fixOrderedLists()/fixUnorderedLists() handle markers exclusively to avoid duplication.\nif(live.tagName.toLowerCase()===\"li\"&&(!!live.closest(\"ol\")||!!live.closest(\"ul\")))return;if(!content||content===\"none\"||content==='\"\"'||content===\"normal\")return;if(/counter\\(/.test(content))return;// console.log(`[PDFButton:inlineStyles] INSERTING pseudo ::${pseudo} for <${live.tagName.toLowerCase()}> content=\"${content}\"`);\nconst span=document.createElement(\"span\");span.setAttribute(\"data-pdf-pseudo\",pseudo);let pCssText=\"\";NON_INHERITED_PROPS.forEach(prop=>{const val=pcs.getPropertyValue(prop);if(val)pCssText+=`${prop}:${val};`;});INHERITED_PROPS.forEach(prop=>{const val=pcs.getPropertyValue(prop);if(val)pCssText+=`${prop}:${val};`;});const contentVal=content.replace(/^[\"']|[\"']$/g,\"\");pCssText+=\"display:block;\";span.setAttribute(\"style\",pCssText);span.textContent=contentVal===\"none\"?\"\":contentVal;if(pseudo===\"before\")clone.insertBefore(span,clone.firstChild);else clone.appendChild(span);});const lk=Array.from(live.children);const ck=Array.from(clone.children).filter(el=>!el.hasAttribute(\"data-pdf-pseudo\"));lk.forEach((l,i)=>{if(ck[i])inlineAllStyles(l,ck[i],live);});},[resolveAllCustomProps,getDefaultStyle]);const collectPageStyles=useCallback(()=>{const parts=[];document.querySelectorAll(\"style\").forEach(s=>{if(s.id!==\"pdf-btn-print-style\"&&s.id!==\"pdf-btn-embedded-fonts\")parts.push(`<style>${s.textContent}</style>`);});document.querySelectorAll('link[rel=\"stylesheet\"]').forEach(l=>{const href=l.href;if(href)parts.push(`<link rel=\"stylesheet\" href=\"${href}\">`);});return parts.join(\"\\n\");},[]);// ── fixOrderedLists ───────────────────────────────────────────────\n// CSS counter(list-item) не переноситься в клон. Вручну вставляємо\n// numbered spans перед text-content кожного <li> в <ol>.\nconst fixOrderedLists=useCallback((clone,live)=>{const liveOls=Array.from(live.querySelectorAll(\"ol\")).filter(ol=>{const cs=window.getComputedStyle(ol);return cs.display!==\"none\"&&cs.visibility!==\"hidden\";});const cloneOls=Array.from(clone.querySelectorAll(\"ol\")).filter(ol=>{return!ol.style.display||ol.style.display!==\"none\";});// console.log(`[PDFButton:fixOrderedLists] Found ${liveOls.length} live <ol>s, ${cloneOls.length} clone <ol>s`);\nliveOls.forEach((liveOl,olIdx)=>{const cloneOl=cloneOls[olIdx];if(!cloneOl)return;// Замінити блок скидання для cloneOl:\ncloneOl.style.cssText+=\";list-style:none!important;list-style-type:none!important;counter-reset:none!important;counter-increment:none!important;\";const liveItems=Array.from(liveOl.querySelectorAll(\":scope > li\"));const cloneItems=Array.from(cloneOl.querySelectorAll(\":scope > li\"));const start=parseInt(liveOl.getAttribute(\"start\")||\"1\",10);// console.log(`[PDFButton:fixOrderedLists] OL[${olIdx}] start=${start}, liveItems=${liveItems.length}, cloneItems=${cloneItems.length}`);\nliveItems.forEach((liveLi,idx)=>{const cloneLi=cloneItems[idx];if(!cloneLi)return;const liveCs=window.getComputedStyle(liveLi);const liveFirstChild=liveLi.firstElementChild;const refCs=liveFirstChild?window.getComputedStyle(liveFirstChild):liveCs;const paddingLeft=liveCs.paddingLeft;// Чистимо маркери що могли потрапити через cloneNode\nconst existingMarkers=cloneLi.querySelectorAll(\"[data-pdf-list-marker]\");// console.log(`[PDFButton:fixOrderedLists] LI[${idx}] existing markers: ${existingMarkers.length}, pseudoSpans: ${cloneLi.querySelectorAll('[data-pdf-pseudo]').length}`);\nexistingMarkers.forEach(el=>el.remove());// Mark for CSS pseudo-element suppression\ncloneLi.setAttribute(\"data-pdf-ol-fixed\",\"true\");cloneLi.style.setProperty(\"list-style\",\"none\",\"important\");cloneLi.style.setProperty(\"list-style-type\",\"none\",\"important\");cloneLi.style.setProperty(\"counter-increment\",\"none\",\"important\");cloneLi.style.setProperty(\"position\",\"relative\",\"important\");cloneLi.style.setProperty(\"padding-left\",paddingLeft,\"important\");const markerText=`${start+idx}.`;// console.log(`[PDFButton:fixOrderedLists] LI[${idx}] INSERTING marker: \"${markerText}\" paddingLeft=${paddingLeft}`);\nconst marker=document.createElement(\"span\");marker.setAttribute(\"data-pdf-list-marker\",\"true\");marker.textContent=markerText;marker.style.cssText=[`position:absolute`,`left:0`,`top:0`,`font-size:${refCs.fontSize}`,`font-family:${refCs.fontFamily}`,`font-weight:${refCs.fontWeight}`,`line-height:${refCs.lineHeight}`,`color:${refCs.color}`,`white-space:nowrap`,`display:block`,`text-align:right`,`width:${parseFloat(paddingLeft)*.8}px`].join(\";\");cloneLi.appendChild(marker);});});// Inject a <style> into the clone to suppress CSS-generated ::before/::after/::marker\n// on fixed <li> elements — html2canvas renders pseudo-elements from stylesheets directly,\n// so inline styles alone cannot suppress them.\nconst suppressStyle=document.createElement(\"style\");suppressStyle.setAttribute(\"data-pdf-ol-suppress\",\"true\");suppressStyle.textContent=[`[data-pdf-ol-fixed]::before { content: none !important; display: none !important; }`,`[data-pdf-ol-fixed]::after { content: none !important; display: none !important; }`,`[data-pdf-ol-fixed]::marker { content: none !important; display: none !important; font-size: 0 !important; }`].join(\"\\n\");clone.insertBefore(suppressStyle,clone.firstChild);// console.log(`[PDFButton:fixOrderedLists] Injected suppress style for ${clone.querySelectorAll('[data-pdf-ol-fixed]').length} items`);\n},[]);// ── fixUnorderedLists ───────────────────────────────────────────\n// Suppress native bullet markers on <ul> <li> elements and insert\n// explicit bullet spans — prevents doubled dots when a bulleted list\n// is split across a page break during print.\nconst fixUnorderedLists=useCallback((clone,live)=>{const liveUls=Array.from(live.querySelectorAll(\"ul\")).filter(ul=>{const cs=window.getComputedStyle(ul);return cs.display!==\"none\"&&cs.visibility!==\"hidden\";});const cloneUls=Array.from(clone.querySelectorAll(\"ul\")).filter(ul=>{return!ul.style.display||ul.style.display!==\"none\";});// console.log(`[PDFButton:fixUnorderedLists] Found ${liveUls.length} live <ul>s, ${cloneUls.length} clone <ul>s`);\nliveUls.forEach((liveUl,ulIdx)=>{const cloneUl=cloneUls[ulIdx];if(!cloneUl)return;// Skip <ul> that are inside an <ol> (nested OL already handled)\nif(liveUl.closest(\"ol\"))return;cloneUl.style.cssText+=\";list-style:none!important;list-style-type:none!important;\";const liveItems=Array.from(liveUl.querySelectorAll(\":scope > li\"));const cloneItems=Array.from(cloneUl.querySelectorAll(\":scope > li\"));liveItems.forEach((liveLi,idx)=>{const cloneLi=cloneItems[idx];if(!cloneLi)return;const liveCs=window.getComputedStyle(liveLi);const liveFirstChild=liveLi.firstElementChild;const refCs=liveFirstChild?window.getComputedStyle(liveFirstChild):liveCs;const paddingLeft=liveCs.paddingLeft;// Clean any existing markers\ncloneLi.querySelectorAll(\"[data-pdf-list-marker]\").forEach(el=>el.remove());// Determine bullet character from computed list-style-type\nconst listStyleType=liveCs.listStyleType||\"disc\";let bulletChar=\"•\";if(listStyleType===\"circle\")bulletChar=\"◦\";else if(listStyleType===\"square\")bulletChar=\"▪\";// Mark for CSS pseudo-element suppression\ncloneLi.setAttribute(\"data-pdf-ul-fixed\",\"true\");cloneLi.style.setProperty(\"list-style\",\"none\",\"important\");cloneLi.style.setProperty(\"list-style-type\",\"none\",\"important\");cloneLi.style.setProperty(\"position\",\"relative\",\"important\");cloneLi.style.setProperty(\"padding-left\",paddingLeft,\"important\");const marker=document.createElement(\"span\");marker.setAttribute(\"data-pdf-list-marker\",\"true\");marker.textContent=bulletChar;marker.style.cssText=[`position:absolute`,`left:0`,`top:0`,`font-size:${refCs.fontSize}`,`font-family:${refCs.fontFamily}`,`font-weight:${refCs.fontWeight}`,`line-height:${refCs.lineHeight}`,`color:${refCs.color}`,`white-space:nowrap`,`display:block`,`text-align:center`,`width:${parseFloat(paddingLeft)*.8}px`].join(\";\");cloneLi.appendChild(marker);});});// Inject suppress style for UL items (similar to OL suppress)\nconst existingSuppress=clone.querySelector(\"[data-pdf-ol-suppress]\");const ulSuppressRules=[`[data-pdf-ul-fixed]::before { content: none !important; display: none !important; }`,`[data-pdf-ul-fixed]::after { content: none !important; display: none !important; }`,`[data-pdf-ul-fixed]::marker { content: none !important; display: none !important; font-size: 0 !important; }`,`[data-pdf-ul-fixed] { list-style: none !important; list-style-type: none !important; }`].join(\"\\n\");if(existingSuppress){// Append UL rules to existing OL suppress style\nexistingSuppress.textContent+=\"\\n\"+ulSuppressRules;}else{const suppressStyle=document.createElement(\"style\");suppressStyle.setAttribute(\"data-pdf-ul-suppress\",\"true\");suppressStyle.textContent=ulSuppressRules;clone.insertBefore(suppressStyle,clone.firstChild);}// console.log(`[PDFButton:fixUnorderedLists] Fixed ${clone.querySelectorAll('[data-pdf-ul-fixed]').length} UL items`);\n},[]);// ── buildClone / mountClone ───────────────────────────────────\nconst buildClone=useCallback(target=>{const rect=target.getBoundingClientRect();const width=Math.round(rect.width)||target.scrollWidth;// Use the larger of rect height and scrollHeight to capture\n// content that overflows its container (e.g. overflow:hidden)\nconst height=Math.max(Math.round(rect.height)||0,target.scrollHeight||0);const cs=window.getComputedStyle(target);console.log(\"[PDFButton:buildClone] ─── TARGET MEASUREMENTS ───\");console.log(\"[PDFButton:buildClone] target selector:\",target.tagName,target.id?`#${target.id}`:\"\",target.className);console.log(\"[PDFButton:buildClone] rect.width:\",rect.width,\"rect.height:\",rect.height);console.log(\"[PDFButton:buildClone] scrollWidth:\",target.scrollWidth,\"scrollHeight:\",target.scrollHeight);console.log(\"[PDFButton:buildClone] offsetWidth:\",target.offsetWidth,\"offsetHeight:\",target.offsetHeight);console.log(\"[PDFButton:buildClone] clientWidth:\",target.clientWidth,\"clientHeight:\",target.clientHeight);console.log(\"[PDFButton:buildClone] computed height:\",cs.height,\"overflow:\",cs.overflow,\"overflowY:\",cs.overflowY);console.log(\"[PDFButton:buildClone] computed maxHeight:\",cs.maxHeight,\"minHeight:\",cs.minHeight);console.log(\"[PDFButton:buildClone] FINAL → width:\",width,\"height:\",height);const hiddenEls=resolveHiddenElements();const uids=[];hiddenEls.forEach(el=>{const uid=`_pdfh_${Math.random().toString(36).slice(2)}`;el.setAttribute(\"data-pdf-hide\",uid);uids.push({el,uid});});target.querySelectorAll(\"[data-pdf-list-marker]\").forEach(el=>el.remove());target.querySelectorAll(\"[data-pdf-ol-fixed]\").forEach(el=>el.removeAttribute(\"data-pdf-ol-fixed\"));target.querySelectorAll(\"[data-pdf-ul-fixed]\").forEach(el=>el.removeAttribute(\"data-pdf-ul-fixed\"));const clone=target.cloneNode(true);inlineAllStyles(target,clone,null);fixOrderedLists(clone,target);fixUnorderedLists(clone,target);uids.forEach(({el})=>el.removeAttribute(\"data-pdf-hide\"));uids.forEach(({uid})=>{const found=clone.querySelector(`[data-pdf-hide=\"${uid}\"]`);if(found){found.style.setProperty(\"display\",\"none\",\"important\");found.style.setProperty(\"visibility\",\"hidden\",\"important\");found.style.setProperty(\"opacity\",\"0\",\"important\");}});clone.style.setProperty(\"position\",\"relative\",\"important\");clone.style.setProperty(\"top\",\"0\",\"important\");clone.style.setProperty(\"left\",\"0\",\"important\");clone.style.setProperty(\"transform\",\"none\",\"important\");clone.style.setProperty(\"margin\",\"0\",\"important\");clone.style.setProperty(\"width\",width+\"px\",\"important\");clone.style.setProperty(\"height\",\"auto\",\"important\");clone.style.setProperty(\"max-height\",\"none\",\"important\");clone.style.setProperty(\"box-sizing\",\"border-box\",\"important\");clone.style.setProperty(\"overflow\",\"visible\",\"important\");console.log(\"[PDFButton:buildClone] clone.style.height:\",clone.style.height);console.log(\"[PDFButton:buildClone] clone.style.width:\",clone.style.width);console.log(\"[PDFButton:buildClone] clone.style.overflow:\",clone.style.overflow);return{clone,width,height};},[inlineAllStyles,resolveHiddenElements,fixOrderedLists,fixUnorderedLists]);const mountClone=useCallback((clone,width,height)=>{const wrapper=document.createElement(\"div\");wrapper.style.cssText=[\"position:absolute\",\"top:0\",\"left:0\",`width:${width}px`,`min-height:${height}px`,\"background:#ffffff\",\"overflow:visible\",\"opacity:0\",\"pointer-events:none\",\"z-index:-9999\"].join(\";\");wrapper.appendChild(clone);document.body.insertBefore(wrapper,document.body.firstChild);return wrapper;},[]);// ─────────────────────────────────────────────────────────────\n// collectTextNodes\n//\n// Walks the LIVE DOM collecting one entry per visual line of\n// every visible text node. Must be called BEFORE buildClone so\n// coords are from the real layout, not the off-screen clone.\n//\n// Uses Range.getClientRects() (one rect per visual line) so\n// <li> bullets and wrapped paragraphs each get separate rects.\n//\n// All rects are viewport-relative. rootRect is too. The diff\n//   x = rect.left − rootRect.left\n//   y = rect.top  − rootRect.top\n// gives element-relative coords regardless of scroll position.\n// ─────────────────────────────────────────────────────────────\nconst collectTextNodes=useCallback((root,rootRect)=>{const results=[];const hiddenEls=resolveHiddenElements();const hiddenSet=new Set(hiddenEls);const isHidden=el=>{let cur=el;while(cur&&cur!==root){if(hiddenSet.has(cur))return true;const cs=window.getComputedStyle(cur);if(cs.display===\"none\"||cs.visibility===\"hidden\"||parseFloat(cs.opacity)===0)return true;cur=cur.parentElement;}return false;};const pushRect=(text,r,fsPx)=>{const x=r.left-rootRect.left;const y=r.top-rootRect.top;// Skip rects clearly outside the root element\nif(x<-1||y<-1||x>rootRect.width+1)return;results.push({text,x,y,width:r.width,height:r.height,fontSize:fsPx});};const walk=node=>{if(node.nodeType===Node.TEXT_NODE){const raw=node.textContent||\"\";if(/counter\\(list-item\\)/.test(raw))return;const text=raw.replace(/\\s+/g,\" \").trim();if(!text)return;const parent=node.parentElement;if(!parent||isHidden(parent))return;// Log text nodes from list items\nconst closestLi=parent.closest(\"li\");const closestOl=parent.closest(\"ol\");if(closestLi||closestOl){// console.log(`[PDFButton:collectTextNodes] TEXT in <${parent.tagName.toLowerCase()}>: \"${text}\" (li=${!!closestLi}, ol=${!!closestOl}, parent.dataset=${JSON.stringify((parent as HTMLElement).dataset)})`);\n}const cs=window.getComputedStyle(parent);const fsPx=parseFloat(cs.fontSize)||12;const range=document.createRange();range.selectNodeContents(node);const rects=Array.from(range.getClientRects()).filter(r=>r.width>=1&&r.height>=1);if(rects.length===0)return;if(rects.length===1){pushRect(text,rects[0],fsPx);return;}// Multi-line: proportional character split per rect\nconst totalW=rects.reduce((s,r)=>s+r.width,0);let offset=0;rects.forEach(r=>{const count=Math.max(1,Math.round(r.width/totalW*text.length));const chunk=text.slice(offset,offset+count).trim();offset+=count;if(chunk)pushRect(chunk,r,fsPx);});return;}const tag=node.tagName?.toLowerCase();if(tag===\"script\"||tag===\"style\"||tag===\"noscript\"||tag===\"canvas\"||tag===\"svg\")return;if(node.nodeType===Node.ELEMENT_NODE&&isHidden(node))return;node.childNodes.forEach(walk);};// console.log(`[PDFButton:collectTextNodes] Walking root...`);\nwalk(root);// console.log(`[PDFButton:collectTextNodes] Total text entries: ${results.length}`);\nreturn results;},[resolveHiddenElements]);// Canvas-based ascent measurement cache (per font-size in px)\nconst ascentCache=useRef(new Map);const measureAscent=useCallback(fsPx=>{if(ascentCache.current.has(fsPx))return ascentCache.current.get(fsPx);try{const ctx=document.createElement(\"canvas\").getContext(\"2d\");ctx.font=`${fsPx}px sans-serif`;const m=ctx.measureText(\"Hg\");const ascent=m.actualBoundingBoxAscent??fsPx*.75;ascentCache.current.set(fsPx,ascent);return ascent;}catch{const fb=fsPx*.75;ascentCache.current.set(fsPx,fb);return fb;}},[]);// ─────────────────────────────────────────────────────────────\n// DOWNLOAD — v10 visual pipeline + invisible text layer\n// ─────────────────────────────────────────────────────────────\nconst downloadPageAsPDF=useCallback(async()=>{if(!isBrowser){alert(\"This feature is only available in the browser\");return;}setIsProcessing(true);let embeddedFontsEl=null;let wrapper=null;try{const[html2canvas,jspdfModule]=await Promise.all([loadHtml2Canvas(),loadJsPDF()]);const jsPDF=jspdfModule?.jsPDF||window.jspdf?.jsPDF||window.jsPDF;if(!html2canvas||!jsPDF){alert(\"Failed to load PDF libraries\");return;}const target=htmlSelector?.trim()?document.querySelector(htmlSelector):document.body;if(!target){alert(`Element not found: \"${htmlSelector}\"`);return;}// Step 1 — embed fonts\nembeddedFontsEl=await embedFonts(target);// Step 2 — collect text coords from LIVE DOM (before clone alters layout)\nconst rootRect=target.getBoundingClientRect();const textNodes=collectTextNodes(target,rootRect);// Step 3 — build & mount clone (v10 pipeline)\nconst{clone,width,height}=buildClone(target);await convertAllImages(clone,target);wrapper=mountClone(clone,width,height);await new Promise(r=>setTimeout(r,300));await new Promise(r=>requestAnimationFrame(()=>requestAnimationFrame(r)));const captureW=clone.scrollWidth||width;const captureH=clone.scrollHeight||height;// Step 4 — render visual layer with html2canvas\nconst canvas=await html2canvas(clone,{scale:2,allowTaint:false,useCORS:false,foreignObjectRendering:false,imageTimeout:0,backgroundColor:\"#ffffff\",x:0,y:0,width:captureW,height:captureH,windowWidth:captureW,windowHeight:captureH,scrollX:0,scrollY:0,logging:false,onclone:clonedDoc=>{if(embeddedFontsEl){const s=clonedDoc.createElement(\"style\");s.textContent=embeddedFontsEl.textContent;clonedDoc.head.appendChild(s);}const s=clonedDoc.createElement(\"style\");s.textContent=`* {\n                        mix-blend-mode: normal !important;\n                        isolation: auto !important;\n                        text-shadow: none !important;\n                        filter: none !important;\n                        -webkit-filter: none !important;\n                        box-sizing: border-box !important;\n                    }\n                    [data-pdf-ol-fixed]::before { content: none !important; display: none !important; }\n                    [data-pdf-ol-fixed]::after { content: none !important; display: none !important; }\n                    [data-pdf-ol-fixed]::marker { content: none !important; display: none !important; font-size: 0 !important; }\n                    [data-pdf-ul-fixed]::before { content: none !important; display: none !important; }\n                    [data-pdf-ul-fixed]::after { content: none !important; display: none !important; }\n                    [data-pdf-ul-fixed]::marker { content: none !important; display: none !important; font-size: 0 !important; }\n                    [data-pdf-ul-fixed] { list-style: none !important; list-style-type: none !important; }`;clonedDoc.head.appendChild(s);}});wrapper.parentNode?.removeChild(wrapper);wrapper=null;const PX_TO_MM=25.4/96;const pageWmm=captureW*PX_TO_MM;const pageHmm=captureH*PX_TO_MM;const doc=new jsPDF({unit:\"mm\",format:[pageWmm,pageHmm],orientation:pageWmm>pageHmm?\"landscape\":\"portrait\",compress:true});// ── Layer 1: pixel-perfect visual ─────────────────────\ndoc.addImage(canvas.toDataURL(\"image/jpeg\",.95),\"JPEG\",0,0,pageWmm,pageHmm);// ── Layer 2: invisible selectable text ────────────────\n// GState opacity=0: text is invisible but fully selectable/searchable.\n// Baseline calculation:\n//   lineBox.top = y (from getClientRects)\n//   leading     = lineBox.height − fontSize  (space above+below glyph)\n//   glyphTop    = y + leading/2              (top of actual glyph)\n//   baseline    = glyphTop + ascent          (Canvas-measured ascent)\nconst invisGS=doc.GState?new doc.GState({opacity:0,\"stroke-opacity\":0}):null;const opaqueGS=doc.GState?new doc.GState({opacity:1,\"stroke-opacity\":1}):null;if(invisGS)doc.setGState(invisGS);textNodes.forEach(({text,x,y,width:tw,height:th,fontSize:fsPx})=>{const xMm=x*PX_TO_MM;const wMm=(tw+2)*PX_TO_MM;const leading=Math.max(th-fsPx,0);const ascent=measureAscent(fsPx);const baselineY=y+leading/2+ascent;const baselineYMm=baselineY*PX_TO_MM;doc.setFontSize(Math.max(fsPx*.75,1));doc.text(text,xMm,baselineYMm,{maxWidth:wMm,baseline:\"alphabetic\"});});if(opaqueGS)doc.setGState(opaqueGS);doc.save(`${fileName||\"document\"}.pdf`);}catch(err){console.error(\"Error generating PDF:\",err);alert(\"Failed to generate PDF. Please try again.\");}finally{if(wrapper)wrapper.parentNode?.removeChild(wrapper);if(embeddedFontsEl)embeddedFontsEl.parentNode?.removeChild(embeddedFontsEl);setIsProcessing(false);}},[htmlSelector,fileName,isBrowser,loadHtml2Canvas,loadJsPDF,embedFonts,buildClone,convertAllImages,mountClone,collectTextNodes,measureAscent]);// ── PRINT (v10 unchanged) ─────────────────────────────────────\nconst printPage=useCallback(async()=>{if(!isBrowser){alert(\"This feature is only available in the browser\");return;}setIsProcessing(true);try{const target=htmlSelector?.trim()?document.querySelector(htmlSelector):null;if(!target){const els=resolveHiddenElements();const cssRules=els.map((el,i)=>{const uid=`pdf-hide-${i}`;el.setAttribute(\"data-pdf-print-id\",uid);return`[data-pdf-print-id=\"${uid}\"]`;}).join(\", \");const styleEl=document.createElement(\"style\");styleEl.id=\"pdf-btn-print-style\";styleEl.textContent=cssRules?`@media print { ${cssRules} { display:none!important; visibility:hidden!important; } }`:\"\";document.head.appendChild(styleEl);await new Promise(r=>setTimeout(r,60));const cleanup=()=>{styleEl.parentNode?.removeChild(styleEl);els.forEach(el=>el.removeAttribute(\"data-pdf-print-id\"));setIsProcessing(false);window.removeEventListener(\"afterprint\",cleanup);};window.addEventListener(\"afterprint\",cleanup,{once:true});setTimeout(cleanup,6e4);window.print();return;}const embeddedFontsEl=await embedFonts(target);console.log(\"[PDFButton:printPage] ─── STARTING PRINT ───\");console.log(\"[PDFButton:printPage] target element:\",target.tagName,target.id,\"selector:\",htmlSelector);console.log(\"[PDFButton:printPage] window.innerWidth:\",window.innerWidth,\"window.innerHeight:\",window.innerHeight);const{clone,width,height}=buildClone(target);console.log(\"[PDFButton:printPage] after buildClone → width:\",width,\"height:\",height);await convertAllImages(clone,target);console.log(\"[PDFButton:printPage] after convertAllImages → clone.scrollHeight:\",clone.scrollHeight,\"clone.offsetHeight:\",clone.offsetHeight);// ── Fix overflow on direct children for print pagination ───\n// `inlineAllStyles` copies `overflow:hidden` from computed styles.\n// The print engine cannot properly paginate containers with\n// overflow:hidden — content gets clipped at page boundaries.\n// We fix only DIRECT children (depth 1) to avoid breaking\n// deeply nested visual elements (like animated icon containers).\nArray.from(clone.children).forEach(child=>{const el=child;if(el.tagName===\"STYLE\")return;// skip injected <style> tags\nconst ov=el.style.overflow;const ovY=el.style.overflowY;if(ov===\"hidden\"||ov===\"auto\"||ov===\"scroll\"){console.log(`[PDFButton:printPage] fixing overflow on direct child <${el.tagName.toLowerCase()}> class=\"${el.className}\" from \"${ov}\" → \"visible\"`);el.style.setProperty(\"overflow\",\"visible\",\"important\");}if(ovY===\"hidden\"||ovY===\"auto\"||ovY===\"scroll\"){el.style.setProperty(\"overflow-y\",\"visible\",\"important\");}});// Add breathing room at the bottom so the last element's\n// padding/border is not clipped at a page boundary.\nclone.style.setProperty(\"padding-bottom\",\"40px\",\"important\");// ── Serialise canvases before outerHTML ───────────────\n// <canvas> elements do NOT survive outerHTML serialisation —\n// their pixel data is lost. We replace every canvas in the\n// clone with an <img src=\"data:…\"> so the print iframe sees\n// actual images. This covers Framer background-image-wrapper\n// canvases created by convertAllImages.\nArray.from(clone.querySelectorAll(\"canvas\")).forEach(canvas=>{try{const dataUrl=canvas.toDataURL(\"image/jpeg\",.95);const img=document.createElement(\"img\");img.src=dataUrl;img.style.cssText=canvas.style.cssText;img.style.setProperty(\"display\",\"block\",\"important\");canvas.parentNode?.replaceChild(img,canvas);}catch{// Tainted canvas (cross-origin draw) — remove canvas,\n// the base64 img we set on cloneImg earlier will show instead\ncanvas.parentNode?.removeChild(canvas);// Un-hide the sibling img that has base64 src\nconst wrapper=canvas.closest?canvas.closest('[data-framer-background-image-wrapper=\"true\"]'):null;if(wrapper){const sibImg=wrapper.querySelector(\"img\");if(sibImg)sibImg.style.removeProperty(\"display\");}}});const styles=collectPageStyles();const fontStyles=embeddedFontsEl?`<style>${embeddedFontsEl.textContent}</style>`:\"\";if(embeddedFontsEl)embeddedFontsEl.parentNode?.removeChild(embeddedFontsEl);const html=`<!DOCTYPE html>\n<html><head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n${styles}${fontStyles}\n<style>\n@media print{@page{margin:10mm;}}\nhtml,body{margin:0;padding:0;background:#fff;overflow:visible;height:auto!important;}\n*{box-sizing:border-box;}\nol,ul{list-style:none!important;list-style-type:none!important;}\n[data-pdf-ol-fixed]::before,[data-pdf-ol-fixed]::after{content:none!important;display:none!important;}\n[data-pdf-ol-fixed]::marker{content:none!important;display:none!important;font-size:0!important;}\n[data-pdf-ul-fixed]::before,[data-pdf-ul-fixed]::after{content:none!important;display:none!important;}\n[data-pdf-ul-fixed]::marker{content:none!important;display:none!important;font-size:0!important;}\n[data-pdf-ul-fixed]{list-style:none!important;list-style-type:none!important;}\nli{list-style:none!important;list-style-type:none!important;}\n</style>\n</head><body style=\"margin:0;padding:0;background:#fff;overflow:visible;height:auto;\">${clone.outerHTML}</body></html>`;const blob=new Blob([html],{type:\"text/html;charset=utf-8\"});const blobUrl=URL.createObjectURL(blob);const iframe=document.createElement(\"iframe\");// Use the clone's width for the iframe so text reflows identically;\n// height starts generous and will be adjusted after load.\nconst iframeW=Math.max(width,1200);iframe.style.cssText=\"position:fixed;top:-9999px;left:-9999px;\"+`width:${iframeW}px;height:20000px;border:none;visibility:hidden;overflow:visible;`;console.log(\"[PDFButton:printPage] iframe created → width:\",iframeW,\"height: 20000\");console.log(\"[PDFButton:printPage] clone outerHTML length:\",clone.outerHTML.length);document.body.appendChild(iframe);const cleanup=()=>{iframe.parentNode?.removeChild(iframe);URL.revokeObjectURL(blobUrl);setIsProcessing(false);};iframe.onload=()=>{const iWin=iframe.contentWindow;if(!iWin){cleanup();return;}// Wait for fonts and layout to settle, then measure actual\n// content height and resize the iframe before printing.\n// This ensures no content is cut off regardless of browser width.\nconst measureAndPrint=()=>{try{const iDoc=iWin.document;const iBody=iDoc.body;const iDocEl=iDoc.documentElement;console.log(\"[PDFButton:measureAndPrint] ─── IFRAME MEASUREMENTS ───\");console.log(\"[PDFButton:measureAndPrint] iBody.scrollHeight:\",iBody.scrollHeight);console.log(\"[PDFButton:measureAndPrint] iBody.offsetHeight:\",iBody.offsetHeight);console.log(\"[PDFButton:measureAndPrint] iBody.clientHeight:\",iBody.clientHeight);console.log(\"[PDFButton:measureAndPrint] iDocEl.scrollHeight:\",iDocEl.scrollHeight);console.log(\"[PDFButton:measureAndPrint] iDocEl.offsetHeight:\",iDocEl.offsetHeight);console.log(\"[PDFButton:measureAndPrint] iDocEl.clientHeight:\",iDocEl.clientHeight);// Get the true content height from the iframe document\nconst contentH=Math.max(iBody.scrollHeight,iBody.offsetHeight,iDocEl.scrollHeight,iDocEl.offsetHeight,iBody.clientHeight,iDocEl.clientHeight);// Also check the first child (our clone) directly\nconst firstChild=iBody.firstElementChild;const cloneH=firstChild?Math.max(firstChild.scrollHeight,firstChild.offsetHeight):0;console.log(\"[PDFButton:measureAndPrint] firstChild tag:\",firstChild?.tagName,\"id:\",firstChild?.id);console.log(\"[PDFButton:measureAndPrint] firstChild.scrollHeight:\",firstChild?.scrollHeight,\"firstChild.offsetHeight:\",firstChild?.offsetHeight);console.log(\"[PDFButton:measureAndPrint] firstChild computed height:\",firstChild?iWin.getComputedStyle(firstChild).height:\"N/A\");console.log(\"[PDFButton:measureAndPrint] firstChild computed overflow:\",firstChild?iWin.getComputedStyle(firstChild).overflow:\"N/A\");console.log(\"[PDFButton:measureAndPrint] firstChild computed maxHeight:\",firstChild?iWin.getComputedStyle(firstChild).maxHeight:\"N/A\");// Log children of the clone inside iframe\nif(firstChild){Array.from(firstChild.children).forEach((child,i)=>{const el=child;const ccs=iWin.getComputedStyle(el);console.log(`[PDFButton:measureAndPrint] child[${i}] <${el.tagName.toLowerCase()}> class=\"${el.className}\" → height:${ccs.height} scrollH:${el.scrollHeight} offsetH:${el.offsetHeight} overflow:${ccs.overflow}`);});}const finalH=Math.max(contentH,cloneH,height,900);console.log(\"[PDFButton:measureAndPrint] contentH:\",contentH,\"cloneH:\",cloneH,\"height(from buildClone):\",height,\"→ finalH:\",finalH);// Resize iframe to fit all content\niframe.style.height=finalH+200+\"px\";console.log(\"[PDFButton:measureAndPrint] iframe resized to:\",finalH+200,\"px\");// Ensure body and clone have no height constraints\niBody.style.height=\"auto\";iBody.style.overflow=\"visible\";iDocEl.style.height=\"auto\";iDocEl.style.overflow=\"visible\";if(firstChild){firstChild.style.setProperty(\"height\",\"auto\",\"important\");firstChild.style.setProperty(\"max-height\",\"none\",\"important\");firstChild.style.setProperty(\"overflow\",\"visible\",\"important\");}}catch(e){console.warn(\"[PDFButton] Could not measure iframe content:\",e);}try{iWin.addEventListener(\"afterprint\",cleanup,{once:true});setTimeout(cleanup,6e4);iWin.focus();iWin.print();}catch(e){console.error(\"print error:\",e);cleanup();}};// Use document.fonts.ready if available for font loading,\n// then give an extra frame for layout to settle.\nconst fontsReady=iWin.document.fonts?.ready;if(fontsReady){fontsReady.then(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{setTimeout(measureAndPrint,200);});});});}else{setTimeout(measureAndPrint,800);}};iframe.onerror=()=>{cleanup();alert(\"Failed to load print frame.\");};iframe.src=blobUrl;}catch(err){console.error(\"Error printing:\",err);alert(\"Failed to print. Please try again.\");setIsProcessing(false);}},[htmlSelector,isBrowser,resolveHiddenElements,buildClone,collectPageStyles,embedFonts,convertAllImages]);// ── URL / File handlers (v10 unchanged) ──────────────────────\nconst downloadPDFFromUrl=useCallback(async()=>{if(!isBrowser)return;if(!pdfUrl){alert(\"Please provide a PDF URL\");return;}const dlBlob=async url=>{const res=await fetch(url);if(!res.ok)throw new Error(`HTTP ${res.status}`);const blob=await res.blob();const bu=URL.createObjectURL(blob);const a=document.createElement(\"a\");a.href=bu;a.download=`${fileName||\"document\"}.pdf`;document.body.appendChild(a);a.click();setTimeout(()=>{document.body.removeChild(a);URL.revokeObjectURL(bu);},100);};try{await dlBlob(pdfUrl);}catch{try{await dlBlob(proxyBase+pdfUrl);}catch{const a=document.createElement(\"a\");a.href=pdfUrl;a.download=`${fileName||\"document\"}.pdf`;a.target=\"_blank\";a.rel=\"noopener noreferrer\";document.body.appendChild(a);a.click();document.body.removeChild(a);}}},[pdfUrl,fileName,isBrowser,proxyBase]);const printPDFFromUrl=useCallback(async()=>{if(!isBrowser)return;if(!pdfUrl){alert(\"Please provide a PDF URL\");return;}setIsProcessing(true);try{const printJS=await loadPrintJS();if(printJS){printJS({printable:pdfUrl,type:\"pdf\",showModal:true,modalMessage:\"Retrieving Document…\",onError:()=>{printJS({printable:proxyBase+pdfUrl,type:\"pdf\",showModal:true,modalMessage:\"Retrieving Document…\",onError:()=>window.open(pdfUrl,\"_blank\")});}});}else window.open(pdfUrl,\"_blank\");}catch{window.open(pdfUrl,\"_blank\");}finally{setIsProcessing(false);}},[pdfUrl,isBrowser,loadPrintJS,proxyBase]);const downloadUploadedPDF=useCallback(async()=>{if(!isBrowser)return;if(!pdfFile){alert(\"Please upload a PDF file\");return;}try{const res=await fetch(pdfFile);const blob=await res.blob();const url=URL.createObjectURL(new Blob([blob],{type:\"application/pdf\"}));const a=document.createElement(\"a\");a.href=url;a.download=`${fileName||\"document\"}.pdf`;document.body.appendChild(a);a.click();document.body.removeChild(a);URL.revokeObjectURL(url);}catch{alert(\"Error downloading file\");}},[pdfFile,fileName,isBrowser]);const printUploadedPDF=useCallback(async()=>{if(!isBrowser)return;if(!pdfFile){alert(\"Please upload a PDF file\");return;}try{const printJS=await loadPrintJS();if(printJS)printJS(pdfFile,\"pdf\");else window.open(pdfFile,\"_blank\");}catch{window.open(pdfFile,\"_blank\");}},[pdfFile,isBrowser,loadPrintJS]);const openPDFInNewTab=useCallback(()=>{if(!isBrowser)return;const url=source===\"url\"?pdfUrl:pdfFile;if(url)window.open(url,\"_blank\");},[source,pdfUrl,pdfFile,isBrowser]);const handleClick=useCallback(()=>{if(!isBrowser)return;if(action===\"download\"){if(source===\"page\")downloadPageAsPDF();else if(source===\"url\")downloadPDFFromUrl();else downloadUploadedPDF();}else{if(source===\"page\")printPage();else if(source===\"url\")printPDFFromUrl();else printUploadedPDF();}},[action,source,downloadPageAsPDF,downloadPDFFromUrl,downloadUploadedPDF,printPage,printPDFFromUrl,printUploadedPDF,isBrowser]);// ── Preview (v10 unchanged) ───────────────────────────────────\nconst PDFPreviewFallback=()=>/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",height:\"100%\",width:\"100%\",color:\"#666\",textAlign:\"center\",padding:\"20px\",background:\"linear-gradient(135deg,#f8f9fa 0%,#e9ecef 100%)\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{fontSize:\"48px\",marginBottom:\"16px\",opacity:.8},children:\"📄\"}),/*#__PURE__*/_jsx(\"div\",{style:{fontSize:\"16px\",fontWeight:\"600\",marginBottom:\"8px\",color:\"#333\"},children:\"PDF Document\"}),/*#__PURE__*/_jsxs(\"div\",{style:{fontSize:\"12px\",opacity:.7,marginBottom:\"12px\",wordBreak:\"break-word\"},children:[fileName||\"document\",\".pdf\"]}),/*#__PURE__*/_jsx(\"div\",{style:{fontSize:\"11px\",opacity:.6,background:\"rgba(255,255,255,0.8)\",padding:\"6px 12px\",borderRadius:\"16px\",border:\"1px solid rgba(0,0,0,0.1)\"},children:!isBrowser?\"Available in browser\":\"Click to view\"})]});const PDFPreview=()=>{if(!isBrowser)return /*#__PURE__*/_jsx(PDFPreviewFallback,{});if(source===\"url\"){if(pdfPreviewError)return /*#__PURE__*/_jsx(PDFPreviewFallback,{});return /*#__PURE__*/_jsx(\"iframe\",{src:`${pdfUrl}#page=1&view=FitH`,style:{width:\"100%\",height:\"100%\",border:\"none\",borderRadius:`${previewBorderRadius}px`},title:\"PDF Preview\",onError:()=>setPdfPreviewError(true),onLoad:e=>{try{setPdfPreviewError(e.target.contentWindow?.length===0);}catch{setPdfPreviewError(true);}}});}if(source===\"file\"&&pdfFile){if(pdfPreviewError)return /*#__PURE__*/_jsx(PDFPreviewFallback,{});return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",backgroundColor:\"#ffffff\",borderRadius:`${previewBorderRadius}px`},children:/*#__PURE__*/_jsx(\"canvas\",{ref:canvasRef,style:{maxWidth:\"100%\",maxHeight:\"100%\",borderRadius:`${previewBorderRadius}px`}})});}return null;};const isDisabled=!isBrowser||isProcessing||source===\"url\"&&!pdfUrl||source===\"file\"&&!pdfFile;const shouldShowPreview=isBrowser&&showPreview&&(source===\"url\"?!!pdfUrl:!!pdfFile)&&source!==\"page\";const shouldShowButton=showButton!==false;const needsContainer=shouldShowPreview&&shouldShowButton;const containerStyle={display:\"flex\",alignItems:layout===\"horizontal\"?\"center\":\"stretch\",flexDirection:layout===\"horizontal\"?\"row\":\"column\",gap:\"16px\",width:\"fit-content\"};const previewElement=shouldShowPreview?/*#__PURE__*/_jsxs(motion.div,{onClick:openPDFInNewTab,style:{width:`${previewWidth}px`,height:`${previewHeight}px`,borderRadius:`${previewBorderRadius}px`,overflow:\"hidden\",cursor:\"pointer\",border:\"2px solid #e0e0e0\",backgroundColor:\"#f8f9fa\",position:\"relative\",boxShadow:\"0 2px 8px rgba(0,0,0,0.1)\"},whileHover:{scale:1.02,boxShadow:\"0 4px 16px rgba(0,0,0,0.15)\"},whileTap:{scale:.98},children:[/*#__PURE__*/_jsx(PDFPreview,{}),/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",top:0,left:0,right:0,bottom:0,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",borderRadius:`${previewBorderRadius}px`},children:/*#__PURE__*/_jsx(motion.div,{initial:{opacity:0,scale:.8},whileHover:{opacity:1,scale:1},style:{backgroundColor:\"rgba(0,0,0,0.8)\",color:\"white\",padding:\"8px 16px\",borderRadius:\"20px\",fontSize:\"14px\",fontWeight:\"500\"},children:\"Click to open\"})})]}):null;if(!isBrowser){return /*#__PURE__*/_jsxs(\"div\",{style:needsContainer?containerStyle:{},children:[showPreview&&/*#__PURE__*/_jsx(\"div\",{style:{width:`${previewWidth}px`,height:`${previewHeight}px`,borderRadius:`${previewBorderRadius}px`,overflow:\"hidden\",border:\"2px solid #e0e0e0\",backgroundColor:\"#f8f9fa\"},children:/*#__PURE__*/_jsx(PDFPreviewFallback,{})}),shouldShowButton&&/*#__PURE__*/_jsx(\"button\",{style:{backgroundColor:\"#ccc\",color:textColor,fontSize:`${fontSize}px`,fontFamily,borderRadius:`${borderRadius}px`,padding:`${paddingY}px ${paddingX}px`,border:borderWidth>0?`${borderWidth}px solid ${borderColor}`:\"none\",cursor:\"not-allowed\",outline:\"none\",opacity:.7},disabled:true,children:buttonText})]});}return /*#__PURE__*/_jsxs(\"div\",{style:needsContainer?containerStyle:{},children:[shouldShowPreview&&previewElement,shouldShowButton&&/*#__PURE__*/_jsx(motion.button,{ref:buttonRef,onClick:handleClick,disabled:isDisabled,style:{backgroundColor:isDisabled?\"#ccc\":backgroundColor,color:textColor,fontSize:`${fontSize}px`,fontFamily,borderRadius:`${borderRadius}px`,padding:`${paddingY}px ${paddingX}px`,border:borderWidth>0?`${borderWidth}px solid ${borderColor}`:\"none\",cursor:isDisabled?\"not-allowed\":\"pointer\",outline:\"none\",transition:\"all 0.2s ease\",opacity:isDisabled?.7:1},whileHover:!isDisabled?{backgroundColor:hoverColor,scale:1.05}:{},whileTap:!isDisabled?{scale:.95}:{},children:isProcessing?\"Processing…\":buttonText})]});}// ── Property controls (v10 unchanged) ────────────────────────────\naddPropertyControls(PDFButton,{action:{title:\"Action\",type:ControlType.Enum,options:[\"download\",\"print\"],optionTitles:[\"Download PDF\",\"Print\"],defaultValue:\"download\"},source:{title:\"PDF Source\",type:ControlType.Enum,options:[\"page\",\"url\",\"file\"],optionTitles:[\"Current Page\",\"PDF URL\",\"Upload File\"],defaultValue:\"page\"},corsProxy:{title:\"CORS Proxy URL\",type:ControlType.String,defaultValue:\"https://cors-anywhere-zq.herokuapp.com/\",placeholder:\"https://cors-anywhere-zq.herokuapp.com/\",description:\"Prepended to cross-origin image URLs. Handles relative paths automatically.\",hidden:p=>p.source!==\"page\"},pdfUrl:{title:\"PDF URL\",type:ControlType.String,defaultValue:\"\",placeholder:\"https://example.com/file.pdf\",hidden:p=>p.source!==\"url\"},pdfFile:{title:\"Upload PDF\",type:ControlType.File,allowedFileTypes:[\"pdf\"],hidden:p=>p.source!==\"file\"},htmlSelector:{title:\"CSS Selector\",type:ControlType.String,defaultValue:\"\",placeholder:\".content, #main (leave empty for full page)\",hidden:p=>p.source!==\"page\"},fileName:{title:\"File Name\",type:ControlType.String,defaultValue:\"document\",placeholder:\"document\"},showButton:{title:\"Show Button\",type:ControlType.Boolean,defaultValue:true},showPreview:{title:\"Show PDF Preview\",type:ControlType.Boolean,defaultValue:false,hidden:p=>p.source===\"page\"},layout:{title:\"Layout\",type:ControlType.Enum,options:[\"horizontal\",\"vertical\"],optionTitles:[\"Horizontal\",\"Vertical\"],defaultValue:\"vertical\",hidden:p=>!p.showPreview||p.source===\"page\"||p.showButton===false},previewWidth:{title:\"Preview Width\",type:ControlType.Number,min:100,max:800,defaultValue:200,hidden:p=>!p.showPreview||p.source===\"page\"},previewHeight:{title:\"Preview Height\",type:ControlType.Number,min:100,max:600,defaultValue:280,hidden:p=>!p.showPreview||p.source===\"page\"},previewBorderRadius:{title:\"Preview Border Radius\",type:ControlType.Number,min:0,max:20,defaultValue:8,hidden:p=>!p.showPreview||p.source===\"page\"},buttonText:{title:\"Button Text\",type:ControlType.String,defaultValue:\"Download PDF\",hidden:p=>p.showButton===false},backgroundColor:{title:\"Background Color\",type:ControlType.Color,defaultValue:\"#007AFF\",hidden:p=>p.showButton===false},textColor:{title:\"Text Color\",type:ControlType.Color,defaultValue:\"#FFFFFF\",hidden:p=>p.showButton===false},hoverColor:{title:\"Hover Color\",type:ControlType.Color,defaultValue:\"#0056CC\",hidden:p=>p.showButton===false},fontSize:{title:\"Font Size\",type:ControlType.Number,min:8,max:72,defaultValue:16,hidden:p=>p.showButton===false},fontFamily:{title:\"Font Family\",type:ControlType.String,defaultValue:\"system-ui, -apple-system, sans-serif\",hidden:p=>p.showButton===false},borderRadius:{title:\"Border Radius\",type:ControlType.Number,min:0,max:50,defaultValue:8,hidden:p=>p.showButton===false},paddingX:{title:\"Horizontal Padding\",type:ControlType.Number,min:0,max:100,defaultValue:20,hidden:p=>p.showButton===false},paddingY:{title:\"Vertical Padding\",type:ControlType.Number,min:0,max:100,defaultValue:12,hidden:p=>p.showButton===false},borderWidth:{title:\"Border Width\",type:ControlType.Number,min:0,max:10,defaultValue:0,hidden:p=>p.showButton===false},borderColor:{title:\"Border Color\",type:ControlType.Color,defaultValue:\"#CCCCCC\",hidden:p=>p.borderWidth===0||p.showButton===false},hideButtonOnPrint:{title:\"Hide Button on Print\",type:ControlType.Boolean,defaultValue:true,hidden:p=>p.showButton===false},hiddenSelectors:{title:\"Hide Elements (CSS)\",type:ControlType.String,defaultValue:\"\",placeholder:\".no-print, #header, [data-hide]\",description:\"Comma-separated CSS selectors to hide during capture\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PDFButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PDFButton.map"],"mappings":"iQAKG,SAAwB,EAAU,EAAM,CAAC,GAAK,CAAC,SAAO,SAAO,SAAO,UAAQ,eAAa,WAAS,YAAU,aAAW,kBAAgB,YAAU,WAAS,aAAW,eAAa,WAAS,YAAS,cAAY,eAAY,cAAW,cAAY,eAAa,gBAAc,sBAAoB,SAAO,cAAW,qBAAkB,mBAAiB,EAAW,CAAC,GAAa,GAAiBA,EAAS,EAAK,EAAO,CAAC,GAAgB,GAAoBA,EAAS,EAAK,EAAO,CAAC,EAAU,IAAcA,EAAS,EAAK,EAAQ,EAAUC,EAAO,IAAI,EAAQ,EAAUA,EAAO,IAAI,EAAE,MAAc,CAAC,GAAoB,IAAS,MAAW,CAAE,EAAE,CAAC,CAAC,EACnnB,IAAM,EAAWC,GAAa,EAAI,IAAY,IAAI,SAAS,EAAQ,IAAS,CAAC,GAAG,EAAO,GAAW,OAAO,EAAQ,EAAO,EAAU,EAAE,IAAM,EAAE,SAAS,cAAc,QAAQ,EAAE,EAAE,IAAI,EAAI,EAAE,MAAM,GAAK,EAAE,WAAW,EAAO,GAAW,EAAQ,EAAO,EAAU,EAAE,EAAW,MAAM,GAAG,EAAU,sBAAsB,CAAC,EAAE,EAAE,YAAY,EAAW,MAAM,kBAAkB,GAAK,CAAC,EAAE,SAAS,KAAK,YAAY,CAAC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