1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[20056],{5917:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},8597:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("mouse-pointer-2",[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]])},12889:()=>{},14558:(e,t,r)=>{"use strict";r.d(t,{L:()=>s});var a=r(12115),i=r(80661);function n(e){let t=t=>{("auth_token"===t.key||null===t.key)&&e()};return window.addEventListener("stlbuddy-session-changed",e),window.addEventListener("storage",t),()=>{window.removeEventListener("stlbuddy-session-changed",e),window.removeEventListener("storage",t)}}function s(){return(0,a.useSyncExternalStore)(n,i.c,()=>null)}},16140:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]])},18995:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(95155),i=r(12115);function n(e){let{children:t,label:r="Settings",resetKey:n,className:s="",contentClassName:l=""}=e,o=(0,i.useRef)(null);return(0,i.useLayoutEffect)(()=>{o.current&&(o.current.scrollTop=0)},[n]),(0,i.useLayoutEffect)(()=>{let e=o.current;if(!e)return;let t=0,r=()=>{cancelAnimationFrame(t),t=requestAnimationFrame(()=>{let t=e.closest(".native-root-window,.native-factory-root,.app-shell,.clicker-app,.hype-app,.app");if(t){let e=Math.max(0,innerHeight-t.getBoundingClientRect().top-window.scrollY)+"px";t.dataset.singleWindow="true",t.style.setProperty("--tool-available-height",e),t.style.setProperty("--native-factory-height",e)}for(let t of e.querySelectorAll("[role=listbox]")){var r;let e=null==(r=t.parentElement)?void 0:r.querySelector("button[aria-haspopup=listbox]");if(!e)continue;let a=e.getBoundingClientRect(),i=Math.min(288,innerHeight-24),n=Math.min(a.width,innerWidth-24);for(let[e,r]of Object.entries({"--native-factory-menu-left":Math.max(12,Math.min(innerWidth-n-12,a.left))+"px","--native-factory-menu-top":(innerHeight-a.bottom>=i+8?a.bottom+4:Math.max(12,a.top-i-4))+"px","--native-factory-menu-width":n+"px","--native-factory-menu-height":i+"px"}))t.style.getPropertyValue(e)!==r&&t.style.setProperty(e,r)}})},a=new ResizeObserver(r);a.observe(e);let i=new MutationObserver(r);return i.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["aria-expanded","hidden","open"]}),window.addEventListener("resize",r),e.addEventListener("scroll",r),r(),()=>{cancelAnimationFrame(t),a.disconnect(),i.disconnect(),window.removeEventListener("resize",r),e.removeEventListener("scroll",r)}},[]),(0,a.jsx)("div",{ref:o,className:"".concat(s," stlb-inspector-scroll"),role:"region","aria-label":r,tabIndex:0,children:(0,a.jsx)("div",{className:"".concat(l," stlb-inspector-content"),children:t})})}r(12889)},21786:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]])},26341:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("cookie",[["path",{d:"M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5",key:"laymnq"}],["path",{d:"M8.5 8.5v.01",key:"ue8clq"}],["path",{d:"M16 15.5v.01",key:"14dtrp"}],["path",{d:"M12 12v.01",key:"u5ubse"}],["path",{d:"M11 17v.01",key:"1hyl5a"}],["path",{d:"M7 14v.01",key:"uct60s"}]])},27937:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},37354:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]])},39867:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]])},43893:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("cylinder",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5v14a9 3 0 0 0 18 0V5",key:"aqi0yr"}]])},71847:(e,t,r)=>{"use strict";r.d(t,{A:()=>
1o});var a=r(12115);let i=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},n=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()};var s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let l=(0,a.forwardRef)((e,t)=>{let{color:r="currentColor",size:i=24,strokeWidth:l=2,absoluteStrokeWidth:o,className:c="",children:d,iconNode:h,...u}=e;return(0,a.createElement)("svg",{ref:t,...s,width:i,height:i,stroke:r,strokeWidth:o?24*Number(l)/Number(i):l,className:n("lucide",c),...!d&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(u)&&{"aria-hidden":"true"},...u},[...h.map(e=>{let[t,r]=e;return(0,a.createElement)(t,r)}),...Array.isArray(d)?d:[d]])}),o=(e,t)=>{let r=(0,a.forwardRef)((r,s)=>{let{className:o,...c}=r;return(0,a.createElement)(l,{ref:s,iconNode:t,className:n("lucide-".concat(i(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),o),...c})});return r.displayName=i(e),r}},76907:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},83011:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useMergedRef",{enumerable:!0,get:function(){return i}});let a=r(12115);function i(e,t){let r=(0,a.useRef)(null),i=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=r.current;e&&(r.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(r.current=n(e,a)),t&&(i.current=n(t,a))},[e,t])}function n(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},84472:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("lock-keyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]])},95740:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}
1],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]])},95873:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>G});var a=r(95155),i=r(95015),n=r(12775),s=r(18995);function l(e){return(0,a.jsx)(s.A,{...e,className:"settings-pages",contentClassName:"settings-page-content"})}var o=r(12115),c=r(15239),d=r(80131),h=r(35696),u=r(21786),p=r(95740),m=r(5917),g=r(84472),x=r(27937),f=r(26341),w=r(71847);let v=(0,w.A)("file-image",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]]);var j=r(43893);let y=(0,w.A)("stamp",[["path",{d:"M14 13V8.5C14 7 15 7 15 5a3 3 0 0 0-6 0c0 2 1 2 1 3.5V13",key:"i9gjdv"}],["path",{d:"M20 15.5a2.5 2.5 0 0 0-2.5-2.5h-11A2.5 2.5 0 0 0 4 15.5V17a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1z",key:"1vzg3v"}],["path",{d:"M5 22h14",key:"ehvnwv"}]]),b=(0,w.A)("layers-2",[["path",{d:"M13 13.74a2 2 0 0 1-2 0L2.5 8.87a1 1 0 0 1 0-1.74L11 2.26a2 2 0 0 1 2 0l8.5 4.87a1 1 0 0 1 0 1.74z",key:"15q6uc"}],["path",{d:"m20 14.285 1.5.845a1 1 0 0 1 0 1.74L13 21.74a2 2 0 0 1-2 0l-8.5-4.87a1 1 0 0 1 0-1.74l1.5-.845",key:"byia6g"}]]);var k=r(16140),M=r(76907),N=r(39867),A=r(7496),z=r.n(A);class C{find(e){let t=e;for(;this.parent[t]!==t;)t=this.parent[t];for(;this.parent[e]!==e;){let r=this.parent[e];this.parent[e]=t,e=r}return t}union(e,t){let r=this.find(e),a=this.find(t);r!==a&&(this.parent[a]=r)}constructor(e){this.parent=Int32Array.from({length:e},(e,t)=>t)}}let E=(e,t)=>"".concat(e[3*t],",").concat(e[3*t+1],",").concat(e[3*t+2]);function L(e){let t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"STL Buddy Cookie Cutter Factory",r=e.indices.length/3,a=new ArrayBuffer(84+50*r),i=new Uint8Array(a),n=new DataView(a);new TextEncoder().encode(t.slice(0,80)).forEach((e,t)=>{i[t]=e}),n.setUint32(80,r,!0);for(let t=0;t<r;t+=1){let r=84+50*t,a=[e.indices[3*t],e.indices[3*t+1],e.indices[3*t+2]].map(t=>[e.positions[3*t],e.positions[3*t+1],e.positions[3*t+2]]),i=function(e,t,r){let a=[t[0]-e[0],t[1]-e[1],t[2]-e[2]],i=[r[0]-e[0],r[1]-e[1],r[2]-e[2]],n=[a[1]*i[2]-a[2]*i[1],a[2]*i[0]-a[0]*i[2],a[0]*i[1]-a[1]*i[0]],s=Math.hypot(...n);return s>0?[n[0]/s,n[1]/s,n[2]/s]:[0,0,0]}(a[0],a[1],a[2]),s=r;for(let e of i)n.setFloat32(s,e,!0),s+=4;for(let e of a)for(let t of e)n.setFloat32(s,t,!0),s+=4;n.setUint16(s,0,!0)}return i}(e.mesh,"STL Buddy ".concat(e.name)),r=function(e){let t=[],r=new Map,a=new Uint32Array(e.positions.length/3),i=[];for(let t=0;t<a.length;t+=1){let n=E(e.positions,t),s=r.get(n);void 0===s&&(s=r.size,r.set(n,s),i.push([e.positions[3*t],e.positions[3*t+1],e.positions[3*t+2]])),a[t]=s}let n=new Map,s=new C(r.size),l=0,o=0,c=[1/0,1/0,1/0],d=[-1/0,-1/0,-1/0];for(let e of i)for(let t=0;t<3;t+=1)c[t]=Math.min(c[t],e[t]),d[t]=Math.max(d[t],e[t]);for(let t=0;t<e.indices.length;t+=3){let r=[a[e.indices[t]],a[e.indices[t+1]],a[e.indices[t+2]]],c=i[r[0]],d=i[r[1]],u=i[r[2]],p=[d[0]-c[0],d[1]-c[1],d[2]-c[2]],m=[u[0]-c[0],u[1]-c[1],u[2]-c[2]],g=[p[1]*m[2]-p[2]*m[1],p[2]*m[0]-p[0]*m[2],p[0]*m[1]-p[
11]*m[0]];for(let[e,t]of((r[0]===r[1]||r[1]===r[2]||r[2]===r[0]||1e-7>Math.hypot(...g))&&(l+=1),o+=(c[0]*(d[1]*u[2]-d[2]*u[1])-c[1]*(d[0]*u[2]-d[2]*u[0])+c[2]*(d[0]*u[1]-d[1]*u[0]))/6,[[r[0],r[1]],[r[1],r[2]],[r[2],r[0]]])){var h;let r=e<t?"".concat(e,":").concat(t):"".concat(t,":").concat(e);n.set(r,(null!=(h=n.get(r))?h:0)+1),s.union(e,t)}}let u=0,p=0;for(let e of n.values())1===e?u+=1:2!==e&&(p+=1);let m=new Set;for(let e of a)m.add(s.find(e));let g=m.size;e.indices.length||t.push("Export contains no triangles."),l&&t.push("Export contains ".concat(l," degenerate triangle").concat(1===l?"":"s",".")),u&&t.push("Export contains ".concat(u," open boundary edge").concat(1===u?"":"s",".")),p&&t.push("Export contains ".concat(p," non-manifold edge").concat(1===p?"":"s",".")),1!==g&&t.push("Part contains ".concat(g," disconnected shells; one connected printable piece is required.")),1e-5>Math.abs(o)&&t.push("Export has zero enclosed volume."),o<0&&t.push("Export triangle winding produces a negative signed volume.");let x=c.map((e,t)=>Number.isFinite(e)?d[t]-e:0);return x.some(e=>e<=0||e>300)&&t.push("Part dimensions fall outside the supported 0â300 mm range."),{valid:0===t.length,triangleCount:e.indices.length/3,vertexCount:r.size,boundaryEdges:u,nonManifoldEdges:p,degenerateTriangles:l,components:g,signedVolume:o,dimensions:x,errors:t}}(function(e){if(e.byteLength<84)throw Error("STL is truncated.");let t=new DataView(e.buffer,e.byteOffset,e.byteLength),r=t.getUint32(80,!0);if(84+50*r!==e.byteLength)throw Error("STL triangle count does not match its byte length.");let a=new Float32Array(9*r),i=new Uint32Array(3*r);for(let e=0;e<r;e+=1){let r=84+50*e+12;for(let n=0;n<3;n+=1){let s=9*e+3*n;a[s]=t.getFloat32(r,!0),a[s+1]=t.getFloat32(r+4,!0),a[s+2]=t.getFloat32(r+8,!0),i[3*e+n]=3*e+n,r+=12}}return{positions:a,indices:i}}(t));if(!r.valid)throw Error("Serialized ".concat(e.name," failed validation: ").concat(r.errors.join(" ")));return t}async function P(e){let t=new(z());for(let r of e)t.file(r.filename,L(r));return t.generateAsync({type:"uint8array",compression:"DEFLATE",compressionOptions:{level:6}})}var R=r(17567);class S{detect(e){return this.enqueue({id:++this.sequence,kind:"detect",payload:e},[e.rgbaBuffer])}generate(e,t){return this.enqueue({id:++this.sequence,kind:"generate",payload:{design:e,parameters:t}},[])}enqueue(e,t){return new Promise((r,a)=>{let i={request:e,transfer:t,resolve:r,reject:a};if(this.active){var n;null==(n=this.pending)||n.reject(Error("Superseded by a newer change.")),this.pending=i}else this.dispatch(i)})}dispatch(e){this.active=e,this.worker.postMessage(e.request,e.transfer)}
1finish(e){if(!this.active||e.id!==this.active.request.id)return;let t=this.active;if(this.active=null,e.ok?t.resolve(e.data):t.reject(Error(e.message)),this.pending){let e=this.pending;this.pending=null,this.dispatch(e)}}crash(e){var t,r;let a=Error(e);null==(t=this.active)||t.reject(a),null==(r=this.pending)||r.reject(a),this.active=null,this.pending=null}dispose(){var e,t;let r=Error("Background processor closed.");null==(e=this.active)||e.reject(r),null==(t=this.pending)||t.reject(r),this.active=null,this.pending=null,this.worker.terminate()}constructor(){this.sequence=0,this.active=null,this.pending=null,this.worker=(0,R.E7)(new Worker(r.tu(new URL(r.p+r.u(61929),r.b)),{type:void 0}),{starts:e=>"generate"===e.kind,result:e=>!0===e.ok?"success":!1===e.ok?"failure":void 0}),this.worker.onmessage=e=>this.finish(e.data),this.worker.onerror=e=>this.crash(e.message||"Background processing stopped.")}}let D={mode:"cookie-cutter",targetWidth:38.1,targetHeight:50.8,cutterHeight:15,wallThickness:2,cuttingEdge:2,taperHeight:1.5,gripThickness:2.4,gripHeight:2.5,minimumFeature:.8,stampInset:1.4,stampClearance:.45,stampPlateThickness:2.4,stampReliefHeight:2.2,embossDetailHeight:4.2,cakeBodyDepth:24,moldWallThickness:4,moldReliefDepth:1.2,stickDiameter:4,stickDepth:18,stickOffset:0,pinDiameter:5,pinClearance:.25,rollerLength:100,rollerDiameter:40,rollerReliefHeight:1.2,rollerAxleDiameter:8,rollerPattern:"repeat"},F={"cookie-cutter":"Cookie Cutter","embossing-cutter":"Embossing Cutter","two-piece":"Cutter + Stamp","cake-pop-mold":"Cake Pop Press Mold","texture-roller":"Texture Roller"};var T=r(6185);function q(e){let{label:t,roller:r=!1}=e;return(0,a.jsxs)("div",{className:"busy-overlay",role:"status","aria-live":"polite",children:[(0,a.jsx)("div",{className:"cookie-cut-demo","aria-hidden":"true",children:r?(0,a.jsxs)("svg",{viewBox:"0 0 180 132",children:[(0,a.jsx)("rect",{x:"20",y:"38",width:"140",height:"78",rx:"18",className:"demo-dough"}),(0,a.jsxs)("g",{className:"demo-roller-trail",fill:"none",stroke:"#bd843e",strokeWidth:"2.5",children:[(0,a.jsx)("path",{d:"m49 69 4 7 8 1-6 6 1 8-7-4-7 4 1-8-6-6 8-1Z"}),(0,a.jsx)("path",{d:"m109 69 4 7 8 1-6 6 1 8-7-4-7 4 1-8-6-6 8-1Z"})]}),(0,a.jsxs)("g",{className:"demo-roller",children:[(0,a.jsx)("rect",{x:"19",y:"45",width:"142",height:"10",rx:"5",fill:"#8b81d7"}),(0,a.jsx)("rect",{x:"32",y:"29",width:"116",height:"42",rx:"15",fill:"#6751d4",stroke:"#4935a7",strokeWidth:"2.5"}),(0,a.jsx)("path",{d:"M50 34v32m80-32v32",stroke:"#a69be9",strokeWidth:"3"}),(0,a.jsx)("circle",{cx:"79",cy:"47",r:"2.5",fill:"white"}),(0,a.jsx)("circle",{cx:"101",cy:"47",r:"2.5",fill:"white"}),(0,a.jsx)("path",{d:"M85 55q5 5 10 0",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round"})]})]}):(0,a.jsxs)("svg",{viewBox:"0 0 180 132",children:[(0,a.jsx)("ellipse",{className:"demo-shadow",cx:"90",cy:"116",rx:"67",ry:"8"}),(0,a.jsx)("path",{className:"demo-dough",d:"M21 65c0-12 10-20 23-20h92c14 0 23 8 23 20v36c0 10-9 16-21 16H42c-12 0-21-6-21-16Z"}),(0,a.jsx)("path",{className:"demo-cut-seam",d:"M90 61c7-7 19-4 21 6 10-2 18 7 14 16 8 6 5 19-5 22-1 11-13 16-21 9-7 8-20 6-24-4-10 3-19-6-15-16-8-6-4-19 7-22-2-11 9-20 19-16 5-10 18-11 24-3Z"}),(0,a.jsx)("path",{className:"demo-cookie-piece",d:"M90 61c7-7 19-4 21 6 10-2 18 7 14 16 8 6 5 19-5 22-1 11-13 16-21 9-7 8-20 6-24-4-10 3-19-6-15-16-8-6-4-19 7-22-2-11 9-20 19-16 5-10 18-11 24-3Z"}),(0,a.jsxs)("g",{className:"demo-cutter",children:[(0,a.jsx)("path",{className:"demo-cutter-rim",d:"M90 61c7-7 19-4 21 6 10-2 18 7 14 16 8 6 5 19-5 22-1 11-13 16-21 9-7 8-20 6-24-4-10 3-19-6-15-16-8-6-4-19 7-22-2-11 9-20 19-16 5-10 18-11 24-3Z"}),(0,a.jsx)("path",{className:"demo-cutter-grip",d:"M65 55V38c0-6 5-10 10-10h30c6 0 10 4 10 10v17"}),(0,a.jsx)("rect",{className:"demo-handle",x:"58",y:"20",width:"64",height:"14",rx:"7"})]}),(0,a.jsx)("circle",{className:"demo-chip chip-one",cx:"82",cy:"84",r:"3"}),(0,a.jsx)("circle",{className:"demo-chip chip-two",cx:"103",cy:"94",r:"3"})]})}),(0,a.jsx)("strong",{children:t}),(0,a.jsx)("span",{children:r?"Wrapping your design around a printable roller.":"Pressing a cutter through dough and lifting a clean cookie."})]})}var W=r(8597),H=r(37354),O=r(85339),B=r(87548),U=r(35833);let Z=(e,t)=>{let r=3*t,a=Object.is(e[r],-0)?0:e[r],i=Object.is(e[r+1],-0)?0:e[r+1],n=Object.is(e[r+2],-0)?0:e[r+2];return"".concat(a,",").concat(i,",").concat(n)};function I(e){let{parts:t,exploded:r,inspection:i=!1,cavityView:n=!1,rollerVie
1w:s=!1}=e,l=(0,o.useRef)(null),c=(0,o.useRef)(()=>void 0);return(0,o.useEffect)(()=>{let e=l.current;if(!e)return;let a=new O.Z58;a.background=new O.Q1f("#f2eff8");let o=new O.ubm(38,1,.1,2e3);o.up.set(0,0,1);let d=new B.WebGLRenderer({antialias:!0,alpha:!1});d.setPixelRatio(Math.min(window.devicePixelRatio,2)),d.outputColorSpace=O.er$,d.shadowMap.enabled=!1,e.appendChild(d.domElement);let h=new U.N(o,d.domElement);h.enableDamping=!1,h.screenSpacePanning=!0,h.minDistance=20,h.maxDistance=900;let u=new O.eaF(new O.bdM(256,256),new O._4j({color:i?"#d8d3ff":"#d6dce6",roughness:.96,metalness:0,side:O.$EB,transparent:i,opacity:i?.13:1,depthWrite:!i}));u.position.z=-.08,a.add(u);let p=new O.fTw(256,32,"#8f98aa","#bcc3d0");p.rotation.x=Math.PI/2,p.position.z=0,p.material.transparent=!0,p.material.opacity=i?.13:.38,a.add(p);let m=new O.DXC(new O.TDQ(new O.bdM(256,256)),new O.mrM({color:"#7a8292"}));m.position.z=.02,a.add(m),a.add(new O.dth("#ffffff","#8b86a2",2));let g=new O.ZyN("#ffffff",2.6);g.position.set(-90,-100,150),a.add(g);let x=new O.ZyN("#ddd9ff",.7);x.position.set(110,40,80),a.add(x);let f=new O.YJl;a.add(f);let w=t.length>1&&r?Math.max(62,...t.map(e=>e.validation.dimensions[0]+18)):0;if(t.forEach((e,r)=>{let a=function(e,t){let r=Math.floor(e.indices.length/3),a=new Float64Array(3*r),i=new Float64Array(3*r),n=new Map;for(let t=0;t<r;t+=1){let r=3*e.indices[3*t],s=3*e.indices[3*t+1],l=3*e.indices[3*t+2],o=e.positions[s]-e.positions[r],c=e.positions[s+1]-e.positions[r+1],d=e.positions[s+2]-e.positions[r+2],h=e.positions[l]-e.positions[r],u=e.positions[l+1]-e.positions[r+1],p=e.positions[l+2]-e.positions[r+2],m=c*p-d*u,g=d*h-o*p,x=o*u-c*h,f=Math.max(1e-20,Math.hypot(m,g,x));a[3*t]=m,a[3*t+1]=g,a[3*t+2]=x,i[3*t]=m/f,i[3*t+1]=g/f,i[3*t+2]=x/f;for(let r=0;r<3;r+=1){let a=e.indices[3*t+r],i=Z(e.positions,a),s=n.get(i);s?s.push(t):n.set(i,[t])}}let s=new Float32Array(9*r),l=new Float32Array(9*r),o=Math.cos(t);for(let t=0;t<r;t+=1){let r=3*t;for(let d=0;d<3;d+=1){var c;let h=e.indices[r+d],u=3*h,p=9*t+3*d;s[p]=e.positions[u],s[p+1]=e.positions[u+1],s[p+2]=e.positions[u+2];let m=0,g=0,x=0;for(let s of null!=(c=n.get(Z(e.positions,h)))?c:[t]){let e=3*s;i[r]*i[e]+i[r+1]*i[e+1]+i[r+2]*i[e+2]>o&&(m+=a[e],g+=a[e+1],x+=a[e+2])}let f=Math.max(1e-20,Math.hypot(m,g,x));l[p]=m/f,l[p+1]=g/f,l[p+2]=x/f}}let d=new O.LoY;return d.setAttribute("position",new O.THS(s,3)),d.setAttribute("normal",new O.THS(l,3)),d.computeBoundingSphere(),d}(e.mesh,O.cj9.degToRad(n?60:88)),i=function(e,t){var r,a,i;if(!["embosser","stamp","mold-a","mold-b","roller"].includes(t.id))return!1;let n=e.getAttribute("position"),s=new Map,l=1/0,o=-1/0;for(let e=0;e<n.count;e+=1)l=Math.min(l,n.getZ(e)),o=Math.max(o,n.getZ(e));let c="embosser"===t.id,d=t.id.startsWith("mold-"),h="roller"===t.id,u=new O.Pq0,p=new O.Pq0,m=new O.Pq0,g=new O.Pq0,x=e=>(u.fromBufferAttribute(n,e),p.fromBufferAttribute(n,e+1),m.fromBufferAttribute(n,e+2),g.crossVectors(p.sub(u),m.sub(u)));for(let e=0;e<n.count;e+=3){let t=x(e),r=t.length()/2,a=n.getZ(e);if((c?-t.z:t.z)>1.99*r&&a>l+.5&&a<o-.5){let e=Math.round(1e3*a)/1e3;s.set(e,(null!=(i=s.get(e))?i:0)+r)}}let f=[...s].sort((e,t)=>t[1]-e[1]),w=d?null==(r=f.filter(e=>{var t,r;let[,a]=e;return a>(null!=(r=null==(t=f[0])?void 0:t[1])?r:0)*.1}).sort((e,t)=>e[0]-t[0])[0])?void 0:r[0]:null==(a=f[0])?void 0:a[0],v=0;if(h)for(let e=0;e<n.count;e+=1).001>Math.abs(n.getZ(e)-l)&&(v=Math.max(v,Math.hypot(n.getX(e),n.getY(e))));if(!h&&void 0===w)return!1;let j=new O.Q1f("#dcd7ef"),y=new O.Q1f("#6751d4"),b=new O.Q1f("#7964d9"),k=new Float32Array(3*n.count);for(let e=0;e<n.count;e+=3){let t=x(e).normalize();for(let r=0;r<3;r+=1){let a=e+r,i=n.getZ(a),s=.015>Math.abs(i-(null!=w?w:0))&&(c?-t.z:t.z)>.99,l=Math.hypot(n.getX(a),n.getY(a)),o=h?l>v+.08:(c?(null!=w?w:0)-i:i-(null!=w?w:0))>.08,d=h?o?y:j:s?j:o?y:b;k[3*a]=d.r,k[3*a+1]=d.g,k[3*a+2]=d.b}}return e.setAttribute("color",new O.THS(k,3)),!0}(a,e),s=new O._4j({color:i?"#ffffff":e.color,vertexColors:i,roughness:.85,metalness:0,side:O.$EB}),l=new O.eaF(a,s);if(l.position.x=w*(r-(t.length-1)/2),l.userData.partId=e.id,f.add(l),i){let e=new O.TDQ(a,65),t=new O.DXC(e,new O.mrM({color:"#413373",transparent:!0,opacity:.16}));l.add(t)}}),i&&(f.rotation.y=Math.PI,f.position.z=Math.max(...t.map(e=>e.validation.dimensions[2]),0)+.5),s){f.rotation.y=Math.PI/2,f.rotateZ(1.25*Math.PI);let e=new O.NRn().setFromObject(f);f.position.x-=(e.min.x+e.max.x)/2,f.position.z-=e.min.z}let v=()=>d.render(a,o),j=()=>{let e=new O.NRn().setFromObject(f);e.isEmpty()&&e.setFromCenterAndSize(new O.Pq0,new O.Pq0(80,80,20));let t=e.getCenter(new O.Pq0),r=e.getSize(new O.Pq0),a=Math.max(r.x,r.y,r.z,35),s=n||i;h.target.copy(t),o.position.set(t.x+a*(s?.52:1.05),t.y-a*(s?.78:1.35),t.z+a*(s?1.72:1.15)),o.near=Math.max(.1,a/100),o.far=20*a+500,o.updateProjectionMatrix(),h.update(),v()};c.current=j;let y=()=>{let t=Math.max(1,e.clientWidth),r=Math.max(1,e.clientHeight);d.setSize(t,r,!1),o.aspect=t/r,o.updateProjectionMatrix(),v()},b=new ResizeObserver(y);return b.observe(e),h.addEventListener("change",v),y(),j(),()=>{b.disconnect(),h.removeEventListener("change",v),h.dispose(),c.current=()=>void 0,f.traverse(e=>{if(e instanceof O.eaF||e instanceof O.DXC){e.geometry.dispose();let t=e.material;
1Array.isArray(t)?t.forEach(e=>e.dispose()):t.dispose()}}),u.geometry.dispose(),u.material.dispose(),d.dispose(),d.domElement.remove()}},[n,r,i,t,s]),(0,a.jsxs)("div",{className:"preview-3d-shell",children:[(0,a.jsx)("div",{ref:l,className:"preview-3d","aria-label":"Interactive 3D preview on a 256 millimeter print bed"}),(0,a.jsxs)("div",{className:"viewer-badge".concat(i||n||s?" inspection":""),children:[(0,a.jsx)(k.A,{size:15})," ",s?"Roller view \xb7 STL prints upright":i?"Cutting face up \xb7 details in purple":n?"Cavity faces up \xb7 purple imprints":t.some(e=>"stamp"===e.id)?"Stamp face up \xb7 details in purple":"256 \xd7 256 mm bed"]}),(0,a.jsxs)("div",{className:"viewer-help",children:[(0,a.jsx)(W.A,{size:14})," Drag to orbit \xb7 Right-drag to pan \xb7 Scroll to zoom"]}),(0,a.jsxs)("button",{className:"camera-reset",onClick:()=>c.current(),children:[(0,a.jsx)(H.A,{size:15})," Reset view"]})]})}function V(e){let{label:t,value:r,min:i,max:n,step:s,unit:l="mm",help:c,onChange:d}=e,[h,u]=(0,o.useState)(null),p=()=>{let e=Number(null!=h?h:r);Number.isFinite(e)&&d(Math.max(i,Math.min(n,e))),u(null)};return(0,a.jsxs)("label",{className:"number-control",children:[(0,a.jsxs)("span",{className:"control-heading",children:[(0,a.jsx)("span",{children:t}),(0,a.jsxs)("span",{className:"number-field",children:[(0,a.jsx)("input",{"aria-label":"".concat(t," numeric value"),inputMode:"decimal",value:null!=h?h:String(r),onChange:e=>u(e.target.value),onBlur:p,onKeyDown:e=>{"Enter"===e.key&&(p(),e.currentTarget.blur())}}),(0,a.jsx)("span",{children:l})]})]}),(0,a.jsx)("input",{"aria-label":"".concat(t," slider"),type:"range",min:i,max:n,step:s,value:r,onChange:e=>d(Number(e.target.value))}),c?(0,a.jsx)("small",{children:c}):null]})}async function Y(e){if(!["image/png","image/jpeg","image/webp"].includes(e.type))throw Error("Choose a PNG, JPG, or WebP image.");let t=await new Promise((t,r)=>{let a=new FileReader;a.onerror=()=>r(Error("The image could not be read.")),a.onload=()=>t(String(a.result)),a.readAsDataURL(e)}),r=await new Promise((e,r)=>{let a=new Image;a.onload=()=>e(a),a.onerror=()=>r(Error("The image could not be decoded.")),a.src=t}),a=Math.min(1,800/Math.max(r.naturalWidth,r.naturalHeight)),i=Math.max(8,Math.round(r.naturalWidth*a)),n=Math.max(8,Math.round(r.naturalHeight*a)),s=document.createElement("canvas");s.width=i,s.height=n;let l=s.getContext("2d",{willReadFrequently:!0});if(!l)throw Error("Image processing is unavailable in this browser.");l.drawImage(r,0,0,i,n);let o=l.getImageData(0,0,i,n);return{dataUrl:t,width:i,height:n,rgba:o.data}}let _={"cookie-cutter":"Cuts the outside shape.","embossing-cutter":"Cuts the shape and presses in the picture details.","two-piece":"A separate cutter and detail stamp.","cake-pop-mold":"Two deep press halves: one detailed, one smooth.","texture-roller":"Roll your design into dough with a patterned cylinder."};function G(){var e,t;let[r,s]=(0,o.useState)(null),[w,A]=(0,o.useState)(D),[z,C]=(0,o.useState)(!1),[E,R]=(0,o.useState)(null),[W,H]=(0,o.useState)(null),[O,B]=(0,o.useState)(null),[U,Z]=(0,o.useState)(!1),[G,Q]=(0,o.useState)(0),[X,$]=(0,o.useState)(!1),[J,K]=(0,o.useState)(-1),ee=(0,o.useRef)(null),et=(0,o.useRef)(G),er=(0,o.useRef)(!1),ea=(0,o.useRef)(0),ei=(0,o.useRef)(!0),en=()=>{et.current+=1,Q(et.current)};(0,o.useEffect)(()=>{let e=!0;ei.current=!0;let t=new S;return ee.current=t,queueMicrotask(()=>{e&&Z(!0)}),()=>{e=!1,ei.current=!1,ea.current+=1,t.dispose(),ee.current=null}},[]);let es=r?(0,T.Gx)(r):[];(0,o.useEffect)(()=>{if(!U||!r||es.length||X)return;let e=window.setTimeout(()=>{var e;R("Creating your printable file"),null==(e=ee.current)||e.generate(r,w).then(e=>{ei.current&&G===et.current&&(B(e),K(G),R(null))}).catch(e=>{!e.message.startsWith("Superseded")&&ei.current&&G===et.current&&(H(e.message),R(null))})},120);return()=>window.clearTimeout(e)},[r,w,G,es.length,U,X]);let el=async e=>{if(!e||!ee.current)return;let t=++ea.current;en(),$(!0),R("Finding the cookie design"),H(null);try{let r=await Y(e);if(!ei.current||t!==ea.current)return;let a=await ee.current.detect({rgbaBuffer:r.rgba.slice().buffer,width:r.width,height:r.height,sourceName:e.name,sourceDataUrl:r.dataUrl,isolationStrength:50,detailSensitivity:58,smoothing:.32,minimumFeaturePixels:Math.max(12,Math.round(r.width*r.height*1e-4))});if(!ei.current||t!==ea.current)return;let i=(0,T.Gx)(a);if(i.length)throw Error(i.join(" "));s(a),B(null),K(-1),$(!1),R(null)}catch(r){let e=r instanceof Error?r.message:"Image processing failed.";ei.current&&t===ea.current&&!e.startsWith("Superseded")&&(H(e),$(!1),R(null))}},eo={onDragEnter:e=>{e.preventDefault(),C(!0)},onDragOver:e=>e.preventDefault(),onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||C(!1)},onDrop:e=>{var t;e.preventDefault(),C(!1),el(null==(t=e.dataTransfer.files)?void 0:t[0])}};(0,i.p)(el,H);let ec=(0,a.jsx)("input",{type:"file",accept:"image/png,image/jpeg,image/webp",onChange:e=>{var t;el(null==(t=e.target.files)?void 0:t[0]),e.currentTarget.value=""}}),ed="texture-roller"===w.mode,eh=r&&!ed?(0,T.iD)(r,w.targetWidth,w.targetHeight):null,eu=ed?"Texture height":"Interior detail height",ep=ed?w.rollerReliefHeight:"embossing-cutter"===w.mode?w.embossDetailHeight:"two-piece"===w.mode?w.stampReliefHeight:w.moldReliefDepth,em=ed?{min:.6,max:2}:"embossing-cutter"===w.mode?{min:1.5,max:5.5}:"two-piece"===w.mode?{min:.8,max:4}:{min:.4,max:3},eg=e=>{if(!Number.isFinite(e))return;let t=Math.round(10*Math.max(em.min,Math.min(em.max,e)))/10;A(e=>"texture-roller"===e.mode?{...e,rollerReliefHeight:t}:"embossing-cutter"===e.mode?{...e,embossDetailHeight:t}:"two-piece"===e.mode?{...e,stampReliefHeight:t}:{...e,moldReliefDepth:t}),en(),H(null)},ex=e=>{A(t=>({...t,...e})),en(),H(null)},ef=!!(O&&J===G&&O.parts.every(e=>e.validation.valid)&&!E&&!X&&!es.length),ew=async()=>{let e;if(!O||!ef||er.current)return;er.current=!0;let t=et.current;R("Checking and packing your file"),H(null);try{let r=await (0,h.mJ)();if(!r.authenticated)throw Error("Sign in to your local account to download.");let a=r.user.id;if(e=await (0,n.MI)("cookie-cutter-factory",a),await (0,d.m)("cookie-cutter-factory",a),t!==et.current)throw Error("Your design changed. Wait for the updated preview before downloading.");let i=1===O.parts.length,s=i?L(O.parts[0]):await P(O.parts);if(await (0,d.m)("cookie-cutter-factory",a),!ei.current||t!==et.current)throw Error("Your design changed. Wait for the updated preview before downloading.");let l=await (0,d.V)("cookie-cutter-factory",a,s,O,i?"stl":"zip");if(!ei.current||t!==et.current)throw Error("Your design changed. Retry the download.");!function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"model/stl",a=new Blob([e],{type:r}),i=URL.createObjectURL(a),n=document.createElement("a");n.href=i,n.download=t,document.body.appendChild(n),n.click(),n.remove(),window.setTimeout(()=>URL.revokeObjectURL(i),1e3)}(s,i?O.parts[0].filename:"cake-pop-mold"===w.mode?"cake-pop-press-mold.zip":"
1cookie-cutter-and-stamp.zip",i?"model/stl":"application/zip"),l(),(0,n.o)(e,{filename:i?O.parts[0].filename:"cake-pop-mold"===w.mode?"cake-pop-press-mold.zip":"cookie-cutter-and-stamp.zip",byteLength:s.byteLength})}catch(r){(0,n.Lt)(e,r),ei.current&&t===et.current&&H(r instanceof Error?r.message:"Export failed.")}finally{(0,n.Lt)(e,new DOMException("Cancelled","AbortError")),er.current=!1,ei.current&&t===et.current&&R(null)}};return(0,a.jsx)("main",{className:"app-shell","data-app-ready":U?"true":"false","data-detail-count":null!=(e=null==r?void 0:r.details.length)?e:0,"data-detail-height":ep.toFixed(1),children:(0,a.jsxs)("section",{className:"workspace".concat(r?"":" awaiting-photo"),children:[(0,a.jsxs)("section",{className:"stage-panel","aria-label":"Your creation preview",children:[(0,a.jsxs)("div",{className:"stage-canvas",children:[r?O?(0,a.jsx)(I,{parts:O.parts,exploded:O.parts.length>1,inspection:"embossing-cutter"===O.mode,cavityView:"cake-pop-mold"===O.mode,rollerView:"texture-roller"===O.mode}):(0,a.jsxs)("div",{className:"model-placeholder",children:[(0,a.jsx)(p.A,{size:38}),(0,a.jsx)("strong",{children:"Preparing your previewâ¦"})]}):(0,a.jsxs)("label",{className:"upload-card hero-upload".concat(z?" is-dragging":""),...eo,children:[ec,(0,a.jsx)("span",{className:"upload-icon",children:(0,a.jsx)(u.A,{size:25})}),(0,a.jsx)("span",{className:"eyebrow",children:"Start here"}),(0,a.jsx)("h2",{children:"Drop in your picture"}),(0,a.jsx)("p",{children:"Weâll find the cookie shape and its details automatically."}),(0,a.jsx)("span",{className:"choose-photo",children:"Choose a photo"}),(0,a.jsx)("small",{children:"PNG, JPG, or WebP"})]}),E?(0,a.jsx)(q,{label:E,roller:ed}):null,W&&!r?(0,a.jsx)("div",{className:"upload-error",role:"alert",children:W}):null]}),r?(0,a.jsx)("div",{className:"stage-status",role:"status",children:(0,a.jsxs)("div",{className:W||es.length?"status-error":ef?"status-ok":"status-working",children:[(0,a.jsx)("span",{children:W||es[0]?"!":ef?(0,a.jsx)(m.A,{size:14}):"â¦"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("strong",{children:null!=(t=null!=W?W:es[0])?t:ef?"Your printable file is ready":"Making your ".concat(F[w.mode].toLowerCase(),"â¦")}),(0,a.jsx)("small",{children:W||es.length?"Your picture and settings are preserved. You can correct the issue and retry.":ef?"Previewed from the same checked geometry used for download.":"Your last finished preview stays visible while this updates."})]})]})}):(0,a.jsxs)("div",{className:"stage-empty-footer",children:[(0,a.jsx)(g.A,{size:13})," Your picture stays on this device.",(0,a.jsx)("span",{children:"v1.7.2"})]})]}),(0,a.jsxs)("aside",{className:"control-panel","aria-label":"Product settings and download",children:[(0,a.jsxs)("header",{className:"cookie-intro",children:[(0,a.jsxs)("div",{className:"brand",children:[(0,a.jsxs)("div",{className:"brand-mark","aria-hidden":"true",children:[(0,a.jsx)("span",{children:"STL"}),(0,a.jsx)("b",{children:"Buddy"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{children:"Cookie Cutter Factory"}),(0,a.jsx)("p",{children:"Photo in. Printable baking tools out."})]})]}),(0,a.jsxs)("ol",{className:"workflow","aria-label":"Upload, choose a product, then download",children:[(0,a.jsxs)("li",{className:r?"done":"current","aria-current":r?void 0:"step",children:[(0,a.jsx)("span",{className:"step-number",children:r?(0,a.jsx)(m.A,{size:13}):"1"})," Upload"]}),(0,a.jsx)("li",{className:"step-divider","aria-hidden":"true",children:(0,a.jsx)(x.A,{size:14})}),(0,a.jsxs)("li",{className:r?ef?"done":"current":"","aria-current":r&&!ef?"step":void 0,children:[(0,a.jsx)("span",{className:"step-number",children:ef?(0,a.jsx)(m.A,{size:13}):"2"})," Choose"]}),(0,a.jsx)("li",{className:"step-divider","aria-hidden":"true",children:(0,a.jsx)(x.A,{size:14})}),(0,a.jsxs)("li",{className:ef?"current":"","aria-current":ef?"step":void 0,children:[(0,a.jsx)("span",{className:"step-number",children:"3"})," Download"]})]}),(0,a.jsxs)("span",{className:"local-badge",children:[(0,a.jsx)(g.A,{size:13})," Private & local"]})]}),r?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"control-scroll",children:(0,a.jsxs)(l,{children:[(0,a.jsxs)("div",{className:"photo-card",children:[r.sourceDataUrl?(0,a.jsx)(c.default,{src:r.sourceDataUrl,width:52,height:52,unoptimized:!0,alt:"Uploaded source"}):(0,a.jsx)(v,{size:30}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{children:"Your picture"}),(0,a.jsx)("strong",{children:r.sourceName})]}),(0,a.jsxs)("label",{className:"replace-photo".concat(z?" is-dragging":""),...eo,children:[ec,(0,a.jsx)(u.A,{size:15})," Replace"]})]}),(0,a.jsxs)("div",{className:"choice-heading",children:[(0,a.jsx)("span",{children:"Make it yours"}),(0,a.jsx)("h2",{children:"What would you like to make?"}),(0,a.jsx)("p",{children:"Choose a product to see it come to life."})]}),(0,a.jsx)("div",{className:"mode-grid",children:Object.keys(F).map(e=>(0,a.jsxs)("button",{className:w.mode===e?"selected":"","aria-pressed":w.mode===e,onClick:()=>{e!==w.mode&&(A(t=>({...t,mode:e})),en(),H(null))},children:[(0,a.jsx)("span",{className:"mode-icon","aria-hidden":"true",children:"texture-roller"===e?(0,a.jsx)(j.A,{size:21}):"cookie-cutter"===e?(0,a.jsx)(f.A,{size:21}):"embossing-cutter"===e?(0,a.jsx)(y,{size:21}):"two-piece"===e?(0,a.jsx)(b,{size:21}):(0,a.jsx)(k.A,{size:21})}),(0,a.jsxs)("span",{children:[(0,a.jsx)("strong",{children:F[e]}),(0,a.jsx)("small",{children:_[e]})]}),(0,a.jsx)("span",{className:"mode-check","aria-hidden":"true",children:w.mode===e?(0,a.jsx)(m.A,{size:12}):null})]},e))}),eh?(0,a.jsxs)("div",{className:"detail-height-control","data-testid":"food-size",children:[(0,a.jsx)("strong",{children:"cake-pop-mold"===w.mode?"Cake-pop cavity":"Cookie size"}),(0,a.jsxs)("p",{children:[eh.height.toFixed(1)," mm tall \xd7 ",eh.width.toFixed(1)," mm wide"]}),(0,a.jsxs)("small",{children:["Fits within 2â³ tall \xd7 1\xbdâ³ wide, preserving your pictureâs proportions.","cake-pop-mold"===w.mode?" The surrounding mold is larger.":" Cutter wall: 2 mm, including the cutting edge."]})]}):null,"cookie-cutter"!==w.mode?(0,a.jsxs)("div",{className:"detail-height-control",children:[(0,a.jsxs)("label",{htmlFor:"detail-height",children:[(0,a.jsx)("span",{children:eu}),(0,a.jsxs)("strong",{children:[ep.toFixed(1)," mm"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("input",{id:"detail-height","aria-label":eu,type:"range",min:em.min,max:em.max,step:"0.1",value:ep,onChange:e=>eg(Number(e.target.value))}),(0,a.jsx)("input",{"aria-label":"".concat(eu," in millimeters"),type:"number",min:em.min,max:em.max,step:"0.1",value:ep.toFixed(1),onChange:e=>eg(Number(e.target.value))}),(0,a.jsx)("span",{children:"mm"})]}),(0,a.jsx)("small",{children:"Lower for a lighter impression, higher for a deeper one."})]}
1):null,ed?(0,a.jsxs)("details",{className:"roller-settings",children:[(0,a.jsxs)("summary",{children:["Roller size & pattern ",(0,a.jsxs)("span",{children:[w.rollerLength," \xd7 \xd8",w.rollerDiameter," mm"]})]}),(0,a.jsxs)("div",{className:"roller-options",children:[(0,a.jsxs)("div",{className:"pattern-choice",role:"group","aria-label":"Roller pattern",children:[(0,a.jsx)("button",{"aria-pressed":"repeat"===w.rollerPattern,onClick:()=>ex({rollerPattern:"repeat"}),children:"Repeating pattern"}),(0,a.jsx)("button",{"aria-pressed":"single"===w.rollerPattern,onClick:()=>ex({rollerPattern:"single"}),children:"Single design"})]}),(0,a.jsx)(V,{label:"Roller length",value:w.rollerLength,min:60,max:180,step:1,onChange:e=>ex({rollerLength:e})}),(0,a.jsx)(V,{label:"Roller diameter",value:w.rollerDiameter,min:30,max:70,step:1,onChange:e=>ex({rollerDiameter:e})}),(0,a.jsx)(V,{label:"Center hole",value:w.rollerAxleDiameter,min:6,max:14,step:.1,onChange:e=>ex({rollerAxleDiameter:e})}),(0,a.jsx)("p",{children:"The raised design is mirrored for its impression. Print the roller upright; use by hand or add your own matching axle. No handle is included."})]})]}):null]})}),(0,a.jsxs)("div",{className:"export-card".concat(ef?" ready":""),children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(M.A,{size:20}),(0,a.jsxs)("span",{children:[(0,a.jsx)("strong",{children:ef?"Ready to download":"Preparing your file"}),(0,a.jsx)("small",{children:(null==O?void 0:O.parts.length)===2?"One ZIP with both printable STL parts.":"One checked printable STL file."})]})]}),W?(0,a.jsxs)("p",{role:"alert",children:[W," ",(0,a.jsx)("a",{href:"/account",target:"_blank",rel:"noopener noreferrer",children:"Open your account"})]}):null,(0,a.jsxs)("button",{className:"export-button",disabled:!ef,onClick:()=>void ew(),children:[(0,a.jsx)(N.A,{size:18})," ",(null==O?void 0:O.parts.length)===2?"Download printable ZIP":"Download STL"]}),(0,a.jsxs)("p",{children:["Preview colors highlight the design; your STL is one material.",(0,a.jsx)("br",{}),"Use a material and cleaning process appropriate for food contact."]})]})]}):(0,a.jsxs)("div",{className:"welcome-panel",children:[(0,a.jsx)("span",{className:"welcome-icon",children:(0,a.jsx)(f.A,{size:26})}),(0,a.jsx)("span",{className:"eyebrow",children:"Made simple"}),(0,a.jsxs)("h2",{children:["One picture.",(0,a.jsx)("br",{}),"Five ways to make it."]}),(0,a.jsx)("p",{children:"Cookie cutters, detail stamps, press molds, and texture rollers. Start with a pictureâweâll handle the shapes."}),(0,a.jsxs)("ol",{className:"welcome-steps",children:[(0,a.jsxs)("li",{children:[(0,a.jsx)("span",{children:"1"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("strong",{children:"Add your picture"}),(0,a.jsx)("small",{children:"A clear subject on a plain background works best."})]})]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("span",{children:"2"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("strong",{children:"Choose your product"}),(0,a.jsx)("small",{children:"See the printable design in 3D."})]})]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("span",{children:"3"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("strong",{children:"Download & make"}),(0,a.jsx)("small",{children:"Get STL files for your 3D printer."})]})]})]}),(0,a.jsxs)("div",{className:"welcome-note",children:[(0,a.jsx)(p.A,{size:17}),(0,a.jsx)("p",{children:"No tracing. No CAD experience needed."})]})]})]})]})})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.