PageSourceSearch

https://freesewing.dev/assets/js/a7ee4e4e.11a87f5b.js

js freesewing.dev collected 2026-10-08 19:54:23 UTC 1,940,777 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdev=self.webpackChunkdev||[]).push([[27065],{412:(t,e,o)=>{o.d(e,{Mv:()=>a,Kk:()=>i});const a={apply:"Apply",decrease:"Decrease",disable:"Disable",dismiss:"Dismiss","expandIsOff.t":"This design saves space (and trees) because expand is disabled","expandIsOff.d":"Because the **expand** core setting is currently disabled, some parts are not fully drawn or not shown at all. Typically, these are simple rectangles that only take up space, or things that can be cut on the fold. \n\nTo expand all pattern parts to their full size, enable the expand setting.","expandIsOn.t":"This design can save space (and trees)","expandIsOn.d":"Because the **expand** core setting is currently enabled, all parts are fully drawn. You can display this design in a more compact way by disabling the **expand** setting. \n\nDoing so will mean that some parts are not fully drawn or not shown at all. Typically, these are simple rectangles that only take up space, or things that can be cut on the fold.",enable:"Enable","flagMenu.t":"Messages from the designer","flagMenuOne.d":"The designer of this pattern has flagged something about your current draft that deserves your attention.","flagMenuMany.d":"The designer of this pattern has flagged some things about your current draft that deserve your attention.",hide:"Hide",increase:"Increase",show:"Show",saIncluded:"(This includes seam allowance)",saExcluded:"(This does not include seam allowance)",saUnused:"(This part does not require any seam allowance)",partHiddenByExpand:"This part is not shown because the **expand** core setting is currently disabled. Enable it to show this pattern part.",partPartiallyShownByExpand:"This part is only partially shown because the **expand** core setting is currently disabled. Enable it to fully show this pattern part."},i={ankle:"Ankle circumference",biceps:"Biceps circumference",bustFront:"Bust front",bustPointToUnderbust:"Bust point to underbust",bustSpan:"Bust span",chest:"Chest circumference",crossSeam:"Cross seam",crossSeamFront:"Cross seam front",head:"Head circumference",heel:"Heel circumference",height:"Height",highBustFront:"High bust front",highBust:"High bust",hips:"Hips circumference",hpsToBust:"HPS to bust",hpsToWaistBack:"HPS to waist back",hpsToWaistFront:"HPS to waist front",inseam:"Inseam",knee:"Knee circumference",neck:"Neck circumference",seat:"Seat circumference",seatBack:"Seat back",crotchDepth:"Crotch depth",shoulderSlope:"Shoulder slope",shoulderToElbow:"Shoulder to elbow",shoulderToShoulder:"Shoulder to shoulder",shoulderToWrist:"Shoulder to wrist",underbust:"Underbust",upperLeg:"Upper leg circumference",waist:"Waist circumference",waistBack:"Waist back",waistToArmpit:"Waist to armpit",waistToFloor:"Waist to floor",waistToHips:"Waist to hips",waistToKnee:"Waist to knee",waistToSeat:"Waist to seat",waistToUnderbust:"Waist to underbust",waistToUpperLeg:"Waist to upper leg",wrist:"Wrist circumference"}},887:(t,e,o)=>{o.d(e,{C:()=>s});var a=o(14041),i=o(57416),n=o(95069);const s=({control:t})=>t?a.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:text-base-content"},Object.keys(i.zM).map((e=>a.createElement(n.cp,{fill:t>=e,className:"tw:w-6 tw:h-6 tw:-ml-1",key:e})))):null},1199:(t,e,o)=>{o.d(e,{V:()=>c,q:()=>s});var a=o(14041),i=o(85627),n=o(95069);const s=(0,a.createContext)([!1]),r=({loadingStatus:t})=>{const[e,o]=(0,a.useState)("tw:opacity-100"),[s,r]=(0,a.useState)(!1);if((0,a.useEffect)((()=>{t[2]&&(s&&clearTimeout(s),r(window.setTimeout((()=>{o("opacity-0")}),1650)))}),[t[2]]),!t[0])return null;let l="secondary",c=a.createElement(i.y,null);return t[2]&&(l=t[3]?"success":"error",c=t[3]?a.createElement(n.aV,{stroke:4,className:"tw:w-8 tw:h-8"}):a.createElement(n.id,{className:"tw:w-8 tw:h-8",stroke:2})),a.createElement("div",{className:"tw:fixed tw:bottom-14 tw:md:bottom-auto tw:md:top-28 tw:left-0 tw:z-50 tw:md:px-4 tw:w-full",style:{zIndex:500}},a.createElement("div",{className:`tw:w-full tw:md:max-w-2xl tw:m-auto tw:bg-${l} tw:flex tw:flex-row tw:items-center tw:gap-4 tw:p-4 tw:px-4 ${e}\n        tw:transition-opacity tw:delay-[1600ms] tw:duration-300\n        tw:md:rounded-lg tw:sha
1dow tw:text-secondary-content tw:text-lg tw:lg:text-xl tw:font-medium tw:md:bg-${l}/90`},a.createElement("span",{className:"tw:shrink-0"},c),t[1]))},l=({val:t=0,max:e=1,msg:o})=>a.createElement("div",{className:"tw:flex tw:flex-col tw:gap-2 tw:w-full tw:grow-0"},o,a.createElement("progress",{className:"tw:daisy-progress tw:text-info-content",value:t,max:e})),c=({children:t})=>{const[e,o]=(0,a.useState)(!1),[i,n]=(0,a.useState)({status:[!1],setLoadingStatus:c,loading:!1,LoadingStatus:()=>a.createElement(r,{loadingStatus:[!1]}),LoadingProgress:l});function c(t){n({...i,status:t,loading:t[0]||!1,LoadingStatus:()=>a.createElement(r,{loadingStatus:t})})}return(0,a.useEffect)((()=>{i.status[2]&&(e&&clearTimeout(e),o(window.setTimeout((()=>{c([!1])}),2e3)))}),[i.status[2]]),a.createElement(s.Provider,{value:i},t)}},1650:(t,e,o)=>{o.d(e,{D:()=>r,G:()=>l});var a=o(99025),i=o(56821),n=o(412);const s={};for(const[c,p]of Object.entries(n.Mv||{}))s[`flag:${c}`]=p;for(const[c,p]of Object.entries(i.Ru||{}))for(const[t,e]of Object.entries(p?.en?.s||{}))s[`${c}:${t}`]=e;const r=t=>{const e={...s};if(i.Ru[t]?.en){const o=i.Ru[t].en;Object.assign(e,o.p||{})}return Object.assign(e,a.Ru.en),e},l=t=>{if(i.Ru[t]?.en){return i.Ru[t].en.o??{}}return{}}},2980:(t,e,o)=>{o.d(e,{f:()=>a});const a={0:"Authenticate only",1:"Read access to your own patterns and measurements sets",2:"Read access to all your account data",3:"Write access to your own patterns and measurements sets",4:"Write access to all your account data",5:"Read access to patterns and measurements sets of other users",6:"Write access to patterns and measurements sets of other users",7:"Write access to all account data of other users",8:"Impersonate other users, full write access to all data"}},15037:(t,e,o)=>{o.d(e,{fV:()=>h,nk:()=>p,t$:()=>f,vp:()=>u,zi:()=>m});var a=o(89575),i=o(14041),n=o(86302);const s=864e5,r=36e5,l=6e4,c=1e3,p=({iso:t})=>n.c9.fromISO(t).toLocaleString(n.c9.DATETIME_MED),d=({iso:t,future:e=!1})=>{const o=e?"from now":"ago",a=[n.c9.fromISO(t),n.c9.now()];e&&a.reverse();const i=n.IX.fromDateTimes(...a).toDuration(["minutes","hours","days","months","years"]).toObject(),s=Math.floor(i.years),r=Math.floor(i.months),l=Math.floor(i.days),c=Math.floor(i.hours),p=Math.floor(i.minutes);return s<1&&r<1&&l<1&&c<1&&p<1?`seconds ${o}`:s<1&&r<1&&l<1&&c<1?p<2?`one minute ${o}`:`${p} minutes ${o}`:i.years<1&&i.months<1&&i.days<1?c<2?`${60*c+p} minutes ${o}`:`${c} hours ${o}`:s<1&&r<1?l<2?`${24*l+c} hours ${o}`:`${l} days ${o}`:s<1?r<4?`${r} months and ${l} days ${o}`:`${r} months ${o}`:s<3?`${12*s+i.months} months ${o}`:`${s} years ${o}`},h=t=>i.createElement(d,(0,a.A)({},t,{future:!1})),m=t=>i.createElement(d,(0,a.A)({},t,{future:!0})),f=({time:t})=>{const e=Math.floor(Date.now()-Number(t));return e>s?`${Math.floor(e/s)}d ago`:e>r?`${Math.floor(e/r)}h ago`:e>12e4?`${Math.floor(e/l)}m ago`:e>c?`${Math.floor(e/c)}s  ago`:`${e}ms ago`},u=({time:t})=>{const e=Math.floor(Number(t)-Date.now());return e>s?`${Math.floor(e/s)}d`:e>r?`${Math.floor(e/r)}h`:e>12e4?`${Math.floor(e/l)}m`:e>c?`${Math.floor(e/c)}s`:`${e}s`}},16840:(t,e,o)=>{o.d(e,{f:()=>s});var a=o(14041),i=o(73570);const n={js:"Javascript",bash:"Bash commands",sh:"Shell commands",json:"JSON",yaml:"YAML"},s=({language:t="txt",children:e,raw:o=!1,title:s=!1,copy:r=!1,noCopy:l=!1})=>{e?.props?.className&&(t=e.props.className.split("-").pop());const c={className:`language-${t} hljs tw:text-base tw:lg:text-lg tw:whitespace-break-spaces tw:overflow-scroll tw:pr-4`,style:{backgroundColor:"var(--code-background-color)"}};o&&(c.dangerouslySetInnerHTML={__html:o});const p=s||(n[t]?n[t]:t);return a.createElement("div",{className:"hljs tw:my-4"},a.createElement("div",{className:"\n        tw:flex tw:flex-row tw:justify-between tw:items-center tw:text-xs tw:font-medium tw:text-warning\n        tw:mt-1 tw:border-b tw:border-neutral-content tw:border-opacity-25 tw:px-4 tw:py-1 tw:mb-2 tw:lg:text-sm\n      "},a.createElement("span",null,p),l?null:a.createElement(i.T,{content:r||e,label:p})),a.createElement("pre",c,e))}},18522:(t,e,o)=>{o.d(e,{zJ:()=>C,wS:()=>k,DM:()=>f,Tr:()=>u,uL:()=>g});var a=o(89575),i=o(14041);const n=(0,i.forwardRef)((({embed:t=!0,locale:e="en",className:o="freesewing pattern",style:n={},viewBox:s=!1,width:r,height:l,children:c},p)=>{r<1&&(r=1e3),l<1&&(l=1e3);let d={xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",xmlLang:e,viewBox:s||`0 0 ${r} ${l}`,className:o,style:n};return t||(d.width=r+"mm",d.height=l+"mm"),i.createElement("svg",(0,a.A)({},d,{ref:p}),c)}));n.displayName="Svg";var s=o(43890);const r={fill:"none",stroke:"currentColor"},l=({stacks:t})=>Object.keys(t).map((e=>{const o=t[e].parts[0];let a={x:0,y:0};return void 0!==o.points.gridAnchor?a=o.points.gridAnchor:void 0!==o.points.anchor&&(
1a=o.points.anchor),isNaN(a.x)&&(a.x=0),isNaN(a.y)&&(a.y=0),i.createElement("pattern",{id:`grid-${e}`,key:`grid-${e}`,xlinkHref:"#grid",x:a.x,y:a.y})})),c=({stacks:t})=>i.createElement(i.Fragment,null,i.createElement("pattern",{id:"grid",height:"100",width:"100",patternUnits:"userSpaceOnUse",key:"grid"},i.createElement("path",{style:r,className:"gridline lg metric",d:"M 0 0 L 0 100 L 100 100"}),i.createElement("path",{style:r,className:"gridline metric",d:"M 50 0 L 50 100 M 0 50 L 100 50"}),i.createElement("path",{style:r,className:"gridline sm metric",d:"M 10 0 L 10 100 M 20 0 L 20 100 M 30 0 L 30 100 M 40 0 L 40 100 M 60 0 L 60 100 M 70 0 L 70 100 M 80 0 L 80 100 M 90 0 L 90 100"}),i.createElement("path",{style:r,className:"gridline sm metric",d:"M 0 10 L 100 10 M 0 20 L 100 20 M 0 30 L 100 30 M 0 40 L 100 40 M 0 60 L 100 60 M 0 70 L 100 70 M 0 80 L 100 80 M 0 90 L 100 90"}),i.createElement("path",{style:r,className:"gridline xs metric",d:"M 5 0 L 5 100 M 15 0 L 15 100 M 25 0 L 25 100 M 35 0 L 35 100 M 45 0 L 45 100 M 55 0 L 55 100 M 65 0 L 65 100 M 75 0 L 75 100 M 85 0 L 85 100 M 95 0 L 95 100"}),i.createElement("path",{style:r,className:"gridline xs metric",d:"M 0 5 L 100 5 M 0 15 L 100 15 M 0 25 L 100 25 M 0 35 L 100 35 M 0 45 L 100 45 M 0 55 L 100 55 M 0 65 L 100 65 M 0 75 L 100 75 M 0 85 L 100 85 M 0 95 L 100 95"})),i.createElement(l,{stacks:t})),p=({stacks:t})=>i.createElement(i.Fragment,null,i.createElement("pattern",{id:"grid",height:"25.4",width:"25.4",patternUnits:"userSpaceOnUse",key:"grid"},i.createElement("path",{style:r,className:"gridline lg imperial",d:"M 0 0 L 0 25.4 L 25.4 25.4"}),i.createElement("path",{style:r,className:"gridline lg imperial",d:"M 12.7 0 L 12.7 25.4 M 0 12.7 L 25.4 12.7"}),i.createElement("path",{style:r,className:"gridline sm imperial",d:"M 3.175 0 L 3.175 25.4 M 6.32 0 L 6.35 25.4 M 9.525 0 L 9.525 25.4 M 15.875 0 L 15.875 25.4 M 19.05 0 L 19.05 25.4 M 22.225 0 L 22.225 25.4"}),i.createElement("path",{style:r,className:"gridline sm imperial",d:"M 0 3.175 L 25.4 3.175 M 0 6.32 L 25.4 6.35 M 0 9.525 L 25.4 9.525 M 0 15.875 L 25.4 15.875 M 0 19.05 L 25.4 19.05 M 0 22.225 L 25.4 22.225"})),i.createElement(l,{stacks:t})),d=({units:t="metric",stacks:e})=>"imperial"===t?i.createElement(p,{stacks:e}):i.createElement(c,{stacks:e}),h=(0,i.forwardRef)(((t,e)=>i.createElement("g",(0,a.A)({},t,{ref:e}),t.children)));h.displayName="Group";const m=({settings:t={},stackName:e=!1,partName:o=!1,pathName:a=!1,pointName:i=!1,snippetName:n=!1,name:s=!1})=>{let r=t.idPrefix||"";return e&&(r+=`${e}-`),o&&(r+=`${o}-`),a&&(r+=`${a}-`),i&&(r+=`${i}-`),n&&(r+=`${n}-`),s&&(r+=s),r},f=t=>{const e=t=>{let e=t.split("-");if(e.length>1){t=e.shift();for(let o of e)t+=o.charAt(0).toUpperCase()+o.slice(1)}return t},o=t=>{let o={},a=t.split(";");for(let i of a){let t=i.split(":");2===t.length&&(o[e(t[0].trim())]=t[1].trim())}return o};let a={class:"className","marker-start":"markerStart","marker-end":"markerEnd"},i={};for(let n in t.attributes.list)"style"===n&&(i[n]=o(t.attributes.list[n].join(" "))),-1!==Object.keys(a).indexOf(n)?i[a[n]]=t.attributes.list[n].join(" "):"style"!==n&&(i[n]=t.attributes.list[n].join(" "));return i},u=(t,e={})=>{let o="";if(!t)return o;for(const a of t)Array.isArray(a)?o+=u(a,e):a&&(e[a]?o+=`${e[a]}`.replace(/&quot;/g,'"')+" ":o+=`${a} `);return o},g=(t,e)=>t.x>=e.topLeft.x&&t.x<=e.bottomRight.x&&t.y>=e.topLeft.y&&t.y<=e.bottomRight.y,b=(0,i.forwardRef)((({stackName:t,partName:e,part:o,settings:a,components:n,strings:s,drillProps:r},l)=>{const{Group:c,Path:p,Point:d,Snippet:h}=n;return i.createElement(c,{ref:l,id:m({settings:a,stackName:t,partName:e,name:"inner"})},Object.keys(o.paths).map((l=>i.createElement(p,{key:l,path:o.paths[l],topLeft:o.topLeft,bottomRight:o.bottomRight,units:a[0].units,stackName:t,partName:e,pathName:l,part:o,settings:a,components:n,strings:s,drillProps:r}))),Object.keys(o.points).map((l=>i.createElement(d,{key:l,point:o.points[l],topLeft:o.topLeft,bottomRight:o.bottomRight,stackName:t,partName:e,pointName:l,part:o,settings:a,components:n,strings:s,drillProps:r}))),Object.keys(o.snippets).map((l=>i.createElement(h,{key:l,snippet:o.snippets[l],stackName:t,partName:e,snippetName:l,part:o,settings:a,components:n,strings:s,drillProps:r}))))}));b.displayName="PartInner";const w=({point:t,strings:e})=>{const o=u(t.attributes.list["data-text"],e),a=[];if(-1!==o.indexOf("\n")){let e=0,n=o.split("\n");a.push(i.createElement("tspan",{key:"tspan-"+e},n.shift()));for(let o of n)e++,a.push(i.createElement("tspan",{key:"tspan-"+e,x:t.x,dy:t.attributes.list["data-text-lineheight"]?.[0]||12},o.toString().replace(/&quot;/g,'"')))}else a.push(i.createElement("tspan",{key:"tspan"},o.replace(/&quot;/g,'"')));return a},k={Svg:n,Defs:({svg:t,stacks:e,settings:o={}})=>t?i.createElement("defs",null,t.defs.list?(0,s.Ay)(Object.values(t.defs.list).join("")):null,o[0]?.paperless?i.createElement(d,{units:o[0].units,stacks:e}):null):null,Group:h,Stack:({stackName:t,stack:e,settings:o,components:a,strings:n,drillProps:s})=>{const{Group:r,Part:l,Grid:c}=a;return i.createElement(r,f(e),o[0].paperless?i.createElement(c,{stack:e,stackName:t}):null,[...e.parts].map(((e,r)=>i.createElement(l,{settings:o,components:a,part:e,stackName:t,strings:n,drillProps:s,key:r}))))},Part:({stackName:t,partName:e,part:o,settings:n,components:s,strings:r,drillProps:l})=>{const{Group:c}=s;return i.createElement(c,(0,a.A)({},f(o),{id:m({settings:n,stackName:t,partName:e}),transform:`translate(${-o.anchor.x}, ${-o.anchor.y})`}),i.createElement(b,{stackName:t,partName:e,part:o,settings:n,components:s,strings:r,drillProps:l}))},Point:({stackName:t,partName:e,pointName:o,part:a,point:n,components:s,strings:r})=>
1{if(!g(n,a)&&!n.attributes.list["data-render-always"])return null;const{Circle:l,Text:c}=s;return n.attributes?i.createElement(i.Fragment,null,n.attributes.text?i.createElement(c,{point:n,pointName:o,partName:e,stackName:t,strings:r}):null,n.attributes.circle?i.createElement(l,{point:n}):null):null},Path:({stackName:t,pathName:e,path:o,partName:n,settings:s,components:r,strings:l})=>{if(o.hidden)return null;const{TextOnPath:c}=r,p=m({settings:s,stackName:t,partName:n,pathName:e});return i.createElement(i.Fragment,null,i.createElement("path",(0,a.A)({id:p,d:o.d},f(o))),o.attributes.text&&o.attributes.text.length>0?i.createElement(c,{path:o,pathId:p,strings:l}):null)},Snippet:({snippet:t,settings:e})=>{if(!t?.anchor||!t.def)return null;if(!e[0].complete&&!t.attributes.list?.["data-force"]?.[0])return null;const o={xlinkHref:"#"+t.def,x:t.anchor.x,y:t.anchor.y},n=t.attributes.list["data-scale"]?.[0]||!1,s=t.attributes.list["data-rotate"]?.[0]||!1;return(n||s)&&(o.transform="",n&&(o.transform+=`translate(${o.x}, ${o.y}) `,o.transform+=`scale(${n}) `,o.transform+=`translate(${-1*o.x}, ${-1*o.y}) `),s&&(o.transform+=`rotate(${s}, ${o.x}, ${o.y}) `)),i.createElement("use",(0,a.A)({},o,f(t),{color:"currentColor"}))},Grid:({stack:t,stackName:e})=>i.createElement("rect",{x:t.topLeft.x,y:t.topLeft.y,width:t.width,height:t.height,className:"grid",fill:"url(#grid-"+e+")"}),Text:({point:t,strings:e})=>i.createElement("text",(0,a.A)({x:t.x,y:t.y},t.attributes.textProps),i.createElement(w,{point:t,strings:e})),TextOnPath:({path:t,pathId:e,strings:o})=>{const n={xlinkHref:"#"+e,startOffset:"0%"},s=u(t.attributes.text,o),r=!!t.attributes.list["data-text-class"]&&t.attributes.list["data-text-class"].join(" ");return r&&r.indexOf("center")>-1?n.startOffset="50%":r&&r.indexOf("right")>-1&&(n.startOffset="100%"),i.createElement("text",null,i.createElement("textPath",n,i.createElement("tspan",(0,a.A)({},t.attributes.textProps,{dangerouslySetInnerHTML:{__html:s}}))))},Circle:({point:t})=>t.attributes.list["data-circle"].map(((e,o)=>{const n=t.attributes.circleProps,s={};for(const a in n){const e=t.attributes.list[`data-circle-${"className"===a?"class":a}`];e.length>=o?s[a]=e[o]:s[a]=e.join(" ")}return i.createElement("circle",(0,a.A)({key:e,cx:t.x,cy:t.y,r:e},s))}))},C=(0,i.forwardRef)(((t,e)=>{if(!t.renderProps)return null;const{renderProps:o=!1,strings:n={},children:s=!1,className:r="freesewing pattern",components:l={}}=t,c={...k,...l},{Svg:p,Defs:d,Stack:h,Group:m}=c,f={};return r&&(f.className=r),i.createElement(p,(0,a.A)({viewBox:`0 0 ${o.width} ${o.height}`,embed:o.settings.embed},o,f,{ref:e}),i.createElement(d,o),i.createElement("style",null,`:root { --pattern-scale: ${o.settings.scale||1}} ${o.svg.style}`),i.createElement(m,null,s||Object.keys(o.stacks).map((t=>i.createElement(h,{key:t,stackName:t,stack:o.stacks[t],settings:o.settings,components:c,strings:n})))))}));C.displayName="Pattern"},19093:(t,e,o)=>{o.d(e,{Y:()=>s});var a=o(14041),i=o(95069);const n={comment:{bg:"tw:bg-success/5",border:"tw:border-success",text:"tw:text-success"},error:{bg:"tw:bg-error/5",border:"tw:border-error",text:"tw:text-error"},fixme:{bg:"tw:bg-neutral/5",border:"tw:border-neutral",text:"tw:text-error"},link:{bg:"tw:bg-secondary/5",border:"tw:border-secondary",text:"tw:text-secondary"},note:{bg:"tw:bg-primary/5",border:"tw:border-primary",text:"tw:text-primary"},related:{bg:"tw:bg-info/5",border:"tw:border-info",text:"tw:text-info"},tip:{bg:"tw:bg-accent/5",border:"tw:border-accent",text:"tw:text-accent"},warning:{bg:"tw:bg-warning/5",border:"tw:border-warning",text:"tw:text-warning"}},s=({by:t=!1,children:e=null,compact:o=!1,dense:i=!1,hideable:n=!1,type:s="note",title:c=!1})=>{const[p,d]=(0,a.useState)(!1);return p?null:o?a.createElement(l,{by:t,compact:o,dense:i,hideable:n,type:s,title:c,setHide:d},e):a.createElement(r,{by:t,hideable:n,type:s,title:c,setHide:d},e)},r=({by:t,children:e,hideable:o,type:i,title:s,setHide:r})=>a.createElement("div",{className:`tw:relative tw:my-8 tw:-ml-4 tw:-mr-4 tw:sm:ml-0 tw:sm:mr-0 ${n[i].bg}`},a.createElement("div",{className:`\n        tw:border-y-4 tw:border-x-0 tw:sm:border-0 tw:sm:border-l-4 tw:px-6 tw:sm:px-8 tw:py-4 tw:sm:py-2\n        tw:shadow tw:text-base ${n[i].border} tw:border-solid\n      `},a.createElement(c,{by:t,hideable:o,setHide:r,title:s,type:i}),a.createElement("div",{className:"tw:py-1 tw:first:mt-0 tw:popout-content"},e),"comment"===i&&a.createElement("div",{className:`tw:font-bold tw:italic ${n[i].text}`},t))),l=({by:t,children:e,compact:o,dense:i,hideable:s,type:r,title:l,setHide:p})=>a.createElement("div",{className:`tw:relative ${i?"tw:my-1":"tw:my-8"} ${n[r].bg} tw:-ml-4 tw:-mr-4 tw:sm:ml-0 tw:sm:mr-0`},a.createElement("div",{className:`\n        tw:border-y-4 tw:sm:border-0 tw:sm:border-l-4 tw:px-4\n        tw:shadow tw:text-base ${n[r].border}\n        tw:flex tw:flex-row tw:items-center\n        ${i?"tw:py-1":"tw:py-2"}\n      `},a.createElement(c,{by:t,compact:o,hideable:s,setHide:p,title:l,type:r}),a.createElement("div",{className:"popout-content"},e))),c=({by:t,compact:e,hideable:o,setHide:s,title:r,type:l})=>a.createElement("div",{className:"tw:font-bold tw:flex tw:flex-row tw:gap-1 tw:items-end tw:justify-between"},a.createElement("div",null,a.createElement("span",{className:`tw:font-bold tw:uppercase ${n[l].text}`},r||(n[l].title?n[l].title:l.toUpperCase()),e?a.createElement("span",{className:"tw:px-2"},"|"):null),"comment"===l&&t&&a.createElement("span",{className:`tw:font-normal tw:text-base tw:pr-2 ${n[l].text}`}," ","by ",a.createElement("b",null,t))),o&&a.createElement("button",{onClick:()=>s(!0),className:`${n[l].text} tw:hover:text-neutral tw:hover:cursor-pointer`,title:"Close"},a.createElement(i.US,null)))},19970:(t,e,o)=>{o.d(e,{D:()=>a});const a={backend:"https://backend.freesewing.eu",website:"https://freesewing.eu",monorepo:"https://codeberg.org/freesewing/freesewing",codeberg:"https://codeberg.org/freesewing",social:{YouTube:"https://www.youtube.com/@freesewing",Discord:"https://discord.freesewing.org/",Instagram:"https://instagram.com/freesewing_org",Facebook:"https://www.facebook.com/groups/627769821272714/",Codeberg:"https://codeberg.org/freesewing",Reddit:"https://www.reddit.com/r/freesewing/",Mastodon:"https://freesewing.social/@freesewing",Bluesky:"https://bsky.app/profile/freesewing.org"}}},20228:(t,e,o)=>{o.d(e,{A:()=>n,X:()=>i});var a=o(14041);const i=({children:t})=>a.createElement(n,null,a.createElement("table",{className:"tw:table tw:table-auto"},t)),n=({children:t})=>a.createElement("div",{className:"tw:max-w-full tw:overflow-x-auto"},t)},23773:(t,e,o)=>{o.d(e,{Ci:()=>r,Ck:()=>n,HJ:()=>i,Hw:()=>s,U7:()=>l});const a=t=>Array.isArray(t)?t.map((t=>25.4*t)):25.4*t,i={metric:[3.5,5,10,12,20,25,30,40,50,60,80,100,12
10],imperial:a([1/8,1/4,3/8,.5,5/8,3/4,1,1.25,1.5,1.75,2,3,4,5])},n={metric:[80,100,120,140,150,160,180,200,220,250,300,350,400,450,500,550,600,650,700,750,800,900,1e3,1100,1200],imperial:a([3,4,5,6,7,8,9,10,11,12,14,16,18,20,22,24,28,30,36,42,48,60,80])},s={metric:1,imperial:.79375},r={metric:5,imperial:3.175},l={metric:10,imperial:12.7}},25578:(t,e,o)=>{o.d(e,{O:()=>p});var a=o(14041),i=o(57416);function n(t="",e={}){return this.baseUrl=t,this.baseHeaders=e,this.delete=async function(o,a,i,n){return s("DELETE",t+o,{...e,...a},i,n)},this.get=async function(o,a,i,n){return s("GET",t+o,{...e,...a},i,n)},this.head=async function(o,a,i,n){return s("HEAD",t+o,{...e,...a},i,n)},this.patch=async function(o,a,i,n,s){return r("PATCH",t+o,a,{...e,...i},n,s)},this.post=async function(o,a,i,n,s){return r("POST",t+o,a,{...e,...i},n,s)},this.put=async function(o,a,i,n,s){return r("PUT",t+o,a,{...e,headers:i},n,s)},this}async function s(t="GET",e,o={},a=!1,i=console.log){let n,s;try{n=await fetch(e,{method:t,headers:o})}catch(r){i&&console.log({url:e,err:r})}if(!n)return[!1,!1];try{s=a?await n.text():await n.json()}catch(r){console.log(r);try{s=await n.text()}catch(r){console.log(r),s=!1}}return[n.status||!1,s]}async function r(t="POST",e,o,a,i=!1,n=console.log){const s={method:t,headers:a};let r,l;o&&"object"==typeof o&&Object.keys(o).length>0&&(s.body=JSON.stringify(o),s.headers["Content-Type"]="application/json");try{r=await fetch(e,s)}catch(c){n&&n(c)}if(r.status&&[204].includes(r.status))return[r.status,{}];if(r.status&&r.status<400){let t;try{t=i?await r.text():await r.json()}catch(c){return n&&n(c),i?[r.status,{err:c}]:[r.status,t]}return[r.status,t]}try{l=i?await r.text():await r.json()}catch(c){console.log(c);try{l=await r.text()}catch(c){console.log(c),l=!1}}return[r.status||500,l]}var l=o(68024);const{backend:c}=i.DS;function p(){const{token:t}=(0,l.F)();return(0,a.useMemo)((()=>new d(t)),[t])}function d(t){this.token=t,this.headers=function(t){return t?{Authorization:"Bearer "+t}:{}}(t),this.restClient=new n(c,this.headers),this.delete=this.restClient.delete,this.get=this.restClient.get,this.patch=this.restClient.patch,this.put=this.restClient.put,this.post=this.restClient.post}d.prototype.adminSearchUsers=async function(t){return await this.post("/admin/search/users/jwt",{q:t})},d.prototype.adminLoadUser=async function(t){return await this.get(`/admin/user/${t}/jwt`)},d.prototype.adminUpdateUser=async function({id:t,data:e}){return await this.patch(`/admin/user/${t}/jwt`,e)},d.prototype.adminImpersonateUser=async function(t){return await this.get(`/admin/impersonate/${t}/jwt`)},d.prototype.adminLoadSubscribers=async function(){return await this.get("/admin/subscribers/jwt")},d.prototype.adminPing=async function(t){return console.log("admin ping called",t),await this.get("/whoami/jwt",{Authorization:`Bearer: ${t}`})},d.prototype.acceptCset=async function(t){return await this.post(`/curated-sets/from/${t}/jwt`)},d.prototype.confirmMfa=async function(t){return await this.post("/account/mfa/jwt",{...t,mfa:!0})},d.prototype.confirmSignup=async function({id:t,consent:e}){return await this.post(`/confirm/signup/${t}`,{consent:e})},d.prototype.createApikey=async function(t){return await this.post("/apikeys/jwt",t)},d.prototype.createBookmark=async function(t){return await this.post("/bookmarks/jwt",t)},d.prototype.createSocialImage=async function(t){return await this.post("/img",t)},d.prototype.createIssue=async function(t){return await this.post("/issues",t)},d.prototype.createPattern=async function(t){return await this.post("/patterns/jwt",t)},d.prototype.createPostPr=async function(t,e){return await this.post(`/flows/pr/${t}/jwt`,e)},d.prototype.createSet=async function(t){return await this.post("/sets/jwt",t)},d.prototype.disableMfa=async function(t){return await this.post("/account/mfa/jwt",{...t,mfa:!1})},d.prototype.enableMfa=async function(){return await this.post("/account/mfa/jwt",{mfa:!0})},d.prototype.exportAccount=async function(){return await this.get("/account/export/jwt")},d.prototype.getApikey=async function(t){return await this.get(`/apikeys/${t}/jwt`)},d.prototype.getApikeys=async function(){return await this.get("/apikeys/jwt")},d.prototype.getBookmark=async function(t){return await this.get(`/bookmarks/${t}/jwt`)},d.prototype.getBookmarks=async function(){return await this.get("/bookmarks/jwt")},d.prototype.getConfirmation=async function({id:t,check:e}){return await this.get(`/confirmations/${t}/${e}`)},d.prototype.getCuratedSet=async function(t){return await this.get(`/curated-sets/${t}`)},d.prototype.getCuratedSets=async function(){return await this.get("/curated-sets")},d.prototype.getPattern=async function(t){return await this.get(`/patterns/${t}/jwt`)},d.prototype.getPatterns=async function(){return await this.get("/patterns/jwt")},d.prototype.getPublicPattern=async function(t){return await this.get(`/patterns/${t}.json`)},d.prototype.getPublicSet=async function(t){return await this.get(`/sets/${t}.json`)},d.prototype.getSet=async function(t){return await this.get(`/sets/${t}/jwt`)},d.prototype.getSets=async function(){return await this.get("/sets/jwt")},d.prototype.getStats=async function(){return await this.get("/info/stats")},d.prototype.getSuggestedPacks=async function(){return await this.get("/suggested-packs/jwt")},d.prototype.getSuggestedSets=async function(){return await this.get("/suggested-sets/jwt")},d.prototype.getUserCount=async function(){return await this.get("/info/users")},d.prototype.getUserData=async function(t){return await this.get(`/users/${t}/jwt`)},d.prototype.getUserProfile=async function(t){return await this.get(`/users/${t}`)},d.prototype.findUserProfiles=async function(t){return await this.post("/find/users",{match:t})},d.prototype.isPostSlugAvailable=async function({slug:t,type:e}){const o=await this.get(`/slugs/${e}/${t}/jwt`,this.auth);return 404===o[0]?{success:!0,data:!1,available:!0,response:o}:{success:!1,available:!1,response:o}},d.prototype.isUsernameAvailable=async function(t){const e=await this.post("/available/username/jwt",{username:t});return 404===e[0]?{success:!0,data:!1,available:!0,response:e}:{success:!1,available:!1,response:e}},d.prototype.newsletterConfirmSubscribe=async function({id:t,ehash:e}){return await this.put("/subscriber",{id:t,ehash:e})},d.prototype.newsletterSubscribe=async function(t){return await this.post("/subscriber",{email:t,language:"en"})},d.prototype.newsletterUnsubscribe=async function(t){return await this.delete(`/subscriber/${t}`)},d.prototype.newsletterStartUnsubscribe=async function(t){return await this.post("/subscriber/remove",{email:t})},d.prototype.ping=async function(){return console.log("ping called"),await this.get("/whoami/jwt")},d.prototype.reloadAccount=async function(){return console.log("reloadAccount called"),await this.get("/whoami/jwt")},d.prototype.removeAccount=async function(){return await this.delete("/account/jwt")},d.prototype.removeApikey=async function(t){return await this.delete(`/apikeys/${t}/jwt`,this.auth)},d.prototype.removeBookmark=async function(t){return await this.delete(`/bookmarks/${t}/jwt`)},d.prototype.removeCuratedSet=async function(t){return await this.delete(`/curated-sets/${t}/jwt`)},d.prototype.removeImage=async function(t){return await this.delete(`/images/${t}/jwt`)},d.prototype.removePattern=async function(t){return await this.delete(`/patterns/${t}/jwt`,this.auth)},d.prototype.removeSet=async function(t){return await this.delete(`/sets/${t}/jwt`)},d.prototype.removeSuggestedSet=async function(t){return await this.delete(`/suggested-sets/${t}/jwt`)},d.prototype.restrictAccount=async function(){return await this.get("/account/restrict/jwt")},d.prototype.signIn=async function({username:t,password:e=!1,token:o=!1}){return!1===e?await this.post("/signinlink",{username:t}):await this.post("/signin",{username:t,password:e,token:o})},d.prototype.signInFromLink=async function({id:t,check:e,token:o}){return await this.post(`/signinlink/${t}/${e}`,{token:o})},d.prototype.signUp=async function({email:t}){return await this.post("/signup",{email:t,language:"en"})},d.prototype.suggestCset=async function(t){return await this.post("/curated-sets/suggest/jwt",t)},d.prototype.suggestOpack=async function(t){return await this.post("/option-packs/suggest/jwt",t)},d.prototype.updateAccount=async function(t){return await this.patch("/account/jwt",t)},d.prototype.updateCuratedSet=async function(t,e){return await this.patch(`/curated-sets/${t}/jwt`,e)},d.prototype.updateConsent=async function(t){return await this.patch("/consent/jwt",{consent:t})},d.prototype.updatePattern=async function(t,e){return await this.patch(`/patterns/${t}/jwt`,e)},d.prototype.updateSet=async function(t,e){return await this.patch(`/sets/${t}/jwt`,e)},d.prototype.uploadImage=async function(t){return await this.post("/images/jwt",t)},d.prototype.isSlugAvailable=async function({slug:t,type:e}){return 404===(await this.get(`/slugs/${e}/${t}/jwt`,{},!0))[0]}},27791:(t,e,o)=>{o.d(e,{I3:()=>i,Kk:()=>a,rA:()=>n});const a=["ankle","biceps","bustFront","bustPointToUnderbust","bustSpan","chest","crossSeam","crossSeamFront","crotchDepth","heel","head","highBust","highBustFront","hips","hpsToBust","hpsToWaistBack","hpsToWaistFront","inseam","knee","neck","seat","seatBack","shoulderSlope","shoulderToElbow","shoulderToShoulder","shoulderToWrist","underbust","upperLeg","waist","waistBack","waistToArmpit","waistToFloor","waistToHips","waistToKnee","waistToSeat","
1waistToUnderbust","waistToUpperLeg","wrist"],i=["shoulderSlope"],n=t=>-1!==i.indexOf(t)},29016:(t,e,o)=>{o.d(e,{$n:()=>L,LB:()=>b,ME:()=>B,N6:()=>F,Q7:()=>k,UF:()=>S,VH:()=>v,YZ:()=>C,ZB:()=>P,j5:()=>T,lz:()=>W,nF:()=>x,oZ:()=>R,qj:()=>w,yA:()=>y,zp:()=>E});var a=o(89575),i=o(86560),n=o(57416),s=o(56821),r=o(412),l=o(1199),c=o(14041),p=o(47540),d=o(25578),h=o(56702),m=o(95069),f=o(81637),u=o(30845);const g=({help:t,Link:e=!1})=>(e||(e=h.N_),"function"==typeof t?c.createElement("button",{onClick:t,title:"Show help"},c.createElement(m.NT,{className:"tw:w-5 tw:h-5 tw:text-secondary tw:hover:cursor-pointer"})):"string"==typeof t?c.createElement(e,{href:t,target:"_BLANK",rel:"nofollow",title:"Show help"},c.createElement(m.NT,{className:"tw:w-5 tw:h-5"})):null),b=({Link:t=!1,box:e=!1,children:o,label:a=!1,labelBL:i=!1,labelBR:n=!1,labelTR:s=!1,legend:r=!1,forId:l="",help:p=!1})=>c.createElement("fieldset",{className:"tw:daisy-fieldset tw:w-full tw:mt-2 "+(e?"tw:bg-base-200 tw:border-base-300 tw:rounded-box tw:border tw:p-4":"")},r?c.createElement("legend",{className:"tw:daisy-fieldset-legend tw:px-2 tw:pb-1"},r,c.createElement(g,{help:p,Link:t})):null,c.createElement("div",{className:"tw:flex tw:flex-row tw:justify-between tw:px-2"},a?c.createElement("label",{className:"tw:daisy-label",htmlFor:l},a):null,s?c.createElement("label",{className:"tw:daisy-label",htmlFor:l},s):null),o,c.createElement("div",{className:"tw:flex tw:flex-row tw:justify-between tw:px-2"},i?c.createElement("label",{className:"tw:daisy-label",htmlFor:l},i):null,n?c.createElement("label",{className:"tw:daisy-label",htmlFor:l},n):null)),w=({active:t,children:e,dense:o,noBg:a,onClick:i})=>c.createElement("button",{className:`\n    tw:daisy-btn tw:daisy-btn-ghost tw:h-fit\n    tw:w-full ${o?"tw:mt-1 tw:daisy-btn-sm tw:font-light":"tw:mt-2 tw:py-4 tw:h-auto tw:content-start"}\n    tw:border-2 tw:border-secondary tw:text-left tw:bg-secondary/20\n    ${a?"tw:hover:bg-transparent":"tw:hover:bg-secondary/10"}\n    tw:hover:border-secondary tw:hover:border-solid tw:hover:border-2\n    ${t?"tw:border-solid":"tw:border-dotted"}\n    ${t&&!a?"tw:bg-secondary":"tw:bg-transparent"}\n    `,onClick:i},e),k=({box:t=!1,current:e,help:o=!1,inputMode:a="decimal",label:i=!1,labelBL:n=!1,labelBR:s=!1,labelTR:r=!1,id:l="",legend:p=!1,max:d=225,min:h=0,original:m,placeholder:f,step:u=1,update:g,valid:w})=>c.createElement(b,{box:t,help:o,label:i,labelBL:n,labelBR:s,labelTR:r,legend:p,forId:l},c.createElement("input",{id:l,type:"text",inputMode:a,placeholder:f,value:e,onChange:t=>g(t.target.value),className:"tw:daisy-input tw:w-full tw:daisy-input-bordered "+(e===m?"tw:daisy-input-secondary":w(e)?"tw:daisy-input-success":"tw:daisy-input-error"),max:d,min:h,step:u})),C=({box:t=!1,current:e,help:o=!1,label:a=!1,labelBL:i=!1,labelBR:n=!1,labelTR:s=!1,id:r="",legend:l=!1,original:p,placeholder:d,update:h,valid:m=()=>!0})=>c.createElement(b,{box:t,help:o,label:a,labelBL:i,labelBR:n,labelTR:s,legend:l,forId:r},c.createElement("input",{id:r,type:"text",placeholder:d,value:e,onChange:t=>h(t.target.value),className:"tw:daisy-input tw:w-full tw:daisy-input-bordered tw:text-current "+(e===p?"tw:daisy-input-secondary":m(e)?"tw:daisy-input-success":"tw:daisy-input-error")})),v=({box:t=!1,current:e,help:o=!1,label:a=!1,labelBL:i=!1,labelBR:n=!1,labelTR:s=!1,id:r="mfa",inputMode:l="numeric",legend:p=!1,placeholder:d="MFA Code",update:h,valid:m=t=>t.length>4})=>c.createElement(k,{box:t,current:e,help:o,label:a,labelBL:i,labelBR:n,labelTR:s,id:r,inputMode:l,legend:p,placeholder:d,update:h,valid:m}),y=({box:t=!1,current:e,help:o=!1,label:i=!1,labelBL:n=!1,labelTR:s=!1,id:r="password",legend:l=!1,placeholder:p="\xaf\\_(\u30c4)_/\xaf",update:d,valid:h=()=>!0,onKeyDown:m=!1})=>{const[f,u]=(0,c.useState)(!1),g=m?{onKeyDown:m}:{};return c.createElement(b,{help:o,label:i,labelBL:n,labelTR:s,legend:l,box:t,forId:r,labelBL:n||" ",labelBR:c.createElement("button",{className:"tw:btn tw:btn-primary tw:btn-ghost tw:btn-xs tw:-mt-2 tw:hover:cursor-pointer",onClick:()=>u(!f)},f?"Hide Password":"Reveal Password")},c.createElement("input",(0,a.A)({id:r,type:f?"text":"password",placeholder:p,value:e,onCh
1ange:t=>d(t.target.value),className:"tw:daisy-input tw:w-full tw:daisy-input-bordered "+(h(e)?"input-success":"input-error")},g)))},T=({box:t=!1,current:e,help:o=!1,id:a="email",label:n=!1,labelBL:s=!1,labelBR:r=!1,labelTR:l=!1,legend:p=!1,original:d="",update:h,placeholder:m="Email Address",valid:f=i.DT})=>c.createElement(b,{box:t,help:o,label:n,labelTR:l,labelBL:s,labelBR:r,legend:p,forId:a},c.createElement("input",{id:a,type:"email",placeholder:m,value:e,onChange:t=>h(t.target.value),className:"tw:daisy-input tw:w-full tw:daisy-input-bordered "+(e===d?"tw:daisy-input-secondary":f(e)?"tw:daisy-input-success":"tw:daisy-input-error")})),x=({box:t=!1,current:e,firstOption:o=!1,help:a=!1,id:n="design",label:r=!1,labelBL:l=!1,labelBR:p=!1,labelTR:d=!1,legend:h=!1,buttons:m=!1,update:f})=>c.createElement(b,{box:t,help:a,label:r,labelTR:d,labelBL:l,labelBR:p,legend:h,forId:n},m?c.createElement("div",{className:"tw:flex tw:flex-row tw:flex-wrap tw:items-center tw:gap-0.5"},s.rJ.map((t=>c.createElement("button",{key:t,onClick:()=>f(t),className:"tw:daisy-btn tw:daisy-btn-secondary tw:daisy-btn-outline tw:daisy-btn-xs tw:p-1"},(0,i.ZH)(t))))):c.createElement("select",{id:n,className:"tw:daisy-select tw:w-full",onChange:t=>f(t.target.value),value:e},o?"string"==typeof o?c.createElement("option",{disabled:!0},o):o:null,s.rJ.map((t=>c.createElement("option",{key:t,value:t},(0,i.ZH)(t)))))),B=({active:t=!1,box:e=!1,current:o,help:n=!1,id:s="image",imgSlug:r,imgSubid:h,imgType:f="showcase",label:u=!1,labelBL:g=!1,labelBR:w=!1,labelTR:k=!1,legend:C=!1,update:v,original:y})=>{const T=(0,d.O)(),{setLoadingStatus:x}=(0,c.useContext)(l.q),[B,S]=(0,c.useState)(!1),[L,P]=(0,c.useState)(!1),R=async(t,e=!1)=>{x([!0,"uploadingImage"]);const o={type:f,subId:h,slug:r};e?o.url=t:o.img=t;const[a,i]=await T.uploadImage(o);x([!0,"allDone",!0,!0]),200===a&&"success"===i.result?(v(i.imgId),P(i.imgId)):x([!0,"backendError",!0,!1])},F=(0,c.useCallback)((e=>{const o=new FileReader;o.onload=async()=>{t?R(o.result):v(o.result)},e.forEach((t=>o.readAsDataURL(t)))}),[o]),{getRootProps:E,getInputProps:W}=(0,p.VB)({onDrop:F});return o?c.createElement(b,{box:e,help:n,label:u,labelTR:k,labelBL:g,labelBR:w,legend:C,forId:s},c.createElement("div",{className:"tw:bg-base-100 tw:w-full tw:h-36 tw:mb-2 tw:mx-auto tw:flex tw:flex-col tw:items-center tw:text-center tw:justify-center",style:{backgroundImage:`url(${L?(0,i.qk)({type:"public",id:L}):o})`,backgroundSize:"contain",backgroundRepeat:"no-repeat",backgroundPosition:"50%"}},c.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-neutral tw:daisy-btn-circle tw:opacity-50 tw:hover:opacity-100",onClick:()=>v(y)},c.createElement(m.NA,null)))):c.createElement(b,{box:e,help:n,label:u,labelTR:k,labelBL:g,labelBR:w,legend:C,forId:s},c.createElement("div",(0,a.A)({},E(),{className:"\n        tw:flex tw:rounded-lg tw:w-full tw:flex-col tw:items-center tw:justify-center\n        tw:lg:p-6 tw:lg:border-4 tw:lg:border-secondary tw:lg:border-dashed\n      "}),c.createElement("input",W()),c.createElement("p",{className:"tw:hidden tw:lg:block tw:p-0 tw:m-0"},"Drag and drop and image here"),c.createElement("p",{className:"tw:hidden tw:lg:block tw:p-0 tw:my-2"},"or"),c.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-secondary tw:daisy-btn-outline tw:mt-4 tw:px-8"},"Select an image to use")),c.createElement("p",{className:"tw:p-0 tw:my-2 tw:text-center"},"or"),c.createElement("div",{className:"tw:flex tw:flex-row tw:items-center"},c.createElement("input",{id:s,type:"url",className:"tw:daisy-input tw:daisy-input-secondary tw:w-full tw:daisy-input-bordered",placeholder:"Paste an image URL here",value:o,onChange:t?t=>S(t.target.value):t=>v(t.target.value)}),t&&c.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-secondary tw:ml-2 tw:capitalize",disabled:!B||B.length<1,onClick:()=>R(B,!0)},c.createElement(m.JM,null)," Upload")))},S=t=>c.createElement(B,(0,a.A)({},t,{active:!0})),L=t=>c.createElement(B,(0,a.A)({},t,{active:!1})),P=({box:t=!1,current:e,help:o=!1,id:a="",label:i=!1,labelBL:n=!1,labelBR:s=!1,labelTR:r=!1,legend:l=!1,list:p,update:d})=>c.createElement(b,{box:t,help:o,label:i,labelTR:r,labelBL:n,labelBR:s,legend:l,forId:a},p.map(((t,o)=>c.createElement(w,{key:o,active:t.val===e,onClick:()=>d(t.val)},c.createElement("div",{className:"tw:w-full tw:flex tw:flex-col tw:gap-2"},c.createElement("div",{className:"tw:w-full tw:text-lg tw:leading-5"},t.label),t.desc?c.createElement("div",{className:"tw:w-full tw:text-normal tw:font-normal tw:normal-case tw:pt-1 tw:leading-5"}
1,t.desc):null))))),R=({box:t=!1,current:e,previewCurrent:o=!1,help:a=!1,id:i="",label:n=!1,labelBL:s="This field supports markdown",labelBR:r=!1,labelTR:l=!1,legend:p=!1,update:d,placeholder:h="",markdownOptions:m={}})=>c.createElement(b,{box:t,help:a,label:n,labelTR:l,labelBL:s,labelBR:r,legend:p,forId:i},c.createElement(f.t,{tabs:["edit","preview"]},c.createElement(f.o,{key:"edit"},c.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:mt-2"},c.createElement("textarea",{id:i,rows:"5",className:"tw:daisy-textarea tw:daisy-textarea-bordered tw:daisy-textarea-lg tw:w-full",value:e,placeholder:h,onChange:t=>d(t.target.value)}))),c.createElement(f.o,{key:"preview"},c.createElement("div",{className:"mdx markdown"},c.createElement(u.oz,m,o||e))))),F=({box:t=!1,help:e=!1,id:o="",imperial:a=!1,labelBR:s=!1,labelTR:l=!1,legend:p=!1,m:d,update:h,original:f,placeholder:u=""})=>{const g=(0,n.rA)(d),w=a?"imperial":"metric",[k,C]=(0,c.useState)(void 0===f?f:g?Number(f):(0,i._p)(f,w)),[v,y]=(0,c.useState)((0,i._p)(f,w)),[T,x]=(0,c.useState)(null),B=t=>{C(t);const e=g?Number(t):(0,i.Ky)(t,a);e?(h(d,g?e:(0,i.R8)(e,w)),x(!0),y(e)):void 0===t?h(d,"__UNSET__"):x(!1)};if(!d)return null;let S="daisy-input-secondary",L=null;if(!0===T){S="daisy-input-success tw:outline-success";const t=`${v}${g?"\xb0":a?'"':"cm"}`;L=c.createElement("span",{className:"tw:font-medium tw:text-base tw:text-success tw:-mt-2 tw:block"},t)}else!1===T&&(S="daisy-input-error",L=c.createElement("span",{className:"tw:font-medium tw:text-error tw:text-base tw:-mt-2 tw:block"},"\xaf\\_(\u30c4)_/\xaf"));return c.createElement(b,{box:t,help:e,labelTR:l,labelBR:s,legend:p,forId:o,legend:r.Kk[d]+(g?" (\xb0)":""),labelBL:L},c.createElement("label",{className:`tw:daisy-input tw:flex tw:items-center tw:gap-2 tw:border ${S} tw:mb-1 tw:outline tw:outline-base-300 tw:bg-transparent tw:outline-2 tw:outline-offset-2 tw:w-full`},c.createElement("input",{id:o,type:"text",inputMode:"numeric",pattern:"[0-9]*",placeholder:u,value:k,onChange:t=>B(t.target.value),className:"tw:border-0 tw:grow-2 tw:w-full"}),g?"\xb0":a?"inch":"cm",c.createElement("label",null,c.createElement("button",{className:"tw:text-warning tw:hover:text-error",onClick:()=>{B(void 0),C("")}},c.createElement(m.uc,{className:"tw:w-5 tw:h-5 tw:-mb-1"})))))},E=({box:t=!1,current:e,dropzoneConfig:o={},help:i=!1,id:n="",label:s=!1,labelBL:r=!1,labelBR:l=!1,labelTR:d=!1,legend:h=!1,update:f,original:u})=>{const g=(0,c.useCallback)((t=>{const e=new FileReader;e.onload=async()=>f(e.result),t.forEach((t=>e.readAsDataURL(t)))}),[f]),{getRootProps:w,getInputProps:k}=(0,p.VB)({onDrop:g,...o});return e?c.createElement(b,{box:t,help:i,label:s,labelTR:d,labelBL:r,labelBR:l,legend:h,forId:n},c.createElement("div",{className:"tw:bg-base-100 tw:w-full tw:h-36 tw:mb-2 tw:mx-auto tw:flex tw:flex-col tw:items-center tw:text-center tw:justify-center"},c.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-neutral tw:daisy-btn-circle tw:opacity-50 tw:hover:opacity-100",onClick:()=>f(u)},c.createElement(m.NA,null)))):c.createElement(b,{box:t,help:i,label:s,labelTR:d,labelBL:r,labelBR:l,legend:h,forId:n},c.createElement("div",(0,a.A)({},w(),{className:"\n        tw:flex tw:rounded-lg tw:w-full tw:flex-col tw:items-center tw:justify-center\n        tw:sm:p-6 tw:sm:border-4 tw:sm:border-secondary tw:sm:border-dashed\n      "}),c.createElement("input",k()),c.createElement("p",{className:"tw:hidden tw:lg:block tw:p-0 tw:m-0"},"Drag and drop your file here"),c.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-secondary tw:daisy-btn-outline tw:mt-4 tw:px-8"},"Browse...")))},W=({box:t=!1,current:e,disabled:o=!1,help:a=!1,id:i="",label:n=!1,labelBL:s=!1,labelBR:r=!1,labelTR:l=!1,labels:p=["Yes","No"],legend:d=!1,list:h=[!0,!1],update:m,on:f=!0})=>c.createElement(b,{box:t,help:a,labelTR:l,labelBL:s,labelBR:r,legend:d,forId:i},c.createElement("label",{className:"tw:daisy-label"},c.createElement("input",{id:i,disabled:o,type:"checkbox",value:e,onChange:()=>m(0===h.indexOf(e)?h[1]:h[0]),className:"tw:daisy-toggle tw:my-3 tw:daisy-toggle-primary",checked:0===h.indexOf(e)}),n?`${n} (${e===f?p[0]:p[1]})`:`${e===f?p[0]:p[1]}`))},29203:(t,e,o)=>{o.d(e,{O:()=>a,i:()=>i});const a={levels:{readNone:0,readSome:1,readOnly:2,writeSome:3,user:4,tester:4,curator:5,bughunter:6,support:8,admin:9},base:"user"},i=["user","curator","support","admin"]},30175:(t,e,o)=>{o.d(e,{e2:()=>l,iv:()=>c});const a=JSON.parse('{"id":"plugin-path-utils","r":"4.6.0"}');function i(t,e,o){let a=[];for(const i of t)if("string"==typeof i){const t=e[i];t&&t.ops?a.push(t):o.error(`Path "${i}" is not a valid path`)}else i&&i.ops?a.push(i):null!==i?o.error(`Path "${i}" is not a valid path`):a.push(null);return a}const n=function(t,e){let{log:o,Path:a}=e;const n=i(t.paths,e.paths,o);let s=n.length-1,r=new a;const l=t.mode??"corner";
1return n.forEach((function(t,e){if(null!==t&&null!==n[s]){const o=n[s].intersects(t);if(o.length>0){const a=o.pop(),i=n[s].hidden,r=t.hidden;n[s]=n[s].split(a)[0]??n[s],n[e]=t.split(a).pop()??t,i&&n[s].hide(),r&&n[e].hide()}}s=e})),n.forEach((function(o,a){if(null!==o){const i=n[s];if(null!==i){if(o.hidden&&i.hidden)return void(s=a);0===r.ops.length&&r.move(i.end()),function(t,e,o,a,i,n){if(e.ops.length<2)return;if(o.ops.length<2)return;if(e.start().sitsOn(e.end()))return;if(o.start().sitsOn(o.end()))return;if(e.end().sitsOn(o.start()))return;if("cut"===a)return;const s=e.reverse(),r=s.ops[0].to,l=o.ops[0].to;if(r.dist(l)<1)return;let c=s.ops[1].cp1??s.ops[1].to,p=o.ops[1].cp1??o.ops[1].to;r.sitsOn(c)&&(c=r.shift(e.angleAt(r),-66)),l.sitsOn(p)&&(p=l.shift(o.angleAt(l),66));const d=n.beamsIntersect(c,r,l,p);if(d){const e=d.dist(r),o=d.dist(l);if(e>d.dist(c))return;if(o>d.dist(p))return;if("corner"===a){if(i){const a=Math.min(e,o);if(e>i&&o>i){const e=d.shiftTowards(r,a-i),o=d.shiftTowards(l,a-i);return void t.line(e).line(o)}}t.line(d)}}}(r,i,o,l,t.limit,e.utils),o.hidden||(i.hidden?r.move(o.start()):r.line(o.start()),r.ops.push(...o.ops.slice(1)))}else o.hidden||r.ops.push(...o.ops)}s=a})),r},s=function(t,e){const o=[];let a="unset",s="unset",{log:r,Path:l}=e;for(const n of t.paths){let t=n?.p??[null],c=n?.offset??0,p=n?.hidden??!1;Array.isArray(t)||(t=[t]),t=i(t,e.paths,r);for(const e of t)if(null==e)"unset"===s&&(s=null),a&&a.ops&&(o.push((new l).move(a.end()).line(a.end())),o.push(null)),a=null;else{null===a&&o.push((new l).move(e.start()).line(e.start()));const t=e.divide();for(const e of t){if("unset"===s&&(s=e),2===e.ops.length&&"line"===e.ops[1].type&&e.ops[0].to.sitsOn(e.ops[1].to))continue;const t=0===c?e:e.offset(c);t.ops.length>1&&(p&&t.hide(),o.push(t),a=e)}}}return null===s&&null!==a&&o.push((new l).move(a.start()).line(a.start())),null!==s&&null===a&&o.unshift((new l).move(s.start()).line(s.start())),n({...t,paths:o},e)},r={name:a.id,version:a.r,macros:{join:n,offset:s,sa:function(t,e){let{log:o}=e,a=t.sa??e.sa;a||(a=0);let i={...t,paths:[]};for(const s of t.paths)null===s?i.paths.push(null):s.ops||"string"==typeof s?i.paths.push({p:s,offset:a}):s.p&&"number"==typeof s.offset?i.paths.push(s):o.error(`Entry "${s}" is not a valid seam allowance path specification`);let n=s(i,e);return n.setClass(t.class??"fabric"),n.addClass("sa"),n},hem:function({path1:t,path2:e,offset1:o=null,offset2:a=null,hemWidth:s,lastFoldWidth:r=null,folds:l=2,prefix:c="hemMacro",cssClass:p="fabric"},d){let{sa:h,utils:m,log:f,paths:u,Point:g,Path:b}=d;const w=(t,e)=>{const[o,a,i]=((t,e)=>{const{x:o,y:a}=t,{x:i,y:n}=e,[s,r]=[-(n-a),i-o];return[s,r,-(s*o+r*a)]})(t,e);return t=>{const{x:e,y:n}=t,s=o*o+a*a;return new g(((a*a-o*o)*e-2*o*a*n-2*o*i)/s,((o*o-a*a)*n-2*o*a*e-2*a*i)/s)}},k=(t,e)=>{const o=e.clone();for(const a of o.ops)switch(a.type){case"move":case"line":a.to=t(a.to);break;case"curve":a.to=t(a.to),a.cp1=t(a.cp1),a.cp2=t(a.cp2)}return o.reverse()};r||(r=h>0?h:10),t=i([t],u,f).pop(),e=i([e],u,f).shift(),null===o&&(o=h),null===a&&(a=h);let C=t.end(),v=e.start(),y=C,T=v,x=C.angle(v),B=C.shift(x+90,s),S=v.shift(x+90,s);if(o&&(t=t.offset(o)),a&&(e=e.offset(a)),0===t.intersectsBeam(B,S).length){let e=m.beamsIntersect(t.end(),t.end().shift(x+90,10),B,S);t=(new b).move(e).join(t)}if(0===e.intersectsBeam(B,S).length){let t=m.beamsIntersect(e.start(),e.start().shift(x+90,10),B,S);e=e.clone().line(t)}function L(t,e,o){let a=t.intersectsBeam(e,o),i=0===a.length?t:t.split(a.shift()).shift();return null===i&&(i=t),i}function P(t,e,o){let a=t.intersectsBeam(e,o),i=0===a.length?t:t.split(a.pop()).pop();return null===i&&(i=t),i}let R=L(P(t,B,S),C,v),F=P(L(e,B,S),C,v);u[c+"Mirror1"]=R.clone().hide(),u[c+"Mirror2"]=F.clone().hide();let E=w(y,T),W=k(E,R),H=k(E,F),A=[W],O=[H];for(let i=1;i<l;i++)u[c+"Fold"+i]=(new b).move(W.end()).line(H.start()).setClass(p).addClass("help"),y=y.shift(x-90,s),T=T.shift(x-90,s),E=w(y,T),W=k(E,W),H=k(E,H),A.push(W),O.unshift(H);y=y.shift(x-90,r),T=T.shift(x-90,r),A[A.length-1]=L(A[A.length-1],y,T),O[0]=P(O[0],y,T);let D=[...A,(new b).move(y).line(T),...O,null];return n({paths:D},d).setClass(p).addClass("sa")}}},l=r,c=r},31746:(t,e,o)=>{o.d(e,{SF:()=>_,K4:()=>y,cv:()=>x,c2:()=>N,Zz:()=>B,DU:()=>S,Aw:()=>l,uC:()=>p,MI:()=>c,nZ:()=>d,pZ:()=>f,mt:()=>g,tK:()=>L,xn:()=>b,Ck:()=>P,AU:()=>j,XM:()=>T,je:()=>A});var a=o(14041),i=o(70672),n=o(86560),s=o(95069);function r(t,e=!0){const o="imperial"===t?.5:1;return e?(0,n.R8)(o,t):o}function l({updateHandler:t,current:e}){return function(o,a){if(void 0===a||"__UNSET__"===a)return t(o,"__UNSET__");let i=new Set(e||[]);if(i.has(a)?i.delete(a):i.add(a),i.size<1)return t(o,"__UNSET__");i=[...i],t(o,i)}}function c({updateHandler:t,config:e}){return function(o,a){a=void 0===a||"__UNSET__"===a?e.dflt:a,t(["samm"],a),t(["sa"],a)}}function p({toggleSa:t}){return t}function d({units:t="metric",sabool:e=!1,parts:o=[],accountUnits:l="metric"}){return{sabool:{dense:!0,title:"Include seam allowance",about:a.createElement(a.Fragment,null,"Controls whether or not you want to include seam allowance on your pattern."),ux:i.s.uxLevels.core.sa,list:[0,1],choiceTitles:{0:"Do not include seam allowance",1:"Include seam allowance"},valueTitles:{0:"No",1:"Yes"},dflt:0,icon:s.sN},samm:!!e&&{title:"Seam Allowance Size",about:a.createElement(a.Fragment,null,"Controls the size of the pattern's seam allowance."),ux:i.s.uxLevels.core.sa,min:0,max:"imperial"===t?25.4:25,dflt:r(t),icon:s.sN},units:{dense:!0,title:"Pattern units",about:a.createElement(a.Fragment,null,"Allows you to switch between metric and imperial units on the pattern."),ux:i.s.uxLevels.core.units,list:["metric","imperial"],dflt:l,choiceTitles:{metric:"Metric Units (cm)",imperial:"Imperial Units (inch)"},valueTitles:{metric:"Metric",imperial:"Imperial"},icon:s.lQ},paperless:{dense:!0,title:"Paperless pattern",about:a.createElement(a.Fragment,null,"Trees are awesome, and taping together sewing patterns is not much fun. Try our paperless mode to avoid the need to print out your pattern altogether."),ux:i.s.uxLevels.core.paperless,list:[0,1],choiceTitles:{0:"Generate a regular pattern",1:"Generate a paperless pattern"},valueTitles:{0:"No",1:"Yes"},dflt:0,icon:s.j1}
1,complete:{dense:!0,title:"Generate a detailed pattern",about:a.createElement(a.Fragment,null,"Controls how detailed the pattern is; Either a complete pattern with all details, or a basic outline of the pattern parts."),ux:i.s.uxLevels.core.complete,list:[1,0],dflt:1,choiceTitles:{0:"Generate a pattern outline",1:"Generate a detailed pattern"},valueTitles:{0:"No",1:"Yes"},icon:s.DZ},expand:{dense:!0,title:"Expand pattern parts",about:a.createElement(a.Fragment,null,"Controls efforts to save paper. Disable this to expand all pattern parts at the cost of using more space & paper."),ux:i.s.uxLevels.core.expand,list:[1,0],dflt:1,choiceTitles:{0:"Keep pattern parts compact where possible",1:"Expand all pattern parts"},valueTitles:{0:"No",1:"Yes"},icon:s.mS},only:{dense:!0,title:"Only included selected pattern parts",about:a.createElement(a.Fragment,null,"Allows you to control what parts to include in your pattern."),ux:i.s.uxLevels.core.only,dflt:!1,list:o,parts:o,icon:s.SH},scale:{title:"Pattern annotations scale",about:a.createElement(a.Fragment,null,"Allows you to control the scale of annotations on the pattern. This is most useful when generating very small patterns, like for doll outfits."),ux:i.s.uxLevels.core.scale,min:.1,max:5,dflt:1,step:.1,icon:s.iQ},margin:{title:"Pattern parts margin",about:a.createElement(a.Fragment,null,"Controls the gap between pattern parts, as well as the gap between the parts and the page edge."),ux:i.s.uxLevels.core.margin,min:0,max:(0,n.R8)("imperial"===t?1.25:3,t),dflt:(0,n.R8)("imperial"===t?.125:.2,t),icon:s.CR}}}var h=o(52665),m=o(1650);function f(t,e,o,i=!1){if(!e)return e;const s={},r=(0,m.G)(t);for(const[n,c]of Object.entries(e))"object"==typeof c&&(s[n]={...c,name:n,title:r[n]?.t||n,about:a.createElement("span",null,r[n]?.d||n),dense:!0,sideBySide:!0});const l={};for(const a of(0,n.My)(s,["order","name"],["asc","asc"]))if("object"==typeof a){const t=(0,n.cA)(a);if(a.dflt=a.dflt||a[t],"pct"===t)a.dflt/=100;else if("list"===t){a.valueTitles={},a.choiceTitles={},a.choiceDescriptions={};for(const t of a.list)a.choiceTitles[t]=r[`${a.name}.${t}`]?.t||t,a.choiceDescriptions[t]=r[`${a.name}.${t}`]?.d||"",a.valueTitles[t]=r[`${a.name}.${t}`]?.t||t}else"bool"===t&&(a.list=[!1,!0],a.valueTitles={},a.choiceTitles={},a.choiceDescriptions={},a.choiceTitles.false=r[`${a.name}No`]?.t||"No",a.choiceDescriptions.false=r[`${a.name}No`]?.d||"",a.valueTitles.false="No",a.choiceTitles.true=r[`${a.name}Yes`]?.t||"Yes",a.choiceDescriptions.true=r[`${a.name}Yes`]?.d||"",a.valueTitles.true="Yes");if("function"==typeof a.menu&&(a.menu=i?"conditional":a.menu(o,(0,h.lL)(o,e))),a.menu){if(a.menu.includes(".")){let t=[];for(const e of a.menu.split("."))t.push(e),(0,n.hZ)(l,`${t.join(".")}.isGroup`,!0)}(0,n.hZ)(l,`${a.menu}.isGroup`,!0),(0,n.hZ)(l,`${a.menu}.${a.name}`,a)}else void 0===a.menu&&console.log(`Warning: Option ${a.name} does not have a menu config. Either configure it, or set it to false to hide this option.`)}if(l.advanced){const t=l.advanced;delete l.advanced,l.advanced=t}return l}const u=t=>({size:"imperial"===t?"letter":"a4",orientation:"portrait",margin:"imperial"===t?12.7:10,coverPage:1,iconSize:.5});function g(t){const e=u(t),o={a4:"A4",a3:"A3",a2:"A2",a1:"A1",a0:"A0",letter:"Letter",legal:"Legal",tabloid:"Tabloid","arch d":'ARCH D (24" x 36")',"arch e":'ARCH E (36" x 48")'};return{size:{dense:!0,title:"Paper Size",about:a.createElement("span",null,"This control the pages overlay that helps you see how your pattern spans the pages. This does not limit your export options, you can still export in a variety of paper sizes."),ux:1,list:Object.keys(o),choiceTitles:o,valueTitles:o,dflt:e.size,icon:s.Q8},orientation:{dense:!0,title:"Page Orientation",about:a.createElement("span",null,"Landscape or Portrait. Try both to see which yields the least amount of pages."),ux:1,list:["portrait","landscape"],choiceTitles:{portrait:a.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:gap-4"},a.createElement(s.Yp,{className:"tw:h-5 tw:w-5"}),a.createElement("span",{className:"tw:grow"},"Portrait (tall)")),landscape:a.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:gap-4"},a.createElement(s.Yp,{className:"tw:h-5 tw:w-5 tw:-rotate-90"}),a.createElement("span",{className:"tw:grow"},"Landscape (wide)"))},icon:s.Rq,dflt:e.orientation},margin:{dense:!0,title:"Page Margin",min:"imperial"===t?2.5:5,max:25,dflt:e.margin,icon:s.z3,ux:1},coverPage:{dense:!0,ux:1,icon:s.Ct,title:"Cover Page",about:"The cover page includes information about the pattern and an overview of how to assemble the pages.",list:[0,1],choiceTitles:{0:"Do not include a cover page",1:"Include a cover page"},dflt:e.coverPage},iconSize:{dense:!0,ux:1,icon:s.iQ,title:"Icon Size",about:"Controls the size of the icons that allow you to rotate/flip individual pattern parts",min:10,dflt:e.iconSize,step:1,max:200}}}function b(){const t=i.s.uxLevels.ui;return{aside:{dense:!0,title:"Show side menu",about:a.createElement("span",null,"Uses the right side of the screen for the Design Options, Core Settings, and UI Preferences menus."),ux:t.aside,list:[0,1],choiceTitles:{0:"Do not show the side menu",1:"Show the side menu"},dflt:0,icon:s.cG},ux:{dense:!0,title:"User Experience",about:a.createElement("span",null,"Controls the user experience, from keep it simple, to give me all the powers."),ux:t.ux,emoji:"\ud83d\udda5\ufe0f",list:[1,2,3,4,5],choiceTitles:{1:"Keep it as simple as possible",2:"Keep it simple, but not too simple",3:"Balance simplicity with power",4:"Give me all powers, but keep me safe",5:"Get out of my way"},_choiceDescriptions:{1:"Hides all but the most crucial features.",2:"Hides most of the advanced features.",3:"Reveals the majority of advanced features, but not all of them.",4:"Reveals all advanced features, keeps handrails and safety checks.",5:"Reveals all advanced features, removes handrails and safety checks."},icon:s.Zm,dflt:i.s.defaultUx},rotate:{dense:!0,title:"Rotate Pattern",about:a.createElement("span",null,"Allows you to rotate your pattern 90 degrees, handy for tall patterns."),ux:t.rotate,list:[0,1],choiceTitles:{0:"Do not rotate the pattern",1:"Rotate the pattern 90 degrees"},dflt:0,icon:s.H_},renderer:{dense:!0,title:"Pattern render engine",about:a.createElement("span",null,"Change the underlying method for rendering the pattern on screen."),ux:t.renderer,list:["react","svg"],choiceTitles:{react:a.createElement("span",null,"Render using ",a.createElement("em",null,"@freesewing/react")),svg:a.createElement("span",null,"Render using ",a.createElement("em",null,"@freesewing/core"))},choiceDescriptions:{0:"pe:noAside",1:"pe:withAside"},valueTitles:{react:"React",svg:"Core"},dflt:"react",icon:s.Ab}}}o(56821),o(49418);const w=({html:t})=>a.createElement("span",{dangerouslySetInnerHTML:{__html:t}});var k=o(5157),C=o(86281),v=o(40876);function y(t,e,o=[],a=!1){const i=new t(e);for(const r of o)i.use(r);a&&a(i);const n={pattern:i,errors:[],failure:!1};try{n.pattern.draft(),n.errors.push(...n.pattern.store.logs.error);for(const t of n.pattern.setStores)n.errors.push(...t.logs.error)}catch(s){n.failure=s}return n}function T(t,e,o=[]){const a=new t(e);for(const s of o)a.use(s);const i={pattern:a,errors:[],failure:!1};try{i.pattern.sample(),i.errors.push(...i.pattern.store.logs.error);for(const t of i.pattern.setStores)i.errors.push(...t.logs.error)}catch(n){i.failure=n}return i}function x(t){const e={};for(const o of i.s.flagTypes){let a=0;if(t[o])for(const i of Object.values(t[o]))a++,e[`${o}-${a}`]={...i,type:o}}return e}function B(t){if("settings"===t.step.name&&"ui"===t.step.path[1]||"ui"===t.step.name)return function({step:t}){const e="ui"===t.name?t.path[1]:t.path[2],o=b()[e];if(!o)return!1;const i={icon:a.createElement(s.Xy,null),field:e,title:o.title,menu:"UI Preferences",structure:b()[e]},n=i.structure.icon;i.fieldIcon=a.createElement(n,null);
1for(const a of["old","new"])i[a+"Val"]=O(o.choiceTitles[o.choiceTitles[String(t[a])]?String(t[a]):String(o.dflt)]);return i}(t);if("settings"===t.step.name&&"options"===t.step.path[1])return function({step:t,state:e,Design:o}){const i=o.patternConfig.options[t.path[2]];return{icon:a.createElement(s.mE,null),field:t.path[2],title:`${e.design}:${t.path[2]}`,menu:"Design Options",oldVal:N(i,t.old,"imperial"===e.units),newVal:N(i,t.new,"imperial"===e.units)}}(t);if("settings"===t.step.name&&["sa","samm","margin","scale","only","complete","paperless","sabool","units","expand"].includes(t.step.path[1]))return function({step:t,state:e,Design:o}){const i=t.path[1],{settings:r={}}=e,l=d({language:e.language,units:r.units,sabool:r.sabool,parts:o.patternConfig.draftOrder}),c={field:i,menu:"Core Settings",title:l?.[i]?l[i].title:"",icon:a.createElement(s.Ze,null),structure:l[i]};c.structure||"sa"!==i||(c.structure=l.samm);const p=c.structure?.icon||s.IJ;c.fieldIcon=a.createElement(p,null);const h=D,m=w;switch(c.field){case"margin":case"sa":case"samm":return"margin"!==c.field&&(c.title="Seam Allowance"),c.oldVal=a.createElement(m,{html:(0,n.m2)(h(t.old,c.structure.dflt))}),c.newVal=a.createElement(m,{html:(0,n.m2)(h(t.new,c.structure.dflt))}),c;case"scale":return c.oldVal=h(t.old,c.structure.dflt),c.newVal=h(t.new,c.structure.dflt),c;case"units":return c.oldVal=O("imperial"===t.new?"Metric Units":"Imperial Units"),c.newVal=O("imperial"===t.new?"Imperial Units":"Metric Units"),c;case"only":return c.oldVal=h(t.old,c.structure.dflt)||"Include all parts",c.newVal=h(t.new,c.structure.dflt)||"Include all parts",c;default:return c.oldVal=O(c.structure.choiceTitles[String(t.old)]?c.structure.choiceTitles[String(t.old)]:c.structure.choiceTitles[String(c.structure.dflt)]),c.newVal=O(c.structure.choiceTitles[String(t.new)]?c.structure.choiceTitles[String(t.new)]:c.structure.choiceTitles[String(c.structure.dflt)]),c}}(t);if("settings"===t.step.name&&"measurements"===t.step.path[1]){const e={icon:a.createElement(s.hs,null),field:"measurements",title:"measurements",menu:"measurements"};if(t.step.path[2])return{...e,field:t.step.path[2],oldVal:(0,n.m2)(t.step.old,t.imperial),newVal:(0,n.m2)(t.step.new,t.imperial)};let o=0;for(const a of Object.keys(t.step.new))t.step.new[a]!==t.step.old?.[a]&&o++;return{...e,msg:`${o} measurements updated`}}return!1}function S(t={},e){return{...e.initialState,...t}}function L(t,e){const o=""+t,a=o.indexOf("."),i=e>0?Math.ceil(Math.log10(e)):Math.floor(Math.log10(e)),s=Math.max(0,o.length-(a+i));return(0,n.LI)(t*e,s)}function P(t,e){return void 0!==t&&t!=e.dflt}const R="__UNSET__";function F(t={},e,o="__UNSET__"){return o===R?v(t,e):C(t,e,o),t}function E(t,e={},o,a="__UNSET__",i){const n=k(e,o);return i((i=>(Array.isArray(i.undos)||(i.undos=[]),{...i,undos:[{name:t,time:Date.now(),path:o,old:n,new:a,restore:W(e)},...i.undos]}))),F(e,o,a)}function W(t){return JSON.parse(JSON.stringify(t))}function H(t,e){return Array.isArray(e)?[t,...e]:[t,...e.split(".")]}function A(t,e,o){return{state:(e,o)=>t((t=>F({...t},e,o))),settings:(o=null,a=null)=>{if(Array.isArray(o)&&Array.isArray(o[0])&&null===a)throw new Error("Update.settings was called with an array of operations. This is no longer supported.");return t((t=>E("settings",{...t},H("settings",o),a,e)))},restore:async(o,a)=>{t(a.undos[o].restore),e((t=>(t.undos=t.undos.slice(o+1),t)))},toggleSa:()=>t((t=>{const o=t.settings?.samm||("imperial"===t.settings?.units?15.3125:10),a=W(t),i=t.settings.sabool?[["sabool",0],["sa",0],["samm",o]]:[["sabool",1],["sa",o],["samm",o]];for(const[e,n]of i)F(t,`settings.${e}`,n);return function(t,e,o){o((o=>(Array.isArray(o.undos)||(o.undos=[]),{...o,undos:[{time:Date.now(),...t,restore:W(e)},...o.undos]})))}({name:"settings",path:["settings","sa"],new:t.settings.sabool?0:o,old:t.settings.sabool?o:0},a,e),t})),ui:(o,a)=>t((t=>E("ui",{...t},H("ui",o),a,e))),design:e=>t((t=>F({...t},"design",e))),view:a=>{if(!o.views.includes(a))return console.log("not a valid view:",a);t((t=>({...t,view:a}))),e((t=>(Array.isArray(t.views)||(t.views=[]),{...t,views:[a,...t.views]})))},viewBack:()=>{e((e=>Array.isArray(e.views)&&o.views.includes(e.views[1])?(t((t=>({...t,view:e.views[1]}))),{...e,views:e.views.slice(1)}):e))},pid:e=>t((t=>({...t,pid:e}))),ux:e=>t((t=>F({...t},"ux",e))),clearPattern:()=>t((t=>{const e={...t};return F(e,"settings",{measurements:t.settings.measurements,metadata:t.settings.metadata,units:t.settings.units}),F(e,"ui",{...e.ui,renderer:"react"}),e})),clearAll:()=>t(o.initialState),startLoading:(t,o={})=>e((e=>{const a={...e};return"object"!=typeof a.loading&&(a.loading={}),void 0===o.color&&(o.color="info"),a.loading[t]={msg:(0,n.lg)(),icon:"spinner",...o},a})),stopLoading:t=>e((e=>{const o={...e};return void 0!==o.loading[t]&&delete o.loading[t],o})),clearLoading:()=>e((t=>({...t,loading:{}}))),notify:(t,a=!1)=>e((e=>{const i={...e};return a&&e.loading?.[a]||("object"!=typeof i.loading&&(i.loading={}),!1===a&&(a=Date.now()),i.loading[a]={...t,id:a,fadeTimer:o.notifyTimeout}),i})),notifySuccess:(t,a=!1)=>e((e=>{const i={...e};return a&&e.loading?.[a]||("object"!=typeof i.loading&&(i.loading={}),!1===a&&(a=Date.now()),i.loading[a]={msg:t,icon:"success",color:"success",id:a,fadeTimer:o.notifyTimeout}),i})),notifyFailure:(t,a=!1)=>e((e=>{const i={...e};return a&&e.loading?.[a]||("object"!=typeof i.loading&&(i.loading={}),!1===a&&(a=Date.now()),i.loading[a]={msg:t,icon:"failure",color:"error",id:a,fadeTimer:o.notifyTimeout}),i})),fadeNotify:t=>e((e=>{const o={...e};return o.loading[t]={...o.loading[t],clearTimer:600,id:t,fading:!0},delete o.loading[t].fadeTimer,o}
1)),clearNotify:t=>e((e=>{const o={...e};return void 0!==o.loading[t]&&delete o.loading[t],o}))}}function O(t){return Array.isArray(t)?t[0]:t}function D(t,e){return void 0===t||"__UNSET__"===t||t===e?e:t}function N(t,e,o){const i=(0,n.cA)(t);return"pct"===i?(r=e||t.pct/100,Math.round(1e3*r)/10+"%"):"deg"===i?`${e||t.deg}\xb0`:"bool"===i?void 0===e?t.bool:e?a.createElement(s.zB,null):a.createElement(s.Ty,null):"mm"===i?function(t,e,o="html"){if(t=M(t),"imperial"===e||!0===e){if(0==t)return I("",0,!1,!1,o);return function(t,e="html"){let o="",a="",i="";t<0&&(t*=-1,o="-");Math.abs(t)<1?i=t:(a=Math.floor(t),i=t-a);let n=Math.round(128*i);if(0==n)return I(o,a||n,!1,!1,e);for(let s=1;s<7;s++){const t=Math.pow(2,7-s);if(n%t==0)return I(o,a,n/t,Math.pow(2,s),e)}return o+Math.round(100*t)/100+("html"===e||"notags"===e?'"':"")}(t/25.4,o)}return"html"===o||"notags"===o?M(t/10)+"cm":M(t/10)}(void 0===e?t.mm:e,o):"list"===i&&void 0===e?t.dflt:e;var r}function I(t,e,o=!1,a=!1,i="html"){return"html"===i?o?`${t}${e}&nbsp;<sup>${o}</sup>/<sub>${a}</sub>"`:`${t}${e}"`:"notags"===i?o?`${t}${e} ${o}/${a}"`:`${t}${e}"`:o?`${t}${e} ${o}/${a}`:`${t}${e}`}function M(t,e){return"imperial"===e?Math.round(1e6*t)/1e6:Math.round(10*t)/10}function _(t,e={}){const o={};for(const a of t.patternConfig?.measurements||[])o[a]=e[a];for(const a of t.patternConfig?.optionalMeasurements||[])o[a]=e[a];return o}function j(t){return!i.s.measurementsFreeViews.includes(t.view)&&t._.missingMeasurements&&t._.missingMeasurements.length>0}},33727:(t,e,o)=>{o.d(e,{A:()=>n,z:()=>s});const a={fields:{data:{bookmarks:2,sets:1,patterns:1},info:{img:2,bio:2,email:3,username:2},settings:{consent:2,compare:3,newsletter:2,units:2,control:1},security:{apikeys:4,mfa:3,password:2},identities:{github:3,instagram:3,mastodon:3,reddit:3,twitch:3,tiktok:3,website:3}},sets:{name:1,img:1,public:3,units:1,notes:2,createdAt:2,updatedAt:2,id:4},patterns:{name:1,img:1,public:3,notes:2,createdAt:2,updatedAt:2,id:4},statuses:{0:{name:"inactive",color:"neutral"},1:{name:"active",color:"success"},"-1":{name:"paused",color:"warning"},"-2":{name:"disabled",color:"error"}}},i={core:{sa:2,paperless:2,locale:3,units:1,complete:4,expand:4,only:4,scale:4,margin:4},ui:{renderer:4,kiosk:2},views:{draft:1,measies:1,test:3,time:3,print:1,export:1,save:1,edit:4,logs:2,inspect:4,docs:1}},n={account:a,editor:i,dflt:3,flat:{...a.fields.data,...a.fields.info,...a.fields.settings,...a.fields.security,...a.fields.identities,sets:a.sets,core:i.core,ui:i.ui,views:i.views}},s={1:{title:"Keep it as simple as possible",desc:"Hides all but the most crucial features."},2:{title:"Keep it simple, but not too simple",desc:"Hides the majority of features."},3:{title:"Balance simplicity with power",desc:"Reveals the majority of features, but not all."},4:{title:"Give me all powers, but keep me safe",desc:"Reveals all features, keeps handrails and safety checks"},5:{title:"Get out of my way",desc:"Reveals all features, removes handrails and safety checks"}}},34519:(t,e,o)=>{o.d(e,{KT:()=>r,j0:()=>n,yV:()=>s});var a=o(14041),i=o(95069);const n=({children:t})=>a.createElement("div",{className:"tw:flex tw:flex-row tw:border tw:border-success tw:rounded"},a.createElement("div",{className:"tw:bg-success tw:text-success-content tw:p-1 tw:rounded-l tw:flex tw:flex-row tw:items-center"},a.createElement(i.V5,{className:"tw:w-6 tw:h-6 tw:text-success-content"})),a.createElement("div",{className:"tw:p-1 tw:px-2 tw:text-sm tw:font-medium tw:bg-success/10 tw:grow tw:rounded-r mini"},t)),s=({children:t})=>a.createElement("div",{className:"tw:flex tw:flex-row tw:border tw:border-info tw:rounded"},a.createElement("div",{className:"tw:bg-info tw:text-info-content tw:p-1 tw:rounded-l tw:flex tw:flex-row tw:items-center"},a.createElement(i.oy,{className:"tw:w-6 tw:h-6 tw:text-info-content"})),a.createElement("div",{className:"tw:p-1 tw:px-2 tw:text-sm tw:font-medium tw:bg-info/10 tw:grow tw:rounded-r mini"},t)),r=({children:t})=>a.createElement("div",{className:"tw:flex tw:flex-row tw:border tw:border-warning tw:rounded"},a.createElement("div",{className:"tw:bg-warning tw:text-warning-content tw:p-1 tw:rounded-l tw:flex tw:flex-row tw:items-center"}
1,a.createElement(i.id,{className:"tw:w-6 tw:h-6 tw:text-warning-content"})),a.createElement("div",{className:"tw:p-1 tw:px-2 tw:text-sm tw:font-medium tw:bg-warning/10 tw:grow tw:rounded-r mini"},t))},48487:(t,e,o)=>{o.d(e,{u1:()=>n,XU:()=>F,eu:()=>U,zN:()=>Y,Tx:()=>K,_r:()=>z,Gs:()=>Q,NO:()=>q,Ec:()=>ot,Ps:()=>it,oc:()=>nt,FN:()=>st,Cp:()=>rt,Id:()=>pt,pd:()=>ht,qF:()=>Bt,i5:()=>mt,$L:()=>St,cO:()=>te,RN:()=>qt,SR:()=>ee,_2:()=>oe,zJ:()=>ae,LQ:()=>ie,gE:()=>re,TZ:()=>ft,Mv:()=>le,n$:()=>ce,Pz:()=>pe,NZ:()=>Kt,qi:()=>Zt,Tc:()=>gt,YA:()=>ut,WU:()=>de,Vv:()=>he,gG:()=>fe,jZ:()=>me,A_:()=>bt});var a=o(14041),i=o(71336);const n=({status:t})=>0===t?a.createElement(s,null):1===t?a.createElement(r,null):-1===t?a.createElement(l,null):-2===t?a.createElement(c,null):a.createElement("b",null,"Invalid status: ",t),s=()=>a.createElement(i.F,{k:"status",val:"inactive",color:"warning"}),r=()=>a.createElement(i.F,{k:"status",val:"active",color:"success"}),l=()=>a.createElement(i.F,{k:"status",val:"frozen",color:"accent"}),c=()=>a.createElement(i.F,{k:"status",val:"blocked",color:"error"});var p=o(86302),d=o(56622),h=o(86560),m=o(57416),f=o(50182),u=o(1199),g=o(68024),b=o(25578);const w=t=>{const[e,o]=(0,a.useState)({}),i=Object.keys(e).length;return{count:i,selection:e,setSelection:o,toggle:t=>{const a={...e};a[t]?delete a[t]:a[t]=1,o(a)},toggleAll:()=>{if(i===t.length)o({});else{const e={};for(const o of t)e[o.id]=1;o(e)}}}};var k=o(20228),C=o(56702),v=o(95069),y=o(59427),T=o(19093),x=o(48831),B=o(89069),S=o(29016),L=o(73570),P=o(15037);const R={id:"Key",name:"Name",calls:"Calls",level:"Level",createdAt:"Created",expiresAt:"Expires"},F=({Link:t=!1})=>{t||(t=C.N_);const[e,o]=(0,a.useState)([]),[i,n]=(0,a.useState)(0),[s,r]=(0,a.useState)("id"),[l,c]=(0,a.useState)(!1),p=(0,b.O)(),{setLoadingStatus:m,LoadingProgress:g}=(0,a.useContext)(u.q),{count:T,selection:B,setSelection:S,toggle:L,toggleAll:P}=w(e),{setModal:F}=(0,a.useContext)(f.V);(0,a.useEffect)((()=>{(async()=>{m([!0,"Loading API keys from backend"]);const[t,e]=await p.getApikeys();200===t?(o(e.apikeys),m([!0,"API keys loaded",!0,!0])):m([!1,"Failed to load API keys from backend",!0,!0])})()}),[i]);return a.createElement(a.Fragment,null,a.createElement("div",{className:"tw:flex tw:flex-row tw:flex-wrap tw:gap-2 tw:items-center tw:justify-between tw:mb-4"},a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-error",onClick:async()=>{let t=0;for(const e in B)t++,await p.removeApikey(e),m([!0,a.createElement(g,{val:t,max:T,msg:"Removing API keys",key:"linter"})]);S({}),n(i+1),m([!0,"Nailed it",!0,!0])},disabled:T<1},a.createElement(v.uc,null)," ",T," API Keys"),a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-primary tw:capitalize tw:w-full tw:md:w-auto tw:hover:text-primary-content",onClick:()=>F(a.createElement(x.F,{keepOpenOnClick:!0},a.createElement(W,{onCreate:()=>n(i+1)})))},a.createElement(v.c1,null),"Create a new API key")),a.createElement(k.A,null,a.createElement("table",{className:"tw:table tw:table-auto"},a.createElement("thead",{className:"tw:border tw:border-base-300 tw:border-b-2 tw:border-t-0 tw:border-x-0"},a.createElement("tr",{className:""},a.createElement("th",{className:""},a.createElement("input",{type:"checkbox",className:"tw:daisy-checkbox tw:daisy-checkbox-secondary",onClick:P,checked:e.length===T})),Object.keys(R).map((t=>a.createElement("th",{key:t},a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-link tw:capitalize tw:px-0 underline tw:hover:decoration-4 tw:decoration-2 tw:text-secondary",onClick:()=>s===t?c(!l):r(t)},R[t]," ",a.createElement(v.wF,{stroke:3,className:`tw:w-4 tw:h-4 ${l?"tw:-":"tw:"}rotate-90 ${s===t?"":"tw:opacity-0"}`}))))))),a.createElement("tbody",null,d(e,s,l?"desc":"asc").map(((t,e)=>a.createElement("tr",{key:e},a.createElement("td",{className:"tw:text-base tw:font-medium"},a.createElement("input",{type:"checkbox",checked:!!B[t.id],className:"tw:daisy-checkbox tw:daisy-checkbox-secondary",onClick:()=>L(t.id)})),a.createElement("td",{className:"tw:text-base tw:font-medium"},a.createElement(y.s,{uuid:t.id,label:"Key"})),Object.keys(R).slice(1,4).map((e=>a.createElement("td",{key:e,className:"tw:text-base tw:font-medium"},a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-link tw:text-secondary tw:hover:decoration-4",onClick:()=>F(a.createElement(x.F,null,a.createElement(E,{apikey:t})))},t[e])))),a.createElement("td",{className:"tw:text-base tw:font-medium"},(0,h.XV)(t.createdAt)),a.createElement("td",{className:"tw:text-base tw:font-medium"},(0,h.XV)(t.expiresAt)))))))))},E=({apikey:t})=>a.createElement(a.Fragment,null,a.createElement("h2",{className:"tw:flex tw:flex-row tw:items-center tw:gap-2"},"API Key ",a.createElement(y.s,{uuid:t.id})),a.createElement("ul",{className:"tw:list tw:list-disc tw:ml-4"},Object.entries(R).map((([e,o])=>a.createElement("li",{key:e},o,": ",a.createElement("b",null,t[e])))))),W=({onCreate:t=!1})=>{const[e,o]=(0,a.useState)(""),[i,n]=(0,a.useState)(1),[s,r]=(0,a.useState)(Date.now()),[l,c]=(0,a.useState)(!1),{account:p}=(0,g.F)(),d=(0,b.O)(),{setLoadingStatus:h}=(0,a.useContext)(u.q),f="admin"===p.role?[0,1,2,3,4,5,6,7,8]:[0,1,2,3,4];return a.createElement("div",{className:"tw:w-full"},a.createElement("h2",null,"New API key ",l?`: ${l.name}`:""),l?a.createElement(H,{apikey:l}):a.createElement(a.Fragment,null,a.createElement(S.YZ,{id:"apikey-name",label:"Key Name",current:e,update:o,valid:t=>t.length>0,placeholder:"Alicia Key"}),a.createElement(A,{expires:s,setExpires:r}),a.createElement(S.ZB,{id:"apikey-level",label:"Key Level",list:f.map((t=>({val:t,label:a.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:w-full tw:justify-between"},a.createElement("span",null,m.fR[t]),a.createElement(B.y,{nr:t,color:"secondary"}))}))),current:i,update:n}),a.createElement("div",{className:"tw:flex tw:flex-row tw:gap-2 tw:items-center tw:w-full tw:my-8"},a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-primary tw:capitalize tw:w-full tw:md:w-auto",disabled:e.length<1,onClick:async()=>{h([!0,"Creating new API key"]);const[o,a]=await d.createApikey({name:e,level:i,expiresIn:Math.floor((s.valueOf()-Date.now().valueOf())/1e3)});201===o&&"created"===a.result?(h([!0,"API key created",!0,!0]),c(a.apikey),"function"==typeof t&&t(a.apikey)):h([!0,"An error occured. Please report this",!0,!1])}},"New API key"))))},H=({apikey:t})=>a.createElement("div",null,a.createElement("div",{className:"tw:flex tw:flex-row tw:flex-wrap tw:gap-2 tw:items-center tw:mb-2"},a.createElement(i.F,{k:"name",val:t.name,color:"secondary"}),a.createElement(i.F,{k:"level",val:t.level,color:"secondary"}),a.createElement(i.F,{k:"created",val:a.createElement(P.fV,{iso:t.createdAt}),color:"secondary"}),a.createElement(i.F,{k:"expires",val:a.createElement(P.zi,{iso:t.expiresAt}),color:"secondary"})),a.createElement("h6",{className:"tw:flex tw:flex-row tw:items-center"},"Key",a.createElement(L.T,{sup:!0,content:t.key,label:"API key ID"})),a.createElement("pre",null,t.key),a.createElement("h6",{className:"tw:flex tw:flex-row tw:items-center"},"Secret",a.createElement(L.T,{sup:!0,content:t.secret,label:"API key secret"})),a.createElement("pre",null,t.secret),a.createElement(T.Y,{type:"warning",compact:!0},"This is the only time you can see the key secret, make sure to copy it.")),A=({expires:t,setExpires:e})=>{const[o,i]=(0,a.useState)(1);(0,a.useEffect)((()=>n(o)),[]);const n=t=>{const o="number"==typeof t?t:t.target.value;e(p.c9.now().plus({days:o})),i(o)};return a.createElement("div",{className:"tw:flex tw:flex-row tw:gap-2 tw:items-center"},a.createElement(S.LB,{label:"Key Expiry",labelBL:(0,h.XV)(t),labelBR:a.createElement(P.zi,{iso:t})},a.createElement("input",{type:"range",min:"1",max:731,value:o,className:"tw:daisy-range tw:daisy-range-secondary tw:w-full",onCh
1ange:n})))},O=({title:t,children:e,keyWidth:o="tw:w-24"})=>a.createElement("div",{className:"tw:flex tw:flex-row tw:flex-wrap tw:items-center tw:lg:gap-4 tw:my-2 tw:w-full"},a.createElement("div",{className:`${o} tw:text-left tw:md:text-right tw:block tw:md:inline tw:font-bold tw:pr-4 tw:shrink-0`},t),a.createElement("div",{className:"tw:grow"},e)),D={1:[""],2:["","newsletter","units"],3:["","newsletter","units","compare","username"],4:["","newsletter","units","compare","username","bio","img"],5:[""]},N=({href:t})=>a.createElement(C.N_,{href:`/welcome/${t}`,className:"tw:text-success tw:hover:text-secondary"},a.createElement(M,{href:t})),I=({href:t})=>a.createElement(C.N_,{href:`/welcome/${t}`,className:"tw:text-secondary tw:w-6 tw:h-6 tw:opacity-50 tw:hover:opacity-100"},a.createElement(M,{href:t})),M=t=>{const e=""===t.href||"control"===t.href?v.xh:G[t.href]?G[t.href]:v.Ze;return a.createElement(e,t)},_=({href:t})=>a.createElement(M,{href:t,className:"tw:w-6 tw:h-6 tw:text-base-content"}),j=({done:t=[],todo:e=[],current:o=""})=>a.createElement("div",{className:"tw:m-auto tw:flex tw:flex-row tw:items-center tw:justify-center tw:gap-2"},t.map((t=>a.createElement(N,{href:t,key:t}))),a.createElement(_,{href:o}),e.map((t=>a.createElement(I,{href:t,key:t})))),G={newsletter:v.H2,units:v.lQ,compare:v.HD,username:v.ny,bio:v.Vf,img:v.jp},U=({welcome:t=!1,Link:e=!1})=>{e||(e=C.N_);const{account:o,setAccount:i}=(0,g.F)(),n=(0,b.O)(),[s,r]=(0,a.useState)(""),{setLoadingStatus:l}=(0,a.useContext)(u.q),c=async()=>{l([!0,"Uploading image"]);const[t,e]=await n.updateAccount({img:s});200===t&&"success"===e.result?(i(e.account),l([!0,"Avatar saved",!0,!0])):l([!0,"Failed to save avatar image. Please report this",!0,!1])};return a.createElement("div",{className:"tw:w-full"},t&&!1===s?null:a.createElement("img",{alt:"img",src:s||(0,h.qk)({id:`uid-${o.ihash}`,variant:"public"}),className:"tw:shadow tw:mb-4"}),a.createElement(S.$n,{id:"account-img",label:"Avatar image",placeholder:"image",update:r,current:s,valid:t=>t.length>0}),t?a.createElement(a.Fragment,null,a.createElement(L.K,{onClick:c,btnProps:{disabled:!s}},a.createElement(v.LP,null),"Save"),a.createElement(L.K,{href:"/docs/about/",className:"tw:mt-4"},a.createElement(v.wF,{stroke:3})," Continue"),D[o.control].length>0?a.createElement(a.Fragment,null,a.createElement("progress",{className:"tw:progress tw:progress-primary tw:w-full tw:mt-12",value:700/D[o.control].length,max:"100"}),a.createElement("span",{className:"tw:pt-4 tw:text-sm tw:font-bold tw:opacity-50"},"7 / ",D[o.control].length),a.createElement(j,{done:D[o.control].slice(0,6),todo:D[o.control].slice(7),current:"img"})):null):a.createElement(a.Fragment,null,a.createElement("p",{className:"tw:text-right"},a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-primary tw:w-full tw:lg:w-auto tw:mt-4",onClick:c},a.createElement(v.LP,null)," Save Avatar"))))},Y=({welcome:t=!1,Link:e=!1})=>{e||(e=C.N_);const{account:o,setAccount:i}=(0,g.F)(),n=(0,b.O)(),{setLoadingStatus:s}=(0,a.useContext)(u.q),[r,l]=(0,a.useState)(o.bio),c=D[o.control].length>5?"/welcome/"+D[o.control][6]:"/docs/about/";return a.createElement("div",{className:"tw:w-full"},a.createElement("h6",null,"Tell people a little bit about yourself."),a.createElement(S.oZ,{id:"account-bio",label:"Bio",update:l,current:r,placeholder:"Bio"}),a.createElement("p",{className:"tw:text-right"},a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-primary tw:w-full tw:lg:w-auto tw:mt-8",onClick:async()=>{s([!0,"Saving bio"]);const[t,e]=await n.updateAccount({bio:r});200===t&&"success"===e.result?(i(e.account),s([!0,"Bio updated",!0,!0])):s([!0,"Something went wrong. Please report this",!0,!0])}},a.createElement(v.LP,null)," Save Bio")),t?a.createElement(a.Fragment,null,a.createElement(L.K,{href:c,className:"tw:mt-4"},a.createElement(v.wF,{stroke:3})," Continue"),D[o.control].length>0?a.createElement(a.Fragment,null,a.createElement("progress",{className:"tw:daisy-progress tw:daisy-progress-primary tw:w-full tw:mt-12",value:600/D[o.control].length,max:"100"}),a.createElement("span",{className:"tw:pt-4 tw:text-sm tw:font-bold tw:opacity-50"},"6 / ",D[o.control].length),a.createElement(j,{done:D[o.control].slice(0,5),todo:D[o.control].slice(6),current:"bio"})):null):null)}
1,$={design:"Designs",pattern:"Patterns",set:"Measurements Sets",cset:"Curated Measurements Sets",doc:"Documentation",custom:"Custom Bookmarks"},z=()=>{const t=(0,b.O)(),{setModal:e}=(0,a.useContext)(f.V),{setLoadingStatus:o,LoadingProgress:i}=(0,a.useContext)(u.q),[n,s]=(0,a.useState)([]),[r,l]=(0,a.useState)({}),[c,p]=(0,a.useState)(0),d=Object.keys(r).length;(0,a.useEffect)((()=>{(async()=>{const[e,o]=await t.getBookmarks();200===e&&"success"===o.result&&s(o.bookmarks)})()}),[c]);const h=()=>{if(d===n.length)l({});else{const t={};for(const e of n)t[e.id]=1;l(t)}},m={};for(const a in $)m[a]=n.filter((t=>t.type===a));return a.createElement("div",{className:"tw:w-full"},a.createElement("p",{className:"tw:text-center tw:md:text-right"},a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-primary tw:capitalize tw:w-full tw:md:w-auto tw:hover:text-primary-content tw:hover:no-underline",onClick:()=>e(a.createElement(x.F,{flex:"col",justify:"top lg:justify-center",slideFrom:"right",keepOpenOnClick:!0},a.createElement("div",{className:"tw:w-full"},a.createElement("h2",null,"New Bookmark"),a.createElement(J,{onCreated:()=>p(c+1)}))))},a.createElement(v.c1,null),"New Bookmark")),n.length>0?a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-error",onClick:async()=>{let e=0;for(const n in r)e++,await t.removeBookmark(n),o([!0,a.createElement(i,{val:e,max:d,msg:"Removing Bookmarks",key:"linter"})]);l({}),p(c+1),o([!0,"Nailed it",!0,!0])},disabled:d<1},a.createElement(v.uc,null)," ",d," Bookmarks"):null,Object.entries($).map((([t,e])=>m[t].length>0?a.createElement(a.Fragment,{key:t},a.createElement("h2",null,e),a.createElement("table",{className:"tw:table tw:w-full"},a.createElement("thead",{className:"tw:border tw:border-base-300 tw:border-b-2 tw:border-t-0 tw:border-x-0"},a.createElement("tr",null,a.createElement("th",{className:"tw:text-base-300 tw:text-base tw:text-left tw:w-8"},a.createElement("input",{type:"checkbox",className:"tw:daisy-checkbox tw:daisy-checkbox-secondary",onClick:h,checked:n.length===d})),a.createElement("th",{className:"tw:w-1/2"}
1,"Title"),a.createElement("th",null,"Location"))),a.createElement("tbody",null,n.filter((e=>e.type===t)).map(((t,e)=>a.createElement("tr",{key:e},a.createElement("td",{className:"tw:text-base tw:font-medium"},a.createElement("input",{type:"checkbox",checked:!!r[t.id],className:"tw:daisy-checkbox tw:daisy-checkbox-secondary",onClick:()=>(t=>{const e={...r};e[t]?delete e[t]:e[t]=1,l(e)})(t.id)})),a.createElement("td",{className:"tw:text-base tw:font-medium"},t.title),a.createElement("td",{className:"tw:text-base tw:font-medium"},a.createElement(C.N_,{href:t.url},t.url.length>30?t.url.slice(0,30)+"...":t.url)))))))):null)))},J=({onCreated:t=!1})=>{const{setLoadingStatus:e}=(0,a.useContext)(u.q),{clearModal:o}=(0,a.useContext)(f.V),i=(0,b.O)(),[n,s]=(0,a.useState)(""),[r,l]=(0,a.useState)("");return a.createElement("div",{className:"tw:w-full"},a.createElement(S.YZ,{id:"bookmark-title",label:"Title",labelBL:"The title/name of your bookmark",update:s,current:n,valid:t=>t.length>0,placeholder:"Bookmark title"}),a.createElement(S.YZ,{id:"bookmark-url",label:"Location",labelBL:"The location/url of your bookmark",update:l,current:r,valid:t=>t.length>0,placeholder:"https://freesewing.org/account"}),a.createElement("div",{className:"tw:flex tw:flex-row tw:gap-2 tw:items-center tw:w-full tw:my-8"},a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-primary tw:grow tw:capitalize",disabled:!(n.length>0&&r.length>0),onClick:async()=>{e([!0,"Processing update"]);const[a]=await i.createBookmark({title:n,url:r,type:"custom"});e(201===a?[!0,"Bookmark created",!0,!0]:[!0,"An error occured, the bookmark was not created. Please report this.",!0,!1]),"function"==typeof t&&t(),o()}},"New bookmark")))},K=({slug:t,type:e,title:o})=>{const{setModal:i}=(0,a.useContext)(f.V),n={docs:"page"};return a.createElement("button",{className:`tw:daisy-btn tw:daisy-btn-secondary tw:daisy-btn-outline ${h.f_}`,onClick:()=>i(a.createElement(x.F,{flex:"col",justify:"top lg:justify-center",slideFrom:"right",keepOpenOnClick:"true"},a.createElement(V,{type:e,title:o,slug:t})))},a.createElement(v.cF,null),a.createElement("span",null,"Bookmark this ",n[e]?n[e]:e))},V=({type:t,title:e,slug:o})=>{const i=(0,b.O)(),[n,s]=(0,a.useState)(e),{setLoadingStatus:r}=(0,a.useContext)(u.q),{setModal:l}=(0,a.useContext)(f.V),c="http"===o.toLowerCase().slice(0,4)?o:`/${o}`;return a.createElement("div",{className:"tw:mt-12"},a.createElement("h2",null,"New bookmark"),a.createElement(S.YZ,{label:"Title",current:n,update:s,valid:h.z2,labelBL:c}),a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-primary tw:w-full tw:mt-4",onClick:async e=>{e.stopPropagation(),r([!0,"Contacting backend"]);let o=n;const[a]=await i.createBookmark({type:t,title:o,url:c});201===a?(r([!0,"Bookmark created",!0,!0]),l(!1)):r([!0,"Something unexpected happened, failed to create a bookmark",!0,!1])}},"Create bookmark"))},X={yes:{title:"Yes, in case it may help me",desc:"Allowing us to compare your measurments to a baseline or others measurements sets allows us to detect potential problems in your measurements or patterns."},no:{title:"No, never compare",desc:"We get it, comparison is the thief of joy. Just be aware that this limits our ability to warn you about potential problems in your measurements sets or patterns."}},Q=({welcome:t=!1})=>{const{account:e,setAccount:o}=(0,g.F)(),i=(0,b.O)(),[n,s]=(0,a.useState)(e?.compare?"yes":"no"),{setLoadingStatus:r}=(0,a.useContext)(u.q),l=D[e?.control].length>3?"/welcome/"+D[e?.control][4]:"/docs/about/";return a.createElement("div",{className:"tw:w-full"},a.createElement(S.ZB,{id:"account-compare",label:"Are you comfortable with your measurements sets being compared?",list:["yes","no"].map((t=>({val:t,label:a.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:w-full tw:justify-between"},a.createElement("span",null,X[t].title),"yes"===t?a.createElement(v.aV,{className:"tw:w-8 h-8 tw:text-success",stroke:4}):a.createElement(v.xf,{className:"tw:w-8 h-8 tw:text-error",stroke:3})),desc:X[t].desc}))),current:n,update:async t=>{if(t!==n){r([!0,"Saving preferences"]);const[e,a]=await i.updateAccount({compare:"yes"===t});
1200===e?(r([!0,"Preferences saved",!0,!0]),o(a.account),s(t)):r([!0,"An error occured. Please report this.",!0,!0])}}}),t?a.createElement(a.Fragment,null,a.createElement(L.K,{href:l,className:"tw:mt-4"},a.createElement(v.wF,{stroke:3})," Continue"),D[e?.control].length>0?a.createElement(a.Fragment,null,a.createElement("progress",{className:"tw:daisy-progress tw:daisy-progress-primary tw:w-full tw:mt-12",value:400/D[e?.control].length,max:"100"}),a.createElement("span",{className:"tw:pt-4 tw:text-sm tw:font-bold tw:opacity-50"},"4 / ",D[e?.control].length),a.createElement(j,{done:D[e?.control].slice(0,3),todo:D[e?.control].slice(4),current:"compare"})):null):null)},q=({signUp:t=!1,Link:e=!1,title:o=!1})=>{e||(e=C.N_);const i=(0,b.O)(),{account:n,setAccount:s,setToken:r}=(0,g.F)(),{setLoadingStatus:l}=(0,a.useContext)(u.q),[c,p]=(0,a.useState)(n?.consent>0),[d,m]=(0,a.useState)(n?.consent>1);return a.createElement("div",{className:"tw:w-full mdx"},o?a.createElement("h2",{className:"tw:text-4xl"},"Privacy Matters"):null,tt.intro,a.createElement("h5",{className:"tw:mt-8"},"Do you give your consent to process your account data?"),tt.account,c?a.createElement(Z,{value:c,setter:p,label:"Yes, I do"}):a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-primary tw:daisy-btn-lg tw:w-full tw:mt-4",onClick:()=>p(!c)},"Click here to give your consent"),c?a.createElement(a.Fragment,null,a.createElement("h5",{className:"tw:mt-8"},"Do you give your consent to share your anonymized measurements"),a.createElement(Z,{value:d,setter:m,label:"Share anonymized measurements as open data"}),d?null:a.createElement(T.Y,{note:!0},tt.opendata)):null,!c&&a.createElement(T.Y,{warning:!0},"This consent is required for a FreeSewing account."),c?a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-primary tw:w-full tw:mt-4",onClick:async()=>{let e=0;if(c&&(e=1),c&&d&&(e=2),e>0&&t){l([!0,"Creating your account"]);const[o,a]=await i.confirmSignup({id:t,consent:e});200===o?(l([!0,"Account created",!0,!0]),a?.token&&r(a.token),a?.account&&s(a.account),(0,h.oo)("/welcome")):l([!0,"An error occured, please report this",!0,!0])}else if(e!==n.consent){l([!0,"Updating your account"]);const[t,o]=await i.updateAccount({consent:e});200===t?(l([!0,"Account updated",!0,!0]),s(o.account)):l([!0,"An error occured, please report this",!0,!0])}}},t?"Create Account":"Save"):t?null:a.createElement("button",{className:"tw:daisy-btn tw:mt-4 tw:capitalize tw:w-full tw:daisy-btn-error",onClick:async()=>{l([!0,"One moment please"]);const[t]=await i.removeAccount();200===t?(l([!0,"All done,  farewell",!0,!0]),r(null),s({username:!1})):l([!0,"Something went wrong. Please report this.",!0,!0])}},"Remove your account"),a.createElement("p",{className:"tw:text-center tw:opacity-50 tw:mt-12"},a.createElement(e,{href:"/docs/about/privacy",className:"tw:hover:text-secondary tw:underline"},"FreeSewing Privacy Notice")))},Z=({value:t,setter:e,label:o,children:i=null})=>a.createElement("div",{className:`tw:form-control tw:p-4 tw:hover:cursor-pointer tw:rounded tw:border-l-8 tw:my-2\n    ${t?"tw:border-success tw:bg-success/30":"tw:border-error tw:bg-error/30"}\n    btw:g-opacity-10 tw:shadow`,onClick:()=>e(!t)},a.createElement("div",{className:"tw:form-control tw:flex tw:flex-row tw:items-center tw:gap-2"},a.createElement("input",{type:"checkbox",className:"tw:daisy-checkbox",checked:t?"checked":"",onChange:()=>e(!t)}),a.createElement("span",{className:"tw:label-text"},o)),i),tt={intro:a.createElement(a.Fragment,null,a.createElement("p",null,"FreeSewing respects your privacy and your rights. We adhere to the toughest privacy and security law in the world: the"," ",a.createElement("a",{href:"https://en.wikipedia.org/wiki/General_Data_Protection_Regulation"},"General Data Protection Regulation")," ","(GDPR) of the European Union (EU)."),a.createElement("p",null,"Under the GDPR, processing of your personal data requires granular consent \u2014 in other words,"," ",a.createElement("b",null,"we need your permission for the various ways we handle your data"),".")),account:a.createElement("div",{className:"tw:border-l-4 tw:ml-1 tw:pl-4 tw:my-2 tw:opacity-80"},a.createElement("h6",null,"What is account data?"),a.createElement("p",null,"Your ",a.createElement("b",null,"email address"),", ",a.createElement("b",null,"username"),", and ",a.createElement("b",null,"password"),", and any ",a.createElement("b",null,"measurements")," ","you add to your account."),a.createElement("h6",null,"Why do we need it?"),a.createElement("p",null,"To ",a.createElement("b",null,"authenticate")," you, ",a.createElement("b",null,"contact")," you when needed, and generate ",a.createElement("b",null,"bespoke")," ","sewing patterns."),a.createElement("h6",null,"How long do we keep it?"),a.createElement("p",null,a.createElement("b",null,"12 months")," after the last time your connected to our backend, or until you"," ",a.createElement("b",null,"remove")," your account or ",a.createElement("b",null,"revoke")," this consent."),a.createElement("h6",null,"Do we share it with others?"),a.createElement("p",null,a.createElement("b",null,"No"),", never."),a.createElement("p",{className:"tw:text-sm tw:italic"},"Note: Freesewing publishes anonymized measurements as open data for scientific research. You have the right to object to this.")),opendata:"This data is used to study and understand the human form in all its shapes,\n    so we can get better sewing patterns, and better fitting garments.\n    Even though this data is anonymized, you have the right to object to this."};var et=o(887);const ot=({welcome:t=!1})=>{const{control:e,setControl:o}=(()=>{const t=(0,b.O)(),{account:e,setAccount:o,token:i}=(0,g.F)(),{setLoadingStatus:n}=(0,a.useContext)(u.q),[s,r]=(0,a.useState)(e.control),l=async a=>
1{if(a!==s)if(i){n([!0,"Updating preferences"]);const[e,i]=await t.updateAccount({control:a});200===e?(r(a),o(i.account),n([!0,"Preferences updated",!0,!0])):n([!0,"Failed to update preferences. Please report this",!0,!0])}else o({...e,control:a}),r(a)};return{control:s,setControl:l,updateControl:async t=>(console.warn("The updateControl method is deprecated. Use setControl instead."),l(t))}})(),i=!!t&&(D[e].length>1?"/welcome/"+D[e][1]:"/docs/about/");return a.createElement("div",{className:"tw:w-full"},a.createElement(S.ZB,{id:"account-control",label:"What user experience do you prefer?",list:[1,2,3,4,5].map((t=>({val:t,label:a.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:w-full tw:justify-between"},a.createElement("span",null,m.zM[t].title),a.createElement(et.C,{control:t})),desc:m.zM[t].desc}))),current:e,update:o}),t?a.createElement(a.Fragment,null,a.createElement(L.K,{href:i,className:"tw:mt-4"},a.createElement(v.wF,{stroke:3})," Continue"),D[e].length>1?a.createElement(a.Fragment,null,a.createElement("progress",{className:"tw:daisy-progress tw:daisy-progress-primary tw:w-full tw:mt-12",value:100/D[e].length,max:"100"}),a.createElement("span",{className:"tw:pt-4 tw:text-sm tw:font-bold tw:opacity-50"},"1 / ",D[e].length),a.createElement(j,{done:[],todo:D[e].slice(1),current:""})):null):null)};var at=o(85627);const it=({Link:t=!1})=>{t||(t=C.N_);const{account:e,setAccount:o}=(0,g.F)(),i=(0,b.O)(),{setLoadingStatus:n}=(0,a.useContext)(u.q),[s,r]=(0,a.useState)(e.email),[l,c]=(0,a.useState)(!1),p=(0,h.DT)(s)&&(0,h.Pb)(s)||!1;return a.createElement("div",{className:"tw:w-full"},l?a.createElement(T.Y,{type:"note"},a.createElement("h3",null,"Please confirm this change"),a.createElement("p",null,"We have sent an E-mail to your new address to confirm this change. Please click the link in that message to finalize this change.")):a.createElement(a.Fragment,null,a.createElement(S.j5,{id:"account-email",label:"Email Address",placeholder:"[email protected]",update:r,labelBL:"You will need to confirm that you can receive email at this address",current:s,original:e.email,valid:()=>p}),a.createElement("p",{className:"tw:text-right"},a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-primary tw:w-full tw:lg:w-auto tw:mt-8",onClick:async()=>{n([!0,"Updating email address"]);const[t,e]=await i.updateAccount({email:s});200===t&&"success"===e.result?(o(e.account),c(!0),n([!0,"Email change initiated",!0,!0])):n([!0,"Something went wrong. Please report this",!0,!0])},disabled:!p||s.toLowerCase()===e.email},a.createElement(v.LP,null)," Update Email Address"))))},nt=({onSuccess:t=!1})=>{const[e,o]=(0,a.useState)(!1),[i,n]=(0,a.useState)(),[s,r]=(0,a.useState)(),{setAccount:l}=(0,g.F)(),c=(0,b.O)(),{setLoadingStatus:p}=(0,a.useContext)(u.q);(0,a.useEffect)((()=>{const t=(0,h.ov)("id"),e=(0,h.ov)("check");t!==i&&n(t),e!==s&&r(e)}),[i,s]),(0,a.useEffect)((()=>{i&&d()}),[i]);const d=async()=>{p([!0,"Contacting the backend",!0,!0]);const[t,e]=await c.updateAccount({confirm:"emailchange",confirmation:i,check:s});return 200===t&&"success"===e.result&&e.account?m(e):e.error?o(e.error):o(!0)},m=async e=>{e?.account?(l(e.account),p([!0,"Email change completed",!0,!0]),"function"==typeof t?t(e):(0,h.oo)("/account",!0)):(o(e),p([!0,"Something went wrong. Please report this",!0,!0]))};return e?a.createElement("p",null,"This error is unexpected. Please report this."):i&&s?a.createElement("p",null,"One moment please"):a.createElement(a.Fragment,null,a.createElement("h1",null,"One moment please"),a.createElement(at.y,{className:"tw:w-8 tw:h-8 tw:m-auto tw:animate-spin"}))},st=()=>{const t=(0,b.O)(),{setLoadingStatus:e}=(0,a.useContext)(u.q),[o,i]=(0,a.useState)();return a.createElement("div",{className:"tw:max-w-xl"},o?a.createElement(T.Y,{type:"link"},a.createElement("h5",null,"Your data was exported and is available for download at the following location:"),a.createElement("p",{className:"tw:text-lg"},a.createElement(C.N_,{href:o},o))):null,a.createElement("p",null,"Click below to export your personal FreeSewing data"),a.createElement(L.K,{onClick:async()=>{e([!0,"Contacting backend"]);const[o,a]=await t.exportAccount();200===o?(i(a.data),e([!0,"All done",!0,!0])):e([!0,"Something went wrong, please report this",!0,!1])},title:"Export your data"},a.createElement(v.s3,null),"Export Your Data"))},rt=()=>{const{account:t,setAccount:e}=(0,g.F)(),o=(0,b.O)(),{setLoadingStatus:i}=(0,a.useContext)(u.q),[n,s]=(0,a.useState)(t.data.githubUsername||""),[r,l]=(0,a.useState)(t.data.githubEmail||"");return a.createElement("div",{className:"tw:w-full"},a.createElement(S.YZ,{id:"account-github-email",label:"GitHub Email Address",current:r,update:l,valid:t=>t.length>0,placeholder:"[email protected]"}),a.createElement(S.YZ,{id:"account-github-username",label:"GitHub Username",current:n,update:s,valid:t=>t.length>0,placeholder:"joostdecock"}),a.createElement("p",{className:"tw:text-right"},a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-primary tw:w-full tw:lg:w-auto tw:mt-8",onClick:async()=>{i([!0,"Saving bio"]);const[t,a]=await o.updateAccount({data:{githubUsername:n,githubEmail:r}});200===t&&"success"===a.result?(e(a.account),i([!0,"GitHub info updated",!0,!0])):i([!0,"Something went wrong. Please report this",!0,!0])}},a.createElement(v.LP,null)," Save")))};var lt=o(94744),ct=o(62919);const pt=()=>{const t=(0,b.O)(),{account:e}=(0,g.F)(),{setLoadingStatus:o}=(0,a.useContext)(u.q);return a.createElement("div",{className:"tw:w-full"},a.createElement(S.zp,{label:"Measurements file (YAML / JSON)",update:async a=>{let i;o([!0,"Uploading data"]);try{const n=a.split(",");i=n[0].includes("json")?JSON.parse(atob(n[1])):lt.Ay.parse(atob(n[1])),Array.isArray(i)||(i=[i]);for(const a of i)if(a.measurements||a.measies){const i=a.name||"J. Doe";o([!0,`Importing ${i}`]);const[n]=await t.createSet({name:a.name||"J. Doe",units:a.units||"metric",notes:a.notes||"",measies:a.measurements||a.measies,userId:e.id});o(200===n?[!0,`Imported ${i}`,!0,!0]:[!0,`Import of ${i} failed`,!0,!1])}else o([!0,"Invalid format",!0,!1])}catch(n){console.log(n),o([!0,`Import of ${name||"file"} failed`,!0,!1])}},current:"",id:"file",dropzoneConfig:{accept:{"application/json":[".json"],"application/yaml":[".yaml",".yml"]},maxFiles:1,multiple:!1}}),a.createElement(T.Y,{type:"tip"},a.createElement("p",null,"To import a measurement set, you should have a JSON or YAML file that has the following structure:"),a.createElement(ct.Y,{js:{name:"Joost",units:"metric",notes:"These are my notes",measurements:{biceps:335,wrist:190}},title:"measurements.yaml"}),a.createElement("p",null,"Your file can either contain a single measurements set, or an array/list of multiple measurements sets.")))},dt={instagram:"Instagram",mastodon:"Mastodon",reddit:"Reddit",twitch:"Twitch",tiktok:"TikTok",website:"Website"},ht=()=>a.createElement(wt,{platform:"instagram"}),mt=()=>a.createElement(wt,{platform:"mastodon"}),ft=()=>a.createElement(wt,{platform:"reddit"}),ut=()=>a.createElement(wt,{platform:"twitch"}),gt=()=>a.createElement(wt,{platform:"tiktok"}),bt=()=>a.createElement(wt,{platform:"website"}),wt=({platform:t=!1})=>{const{account:e,setAccount:o}=(0,g.F)(),i=(0,b.O)(),{setLoadingStatus:n}=(0,a.useContext)(u.q),[s,r]=(0,a.useState)(e.data[t]||"");if(!dt||!dt[t])return a.createElement("p",null,"Not a supported platform");return a.createElement("div",{className:"tw:w-full"},a.createElement(S.YZ,{id:`account-${t}`,label:"website"===t?"Website URL":`${dt[t]} account`,current:s,update:r,valid:t=>t.length>0,placeholder:"joostdecock"}),a.createElement("p",{className:"tw:text-right"},a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-primary tw:w-full tw:lg:w-auto tw:mt-8",onClick:async()=>{n([!0,"Saving linked identity"]);const e={data:{}};e.data[t]=s;const[a,r]=await i.updateAccount(e);200===a&&"success"===r.result?(o(r.account),n([!0,`Saved your ${dt[t]} info`,!0,!0])):n([!0,"Something went wrong. Please report this",!0,!0])}},a.createElement(v.LP,null)," Save")))},kt={bookmarks:a.createElement(v.cF,null),sets:a.createElement(v.Ru,null),patterns:a.createElement(v.Yp,null),apikeys:a.createElement(v.RY,null),username:a.createElement(v.ny,null),email:a.createElement(v.aZ,null),bio:a.createElement(v.oy,null),img:a.createElement(v.jp,null),language:a.createElement(v.jp,null),units:a.createElement(v.lQ,null),
1compare:a.createElement(v.HD,null),consent:a.createElement(v.g6,null),control:a.createElement(v.xh,null),mfa:a.createElement(v.lm,null),newsletter:a.createElement(v.H2,null),password:a.createElement(v.XA,null),github:a.createElement(v.Hk,null),instagram:a.createElement(v.oW,null),mastodon:a.createElement(v.zA,null),twitter:a.createElement(v.oW,null),twitch:a.createElement(v.bo,null),tiktok:a.createElement(v.cw,null),website:a.createElement(v.qY,null),reddit:a.createElement(v.G,null)},Ct="tw:daisy-btn tw:capitalize tw:flex tw:flex-row tw:justify-between",vt="tw:flex tw:flex-row tw:items-center tw:justify-between tw:p-2 tw:px-4 tw:rounded tw:mb-1",yt="tw:hover:bg-secondary/10 tw:max-w-md tw:hover:no-underline tw:text-base-content no-hover-decoration",Tt={apikeys:"API Keys",sets:"Measurements Sets",patterns:"Patterns",img:"Avatar",email:"E-mail Address",newsletter:"Newsletter Subscription",compare:"Measurements Comparison",consent:"Consent & Privacy",control:"User Experience",github:"GitHub",mfa:"Multi-Factor Authentication"},xt=({check:t})=>t?a.createElement(v.zB,null):a.createElement(v.Ty,null),Bt=({Link:t=!1})=>{t||(t=C.N_);const{account:e,signOut:o,control:i}=(0,g.F)(),n=(0,b.O)(),[s,r]=(0,a.useState)([]),[l,c]=(0,a.useState)([]),[p,d]=(0,a.useState)([]),[f,u]=(0,a.useState)([]);if((0,a.useEffect)((()=>{(async()=>{const[t,o]=await n.getUserData(e.id);200===t&&"success"===o.result&&(u(o.data.apikeys),r(o.data.bookmarks),d(o.data.patterns),c(o.data.sets))})()}),[e.id]),!e.username)return null;const w={apikeys:f?.length||0,bookmarks:s?.length||0,sets:l?.length||0,patterns:p?.length||0,username:e.username,email:e.email,bio:e.bio?a.createElement("span",null,e.bio.slice(0,15),"\u2026"):"",img:a.createElement("img",{src:(0,h.qk)({type:"sq100",id:`uid-${e.ihash}`}),className:"tw:w-8 tw:h-8 tw:aspect-square tw:rounded-full shadow"}),units:e.imperial?"Imperial":"Metric",newsletter:a.createElement(xt,{check:e.newsletter}),compare:a.createElement(xt,{check:e.compare}),consent:a.createElement(xt,{check:e.consent}),control:a.createElement(et.C,{control:e.control}),github:e.data.githubUsername||e.data.githubEmail||a.createElement(v.xf,null),password:"v3"===e.passwordType?a.createElement(v.zB,null):a.createElement(v.xf,null),mfa:a.createElement(xt,{check:e.mfaEnabled})};for(const h of Object.keys(m.A4.account.fields.identities).filter((t=>"github"!==t)))w[h]=e.data[h]||a.createElement(v.xf,{className:"tw:text-base-content tw:w-6 tw:h-6",stroke:2});return a.createElement("div",{className:"tw:w-full"},a.createElement("div",{className:"tw:grid tw:grid-cols-1 tw:xl:grid-cols-2 tw:gap-4 tw:mb-8"},a.createElement("div",null,a.createElement("h4",{className:"tw:my-2"},"Your Data"),Object.keys(m.A4.account.fields.data).map((e=>m.A4.flat[e]>i?null:a.createElement(t,{key:e,title:Tt[e],href:`/account/data/${e}/`,className:`${vt} ${yt}`},a.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:gap-3 tw:font-medium tw:text-base-content"},kt[e],Tt[e]?Tt[e]:(0,h.ZH)(e)),a.createElement("div",{className:"tw:text-base-content"},w[e]))))),i>1&&a.createElement("div",null,a.createElement("h4",{className:"tw:my-2"},"About You"),Object.keys(m.A4.account.fields.info).map((e=>m.A4.flat[e]>i?null:a.createElement(t,{key:e,title:Tt[e]||(0,h.ZH)(e),href:`/account/about/${"img"===e?"avatar":e}/`,className:`${vt} ${yt}`},a.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:gap-3 tw:font-medium tw:text-base-content"},kt[e],Tt[e]?Tt[e]:(0,h.ZH)(e)),a.createElement("div",{className:"tw:text-base-content"},w[e])))),a.createElement("div",{className:`${vt} tw:opacity-60 tw:max-w-md`},a.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:gap-3 tw:font-medium"},a.createElement(v.aV,{stroke:3}),a.createElement("span",null,"Role")),a.createElement("div",{className:"tw:capitalize"},e.role)),a.createElement("div",{className:`${vt} tw:opacity-60 tw:max-w-md`},a.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:gap-3 tw:font-medium"},a.createElement(v.Ey,null),a.createElement("span",null,"ID")),a.createElement("div",null,e.i
1d))),a.createElement("div",null,a.createElement("h4",{className:"tw:my-2"},"Preferences"),Object.keys(m.A4.account.fields.settings).map((e=>m.A4.flat[e]>i?null:a.createElement(t,{key:e,title:Tt[e]||(0,h.ZH)(e),href:`/account/preferences/${e}/`,className:`${vt} ${yt}`},a.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:gap-3 tw:font-medium tw:text-base-content"},kt[e],Tt[e]?Tt[e]:(0,h.ZH)(e)),a.createElement("div",{className:"tw:text-base-content"},w[e]))))),i>2&&a.createElement("div",null,a.createElement("h4",{className:"tw:my-2"},"Linked Identities"),Object.keys(m.A4.account.fields.identities).map((e=>m.A4.flat[e]>i?null:a.createElement(t,{key:e,title:Tt[e]||(0,h.ZH)(e),href:`/account/social/${e}/`,className:`${vt} ${yt}`},a.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:gap-3 tw:font-medium tw:text-base-content"},kt[e],Tt[e]?Tt[e]:(0,h.ZH)(e)),a.createElement("div",{className:"tw:text-base-content"},w[e]))))),i>1&&a.createElement("div",null,a.createElement("h4",{className:"tw:my-2"},"Security"),Object.keys(m.A4.account.fields.security).map((e=>m.A4.flat[e]>i?null:a.createElement(t,{key:e,title:Tt[e]||(0,h.ZH)(e),href:`/account/security/${e}/`,className:`${vt} ${yt}`},a.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:gap-3 tw:font-medium tw:text-base-content"},kt[e],Tt[e]?Tt[e]:(0,h.ZH)(e)),a.createElement("div",{className:"tw:text-base-content"},w[e]))))),i>1&&a.createElement("div",null,a.createElement("h4",{className:"tw:my-2"},"Actions"),i>2&&a.createElement(t,{className:`${vt} ${yt}`,title:"Import data",href:"/account/actions/import/"},a.createElement(v.JM,{className:"tw:w-6 tw:h-6 tw:text-base-content"}),a.createElement("span",{className:"tw:font-medium tw:text-base-content"},"Import data")),i>2&&a.createElement(t,{className:`${vt} ${yt}`,title:"Export your data",href:"/account/actions/export/"},a.createElement(v.s3,{className:"tw:w-6 tw:h-6 tw:text-base-content"}),a.createElement("span",{className:"tw:font-medium tw:text-base-content"},"Export your data")),i>2&&a.createElement(t,{className:`${vt} ${yt}`,title:"Reload account data",href:"/account/actions/reload/"},a.createElement(v.jf,{className:"tw:w-6 tw:h-6 tw:text-base-content"}),a.createElement("span",{className:"tw:font-medium tw:text-base-content"},"Reload account data")),i>3&&a.createElement(t,{className:`${vt} ${yt}`,title:"Restrict processing of your data",href:"/account/actions/restrict/"},a.createElement(v.US,{className:"tw:w-6 tw:h-6 tw:text-warning",stroke:3}),a.createElement("span",{className:"tw:font-medium tw:text-base-content"},"Restrict processing of your data")),a.createElement(t,{className:`${vt} ${yt}`,title:"Remove your account",href:"/account/actions/remove/"},a.createElement(v.uc,{className:"tw:w-6 tw:h-6 tw:text-warning"}),a.createElement("span",{className:"tw:font-medium tw:text-base-content"},"Remove your account")))),a.createElement("div",{className:"tw:flex tw:flex-row tw:flex-wrap tw:gap-2 tw:md:gap-4 tw:justify-end"},"admin"===e.role&&a.createElement(t,{className:`${Ct} tw:daisy-btn-accent tw:md:w-64 tw:text-accent-content`,href:"/admin"},a.createElement(v.PX,{className:"tw:w-6 tw:h-6 tw:text-accent-content"}),a.createElement("span",{className:"tw:text-accent-content"},"Administration")),i>1&&a.createElement(t,{className:`${Ct} tw:daisy-btn-secondary tw:md:w-64`,href:"/profile"},a.createElement(v.ny,{className:"tw:w-6 tw:h-6 tw:text-accent-content"}),a.createElement("span",{className:"tw:text-accent-content"},"Your Profile")),a.createElement("button",{className:`${Ct} tw:daisy-btn-neutral tw:md:w-64`,onClick:()=>o()},a.createElement(v.p6,null),"Sign Out")))},St=({title:t=!0})=>{const e=(0,b.O)(),{account:o,setAccount:i}=(0,g.F)(),{setLoadingStatus:n}=(0,a.useContext)(u.q),[s,r]=(0,a.useState)(!1),[l,c]=(0,a.useState)(!1),[p,d]=(0,a.useState)(""),[m,f]=(0,a.useState)(""),[w,k]=(0,a.useState)(!1);let C="Mult-Factor Authentication is "+(o.mfaEnabled?"enabled":"disabled");return s&&(C="Set up Multi-Factor Authentication"),a.createElement("div",{className:"tw:w-full"}
1,t?a.createElement("h2",null,C):null,s?a.createElement(a.Fragment,null,a.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:justify-center tw:px-8 tw:lg:px-36"},a.createElement("div",{dangerouslySetInnerHTML:{__html:s.qrcode}})),a.createElement("p",{className:"tw:flex tw:flex-row tw:items-center tw:justify-center"},s.secret),a.createElement(Lt,{num:"1"},"Add FreeSewing to your Authenticator App by scanning the QR code above. If you cannot scan the QR code, you can manually enter the secret below it."),a.createElement(Lt,{num:"2"},"lease enter a code from your Authenticator App to confirm this action"),a.createElement("input",{value:p,onChange:t=>d(t.target.value),className:"tw:daisy-input tw:w-64 tw:m-auto tw:text-4xl tw:daisy-input-bordered tw:daisy-input-lg tw:flex tw:flex-row tw:text-center tw:mb-8 tw:tracking-widest",type:"text",inputMode:"numeric",pattern:"[0-9]{6}",placeholder:"000000"}),a.createElement("button",{className:`${h.f_} tw:daisy-btn tw:daisy-btn-success tw:daisy-btn-lg tw:block tw:w-full tw:md:w-auto tw:mx-auto`,onClick:async()=>{n([!0,"Contacting backend"]);const[t,o]=await e.confirmMfa({mfa:!0,secret:s.secret,token:p});200===t&&"success"===o.result?(i(o.account),k(o.scratchCodes),n([!0,"Settings saved",!0,!0])):n([!0,"An error occured, please repor this",!0,!1]),r(!1),d("")}},a.createElement(v.XA,null),"Enable Multi-Factor Authentication")):null,l?a.createElement("div",{className:"tw:my-8 tw:max-w-xl"},a.createElement(Lt,{num:"1"},a.createElement("h5",null,"Please enter your password to confirm this action"),a.createElement(S.yA,{current:m,update:f,placeholder:"password here",valid:()=>!0})),a.createElement(Lt,{num:"2"},a.createElement("h5",null,"Please enter a code from your Authenticator App to confirm this action"),a.createElement("input",{value:p,onChange:t=>d(t.target.value),className:"tw:input tw:w-full tw:text-4xl tw:input-bordered tw:input-lg tw:flex tw:flex-row tw:text-center tw:mb-8 tw:tracking-widest",type:"text",placeholder:"000000"})),a.createElement("button",{className:`${h.f_} tw:daisy-btn tw:daisy-btn-error tw:daisy-btn-lg`,onClick:async()=>{n([!0,"Contacting backend"]);const[t,o]=await e.disableMfa({mfa:!1,password:m,token:p});200===t&&("success"===o.result?(i(o.account),n([!0,"Settings saved",!0,!0])):n([!0,"An error occured. Please report this.",!0,!1]),c(!1),r(!1),d(""),f(""))},disabled:p.length<4||m.length<3},"Disable Mult-Factor Authentication")):null,w?a.createElement(a.Fragment,null,a.createElement("h3",null,"MFA Scratch Codes"),a.createElement("p",null,"You can use any of these scratch codes as a one-time MFA code when you do not have access to your code-generating app (for example, when you have lost your phone."),a.createElement("p",null,"You can use each of these codes only once. Write them down, because this is the only time you will get to see them."),a.createElement("div",{className:"hljs tw:my-4"},a.createElement("div",{className:"tw:flex tw:flex-row tw:justify-between tw:items-center tw:text-xs tw:font-medium tw:text-warning tw:mt-1 tw:border-b tw:border-neutral-content tw:border-opacity-25 tw:px-4 tw:py-1 tw:mb-2 tw:lg:text-sm"},a.createElement("span",null,"MFA Scratch Codes"),a.createElement(L.T,{content:"FreeSewing MFA Scratch Codes:\n"+w.map((t=>t+"\n")).join("")})),a.createElement("pre",{className:"language-shell hljs tw:text-base tw:lg:text-lg tw:whitespace-break-spaces tw:overflow-scroll tw:pr-4"},w.map((t=>t+"\n"))))):a.createElement("div",{className:"tw:mt-4"},o.mfaEnabled?l?null:a.createElement("button",{className:`${h.f_} tw:daisy-btn tw:daisy-btn-primary tw:w-full tw:md:w-auto tw:daisy-btn-outline`,onClick:()=>c(!0)},a.createElement(v.xf,{stroke:3}),"Disable Mult-Factor Authentication"):s?null:a.createElement("div",null,a.createElement("button",{className:`${h.f_} tw:daisy-btn tw:daisy-btn-primary tw:w-full tw:md:w-auto tw:daisy-btn-lg`,onClick:async()=>{n([!0,"Contacting backend"]);const[t,o]=await e.enableMfa();200===t?(r(o.mfa),n([!0,"Settings saved",!0,!0])):n([!0,"An error occured. Please report this.",!0,!1])}},a.createElement(v.XA,null),"Set up Mult-Factor Authentication"),a.createElement(T.Y,{type:"tip"},a.createElement("h5",null,"Please consider enabling Two-Factor Authentication"),a.createElement("p",null,"We do not enforce a password policy, but we do recommend you enable Multi-Factor Authentication to keep your FreeSewing account safe.")))))},Lt=({num:t,children:e})=>a.createElement("div",{className:"tw:flex tw:flex-row tw:items-start tw:py-4 tw:w-full tw:gap-4"},a.createElement("span",{className:"tw:bg-secondary tw:text-secondary-content tw:rounded-full tw:w-8 tw:h-8 tw:p-1 tw:inline-block tw:text-center tw:font-bold tw:mr-4 tw:shrink-0"},t),a.createElement("div",{className:"tw:text-lg tw:grow"},e));var Pt=o(89575),Rt=o(412),Ft=o(56821),Et=o(68363),Wt=o(18522),Ht=o(30845),At=o(76936),Ot=o(31746),Dt=o(52665);const Nt={en:JSON.parse('{"t":"Bonny","d":"A FreeSewing pattern that draws a body silhouette","p":{},"s":{"validationOk.t":"Validation OK","validationOk.d":"Your measurements don\'t seem to contain any obvious contradictions or problems.","shouldBeLarger-hpsToWaistFront-hpsToBust.t":"Bust below waist","shouldBeLarger-hpsToWaistFront-hpsToBust.d":"The HPS to bust measurement should be smaller than HPS to waist front, since FreeSewing patterns assume that the bust line is higher than the waist line.","shouldBeLarger-hpsToWaistFront-waistToUnderbust.t":"Underbust above HPS","shouldBeLarger-hpsToWaistFront-waistToUnderbust.d":"Waist to underbust must be smaller than HPS to waist front, otherwise the HPS would not be above the underbust line.","shouldBeLarger-hpsToWaistFront-waistToArmpit.t":"Armpit above HPS","shouldBeLarger-hpsToWaistFront-waistToArmpit.d":"Waist to armpit must be smaller than HPS to waist front, otherwise the HPS would not be above the armpit.","shouldBeLarger-hpsToWaistBack-waistToArmpit.t":"Armpit above HPS","shouldBeLarger-hpsToWaistBack-waistToArmpit.d":"Waist to armpit must be smaller than HPS to waist back, otherwise the HPS would not be above the armpit.","shouldBeLarger-shoulderToWrist-shoulderToElbow.t":"Wrist above elbow","shouldBeLarger-shoulderToWrist-shoulderToElbow.d":"Shoulder to wrist should be larger than shoulder to elbow, otherwise the elbow would be farther from the shoulder than the wrist.","shouldBeLarger-waistToFloor-waistToKnee.t":"Knee below floor","shouldBeLarger-waistToFloor-waistToKnee.d":"Waist to knee should be smaller than waist to floor, otherwise the knee would be farther away from the waist than the floor.","shouldBeLarger-waistToKnee-waistToUpperLeg.t":"Upper leg below knee","shouldBeLarger-waistToKnee-waistToUpperLeg.d":"Waist to upper leg should be smaller than waist to knee, otherwise the upper leg would be farther away from the waist than the knee.","shouldBeLarger-waistToUpperLeg-waistToSeat.t":"Seat below upper leg","shouldBeLarger-waistToUpperLeg-waistToSeat.d":"Waist to upper leg should be larger than waist to seat. The seat should be measured around the fullest part of your bum, while the upper leg measurement should be taken around your upper leg, a bit below your crotch. Place your seat measurement around the bum, even if your body is wider around your upper legs.","shouldBeLarger-waistToSeat-waistToHips.t":"Hips below seat","shouldBeLarger-waistToSeat-waistToHips.d":"Waist to seat should be larger than waist to hips as your hips measurement should be taken around the top of your hip bone. FreeSewing designs may not work correctly if your seat measurement is at or above your hips measurement.","shouldBeLarger-waistToFloor-inseam.t"
1:"Crotch above waist","shouldBeLarger-waistToFloor-inseam.d":"The inseam measurement must be smaller than the waist to floor measurement, since the inseam measurement is the distance from the crotch to the floor and the crotch can\'t be at or above the waist.","shouldBeLarger-crossSeam-crossSeamFront.t":"Cross seam front","shouldBeLarger-crossSeam-crossSeamFront.d":"The cross seam front measurement should be the front part of the cross seam measurement and thus must be smaller than the total cross seam measurement.","shouldBeLarger-seat-seatBack.t":"Seat","shouldBeLarger-seat-seatBack.d":"The seat back measurement should be the back part of the seat measurement and thus must be smaller than the total seat measurement.","shouldBeLarger-highBust-highBustFront.t":"High Bust","shouldBeLarger-highBust-highBustFront.d":"The high bust front measurement should be the front part of the high bust measurement and thus must be smaller than the total high bust measurement.","shouldBeLarger-chest-bustFront.t":"Chest","shouldBeLarger-chest-bustFront.d":"The bust front measurement should be the front part of the chest measurement and thus must be smaller than the total chest measurement.","shouldBeLarger-bustFront-bustSpan.t":"Bust span","shouldBeLarger-bustFront-bustSpan.d":"The bust span measurement can\'t be larger than the bust front measurement.","shouldBeLarger-waist-waistBack.t":"Waist circumference","shouldBeLarger-waist-waistBack.d":"The waist back measurement should be the back part of the waist circumference measurement and thus must be smaller than the total waist circumference.","constraint-backChest.t":"Back chest","constraint-backChest.d":"The difference between the chest circumference and bust front, as well as the difference between high bust and high bust front measure both the back half of the ribcage and thus should be (at least approximately) equal.","constraint-waistFront.t":"Front bust measurements","constraint-waistFront.d":"Measuring from the HPS point directly to the waist across your front can\'t be larger than the sum of the individual vertical bust measurements (hps to bust, bustpoint to underbust, waist to underbust). However note that waist to underbust is measured at the side of the body instead of at the front, but usually this doesn\'t make a large difference.","constraint-waistToUpperLeg.t":"Upper leg above crotch","constraint-waistToUpperLeg.d":"The waist-to-upper-leg measurement goes from the waist along the body to a bit below the crotch and the inseam measurement goes vertically from the crotch to the floor. Thus, waist to upper leg should be a bit larger than the difference between waist to floor and the inseam measurement.","constraint-waistBack.t":"Back waist","constraint-waistBack.d":"The waist back measurement is usually not much bigger than half the waist measurement.","constraint-bustFront.t":"Bust front","constraint-bustFront.d":"The bust front measurement is usually a bit larger than half the chest measurement.","constraint-highBustFront.t":"High bust front","constraint-highBustFront.d":"The high bust front measurement is usually roughly half the high bust measurement.","crossseam.t":"Cross seam","crossseam.d":"We could not draw a cross 
1seam curve using your measurements. Double check the inseam measurement and check that waist to seat, waist to upper leg, and the cross seam measurements use the same waist line.","crossseamfront.t":"Cross seam front","crossseamfront.d":"We could not determine the fork position on the crotch line. Double check your cross seam measurements and seat measurements."},"o":{}}')},It=JSON.parse('{"id":"bonny","code":"Jonathan Haas","name":"Bonny","description":"A FreeSewing pattern that turns measurements into a body outline","design":"Jonathan Haas","difficulty":1,"tags":[],"techniques":[],"version":"4.6.0","pkg":"@freesewing/bonny","collection":false}');const Mt={name:"bonny.side",options:{},measurements:["ankle","biceps","bustFront","bustPointToUnderbust","bustSpan","chest","crossSeam","crossSeamFront","crotchDepth","heel","head","highBust","highBustFront","hips","hpsToBust","hpsToWaistBack","hpsToWaistFront","inseam","knee","neck","seat","seatBack","shoulderSlope","shoulderToElbow","shoulderToShoulder","shoulderToWrist","underbust","upperLeg","waist","waistBack","waistToArmpit","waistToFloor","waistToHips","waistToKnee","waistToSeat","waistToUnderbust","waistToUpperLeg","wrist"],draft:function({measurements:t,Point:e,Path:o,points:a,paths:i,complete:n,store:s,utils:r,part:l}){function c(t,e){let a=[new o,new o],i=!0;for(const o of t.ops)i?(a[0].ops.push(o),o.to.sitsOn(e)&&(i=!1,a[1].move(o.to))):a[1].ops.push(o);return i&&(a=t.split(e),null===a[0]&&null===a[1]&&(a[1]=t),null===a[0]&&(a[0]=(new o).move(t.start()).close()),null===a[1]&&(a[1]=(new o).move(t.end()).close())),a}const p=1.6*t.shoulderToShoulder;a.sideFloor=new e(p,0),a.sideAnkle=new e(p,.35*-t.heel),a.sideWaist=new e(p,-t.waistToFloor),a.sideHips=a.sideWaist.shift(-90,t.waistToHips),a.sideSeat=a.sideWaist.shift(-90,t.waistToSeat),a.sideKnee=a.sideWaist.shift(-90,t.waistToKnee),a.sideCrotch=a.sideWaist.shift(-90,t.waistToUpperLeg),a.sideUnderbust=a.sideWaist.shift(90,t.waistToUnderbust);const d=t.bustPointToUnderbust,h=Math.min(d,.3*(t.chest-t.underbust)),m=Math.sqrt(d*d-h*h);a.sideBust1=a.sideUnderbust.shift(90,m),a.sideArmpit=a.sideWaist.shift(90,t.waistToArmpit),a.sideNeck=a.sideWaist.shift(90,.88*t.hpsToWaistBack),a.sideBust2=a.sideNeck.shift(-90,.82*t.hpsToBust),a.sideBust=a.sideBust1.shiftFractionTowards(a.sideBust2,.5),a.sideShoulder=a.sideNeck.shift(-90,Math.sin(t.shoulderSlope/180*Math.PI)*t.shoulderToShoulder/2),a.sideHead=a.sideNeck.shift(90,.43*t.head),a.sideArmStart=a.sideArmpit.shiftFractionTowards(a.sideWaist,.1),a.sideElbow=a.sideShoulder.shift(-90,.95*t.shoulderToElbow),a.sideWrist=a.sideShoulder.shift(-90,.95*t.shoulderToWrist),a.sideFootBottom=a.sideFloor.shift(180,.3*t.heel),a.sideToeBottom=a.sideFloor.shift(180,.5*t.heel),a.sideToeTop=a.sideToeBottom.shift(135,.08*t.heel),a.sideHeelBottom=a.sideFloor.shift(0,.1*t.heel),a.sideHeelBack=a.sideHeelBottom.shift(20,.09*t.heel),a.sideToeGap=a.sideFootBottom.shift(175,.15*t.heel),a.sideHeelFront=a.sideHeelBack.shift(145,.39*t.heel),a.sideFootBottomCp1=a.sideFootBottom.shift(0,.1*t.heel),a.sideFootBottomCp2=a.sideFootBottom.shift(180,.1*t.heel),a.sideToeGapCp1=a.sideToeGap.shift(0,.05*t.heel),a.sideToeGapCp2=a.sideToeGap.shift(180,.03*t.heel),a.sideToeBottomCp1=a.sideToeBottom.shift(0,.03*t.heel),a.sideToeBottomCp2=a.sideToeBottom.shift(180,.05*t.heel),a.sideToeTopCp1=a.sideToeTop.shift(195,.03*t.heel),a.sideToeTopCp2=a.sideToeTop.shift(15,.03*t.heel),a.sideAnkleFront=a.sideAnkle.shift(180,.11*t.ankle),a.sideAnkleBack=a.sideAnkle.shift(0,.26*t.ankle),a.sideHeelFrontCp1=a.sideHeelFront.shift(220,.36*t.ankle),a.sideHeelFrontCp2=a.sideHeelFront.shift(40,.05*t.ankle),a.sideAnkleFrontCp1=a.sideAnkleFront.shift(250,.05*t.ankle),a.sideAnkleFrontCp2=a.sideAnkleFront.shift(70,.2*t.ankle),a.sideAnkleBackCp1=a.sideAnkleBack.shift(85,.2*t.ankle),a.sideAnkleBackCp2=a.sideAnkleBack.shift(-95,.1*t.ankle),a.sideHeelBackCp1=a.sideHeelBack.shift(45,.1*t.ankle),a.sideHeelBackCp2=a.sideHeelBack.shift(225,.05*t.ankle),a.sideCalf=a.sideKnee.shiftFractionTowards(a.sideAnkle,.2).shift(0,.06*a.sideKnee.dy(a.sideAnkle)),a.sideCalfFront=a.sideCalf.shift(180,.17*t.knee),a.sideCalfBack=a.sideCalf.shift(0,.16*t.knee),a.sideKneeFront=a.sideKnee.shift(180,.18*t.knee),a.sideKneeBack=a.sideKnee.shift(0,.16*t.knee),a.sideSeatFront=a.sideSeat.shift(180,.2*(t.seat-t.seatBack)),a.sideSeatBack=a.sideSeat.shift(0,.07*t.seatBack+.1*t.seat),a.sideLegFront=a.sideSeat.shift(180,.18*(t.seat-t.seatBack)),a.sideLegFork=a.sideSeat.shift(195,.19*(t.seat-t.seatBack)),a.sideUpperLegFront=r.beamIntersectsY(a.sideLegFront,a.sideLegFork,a.sideCrotch.y),a.sideUpperLegBack=a.sideUpperLegFront.shift(0,.32*t.upperLeg),a.sideSeatBackCp1=a.sideSeatBack.shift(90,-.4*a.sideSeat.dy(a.sideHips)),a.sideSeatBackCp2=a.sideSeatBack.shift(-90,.4*a.sideSeat.dy(a.sideCrotch)),a.sideUpperLegCp1=a.sideUpperLegBack.shift(60,.07*t.upperLeg),a.sideUpperLegCp2=a.sideUpperLegBack.shift(60,-.07*t.upperLeg);const f=.11*t.waistBack+.1*t.seatBack;
1a.sideHipsBack=a.sideHips.shift(0,f),a.sideHipsFront=a.sideHips.shift(180,.25*t.hips-f),a.sideWaistFront=a.sideWaist.shift(180,.3*(t.waist-t.waistBack)),a.sideWaistBack=a.sideWaist.shift(0,.2*t.waistBack),a.sideUnderbustFront=a.sideUnderbust.shift(180,.13*t.underbust),a.sideUnderbustBack=a.sideUnderbust.shift(0,.11*t.underbust),a.sideNeckFront=a.sideNeck.shift(235,.14*t.neck),a.sideNeckBack=a.sideNeck.shift(-15,.17*t.neck),a.sideUpperNeckFront=a.sideNeck.shift(168,.1*t.head),a.sideChin=a.sideNeck.shift(168,.19*t.head),a.sideUpperChin=a.sideNeck.shift(158,.215*t.head),a.sideLowerLip=a.sideNeck.shift(156,.23*t.head),a.sideMouth=a.sideNeck.shift(150,.22*t.head),a.sideUpperLip=a.sideNeck.shift(151,.25*t.head),a.sideBelowNose=a.sideNeck.shift(145,.26*t.head),a.sideNose=a.sideNeck.shift(143,.29*t.head),a.sideEyeFront=a.sideNeck.shift(130,.305*t.head),a.sideHeadFront=a.sideNeck.shift(126,.345*t.head),a.sideHeadBack=a.sideNeck.shift(58,.29*t.head),a.sideUpperNeckBack=a.sideNeck.shift(53,.16*t.head),a.sideOuterNose=a.sideNeck.shift(143,.27*t.head),a.sideInnerNose=a.sideNeck.shift(142,.258*t.head),a.sideMouthCp1=a.sideNeck.shift(152,.24*t.head),a.sideNoseCp1=a.sideNeck.shift(146,.285*t.head),a.sideNoseCp2=a.sideNoseCp1.shiftFractionTowards(a.sideNose,2),a.sideEyeFrontCp1=a.sideEyeFront.shift(-90,.01*t.head),a.sideEyeFrontCp2=a.sideEyeFront.shift(90,.01*t.head),a.sideEyeBottom=a.sideNeck.shift(130,.283*t.head),a.sideEyeDown=a.sideNeck.shift(129,.29*t.head),a.sideEyeDart=a.sideNeck.shift(126,.29*t.head),a.sideEyeUp=a.sideNeck.shift(127,.305*t.head),a.sideEyeTop=a.sideNeck.shift(126.3,.313*t.head),a.sideEyeCenter=a.sideNeck.shift(127.5,.295*t.head),a.sideEarTop=a.sideNeck.shift(96,.24*t.head),a.sideEarBack=a.sideNeck.shift(86,.2*t.head),a.sideEarBottom=a.sideNeck.shift(96,.155*t.head),a.sideEarTip=a.sideNeck.shift(102,.153*t.head),a.sideOuterEar=a.sideNeck.shift(100,.18*t.head),a.sideInnerEar=a.sideNeck.shift(92,.185*t.head),a.sideEarTopCp2=a.sideEarTop.shift(30,.03*t.head),a.sideEarBackCp1=a.sideEarBack.shift(90,.025*t.head),a.sideEarBackCp2=a.sideEarBack.shift(-90,.02*t.head),a.sideEarBottomCp1=a.sideEarBottom.shift(50,.02*t.head),a.sideEarBottomCp2=a.sideEarBottom.shift(230,.005*t.head),i.sideEye=(new o).move(a.sideEyeTop).line(a.sideEyeUp).line(a.sideEyeDart).line(a.sideEyeDown).line(a.sideEyeBottom).move(a.sideEyeUp).line(a.sideEyeCenter).attr("class","stroke-xl"),i.sideNose=(new o).move(a.sideInnerNose).line(a.sideOuterNose).attr("class","stroke-xl"),i.sideEar=(new o).move(a.sideEarTop).curve(a.sideEarTopCp2,a.sideEarBackCp1,a.sideEarBack).curve(a.sideEarBackCp2,a.sideEarBottomCp1,a.sideEarBottom).curve_(a.sideEarBottomCp2,a.sideEarTip).move(a.sideOuterEar).line(a.sideInnerEar).attr("class","stroke-xl"),a.sideShoulderFront=a.sideNeck.shiftFractionTowards(a.sideBust,.75).shift(150,.18*t.highBustFront),a.sideShoulderBack=a.sideNeck.shiftFractionTowards(a.sideArmpit,.5).shift(0,.266*(t.highBust-t.highBustFront)),a.sideShoulderBackLow=a.sideArmpit.shift(0,.14*(t.chest-t.bustFront)+.13*(t.highBust-t.highBustFront)),a.sideBustBack=r.beamIntersectsY(a.sideShoulderBackLow,a.sideUnderbustBack,a.sideBust.y),a.sideBustFront=a.sideBustBack.shift(180,.24*t.chest),a.sideBustFrontExtension=a.sideUnderbustFront.shiftFractionTowards(a.sideBust,.35).shiftFractionTowards(a.sideBustFront,.18),a.sideBustFrontCp1=a.sideBustFront.shift(-90,.4*t.bustPointToUnderbust),a.sideBustFrontCp2=a.sideBustFront.shift(90,.03*t.bustFront),a.sideUnderbustFrontCp1=a.sideUnderbustFront.shift(-15,.02*t.underbust),a.sideUnderbustFrontCp2=a.sideUnderbustFront.shift(-45,-.005*t.underbust),a.sideBustFrontExtensionCp2=a.sideBustFrontExtension.shift(-100,.02*t.underbust),a.sideBustPointLeft=a.sideBustFront.shiftFractionTowards(a.sideBust,.01),a.sideBustPointRight=a.sideBustFront.shiftFractionTowards(a.sideBust,.08),a.sideBustPointCenter=a.sideBustPointLeft.shiftFractionTowards(a.sideBustPointRight,.5),a.sideBustPointUp=a.sideBustPointCenter.shift(90,.01*t.bustFront),a.sideBustPointDown=a.sideBustPointCenter.shift(-90,.02*t.bustFront),a.sideBustPointUpLeft=new e(a.sideBustPointLeft.x,a.sideBustPointUp.y),a.sideBustPointDownLeft=new e(a.sideBustPointLeft.x,a.sideBustPointDown.y),a.sideBustPointUpRight=new e(a.sideBustPointRight.x,a.sideBustPointUp.y),a.sideBustPointDownRight=new e(a.sideBustPointRight.x,a.sideBustPointDown.y),a.sideShoulderFrontCp1=a.sideShoulderFront.shift(a.sideBustFront.angle(a.sideNeckFront),-.04*t.highBustFront),a.sideShoulderFrontCp2=a.sideShoulderFront.shift(a.sideBustFront.angle(a.sideNeckFront),.14*t.highBustFront),a.sideArmTopFront=a.sideArmStart.shift(135,.18*t.biceps),a.sideUpperArmFront=a.sideArmStart.shift(220,.09*t.biceps),a.sideElbowFront=a.sideElbow.shift(180,.05*t.biceps),a.sideWristFront=a.sideWrist.shift(180,.07*t.wrist),a.sideWristBack=a.sideWrist.shift(0,.24*t.wrist),a.sideElbowBack=a.sideElbow.shift(0,.22*t.biceps),a.sideUpperArmBack=a.sideArmStart.shift(-40,.34*t.biceps),a.sideArmTopBack=a.sideArmStart.shift(27,.31*t.biceps),a.sideArmTopFrontCp2=a.sideArmTopFront.shift(-60,.08*t.biceps),a.sideUpperArmFrontCp1=a.sideUpperArmFront.shift(87,.03*t.biceps),a.sideUpperArmFrontCp2=a.sideUpperArmFront.shift(-93,.2*t.biceps),a.sideElbowFrontCp1=a.sideElbowFront.shift(97,.2*t.biceps),a.sideElbowFrontCp2=a.sideElbowFront.shift(-83,.1*t.biceps),a.sideWristFrontCp1=a.sideWristFront.shift(87,.2*t.wrist),a.sideWristFrontCp2=a.sideWristFront.shift(-93,.05*t.wrist),a.sideWristBackCp1=a.sideWristBack.shift(-95,.05*t.wrist),a.sideWristBackCp2=a.sideWristBack.shift(85,.2*t.wrist),a.sideElbowBackCp1=a.sideElbowBack.shift(-85,.1*t.biceps),a.sideElbowBackCp2=a.sideElbowBack.shift(95,.1*t.biceps),a.sideUpperArmBackCp1=a.sideUpperArmBack.shift(-90,.15*t.biceps),a.sideUpperArmBackCp2=a.sideUpperArmBack.shift(90,.15*t.biceps),a.sideArmTopBackCp1=a.sideArmTopBack.shift(-95,.15*t.biceps),a.sideHeadFrontCp2=a.sideHeadFront.shift(90,.06*t.head),a.sideHeadCp1=a.sideHead.shift(175,.14*t.head),a.sideHeadCp2=a.sideHead.shift(-5,.12*t.head),a.sideHeadBackCp1=a.sideHeadBack.shift(80,.1*t.head),a.sideHeadBackCp2=a.sideHeadBack.shift(-100,.07*t.head),a.sideUpperNeckBackCp1=a.sideUpperNeckBack.shift(80,.03*t.head),a.sideUpperNeckBackCp2=a.sideUpperNeckBack.shift(-100,.05*t.head),a.sideNeckBackCp1=a.sideNeckBack.shift(120,.05*t.head),a.sideNeckBackCp2=a.sideNeckBack.shift(-60,.05*t.head),a.sideShoulderBackCp1=a.sideShoulderBack.shift(100,.04*t.highBust),a.sideShoulderBackCp2=a.sideShoulderBack.shift(-80,.04*t.highBust),a.sideShoulderBackLowCp1=a.sideShoulderBackLow.shift(80,.02*t.highBust),a.sideShoulderBackLowCp2=a.sideShoulderBackLow.shift(-100,.01*t.highBust),a.sideChinCp1=a.sideChin.shift(-40,.02*t.head),a.sideChinCp2=a.sideChin.shift(140,.02*t.head),a.sideUpperChinCp1=a.sideUpperChin.shift(-60,.01*t.head),a.sideUpperChinCp2=a.sideUpperChin.shift(120,.01*t.head),a.sideUpperNeckFrontCp1=a.sideUpperNeckFront.shift(-40,.02*t.head),a.sideUpperNeckFrontCp2=a.sideUpperNeckFront.shift(140,.02*t.head),a.sideShoulderCp1=a.sideNeckFront.shift(-80,.03*t.head),a.sideShoulderCp2=a.sideNeckFront.shift(100,.03*t.head),a.sideUpperLegFrontCp1=a.sideLegFork.shiftFractionTowards(a.sideUpperLegFront,2.4),a.sideKneeFrontCp1=a.sideKneeFront.shift(-80,.1*t.knee),a.sideKneeFrontCp2=a.sideKneeFront.shift(100,.5*t.knee),a.sideCalfFrontCp1=a.sideCalfFront.shift(-85,.1*t.knee),a.sideCalfFrontCp2=a.sideCalfFront.shift(95,.1*t.knee),a.sideKneeBackCp1=a.sideKneeBack.shift(95,.1*t.knee),a.sideKneeBackCp2=a.sideKneeBack.shift(-85,.05*t.knee),a.sideCalfBackCp1=a.sideCalfBack.shift(105,.1*t.knee),a.sideCalfBackCp2=a.sideCalfBack.shift(-75,.2*t.knee),a.sideSeatFrontCp1=a.sideSeatFront.shift(a.sideLegFront.angle(a.sideHips
1Front),-.01*t.seat),a.sideSeatFrontCp2=a.sideSeatFront.shift(a.sideLegFront.angle(a.sideHipsFront),.05*t.seat),a.sideHipsFrontCp1=a.sideHipsFront.shift(a.sideSeatFront.angle(a.sideWaistFront),-.06*t.hips),a.sideHipsFrontCp2=a.sideHipsFront.shift(a.sideSeatFront.angle(a.sideWaistFront),.06*t.hips),a.sideWaistFrontCp1=a.sideWaistFront.shift(a.sideHipsFront.angle(a.sideUnderbustFront)+5,-.05*t.waist),a.sideWaistFrontCp2=a.sideWaistFront.shift(a.sideHipsFront.angle(a.sideUnderbustFront)+5,.05*t.waist),a.sideUnderbustBackCp1=a.sideUnderbustBack.shift(a.sideShoulderBackLow.angle(a.sideWaistBack),-.03*t.underbust),a.sideUnderbustBackCp2=a.sideUnderbustBack.shift(a.sideShoulderBackLow.angle(a.sideWaistBack),.03*t.underbust),a.sideWaistBackCp1=a.sideWaistBack.shift(a.sideUnderbustBack.angle(a.sideHipsBack),-.03*t.waist),a.sideWaistBackCp2=a.sideWaistBack.shift(a.sideUnderbustBack.angle(a.sideHipsBack),.03*t.waist),a.sideHipsBackCp1=a.sideHipsBack.shift(a.sideWaistBack.angle(a.sideSeatBack),-.05*t.hips),a.sideHipsBackCp2=a.sideHipsBack.shift(a.sideWaistBack.angle(a.sideSeatBack),.05*t.hips),a.sideLegForkCp1=a.sideLegFork.shift(a.sideCrotch.angle(a.sideSeat)+20,.01*t.crossSeam),a.sideHipsBackCp3=a.sideHipsBack.shiftFractionTowards(a.sideHipsBackCp2,.8),a.sideHandA=a.sideWrist.shift(223,.4*t.wrist),a.sideHandB=a.sideWrist.shift(226,.5*t.wrist),a.sideHandC=a.sideWrist.shift(228,.63*t.wrist),a.sideHandD=a.sideWrist.shift(233,.8*t.wrist),a.sideHandE=a.sideWrist.shift(243,.52*t.wrist),a.sideHandF=a.sideWrist.shift(253,.7*t.wrist),a.sideHandG=a.sideWrist.shift(259,1.17*t.wrist),a.sideHandH=a.sideWrist.shift(263,.73*t.wrist),a.sideHandI=a.sideWrist.shift(268,1.23*t.wrist),a.sideHandJ=a.sideWrist.shift(272.5,.73*t.wrist),a.sideHandK=a.sideWrist.shift(275,1.18*t.wrist),a.sideHandL=a.sideWrist.shift(282,.7*t.wrist),a.sideHandM=a.sideWrist.shift(283,1.01*t.wrist),a.sideHandN=a.sideWrist.shift(291,.7*t.wrist),a.sideHandO=a.sideWrist.shift(314,.4*t.wrist),a.sideHandACp1=a.sideHandA.shift(50,.05*t.wrist),a.sideHandACp2=a.sideHandA.shift(50,-.05*t.wrist),a.sideHandBCp1=a.sideHandB.shift(50,.05*t.wrist),a.sideHandBCp2=a.sideHandB.shift(50,-.05*t.wrist),a.sideHandCCp1=a.sideHandC.shift(50,.05*t.wrist),a.sideHandCCp2=a.sideHandC.shift(50,-.05*t.wrist),a.sideHandDCp1=a.sideHandD.shift(65,.05*t.wrist),a.sideHandDCp2=a.sideHandD.shift(-15,.1*t.wrist),a.sideHandECp1=a.sideHandE.shift(150,.05*t.wrist),a.sideHandECp2=a.sideHandE.shift(150,-.05*t.wrist),a.sideHandFCp1=a.sideHandF.shift(79,.05*t.wrist),a.sideHandFCp2=a.sideHandF.shift(79,-.45*t.wrist),a.sideHandGCp1=a.sideHandG.shift(-10,-.05*t.wrist),a.sideHandGCp2=a.sideHandG.shift(-10,.05*t.wrist),a.sideHandHCp1=a.sideHandH.shift(-103,.35*t.wrist),a.sideHandHCp2=a.sideHandH.shift(-92,.48*t.wrist),a.sideHandICp1=a.sideHandI.shift(-5,-.05*t.wrist),a.sideHandICp2=a.sideHandI.shift(-5,.05*t.wrist),a.sideHandJCp1=a.sideHandJ.shift(-95,.45*t.wrist),a.sideHandJCp2=a.sideHandJ.shift(-87,.4*t.wrist),a.sideHandKCp1=a.sideHandK.shift(0,-.05*t.wrist),a.sideHandKCp2=a.sideHandK.shift(0,.05*t.wrist),a.sideHandLCp1=a.sideHandL.shift(-90,.43*t.wrist),a.sideHandLCp2=a.sideHandL.shift(-80,.25*t.wrist),a.sideHandMCp1=a.sideHandM.shift(5,-.05*t.wrist),a.sideHandMCp2=a.sideHandM.shift(5,.05*t.wrist),a.sideHandNCp1=a.sideHandN.shift(-85,.29*t.wrist),a.sideHandNCp2=a.sideHandN.shift(-85,-.1*t.wrist),a.sideHandOCp1=a.sideHandO.shift(-90,.1*t.wrist),a.sideHandOCp2=a.sideHandO.shift(-90,-.1*t.wrist),i.sideOutline=(new o).move(a.sideHeelBottom).line(a.sideFootBottom).curve(a.sideFootBottomCp2,a.sideToeGapCp1,a.sideToeGap).curve(a.sideToeGapCp2,a.sideToeBottomCp1,a.sideToeBottom).curve(a.sideToeBottomCp2,a.sideToeTopCp1,a.sideToeTop).curve(a.sideToeTopCp2,a.sideHeelFrontCp1,a.sideHeelFront).curve(a.sideHeelFrontCp2,a.sideAnkleFrontCp1,a.sideAnkleFront).curve(a.sideAnkleFrontCp2,a.sideCalfFrontCp1,a.sideCalfFront).curve(a.sideCalfFrontCp2,a.sideKneeFrontCp1,a.sideKneeFront).curve(a.sideKneeFrontCp2,a.sideUpperLegFrontCp1,a.sideUpperLegFront).line(a.sideLegFork).line(a.sideLegFront).move(a.sideLegFork).curve(a.sideLegForkCp1,a.sideSeatFrontCp1,a.sideSeatFront).curve(a.sideSeatFrontCp2,a.sideHips
1FrontCp1,a.sideHipsFront).curve(a.sideHipsFrontCp2,a.sideWaistFrontCp1,a.sideWaistFront).curve_(a.sideWaistFrontCp2,a.sideUnderbustFront),a.sideBustFront.dx(a.sideUnderbustFront)>.5*a.sideUnderbustFront.dx(a.sideBustFrontExtension)&&(s.showBust=1,i.sideOutline.move(a.sideBustFrontExtension).curve(a.sideBustFrontExtensionCp2,a.sideUnderbustFrontCp1,a.sideUnderbustFront)),i.sideOutline.curve(a.sideUnderbustFrontCp2,a.sideBustFrontCp1,a.sideBustFront).curve(a.sideBustFrontCp2,a.sideShoulderFrontCp1,a.sideShoulderFront).curve(a.sideShoulderFrontCp2,a.sideShoulderCp1,a.sideNeckFront).curve(a.sideShoulderCp2,a.sideUpperNeckFrontCp1,a.sideUpperNeckFront).curve(a.sideUpperNeckFrontCp2,a.sideChinCp1,a.sideChin).curve(a.sideChinCp2,a.sideUpperChinCp1,a.sideUpperChin).curve_(a.sideUpperChinCp2,a.sideLowerLip)._curve(a.sideMouthCp1,a.sideMouth)._curve(a.sideMouthCp1,a.sideUpperLip).line(a.sideBelowNose)._curve(a.sideNoseCp1,a.sideNose).curve(a.sideNoseCp2,a.sideEyeFrontCp1,a.sideEyeFront).curve_(a.sideEyeFrontCp2,a.sideHeadFront).curve(a.sideHeadFrontCp2,a.sideHeadCp1,a.sideHead).curve(a.sideHeadCp2,a.sideHeadBackCp1,a.sideHeadBack).curve(a.sideHeadBackCp2,a.sideUpperNeckBackCp1,a.sideUpperNeckBack).curve(a.sideUpperNeckBackCp2,a.sideNeckBackCp1,a.sideNeckBack).curve(a.sideNeckBackCp2,a.sideShoulderBackCp1,a.sideShoulderBack).curve(a.sideShoulderBackCp2,a.sideShoulderBackLowCp1,a.sideShoulderBackLow).curve(a.sideShoulderBackLowCp2,a.sideUnderbustBackCp1,a.sideUnderbustBack).curve(a.sideUnderbustBackCp2,a.sideWaistBackCp1,a.sideWaistBack).curve(a.sideWaistBackCp2,a.sideHipsBackCp1,a.sideHipsBack).curve(a.sideHipsBackCp2,a.sideSeatBackCp1,a.sideSeatBack).curve(a.sideSeatBackCp2,a.sideUpperLegCp1,a.sideUpperLegBack).curve(a.sideUpperLegCp2,a.sideKneeBackCp1,a.sideKneeBack).curve(a.sideKneeBackCp2,a.sideCalfBackCp1,a.sideCalfBack).curve(a.sideCalfBackCp2,a.sideAnkleBackCp1,a.sideAnkleBack).curve(a.sideAnkleBackCp2,a.sideHeelBackCp1,a.sideHeelBack).curve_(a.sideHeelBackCp2,a.sideHeelBottom).attr("class","stroke-xl"),i.sideArm=(new o).move(a.sideArmTopFront).curve(a.sideArmTopFrontCp2,a.sideUpperArmFrontCp1,a.sideUpperArmFront).curve(a.sideUpperArmFrontCp2,a.sideElbowFrontCp1,a.sideElbowFront).curve(a.sideElbowFrontCp2,a.sideWristFrontCp1,a.sideWristFront).curve(a.sideWristFrontCp2,a.sideHandACp1,a.sideHandA).curve(a.sideHandACp2,a.sideHandBCp1,a.sideHandB).curve(a.sideHandBCp2,a.sideHandCCp1,a.sideHandC).curve(a.sideHandCCp2,a.sideHandDCp1,a.sideHandD).curve(a.sideHandDCp2,a.sideHandECp1,a.sideHandE).curve(a.sideHandECp2,a.sideHandFCp1,a.sideHandF).curve(a.sideHandFCp2,a.sideHandGCp1,a.sideHandG).curve(a.sideHandGCp2,a.sideHandHCp1,a.sideHandH).curve(a.sideHandHCp2,a.sideHandICp1,a.sideHandI).curve(a.sideHandICp2,a.sideHandJCp1,a.sideHandJ).curve(a.sideHandJCp2,a.sideHandKCp1,a.sideHandK).curve(a.sideHandKCp2,a.sideHandLCp1,a.sideHandL).curve(a.sideHandLCp2,a.sideHandMCp1,a.sideHandM).curve(a.sideHandMCp2,a.sideHandNCp1,a.sideHandN).curve(a.sideHandNCp2,a.sideHandOCp1,a.sideHandO).curve(a.sideHandOCp2,a.sideWristBackCp1,a.sideWristBack).curve(a.sideWristBackCp2,a.sideElbowBackCp1,a.sideElbowBack).curve(a.sideElbowBackCp2,a.sideUpperArmBackCp1,a.sideUpperArmBack).curve(a.sideUpperArmBackCp2,a.sideArmTopBackCp1,a.sideArmTopBack).attr("class","stroke-xl"),i.sideBustPoint=(new o).move(a.sideBustPointUp).curve(a.sideBustPointUpLeft,a.sideBustPointDownLeft,a.sideBustPointDown).curve(a.sideBustPointDownRight,a.sideBustPointUpRight,a.sideBustPointUp).close().attr("class","stroke-xl");let u=.9,g=.7;for(let k=0;k<10;k++){let e=(g+u)/2;a.sideLegForkCp2=a.sideLegFork.shift(a.sideCrotch.angle(a.sideSeat)+20,-.06*t.crossSeam*e),a.sideCrotchMain=a.sideFloor.shift(90,t.inseam),a.sideCrotchMainCp1=a.sideCrotchMain.shift(170,.04*t.crossSeam),a.sideCrotchMainCp2=a.sideCrotchMain.shift(-10,.1*t.crossSeam*e),a.sideBackCrotch=a.sideSeat.shiftFractionTowards(a.sideSeatBack,e),a.sideBackCrotchCp1=a.sideBackCrotch.shift(-100,.5*a.sideSeat.dy(a.sideCrotch)*e),a.sideBackCrotchCp2=a.sideBackCrotch.shift(80,.5*a.sideSeat.dy(a.sideCrotch)*e),i.sideFullCrossSeam=(new o).move(a.sideWaistFront).curve(a.sideWaistFrontCp1,a.sideHips
1FrontCp2,a.sideHipsFront).curve(a.sideHipsFrontCp1,a.sideSeatFrontCp2,a.sideSeatFront).curve(a.sideSeatFrontCp1,a.sideLegForkCp1,a.sideLegFork).curve(a.sideLegForkCp2,a.sideCrotchMainCp1,a.sideCrotchMain).curve(a.sideCrotchMainCp2,a.sideBackCrotchCp1,a.sideBackCrotch).curve(a.sideBackCrotchCp2,a.sideHipsBackCp3,a.sideHipsBack).curve(a.sideHipsBackCp1,a.sideWaistBackCp2,a.sideWaistBack).hide();const n=i.sideFullCrossSeam.length();s.log.debug("crossseam length actual: "+n+" expected: "+t.crossSeam+" factor: "+e),n>t.crossSeam?u=e:g=e}a.sideCrossSeamFrontSplit=i.sideFullCrossSeam.shiftAlong(t.crossSeamFront);let b=c(i.sideFullCrossSeam,a.sideLegFork)[1];b=c(b,a.sideHipsBack)[0];const w=c(b,a.sideCrossSeamFrontSplit);return i.sideCrossSeamFront=w[0].attr("class","stroke-xl stroke-mark").hide(),i.sideCrossSeamBack=w[1].attr("class","stroke-xl stroke-various").hide(),n&&(i.sideCrossSeamFront.unhide(),i.sideCrossSeamBack.unhide()),l.hide()}},_t=[["hpsToWaistFront","hpsToBust"],["hpsToWaistFront","waistToUnderbust"],["hpsToWaistFront","waistToArmpit"],["hpsToWaistBack","waistToArmpit"],["shoulderToWrist","shoulderToElbow"],["waistToFloor","waistToKnee","waistToUpperLeg","waistToSeat","waistToHips"],["waistToFloor","inseam"],["crossSeam","crossSeamFront"],["seat","seatBack"],["highBust","highBustFront"],["chest","bustFront","bustSpan"],["waist","waistBack"]],jt=[{lhs:[{m:"highBust",coefficient:1},{m:"highBustFront",coefficient:-1}],rhs:[{m:"chest",coefficient:1},{m:"bustFront",coefficient:-1}],tolerance:.05,key:"backChest"},{lhs:[{m:"hpsToWaistFront",coefficient:1}],rhs:[{m:"hpsToBust",coefficient:1},{m:"bustPointToUnderbust",coefficient:1},{m:"waistToUnderbust",coefficient:1}],lhsMustBeSmaller:!0,tolerance:.1,key:"waistFront"},{lhs:[{m:"waistToFloor",coefficient:1}],rhs:[{m:"waistToUpperLeg",coefficient:1},{m:"inseam",coefficient:1}],tolerance:0,lhsMustBeSmaller:!0,key:"waistToUpperLeg"},{lhs:[{m:"waistBack",coefficient:2}],rhs:[{m:"waist",coefficient:1}],lhsMustBeSmaller:!0,tolerance:.1,key:"waistBack"},{lhs:[{m:"chest",coefficient:1}],rhs:[{m:"bustFront",coefficient:2}],tolerance:.2,lhsMustBeSmaller:!0,key:"bustFront"},{lhs:[{m:"highBust",coefficient:1}],rhs:[{m:"highBustFront",coefficient:2}],tolerance:.2,key:"highBustFront"}];function Gt(t,e,o){let a=null,i=null;for(const n of t){let t=o[n];null!==t&&(null!==a&&t>=a?e.push(`shouldBeLarger-${i}-${n}`):(a=t,i=n))}}function Ut(t,e,o){let a=Yt(t.lhs,o),i=Yt(t.rhs,o);if(!1===a||!1===i)return;Math.abs((a-i)/(a+i)*2)<=t.tolerance||(t.lhsMustBeSmaller?a>i&&e.push(`constraint-${t.key}`):e.push(`constraint-${t.key}`))}function Yt(t,e){let o=0;for(const a of t){if(!e[a.m])return!1;o+=a.coefficient*e[a.m]}return o}const $t={name:"bonny.front",from:Mt,options:{},measurements:["ankle","biceps","bustFront","bustPointToUnderbust","bustSpan","chest","crossSeam","crossSeamFront","crotchDepth","heel","head","highBust","highBustFront","hips","hpsToBust","hpsToWaistBack","hpsToWaistFront","inseam","knee","neck","seat","seatBack","shoulderSlope","shoulderToElbow","shoulderToShoulder","shoulderToWrist","underbust","upperLeg","waist","waistBack","waistToArmpit","waistToFloor","waistToHips","waistToKnee","waistToSeat","waistToUnderbust","waistToUpperLeg","wrist"],draft:function({measurements:t,Point:e,Path:o,points:a,paths:i,macro:n,utils:s,store:r,part:l}){a.floor=new e(0,0),a.ankle=new e(0,.35*-t.heel),a.waist=new e(0,-t.waistToFloor),a.hips=a.waist.shift(-90,t.waistToHips),a.seat=a.waist.shift(-90,t.waistToSeat),a.knee=a.waist.shift(-90,t.waistToKnee),a.crotch=a.waist.shift(-90,t.waistToUpperLeg),a.underbust=a.waist.shift(90,t.waistToUnderbust);const c=t.bustPointToUnderbust,p=Math.min(c,.3*(t.chest-t.underbust)),d=Math.sqrt(c*c-p*p);a.bust1=a.underbust.shift(90,d),a.armpit=a.waist.shift(90,t.waistToArmpit),a.neck=a.waist.shift(90,.88*t.hpsToWaistBack),a.bust2=a.neck.shift(-90,.82*t.hpsToBust),a.bust=a.bust1.shiftFractionTowards(a.bust2,.5),a.shoulder=a.neck.shift(-90,Math.sin(t.shoulderSlope/180*Math.PI)*t.shoulderToShoulder/2),a.head=a.neck.shift(90,.43*t.head),a.armpitCrease=a.armpit.shiftFractionTowards(a.shoulder,.1),a.elbow=a.shoulder.shift(-90,.95*t.shoulderToElbow),a.wrist=a.shoulder.shift(-90,.95*t.shoulderToWrist),a.outerShoulder=a.shoulder.shift(180,.44*t.shoulderToShoulder),a.outerShoulderLower=a.shoulder.shiftFractionTowards(a.armpit,.2).shift(180,.51*t.shoulderToShoulder),a.crotchMain=a.floor.shift(90,t.inseam),a.crotchMainCp2=a.crotchMain.shift(180,.005*t.seat),a.crotchCurve=a.crotchMain.shift(147,.023*t.seat),a.crotchCurveCp1=a.crotchMain.shift(180,.01*t.seat),a.innerCrotch=a.crotch.shift(180,.06*Math.max(.03*t.seat,t.seat-1.4*t.upperLeg)),a.crotchCp1=a.innerCrotch.shift(86,.01*t.seat),a.crotchCp2=a.innerCrotch.shift(-94,.6*a.crotch.dy(a.knee)),a.outerUpperLeg=new e(-.094*(t.seat+1.7*t.upperLeg),a.innerCrotch.y),a.footMain=a.floor.shift(180,.11*t.hips),a.ankleMain=a.ankle.shift(180,.11*t.hips),a.kneeMain=a.knee.shift(180,.12*t.hips),a.upperLegMain=a.crotch.shift(180,.17*t.upperLeg),a.shoulderMain=a.shoulder.shift(180,.4*t.shoulderToShoulder),a.elbowMain=s.beamIntersectsY(a.shoulderMain,a.shoulderMain.shift(258.5,10),a.elbow.y),a.wristMain=s.beamIntersectsY(a.shoulderMain,a.shoulderMain.shift(256.4,10),a.wrist.y),a.innerKnee=a.kneeMain.shift(0,.17*t.knee),a.outerKnee=a.kneeMain.shift(180,.15*t.knee),a.calf=a.kneeMain.shiftFractionTowards(a.ankleMain,.2).shift(180,.01*a.knee.dy(a.ankle)),a.outerCalf=a.calf.shift(180,.17*t.knee),a.innerCalf=a.calf.shift(0,.15*t.knee),a.innerAnkle=a.ankleMain.shift(0,.13*t.ankle),a.outerAnkle=a.ankleMain.shift(180,.13*t.ankle),a.innerFoot=a.footMain.shift(0,.13*t.heel),a.outerFoot=a.footMain.shift(180,.08*t.heel),a.innerSideFoot=a.footMain.shift(18,.175*t.heel),a.outerSideFoot=a.footMain.shift(163,.138*t.heel),a.innerSideFootCp1=a.innerSideFoot.shift(90,.05*t.heel),a.innerSideFootCp2=a.innerSideFoot.shift(-90,.03*t.heel),a.outerSideFootCp1=a.outerSideFoot.shift(-90,.03*t.heel),a.outerSideFootCp2=a.outerSideFoot.shift(90,.05*t.heel),a.innerFootCp1=a.innerFoot.shift(0,.02*t.heel),a.outerFootCp2=a.outerFoot.shift(180,.02*t.heel),a.outerSeat=a.seat.shift(180,.18*t.seat),a.outerHips=a.hips.shift(180,.18*t.hips),a.outerWaist=a.waist.shift(180,.18*t.waist),a.outerUnderbust=a.underbust.shift(180,.175*t.underbust),a.outerBust=a.bust.shift(180,.36*(t.highBust-t.highBustFront)),a.outerArmpit=a.armpitCrease.shift(180,.36*t.shoulderToShoulder),a.innerElbow=a.elbowMain.shift(-20,.12*t.biceps),a.outerElbow=a.elbowMain.shift(160,.15*t.biceps),a.innerWrist=a.wristMain.shift(-20,.1*t.wrist),a.outerWrist=a.wristMain.shift(160,.15*t.wrist),a.outerArm=a.outerShoulderLower.shift(-104,.29*t.biceps),a.outerNeck=a.neck.shift(180,.15*t.neck),a.outerUpperNeck=a.neck.shift(138,.13*t.head),a.chin=a.neck.shift(140,.105*t.head),a.outerUpperLegCp1=a.outerUpperLeg.shift(-90,.5*(t.waistToKnee-t.waistToUpperLeg)),a.outerUpperLegCp2=a.outerUpperLeg.shift(90,.3*(t.waistToUpperLeg-t.waistToSeat));let h=t.waistToFloor-t.waistToKnee,m=-a.ankleMain.y;a.innerKneeCp1=a.innerKnee.shift(82,.06*h),a.innerKneeCp2=a.innerKnee.shift(-98,.06*h),a.innerCalfCp1=a.innerCalf.shift(95,.05*h),a.innerCalfCp2=a.innerCalf.shift(-85,.3*h),a.innerAnkleCp1=a.innerAnkle.shift(95,.9*m),a.innerAnkleCp2=a.innerAnkle.shift(-85,.7*m),a.outerKneeCp1=a.outerKnee.shift(-90,.06*h),a.outerKneeCp2=a.outerKnee.shift(90,.2*h),a.outerAnkleCp1=a.outerAnkle.shift(-83,.7*m),a.outerAnkleCp2=a.outerAnkle.shift(97,.7*m),a.outerCalfCp1=a.outerCalf.shift(-95,.22*h),a.outerCalfCp2=a.outerCalf.shift(85,.07*h),a.outerSeatCp1=a.outerSeat.shift(a.outerHips.angle(a.outerUpperLeg),.03*t.seat),a.outerSeatCp2=a.outerSeat.shift(a.outerHips.angle(a.outerUpperLeg),-.06*t.seat),a.outerHipsCp1=a.outerHips.shift(a.outerWaist.angle(a.outerSeat),.05*t.hips),a.outerHipsCp2=a.outerHips.shift(a.outerWaist.angle(a.outerSeat),-.05*t.hips),a.outerWaistCp1=a.outerWaist.shift(a.outerUnderbust.angle(a.outerHips),.05*t.waist),a.outerWaistCp2=a.outerWaist.shift(a.outerUnderbust.angle(a.outerHips),-.05*t.waist),a.outerUnderbustCp1=a.outerUnderbust.shift(a.outerBust.angle(a.outerWaist),.07*t.underbust),a.outerUnderbustCp2=a.outerUnderbust.shift(a.outerBust.angle(a.outerWaist),-.02*t.underbust),a.outerBustCp1=a.outerBust.shift(a.outerBust.angle(a.outerWaist),.02*t.highBust),a.outerBustCp2=a.outerBust.shift(a.outerBust.angle(a.outerWaist),-.02*t.highBust),a.outerBustCp3=a.outerBust.shift(-110,.15*t.biceps),a.innerElbowCp1=a.innerElbow.shift(70,.05*t.biceps),a.innerElbowCp2=a.innerElbow.shift(-97,.25*t.biceps),a.innerWristCp1=a.innerWrist.shift(70,.25*t.wrist),a.innerWristCp2=a.innerWrist.shift(-110,.1*t.wrist),a.outerWristCp1=a.outerWrist.shift(-97,.05*t.wrist),a.outerWristCp2=a.outerWrist.shift(83,.9*t.wrist),a.outerElbowCp1=a.outerElbow.shift(-107,.25*t.biceps),a.outerElbowCp2=a.outerElbow.shift(73,.3*t.biceps),a.outerArmCp1=a.outerArm.shift(-97,.25*t.biceps),a.outerArmCp2=a.outerArm.shift(83,.2*t.biceps),a.outerShoulderLowerCp1=a.outerShoulderLower.shift(a.outerArm.angle(a.outerShoulder)-10,-.05*t.biceps),a.outerShoulderLowerCp2=a.outerShoulderLower.shift(a.outerArm.angle(a.outerShoulder)-10,.25*t.biceps),a.outerNeckCp1=a.outerNeck.shift(a.outerShoulder.angle(a.outerUpperNeck)+15,-.09*t.neck),a.outerNeckCp2=a.outerNeck.shift(a.outerShoulder.angle(a.outerUpperNeck)+15,.05*t.neck),a.bustPointCenter=a.bust.shift(180,.5*t.bustSpan),a.bustPointOuter=a.bustPointCenter.shift(180,.016*t.bustFront),a.underBustLine=a.underbust.shift(180,.5*t.bustSpan),a.underBustLineOuter=a.underBustLine.shift(160,.08*t.bustSpan),a.underBustLineInner=a.underBustLine.shift(23,.28*t.bustSpan),a.underBustLineCp1=a.underBustLine.shift(170,.05*t.bustSpan),a.underBustLineCp2=a.underBustLine.shift(-10,.17*t.bustSpan),a.belowEar=a.neck.shift(130,.18*t.head),a.earBottom=a.neck.shift(131,.2*t.head),a.earLeftLow=a.neck.shift(131,.225*t.head),a.earLeftHigh=a.neck.shift(125,.27*t.head),a.earTop=a.neck.shift(120.5,.28*t.head),a.aboveEar=a.neck.shift(117,.29*t.head),a.belowEarCp1=a.belowEar.shift(-75,.01*t.head),a.belowEarCp2=a.belowEar.shift(-75,-.01*t.head),a.earBottomCp1=a.earBottom.shift(-5,.01*t.head),a.earBottomCp2=a.earBottom.shift(-5,-.01*t.head),a.earLeftLowCp1=a.earLeftLow.shift(-75,.01*t.head),a.earLeftLowCp2=a.earLeftLow.shift(-75,-.01*t.head),a.earLeftHighCp1=a.earLeftHigh.shift(-85,.01*t.head),a.earLeftHighCp2=a.earLeftHigh.shift(-85,-.01*t.head),a.earTopCp1=a.earTop.shift(160,.01*t.head),a.earTopCp2=a.earTop.shift(160,-.01*t.head),a.aboveEarCp1=a.aboveEar.shift(-90,.01*t.head),a.aboveEarCp2=a.aboveEar.shift(-90,-.1*t.head),a.headCp1=a.head.shift(180,.1*t.head),a.upperEye=a.neck.shift(102.5,.25*t.head),a.lowerEye=a.neck.shift(105,.237*t.head),a.outerEye=a.neck.shift(108.3,.247*t.head),a.innerEye=a.neck.shift(99,.235*t.head),a.upperEyeCp1=a.upperEye.shift(0,.01*t.head),a.upperEyeCp2=a.upperEye.shift(180,.01*t.head),a.lowerEyeCp1=a.lowerEye.shift(180,.01*t.head),a.lowerEyeCp2=a.lowerEye.shift(0,.01*t.head),a.outerEyeCp1=a.outerEye.shift(90,.005*t.head),a.outerEyeCp2=a.outerEye.shift(-90,.005*t.head),a.innerEyeCp1=a.innerEye.shift(-90,.003*t.head),a.innerEyeCp2=a.innerEye.shift(90,.01*t.head),a.innerNose=a.neck.shift(94.5,.16*t.head),a.innerNoseCp=a.neck.shift(95.5,.163*t.head),a.outerNose=a.neck.shift(96.8,.162*t.head),a.innerMouth=a.neck.shift(90,.112*t.head),a.innerMouthCp=a.innerMouth.shift(180,.02*t.head),a.outerMouth=a.neck.shift(111,.117*t.head),a.lowerEar=a.neck.shift(128,.217*t.head),a.lowerEarCp=a.neck.shift(126,.23*t.head),a.upperEar=a.neck.shift(123.5,.24*t.head);const f=.85*t.wrist;a.handA=a.wristMain.shift(-65,.5*f),a.handB=a.wristMain.shift(-65,.7*f),a.handC=a.wristMain.shift(-70,.79*f),a.hand
1D=a.wristMain.shift(-77,.7*f),a.handE=a.wristMain.shift(-83,.53*f),a.handF=a.wristMain.shift(-90,.7*f),a.handZ=a.wristMain.shift(-92,.9*f),a.handG=a.wristMain.shift(-89,1.2*f),a.handFork=a.wristMain.shift(-90.6,1.32*f),a.handH=a.wristMain.shift(-93,1.42*f),a.handJ=a.wristMain.shift(-109,.7*f),a.handInner=a.wristMain.shift(-105,.74*f),a.handACp1=a.handA.shift(110,.1*f),a.handACp2=a.handA.shift(-70,.1*f),a.handBCp1=a.handB.shift(115,.1*f),a.handBCp2=a.handB.shift(-65,.05*f),a.handCCp1=a.handC.shift(20,.05*f),a.handCCp2=a.handC.shift(200,.05*f),a.handDCp1=a.handD.shift(-65,.05*f),a.handDCp2=a.handD.shift(115,.1*f),a.handECp1=a.handE.shift(-55,.05*f),a.handECp2=a.handE.shift(-125,.05*f),a.handFCp1=a.handF.shift(80,.1*f),a.handFCp2=a.handF.shift(-100,.1*f),a.handZCp1=a.handZ.shift(90,.1*f),a.handZCp2=a.handZ.shift(-90,.1*f),a.handGCp1=a.handG.shift(100,.1*f),a.handGCp2=a.handG.shift(-80,.1*f),a.handForkCp1=a.handFork.shift(40,.05*f),a.handForkCp2=a.handFork.shift(-180,.07*f),a.handForkCp3=a.handFork.shift(-90,.05*f),a.handHCp1=a.handH.shift(0,.05*f),a.handHCp2=a.handH.shift(110,.1*f),a.handJCp1=a.handJ.shift(-90,.4*f),a.handJCp2=a.handJ.shift(90,.4*f),a.handInnerCp1=a.handInner.shift(-90,.2*f),i.front=(new o).move(a.crotchMain).curve(a.crotchMainCp2,a.crotchCp1,a.innerCrotch).curve(a.crotchCp2,a.innerKneeCp1,a.innerKnee).curve(a.innerKneeCp2,a.innerCalfCp1,a.innerCalf).curve(a.innerCalfCp2,a.innerAnkleCp1,a.innerAnkle).curve(a.innerAnkleCp2,a.innerSideFootCp1,a.innerSideFoot).curve(a.innerSideFootCp2,a.innerFootCp1,a.innerFoot).line(a.outerFoot).curve(a.outerFootCp2,a.outerSideFootCp1,a.outerSideFoot).curve(a.outerSideFootCp2,a.outerAnkleCp1,a.outerAnkle).curve(a.outerAnkleCp2,a.outerCalfCp1,a.outerCalf).curve(a.outerCalfCp2,a.outerKneeCp1,a.outerKnee).curve(a.outerKneeCp2,a.outerUpperLegCp1,a.outerUpperLeg).curve(a.outerUpperLegCp2,a.outerSeatCp1,a.outerSeat).curve(a.outerSeatCp2,a.outerHipsCp1,a.outerHips).curve(a.outerHipsCp2,a.outerWaistCp1,a.outerWaist).curve(a.outerWaistCp2,a.outerBustCp1,a.outerBust).curve_(a.outerBustCp2,a.outerArmpit).move(a.outerBust).curve(a.outerBustCp3,a.innerElbowCp1,a.innerElbow).curve(a.innerElbowCp2,a.innerWristCp1,a.innerWrist).curve(a.innerWristCp2,a.handACp1,a.handA).curve(a.handACp2,a.handBCp1,a.handB).curve(a.handBCp2,a.handCCp1,a.handC).curve(a.handCCp2,a.handDCp1,a.handD).curve(a.handDCp2,a.handECp1,a.handE).curve(a.handECp2,a.handFCp1,a.handF).curve(a.handFCp2,a.handZCp1,a.handZ).curve(a.handZCp2,a.handGCp1,a.handG).curve(a.handGCp2,a.handForkCp1,a.handFork).curve(a.handForkCp2,a.handInnerCp1,a.handInner).move(a.handFork).curve(a.handForkCp3,a.handHCp1,a.handH).curve(a.handHCp2,a.handJCp1,a.handJ).curve(a.handJCp2,a.outerWristCp1,a.outerWrist).curve(a.outerWristCp2,a.outerElbowCp1,a.outerElbow).curve(a.outerElbowCp2,a.outerArmCp1,a.outerArm).curve(a.outerArmCp2,a.outerShoulderLowerCp1,a.outerShoulderLower).curve(a.outerShoulderLowerCp2,a.outerNeckCp1,a.outerNeck).curve_(a.outerNeckCp2,a.outerUpperNeck).move(a.chin).line(a.outerUpperNeck)._curve(a.belowEarCp1,a.belowEar).curve(a.belowEarCp2,a.earBottomCp1,a.earBottom).curve(a.earBottomCp2,a.earLeftLowCp1,a.earLeftLow).curve(a.earLeftLowCp2,a.earLeftHighCp1,a.earLeftHigh).curve(a.earLeftHighCp2,a.earTopCp1,a.earTop).curve(a.earTopCp2,a.aboveEarCp1,a.aboveEar).curve(a.aboveEarCp2,a.headCp1,a.head).attr("class","stroke-xl"),i.bustPoint=(new o).move(a.bustPointOuter).circleSegment(360,a.bustPointCenter).attr("class","stroke-xl"),r.showBust&&(i.bustLine=(new o).move(a.underBustLineOuter)._curve(a.underBustLineCp1,a.underBustLine).curve_(a.underBustLineCp2,a.underBustLineInner).attr("class","stroke-xl")),i.crotch=(new o).move(a.crotchMain).curve_(a.crotchCurveCp1,a.crotchCurve).attr("class","stroke-xl"),i.eye=(new o).move(a.upperEye).curve(a.upperEyeCp2,a.outerEyeCp1,a.outerEye).curve(a.outerEyeCp2,a.lowerEyeCp1,a.lowerEye).curve(a.lowerEyeCp2,a.innerEyeCp1,a.innerEye).curve(a.innerEyeCp2,a.upperEyeCp1,a.upperEye).circleSegment(-120,a.upperEye.shiftFractionTowards(a.lowerEye,.5)).move(a.lowerEye).circleSegment(-100,a.upperEye.shiftFractionTowards(a.lowerEye,.5)).attr("class","stroke-xl"),i.nose=(new o).move(a.innerNose).curve_(a.innerNoseCp,a.outerNose).attr("class","stroke-xl"),i.mouth=(new o).move(a.innerMouth).curve_(a.innerMouthCp,a.outerMouth).attr("class","stroke-xl"),i.ear=(new o).move(a.lowerEar).curve_(a.lowerEarCp,a.upperEar).attr("class","stroke-xl"),n("mirror",{clone:!0,mirror:[a.floor,a.head],paths:Object.keys(i).filter((t=>!t.startsWith("side")))});const u=[];
1if(function(t,e){for(const o of _t)Gt(o,t,e)}(u,t),function(t,e){for(const o of jt)Ut(o,t,e)}(u,t),i.sideFullCrossSeam.intersectsY(a.sideCrotchMain.shiftFractionTowards(a.sideCrotch,.1).y).length>2&&u.push("crossseam"),0!==i.sideCrossSeamFront.length()&&0!==i.sideCrossSeamBack.length()||u.push("crossseamfront"),0===u.length)r.flag.info({msg:"bonny:validationOk"});else for(const g of u)r.flag.warn({msg:`bonny:${g}`});return l}},zt=new Dt.pT({data:It,parts:[Mt,$t]});var Jt=o(34519);const Kt=({id:t,publicOnly:e=!1,Link:o=!1})=>{o||(o=C.N_);const{account:i,control:n}=(0,g.F)(),{setLoadingStatus:s}=(0,a.useContext)(u.q),r=(0,b.O)(),{setModal:l}=(0,a.useContext)(f.V),[c,p]=(0,a.useState)(!1),[d,w]=(0,a.useState)(!1),[k,y]=(0,a.useState)(!1),[T,B]=(0,a.useState)(!1),[L,P]=(0,a.useState)(),[R,F]=(0,a.useState)(L?.name),[E,W]=(0,a.useState)(L?.image),[H,A]=(0,a.useState)(!!L?.public),[D,N]=(0,a.useState)(!!L?.imperial),[I,M]=(0,a.useState)(L?.notes||""),[_,j]=(0,a.useState)({}),[G,U]=(0,a.useState)(!L?.imperial);(0,a.useEffect)((()=>{t&&(e?(async()=>{s([!0,"Contacting the backend"]);const[e,o]=await r.getPublicSet(t);if(200===e&&"success"===o.result){const t="imperial"===o.units;P({...o,public:!0,measies:o.measurements,imperial:t}),F(o.name),W(o.image),A(!!o.public),N(t),M(o.notes),j(o.measurements),U(!t),s([!0,"Measurements set loaded",!0,!0])}else s([!0,"An error occured while loading this measurements set",!0,!1])})():(async()=>{s([!0,"Contacting the backend"]);const[e,o]=await r.getSet(t);200===e&&"success"===o.result?(P(o.set),F(o.set.name),W(o.set.image),A(!!o.set.public),N(!!o.set.imperial),M(o.set.notes),j(o.set.measies),U(!o.set.imperial),s([!0,"Measurements set loaded",!0,!0])):s([!0,"An error occured while contacting the backend",!0,!1])})())}),[t,e]);if(!t||!L)return null;const Y=(t,e)=>{const o={..._};o[t]=e,j(o)},$=async()=>{s([!0,"Gathering info"]);const t={measies:{}};(R||R!==L.name)&&(t.name=R),(E||E!==L.image)&&(t.img=E),[!0,!1].includes(H)&&H!==L.public&&(t.public=H),[!0,!1].includes(D)&&D!==L.imperial&&(t.imperial=D),(I||I!==L.notes)&&(t.notes=I);for(const a of m.Kk)(_[a]||_[a]!==L.measies[a])&&(t.measies[a]=_[a]);s([!0,"Saving measurements set"]);const[e,o]=await r.updateSet(L.id,t);200===e&&"success"===o.result?(P(o.set),w(!1),s([!0,"Nailed it",!0,!0])):s([!0,"That did not go as planned. Saving the set failed.",!0,!1])},z=async()=>{s([!0,"Getting ready"]);const[t,e]=await r.updateSet(L.id,{public:!L.public});200===t&&"success"===e.result?(P(e.set),s([!0,"Alright, done!",!0,!0])):s([!0,"Backend says no :(",!0,!1])},J=async()=>{s([!0,"Importing data"]);const t={...L,userId:i.id,measies:{...L.measies}};delete t.img;const[e,o]=await r.createSet(t);201===e&&"created"===o.result?(s([!0,"Loading newly created set",!0,!0]),window.location=`/account/data/sets/set?id=${o.set.id}`):s([!0,"We failed to create this measurements set",!0,!1])},V=a.createElement(a.Fragment,null,a.createElement("div",{className:"tw:flex tw:flex-wrap tw:md:flex-nowrap tw:flex-row tw:gap-2 tw:w-full"},a.createElement("div",{className:"tw:w-full tw:md:w-96 tw:shrink-0"},a.createElement(te,{set:L,control:n,Link:o})),a.createElement("div",{className:"tw:flex tw:flex-col tw:justify-end tw:gap-2 tw:mb-2 tw:grow"},i.control>2&&L.public&&L.userId!==i.id?a.createElement("div",{className:"tw:flex tw:flex-row tw:gap-2 tw:items-center"},a.createElement("a",{className:"tw:daisy-badge tw:daisy-badge-secondary tw:font-bold tw:daisy-badge-lg",href:`${m.DS.backend}/sets/${L.id}.json`},"JSON"),a.createElement("a",{className:"tw:daisy-badge tw:daisy-badge-success tw:font-bold tw:daisy-badge-lg",href:`${m.DS.backend}/sets/${L.id}.yaml`},"YAML")):a.createElement("span",null),i.control>3&&L.userId===i.id?a.createElement("div",{className:"tw:flex tw:flex-row tw:gap-2 tw:items-center"},a.createElement("button",{className:"tw:daisy-badge tw:daisy-badge-secondary tw:font-bold tw:daisy-badge-lg",onClick:()=>l(a.createElement(x.F,{keepOpenOnClick:!0},a.createElement(At.L,{js:L})))},"JSON"),a.createElement("button",{className:"tw:daisy-badge tw:daisy-badge-success tw:font-bold tw:daisy-badge-lg tw:text-neutral-content",onClick:()=>l(a.createElement(x.F,{keepOpenOnClick:!0},a.createElement(ct.Y,{js:L})))}
1,"YAML")):a.createElement("span",null),i.id&&i.control>2&&L.public&&L.userId!==i.id?a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-primary",title:"Import measurements set",onClick:J},a.createElement("div",{className:"tw:flex tw:flex-row tw:gap-4 tw:justify-between tw:items-center tw:w-full"},a.createElement(v.JM,null),"Import measurements set")):null,i.control>2?a.createElement(K,{slug:`set?id=${L.id}`,title:L.name,type:"set",thing:"set"}):null,a.createElement("button",{onClick:()=>l(a.createElement(x.F,{flex:"col",justify:"top lg:justify-center",slideFrom:"right"},a.createElement("img",{src:(0,h.qk)({type:"public",id:L.img})}))),className:`tw:daisy-btn tw:daisy-btn-secondary tw:btn-outline ${h.f_}`},a.createElement(v.jp,null),"Show Image"),!e&&a.createElement(a.Fragment,null,i.control>2?a.createElement("button",{onClick:()=>{y(!k),w(!1)},className:`tw:daisy-btn ${k?"tw:daisy-btn-neutral":"tw:daisy-btn-primary"} tw:daisy-btn-outline ${h.f_}`},k?a.createElement(v.NA,null):a.createElement(v.jD,null),k?"Cancel":"Suggest for curation"):null,d?a.createElement(a.Fragment,null,a.createElement("button",{onClick:()=>{w(!1),y(!1)},className:`tw:daisy-btn tw:daisy-btn-neutral tw:daisy-btn-outline ${h.f_}`},a.createElement(v.NA,null),"Cancel"),a.createElement("button",{onClick:$,className:`tw:daisy-btn tw:daisy-btn-primary ${h.f_}`},a.createElement(v.JM,null),"Save measurements set")):a.createElement("button",{onClick:()=>{w(!0),y(!1)},className:`tw:daisy-btn tw:daisy-btn-primary ${h.f_}`},a.createElement(v.qU,null)," Edit measurements set")),i.control>1&&i?.compare?a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-secondary tw:btn-outline",title:"Validate measurements",onClick:()=>{B(!T),w(!1)}},a.createElement("div",{className:"tw:flex tw:flex-row tw:gap-4 tw:justify-between tw:items-center tw:w-full"},a.createElement(v.HD,null),"Validate measurements")):null,i.control>2&&L.userId===i.id?a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-neutral",title:"Clone measurements set",onClick:J},a.createElement("div",{className:"tw:flex tw:flex-row tw:gap-4 tw:justify-between tw:items-center tw:w-full"},a.createElement(v.ve,null),"Clone measurements set")):null)),a.createElement("div",{className:"tw:flex tw:flex-row tw:flex-wrap tw:gap-4 tw:text-sm tw:items-center tw:justify-between tw:mb-2"}));return k?a.createElement("div",{className:"tw:w-full"},V,a.createElement(Xt,{mset:L,setLoadingStatus:s,backend:r,Link:o})):d?a.createElement("div",{className:"tw:w-full"},V,a.createElement("h2",{id:"measies"},"Measurements"),a.createElement("div",{className:"tw:bg-secondary/10 tw:px-4 tw:pt-1 tw:pb-4 tw:rounded-lg tw:shadow"},a.createElement(S.nF,{update:p,label:"Filter by design",current:c,firstOption:a.createElement("option",{value:""},"(No filter)")})),(c?Ft.Kk[c].sort():m.Kk.sort()).map((t=>a.createElement(S.N6,{id:`measie-${t}`,key:t,m:t,imperial:L.imperial,label:Rt.Kk[t],current:L.measies[t],original:L.measies[t],update:Y,help:()=>(0,Et.ds)(t,l)}))),a.createElement("h2",{id:"data"},"Data"),a.createElement("span",{id:"name"}),a.createElement(S.YZ,{id:"set-name",label:"Name",update:F,current:R,original:L.name,placeholder:"Georg Cantor",valid:t=>t&&t.length>0}),a.createElement("span",{id:"image"}),i.control>=m.A4.account.sets.img?a.createElement(S.$n,{id:"set-img",label:"Image",update:W,current:E,valid:t=>t.length>0}):null,a.createElement("span",{id:"public"}),i.control>=m.A4.account.sets.public?a.createElement(S.ZB,{id:"set-public",label:"Public",update:A,list:[{val:!0,label:a.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:flex-wrap tw:justify-between tw:w-full"},a.createElement("span",null,"Public measurements set"),a.createElement(v.aV,{className:"tw:w-8 tw:h-8 tw:text-success tw:bg-base-100 tw:rounded-full tw:p-1",stroke:4})),desc:"Others are allowed to use these measurements to generate or test patterns"},{val:!1,label:a.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:flex-wrap tw:justify-between tw:w-full"},a.createElement("span",null,"Private measurements set"),a.createElement(v.xf,{className:"tw:w-8 tw:h-8 tw:text-error tw:bg-base-100 tw:rounded-full tw:p-1",stroke:3})),desc:"These measurements cannot be used by other users or visitors"}],current:H}):null,a.createElement("span",{id:"units"}),i.control>=m.A4.account.sets.units?a.createElement(a.Fragment,null,a.createElement(S.ZB,{id:"set-units",label:"Units",update:N,list:[{val:!1,label:a.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:flex-wrap tw:justify-between tw:w-full"},a.createElement("span",null,"Metric units (cm)"),a.createElement("span",{className:"tw:text-inherit tw:text-2xl tw:pr-2"},"cm")),desc:"Pick this if you prefer cm over inches"},{val:!0,label:a.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:flex-wrap tw:justify-between tw:w-full"},a.createElement("span",null,"Imperial units (inch)"),a.createElement("span",{className:"tw:text-inherit tw:text-4xl tw:pr-2"},"\u2033")),desc:"Pick this if you prefer inches over cm"}],current:D}),a.createElement("span",{className:"tw:text-large tw:text-warning"},"Note: You must save after changing Units to have the change take effect on this page.")):null,a.createElement("span",{id:"notes"}),i.control>=m.A4.account.sets.notes?a.createElement(S.oZ,{id:"set-notes",label:"Notes",update:M,current:I,placeholder:"You can use markdown here"}):null,a.createElement("button",{onClick:$,className:"tw:daisy-btn tw:daisy-btn-primary tw:daisy-btn-lg tw:flex tw:flex-row tw:items-center tw:gap-4 tw:mx-auto tw:mt-8"},a.createElement(v.JM,null),"Save Measurements Set")):T?a.createElement("div",{className:"tw:w-full"},V,a.createElement(Qt,{mset:L,setLoadingStatus:s,backend:r,imperial:D})):a.createElement("div",{className:"tw:w-full"},V,a.createElement("h2",null,"Data"),a.createElement(O,{title:"Name"},L.name),a.createElement(O,{title:"Units"},L.imperial?"Imperial":"Metric"),n>=m.A4.account.sets.notes&&a.createElement(O,{title:"Notes"},a.createElement(Ht.oz,null,L.notes)),n>=m.A4.account.sets.public&&a.createElement(a.Fragment,null,L.userId===i.id&&a.createElement(O,{title:"Public"},a.createElement("div",{className:"tw:flex tw:flex-row tw:gap-2 tw:items-center tw:justify-between"}
1,L.public?a.createElement(v.aV,{className:"tw:w-6 tw:h-6 tw:text-success",stroke:4}):a.createElement(v.xf,{className:"tw:w-6 tw:h-6 tw:text-error",stroke:3}),a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-secondary tw:daisy-btn-sm",onClick:z},"Make ",L.public?"Private":"Public"))),L.public&&a.createElement(O,{title:"Permalink"},a.createElement(o,{href:`/set?id=${L.id}`,className:h.lD},`/set?id=${L.id}`))),n>=m.A4.account.sets.createdAt&&a.createElement(O,{title:"Created"},(0,h.fF)(L.createdAt,!1),a.createElement("span",{className:"tw:text-sm tw:pl-2"},"(",(0,h.XV)(L.createdAt,!1),")")),n>=m.A4.account.sets.updatedAt&&a.createElement(O,{title:"Updated"},(0,h.fF)(L.updatedAt,!1),a.createElement("span",{className:"tw:text-sm tw:pl-2"},"(",(0,h.XV)(L.updatedAt,!1),")")),n>=m.A4.account.sets.id&&a.createElement(O,{title:"ID"},L.id),Object.keys(L.measies).length>0&&a.createElement(a.Fragment,null,a.createElement("h2",null,"Measurements"),a.createElement(S.lz,{label:!1,labels:["Metric Units (cm)","Imperial Units (inch)"],update:()=>U(!G),current:G}),Object.entries(L.measies).map((([t,e])=>e>0?a.createElement(O,{title:a.createElement(Vt,{m:t,val:e,imperial:!G}),key:t},a.createElement("span",{className:"tw:font-medium"},Rt.Kk[t])):null))))},Vt=({val:t,m:e,imperial:o=!1})=>(0,m.rA)(e)?a.createElement("span",null,t,"\xb0"):a.createElement("span",{dangerouslySetInnerHTML:{__html:(0,h.m2)(t,o)}}),Xt=({mset:t,Link:e})=>{const[o,i]=(0,a.useState)(""),[n,s]=(0,a.useState)(""),[r,l]=(0,a.useState)(""),[c,p]=(0,a.useState)(""),[d,h]=(0,a.useState)(!1),{setLoadingStatus:f}=(0,a.useContext)(u.q),g=(0,b.O)(),w=[];
1for(const a of m.Kk)void 0===t.measies[a]&&w.push(a);if(d){const t=`/curate/sets/suggested/${d.id}`;return a.createElement(a.Fragment,null,a.createElement("h2",null,"Thank you"),a.createElement("p",null,"Your submission has been registered and will be processed by one of our curators."),a.createElement("p",null,"It is available at: ",a.createElement(e,{href:t},t)))}return a.createElement(a.Fragment,null,a.createElement("h2",null,"Suggest a measurements set for curation"),a.createElement("h4",{className:"tw:flex tw:flex-row tw:items-center tw:gap-2"},w.length>0?a.createElement(v.Ty,null):a.createElement(v.zB,null),"Measurements"),w.length>0?a.createElement(a.Fragment,null,a.createElement("p",null,"To ensure curated measurements sets work for all designs, you need to provide a full set of measurements."),a.createElement("p",null,"Your measurements set is missing the following measurements:"),a.createElement("ul",{className:"tw:list tw:list-inside tw:list-disc tw:ml-4"},w.map((t=>a.createElement("li",{key:t},t))))):a.createElement("p",null,"All measurements are available."),a.createElement("h4",{className:"tw:flex tw:flex-row tw:items-center tw:gap-2"},r.length>1?a.createElement(v.zB,null):a.createElement(v.Ty,null),"Name"),a.createElement("p",null,"Each curated set has a name. You can suggest your own name or a pseudonym."),a.createElement(S.YZ,{label:"Name",current:r,update:l,valid:t=>t.length>1}),a.createElement("h4",{className:"tw:flex tw:flex-row tw:items-center tw:gap-2"},o.length>1?a.createElement(v.zB,null):a.createElement(v.Ty,null),"Height"),a.createElement("p",null,"To allow organizing and presenting our curated sets in a structured way, we organize them by height."),a.createElement(S.YZ,{label:"height",current:o,update:i,valid:t=>t.length>1}),a.createElement("h4",{className:"tw:flex tw:flex-row tw:items-center tw:gap-2 tw:mt-4"},n.length>0?a.createElement(v.zB,null):a.createElement(v.Ty,null),"Image"),a.createElement("p",null,"Finally, we need a picture. Please refer to the documentation to see what makes a good picture for a curated measurements set.",a.createElement(e,{href:"/docs/about/site/csets"},"Documentation")),a.createElement(S.$n,{label:"Image",current:n,update:s,valid:t=>t.length>1}),a.createElement("h4",{className:"tw:flex tw:flex-row tw:items-center tw:gap-2 tw:mt-4"},a.createElement(v.zB,null),"Notes"),a.createElement("p",null,"If you would like to add any notes, you can do so here."),a.createElement(T.Y,{type:"tip",compact:!0},"This field supports markdown"),a.createElement(S.oZ,{label:"Notes",current:c,update:p,valid:()=>!0}),a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-primary tw:w-full tw:mt-4",disabled:!(0===w.length&&o.length>1&&n.length>0),onClick:async()=>{f([!0,"Contacting backend"]);const e=await g.suggestCset({set:t.id,height:o,img:n,name:r,notes:c});e.success&&e.data.submission?(h(e.data.submission),f([!0,"Nailed it",!0,!0])):f([!0,"An unexpected error occured. Please report this.",!0,!1])}},"Suggest for curation"))},Qt=({mset:t,imperial:e})=>{const[o,i]=(0,a.useState)(!1),n=[];
1for(const a of m.Kk)void 0===t.measies[a]&&n.push(a);if(n.length>0)return a.createElement(a.Fragment,null,a.createElement("h4",{className:"tw:flex tw:flex-row tw:items-center tw:gap-2"},"Validation messages"),a.createElement("p",null,"To validate and preview a measurement set, all measurements need to be entered."),a.createElement("p",null,"Your measurements set is missing the following measurements:"),a.createElement("ul",{className:"tw:list tw:list-inside tw:list-disc tw:ml-4"},n.map((t=>a.createElement("li",{key:t},t)))));const s={};for(const[a,c]of Object.entries(Nt.en.s))s[`bonny:${a}`]=c;const{pattern:r}=(0,Ot.K4)(zt,{measurements:t.measies}),l=r.setStores?.[0]?.plugins?.["plugin-annotations"]?.flags;return console.log("flags",r,l,s),a.createElement(a.Fragment,null,a.createElement("h4",{className:"tw:flex tw:flex-row tw:items-center tw:gap-2"},"Measurement analysis"),a.createElement("p",null,"Based on your measurements, we estimate your body to be about"," ",a.createElement("strong",null,(0,h.m2)(-1*r.parts[0]["bonny.front"].points.head.y,e))," ","high."),a.createElement("p",null,"Here is what the automated analysis found:"),Object.entries((0,Ot.cv)(l)).map((([t,e])=>{const o=s[e.desc]||e.desc;return a.createElement("div",{key:t,className:"tw:flex tw:flex-row tw:mt-4"},"warn"===e.type?a.createElement(Jt.yV,null,a.createElement(Ht.oz,null,o)):a.createElement(Jt.j0,null,a.createElement(Ht.oz,null,o)))})),a.createElement("h4",{className:"tw:flex tw:flex-row tw:items-center tw:gap-2 tw:mt-12"},"Preview"),o?a.createElement(Wt.zJ,{renderProps:r.getRenderProps(),patternLocale:"en",strings:s,rotate:!1}):a.createElement(a.Fragment,null,a.createElement("p",null,"This feature creates a visual preview of your body based on your measurements."),a.createElement("p",null,"It\u2019s meant to help you spot possible mistakes and better understand how the software sees your measurements, but keep in mind:"),a.createElement("ul",{className:"tw:list tw:list-inside tw:list-disc tw:ml-2"},a.createElement("li",null,"The preview is a simple line drawing, but it does include features like chest shape and crotch placement. If that feels uncomfortable, you may prefer to skip using this tool."),a.createElement("li",null,"This preview is an ",a.createElement("strong",null,"approximation"),", not an exact representation. Bodies have many variations that can't be captured with just a few measurements. We are missing some information, like how weight is distributed or your posture."),a.createElement("li",null,"If something looks off, it"," ",a.createElement("strong",null,"doesn\u2019t necessarily mean your measurements are wrong"),", but it might be worth double-checking. Sometimes, differences come from how the preview is generated rather than an error in measuring."),a.createElement("li",null,"Just like this preview, some sewing patterns may need to assume certain body proportions. If this preview looks different from what you expect, some patterns may also need adjustment, to get a perfect fit.")),a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-primary tw:mt-4",onClick:()=>i(!0)},a.createElement(v.HD,null),"I understand, render body preview")))},qt=()=>{const t=(0,b.O)(),{account:e}=(0,g.F)(),{setLoadingStatus:o}=(0,a.useContext)(u.q),[i,n]=(0,a.useState)(""),s=e.imperial;return a.createElement("div",{className:"tw:max-w-xl"},a.createElement("h5",null,"Name"),a.createElement("p",null,"Give this set of measurements a name. That will help tell them apart."),a.createElement(S.YZ,{id:"new-set",label:"Name",update:n,current:i,valid:t=>t&&t.length>0,placeholder:"Georg Cantor"}),a.createElement("div",{className:"tw:flex tw:flex-row tw:gap-2 tw:items-center tw:w-full tw:mt-8 tw:mb-2"},a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-primary tw:grow tw:capitalize",disabled:i.length<1,onClick:async()=>{o([!0,"Storing new measurements set"]);const[e,a]=await t.createSet({name:i,imperial:s});201===e&&"created"===a.result?(o([!0,"Nailed it",!0,!0]),window.location=`/account/data/sets/set?id=${a.set.id}`):o([!0,"Failed to save the measurments set. Please report this.",!0,!1])}},"New Measurements Set")))},Zt=({Link:t=!1})=>{t||(t=C.N_);const{control:e}=(0,g.F)(),o=(0,b.O)(),[i,n]=(0,a.useState)([]),[s,r]=(0,a.useState)({}),[l,c]=(0,a.useState)(0),{setLoadingStatus:p,LoadingProgress:d}=(0,a.useContext)(u.q),{setModal:h}=(0,a.useContext)(f.V);(0,a.useEffect)((()=>{(async()=>{const[t,e]=await o.getSets();200===t&&"success"===e.result&&n(e.sets)})()}),[l]);const m=Object.keys(s).length;return a.createElement("div",{className:"tw:max-w-7xl tw:xl:pl-4"},a.createElement("p",{className:"tw:text-center tw:md:text-right"},a.createElement(t,{className:"tw:daisy-btn tw:daisy-btn-secondary tw:capitalize tw:w-full tw:md:w-auto tw:mr-2 tw:hover:no-underline tw:hover:text-primary-content no-hover-decoration",bottom:!0,primary:!0,href:"/account/import"}
1,a.createElement(v.JM,{className:"tw:w-6 tw:h-6 tw:text-secondary-content"}),a.createElement("span",{className:"tw:text-secondary-content"},"Import Measurements Sets")),a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-primary tw:capitalize tw:w-full tw:md:w-auto tw:hover:no-underline tw:hover:text-primary-content",onClick:()=>h(a.createElement(x.F,{keepOpenOnClick:!0},a.createElement(qt,null)))},a.createElement(v.c1,null),"Create a new Measurements Set")),a.createElement("div",{className:"tw:flex tw:flex-row tw:gap-2 tw:border-b-2 tw:mb-4 tw:pb-4 tw:mt-8 tw:h-14 tw:items-center"},a.createElement("input",{type:"checkbox",className:"tw:daisy-checkbox tw:daisy-checkbox-secondary",onClick:()=>{if(m===i.length)r({});else{const t={};for(const e of i)t[e.id]=1;r(t)}},checked:i.length===m}),a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-error",onClick:async()=>{let t=0;for(const e in s)t++,await o.removeSet(e),p([!0,a.createElement(d,{val:t,max:m,msg:"Removing measurements sets",key:"linter"})]);r({}),c(l+1),p([!0,"Nailed it",!0,!0])},disabled:m<1},a.createElement(v.uc,null)," ",m," Measurements Sets")),a.createElement("div",{className:"tw:grid tw:grid-cols-2 tw:lg:grid-cols-4 tw:gap-2"},i.map(((t,o)=>a.createElement("div",{key:o,className:`tw:flex tw:flex-row tw:items-start tw:gap-1 tw:border-2\n          ${s[t.id]?"tw:border-solid tw:border-secondary":"tw:border-dotted tw:border-base-300"} tw:rounded-lg p-2`},a.createElement("label",{className:"tw:w-8 tw:h-full tw:shrink-0"},a.createElement("input",{type:"checkbox",checked:!!s[t.id],className:"tw:daisy-checkbox tw:daisy-checkbox-secondary",onClick:()=>(t=>{const e={...s};e[t]?delete e[t]:e[t]=1,r(e)})(t.id)})),a.createElement("div",{className:"tw:w-full"},a.createElement(te,{control:e,href:`/account/data/sets/set?id=${t.id}`,set:t,size:"md"})))))))},te=({Link:t=!1,design:e=!1,href:o=!1,onClick:i=!1,set:n,size:s="lg",useA:r=!1})=>{t||(t=C.N_);const l={lg:96,md:48,sm:36}[s],c={className:`tw:bg-base-300 tw:aspect-square tw:h-${l} tw:w-${l} tw:mb-2 tw:grow tw:w-full\n      tw:hover:cursor-pointer tw:border-0 tw:opacity-80 tw:hover:opacity-100\n      tw:mx-auto tw:flex tw:flex-col tw:items-start tw:text-center tw:justify-between tw:rounded-none tw:md:rounded shadow`,style:{backgroundImage:`url(${(0,h.qk)({type:"w500",id:n.img})})`,backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"50%"}};n.img&&"default-avatar"!==n.img||(c.style.backgroundPosition="bottom right");let p=a.createElement("span",null),d="",m="";if(e){const[t,o]=(0,h.z4)(Ft.J6[e],n.measies,!0),i="tw:w-8 tw:h-8 tw:p-1 tw:rounded-full tw:-mt-2 tw:-ml-2 tw:shadow";if(p=t?a.createElement(v.aV,{className:`${i} tw:bg-success tw:text-success-content`,stroke:4}):a.createElement(v.xf,{className:`${i} tw:bg-error tw:text-error-content`,stroke:3}),o.length>0){let t="Missing:"+o.map((t=>Rt.Kk[t])).join(", ");if(t.length>75){const e=t.lastIndexOf(", ",75);t=t.substring(0,e)+", and more..."}const e="tw:font-normal tw:text-xs";d=a.createElement("span",{className:`${e}`},t),m=a.createElement("br",null)}}const f=a.createElement(a.Fragment,null,p,a.createElement("span",{className:"tw:bg-neutral/50 tw:text-neutral-content tw:px-4 tw:w-full tw:py-2 tw:rounded tw:rounded-t-none tw:font-bold tw:leading-5"},n.name,m,d));return i?a.createElement("button",(0,Pt.A)({},c,{onClick:()=>i(n)}),f):o&&!r?a.createElement(t,(0,Pt.A)({},c,{href:o}),f):o&&r?a.createElement("a",(0,Pt.A)({},c,{href:o}),f):a.createElement("div",c,f)},ee=({welcome:t=!1,Link:e=!1})=>{e||(e=C.N_);const{account:o,setAccount:i}=(0,g.F)(),n=(0,b.O)(),{setLoadingStatus:s}=(0,a.useContext)(u.q),[r,l]=(0,a.useState)(o?.newsletter?"yes":"no"),c=D[o?.control].length>2?"/welcome/"+D[o?.control][2]:"/docs/about/";return a.createElement("div",{className:"tw:w-full"},a.createElement(S.ZB,{id:"account-newsletter",label:"Would you like to receive the FreeSewing newsletter?",list:["yes","no"].map((t=>({val:t,label:a.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:w-full tw:justify-between"},a.createElement("span",null,"yes"===t?"Yes, I would like to receive the newsletter":"No thanks"),"yes"===t?a.createElement(v.aV,{className:"tw:w-8 tw:h-8 tw:text-success",stroke:4}):a.createElement(v.xf,{className:"tw:w-8 tw:h-8 tw:text-error",stroke:3})),desc:"yes"===t?"Once every 3 months you'll receive an email from us with honest wholesome content. No tracking, no ads, no nonsense.":"You can always change your mind later. But until you do, we will not send you any newsletters."}))),current:r,update:async t=>{if(t!==r){s([!0,"Saving preferences"]);const[e,o]=await n.updateAccount({newsletter:"yes"===t});
1200===e?(s([!0,"Preferences saved",!0,!0]),i(o.account),l(t)):s([!0,"An error occured. Please report this.",!0,!0])}}}),t?a.createElement(a.Fragment,null,a.createElement(L.K,{href:c,className:"tw:mt-4"},a.createElement(v.wF,{stroke:3})," Continue"),D[o?.control].length>0?a.createElement(a.Fragment,null,a.createElement("progress",{className:"tw:daisy-progress tw:daisy-progress-primary tw:w-full tw:mt-12",value:200/D[o?.control].length,max:"100"}),a.createElement("span",{className:"tw:pt-4 tw:text-sm tw:font-bold tw:opacity-50"},"2 / ",D[o?.control].length),a.createElement(j,{done:D[o?.control].slice(0,1),todo:D[o?.control].slice(2),current:"newsletter"})):null):null,t?null:a.createElement(T.Y,{type:"tip"},a.createElement("h5",null,"You can unsubscribe at any time with the link below"),a.createElement("p",null,"This unsubscribe link will also be included at the bottom of every newsletter we send you, so you do not need to bookmark it, but you can if you want to."),a.createElement("p",null,a.createElement(e,{href:`/newsletter/unsubscribe?x=${o?.ehash}`,className:h.lD},"Unsubscribe link")),a.createElement("p",{className:"tw:text-sm"},"This link is to unsubscribe you specifically, do not share it with other subscribers.")))},oe=({Link:t=!1})=>{t||(t=C.N_);const e=(0,b.O)(),{account:o,setAccount:i}=(0,g.F)(),{setLoadingStatus:n}=(0,a.useContext)(u.q),[s,r]=(0,a.useState)("");return a.createElement("div",{className:"tw:w-full"},a.createElement(S.yA,{id:"account-password",label:"Something only you know",current:s,update:r,valid:t=>t.length>0,placeholder:"Tip: use a password manager"}),a.createElement("button",{className:"tw:flex tw:flex-row tw:gap-2 tw:items-center tw:daisy-btn tw:justify-between tw:daisy-btn-primary tw:w-full tw:md:w-auto tw:w-full",onClick:async()=>{n([!0,"Updating password"]);const[t,o]=await e.updateAccount({password:s});200===t&&"success"===o.result?(i(o.account),n([!0,"Password updated",!0,!0])):n([!0,"Something went wrong. Please report this",!0,!0])},disabled:s.length<4},a.createElement(v.LP,null)," Save"),!o.mfaEnabled&&a.createElement(T.Y,{type:"tip"},a.createElement("h5",null,"Please consider enabling Two-Factor Authentication"),a.createElement("p",null,"We do not enforce a password policy, but we do recommend you enable Two-Factor Authentication to keep your FreeSewing account safe."),a.createElement("p",{className:"tw:text-right tw:m-0 tw:pt-0"},a.createElement(t,{className:"tw:daisy-btn tw:daisy-btn-accent",href:"/account/security/mfa"},"Two-Factor Authentication ",a.createElement(v.wF,{className:"tw:h-6 tw:w-6 tw:ml-2"})))))},ae=({id:t,Link:e})=>{e||(e=C.N_);const{account:o,control:i}=(0,g.F)(),{setLoadingStatus:n}=(0,a.useContext)(u.q),s=(0,b.O)(),{setModal:r}=(0,a.useContext)(f.V),[l,c]=(0,a.useState)(!1),[p,d]=(0,a.useState)(),[h,w]=(0,a.useState)(p?.name),[k,y]=(0,a.useState)(p?.image),[x,B]=(0,a.useState)(!!p?.public),[L,P]=(0,a.useState)(p?.notes||"");(0,a.useEffect)((()=>{t&&(async()=>{n([!0,"Loading pattern from backend"]);const[e,o]=await s.getPattern(t);200===e?(d(o.pattern),w(o.pattern.name),y(o.pattern.image),B(!!o.pattern.public),P(o.pattern.notes),n([!0,"Loaded pattern",!0,!0])):n([!0,"An error occured. Please report this",!0,!1])})()}),[t]);const R=async()=>{n([!0,"Gathering info"]);const t={};(h||h!==p.name)&&(t.name=h),(k||k!==p.image)&&(t.img=k),(L||L!==p.notes)&&(t.notes=L),[!0,!1].includes(x)&&x!==p.public&&(t.public=x),n([!0,"Saving pattern"]);const[e,o]=await s.updatePattern(p.id,t);200===e&&"success"===o.result?(d(o.pattern),c(!1),n([!0,"Nailed it",!0,!0])):n([!0,"An error occured. Please report this.",!0,!1])};if(!p)return null;const F=a.createElement(se,{pattern:p,Link:e,account:o,setModal:r,setEdit:c,togglePublic:async()=>{n([!0,"Updating pattern"]);const t={public:!p.public},[e,o]=await s.updatePattern(p.id,t);200===e&&"success"===o.result?(d(o.pattern),n([!0,"Nailed it",!0,!0])):n([!0,"An error occured. Please report this.",!0,!1])},save:R,clone:async()=>{n([!0,"Cloning pattern"]);const t={...p};delete t.id,delete t.createdAt,delete t.data,delete t.userId,delete t.img,t.name+=" (clone)";const[e,o]=await s.createPattern(t);201===e&&"created"===o.result?(n([!0,"Loading newly created pattern",!0,!0]),window.location=`/account/data/patterns/pattern?id=${o.pattern.id}`):n([!0,"We failed to create this pattern",!0,!1])}});return l?a.createElement("div",{className:"tw:w-full"},a.createElement("h2",null,"Edit pattern ",p.name),a.createElement("span",{id:"name"}),a.createElement(S.YZ,{id:"pattern-name",label:"Name",update:w,current:h,original:p.name,placeholder:"Maurits Cornelis Escher",valid:t=>t&&t.length>0}),a.createElement("span",{id:"image"}),o.control>=m.A4.account.sets.img?a.createElement(S.$n,{id:"pattern-img",label:"Image",update:y,current:k,valid:t=>t.length>0}):null,a.createElement("span",{id:"public"}),o.control>=m.A4.account.patterns.public?a.createElement(S.ZB,{id:"pattern-public",label:"Public",update:B,list:[{val:!0,label:a.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:flex-wrap tw:justify-between tw:w-full"},a.createElement("span",null,"Public Pattern"),a.createElement(v.aV,{className:"tw:w-8 tw:h-8 tw:text-success tw:bg-base-100 tw:rounded-full tw:p-1",stroke:4})),desc:"Public patterns can be shared with other FreeSewing users"},{val:!1,label:a.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:flex-wrap tw:justify-between tw:w-full"},a.createElement("span",null,"Private Pattern"),a.createElement(v.xf,{className:"tw:w-8 tw:h-8 tw:text-error tw:bg-base-100 tw:rounded-full tw:p-1",stroke:3})),desc:"Private patterns are yours and yours alone"}],current:x}):null,a.createElement("span",{id:"notes"}),o.control>=m.A4.account.patterns.notes?a.createElement(S.oZ,{id:"pattern-notes",label:"Notes",update:P,current:L}):null,a.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:align-en
1d tw:gap-2 tw:mt-8"},a.createElement("button",{onClick:()=>c(!1),className:"tw:daisy-btn tw:daisy-btn-primary tw:daisy-btn-outline"},a.createElement(v.NA,null),"Cancel"),a.createElement("button",{onClick:R,className:"tw:daisy-btn tw:daisy-btn-primary tw:grow"},a.createElement(v.JM,null),"Save Pattern"))):a.createElement("div",{className:"tw:w-full"},p.public?a.createElement(T.Y,{type:"note"},a.createElement("h5",null,"This is the private view of your pattern"),a.createElement("p",null,"Everyone can access the public view since this is a public pattern.",a.createElement("br",null),"But only you can access this private view."),a.createElement("p",{className:"tw:text-right"},a.createElement(e,{className:"tw:daisy-btn tw:daisy-btn-secondary tw:hover:text-secondary-content tw:hover:no-underline",href:`/pattern?id=${p.id}`},a.createElement(v.Yp,null),"Public View"))):null,F,i>=m.A4.account.patterns.notes&&a.createElement(a.Fragment,null,a.createElement("h3",null,"Notes"),a.createElement(Ht.oz,null,p.notes)))},ie=({pattern:t,href:e=!1,onClick:o=!1,useA:i=!1,size:n="md",Link:s=!1})=>{s||(s=C.N_);const r={className:`tw:bg-base-300 tw:w-full tw:mb-2 tw:mx-auto tw:flex tw:flex-col tw:items-start tw:text-center tw:justify-center tw:rounded tw:shadow tw:py-4 tw:w-${{lg:96,md:48,sm:36,xs:20}[n]} tw:aspect-square`,style:{backgroundImage:`url(${(0,h.qk)({type:"w1000",id:t.img})})`,backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"50%"}};"default-avatar"===t.img&&(r.style.backgroundPosition="bottom right");const l=null;return o?a.createElement("button",(0,Pt.A)({},r,{onClick:o}),l):e&&!i?a.createElement(s,(0,Pt.A)({},r,{href:e}),l):e&&i?a.createElement("a",(0,Pt.A)({},r,{href:e}),l):a.createElement("div",r,l)},ne=({label:t,href:e})=>a.createElement("a",{href:e,className:"tw:daisy-badge tw:daisy-badge-secondary tw:font-bold tw:daisy-badge-lg tw:hover:text-secondary-content tw:hover:cursor-pointer"},a.createElement("span",{className:"tw:text-secondary-content hover:tw:decoration-0"},t)),se=({pattern:t,Link:e,account:o,setModal:n,setEdit:s,togglePublic:r,clone:l})=>a.createElement(a.Fragment,null,a.createElement("h2",null,t.name),a.createElement("div",{className:"tw:flex tw:flex-row tw:flex-wrap tw:gap-2 tw:text-sm tw:items-center tw:mb-2"},a.createElement(i.F,{k:"ID",val:t.id,color:"secondary"}),a.createElement(i.F,{k:"Created",val:a.createElement(P.fV,{iso:t.createdAt}),color:"secondary"}),a.createElement(i.F,{k:"Updated",val:a.createElement(P.fV,{iso:t.updatedAt}),color:"secondary"}),a.createElement(i.F,{k:"Public",val:t.public?"yes":"no",color:"secondary"})),a.createElement("div",{className:"tw:flex tw:flex-wrap tw:md:flex-nowrap tw:flex-row tw:gap-2 tw:w-full"},a.createElement("div",{className:"tw:w-full tw:md:w-96 tw:shrink-0"},a.createElement(ie,{pattern:t,size:"md",Link:e})),a.createElement("div",{className:"tw:flex tw:flex-col tw:justify-end tw:gap-2 tw:mb-2 tw:grow"},o.control>3&&t.public?a.createElement("div",{className:"tw:flex tw:flex-row tw:gap-2 tw:items-center"},a.createElement(ne,{label:"JSON",href:`${m.DS.backend}/patterns/${t.id}.json`}),a.createElement(ne,{label:"YAML",href:`${m.DS.backend}/patterns/${t.id}.yaml`})):a.createElement("span",null),a.createElement("button",{onClick:()=>n(a.createElement(x.F,{flex:"col",justify:"top tw:lg:justify-center",slideFrom:"right"},a.createElement("img",{src:(0,h.qk)({type:"public",id:t.img})}))),className:`tw:daisy-btn tw:daisy-btn-secondary tw:daisy-btn-outline ${h.f_}`},a.createElement(v.jp,null),"Show Image"),o.control>3?a.createElement("button",{onClick:()=>r(),className:`tw:daisy-btn tw:daisy-btn-${t.public?"error":"success"} tw:daisy-btn-outline ${h.f_} hover:tw:text-${t.public?"error":"success"}-content`},t.public?a.createElement(v.Ty,null):a.createElement(v.zB,null),"Make pattern ",t.public?"private":"public"):null,t.userId===o.id&&a.createElement(a.Fragment,null,a.createElement(e,{href:(0,h.RT)(t,!0),className:`tw:daisy-btn tw:daisy-btn-primary tw:daisy-btn-outline ${h.f_}`},a.createElement(v.Je,null)," Update Pattern"),a.createElement("button",{className:`tw:daisy-btn tw:daisy-btn-primary tw:daisy-btn-outline ${h.f_}`,onClick:l},a.createElement(v.ve,null)," Clone Pattern"),a.createElement("button",{onClick:()=>s(!0),className:`tw:daisy-btn tw:daisy-btn-primary ${h.f_}`},a.createElement(v.qU,null)," Edit Pattern Metadata"))))),re=({Link:t=!1})=>{t||(t=C.N_);const[e,o]=(0,a.useState)([]),[i,n]=(0,a.useState)(0),[s,r]=(0,a.useState)("id"),[l,c]=(0,a.useState)(!1),p=(0,b.O)(),{setLoadingStatus:m,LoadingProgress:f}=(0,a.useContext)(u.q),{count:g,selection:y,setSelection:T,toggle:x,toggleAll:B}=w(e);(0,a.useEffect)((()=>{(async()=>{m([!0,"Loading patterns from backend"]);const[t,e]=await p.getPatterns();console.log({status:t,body:e}),200===t?(o(e.patterns),m([!0,"Patterns loaded",!0,!0])):m([!1,"Failed to load patterns from backend",!0,!0])})()}),[i]);const S={id:"#",img:"Image",name:"Name",design:"Design",createdAt:"Date",public:"Public"};return a.createElement(a.Fragment,null,a.createElement("div",{className:"tw:flex tw:flex-row tw:flex-wrap tw:gap-2 tw:items-center tw:justify-between tw:mb-4"},a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-error",onClick:async()=>{let t=0;for(const e in y)t++,await p.removePattern(e),m([!0,a.createElement(f,{val:t,max:g,msg:"Removing patterns",key:"linter"})]);T({}),n(i+1),m([!0,"Nailed it",!0,!0])},disabled:g<1},a.createElement(v.uc,null)," ",g," Patterns"),a.createElement(t,{className:"tw:daisy-btn tw:daisy-btn-primary tw:capitalize tw:w-full tw:md:w-auto tw:hover:text-primary-content",href:"/editor/"},a.createElement("span",{className:"tw:text-primary-content"},a.createElement(v.c1,null)),a.createElement("span",{className:"tw:text-primary-content"},"Create a new pattern"))),a.createElement(k.A,null,a.createElement("table",{className:"tw:table tw:table-auto"},a.createElement("thead",{className:"tw:border tw:border-base-300 tw:border-b-2 tw:border-t-0 tw:border-x-0"},a.createElement("tr",{className:""},a.createElement("th",{className:""},a.createElement("input",{type:"checkbox",className:"tw:daisy-checkbox tw:daisy-checkbox-secondary",onClick:B,checked:e.length===g})),Object.keys(S).map((t=>a.createElement("th",{key:t},a.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-link tw:capitalize tw:px-0 tw:underline tw:hover:decoration-4 tw:decoration-2 tw:text-secondary",onClick:()=>s===t?c(!l):r(t)},S[t]," ",a.createElement(v.wF,{stroke:3,className:`tw:w-4 tw:h-4 ${l?"tw:-":"tw:"}rotate-90 ${s===t?"":"tw:opacity-0"}`}))))))),a.createElement("tbody",null,d(e,s,l?"desc":"asc").map(((e,o)=>a.createElement("tr",{key:o},a.createElement("td",{className:"tw:text-base tw:font-medium"},a.createElement("input",{type:"checkbox",checked:!!y[e.id],className:"tw:daisy-checkbox tw:daisy-checkbox-secondary",onClick:()=>x(e.id)}
1)),a.createElement("td",{className:"tw:text-base tw:font-medium"},e.id),a.createElement("td",{className:"tw:text-base tw:font-medium"},a.createElement(ie,{href:`/account/data/patterns/pattern?id=${e.id}`,pattern:e,size:"xs",Link:t})),a.createElement("td",{className:"tw:text-base tw:font-medium"},a.createElement(t,{href:`/account/data/patterns/pattern?id=${e.id}`,className:"tw:text-secondary tw:underline tw:decoration-2 tw:hover:decoration-4"},e.name)),a.createElement("td",{className:"tw:text-base tw:font-medium"},a.createElement(t,{href:`/designs/${e.design}`,className:"tw:text-secondary tw:underline tw:decoration-2 tw:hover:decoration-4"},(0,h.ZH)(e.design))),a.createElement("td",{className:"tw:text-base tw:font-medium"},(0,h.XV)(e.createdAt)),a.createElement("td",{className:"tw:text-base tw:font-medium"},e.public?a.createElement(v.zB,null):a.createElement(v.Ty,null)))))))))},le=()=>{const t=(0,b.O)(),{setAccount:e}=(0,g.F)(),{setLoadingStatus:o}=(0,a.useContext)(u.q);return a.createElement("div",{className:"tw:w-full"},a.createElement("p",null,"The data stored in your browser can sometimes get out of sync with the data stored in our backend."),a.createElement("p",null,"This lets you reload your account data from the backend. It has the same effect as signing out, and then signing in again."),a.createElement(L.K,{onClick:async()=>{o([!0,"Contacting backend"]);const[a,i]=await t.reloadAccount();200===a?(e(i.account),o([!0,"All done",!0,!0])):o([!0,"This did not go as planned. Please report this.",!0,!1])}},a.createElement(v.jf,null),"Reload Account Data"))},ce=()=>{const t=(0,b.O)(),{signOut:e,account:o}=(0,g.F)(),{setLoadingStatus:i}=(0,a.useContext)(u.q),{setModal:n,clearModal:s}=(0,a.useContext)(f.V),r=async()=>{i([!0,"Talking to the backend"]);const[o,a]=await t.removeAccount();200===o&&"success"===a.result?(i([!0,"Done. Or rather, gone.",!0,!0]),e(),(0,h.oo)("/")):i([!0,"An error occured. Please report this",!0,!1])};return 5===o.control?a.createElement(a.Fragment,null,a.createElement("p",null,"This button is red for a reason."),a.createElement(L.K,{onClick:r,color:"error"},a.createElement(v.uc,null),"Remove your FreeSewing account")):a.createElement("div",{className:"tw:w-full"},a.createElement(L.K,{onClick:()=>n(a.createElement(x.F,{keepOpenOnClick:!0},a.createElement("div",{className:"tw:text-center tw:w-full"},a.createElement("h2",null,"There is no way back from this"),a.createElement("p",null,"If this is what you want, then go ahead."),a.createElement(L.K,{onClick:r,color:"error",className:"tw:mx-auto"},a.createElement(v.uc,null),"Remove your FreeSewing account"),a.createElement(L.K,{onClick:s,color:"primary",className:"tw:mx-auto tw:daisy-btn-outline tw:mt-4"},a.createElement(v.Z3,null),"Back to safety"))))},a.createElement(v.uc,null),"Remove your FreeSewing account"))},pe=({Link:t=!1})=>{t||(t=C.N_);const e=(0,b.O)(),{signOut:o,account:i}=(0,g.F)(),{setLoadingStatus:n}=(0,a.useContext)(u.q),{setModal:s,clearModal:r}=(0,a.useContext)(f.V),l=async()=>{n([!0,"Talking to the backend"]);const[t]=await e.restrictAccount();200===t?(n([!0,"Done. Consider yourself restrcited.",!0,!0]),o()):n([!0,"An error occured. Please report this",!0,!1])};return 5===i.control?a.createElement(a.Fragment,null,a.createElement("p",null,"This button is red for a reason."),a.createElement(L.K,{onClick:l,color:"error"},a.createElement(v.xf,null),"Remove your FreeSewing account")):a.createElement("div",{className:"tw:w-full"},a.createElement("p",null,"The GDPR guarantees"," ",a.createElement(t,{href:"/docs/about/rights/#the-right-to-restrict-processing",className:h.lD},"your right to restrict processing")," ","of your personal data."),a.createElement("p",null,"This will disable your account, but not remove any data."),a.createElement(L.K,{onClick:()=>s(a.createElement(x.F,{keepOpenOnClick:!0},a.createElement("div",{className:"tw:text-center tw:w-full tw:max-w-xl"},a.createElement("h2",null,"Proceed with caution"),a.createElement("p",null,"While no data will be removed, this will disable your account. Furthermore, you can not undo this on your own, but will have to contact support when you want to restore access to your account."),a.createElement(L.K,{onClick:l,color:"error",className:"tw:mx-auto"},a.createElement(v.xf,{stroke:3}),"Restrict processing of your FreeSewing data"),a.createElement(L.K,{onClick:r,color:"primary",className:"tw:mx-auto tw:daisy-btn-outline tw:mt-4"},a.createElement(v.Z3,null),"Back to safety"))))},a.createElement(v.xf,{stroke:3}),"Restrict processing of your FreeSewing data"))},de=({welcome:t=!1})=>{const{account:e,setAccount:o}=(0,g.F)(),{setLoadingStatus:i}=(0,a.useContext)(u.q),n=(0,b.O)(),[s,r]=(0,a.useState)(!0===e?.imperial?"imperial":"metric"),l=D[e?.control].length>3?"/welcome/"+D[e?.control][3]:"/docs/about/";return a.createElement("div",{className:"tw:w-full"},a.createElement(S.ZB,{id:"account-units",label:"Units",list:["metric","imperial"].map((t=>({val:t,label:a.createElement("div",{className:"tw:flex tw:flex-row tw:items-center tw:w-full tw:justify-between"},a.createElement("span",null,"metric"===t?"Metric units (cm)":"Imperial units (inch)"),a.createElement(B.y,{nr:"imperial"===t?"\u2033":"cm",color:"secondary"})),desc:"metric"===t?"Pick this if you prefere centimeters over inches":"Pick this if you prefer inches over centimeters"}))),current:s,update:async t=>{if(t!==s){i([!0,"Saving units"]);const[e,a]=await n.updateAccount({imperial:"imperial"===t});200===e&&"success"===a.result?(o(a.account),r(a.account.imperial?"imperial":"metric"),i([!0,"Units updated",!0,!0])):i([!0,"Something went wrong. Please report this",!0,!0])}}}),t?a.createElement(a.Fragment,null,a.createElement(L.K,{href:l,className:"tw:mt-4"},a.createElement(v.wF,{stroke:3})," Continue"),D[e?.control].length>0?a.createElement(a.Fragment,null,a.createElement("progress",{className:"tw:daisy-progress tw:daisy-progress-primary tw:w-full tw:mt-12",value:300/D[e?.control].length,max:"100"}),a.createElement("span",{className:"tw:pt-4 tw:text-sm tw:font-bold tw:opacity-50"},"3 / ",D[e?.control].length),a.createElement(j,{done:D[e?.control].slice(0,2),todo:D[e?.control].slice(3),current:"units"})):null):null)},he=()=>{const{account:t}=(0,g.F)();return t.id||null},me=({welcome:t=!1,Link:e=!1})=>{e||(e=C.N_);const{account:o,setAccount:i}=(0,g.F)(),n=(0,b.O)(),{setLoadingStatus:s}=(0,a.useContext)(u.q),[r,l]=(0,a.useState)(o.username),[c,p]=(0,a.useState)(!0),d=D[o.control].length>5?"/welcome/"+D[o.control][5]:"/docs/about/";return a.createElement("div",{className:"tw:w-full"},a.createElement(S.YZ,{id:"account-username",label:"Username",current:r,update:async t=>{if(t!==r){l(t);const e=await n.isUsernameAvailable(t);p(!!e.available)}},valid:()=>c,placeholder:"Sorcha Ni Dhubghaill",labelBL:a.createElement("span",{className:"tw:flex tw:flex-row tw:gap-1 tw:items-center"},c?a.createElement(a.Fragment,null,a.createElement(v.aV,{className:"tw:w-4 tw:h-4 tw:text-success",stroke:4})," Username is available"):a.createElement(a.Fragment,null,a.createElement(v.xf,{className:"tw:w-4 tw:h-4 tw:text-error",stroke:3})," This username is taken"))}),a.createElement("p",{className:"tw:text-right"},a.createElement("button",{disabled:!c,className:"tw:daisy-btn tw:daisy-btn-primary tw:w-full tw:lg:w-auto tw:mt-8",onClick:async()=>{s([!0,"Saving username"]);const[t,e]=await n.updateAccount({username:r});200===t&&"success"===e.result?(i(e.account),s([!0,"Username updated",!0,!0])):s([!0,"Something went wrong. Please report this",!0,!0])}},a.createElement(v.LP,null)," Save Username")),t?a.createElement(a.Fragment,null,a.createElement(L.K,{href:d,className:"tw:mt-4"},a.createElement(v.wF,{stroke:3})," Continue"),D[o.control].length>0?a.createElement(a.Fragment,null,a.createElement("progress",{className:"tw:daisy-progress tw:daisy-progress-primary tw:w-full tw:mt-12",value:500/D[o.control].length,max:"100"}),a.createElement("span",{className:"tw:pt-4 tw:text-sm tw:font-bold tw:opacity-50"},"5 / ",D[o.control].length),a.createElement(j,{done:D[o.control].slice(0,4),todo:D[o.control].slice(5),current:"username"})):null):null)},fe=({role:t})=>"user"===t?a.createElement(ue,null):"admin"===t?a.createElement(ge,null):a.createElement("b",null,"fixme"),ue=()=>a.createElement(i.F,{k:"role",val:"user",color:"success"}),ge=()=>a.createElement(i.F,{k:"role",val:"admin",color:"error"})},48831:(t,e,o)=>{o.d(e,{F:()=>r});var a=o(14041),i=o(50182),n=o(95069);const s={left:"tw:-translate-x-full",right:"tw:translate-x-full",top:"tw:-translate-y-full",bottom:"tw:translate-y-full"},r=({children:t=null,flex:e="row",justify:o="center",items:r="center",bg:l="neutral",bgOpacity:c="70",bare:p=!1,keepOpenOnClick:d=!1,slideFrom:h="left",fullWidth:m=!1,wide:f=!1})=>{const{clearModal:u}=(0,a.useContext)(i.V),[g,b]=(0,a.useState)("in"),w=t=>{t?.event&&t.event.stopPropagation(),b("out"),window.setTimeout(u,150)};(0,a.useEffect)((()=>{"in"===g&&b(!1)}),[g]);const k=g?`tw:lg:opacity-0 ${s[h]}
1 tw:lg:translate-x-0 tw:lg:translate-y-0`:"tw:opacity-100 tw:translate-none";return a.createElement("div",{className:`tw:fixed tw:top-0 tw:left-0 tw:m-0 tw:p-0 tw:shadow tw:w-full tw:h-screen\n        tw:transform-all tw:duration-150 ${k}\n        tw:bg-${l}/${c} tw:hover:cursor-pointer\n        tw:flex tw:flex-${e} tw:justify-${o} tw:items-${r} tw:lg:p-12 tw:backdrop-blur-md`,onClick:w,style:{zIndex:250}},p?t:a.createElement("div",{onClick:d?t=>{t.target.attributes.href||t.stopPropagation()}:null,className:`tw:z-30 tw:bg-base-100 tw:p-4 tw:lg:px-8 tw:lg:rounded-lg tw:lg:shadow-lg tw:max-h-full tw:overflow-auto tw:hover:cursor-default ${m?"tw:w-full":""} ${f?"tw:max-w-5xl tw:w-full":""} `},t,a.createElement("button",{className:"tw:fixed tw:bottom-2 tw:right-2 tw:daisy-btn tw:daisy-btn-neutral tw:daisy-btn-circle tw:lg:hidden",onClick:w},a.createElement(n.US,{className:"tw:w-8 tw:h-8"}))))}},49390:(t,e,o)=>{o.r(e),o.d(e,{assets:()=>R,contentTitle:()=>P,default:()=>W,frontMatter:()=>L,metadata:()=>a,toc:()=>F});const a=JSON.parse('{"id":"reference/packages/react/components/admin/readme","title":"Admin","description":"- Components","source":"@site/docs/reference/packages/react/components/admin/readme.mdx","sourceDirName":"reference/packages/react/components/admin","slug":"/reference/packages/react/components/admin/","permalink":"/reference/packages/react/components/admin/","draft":false,"unlisted":false,"editUrl":"https://codeberg.org/freesewing/freesewing/src/branch/develop/sites/dev/docs/reference/packages/react/components/admin/readme.mdx","tags":[],"version":"current","frontMatter":{"title":"Admin"},"sidebar":"tutorialSidebar","previous":{"title":"Account","permalink":"/reference/packages/react/components/account/"},"next":{"title":"Breadcrumbs","permalink":"/reference/packages/react/components/breadcrumbs/"}}');var i=o(31085),n=o(71184),s=o(78688),r=o(86354);const l={family:"admin",name:"SubscriberAdministration",file:"packages/react/components/Admin/index.mjs",line:25,importAs:'import { SubscriberAdministration } from "@freesewing/react/components/Admin"',desc:"A component to manage FreeSewing newsletter subscribers (requires admin role)",return:[{type:{names:["JSX.Element"]}}]},c={family:"admin",name:"UserAdministration",file:"packages/react/components/Admin/index.mjs",line:121,importAs:'import { UserAdministration } from "@freesewing/react/components/Admin"',desc:"A component to manage FreeSewing users (requires the admin role)",params:[{type:{names:["object"]},description:"All component props",name:"props"},{type:{names:["React.Component"]},description:"A framework specific Link component for client-side routing",name:"props.Link"}],return:[{type:{names:["JSX.Element"]}}]};var p=o(86560),d=o(14041),h=o(68024),m=o(25578),f=o(1199),u=o(50182),g=o(85627),b=o(56702),w=o(95069),k=o(71336),C=o(48831),v=o(48487);const y=()=>{const[t,e]=(0,d.useState)(),[o,a]=(0,d.useState)(),[i,n]=(0,d.useState)([]),s=(0,m.O)(),r=async()=>{const[t,o]=await s.adminLoadSubscribers();200===t&&o.subscribers&&e(o.subscribers)},l=async()=>{t||await r();const e=[];for(const a in t)e.push(...t[a].filter((t=>t.email.toLowerCase().includes(o.toLowerCase()))).map((t=>({...t,lang:a}))));n(e)};return d.createElement(d.Fragment,null,t?d.createElement(d.Fragment,null,d.createElement("h5",null,"Search subscribers"),d.createElement("div",{className:"tw:flex tw:flex-row tw:gap-2 tw:items-center"},d.createElement("input",{autoFocus:!0,value:o,onChange:t=>a(t.target.value),className:"tw:daisy-input tw:w-full tw:daisy-input-bordered tw:flex tw:flex-row",type:"text",placeholder:"Username, ID, or E-mail address"}),d.createElement("button",{onClick:l,className:"tw:daisy-btn tw:daisy-btn-primary"},d.createElement(w.WI,null))),d.createElement("table",{className:"tw:table tw:my-4"},d.createElement("thead",null,d.createElement("tr",null,d.createElement("th",{className:"tw:text-right"},"Email"),d.createElement("th",{className:"tw:w-12"}
1,"Language"),d.createElement("th",null,"Unsubscribe"))),d.createElement("tbody",null,i.map(((t,e)=>d.createElement("tr",{key:e},d.createElement("td",{className:"tw:text-right"},d.createElement("b",null,t.email)),d.createElement("td",{className:"tw:w-12"},t.lang.toUpperCase()),d.createElement("td",{className:"tw:w-full"},d.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-link",onClick:()=>(async t=>{await s.newsletterUnsubscribe(t),await r(),await l()})(t.ehash)},"Unsubscribe")))))))):d.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-primary tw:daisy-btn-lg",onClick:r},"Load Subscribers"))},T=({Link:t=!1})=>{const e=(0,m.O)(),[o,a]=(0,d.useState)(""),[i,n]=(0,d.useState)(),[s,r]=(0,d.useState)(!1);return d.createElement(d.Fragment,null,d.createElement("div",{className:"tw:flex tw:flex-row tw:gap-8 tw:items-start tw:w-full"},d.createElement("div",{className:"tw:grow"},d.createElement("h5",null,"Search users"),d.createElement("div",{className:"tw:flex tw:flex-row tw:gap-2 tw:items-center"},d.createElement("input",{autoFocus:!0,value:o,onChange:t=>a(t.target.value),className:"tw:daisy-input tw:w-full tw:daisy-input-bordered tw:flex tw:flex-row",type:"text",placeholder:"Username, ID, or E-mail address"}),d.createElement("button",{onClick:async()=>{r(!0);const[t,a]=await e.adminSearchUsers(o);200===t&&"success"===a.result&&a.users&&n(a.users),r(!1)},className:"tw:daisy-btn tw:daisy-btn-primary",disabled:o.length<3},d.createElement(w.WI,null))),s?d.createElement(g.y,null):d.createElement(x,{backend:e,results:i,Link:t}))))},x=({results:t,Link:e=!1})=>(e||(e=b.N_),d.createElement(d.Fragment,null,t&&t.username&&t.username.length>0&&d.createElement(d.Fragment,null,d.createElement("h2",null,"Results based on username"),t.username.map((t=>d.createElement(B,{user:t,key:t.id,Link:e})))),t&&t.email&&t.email.length>0&&d.createElement(d.Fragment,null,d.createElement("h2",null,"Results based on E-mail address"),t.email.map((t=>d.createElement(B,{user:t,key:t.id,Link:e})))))),B=({user:t,Link:e})=>{const{setModal:o}=(0,d.useContext)(u.V),{setLoadingStatus:a}=(0,d.useContext)(f.q),i=(0,m.O)();return d.createElement("div",{className:"tw:flex tw:flex-row tw:w-full tw:gap-4 tw:my-2"},d.createElement("button",{className:"tw:w-24 tw:h-24 tw:bg-base-100 tw:rounded-lg tw:shadow tw:shrink-0",onClick:()=>o(d.createElement(C.F,null,d.createElement("img",{src:(0,p.Ip)({ihash:t.ihash,variant:"public"})}))),style:{backgroundImage:`url(${(0,p.Ip)({ihash:t.ihash,variant:"sq500"})})`,backgroundSize:"cover",backgroundColor:"#ccc"}}),d.createElement("div",{className:"tw:w-full tw:flex tw:flex-col tw:gap-1"},d.createElement("div",{className:"tw:w-full tw:flex tw:flex-row tw:flex-wrap tw:gap-1"},d.createElement(e,{href:`/users/?id=${t.id}`},t.username),d.createElement(k.F,{k:"id",val:t.id})),d.createElement("div",{className:"tw:w-full tw:flex tw:flex-row tw:flex-wrap tw:gap-1"},d.createElement(v.gG,{role:t.role}),d.createElement(v.u1,{status:t.status})),d.createElement("div",{className:"tw:w-full tw:flex tw:flex-row tw:flex-wrap tw:gap-1"},d.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-primary tw:daisy-btn-sm tw:daisy-btn-outline",onClick:()=>o(d.createElement(C.F,null,d.createElement("pre",null,JSON.stringify(t,null,2))))},"Details"),d.createElement(S,{userId:t.id}),t.mfaEnabled?d.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-warning tw:daisy-btn-sm",onClick:async()=>{a([!0,"Contacting backend"]);const[e,o]=await i.adminUpdateUser({id:t.id,data:{mfaEnabled:!1}});200===e&&"success"===o.result?a([!0,"MFA disabled",!0,!0]):a([!0,"An error occured",!0,!1])}},"Disable MFA"):null,t.consent<1?d.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-warning tw:daisy-btn-sm",onClick:async()=>{a([!0,"Contacting backend"]);const[e,o]=await i.adminUpdateUser({id:t.id,data:{consent:2}});200===e&&"success"===o.result?a([!0,"Consent updated",!0,!0]):a([!0,"An error occured",!0,!1])}},"Grant Consent"):null,-1===t.status?d.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-warning tw:daisy-btn-sm",onClick:async()=>{a([!0,"Contacting backend"]);
1const[e,o]=await i.adminUpdateUser({id:t.id,data:{status:1}});200===e&&"success"===o.result?a([!0,"Status updated",!0,!0]):a([!0,"An error occured",!0,!1])}},"Unfreeze Account"):null)))},S=({userId:t})=>{const e=(0,m.O)(),{setLoadingStatus:o}=(0,d.useContext)(f.q),{impersonate:a}=(0,h.F)();if(!t)return null;return d.createElement("button",{className:"tw:daisy-btn tw:daisy-btn-primary tw:daisy-btn-sm tw:daisy-btn-outline",onClick:async()=>{o([!0,"Contacting backend"]);const[i,n]=await e.adminImpersonateUser(t);200===i&&"success"===n.result?(a(n),o([!0,"Now impersonating",!0,!0])):o([!0,"An error occured",!0,!1])}},"Impersonate")},L={title:"Admin"},P=void 0,R={},F=[{value:"Components",id:"components",level:2},{value:"SubscriberAdministration",id:"subscriberadministration",level:3},{value:"UserAdministration",id:"useradministration",level:3}];function E(t){const e={a:"a",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,n.R)(),...t.components};return(0,i.jsxs)(s.Bv,{children:[(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:(0,i.jsx)(e.a,{href:"#components",children:"Components"})}),"\n"]}),(0,i.jsx)(e.h2,{id:"components",children:"Components"}),(0,i.jsxs)(e.p,{children:["The ",(0,i.jsx)(e.strong,{children:"Admin"})," component family provides the following ",(0,i.jsx)(e.a,{href:"#components",children:"components"}),":"]}),(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:(0,i.jsx)(e.a,{href:"#subscriberadministration",children:"SubscriberAdministration "})}),"\n",(0,i.jsx)(e.li,{children:(0,i.jsx)(e.a,{href:"#useradministration",children:"UserAdministration "})}),"\n"]}),(0,i.jsx)(e.h3,{id:"subscriberadministration",children:"SubscriberAdministration"}),(0,i.jsx)(r.F,{docs:l,example:y}),(0,i.jsx)(e.h3,{id:"useradministration",children:"UserAdministration"}),(0,i.jsx)(r.F,{docs:c,example:T})]})}function W(t={}){const{wrapper:e}={...(0,n.R)(),...t.components};return e?(0,i.jsx)(e,{...t,children:(0,i.jsx)(E,{...t})}):E(t)}},49418:(t,e,o)=>{o.d(e,{qV:()=>I});var a=o(99025);const i=JSON.parse('{"id":"plugin-measurements","r":"4.6.0"}'),n={name:i.id,version:i.r,hooks:{preDraft:function({settings:t}){for(const e of t)e.measurements&&(void 0!==e.measurements.seatBack&&void 0!==e.measurements.seat&&(e.measurements.seatFront=e.measurements.seat-e.measurements.seatBack,e.measurements.seatBackArc=e.measurements.seatBack/2,e.measurements.seatFrontArc=e.measurements.seatFront/2),void 0!==e.measurements.waist&&void 0!==e.measurements.waistBack&&(e.measurements.waistFront=e.measurements.waist-e.measurements.waistBack,e.measurements.waistBackArc=e.measurements.waistBack/2,e.measurements.waistFrontArc=e.measurements.waistFront/2),void 0!==e.measurements.crossSeam&&void 0!==e.measurements.crossSeamFront&&(e.measurements.crossSeamBack=e.measurements.crossSeam-e.measurements.crossSeamFront))}}},s=n,r=JSON.parse('{"id":"plugin-mirror","r":"4.6.0"}'),l=(t,e)=>{const{x:o,y:a}=t,{x:i,y:n}=e,[s,r]=[-(n-a),i-o];return[s,r,-(s*o+r*a)]},c=(t,e)=>{const[o,a,i]=l(t,e);return t=>{const{x:e,y:n}=t,s=(a**2-o**2)*e-2*o*a*n-2*o*i,r=(o**2-a**2)*n-2*o*a*e-2*a*i,l=o**2+a**2;t.x=s/l,t.y=r/l;const c=Number(t.attributes.get("data-mirrored"));return c>0&&t.log&&t.log.warn(`Point ${t.name} was mirrored more than once (${c+1}) which can lead to hard to trace bugs`),t.attributes.set("data-mirrored",c+1),t}},p=t=>t.charAt(0).toUpperCase()+t.slice(1),d={name:r.id,version:r.r,macros:{mirror:function({mirror:t,clone:e=!0,points:o=[],paths:a=[],snippets:i=[],prefix:n="mirrored",nameFormat:s,reverse:r=!1}){const[l,d]=t,h=c(l,d);for(const c of a)if(this.paths[c]){let t=e?this.paths[c].clone():this.paths[c];t=r?t.reverse():t;const o=e?"function"==typeof s?s(c,"path"):`${n}${p(c)}`:c;for(const e of t.ops)switch(e.type){case"move":case"line":e.to=h(e.to);break;case"curve":e.to=h(e.to),e.cp1=h(e.cp1),e.cp2=h(e.cp2)}this.paths[o]=t}for(const c of o)if(this.points[c]){const t=h(e?this.points[c].clone():this.points[c]),o=e?"function"==typeof s?s(c,"point"):`${n}${p(c)}`:c;this.points[o]=t}for(const c of i)if(this.snippets[c]){const t=this.snippets[c].anchor.name,o=e?this.snippets[c].clone():this.snippets[c],a=e?"function"==typeof s?s(c,"snippet"):`${n}${p(c)}`:c;this.snippets[a]=o;const i=h(o.anchor);if(this.points[t]){const a=e?"function"==typeof s?s(t,"point"):`${n}${p(t)}`:t;this.points[a]=i,o.anchor=this.points[a]}else o.anchor=i}}},methods:{lineValues:l,mirrorGen:c}},h=d,m=JSON.parse('{"id":"plugin-transform","r":"4.6.0"}'),f=(t,e,o,a)=>(t.x=(t.x-a.x)*e+a.x,t.y=(t.y-a.y)*o+a.y,t),u={name:m.id,version:m.r,macros:{transform:function({transform:t=Object.freeze({rotate:"rotate",translate:"translate",scale:"scale"}),x:e=0,y:o,angle:a=0,c:i=new this.Point(0,0),clone:n=!0,points:s=[],paths:r=[],prefix:l="transformed_"}){void 0===o&&(o=e);for(const c of r)if(this.paths[c]){const s=n?this.paths[c].clone():this.paths[c],r=n?"function"==typeof l?l(c,"path"):`${l}${c}`:c;switch(t){case"rotate":this.paths[r]=s.rotate(a,i);break;case"translate":this.paths[r]=s.translate(e,o);break;case"scale":for(const t of s.ops)switch(t.type){case"curve":t.cp1=f(t.cp1,e,o,i),t.cp2=f(t.cp2,e,o,i);case"move":case"line":t.to=f(t.to,e,o,i)}this.paths[r]=s}}for(const c of s)if(this.points[c]){const s=n?this.points[c].clone():this.points[c],r=n?"function"==typeof l?l(c,"point"):`${l}${c}`:c;switch(t){case"rotate":this.points[r]=s.rotate(a,i);break;case"translate":this.points[r]=s.translate(e,o);break;case"scale":this.points[r]=f(s,e,o,i)}}}}},g=u,b=JSON.parse('{"id":"plugin-round","r":"4.6.0"}'),w=["start","cp1","cp2","end"],k=["path"],C={name:b.id,version:b.r,macros:{round:function(t,{points:e,paths:o,Point:a,Path:i,store:n}
1){const s=.55191502449,{from:r=new a(0,0),to:l=new a(666,666),via:c=new a(666,0),id:p="round",classes:d="",hide:h=!0}=t;let{radius:m=66.6}=t;const f=n.generateMacroIds(w,p),u=n.generateMacroIds(k,p),g={...f,...u},b=r.dist(c),C=l.dist(c);return(m>b||m>C)&&(m=b>C?C:b),e[g.start]=c.shiftTowards(r,m),e[g.cp1]=c.shiftTowards(r,m*(1-s)),e[g.cp2]=c.shiftTowards(l,m*(1-s)),e[g.end]=c.shiftTowards(l,m),o[g.path]=(new i).move(this.points[g.start]).curve(e[g.cp1],e[g.cp2],e[g.end]).addClass(d),h?o[g.path].hide():o[g.path].unhide(),n.storeMacroIds(t.id,{paths:u,points:f}),n.getMacroIds(t.id)}}},v=C,y=JSON.parse('{"id":"plugin-sprinkle","r":"4.6.0"}'),T={name:y.id,version:y.r,macros:{sprinkle:function(t,{snippets:e,Snippet:o,points:a}){for(let i of t.on)e[i+"-"+t.snippet]=new o(t.snippet,a[i]),t.scale&&e[i+"-"+t.snippet].attr("data-scale",t.scale),t.rotate&&e[i+"-"+t.snippet].attr("data-rotate",t.rotate)}}},x=T,B=JSON.parse('{"id":"plugin-bin-pack","r":"4.6.0"}'),S=function({maxWidth:t=1/0,maxHeight:e=1/0,strictMax:o=!1}){this.maxWidth=t,this.maxHeight=e,this.strictMax=o,this.ensureSquare=t===1/0&&e===1/0};S.prototype={fit:function(t){let e,o,a,i,n=t.length;if(0===n)return;let s=this.strictMax&&this.maxWidth<1/0?Math.max(t[0].width,this.maxWidth):t[0].width,r=this.strictMax&&this.maxHeight<1/0?this.maxHeight:t[0].height;for(this.root={x:0,y:0,width:s,height:r},e=0;e<n;e++)a=t[e],(o=this.findNode(this.root,a.width,a.height))?(i=this.splitNode(o,a.width,a.height),a.x=i.x,a.y=i.y):(i=this.growNode(a.width,a.height),a.x=i.x,a.y=i.y)},findNode:function(t,e,o){return t.used?this.findNode(t.right,e,o)||this.findNode(t.down,e,o):e<=t.width&&o<=t.height?t:null},splitNode:function(t,e,o){t.used=!0;const a=t.y+o;t.down={x:t.x,y:a,width:t.width,height:Math.min(t.height-o,this.maxHeight-a)};const i=t.x+e;return t.right={x:i,y:t.y,width:Math.min(t.width-e,this.maxWidth-i),height:o},t},growNode:function(t,e){let o=t<=this.root.width,a=e<=this.root.height;const i=this.root.width+t;let n=a&&(this.ensureSquare?this.root.height:this.maxWidth)>=i;const s=this.root.height+e;let r=o&&(this.ensureSquare?this.root.width:this.maxHeight)>=s;return n?this.growRight(t,e):r?this.growDown(t,e):a?this.growRight(t,e):o?this.growDown(t,e):null},growRight:function(t,e){let o;return this.root={used:!0,x:0,y:0,width:this.root.width+t,height:this.root.height,down:this.root,right:{x:this.root.width,y:0,width:t,height:this.root.height}},(o=this.findNode(this.root,t,e))?this.splitNode(o,t,e):null},growDown:function(t,e){let o;return this.root={used:!0,x:0,y:0,width:this.root.width,height:this.root.height+e,down:{x:0,y:this.root.height,width:this.root.width,height:e},right:this.root},(o=this.findNode(this.root,t,e))?this.splitNode(o,t,e):null}};const L={inPlace:!0},P={name:B.id,version:B.r,store:[["pack",(t,e,o)=>{const a={...L,...o.pattern.settings[0]},i=new S(a),n=a.inPlace||!1;let s=e.map((function(t){return n?t:{width:t.width,height:t.height,item:t}}));const r=s.sort((function(t,e){return e.width-t.width}))[0].width,l=a.maxWidth&&r>a.maxWidth;s=s.sort((function(t,e){return a.maxWidth&&!a.maxHeight&&l?e.width-t.width:a.maxWidth&&!a.maxHeight||a.maxHeight?e.height-t.height:e.width*e.height-t.width*t.height})),i.fit(s);const c={width:s.reduce((function(t,e){return Math.max(t,e.x+e.width)}),0),height:s.reduce((function(t,e){return Math.max(t,e.y+e.height)}),0)};return n||(c.items=s),c}]]},R=P,F=JSON.parse('{"id":"core-plugins","r":"4.6.0"}'),E=[a.Sr,s,h,v,x,g,R],W={},H={},A=[];function O(t){for(const e in t.hooks){void 0===W[e]&&(W[e]=[]);const o=t.hooks[e];if("function"==typeof o)W[e].push(o);else if("object"==typeof o)for(let t of o)W[e].push(t)}}function D(t){for(const e in t.macros)H[e]=t.macros[e]}function N(t){t.store&&A.push(...t.store)}for(const M of E)O(M),D(M),N(M);const I={name:F.id,version:F.r,store:A,hooks:W,macros:H}},50182:(t,e,o)=>{o.d(e,{V:()=>i,i:()=>n});var a=o(14041);const i=(0,a.createContext)(null),n=({children:t})=>{const[e,o]=(0,a.useState)({setModal:function(t){o({...e,modalContent:t})},clearModal:function(){o({...e,modalContent:null})},modalContent:null});return a.createElement(i.Provider,{value:e},t)}},52665:(t,e,o)=>{o.d(e,{wA:()=>n,pT:()=>Ot,dd:()=>l,bR:()=>r,ZH:()=>x,Qr:()=>b,Ey:()=>E,B0:()=>st,fC:()=>g,V9:()=>yt,D4:()=>N,lL:()=>I,Wx:()=>M,U1:()=>j,VT:()=>V,rE:()=>Dt});var a={};o.r(a),o.d(a,{__addNonEnumProp:()=>Q,__asNumber:()=>q,__isCoord:()=>Z,__macroName:()=>tt,applyTransformToPoint:()=>nt,beamIntersectsCircle:()=>w,beamIntersectsCurve:()=>T,beamIntersectsLine:()=>O,beamIntersectsX:()=>k,beamIntersectsY:()=>C,beamsIntersect:()=>v,capitalize:()=>x,cbqc:()=>b,circlesIntersect:()=>B,combineTransforms:()=>it,curveEdge:()=>S,curveIntersectsX:()=>L,curveIntersectsY:()=>P,curveParameterFromPoint:()=>Y,curvesIntersect:()=>R,deg2rad:()=>F,generateStackTransform:()=>
1E,getSnappedPercentageValue:()=>W,getTransformedBounds:()=>st,goldenRatio:()=>g,lineIntersectsCircle:()=>H,lineIntersectsCurve:()=>D,linesIntersect:()=>A,mergeI18n:()=>N,mergeOptions:()=>I,pctBasedOn:()=>M,pctBasedOnSa:()=>_,pointOnBeam:()=>G,pointOnCurve:()=>U,pointOnLine:()=>$,projectPointOntoCurve:()=>lt,projectPointOntoLine:()=>rt,rad2deg:()=>z,round:()=>J,snappedPctOption:()=>j,splitCurve:()=>K,stretchToScale:()=>V,units:()=>X});var i=o(48122);class n extends i.w{reduce(){const t=this.getUtils(),e=.001;if(!(this.length()>0))return[];let o,a,i,n=0,s=[],r=[],l=this.extrema().values;for(;l[0]<e;)l.shift();for(;l[l.length-1]>.999;)l.shift();for(l.unshift(0),l.push(1),a=l[0],o=1;o<l.length;o++)n=l[o],i=this.split(a,n),i._t1=a,i._t2=n,s.push(i),a=n;return s.forEach((function(o){r.push(...function(o){const a=[];let i=0;if(!(o._t2-o._t1>=e))return[];if(o.simple())return[o];for(;i<1&&!o.split(i,1).simple();){let t=i+e,n=1,s=i+e;if(t>n)break;for(let e=0;e<20;e++){const a=(t+n)/2;if(o.split(i,a).simple()?(s=a,t=a):n=a,i!==s&&e>=5)break}a.push(s),i=s}a.push(1);const n=[];let s=0;for(const e of a){const a=o.split(s,e);a._t1=t.map(s,0,1,o._t1,o._t2),a._t2=t.map(e,0,1,o._t1,o._t2),n.push(a),s=e}return n}(o))})),r}}function s(){return this.list={},this}function r(t,e){this.x=t,this.y=e,this.attributes=new s}function l(){return this.hidden=!1,this.ops=[],this.attributes=new s,this.topLeft=!1,this.bottomRight=!1,this}s.prototype.add=function(t,e){return void 0===this.list[t]&&(this.list[t]=[]),this.list[t].push(e),this},s.prototype.asPropsIfPrefixIs=function(t=""){let e={},o=t.length;for(let a in this.list)if(a.substr(0,o)===t){let t=a.substr(o);"class"===t&&(t="className"),e[t]=this.get(a)}return e},s.prototype.asRenderProps=function(){const t={list:this.list,forSvg:this.render()},e=this.getAsArray("data-circle");e&&(t.circle=e,t.circleProps=this.asPropsIfPrefixIs("data-circle-"));const o=this.getAsArray("data-text");return o&&(t.text=o,t.textProps=this.asPropsIfPrefixIs("data-text-")),t},s.prototype.clone=function(){let t=new s;return t.list=JSON.parse(JSON.stringify(this.list)),t},s.prototype.get=function(t){return void 0!==this.list[t]&&this.list[t].join(" ")},s.prototype.getAsArray=function(t){return void 0!==this.list[t]&&this.list[t]},s.prototype.remove=function(t){return delete this.list[t],this},s.prototype.render=function(){let t="";for(let e in this.list)t+=` ${e}="${this.list[e].join(" ")}"`;return t},s.prototype.renderAsCss=function(){let t="";for(let e in this.list)t+=` ${e}:${this.list[e].join(" ")};`;return t},s.prototype.renderIfPrefixIs=function(t=""){let e="",o=t.length;for(let a in this.list)a.substr(0,o)===t&&(e+=` ${a.substr(o)}="${this.list[a].join(" ")}"`);return e},s.prototype.set=function(t,e){return this.list[t]=[e],this},s.prototype.setIfUnset=function(t,e){return void 0===this.list[t]&&(this.list[t]=[e]),this},r.prototype.addCircle=function(t=!1,e=!1){return t&&this.attributes.add("data-circle",t),e&&this.attributes.add("data-circle-class",e),this.__check()},r.prototype.addText=function(t="",e=!1){return this.attributes.add("data-text",t),e&&this.attributes.add("data-text-class",e),this.__check()},r.prototype.angle=function(t){let e=Math.atan2(-1*this.__check().dy(t.__check()),this.dx(t));for(;e<0;)e+=2*Math.PI;return z(e)},r.prototype.attr=function(t,e,o=!1){return o?this.attributes.set(t,e):this.attributes.add(t,e),this.__check()},r.prototype.clone=function(){this.__check();const t=new r(this.x,this.y).__withLog(this.log);return t.attributes=this.attributes.clone(),t},r.prototype.copy=function(){return new r(this.__check().x,this.y).__withLog(this.log)},r.prototype.dist=function(t){const e=this.__check().x-t.__check().x,o=this.y-t.y;return Math.hypot(e,o)},r.prototype.dx=function(t){return t.__check().x-this.__check().x},r.prototype.dy=function(t){return t.__check().y-this.__check().y},r.prototype.flipX=function(t=!1){return this.__check(),t&&(t instanceof r!=!0&&this.log.warn("Called `Point.flipX(that)` but `that` is not a `Point` object"),t.__check()),!1===t||0===t.x?new r(-1*this.x,this.y).__withLog(this.log):new r(t.x+this.dx(t),this.y).__withLog(this.log)},r.prototype.flipY=function(t=!1){return this.__check(),t&&(t instanceof r!=!0&&this.log.warn("Called `Point.flipY(that)` but `that` is not a `Point` object"),t.__check()),!1===t||0===t.y?new r(this.x,-1*this.y).__withLog(this.log):new r(this.x,t.y+this.dy(t)).__withLog(this.lo)},r.prototype.rotate=function(t,e){"number"!=typeof t&&this.log.warn("Called `Point.rotate(deg,that)` but `deg` is not a number"),e instanceof r!=!0&&this.log.warn("Called `Point.rotate(deg,that)` but `that` is not a `Point` object");const o=this.__check().dist(e.__check()),a=this.angle(e);return new r(e.x+o*Math.cos(F(a+t))*-1,e.y+o*Math.sin(F(a+t))).__withLog(this.log)}
1,r.prototype.setCircle=function(t=!1,e=!1){return t&&this.attributes.set("data-circle",t),e&&this.attributes.set("data-circle-class",e),this.__check()},r.prototype.setText=function(t="",e=!1){return this.attributes.set("data-text",t),e&&this.attributes.set("data-text-class",e),this.__check()},r.prototype.shift=function(t,e){t=q(t,"deg","Point.shift",this.log),e=q(e,"dist","Point.shift",this.log);let o=this.__check().copy();return o.x+=e,o.rotate(t,this)},r.prototype.shiftFractionTowards=function(t,e){return t instanceof r!=!0&&this.log.warn("Called `Point.shiftFractionTowards(that, fraction)` but `that` is not a `Point` object"),"number"!=typeof e&&this.log.warn("Called `Point.shiftFractionTowards` but `fraction` is not a number"),this.__check().shiftTowards(t.__check(),this.dist(t)*e)},r.prototype.shiftOutwards=function(t,e){return e=q(e,"distance","Point.shiftOutwards",this.log),t instanceof r!=!0&&this.log.warn("Called `Point.shiftOutwards(that, distance)` but `that` is not a `Point` object"),this.__check(),t.__check(),this.__check().shiftTowards(t.__check(),this.dist(t)+e)},r.prototype.shiftTowards=function(t,e){return e=q(e,"dist","Point.shiftTowards",this.log),t instanceof r!=!0&&this.log.warn("Called `Point.shiftTowards(that, distance)` but `that` is not a `Point` object"),this.__check().shift(this.angle(t.__check()),e)},r.prototype.sitsOn=function(t){return t instanceof r!=!0&&this.log.warn("Called `Point.sitsOn(that)` but `that` is not a `Point` object"),this.__check().x===t.__check().x&&this.y===t.y},r.prototype.sitsRoughlyOn=function(t){return t instanceof r!=!0&&this.log.warn("Called `Point.sitsRoughlyOn(that)` but `that` is not a `Point` object"),Math.round(this.__check().x)===Math.round(t.__check().x)&&Math.round(this.y)===Math.round(t.y)},r.prototype.slope=function(t){return(t.__check().y-this.__check().y)/(t.x-this.x)},r.prototype.translate=function(t,e){this.__check(),"number"!=typeof t&&this.log.warn("Called `Point.translate(x,y)` but `x` is not a number"),"number"!=typeof e&&this.log.warn("Called `Point.translate(x,y)` but `y` is not a number");const o=this.copy();return o.x+=t,o.y+=e,o},r.prototype.asRenderProps=function(){return{x:this.x,y:this.y,attributes:this.attributes.asRenderProps()}},r.prototype.__check=function(){return"number"!=typeof this.x&&this.log.warn("X value of `Point` is not a number"),"number"!=typeof this.y&&this.log.warn("Y value of `Point` is not a number"),this},r.prototype.__withLog=function(t=!1){return t&&Object.defineProperty(this,"log",{value:t}),this},l.prototype._curve=function(t,e){e instanceof r!=!0&&this.log.warn("Called `Path._curve(cp2, to)` but `to` is not a `Point` object"),t instanceof r!=!0&&this.log.warn("Called `Path._curve(cp2, to)` but `cp2` is not a `Point` object");let o=this.ops.slice(-1).pop().to;return this.ops.push({type:"curve",cp1:o,cp2:t,to:e}),this},l.prototype.addClass=function(t=!1){return t&&this.attributes.add("class",t),this},l.prototype.addText=function(t="",e=!1){return this.attributes.add("data-text",t),e&&this.attributes.add("data-text-class",e),this},l.prototype.asPathstring=function(){let t="";for(let e of this.ops)switch(e.type){case"move":t+=`M ${J(e.to.x)},${J(e.to.y)}`;break;case"line":t+=` L ${J(e.to.x)},${J(e.to.y)}`;break;case"curve":t+=` C ${J(e.cp1.x)},${J(e.cp1.y)} ${J(e.cp2.x)},${J(e.cp2.y)} ${J(e.to.x)},${J(e.to.y)}`;break;case"close":t+=" z"}return t};function c(t,e){if(t&&"object"==typeof t)if("number"==typeof t.x)e.length>0&&Math.abs(t.x-e[e.length-1].x)<.001&&Math.abs(t.y-e[e.length-1].y)<.001||e.push(t);else{e.length>0&&Math.abs(t[0].x-e[e.length-1].x)<.001&&Math.abs(t[0].y-e[e.length-1].y)<.001&&t.shift();for(let o of t)e.push(o)}}function p(t,e=!1){return(new l).__withLog(e).move(new r(t.points[0].x,t.points[0].y)).curve(new r(t.points[1].x,t.points[1].y),new r(t.points[2].x,t.points[2].y),new r(t.points[3].x,t.points[3].y)).clean()}function d(t){let e=t.bbox();return{topLeft:new r(e.x.min,e.y.min),bottomRight:new r(e.x.max,e.y.max)}}function h(t){let e,o=(new l).__withLog(t[0].log).move(t[0].ops[0].to);for(let a of t)for(let t of a.ops){if("curve"===t.type)o.curve(t.cp1,t.cp2,t.to);else if("noop"===t.type)o.noop(t.id);else{if("close"===t.type){let t="Cannot join a closed path with another";throw o.log.error(t),new Error(t)}e&&!t.to.sitsRoughlyOn(e)&&o.line(t.to)}t.to&&(e=t.to)}return o}function m(t){let e=t.from,o=t.to;return e.x===o.x?e.y<o.y?{topLeft:e,bottomRight:o}:{topLeft:o,bottomRight:e}:e.y===o.y?e.x<o.x?{topLeft:e,bottomRight:o}:{topLeft:o,bottomRight:e}:e.x<o.x?e.y<o.y?{topLeft:e,bottomRight:o}:{topLeft:new r(e.x,o.y),bottomRight:new r(o.x,e.y)}:e.x>o.x?e.y<o.y?{topLeft:new r(o.x,e.y),bottomRight:new r(e.x,o.y)}:{topLeft:new r(o.x,o.y),bottomRight:new r(e.x,e.y)}:void 0}function f(t,e,o,a=!1){if(t.x===e.x&&t.y===e.y)return!1;let i=t.angle(e)-90;return(new l).__withLog(a).move(t.shift(i,o)).line(e.shift(i,o))}function u(t,e,o){let a,i,n,s,l=0;for(let c=0;c<=o;c++){if(n=c/o,i=e.get(n),i=new r(i.x,i.y),c>0){if(s=i.dist(a),l+s>t)return i;l+=s}a=i}}l.prototype.asRenderProps=function(){return{attributes:this.attributes.asRenderProps(),hidden:this.hidden,name:this.name,ops:this.ops.map((t=>(t=>{const e={type:t.type};for(const o of["from","to","cp1","cp2"])t[o]&&(e[o]=t[o].asRenderProps());return t.id&&(e.id=t.id),e})(t))),topLeft:this.topLeft,bottomRight:this.bottomRight,width:this.bottomRight.x-this.topLeft.x,height:this.bottomRight.y-this.topLeft.y,d:this.asPathstring()}},l.prototype.attr=function(t,e,o=!1){return t||this.log.warn("Called `Path.attr(name, value, overwrite=false)` but `name` is undefined or false"),void 0===e&&this.log.warn("Called `Path.attr(name, value, overwrite=false)` but `value` is undefined"),o&&this.log.debug(`Overwriting \`Path.attribute.${t}\` with ${e} (was: ${this.attributes.get(t)})`),o?this.attributes.set(t,e):this.attributes.add(t,e),this},l.prototype.bbox=function(){let t,e=[];for(let o in this.ops){let a=this.ops[o];"line"===a.type?e.push(m({from:t,to:a.to})):"curve"===a.type&&e.push(d(new n({x:t.x,y:t.y},{x:a.cp1.x,y:a.cp1.y},{x:a.cp2.x,y:a.cp2.y},{x:a.to.x,y:a.to.y}))),a.to&&(t=a.to)}return 0===e.length&&t&&e.push(m({from:t,to:t})),function(t){let e=1/0,o=-1/0,a=1/0,i=-1/0;for(let n of t)n.topLeft.x<e&&(e=n.topLeft.x),n.topLeft.y<a&&(a=n.topLeft.y),n.bottomRight.x>o&&(o=n.bottomRight.x),n.bottomRight.y>i&&(i=n.bottomRight.y);return{topLeft:new r(e,a),bottomRight:new r(o,i)}}(e)},l.prototype.circleSegment=function(t,e){const o=this.end().dist(e),a=Math.ceil(Math.abs(t/90)),i=t/a,n=F(i),s=o*(4/3)*Math.tan(n/4);for(let r=0;r<a;r++){const t=this.end(),o=t.rotate(i,e),a=t.angle(e)-90,n=o.angle(e)+90,r=t.shift(a,s),l=o.shift(n,s);this.curve(r,l,o)}return this},l.prototype.clean=function(){const t=[];let e;for(const o in this.ops){const a=this.ops[o];["move","close","noop"].includes(a.type)?t.push(a):"line"===a.type?a.to.sitsRoughlyOn(e)||t.push(a):"curve"===a.type&&(a.cp1.sitsRoughlyOn(e)&&a.cp2.sitsRoughlyOn(e)&&a.to.sitsRoughlyOn(e)||t.push(a)),e=a.to}return t.length<this.ops.length&&(this.ops=t),0!==t.length&&(1!==t.length||"move"!==t[0].type)&&this},l.prototype.clone=function(){let t=(new l).__withLog(this.log).setHidden(this.hidden);this.topLeft?t.topLeft=this.topLeft.clone():t.topLeft=!1,this.bottomRight?t.bottomRight=this.bottomRight.clone():t.bottomRight=!1,t.attributes=this.attributes.clone(),t.ops=[];for(let e in this.ops){let o=this.ops[e];t.ops[e]={type:o.type},"move"===o.type||"line"===o.type?t.ops[e].to=o.to.clone():"curve"===o.type?(t.ops[e].to=o.to.clone(),t.ops[e].cp1=o.cp1.clone(),t.ops[e].cp2=o.cp2.clone()):"noop"===o.type&&(t.ops[e].id=o.id)}return t},l.prototype.close=function(){return this.ops.push({type:"close"}),this},l.prototype.combine=function(...t){return function(...t){const e=(new l).__withLog(t[0].log);for(const o of t)e.ops.push(...o.ops);return e}(this,...t)},l.prototype.curve=function(t,e,o){return o instanceof r!=!0&&this.log.warn("Called `Path.curve(cp1, cp2, to)` but `to` is not a `Point` object"),t instanceof r!=!0&&this.log.warn("Called `Path.curve(cp1, cp2, to)` but `cp1` is not a `Point` object"),e instanceof r!=!0&&this.log.warn("Called `Path.curve(cp1, cp2, to)` but `cp2` is not a `Point` object"),this.ops.push({type:"curve",cp1:t,cp2:e,to:o}),this},l.prototype.curve_=function(t,e){e instanceof r!=!0&&this.log.warn("Called `Path.curve_(cp1, to)` but `to` is not a `Point` object"),t instanceof r!=!0&&this.log.warn("Called `Path.curve_(cp1, to)` but `cp1` is not a `Point` object");let o=e.copy();return this.ops.push({type:"curve",cp1:t,cp2:o,to:e}),this},l.prototype.divide=function(){let t,e,o=[];for(let a in this.ops){let i=this.ops[a];"move"===i.type?e=i.to:"line"===i.type?i.to.sitsRoughlyOn(t)||o.push((new l).__withLog(this.log).move(t).line(i.to)):"curve"===i.type?o.push((new l).__withLog(this.log).move(t).curve(i.cp1,i.cp2,i.to)):"close"===i.type&&o.push((new l).__withLog(this.log).move(t).line(e)),i.to&&(t=i.to)}return o},l.prototype.projectPoint=function(t){if(!(t instanceof r))return this.log.error("Called `Path.projectPoint(p)` but `p` is not a `Point` object"),null;let e=this.start(),o=1/0,a=e,i=e;for(let n in this.ops){let s=this.ops[n];if("move"===s.type)i=s.to;else if("line"===s.type){let i=rt(t,a,s.to),n=i.dist(t);n<o&&(o=n,e=i)}else if("curve"===s.type){let i=lt(t,a,s.cp1,s.cp2,s.to),n=i.dist(t);n<o&&(o=n,e=i)}else if("close"===s.type){let n=rt(t,a,i),s=n.dist(t);s<o&&(o=s,e=n)}s.to&&(a=s.to)}return e},l.prototype.measureAlong=function(t){if(!(t instanceof r))return this.log.error("Called `Path.measureAlong(p)` but `p` is not a `Point` object"),null;let e=0,o=this.start(),a=o;for(let i in this.ops){let s=this.ops[i];if("move"===s.type)a=s.to;else if("line"===s.type){if($(o,s.to,t))return e+=o.dist(t),e;e+=o.dist(s.to)}else if("curve"===s.type){let a=new n({x:o.x,y:o.y},{x:s.cp1.x,y:s.cp1.y},{x:s.cp2.x,y:s.cp2.y},{x:s.to.x,y:s.to.y});const i=a.project({x:t.x,y:t.y});if(i.d<1)return e+=a.split(i.t).left.length(),e;e+=a.length()}else if("close"===s.type){if($(o,a,t))return e+=o.dist(t),e;e+=o.dist(a)}s.to&&(o=s.to)}return null},l.prototype.edge=function(t){if(this.__boundary(),"topLeft"===t)return this.topLeft;if("bottomRight"===t)return this.bottomRight;if("topRight"===t)return new r(this.bottomRight.x,this.topLeft.y);if("bottomLeft"===t)return new r(this.topLeft.x,this.bottomRight.y);{let e=t+"Op";if("move"===this[e].type)return this[e].to;if("line"===this[e].type){if("top"===t)return this.topOp.to.y<this.topOp.from.y?this.topOp.to:this.topOp.from;if("left"===t)return this.leftOp.to.x<this.leftOp.from.x?this.leftOp.to:this.leftOp.from;if("bottom"===t)return this.bottomOp.to.y>this.bottomOp.from.y?this.bottomOp.to:this.bottomOp.from;if("right"===t)return this.rightOp.to.x>this.rightOp.from.x?this.rightOp.to:this.rightOp.from}else if("curve"===this[e].type)return S(new n({x:this[e].from.x,y:this[e].from.y},{x:this[e].cp1.x,y:this[e].cp1.y},{x:this[e].cp2.x,y:this[e].cp2.y},{x:this[e].to.x,y:this[e].to.y}),t)}},l.prototype.end=function(){this.ops.length<1&&this.log.error("Called `Path.end()` but this path has no drawing operations");let t=this.ops[this.ops.length-1];return"close"===t.type?this.start():t.to},l.prototype.hide=function(){return this.hidden=!0,this},l.prototype.insop=function(t,e){t||this.log.warn("Called `Path.insop(noopI
1d, path)` but `noopId` is undefined or false"),e instanceof l!=!0&&this.log.warn("Called `Path.insop(noopId, path) but `path` is not a `Path` object");let o=this.clone();for(let a in o.ops)"noop"===o.ops[a].type&&o.ops[a].id===t&&(o.ops=o.ops.slice(0,a).concat(e.ops).concat(o.ops.slice(Number(a)+1)));return o},l.prototype.intersects=function(t){this===t&&this.log.error("You called Path.intersects(path)` but `path` and `this` are the same object");let e=[];for(let o of this.divide())for(let a of t.divide())"line"===o.ops[1].type?"line"===a.ops[1].type?c(A(o.ops[0].to,o.ops[1].to,a.ops[0].to,a.ops[1].to),e):"curve"===a.ops[1].type&&c(D(o.ops[0].to,o.ops[1].to,a.ops[0].to,a.ops[1].cp1,a.ops[1].cp2,a.ops[1].to),e):"curve"===o.ops[1].type&&("line"===a.ops[1].type?c(D(a.ops[0].to,a.ops[1].to,o.ops[0].to,o.ops[1].cp1,o.ops[1].cp2,o.ops[1].to),e):"curve"===a.ops[1].type&&c(R(o.ops[0].to,o.ops[1].cp1,o.ops[1].cp2,o.ops[1].to,a.ops[0].to,a.ops[1].cp1,a.ops[1].cp2,a.ops[1].to),e));return e},l.prototype.intersectsBeam=function(t,e){let o=[];for(let a of this.divide())"line"===a.ops[1].type?c(O(t,e,a.ops[0].to,a.ops[1].to),o):"curve"===a.ops[1].type&&c(T(t,e,a.ops[0].to,a.ops[1].cp1,a.ops[1].cp2,a.ops[1].to),o);return o},l.prototype.intersectsX=function(t){return"number"!=typeof t&&this.log.error("Called `Path.intersectsX(x)` but `x` is not a number"),this.__intersectsAxis(t,"x")},l.prototype.intersectsY=function(t){return"number"!=typeof t&&this.log.error("Called `Path.intersectsX(y)` but `y` is not a number"),this.__intersectsAxis(t,"y")},l.prototype.join=function(...t){if(t.length<1)return this.log.error("Called `Path.join(that)` but `that` is not a `Path` object"),this;if(2===t.length&&[!0,!1].includes(t[1]))return this.log.warn("`Path.join()` was called with the legacy signature passing a bool as second parameter. This is deprecated and will be removed in FreeSewing v4"),t[1]?h([this,t[0]]).close():h([this,t[0]]);let e=0;for(const o of t)o instanceof l!=!0&&this.log.error(`Called \`Path.join(paths)\` but the path with index \`${e}\` is not a \`Path\` object`),e++;return h([this,...t])},l.prototype.length=function(t=!1){let e,o,a=0;for(let i in this.ops){let s=this.ops[i];"move"===s.type?void 0===o?o=s.to:t&&(a+=e.dist(s.to)):"line"===s.type?a+=e.dist(s.to):"curve"===s.type?a+=new n({x:e.x,y:e.y},{x:s.cp1.x,y:s.cp1.y},{x:s.cp2.x,y:s.cp2.y},{x:s.to.x,y:s.to.y}).length():"close"===s.type&&(a+=e.dist(o)),s.to&&(e=s.to)}return a},l.prototype.line=function(t){return t instanceof r!=!0&&this.log.warn("Called `Path.line(to)` but `to` is not a `Point` object"),this.ops.push({type:"line",to:t}),this},l.prototype.move=function(t){return t instanceof r!=!0&&this.log.warn("Called `Path.move(to)` but `to` is not a `Point` object"),this.ops.push({type:"move",to:t}),this},l.prototype.noop=function(t=!1){return this.ops.push({type:"noop",id:t}),this},l.prototype.offset=function(t){return function(t,e,o){let a,i,s=[],r=!1,c=!1;for(let d in t.ops){let o=t.ops[d];if("line"===o.type){let i=f(a,o.to,e,t.log);i&&s.push(i)}else if("curve"===o.type){let i,r;a.sitsRoughlyOn(o.cp1)?(i=(new l).__withLog(t.log).move(a).curve(o.cp1,o.cp2,o.to),i=i.shiftAlong(i.length()>2?2:i.length()/10)):i=o.cp1,o.cp2.sitsRoughlyOn(o.to)?(r=(new l).__withLog(t.log).move(o.to).curve(o.cp2,o.cp1,a),r=r.shiftAlong(r.length()>2?2:r.length()/10)):r=o.cp2;let c=new n({x:a.x,y:a.y},{x:i.x,y:i.y},{x:r.x,y:r.y},{x:o.to.x,y:o.to.y});for(let o of c.offset(e)){const e=p(o,t.log);e&&s.push(e)}}else if("close"===o.type){let o=f(a,r,e,t.log);o&&s.push(o),c=!0}o.to&&(a=o.to),r&&"move"!==o.type||(r=a)}if(0!==s.length)i=h(s);else{let n=f(r,a,e,t.log);n?i=n:(i=(new l).move(r).line(a),o.warn("Could not properly calculate offset path, the given path is likely too short."))}return c?i.close():i}(this,t=q(t,"distance","Path.offset",this.log),this.log)},l.prototype.reverse=function(t=!1){let e,o=[],a=!1;for(let n in this.ops){let t=this.ops[n];"line"===t.type?t.to.sitsOn(e)||o.push((new l).__withLog(this.log).move(t.to).line(e)):"curve"===t.type?o.push((new l).__withLog(this.log).move(t.to).curve(t.cp2,t.cp1,e)):"close"===t.type&&(a=!0),t.to&&(e=t.to)}let i=(new l).__withLog(this.log).move(e);for(let n of o.reverse())i.end().sitsOn(n.ops[0].to)?i.ops.push(n.ops[1]):i.ops.push(...n.ops);return a&&i.close(),t&&(i.attributes=this.attributes.clone()),i},l.prototype.rotate=function(t,e,o=!1){t=q(t,"deg","Path.rotate",this.log),e instanceof r||this.log.warn("Called `Path.rotate(deg,that)` but `rotationOrigin` is not a `Point` object");const a=(new l).__withLog(this.log);for(const i of this.ops)if("move"===i.type){const o=i.to.rotate(t,e);a.move(o)}else if("line"===i.type){const o=i.to.rotate(t,e);a.line(o)}else if("curve"===i.type){const o=i.cp1.rotate(t,e),n=i.cp2.rotate(t,e),s=i.to.rotate(t,e);a.curve(o,n,s)}else"close"===i.type&&a.close();return o&&(a.attributes=this.attributes.clone()),a},l.prototype.roughLength=function(){let t,e,o=0;for(let a in this.ops){let i=this.ops[a];"move"===i.type?e=i.to:"line"===i.type?o+=t.dist(i.to):"curve"===i.type?(o+=t.dist(i.cp1),o+=i.cp1.dist(i.cp2),o+=i.cp2.dist(i.to)):"close"===i.type&&(o+=t.dist(e)),i.to&&(t=i.to)}return o},l.prototype.setClass=function(t=!1){return t&&this.attributes.set("class",t),this},l.prototype.setHidden=function(t=!1){return this.hidden=!!t,this},l.prototype.setText=function(t="",e=!1){return this.attributes.set("data-text",t),e&&this.attributes.set("data-text-class",e),this},l.prototype.shiftAlong=function(t,e=10){t=q(t,"distance","Path.shiftAlong",this.log);let o,a=0;for(let i in this.ops){let s=this.ops[i];if("line"===s.type){let e=s.to.dist(o);if(Math.abs(a+e-t)<.1)return s.to;if(a+e>t)return o.shiftTowards(s.to,t-a);a+=e}else if("curve"===s.type){let i=new n({x:o.x,y:o.y},{x:s.cp1.x,y:s.cp1.y},{x:s.cp2.x,y:s.cp2.y},{x:s.to.x,y:s.to.y}),r=i.length();if(Math.abs(a+r-t)<.1)return s.to;if(a+r>t)return u(t-a,i,r*e);a+=r}o=s.to}this.log.error(`Called \`Path.shiftAlong(distance)\` with a \`distance\` of \`${t}\` but \`Path.length()\` is only \`${this.length()}\``)},l.prototype.shiftFractionAlong=function(t,e=10){return"number"!=typeof t&&this.log.error("Called `Path.shiftFractionAlong(fraction)` but `fraction` is not a number"),this.shiftAlong(this.length()*t,e)},l.prototype.smurve=function(t,e){e instanceof r!=!0&&this.log.warn("Called `Path.smurve(cp2, to)` but `to` is not a `Point` object"),t instanceof r!=!0&&this.log.warn("Called `Path.smurve(cp2, to)` but `cp2` is not a `Point` object");const o=this.ops.slice(-1).pop(),a=o.cp2.rotate(180,o.to);return this.ops.push({type:"curve",cp1:a,cp2:t,to:e}),this},l.prototype.smurve_=function(t){t instanceof r!=!0&&this.log.warn("Called `Path.smurve_(to)` but `to` is not a `Point` object");const e=this.ops.slice(-1).pop(),o=e.cp2.rotate(180,e.to),a=t;return this.ops.push({type:"curve",cp1:o,cp2:a,to:t}),this},l.prototype.split=function(t){t instanceof r!=!0&&this.log.error("Called `Path.split(point)` but `point` is not a `Point` object");let e=this.divide(),o=[],a=[];for(let i=0;i<e.length;i++){let s=e[i];if(s.ops[0].to.sitsRoughlyOn(t)){e[i].ops[0].to=t.copy(),i>0&&(e[i-1].ops[1].to=t.copy()),o=e.slice(0,i),a=e.slice(i);break}if("line"===s.ops[1].type){if(s.ops[1].to.sitsRoughlyOn(t)){i++,o=e.slice(0,i),a=e.slice(i);break}if($(s.ops[0].to,s.ops[1].to,t)){o=e.slice(0,i),o.push((new l).__withLog(this.log).move(s.ops[0].to).line(t)),i++,a=e.slice(i),a.unshift((new l).__withLog(this.log).move(t).line(s.ops[1].to));break}}else if("curve"===s.ops[1].type){let c=Y(s.ops[0].to,s.ops[1].cp1,s.ops[1].cp2,s.ops[1].to,t);if(!1!==c){let p=new n({x:s.ops[0].to.x,y:s.ops[0].to.y},{x:s.ops[1].cp1.x,y:s.ops[1].cp1.y},{x:s.ops[1].cp2.x,y:s.ops[1].cp2.y},{x:s.ops[1].to.x,y:s.ops[1].to.y}).split(c);o=e.slice(0,i),o.push((new l).__withLog(this.log).move(new r(p.left.points[0].x,p.left.points[0].y)).curve(new r(p.left.points[1].x,p.left.points[1].y),new r(p.left.points[2].x,p.left.points[2].y),t.copy())),i++,a=e.slice(i),a.unshift((new l).__withLog(this.log).move(t.copy()).curve(new r(p.right.points[1].x,p.right.points[1].y),new r(p.right.points[2].x,p.right.points[2].y),new r(p.right.points[3].x,p.right.points[3].y)));break}}}return o=o.length>0&&o[0].ops.length>1?h(o):null,a=a.length>0&&a[0].ops.length>1?h(a):null,[o,a]},l.prototype.angleAt=function(t){t instanceof r||this.log.error("Called `Path.angleAt(point)` but `point` is not a `Point` object");let e=this.divide();for(let o=0;o<e.length;o++){let a=e[o];if("line"===a.ops[1].type){if($(a.ops[0].to,a.ops[1].to,t))return a.ops[0].to.angle(a.ops[1].to)}else if("curve"===a.ops[1].type){let e=Y(a.ops[0].to,a.ops[1].cp1,a.ops[1].cp2,a.ops[1].to,t);if(!1!==e){let t=new n({x:a.ops[0].to.x,y:a.ops[0].to.y},{x:a.ops[1].cp1.x,y:a.ops[1].cp1.y},{x:a.ops[1].cp2.x,y:a.ops[1].cp2.y},{x:a.ops[1].to.x,y:a.ops[1].to.y}).normal(e);return Math.atan2(t.x,t.y)/Math.PI*180}}}return!1},l.prototype.start=function(){return(this.ops.length<1||void 0===this.ops[0].to)&&this.log.error("Called `Path.start()` but this path has no drawing operations"),this.ops[0].to},l.prototype.translate=function(t,e){"number"!=typeof t&&this.log.warn("Called `Path.translate(x, y)` but `x` is not a number"),"number"!=typeof e&&this.log.warn("Called `Path.translate(x, y)` but `y` is not a number");let o=this.clone();for(let a of o.ops)"close"!==a.type&&(a.to=a.to.translate(t,e)),"curve"===a.type&&(a.cp1=a.cp1.translate(t,e),a.cp2=a.cp2.translate(t,e));return o},l.prototype.trim=function(){let t=this.divide();for(let e=0;e<t.length;e++){let o=parseInt(e)+2,a=parseInt(t.length)-1;for(let i=o;i<a;i++){let o=t[e].intersects(t[i]);if(o.length>0){let a,s=o.pop(),c=t.slice(0,e),p=t.slice(parseInt(i)+1),d=(new l).__withLog(this.log),m=!0;for(let o of[e,i]){let e=t[o].ops;if("line"===e[1].type)d.line(s);else if("curve"===e[1].type){let t,o=new n({x:e[0].to.x,y:e[0].to.y},{x:e[1].cp1.x,y:e[1].cp1.y},{x:e[1].cp2.x,y:e[1].cp2.y},{x:e[1].to.x,y:e[1].to.y}),a=Y(e[0].to,e[1].cp1,e[1].cp2,e[1].to,s),i=o.split(a);t=m?i.left:i.right,d.curve(new r(t.points[1].x,t.points[1].y),new r(t.points[2].x,t.points[2].y),new r(t.points[3].x,t.points[3].y))}m=!1}return a=c.length>0?h(c).join(d):d,p.length>0&&(a=a.join(h(p))),a.trim()}}}return this},l.prototype.unhide=function(){return this.hidden=!1,this},l.prototype.__boundary=function(){if(this.topOp)return this;let t,e=new r(1/0,1/0),o=new r(-1/0,-1/0),a=[];for(let i in this.ops){let s=this.ops[i];if("move"===s.type||"line"===s.type)s.to.x<e.x&&(e.x=s.to.x,a.leftOp=i),s.to.y<e.y&&(e.y=s.to.y,a.topOp=i),s.to.x>o.x&&(o.x=s.to.x,a.rightOp=i),s.to.y>o.y&&(o.y=s.to.y,a.bottomOp=i);else if("curve"===s.type){let r=new n({x:t.x,y:t.y},{x:s.cp1.x,y:s.cp1.y},{x:s.cp2.x,y:s.cp2.y},{x:s.to.x,y:s.to.y}).bbox();
1r.x.min<e.x&&(e.x=r.x.min,a.leftOp=i),r.y.min<e.y&&(e.y=r.y.min,a.topOp=i),r.x.max>o.x&&(o.x=r.x.max,a.rightOp=i),r.y.max>o.y&&(o.y=r.y.max,a.bottomOp=i)}s.to&&(t=s.to)}this.topLeft=e,this.bottomRight=o;for(let i of["top","left","bottom","right"]){let t=i+"Op";this[t]=this.ops[a[t]],this[t].from="move"===this[t].type?this[t].to:this.ops[a[t]-1].to}return this},l.prototype.__intersectsAxis=function(t=!1,e){let o=[],a="x"===e?new r(t,-1e5):new r(-1e4,t),i="x"===e?new r(t,1e5):new r(1e5,t);for(let n of this.divide())"line"===n.ops[1].type?c(A(n.ops[0].to,n.ops[1].to,a,i),o):"curve"===n.ops[1].type&&c(D(a,i,n.ops[0].to,n.ops[1].cp1,n.ops[1].cp2,n.ops[1].to),o);return o},l.prototype.__withLog=function(t=!1){return t&&Q(this,"log",t),this};const g=1.618034,b=.55191502449351;function w(t,e,o,a,i="x"){let n=a.x-o.x,s=a.y-o.y,l=Math.pow(n,2)+Math.pow(s,2),c=2*(n*(o.x-t.x)+s*(o.y-t.y)),p=Math.pow(o.x-t.x,2)+Math.pow(o.y-t.y,2)-Math.pow(e,2),d=Math.pow(c,2)-4*l*p;if(l<=1e-7||d<0)return!1;if(0===d){let t=-1*c/(2*l);return[new r(o.x+t*n,o.y+t*s)]}{let t=(-1*c+Math.sqrt(d))/(2*l),e=new r(o.x+t*n,o.y+t*s);t=(-1*c-Math.sqrt(d))/(2*l);let a=new r(o.x+t*n,o.y+t*s);return"x"===i&&e.x<=a.x||"y"===i&&e.y<=a.y?[e,a]:[a,e]}}function k(t,e,o){if(t.x===e.x)return!1;return v(t,e,new r(o,-10),new r(o,10))}function C(t,e,o){if(t.y===e.y)return!1;return v(t,e,new r(-10,o),new r(10,o))}function v(t,e,o,a){const i=y(t,e,o,a);return!!i&&i.p}function y(t,e,o,a){function i(t,e){return t.x*e.y-t.y*e.x}const n={x:e.x-t.x,y:e.y-t.y},s={x:a.x-o.x,y:a.y-o.y},l={x:o.x-t.x,y:o.y-t.y},c=i(n,s);if(Math.abs(c)<1e-10)return!1;const p=i(l,s)/c,d=i(l,n)/c;return{p:new r(t.x+p*n.x,t.y+p*n.y),t:p,u:d}}function T(t,e,o,a,i,s){let l=[],c=new n({x:o.x,y:o.y},{x:a.x,y:a.y},{x:i.x,y:i.y},{x:s.x,y:s.y}),p={p1:{x:t.x,y:t.y},p2:{x:e.x,y:e.y}};for(let d of n.getUtils().roots(c.points,p)){let t=c.get(d);l.push(new r(t.x,t.y))}return 0!==l.length&&(1===l.length?l[0]:l)}function x(t){return t.charAt(0).toUpperCase()+t.slice(1)}function B(t,e,o,a,i="x"){let n=t.dx(o),s=t.dy(o),l=t.dist(o);if(l>parseFloat(e)+parseFloat(a))return!1;if(l<Math.abs(parseFloat(a)-parseFloat(e)))return!1;if(0===l&&e===a)return!1;let c=(Math.pow(e,2)-Math.pow(a,2)+Math.pow(l,2))/(2*l),p=Math.sqrt(Math.pow(e,2)-Math.pow(c,2)),d=t.x+c*n/l,h=t.y+c*s/l,m=new r(d+p*s/l,h-p*n/l),f=new r(d-p*s/l,h+p*n/l);return"x"===i&&m.x<=f.x||"y"===i&&m.y<=f.y?[m,f]:[f,m]}function S(t,e,o=500){let a,i=1/0,n=1/0;"bottom"===e&&(n=-1/0),"right"===e&&(i=-1/0);for(let s=0;s<o;s++)a=t.get(s/o),("top"===e&&a.y<n||"bottom"===e&&a.y>n||"right"===e&&a.x>i||"left"===e&&a.x<i)&&(i=a.x,n=a.y);return new r(i,n)}function L(t,e,o,a,i){return D(new r(i,-1e4),new r(i,1e4),t,e,o,a)}function P(t,e,o,a,i){return D(new r(-1e4,i),new r(1e4,i),t,e,o,a)}function R(t,e,o,a,i,s,l,c){let p=[],d=new n({x:t.x,y:t.y},{x:e.x,y:e.y},{x:o.x,y:o.y},{x:a.x,y:a.y}),h=new n({x:i.x,y:i.y},{x:s.x,y:s.y},{x:l.x,y:l.y},{x:c.x,y:c.y});for(let n of d.intersects(h,.005)){let t=d.get(n.substr(0,n.indexOf("/")));p.push(new r(t.x,t.y))}if(0===p.length)return!1;if(1===p.length)return p.shift();{let t=[];for(let e of p){let o=!1;for(let a of t)e.sitsRoughlyOn(a)&&(o=!0);o||t.push(e)}return 1===t.length?t.shift():t}}function F(t){return t*(Math.PI/180)}function E(t=0,e=0,o=0,a=!1,i=!1,n){const s=[];let r=t||0,l=e||0,c=1,p=1;if(a&&(r+=n.topLeft.x,r+=n.bottomRight.x,c=-1),i&&(l+=n.topLeft.y,l+=n.bottomRight.y,p=-1),c+p<2&&s.push(`scale(${c}, ${p})`),o){const t={x:n.topLeft.x+n.width/2,y:n.topLeft.y+n.height/2};s.push(`rotate(${o}, ${t.x}, ${t.y})`)}return 0===r&&0===l||s.unshift(`translate(${r}, ${l})`),s}function W(t,e,o){let a=e.snap;if(!Array.isArray(a)&&a.metric&&a.imperial&&(a="imperial"===o?a.imperial:a.metric),"number"==typeof a)return Math.round(t/a)*a;if(Array.isArray(a)&&a.length>1)for(const i of a.sort(((t,e)=>t-e)).map(((t,e)=>{const o=e<a.length-1?(a[Number(e)+1]-t)/2:(t-a[e-1])/2;return{min:t-o,max:t+Number(o),snap:t}})))if(t<=i.max&&t>=i.min)return i.snap;return t}function H(t,e,o,a,i="x"){let n=w(t,e,o,a,i);if(!1===n)return!1;if(1===n.length)return!!$(o,a,n[0])&&n;{let t=n[0],e=n[1];
1if(!$(o,a,t,5)&&!$(o,a,e,5))return!1;if($(o,a,t,5)&&$(o,a,e,5))return"x"===i&&t.x<=e.x||"y"===i&&t.y<=e.y?[t,e]:[e,t];if($(o,a,t,5))return[t];if($(o,a,e,5))return[e]}}function A(t,e,o,a){const i=y(t,e,o,a);if(!i)return!1;const n=1e-10;return!(i.t<-1e-10||i.t>1+n)&&(!(i.u<-1e-10||i.u>1+n)&&i.p)}function O(t,e,o,a){const i=y(t,e,o,a);if(!i)return!1;return!(i.u<-1e-10||i.u>1+1e-10)&&i.p}function D(t,e,o,a,i,s){let l=[],c=new n({x:o.x,y:o.y},{x:a.x,y:a.y},{x:i.x,y:i.y},{x:s.x,y:s.y}),p={p1:{x:t.x,y:t.y},p2:{x:e.x,y:e.y}};for(let n of c.intersects(p)){let t=c.get(n);l.push(new r(t.x,t.y))}return 0!==l.length&&(1===l.length?l[0]:l)}function N(t,e){const o={};for(const a of t)for(const t in a){const i=a[t];void 0===o[t]&&(o[t]={}),i.t&&(o[t].t=i.t),i.d&&(o[t].d=i.d);for(const a of"spo")if(i[a]){void 0===o[t][a]&&(o[t][a]={});for(const[n,s]of Object.entries(i[a]))et(n,e?.[a])&&(o[t][a][n]=s)}}return o}function I(t={},e){let o={};for(const[a,i]of Object.entries(e))"object"==typeof i?void 0!==i.pct?o[a]=i.pct/100:void 0!==i.mm?o[a]=i.mm:void 0!==i.deg?o[a]=i.deg:void 0!==i.count?o[a]=i.count:void 0!==i.bool?o[a]=i.bool:void 0!==i.dflt&&(o[a]=i.dflt):o[a]=i;return"object"==typeof t.options&&(o={...o,...t.options}),o}function M(t){return{toAbs:(e,{measurements:o})=>o[t]*e,fromAbs:(e,{measurements:o})=>Math.round(1e4*e/o[t])/1e4}}function _(){return{toAbs:(t,{sa:e})=>(e||10)*t,fromAbs:(t,{sa:e})=>Math.round(1e4*t/(e||10))/1e4}}function j(t,e){return{...e,toAbs:(o,{measurements:a,units:i})=>W(a[t]*o,e,i),fromAbs:(e,{measurements:o})=>Math.round(1e4*e/o[t])/1e4}}function G(t,e,o,a=1e6){if(t.sitsOn(o))return!0;if(e.sitsOn(o))return!0;let i=o.dx(t)*e.dy(t)-o.dy(t)*e.dx(t);return 0===Math.abs(Math.round(i*a)/a)}function U(t,e,o,a,i){return!1!==Y(t,e,o,a,i)}function Y(t,e,o,a,i){if(t.sitsOn(i))return 0;if(a.sitsOn(i))return 1;let s=new n({x:t.x,y:t.y},{x:e.x,y:e.y},{x:o.x,y:o.y},{x:a.x,y:a.y}),r=s.intersects({p1:{x:i.x-1,y:i.y},p2:{x:i.x+1,y:i.y}});return 0===r.length&&(r=s.intersects({p1:{x:i.x,y:i.y-1},p2:{x:i.x,y:i.y+1}})),r.length>0&&r.shift()}function $(t,e,o,a=1e6){if(!G(t,e,o,a))return!1;let i=t.dist(e),n=t.dist(o)+o.dist(e);return 0===Math.round(Math.abs(i-n)*a)}function z(t){return t/Math.PI*180}function J(t){return Math.round(100*t)/100}function K(t,e,o,a,i){let[n,s]=(new l).move(t).curve(e,o,a).split(i);return[{start:n.ops[0].to,cp1:n.ops[1].cp1,cp2:n.ops[1].cp2,end:n.ops[1].to},{start:s.ops[0].to,cp1:s.ops[1].cp1,cp2:s.ops[1].cp2,end:s.ops[1].to}]}function V(t){return 1/(1+parseFloat(t))}function X(t,e="metric"){return"imperial"===e?J(t/25.4)+"&quot;":J(t/10)+"cm"}function Q(t,e,o){return Object.defineProperty(t,e,{enumerable:!1,configurable:!1,writable:!0,value:o}),t}function q(t,e,o,a){if("number"==typeof t)return t;if("string"==typeof t){a.warn(`Called \`${o}(${e})\` but \`${e}\` is not a number. Will attempt to cast to Number`);try{return t=Number(t)}catch{a.error(`Called \`${o}(${e})\` but \`${e}\` is not a number nor can it be cast to one`)}}else a.error(`Called \`${o}(${e})\` but \`${e}\` is not a number`);return t}function Z(t){return t==t&&"number"==typeof t}function tt(t){return`__macro_${t.toLowerCase()}`}function et(t,e){return(!e?.drop||!e.drop.includes(t))&&!(e?.keep&&!e.keep.includes(t))}function ot(t){const e=t.match(/(\w+)\(([^)]+)\)/),o=e[1],a=e[2].split(/,\s*/).map(parseFloat);return{parts:e,name:o,values:a}}function at(t,e,o){switch(t){case"matrix":e=[e[0]*o[0]+e[2]*o[1],e[1]*o[0]+e[3]*o[1],e[0]*o[2]+e[2]*o[3],e[1]*o[2]+e[3]*o[3],e[0]*o[4]+e[2]*o[5]+e[4],e[1]*o[4]+e[3]*o[5]+e[5]];break;case"translate":e[4]+=e[0]*o[0]+e[2]*o[1],e[5]+=e[1]*o[0]+e[3]*o[1];break;case"scale":e[0]*=o[0],e[1]*=o[0],e[2]*=o[1],e[3]*=o[1];break;case"rotate":{const t=o[0]*Math.PI/180,a=o[1],i=o[2];void 0!==a&&(e=at("translate",e,[a,i]));const n=Math.cos(t),s=Math.sin(t);e=[e[0]*n+e[2]*s,e[1]*n+e[3]*s,e[0]*-s+e[2]*n,e[1]*-s+e[3]*n,e[4],e[5]],void 0!==a&&(e=at("translate",e,[-a,-i]));break}case"skewX":e[2]+=e[0]*Math.tan(o[0]*Math.PI/180),e[3]+=e[1]*Math.tan(o[0]*Math.PI/180);break;case"skewY":e[0]+=e[2]*Math.tan(o[0]*Math.PI/180),e[1]+=e[3]*Math.tan(o[0]*Math.PI/180)}return e}function it(t=[]){if(t.length<1)return"";let e=[1,0,0,1,0,0];for(let o=0;o<t.length;o++){const{name:a,values:i}=ot(t[o]);e=at(a,e,i)}return"matrix("+e.join(", ")+")"}function nt(t,e){const{name:o,values:a}=ot(t);let i=[1,0,0,1,0,0];i=at(o,i,a);const n=e.x*i[0]+e.y*i[2]+i[4],s=e.x*i[1]+e.y*i[3]+i[5];return e.x=n,e.y=s,e}function st(t,e=!1){if(!t.topLeft)return{};
1let o=t.topLeft,a=t.bottomRight,i=new r(a.x,o.y),n=new r(o.x,a.y);if(e){const t=it(e);o=nt(t,o.copy()),a=nt(t,a.copy()),i=nt(t,i.copy()),n=nt(t,n.copy())}return{topLeft:new r(Math.min(o.x,a.x,n.x,i.x),Math.min(o.y,a.y,n.y,i.y)),bottomRight:new r(Math.max(o.x,a.x,n.x,i.x),Math.max(o.y,a.y,n.y,i.y))}}function rt(t,e,o){const a=o.x-e.x,i=o.y-e.y,n=a*a+i*i;if(0===n)return e.copy();const s=((t.x-e.x)*a+(t.y-e.y)*i)/n,l=Math.max(0,Math.min(1,s));return new r(e.x+l*a,e.y+l*i)}function lt(t,e,o,a,i){const s=new n({x:e.x,y:e.y},{x:o.x,y:o.y},{x:a.x,y:a.y},{x:i.x,y:i.y}).project({x:t.x,y:t.y});return new r(s.x,s.y)}function ct(t,e,o=!1){return this.def=t,this.anchor=e,this.attributes=new s,o&&this.attributes.set("data-force",1),this}ct.prototype.attr=function(t,e,o=!1){return o?this.attributes.set(t,e):this.attributes.add(t,e),this},ct.prototype.clone=function(){let t=new ct(this.def,this.anchor.clone()).__withLog(this.log);return t.attributes=this.attributes.clone(),t},ct.prototype.scale=function(t,e=!0){return this.attr("data-scale",t,e)},ct.prototype.rotate=function(t,e=!0){return this.attr("data-rotate",t,e)},ct.prototype.asRenderProps=function(){return{def:this.def,anchor:this.anchor.asRenderProps(),attributes:this.attributes.asRenderProps()}},ct.prototype.__withLog=function(t=!1){return t&&Object.defineProperty(this,"log",{value:t}),this};var pt=o(86281),dt=o(40876),ht=o(5157);const mt=["set","setIfUnset","push","unset","get","extend"];function ft(t=[]){const e={debug:[],info:[],warn:[],error:[]};this.log={debug:function(...t){e.debug.push(...t)},info:function(...t){e.info.push(...t)},warn:function(...t){e.warn.push(...t)},error:function(...t){"undefined"!=typeof window&&console.error(...t[0]),e.error.push(...t)}},this.logs=e,this.generateMacroIds=function(t,e,o=!1){o||(o=this.get("activeMacro"));const a={};for(const i of t)a[i]=`__macro_${o}_${e}_${i}`;return a},this.storeMacroIds=function(t,e,o=!1,a=!1){o||(o=this.get("activeMacro")),a||(a=this.get("activePart")),this.set(["parts",a,"macros",o,"ids",t],e)},this.getMacroIds=function(t,e=!1,o=!1){return e||(e=this.get("activeMacro")),o||(o=this.get("activePart")),this.get(["parts",o,"macros",e.toLowerCase(),"ids",t],!1)},this.removeMacroNodes=function(t,e,o){const a=this.getMacroIds(t,e,o.name);if(a){if(a.points)for(const t of Object.values(a.points))delete o.points[t];if(a.paths)for(const t of Object.values(a.paths))delete o.paths[t]}return this.getMacroIds(t,e)},this.pack=ut;for(const[o,a]of t)-1!==mt.indexOf(o)?this.log.warn(`You cannot overwrite \`store.${o}()\``):pt(this,o,a);return this}function ut(t){let e=0;for(const o of t)o.width>e&&(e=o.width),o.height>e&&(e=o.height);return{w:e,h:0}}function gt(t,e){return t?e=Array.isArray(e)?Array.isArray(t)?[...t,...e]:[t,...e]:Array.isArray(t)?t.join(".")+e:t+e:e}ft.prototype.extend=function(t){for(const[e,o]of t)-1!==mt.indexOf(e)?this.log.warn(`You cannot overwrite \`store.${e}()\``):(this.log.debug(`Extending store with \`${e}\``),pt(this,e,((...t)=>o(this,...t))));return this},ft.prototype.get=function(t,e,o=""){t=gt(o,t);const a=ht(this,t,e);return void 0===a&&this.log.warn(`Store.get(key) on key \`${t}\`, which is undefined`),a},ft.prototype.push=function(t,...e){const o=ht(this,t);return Array.isArray(o)?this.set(t,[...o,...e]):(this.log.warn(`Store.push(value) on key \`${t}\`, but key does not hold an array`),this)},ft.prototype.set=function(t,e,o){return t=gt(o,t),void 0===e&&this.log.warn(`Store.set(value) on key \`${t}\`, but value is undefined`),pt(this,t,e),this},ft.prototype.setIfUnset=function(t,e,o=""){return t=gt(o,t),void 0===e&&this.log.warn(`Store.setIfUnset(value) on key \`${t}\`, but value is undefined`),void 0===ht(this,t)?pt(this,t,e):this},ft.prototype.unset=function(t,e=""){return dt(this,gt(e,t)),this};const bt=()=>({parts:[],data:{}});function wt(){return{preInit:[],postInit:[],preDraft:[],preSetDraft:[],prePartDraft:[],postPartDraft:[],postSetDraft:[],postDraft:[],preSample:[],postSample:[],preRender:[],preLayout:[],postLayout:[],postRender:[],insertText:[]}}var kt=o(49418);function Ct(t){const e=Array.isArray(t)?t[0]:t;return e.name||e.plugin?.name||!1}function vt(t){this.store=t.store,this.plugins={},this.hooks=new wt,this.macros={},this.__storeMethods=new Set,t.designConfig.noCorePlugins||this.use(kt.qV)}vt.prototype.loadConfigPlugins=function(t,e){if(!t.plugins)return this;for(const o in t.plugins)this.use(t.plugins[o],t.plugins[o]?.data,e);return this},vt.prototype.on=function(t,e,o){for(const a of this.hooks[t])if(a.method===e)return this;return this.hooks[t].push({method:e,data:o}),this},vt.prototype.use=function(t,e,o=[{}]){const a=Ct(t);return this.plugins?.[a]?(this.store.log.info(`Plugin \`${a}\` was requested, but it's already loaded. Skipping.`),this):t.plugin&&t.condition?this.__useIf(t,e,o):this.__loadPlugin(t,e)},vt.prototype.__loadPlugin=function(t,e){const o=Ct(t);return this.plugins[o]=t,t.hooks&&this.__loadPluginHooks(t,e),t.macros&&this.__loadPluginMacros(t),t.store&&this.__loadPluginStoreMethods(t),this.store.log.info(`Loaded plugin \`${t.name}:${t.version}\``),this},vt.prototype.__loadPluginHooks=function(t,e){for(let o of Object.keys(this.hooks))if("function"==typeof t.hooks[o])this.on(o,t.hooks[o],e);else if(Array.isArray(t.hooks[o]))for(let a of t.hooks[o])this.on(o,a,e);return this},vt.prototype.__loadPluginMacros=function(t){for(let e in t.macros)"function"==typeof t.macros[e]&&this.__macro(e,t.macros[e])},vt.prototype.__loadPluginStoreMethods=function(t){if(Array.isArray(t.store))for(const e of t.store)this.__storeMethods.add(e);else this.store.log.warn("Plugin store methods should be an Array");return this},vt.prototype.__macro=function(t,e){return this.macros[t.toLowerCase()]=e,this},vt.prototype.__useIf=function(t,e,o=[{}]){let a=0;for(const i of o)t.condition(i)&&a++;return a>0?(this.store.log.info(`Condition met: Loaded plugin \`${t.plugin.name}:${t.plugin.version}\``),this.__loadPlugin(t.plugin,e)):this.store.log.info(`Condition not met: Skipped loading plugin \`${t.plugin.name}:${t.plugin.version}\``),this};const yt={HIDE_ALL:{self:!0,from:!0,after:!0,inherited:!0},HIDE_TREE:{from:!0,inherited:!0}};function Tt(t){this.store=t.store,this.plugins={...t.designConfig.plugins||{}},this.options={...t.designConfig.options||{}},this.measurements=[...t.designConfig.measurements||[]],this.optionalMeasurements=[...t.designConfig.optionalMeasurements||[]],this.inject={},this.directDependencies={},this.resolvedDependencies={},this.parts={},this.partHide={},this.draftOrder=[],Q(this,"__mutated",{optionDistance:{},partDistance:{},hideDistance:{}}),Q(this,"__hiding",{from:{},after:{},inherited:{},always:{},never:{}})}Tt.prototype.isPartValid=function(t){return"function"!=typeof t?.draft?(this.store.log.error("Part must have a draft() method"),!1):!!t.name||(this.store.log.error("Part must have a name"),!1)},Tt.prototype.addPart=function(t){return this.isPartValid(t)&&this.__addPart([t]),this},Tt.prototype.logPartDistances=function(){const t={};for(const e of Object.keys(this.parts)){const o=this.__mutated.partDistance[e];void 0===t[o]&&(t[o]=new Set),t[o].add(e)}for(const e of Object.keys(t))this.store.log.debug(`\u26aa\ufe0f  Options priority __${e}__ : ${[...t[e]].map((t=>"`"+t+"`")).join(", ")}`)},Tt.prototype.asConfig=function(){return{parts:this.parts,plugins:this.plugins,measurements:this.measurements,options:this.options,optionalMeasurements:this.optionalMeasurements,resolvedDependencies:this.resolvedDependencies,directDependencies:this.directDependencies,inject:this.inject,draftOrder:this.draftOrder,partHide:this.partHide}},Tt.prototype.__addPart=function(t){const e=t[0];if(!this.parts[e.name]&&(this.parts[e.name]=Object.freeze(e),void 0===this.__mutated.partDistance[e.name]&&(this.__mutated.partDistance[e.name]=t.length),this.__resolvePartHiding(e),this.__resolvePartDependencies(t),this.__addPartConfig(e),1===t.length)){for(var o=this.resolvedDependencies[e.name].length-1;o>=0;o--){let t=this.resolvedDependencies[e.name][o];-1===this.draftOrder.indexOf(t)&&this.draftOrder.push(t)}this.draftOrder.push(e.name)}},Tt.prototype.__addPartConfig=function(t){return this.__addPartOptions(t).__addPartMeasurements(t,!1).__addPartMeasurements(t,!0).__addPartPlugins(t)},Tt.prototype.__addPartOptions=function(t){if(!t.options)return this;const e=this.__mutated.partDistance?.[t.name];for(const o in t.options){const a=t.options[o],i=this.__mutated.optionDistance[o];(!i||i>e)&&(this.options[o]=Object.freeze(a),this.__mutated.optionDistance[o]=e,this.store.log.debug(i?`\ud83d\udfe3  __${o}__ option overwritten by \`${t.name}\``:`\ud83d\udd35  __${o}__ option loaded from part \`${t.name}\``))}return this},Tt.prototype.__addPartMeasurements=function(t,e=!1){const o=e?"optionalMeasurements":"measurements";
1return t[o]&&t[o].forEach((o=>{if(-1!==this.measurements.indexOf(o))return;const a=this.optionalMeasurements.indexOf(o),i=-1!==a;e&&!i&&this.optionalMeasurements.push(o),e||(this.measurements.push(o),i&&this.optionalMeasurements.splice(a,1)),this.store.log.debug(`\ud83d\udfe0  __${o}__ measurement is ${e?"optional":"required"} in \`${t.name}\``)})),this},Tt.prototype.__addPartPlugins=function(t){if(!t.plugins)return this;const e=this.plugins;let o=t.plugins;Array.isArray(o)||(o=[o]);for(let a of o){const o=Ct(a);if(this.store.log.debug(a.plugin?`\ud83d\udd0c  Resolved __${o}__ conditional plugin in \`${t.name}\``:`\ud83d\udd0c  Resolved __${o}__ plugin in \`${t.name}\``),Array.isArray(a)){a={...a[0],data:a[1]}}e[o]?a.plugin&&a.condition?e[o]?.condition?(e[o+"_"]=a,this.store.log.info(`Plugin \`${o}\` was conditionally added again. Renaming to ${o}_.`)):this.store.log.info(`Plugin \`${o}\` was requested conditionally, but is already added explicitly. Not loading.`):e[o].condition&&(e[o]=a,this.store.log.info(`Plugin \`${o}\` was explicitly added. Changing from conditional.`)):(e[o]=a,this.store.log.info(a.condition?`New plugin conditionally added: \`${o}\``:`New plugin added: \`${o}\``))}return this};const xt=["from","after"],Bt=["never","always"];function St(){return Q(this,"freeId",0),Q(this,"topLeft",!1),Q(this,"bottomRight",!1),Q(this,"width",!1),Q(this,"height",!1),Q(this,"utils",a),Q(this,"layout",{move:{x:0,y:0}}),Q(this,"Point",r),Q(this,"Path",l),Q(this,"Snippet",ct),Q(this,"hooks",new wt),this.hidden=!1,this.attributes=new s,this.points={},this.paths={},this.snippets={},this.name=null,this}function Lt(t){this.pattern=t}function Pt(t){this.pattern=t}function Rt(){return this.list={},this}function Ft(t){Q(this,"openGroups",[]),Q(this,"freeId",0),Q(this,"prefix",'<?xml version="1.0" encoding="UTF-8" standalone="no"?>'),this.pattern=t,this.attributes=new s,this.attributes.add("xmlns","http://www.w3.org/2000/svg"),this.attributes.add("xmlns:svg","http://www.w3.org/2000/svg"),this.attributes.add("xmlns:xlink","http://www.w3.org/1999/xlink"),this.attributes.add("xml:lang",t?.settings?.[0]?.locale||"en"),this.attributes.add("xmlns:freesewing","http://freesewing.org/namespaces/freesewing"),this.attributes.add("freesewing",Dt),this.layout={},this.style="",this.defs=new Rt}function Et(t=null){return Q(this,"freeId",0),Q(this,"layout",{move:{x:0,y:0}}),this.attributes=new s,this.parts=new Set,this.name=t,this.topLeft=!1,this.bottomRight=!1,this.width=!1,this.height=!1,this.anchor=new r(0,0),this}Tt.prototype.__resolvePartHiding=function(t){let e=t.hide;if("string"==typeof e&&(e=yt[e]),!e)return;const o=this.__mutated.partDistance?.[t.name],a=this.__hiding.never[t.name]||1/0,i=this.__hiding.always[t.name]||1/0;e.self&&(a>o||i<=a)&&(this.partHide[t.name]=!0),Bt.forEach(((t,a)=>{e[t]&&e[t].forEach((e=>{if((this.__hiding[Bt[Math.abs(a-1)]][e]||1/0)>o){const i=this.__hiding[t][e]||1/0;this.__hiding[t][e]=Math.min(i,o),this.partHide[e]=1==a}}))})),xt.concat("inherited").forEach((o=>{void 0===this.__hiding[o][t.name]&&(this.__hiding[o][t.name]=e[o])}))},Tt.prototype.__resolvePartDependencies=function(t){const e=t[0];this.resolvedDependencies[e.name]=this.resolvedDependencies[e.name]||[],xt.forEach((o=>{if(e[o]){const i=[].concat(e[o]);for(var a=i.length-1;a>=0;a--){const n=i[a];this.__addDependency("directDependencies",e.name,n.name),t.forEach((t=>this.__addDependency("resolvedDependencies",t.name,n.name))),this.__handlePartDependencyOfType(e,n.name,o),this.parts[n.name]?this.__resolvePartDependencies([n,...t]):this.__addPart([n,...t])}}})),this.__resolveMutatedPartDistance(e.name)},Tt.prototype.__addDependency=function(t,e,o){this[t][e]=this[t][e]||[];const a=this[t][e].indexOf(o);-1!==a&&this[t][e].splice(a,1),this[t][e].push(o)},Tt.prototype.__handlePartDependencyOfType=function(t,e,o){!0===this.__hiding[o][t.name]&&void 0===this.partHide[e]&&(this.partHide[e]=!0);const a=this.__hiding.inherited[t.name];"from"===o&&(this.inject[t.name]=e,this.__hiding.after[e]=a),this.__hiding.from[e]=a,this.__hiding.inherited[e]=a},Tt.prototype.__resolveMutatedPartDistance=function(t){if(!this.directDependencies[t])return;let e=this.__mutated.partDistance[t]+1;this.directDependencies[t].forEach((t=>{(void 0===this.__mutated.partDistance[t]||this.__mutated.partDistance[t]<e)&&(this.__mutated.partDistance[t]=e,this.__resolveMutatedPartDistance(t))}))},St.prototype.asRenderProps=function(){const t={};for(const a in this.paths)t[a]=this.paths[a].asRenderProps();const e={};for(const a in this.points)e[a]=this.points[a].asRenderProps();const o={};for(const a in this.snippets)o[a]=this.snippets[a].asRenderProps();return{paths:t,points:e,snippets:o,anchor:e.anchor??new r(0,0),attributes:this.attributes.asRenderProps(),height:this.height,width:this.width,bottomRight:this.bottomRight.asRenderProps(),topLeft:this.topLeft.asRenderProps()}},St.prototype.attr=function(t,e,o=!1){return o?this.attributes.set(t,e):this.attributes.add(t,e),this},St.prototype.getId=function(t=""){return this.__getIdClosure()(t)},St.prototype.hide=function(){return this.hidden=!0,this},St.prototype.setHidden=function(t=!1){return this.hidden=!!t,this},St.prototype.shorthand=function(){let t=this;const e=!!this.context.settings?.complete,o=!!this.context.settings?.expand,i=!!this.context.settings?.paperless,s=this.context.settings?.sa||0,c={complete:e,context:this.context,expand:o,getId:this.__getIdClosure(),log:this.context.store.log,paperless:i,part:this,sa:s,scale:this.context.settings?.scale,store:this.context.store.extend([["pget",function(e,o,a){const i=t.context.settings.options.storePrefix?t.context.settings.options.storePrefix:t.context.store.activePart+".";t.context.store.get(o,a,i);return t.context.store.get(o,a,i)}],["pset",function(e,o,a){const i=t.context.settings.options.storePrefix?t.context.settings.options.storePrefix:t.context.store.activePart+".";return t.context.store.set(o,a,i)}]]),units:this.__unitsClosure(),utils:a,Bezier:n,Point:function(e,o){r.apply(this,[e,o]),Object.defineProperty(this,"log",{value:t.context.store.log})}};return c.Point.prototype=Object.create(r.prototype),c.Path=function(){l.apply(this,[!0]),Object.defineProperty(this,"log",{value:t.context.store.log})},c.Path.prototype=Object.create(l.prototype),c.Snippet=function(e,o){ct.apply(this,[e,o,!0]),ct.apply(this,arguments),Object.defineProperty(this,"log",{value:t.context.store.log})},c.Snippet.prototype=Object.create(ct.prototype),c.points=new Proxy(this.points,function(t,e){return{get:function(...t){return Reflect.get(...t)},set:(t,o,a)=>{a instanceof r!=1&&e.warn(`\`points.${o}\` was set with a value that is not a \`Point\` object`),null!=a.x&&Z(a.x)||e.warn(`\`points.${o}\` was set with a \`x\` parameter that is not a \`number\``),null!=a.y&&Z(a.y)||e.warn(`\`points.${o}\` was set with a \`y\` parameter that is not a \`number\``);try{a.name=o}catch(i){e.warn(`Could not set \`name\` property on \`points.${o}\``)}return t[o]=a}}}(t.points,t.context.store.log)),c.paths=new Proxy(this.paths,function(t,e){return{get:function(...t){return Reflect.get(...t)},set:(t,o,a)=>{a instanceof l!=1&&e.warn(`\`paths.${o}\` was set with a value that is not a \`Path\` object`);try{a.name=o}catch(i){e.warn(`Could not set \`name\` property on \`paths.${o}\``)}return t[o]=a}}}(t.paths,t.context.store.log)),c.snippets=new Proxy(this.snippets,function(t,e){return{get:function(...t){return Reflect.get(...t)},set:(t,o,a)=>{a instanceof ct!=1&&e.warn(`\`snippets.${o}\` was set with a value that is not a \`Snippet\` object`),"string"!=typeof a.def&&e.warn(`\`snippets.${o}\` was set with a \`def\` parameter that is not a \`string\``),a.anchor instanceof r!=1&&e.warn(`\`snippets.${o}\` was set with an \`anchor\` parameter that is not a \`Point\``);try{a.name=o}catch(i){e.warn(`Could not set \`name\` property on \`snippets.${o}\``)}return t[o]=a}}}(t.snippets,t.context.store.log)),c.measurements=new Proxy(this.context.settings.measurements,{get:function(e,o){return void 0===e[o]&&t.context.store.log.warn(`${t.name} tried to access \`measurements.${o}\` but it is \`undefined\``),Reflect.get(...arguments)},set:(e,o,a)=>t.context.settings.measurements[o]=a}),c.options=new Proxy(this.context.settings.options,{get:function(e,o,a){const i=t.context.store.activePart.replace(".","_")+"_"+o;return void 0===e[i]?(void 0===e[o]&&t.context.store.log.warn(`Tried to access \`options.${o}\` but it is \`undefined\``),Reflect.get(...arguments)):e[i]},set:(e,o,a)=>t.context.settings.options[o]=a}),c.absoluteOptions=new Proxy(this.context.settings.absoluteOptions,{get:function(e,o){return void 0===e[o]&&t.context.store.log.warn(`Tried to access \`absoluteOptions.${o}\` but it is \`undefined\``),Reflect.get(...arguments)},set:(e,o,a)=>t.context.settings.absoluteOptions[o]=a}),c.macro=this.__macroClosure(c),c},St.prototype.unhide=function(){return this.hidden=!1,this},St.prototype.units=function(t){return X(t,this.context.settings.units)},St.prototype.__boundary=function(){if(this.topLeft)return this;let t=new r(1/0,1/0),e=new r(-1/0,-1/0);for(let a in this.paths)try{let o=this.paths[a].__boundary();o.hidden||(o.topLeft.x<t.x&&(t.x=o.topLeft.x),o.topLeft.y<t.y&&(t.y=o.topLeft.y),o.bottomRight.x>e.x&&(e.x=o.bottomRight.x),o.bottomRight.y>e.y&&(e.y=o.bottomRight.y))}catch(o){return this.context.store.log.error(`Could not calculate boundary of \`paths.${a}\``),!1}for(let a in this.points){let o=this.points[a],i=o.attributes.get("data-circle");
1i&&(i=parseFloat(i),o.x-i<t.x&&(t.x=o.x-i),o.y-i<t.y&&(t.y=o.y-i),o.x+i>e.x&&(e.x=o.x+i),o.y+i>e.y&&(e.y=o.y+i))}return t.x===1/0&&(t.x=0),t.y===1/0&&(t.y=0),e.x===-1/0&&(e.x=0),e.y===-1/0&&(e.y=0),this.topLeft=t,this.bottomRight=e,this.width=this.bottomRight.x-this.topLeft.x,this.height=this.bottomRight.y-this.topLeft.y,this},St.prototype.__getIdClosure=function(){const t=this;return function(e=""){return t.freeId+=1,e+t.freeId}},St.prototype.__inject=function(t){const e=e=>{for(let o in t.points)if(t.points[o]===e)return o};this.freeId=t.freeId;for(let o in t.points)this.points[o]=t.points[o].clone();for(let o in t.paths){this.paths[o]=t.paths[o].clone();for(let a in t.paths[o].ops){let i=t.paths[o].ops[a];if("close"!==i.type){let t=e(i.to);t&&(this.paths[o].ops[a].to=this.points[t])}if("curve"===i.type){let t=e(i.cp1);t&&(this.paths[o].ops[a].cp1=this.points[t]);let n=e(i.cp2);n&&(this.paths[o].ops[a].cp2=this.points[n])}}}for(let o in t.snippets)this.snippets[o]=t.snippets[o].clone();return t.context.store.parts?.[t.name]&&(this.context.store.parts[this.name]=JSON.parse(JSON.stringify(t.context.store.parts[t.name]))),this},St.prototype.__macroClosure=function(t){const e=this;return function(o,a){const i=tt(o.toLowerCase());let n;if("function"==typeof e[i]){"context"in e&&(n=e.context.store.get("activeMacro",!1),e.context.store.set("activeMacro",o.toLowerCase()));const s=e[i](a,t);return"context"in e&&(n?e.context.store.set("activeMacro",n):e.context.store.unset("activeMacro")),s}"context"in e&&e.context.store.log.warn("Unknown macro `"+o.toLowerCase()+"` used in "+e.name)}},St.prototype.__unitsClosure=function(){const t=this;return function(e){return"number"!=typeof e&&t.context.store.log.warn(`Calling \`units(value)\` but \`value\` is not a number (\`${typeof e}\`)`),X(e,t.context.settings.units)}},Lt.prototype.draft=function(){this.pattern.__runHooks("preDraft"),this.pattern.parts=[],this.pattern.__extendPatternStore();for(const t in this.pattern.settings){this.pattern.setStores[t]=this.pattern.__createSetStore(),this.__useSet(t),this.activeStore.log.debug(`\ud83d\uddc3\ufe0f Initialized store for set \`${t}\``),this.pattern.__runHooks("preSetDraft"),this.activeStore.log.debug(`\ud83d\udcd0 Drafting pattern for set \`${t}\``),this.pattern.parts[t]={},this.__loadAbsoluteOptionsSet(t);for(const e of this.pattern.config.draftOrder)this.pattern.__needs(e,t)?this.draftPartForSet(e,t):this.activeStore.log.debug(`Part \`${e}\` is not needed. Skipping part`);this.pattern.__runHooks("postSetDraft")}this.pattern.__runHooks("postDraft")},Lt.prototype.draftPartForSet=function(t,e){if("__proto__"===e)throw new Error("malicious attempt at altering Object.prototype. Stopping action");this.__useSet(e),this.__createPartForSet(t,e);const o=this.pattern.config.parts?.[t];if("function"==typeof o?.draft){this.pattern.activePart=t,this.activeStore.set("activePart",t);try{this.pattern.__runHooks("prePartDraft");const a=o.draft(this.pattern.parts[e][t].shorthand());return void 0===a?this.activeStore.log.error(`Result of drafting part \`${t}\` was undefined. Did you forget to return the part?`):(this.pattern.__wants(t,e)||a.hide(),this.pattern.__runHooks("postPartDraft"),this.pattern.parts[e][t]=a),a}catch(a){this.activeStore.log.error([`Unable to draft part \`${t}\` (set \`${e}\`)`,a])}}else this.activeStore.log.error(`Unable to draft pattern part \`${t}\`. Part.draft() is not callable`)},Lt.prototype.__createPartForSet=function(t,e=0){if("__proto__"===e)throw new Error("malicious attempt at altering Object.prototype. Stopping action");this.activeStore.log.debug(`\ud83d\udce6 Creating part \`${t}\` (set \`${e}\`)`),this.pattern.parts[e][t]=this.pattern.parts[e][t]||this.__createPartWithContext(t,e);const o=this.pattern.config.inject[t];if("string"==typeof o){this.activeStore.log.debug(`\ud83e\ude86 Creating part \`${t}\` from part \`${o}\``);try{this.pattern.parts[e][t].__inject(this.pattern.parts[e][o])}catch(a){this.activeStore.log.error([`Could not inject part \`${o}\` into part \`${t}\``,a])}}},Lt.prototype.__createPartWithContext=function(t,e){const o=new St;o.name=t,o.set=e,o.stack=this.pattern.config.parts[t]?.stack||t,o.context={parts:this.pattern.parts[e],config:this.pattern.config,settings:this.pattern.settings[e],store:this.pattern.setStores[e],macros:this.pattern.plugins.macros},this.pattern.settings[e]?.partClasses&&o.attr("class",this.pattern.settings[e].partClasses);for(const a in this.pattern.plugins.macros)o[tt(a)]=this.pattern.plugins.macros[a];return o},Lt.prototype.__loadAbsoluteOptionsSet=function(t){for(const e in this.pattern.settings[t].options){const o=this.pattern.config.options[e];if(void 0!==o&&o.toAbs instanceof Function)if(void 0!==o.snap)this.pattern.settings[t].absoluteOptions[e]=this.__snappedPercentageOption(e,t),this.pattern.setStores[t].log.debug(`\ud83e\uddf2 Snapped __${e}__ to \`${this.pattern.settings[t].absoluteOptions[e]}\` for set __${t}__`);else{const a=o.toAbs(this.pattern.settings[t].options[e],this.pattern.settings[t],I(this.pattern.settings[t],this.pattern.config.options));this.pattern.settings[t].absoluteOptions[e]=a,this.pattern.setStores[t].log.debug(`\ud83e\uddee Absolute value of \`${e}\` option is \`${a}\` for set __${t}__`)}}return this},Lt.prototype.__snappedPercentageOption=function(t,e){const o=this.pattern.config.options[t];return W(o.toAbs(this.pattern.settings[e].options[t],this.pattern.settings[e],I(this.pattern.settings[e],this.pattern.config.options)),o,this.pattern.settings[e].units)}
1,Lt.prototype.__useSet=function(t=0){this.pattern.activeSet=t,this.activeStore=this.pattern.setStores[t]},Pt.prototype.sampleMeasurement=function(t){return this.pattern.store.log.debug(`Sampling measurement \`${t}\``),this.pattern.__runHooks("preSample"),this.pattern.__applySettings(this.__measurementSets(t)),this.pattern.__init(),this.pattern.__runHooks("postSample"),this.pattern.draft()},Pt.prototype.sampleModels=function(t,e=!1){return this.pattern.store.log.debug(`Sampling models \`${Object.keys(t).join(", ")}\``),this.pattern.__runHooks("preSample"),this.pattern.__applySettings(this.__modelSets(t,e)),this.pattern.__init(),this.pattern.__runHooks("postSample"),this.pattern.draft()},Pt.prototype.sampleOption=function(t){return this.pattern.store.log.debug(`Sampling option \`${t}\``),this.pattern.__runHooks("preSample"),this.pattern.__applySettings(this.__optionSets(t)),this.pattern.__init(),this.pattern.__runHooks("postSample"),this.pattern.draft()},Pt.prototype.__listBoolOptionSets=function(t){let e=this.pattern.config.options[t];const o=this.__setBase(),a=[];let i=1;void 0!==e.bool&&(e={list:[!1,!0]});for(const n of e.list){const e={...o,options:{...o.options},idPrefix:`sample-${i}`,partClasses:`sample-${i}`};e.options[t]=n,a.push(e),i++}return a},Pt.prototype.__measurementSets=function(t){let e=this.pattern.settings[0].measurements[t];void 0===e&&this.pattern.store.log.error(`Cannot sample measurement \`${t}\` because it's \`undefined\``);let o=e/50;e*=.9;const a=[],i=this.__setBase();for(let n=1;n<11;n++){const s={...i,measurements:{...i.measurements},idPrefix:`sample-${n}`,partClasses:`sample-${n}`};s.measurements[t]=e,a.push(s),e+=o}return a},Pt.prototype.__modelSets=function(t,e=!1){const o=[],a=this.__setBase();let i=1;e&&(o.push({...a,measurements:t[e],idPrefix:`sample-${i}`,partClasses:`sample-${i} sample-focus`}),i++,delete t[e]);for(const n of Object.values(t))o.push({...a,measurements:n,idPrefix:`sample-${i}`,partClasses:`sample-${i}`});return o},Pt.prototype.__optionSets=function(t){const e=[];if(!(t in this.pattern.config.options))return e;let o=this.pattern.config.options[t];if("object"==typeof o.list||void 0!==o.bool)return this.__listBoolOptionSets(t);let a,i,n=1,s=10,r=s-1;if(void 0===o.min||void 0===o.max){o={min:.9*o,max:1.1*o}}if(void 0!==o.pct&&(n=100),i=o.min/n,void 0!==o.count||void 0!==o.mm){const t=o.max-o.min+1;t<10&&(s=t,r=Math.max(s-1,1))}a=(o.max/n-i)/r;const l=this.__setBase(),c=void 0!==o.count||void 0!==o.mm;for(let p=1;p<=s;p++){const o={...l,options:{...l.options},idPrefix:`sample-${p}`,partClasses:`sample-${p}`};o.options[t]=c?Math.ceil(i):i,e.push(o),i+=a}return e},Pt.prototype.__setBase=function(){return{measurements:{},options:{},...this.pattern.settings[0]}},Rt.prototype.clone=function(){let t=new Rt;return t.list=JSON.parse(JSON.stringify(this.list)),t},Rt.prototype.get=function(t){return void 0!==this.list[t]&&this.list[t]},Rt.prototype.remove=function(t){return delete this.list[t],this},Rt.prototype.render=function(){let t="";for(let e in this.list)t+=` ${e}="${this.list[e]}"`;return t},Rt.prototype.set=function(t,e){return this.list[t]=e,this},Rt.prototype.setIfUnset=function(t,e){return void 0===this.list[t]&&(this.list[t]=e),this},Rt.prototype.asRenderProps=function(){return{list:this.list,forSvg:this.render()}},Ft.prototype.asRenderProps=function(){return{attributes:this.attributes.asRenderProps(),layout:this.layout,style:this.style,defs:this.defs.asRenderProps()}},Ft.prototype.render=function(){this.idPrefix=this.pattern?.settings?.[0]?.idPrefix||"fs-",this.__runHooks("preRender"),this.pattern.settings[0].embed||(this.attributes.add("width",J(this.pattern.width)+"mm"),this.attributes.add("height",J(this.pattern.height)+"mm")),this.attributes.add("viewBox",`0 0 ${J(this.pattern.width)} ${J(this.pattern.height)}`),this.head=this.__renderHead(),this.tail=this.__renderTail(),this.svg="",this.layout={},this.activeStackIndex=0;for(let t in this.pattern.stacks){this.activeStack=t,this.idPrefix=this.pattern.settings[this.activeStackIndex]?.idPrefix||"fs-";const e=this.pattern.stacks[t];if(!this.pattern.__isStackHidden(t)){const o=this.__renderStack(e);this.layout[t]={svg:o,transform:e.attributes.getAsArray("transform")},this.svg+=this.__openGroup(`${this.idPrefix}stack-${t}`,e.attributes),this.svg+=o,this.svg+=this.__closeGroup()}this.activeStackIndex++}return this.svg=this.prefix+this.__renderSvgTag()+this.head+this.svg+this.tail,this.__runHooks("postRender"),this.svg}
1,Ft.prototype.__closeGroup=function(){return this.__outdent(),`${this.__nl()}</g>${this.__nl()}\x3c!-- end of group #${this.openGroups.pop()} --\x3e`},Ft.prototype.__escapeText=function(t){return Array.isArray(t)?t.map((t=>t?t.replace(/"/g,"&#8220;"):"")).join(" "):t.replace(/"/g,"&#8220;")},Ft.prototype.__getId=function(){return this.freeId+=1,""+this.freeId},Ft.prototype.__indent=function(){return this.tabs+=1,this},Ft.prototype.__insertText=function(t){if(this.hooks.insertText.length>0)for(let e of this.hooks.insertText)t=e.method(this.pattern.settings[this.pattern.activeSet].locale||"en",t,e.data,this.pattern);return t},Ft.prototype.__nl=function(){return"\n"+this.__tab()},Ft.prototype.__outdent=function(){return this.tabs-=1,this},Ft.prototype.__openGroup=function(t,e=!1){let o=this.__nl()+this.__nl();return o+=`\x3c!-- Start of group #${t} --\x3e`,o+=this.__nl(),o+=`<g id="${t}"`,e&&(o+=` ${e.render()}`),o+=">",this.__indent(),this.openGroups.push(t),o},Ft.prototype.__renderCircle=function(t){return`<circle cx="${J(t.x)}" cy="${J(t.y)}" r="${t.attributes.get("data-circle")}" ${t.attributes.renderIfPrefixIs("data-circle-")}></circle>`},Ft.prototype.__renderDefs=function(){let t="<defs>";return this.__indent(),t+=this.__nl()+this.defs.render(),this.__outdent(),t+=this.__nl()+"</defs>"+this.__nl(),t},Ft.prototype.__renderHead=function(){let t=this.__renderStyle();return t+=this.__renderDefs(),t+=this.__openGroup(this.idPrefix+"container"),t},Ft.prototype.__renderPath=function(t){return t.attributes.get("id")||t.attributes.add("id",this.idPrefix+this.__getId()),t.attributes.set("d",t.asPathstring()),`${this.__nl()}<path ${t.attributes.render()} />${this.__renderPathText(t)}`},Ft.prototype.__renderPathText=function(t){let e=t.attributes.getAsArray("data-text");if(!e)return"";this.text=this.__insertText(e);let o=t.attributes.renderIfPrefixIs("data-text-"),a="",i=t.attributes.get("data-text-class");i&&i.indexOf("center")>-1?a=' startOffset="50%" ':i&&i.indexOf("right")>-1&&(a=' startOffset="100%" ');let n=this.__nl()+"<text>";return this.__indent(),n+=`<textPath xlink:href="#${t.attributes.get("id")}" ${a}><tspan ${o}>${this.__escapeText(this.text)}</tspan></textPath>`,this.__outdent(),n+=this.__nl()+"</text>",n},Ft.prototype.__renderPart=function(t){const e=t.attributes.clone();e.add("transform",`translate(${-t.asRenderProps().anchor.x}, ${-t.asRenderProps().anchor.y})`);let o=this.__openGroup(`${this.idPrefix}stack-${this.activeStack}-part-${t.name}`,e);for(let a in t.paths){let e=t.paths[a];e.hidden||(o+=this.__renderPath(e))}for(let a in t.points)t.points[a].attributes.get("data-text")&&(o+=this.__renderText(t.points[a])),t.points[a].attributes.get("data-circle")&&(o+=this.__renderCircle(t.points[a]));for(let a in t.snippets){let e=t.snippets[a];o+=this.__renderSnippet(e,t)}return o+=this.__closeGroup(),o},Ft.prototype.__renderSnippet=function(t){if(!this.pattern.settings[0].complete&&!t.attributes.get("data-force"))return"";let e=J(t.anchor.x),o=J(t.anchor.y),a=t.attributes.get("data-scale")||1;a*=this.pattern.settings.scale||1,a&&(t.attributes.add("transform",`translate(${e}, ${o})`),t.attributes.add("transform",`scale(${a})`),t.attributes.add("transform",`translate(${-1*e}, ${-1*o})`));let i=t.attributes.get("data-rotate");i&&t.attributes.add("transform",`rotate(${i}, ${e}, ${o})`);let n=this.__nl();return n+=`<use x="${e}" y="${o}" `,n+=`xlink:href="#${t.def}" ${t.attributes.render()}>`,n+="</use>",n},Ft.prototype.__renderStack=function(t){let e="";for(const o of t.parts)e+=this.__renderPart(o);return e},Ft.prototype.__renderStyle=function(){let t='<style type="text/css"> <![CDATA[ ';return this.__indent(),t+=this.__nl()+this.style,this.__outdent(),t+=this.__nl()+"]]>"+this.__nl()+"</style>"+this.__nl(),t},Ft.prototype.__renderSvgTag=function(){let t="<svg";return this.__indent(),t+=this.__nl()+this.attributes.render(),this.__outdent(),t+=this.__nl()+">"+this.__nl(),t},Ft.prototype.__renderTail=function(){let t="";return t+=this.__closeGroup(),t+=this.__nl()+"</svg>",t},Ft.prototype.__renderText=function(t){let e=t.attributes.getAsArray("data-text");if(!1!==e){let t="";for(let o of e)this.text=this.__insertText(o),t+=this.text+" ";this.text=this.__insertText(t)}t.attributes.set("data-text-x",J(t.x)),t.attributes.set("data-text-y",J(t.y));let o=t.attributes.get("data-text-lineheight")||6*(this.pattern.settings.scale||1);t.attributes.remove("data-text-lineheight");let a=`${this.__nl()}<text ${t.attributes.renderIfPrefixIs("data-text-")}>`;if(this.__indent(),-1!==this.text.indexOf("\n")){let e=this.text.split("\n");a+=`<tspan>${e.shift()}</tspan>`;for(let i of e)a+=`<tspan x="${J(t.x)}" dy="${o}">${i}</tspan>`}else a+=`<tspan>${this.__escapeText(this.text)}</tspan>`;
1return this.__outdent(),a+=this.__nl()+"</text>",a},Ft.prototype.__runHooks=function(t,e=!1){!1===e&&(e=this);let o=this.hooks[t];if(o.length>0)for(let a of o)a.method(e,a.data)},Ft.prototype.__tab=function(){let t="";for(let e=0;e<this.tabs;e++)t+="  ";return t},Et.prototype.addPart=function(t){return t&&this.parts.add(t),this},Et.prototype.asRenderProps=function(){return{name:this.name,attributes:this.attributes.asRenderProps(),topLeft:this.topLeft,bottomRight:this.bottomRight,width:this.width,height:this.height,parts:[...this.parts].map((t=>t.asRenderProps()))}},Et.prototype.getPartList=function(){return[...this.parts]},Et.prototype.getPartNames=function(){return[...this.parts].map((t=>t.name))},Et.prototype.home=function(){if(this.topLeft)return this;this.topLeft=new r(1/0,1/0),this.bottomRight=new r(-1/0,-1/0);for(const e of this.getPartList()){e.__boundary();let t=e.points?.anchor,o=e;t&&(o={topLeft:e.topLeft.translate(-t.x,-t.y),bottomRight:e.bottomRight.translate(-t.x,-t.y)});const{topLeft:a,bottomRight:i}=st(o,e.attributes.getAsArray("transform"));a&&(this.topLeft.x=Math.min(this.topLeft.x,a.x),this.topLeft.y=Math.min(this.topLeft.y,a.y),this.bottomRight.x=Math.max(this.bottomRight.x,i.x),this.bottomRight.y=Math.max(this.bottomRight.y,i.y))}this.topLeft.x===1/0&&(this.topLeft.x=0),this.topLeft.y===1/0&&(this.topLeft.y=0),this.bottomRight.x===-1/0&&(this.bottomRight.x=0),this.bottomRight.y===-1/0&&(this.bottomRight.y=0);let t=0;for(const e in this.context.settings)this.context.settings[e].margin>t&&(t=this.context.settings[e].margin),this.context.settings[e].paperless&&t<10&&(t=10);return this.topLeft.x-=t,this.topLeft.y-=t,this.bottomRight.x+=t,this.bottomRight.y+=t,this.width=this.bottomRight.x-this.topLeft.x,this.height=this.bottomRight.y-this.topLeft.y,this.width=this.bottomRight.x-this.topLeft.x,this.height=this.bottomRight.y-this.topLeft.y,this.anchor=new r(0,0),this.topLeft.x===this.anchor.x&&this.topLeft.y===this.anchor.y||(this.attr("transform",`translate(${this.anchor.x-this.topLeft.x}, ${this.anchor.y-this.topLeft.y})`),this.layout.move.x=this.anchor.x-this.topLeft.x,this.layout.move.y=this.anchor.y-this.topLeft.y),this},Et.prototype.getAnchor=function(){let t=!0,e=!0;const o=this.getPartList();for(const a of o)void 0===a.points.anchor&&(t=!1),void 0===a.points.gridAnchor&&(e=!1);return t?o[0].points.anchor:e?o[0].points.gridAnchor:new r(0,0)},Et.prototype.attr=function(t,e,o=!1){return o?this.attributes.set(t,e):this.attributes.add(t,e),this},Et.prototype.generateTransform=function(t){const{move:e,rotate:o,flipX:a,flipY:i}=t,n=E(e?.x,e?.y,o,a,i,this);return this.attributes.remove("transform"),n.forEach((t=>this.attr("transform",t))),this};function Wt(t){this.pattern=t,this.autoLayout=t.autoLayout}Wt.prototype.render=function(){return this.__startRender(),this.pattern.svg=this.svg,this.svg.render()},Wt.prototype.getRenderProps=function(){this.pattern.store.log.info("Gathering render props"),this.__startRender(),this.svg.__runHooks("preRender");const t={svg:this.svg.asRenderProps(),width:this.pattern.width,height:this.pattern.height,autoLayout:this.pattern.autoLayout,settings:this.pattern.settings,stacks:{}};for(let e in this.pattern.stacks)this.pattern.__isStackHidden(e)?this.pattern.store.log.info(`Stack ${e} is hidden. Skipping in render props.`):t.stacks[e]=this.pattern.stacks[e].asRenderProps();return this.svg.__runHooks("postRender"),t},Wt.prototype.__startRender=function(){return this.svg=new Ft(this.pattern),this.svg.hooks=this.pattern.plugins.hooks,this.__pack(),this},Wt.prototype.__stack=function(){this.stacks={};const t=this.pattern.settings;for(const e in t)for(const[o,a]of Object.entries(this.pattern.parts[e])){const i=t[e].stackPrefix+("function"==typeof a.stack?a.stack(t[e],o):a.stack);void 0===this.stacks[i]&&(this.stacks[i]=this.__createStackWithContext(i,e)),this.stacks[i].addPart(a)}this.pattern.stacks=this.stacks},Wt.prototype.__pack=function(){this.pattern.__runHooks("preLayout");const{settings:t,setStores:e,activeSet:o}=this.pattern;for(const n in t)if(e[n].logs.error.length>0)return e[n].log.warn("One or more errors occured. Not packing pattern parts"),this;this.__stack();let a=[];for(const[n,s]of Object.entries(this.stacks))s.attributes.remove("transform"),this.pattern.__isStackHidden(n)||(s.home(),!0===t[o].layout&&a.push({id:n,width:s.width,height:s.height}));if(!0===t[o].layout){const t=a.length>0?this.pattern.store.pack(a,this):{width:0,height:0};this.autoLayout.width=t.width,this.autoLayout.height=t.height;for(let e of a){let t=this.stacks[e.id];this.autoLayout.stacks[e.id]={move:{x:e.x+t.layout.move.x,y:e.y+t.layout.move.y}}}}const i="object"==typeof t[o].layout?t[o].layout:this.autoLayout;this.width=i.width,this.height=i.height;for(let n of Object.keys(i.stacks))if(this.stacks[n]){let t=i.stacks[n];this.stacks[n].generateTransform(t)}return this.pattern.width=this.width,this.pattern.height=this.height,this.pattern.autoLayout=this.autoLayout,this.pattern.__runHooks("postLayout"),this},Wt.prototype.__createStackWithContext=function(t){const e=new Et;return e.name=t,e.context={config:this.pattern.config,settings:this.pattern.settings,setStores:this.pattern.setStores},e};var Ht=o(68290);function At(t={}){return this.designConfig=Ht(t),this.config={},this.store=new ft,this.setStores=[],Q(this,"width",0),Q(this,"height",0),Q(this,"autoLayout",{stacks:{}}),Q(this,"is",""),Q(this,"Point",r),Q(this,"Path",l),Q(this,"Snippet",ct),Q(this,"Attributes",s),Q(this,"__initialized",!1),Q(this,"config.parts",{}),Q(this,"config.resolvedDependencies",{}),Q(this,"plugins",new vt(this)),Q(this,"__configResolver",new Tt(this)),this}function Ot(t){t={...bt(),...t};const e=function(...e){return At.call(this,t),this.__applySettings(e)};return(e.prototype=Object.create(At.prototype)).constructor=e,e.de
1signConfig=t,e.patternConfig=(new e).getConfig(),e}At.prototype.addPart=function(t,e=!0){return this.__configResolver.isPartValid(t)&&!this.designConfig.parts.find((e=>e.name==t.name))&&(this.store.log.debug(`Adding Part \`${t.name}\` at runtime`),this.designConfig.parts.push(t),e&&this.__configResolver.addPart(t)),this},At.prototype.getConfig=function(){return this.__init().config},At.prototype.on=function(t,e,o){return this.plugins.on(t,e,o),this},At.prototype.use=function(t,e){return this.plugins.use(t,e,this.settings),this},At.prototype.draft=function(){return this.__init(),new Lt(this).draft(),this},At.prototype.draftPartForSet=function(t,e){return this.__init(),new Lt(this).draftPartForSet(t,e)},At.prototype.render=function(){return new Wt(this).render()},At.prototype.getRenderProps=function(){return new Wt(this).getRenderProps()},At.prototype.getLogs=function(){return{pattern:this.store.logs,sets:this.setStores.map((t=>t.logs))}},At.prototype.sample=function(){this.__init();const t=this.settings[0].sample;return"option"===t.type?this.sampleOption(t.option):"measurement"===t.type?this.sampleMeasurement(t.measurement):"models"===t.type?this.sampleModels(t.models,t.focus||!1):this.draft()},At.prototype.sampleMeasurement=function(t){return new Pt(this).sampleMeasurement(t)},At.prototype.sampleModels=function(t,e=!1){return new Pt(this).sampleModels(t,e)},At.prototype.sampleOption=function(t){return new Pt(this).sampleOption(t)},At.prototype.__applySettings=function(t){if(!Array.isArray(t))throw"Sets should be an array of settings objects";0===t.length&&t.push({}),this.settings=[];for(let e=0;e<t.length;e++){const o={...t[e]};o.options||(o.options={}),o.measurements||(o.measurements={}),this.settings.push({complete:!0,expand:!0,idPrefix:"fs-",stackPrefix:"",locale:"en",units:"metric",margin:2,scale:1,layout:!0,options:{},absoluteOptions:{},measurements:{},...o,options:{...o.options},measurements:{...o.measurements}})}return this},At.prototype.__extendPatternStore=function(){return this.store.extend([...this.plugins.__storeMethods]),this.store},At.prototype.__createSetStore=function(){const t=new ft;return t.set("data",this.store.data),t.extend([...this.plugins.__storeMethods]),t},At.prototype.__init=function(){return this.__initialized||(this.__runHooks("preInit"),this.store.log.info(`New \`${this.designConfig.data?.name||"No Name"}:${this.designConfig.data?.version||"No version"}\` pattern using \`@freesewing/core:${Dt}\``),this.designConfig.parts.forEach((t=>this.__configResolver.addPart(t))),this.__configResolver.logPartDistances(),this.config=this.__configResolver.asConfig(),this.plugins.loadConfigPlugins(this.config,this.settings),this.designConfig.data&&this.store.set("data",this.designConfig.data),this.__loadOptionDefaults(),this.store.log.info(`Pattern initialized. Draft order is: ${this.config.draftOrder.map((t=>`\`${t}\``)).join(", ")}`),this.__runHooks("postInit"),this.__initialized=!0),this},At.prototype.__loadOptionDefaults=function(){if(this.config.options||(this.config.options={}),Object.keys(this.config.options).length<1)return this;for(const t in this.settings)for(const[e,o]of Object.entries(this.config.options))if(void 0===this.settings[t].options[e])if("object"==typeof o)if(void 0!==o.pct)this.settings[t].options[e]=o.pct/100;else if(void 0!==o.mm)this.settings[t].options[e]=o.mm;else if(void 0!==o.deg)this.settings[t].options[e]=o.deg;else if(void 0!==o.count)this.settings[t].options[e]=o.count;else if(void 0!==o.bool)this.settings[t].options[e]=o.bool;else{if(void 0===o.dflt){let t="Unknown option type: "+JSON.stringify(o);throw this.store.log.error(t),new Error(t)}this.settings[t].options[e]=o.dflt}else this.settings[t].options[e]=o;return this},At.prototype.__runHooks=function(t,e=!1){!1===e&&(e=this);let o=this.plugins.hooks[t];if(o.length>0){this.store.log.debug(`\ud83e\ude9d Running \`${t}\` hooks`);for(let t of o)t.method(e,t.data)}},At.prototype.__isPartHidden=function(t){const e=this.parts?.[this.activeSet]?.[t]?.hidden||!1;return Array.isArray(this.settings[this.activeSet||0].only)&&this.settings[this.activeSet||0].only.includes(t)?e:!!this.config.partHide?.[t]||e},At.prototype.__isStackHidden=function(t){if(!this.stacks[t])return!0;const e=this.stacks[t].getPartNames();for(const o of e)if(!this.__isPartHidden(o))return!1;return!0},At.prototype.__needs=function(t,e=0){if(void 0===this.settings[e].only||!1===this.settings[e].only||Array.isArray(this.settings[e].only)&&0===this.settings[e].only.length)return!0;const o="string"==typeof this.settings[e].only?[this.settings[e].only]:this.settings[e].only;for(const a of o){if(a===t)return!0;
1if(-1!==this.config.resolvedDependencies[a]?.indexOf(t))return!0}return!1},At.prototype.__wants=function(t,e=0){if(this.__isPartHidden(t))return!1;if("string"==typeof this.settings[e].only)return this.settings[e].only===t;if(Array.isArray(this.settings[e].only)){for(const o of this.settings[e].only)if(o===t)return!0;return!1}return!0};const Dt="4.6.0"},56702:(t,e,o)=>{o.d(e,{MX:()=>n,N_:()=>s,hB:()=>c,sn:()=>l});var a=o(14041),i=o(86560);const n=({children:t,id:e="",title:o=!1})=>a.createElement("a",{href:`#${e}`,className:i.lD,title:o||""},t),s=({children:t,className:e=i.lD,href:o,style:n={},target:s,title:r=!1})=>a.createElement("a",{href:o,target:s,className:e,title:r||"",style:n},t),r=s,l=({children:t,href:e,title:o=!1,Link:n})=>n?a.createElement(n,{href:e,className:i.lD,title:o||""},a.createElement("span",{className:"tw:text-success-content tw:hover:text-success-content"},t)):a.createElement("a",{href:e,className:i.lD,title:o||""},a.createElement("span",{className:"tw:text-success-content tw:hover:text-success-content"},t)),c=({children:t,className:e="tw:bg-base-200 tw:text-base-content",href:o,title:i,icon:n,Link:s})=>(s||(s=r),a.createElement(s,{href:o,className:`tw:px-8 tw:py-10 tw:rounded-lg tw:block ${e}\n      tw:hover:bg-secondary/5 tw:shadow-lg tw:bg-base-200\n      tw:transition-color tw:duration-300 grow tw:hover:no-underline no-hover-decoration`},a.createElement("h2",{className:"tw:mb-4 tw:text-base-content tw:flex tw:flex-row tw:gap-4 tw:justify-between tw:items-center"},a.createElement("span",{className:"tw:text-base-content"},i),a.createElement("span",{className:"tw:shrink-0 tw:text-base-content"},n)),a.createElement("div",{className:"tw:text-base-content"},t)))},56821:(t,e,o)=>{o.d(e,{Cv:()=>Cu,rJ:()=>gu,$$:()=>Pu,_e:()=>uu,wm:()=>Lu,K1:()=>Fu,Ru:()=>Ru,Kk:()=>ku,WA:()=>wu,J6:()=>bu,_A:()=>Bu,Wp:()=>Su});var a={};o.r(a),o.d(a,{articulatedKnee:()=>Ua,articulatedKneeAngle:()=>za,articulatedKneeDartSize:()=>$a,articulatedKneeSize:()=>Ya,backPocketCargo:()=>Za,backPocketCargoWidth:()=>ti,backPocketInside:()=>qa,backPocketType:()=>Qa,bandBelowKnee:()=>Ca,curvedDartBottomControlOffset:()=>wa,curvedDartControlAngle:()=>ga,curvedDartTopControlOffset:()=>ba,curvedDarts:()=>ua,dartPosition:()=>ka,flyWidth:()=>Wa,frontPocketCargo:()=>ai,frontPocketCargoWidth:()=>ii,frontPocketInside:()=>oi,frontPocketType:()=>ei,fullness:()=>Ha,gussetDepth:()=>Ka,gussetExtraSpace:()=>Ja,gussetWidthBack:()=>Xa,gussetWidthFront:()=>Va,hemLength:()=>Ga,hemType:()=>ja,hipsShift:()=>Aa,legLength:()=>Ma,legLengthCustom:()=>_a,pctAtoT:()=>Ea,pctKtoH:()=>Fa,pctKtoRout:()=>Pa,pctKtoRup:()=>Ra,pctRtoKdown:()=>La,pctRtoKin:()=>Sa,pctRtoZin:()=>xa,pctRtoZup:()=>Ba,pctZtoR:()=>Ta,ventLength:()=>va,waistBandWidth:()=>Na,waistReduction:()=>Ia,waistbandBelowWaist:()=>ya,waistbandLower:()=>Da,waistbandType:()=>Oa});var i={};o.r(i),o.d(i,{armholeDartCurvePoint:()=>Gi,armholeDartCurveWidth:()=>Ui,armholeDartCurved:()=>ji,armholeDartPosition:()=>_i,backHemSlope:()=>Ai,bustDartAngle:()=>Fi,bustDartCurve:()=>Pi,bustDartLength:()=>Ri,bustDartMinimumFabric:()=>Ei,bustSpanEase:()=>Hi,dartPosition:()=>Di,shoulderDartCurvature:()=>Ii,shoulderDartPosition:()=>Mi,shoulderToShoulderCorrection:()=>Li,upperDartLength:()=>Oi,waistDartCurve:()=>Wi,waistdartposition:()=>Ni});var n=o(52665);const s={en:JSON.parse('{"t":"Brian body block","d":"Brian is a basic body block for people without breasts.","p":{"back":"Back","front":"Front","base":"Base"},"s":{"largeShoulderWidth.t":"Shoulder Width larger than anticipated","largeShoulderWidth.d":"The pattern was not able to generate an optimal armhole shape using the given measurements and options. Please be aware that the generated pattern may not be correct. Please retake your measurements, verify that they are correct, and try generating a new pattern with the new measurements.","waistLine":"Waist Line","chestLine":"Chest Line"},"o":{"acrossBackFactor":{"t":"Across back factor","d":"Controls your across back width as a factor of your shoulder to shoulder measurement."},"armholeDepth":{"t":"Armhole depth","d":"Controls the depth of the armhole. Higher values make a deeper armhole."},"armholeDepthFactor":{"t":"Armhole depth factor (legacy)","d":"Controls the depth of the armhole. Higher values make a deeper armhole. This option only applies to the legacy (v2) way of calculating the armhole depth."},"backNeckCutout":{"t":"Back neck cutout","d":"How deep the neck is cut out at the back"},"bicepsEase":{"t":"Biceps ease","d":"The amount of ease at your up
1per arm. Note that while we try to respect this, fitting the sleeve to the armhole takes precedence over respecting the exact amount of ease."},"collarEase":{"t":"Collar ease","d":"The amount of ease around your neck"},"chestEase":{"t":"Chest ease","d":"The amount of ease at your chest."},"cuffEase":{"t":"Cuff ease","d":"The amount of ease at your wrist."},"draftForHighBust":{"t":"Draft for high bust","d":"Draft the pattern using the high bust measurement if it is available, instead of using the chest measurement. This can result in a more fitted garment for people with breasts. (Please note that no additional adjustments or shaping is performed. Further manual adjustments may be needed for those with a larger difference between high bust and chest measurements.)"},"draftForHighBustYes":{"t":"Draft using the high bust measurement","d":"Drafts a pattern using the high bust measurement instead of the chest measurement. Suggested for most people with breasts."},"draftForHighBustNo":{"t":"Draft using the chest measurement","d":"Drafts a pattern using the chest measurement. Suggested for most people without breasts."},"frontArmholeDeeper":{"t":"Front armhole extra cutout","d":"How much do you want the front armhole to be cut out deeper than the back."},"legacyArmholeDepth":{"t":"Legacy armhole depth","d":"Enable this option to use the legacy way to calculate the armhole depth (using biceps circumference) rather than the v3 way (using the waist to armpit measurement)"},"legacyArmholeDepthNo":{"t":"Calculate armhole depth the v3 way","d":"Uses the waist to armpit measurement to locate the bottom of the armhole"},"legacyArmholeDepthYes":{"t":"Calculate armhole depth the legacy (v2) way","d":"Uses the biceps measurement to locate the bottom of the armhole"},"lengthBonus":{"t":"Length bonus","d":"The amount to lengthen the garment. A negative value will shorten it."},"s3Collar":{"t":"Shoulder seam shift: collar side","d":"Increase this option to shift the shoulder seam forward on the collar side. Decreasing it shifts it backwards."},"s3Armhole":{"t":"Shoulder seam shift: armhole side","d":"Increase this option to shift the shoulder seam forward on the armhole side. Decreasing it shifts it backwards."},"shoulderEase":{"t":"Shoulder ease","d":"The amount of ease at your shoulder. This increases the shoulder to shoulder distance to accommodate additional layers or thickness."},"shoulderSlopeReduction":{"t":"Shoulder slope reduction","d":"The amount by which the shoulder slope is reduced to allow for shoulder padding."}}}')},r=JSON.parse('{"id":"brian","name":"Brian body block","code":"Joost De Cock","description":"A FreeSewing pattern for a basic body block for menswear","design":"Joost De Cock","difficulty":3,"tags":["blocks","tops"],"techniques":["block","flat-sleeve"],"block":true,"version":"4.6.0","pkg":"@freesewing/brian","collection":true}'),l=JSON.parse('{"id":"library","code":"Joost De Cock","design":"Joost De Cock","description":"A FreeSewing design that bundles reuseable parts","name":"Design Part Library","difficulty":2,"tags":[],"techniques":[],"version":"4.6.0","pkg":"@freesewing/library","collection":true}'),c=JSON.parse('{"t":"Library","d":"A library of FreeSewing design parts","p":{},"s":{},"o":{}}'),p=JSON.parse('{"t":"Library/Rectangle","d":"A rectangle from the library of FreeSewing design parts","p":{"rectangle":"Rectangle"},"s":{},"o":{"noSa":{"t":"No Seam Allowance","d":"Explicitly disabled seam allowance on this part, regardless of the pattern settings"},"rectangleHeight":{"t":"Rectangle height","d":"Height of the rectangle"},"rectangleWidth":{"t":"Rectangle width","d":"Width of the rectangle"}}}'),d=JSON.parse('{"t":"Library/Sleeve","d":"A sleeve from the library of FreeSewing design parts","p":{"sleeve":"Sleeve"},"s":{"backArmholeLength":"The length of the armhole at the back of the garment","backArmholeToArmholePitch":"The length along the armhole from the bottom of the armhole to the back armhole pitch point","frontArmholeLength":"The length of the armhole at the front of the garment","frontArmholeToArmholePitch":"The length along the armhole from the bottom of the armhole to the front armhole pitch point","sleevecapLength":"The length of the sleevecap","sleeveLength":"The length of the sleeve","sleevecapTarget":"The theoretical length of the sleevecap we strive for","sleevecapEase":"The mount of sleevecap ease","__sleevecapFactor":"An internal variable that is used to tweak the sleevecap draft"},"o":{"cuffEase":{"t":"Cuff ease","d":"The amount of ease at your wrist."},"sleevecapEase":{"t":"Sleevecap ease","d":"The amount by which the sleevecap seam is longer than the armhole seam."},"sleevecapTopFactorX":{"t":"Sleevecap top X","d":"Controls the horizontal location of the sleevecap top."},"sleevecapTopFactorY":{"t":"Sleevecap top Y","d":"Controls the height of the sleevecap. A higher value results in a higher and more narrow sleevecap."},"sleevecapBackFactorX":{"t":"Sleevecap back X","d":"Controls the placement of the sleevecap back pitchpoint on the X-axis (horizontal)"},"sleevecapBackFactorY":{"t":"Sleevecap back Y","d":"Controls the placement of the sleevecap back pitchpoint on the Y-axis (vertical)"},"sleevecapFrontFactorX":{"t":"Sleevecap front X","d":"Controls the placement of the sleevecap front pitchpoint on the X-axis (horizontal)"},"sleevecapFrontFactorY":{"t":"Sleevecap front Y","d":"Controls the placement of the sleevecap front pitchpoint on the Y-axis (vertical)"},"sleevecapQ1Offset":{"t":"Sleevecap Q1 offset","d":"Controls the curvature of the sleevecap in the first quadrant (front armhole)"},"sleevecapQ2Offset":{"t":"Sleevecap Q2 offset","d":"Controls the curvature of the sleevecap in the second quadrant (front shoulder)"},"sleevecapQ3Offset":{"t":"Sleevecap Q3 offset","d":"Controls the curvature of the sleevecap in the third quadrant (back shoulder)"},"sleevecapQ4Offset":{"t":"Sleevecap Q4 offset","d":"Controls the curvature of the sleevecap in the fourth quadrant (back armhole)"},"sleevecapQ1Spread1":{"t":"Sleevecap Q1 downward spread","d":"Controls the spread of the sleevecap first quadrant curvature towards the armhole"},"sleevecapQ1Spread2":{"t":"Sleevecap Q1 upward spread","d":"Controls the spread of the sleevecap first quadrant curvature towards the shoulder"},"sleevecapQ2Spread1":{"t":"Sleevecap Q2 downward spread","d":"Controls the spread of the sleevecap second quadrant curvature towards the armhole"},"sleevecapQ2Spread2":{"t":"Sleevecap Q2 upward spread","d":"Controls the spread of the sleevecap second quadrant curvature towards the shoulder"},"sleevecapQ3Spread1":{"t":"Sleevecap Q3 upward spread","d":"Controls the spread of the sleevecap third quadrant curvature towards the shoulder"},"sleevecapQ3Spread2":{"t":"Sleevecap Q3 downward spread","d":"Controls the spread of the sleevecap third quadrant curvature towards the armhole"},"sleevecapQ4Spread1":{"t":"Sleevecap Q4 upward spread","d":"Controls the spread of the sleevecap fourth quadrant curvature towards the shoulder"},"sleevecapQ4Spread2":{"t":"Sleevecap Q4 downward spread","d":"Controls the spread of the sleevecap fourth quadrant curvature towards the armhole"},"sleeveLengthBonus":{"t":"Sleeve length bonus","d":"The amount to lengthen the sleeve. A negative value will shorten it."},"sleeveWidthGuarantee":{"t":"Sleeve width guarantee","d":"Controls how much of the sleeve width will be guaranteed. This determines how much we can alter the sleeve width to fit the sleeve in the armhole."}}}'),h=JSON.parse('{"t":"Library/TwoPartSleeve","d":"A two-part sleeve from the library of FreeSewing design parts","p":{"topsleeve":"Topsleeve","undersleeve":"Undersleeve","twoPartSleeve":"Two-Part Sleeve (base)"},"s":{},"o":{"cuffEase":{"t":"Cuff ease","d":"The amount of ease at your wrist."},"sleevecapHeight":{"t":"Sleevecap height","d":"Controls the height of the sleevecap."},"sleevecapEase":{"t":"Sleevecap ease","d":"The amount by which the sleevecap seam is longer than the armhole seam."},"sleeveBend":{"t":"Sleeve bend","d":"Controls the bend of the sleeve at the elbow."},"sleeveLengthBonus":{"t":"Sleeve length bonus","d":"The amount to lengthen the sleeve. A negative value will shorten it."}}}'),m={en:{...c,p:{...p.p,...d.p,...h.p},s:{...p.s,...d.s,...h.s},o:{...p.o,...d.o,...h.o}}},f={en:d},u={en:h};function g(t,e,o,a){let i=!1;for(const n of t.store.reads)["title","cutlist"].includes(n)||o.pget(n)||(i=!0);if(i){const i=`Part **${t.name}** relies on these values to be set in the store: ${t.store.reads.map((t=>"`"+t+"`")).join(", ")}`;return o.flag.warn({title:`Missing store data for ${t.name}`,desc:i,suggest:{text:a[e]?"Clear mocked store values":"Mock store values",icon:"fixme",update:{settings:[["options",e],!a[e]]}}}),o.log.warn(i),!!a[e]}return!0}const b={library:!0,name:"library.rectangle",measurements:[],options:{mockRectangle:!1,noSa:!1,seamClasses:"fabric",rectangleWidth:{pct:100,min:50,max:150,menu:"rectangle"},rectangleHeight:{pct:100,min:50,max:150,menu:"rectangle"}}
1,store:{reads:["width","height","cutlist","title"]},draft:({store:t,sa:e,macro:o,snippets:a,Snippet:i,units:n,options:s,Point:r,points:l,Path:c,paths:p,log:d,measurements:h,part:m})=>{if(!g(b,"mockRectangle",t,s))return m;l.topLeft=new r(0,0),l.topRight=new r(t.pget("width",100)*s.rectangleWidth,0),l.bottomRight=new r(l.topRight.x,t.pget("height",100)*s.rectangleHeight),l.bottomLeft=new r(0,l.bottomRight.y),p.seam=(new c).move(l.topLeft).line(l.bottomLeft).line(l.bottomRight).line(l.topRight).line(l.topLeft).close().addClass(s.seamClasses),e&&!s.noSa&&(p.sa=p.seam.offset(e).attr("class","fabric sa")),l.gridAnchor=new r(0,0),o("grainline",{from:l.bottomLeft.shift(0,l.bottomRight.x/4),to:l.topLeft.shift(0,l.bottomRight.x/4)});let f=t.pget("cutlist",{});Array.isArray(f)||(f=[f]);for(const g of f)t.cutlist.addCut({cut:1,from:"fabric",...g});l.logo=new r(l.topRight.x/2,l.bottomRight.y/2),a.logo=new i("logo",l.logo).scale(75/l.bottomRight.x);const u=t.pget("title",{});return l.title=new r(l.topRight.x/4,l.bottomRight.y/1.5),o("title",{at:l.title,nr:1,title:"rectangle",scale:.5,...u}),o("hd",{id:"width",from:l.bottomLeft,to:l.bottomRight,y:l.bottomLeft.y+e+15}),o("vd",{id:"height",from:l.bottomRight,to:l.topRight,x:l.bottomRight.x+e+15}),m}};function w(t){return t.pget("sleevecapLength")-t.pget("sleevecapTarget")}function k(t){const e=w(t),o=e/t.pget("sleevecapLength");let a=t.pget("__sleevecapFactor");o>.1&&(a*=.8),a*=o>.02?.9:o<-.1?1.3:o<-.02?1.15:e>0?.99:1.008,t.pset("__sleevecapFactor",a)}function C(t,e){let{store:o,measurements:a,options:i,Point:n,points:s,Path:r,paths:l}=t.shorthand();s.centerBiceps=new n(0,0),i.legacyArmholeDepth?s.centerCap=s.centerBiceps.shift(90,i.sleevecapTopFactorY*(a.biceps*(1+(i.bicepsEase||.15))*i.armholeDepthFactor*o.pget("__sleevecapFactor"))):s.centerCap=s.centerBiceps.shift(90,i.sleevecapTopFactorY*(a.hpsToWaistBack-a.waistToArmpit)*(1+(i.armholeDepth||0))*.75*o.pget("__sleevecapFactor"));let c=a.biceps*(1+(i.bicepsEase||.15))/2;s.bicepsLeft=s.centerBiceps.shift(180,c*i.sleeveWidthGuarantee+c*(1-i.sleeveWidthGuarantee)*o.pget("__sleevecapFactor")),s.bicepsRight=s.bicepsLeft.flipX(s.centerBiceps),s.capLeft=new n(s.bicepsLeft.x,s.centerCap.y),s.capRight=s.capLeft.flipX(),s.centerCap=s.capLeft.shiftFractionTowards(s.capRight,i.sleevecapTopFactorX);let p=s.bicepsRight.x,d=s.centerCap.y;s.backPitch=new n(-1*p*i.sleevecapBackFactorX,d*i.sleevecapBackFactorY),s.frontPitch=new n(p*i.sleevecapFrontFactorX,d*i.sleevecapFrontFactorY),s.capQ1Base=s.frontPitch.shiftFractionTowards(s.bicepsRight,.5),s.capQ2Base=s.frontPitch.shiftFractionTowards(s.centerCap,.5),s.capQ3Base=s.backPitch.shiftFractionTowards(s.centerCap,.5),s.capQ4Base=s.backPitch.shiftFractionTowards(s.bicepsLeft,.5);let h=a.biceps*(1+(i.bicepsEase||.15));if(s.capQ1=s.capQ1Base.shift(s.bicepsRight.angle(s.frontPitch)+90,h*i.sleevecapQ1Offset),s.capQ2=s.capQ2Base.shift(s.centerCap.angle(s.frontPitch)+90,h*i.sleevecapQ2Offset),s.capQ3=s.capQ3Base.shift(s.centerCap.angle(s.backPitch)-90,h*i.sleevecapQ3Offset),s.capQ4=s.capQ4Base.shift(s.bicepsLeft.angle(s.backPitch)-90,h*i.sleevecapQ4Offset),s.capQ1Cp1=s.capQ1.shift(s.frontPitch.angle(s.bicepsRight),h*i.sleevecapQ1Spread1),s.capQ1Cp2=s.capQ1.shift(s.frontPitch.angle(s.bicepsRight),h*i.sleevecapQ1Spread2*-1),s.capQ2Cp1=s.capQ2.shift(s.centerCap.angle(s.frontPitch),h*i.sleevecapQ2Spread1),s.capQ2Cp2=s.capQ2.shift(s.centerCap.angle(s.frontPitch),h*i.sleevecapQ2Spread2*-1),s.capQ3Cp1=s.capQ3.shift(s.backPitch.angle(s.centerCap),h*i.sleevecapQ3Spread1),s.capQ3Cp2=s.capQ3.shift(s.backPitch.angle(s.centerCap),h*i.sleevecapQ3Spread2*-1),s.capQ4Cp1=s.capQ4.shift(s.bicepsLeft.angle(s.backPitch),h*i.sleevecapQ4Spread1),s.capQ4Cp2=s.capQ4.shift(s.bicepsLeft.angle(s.backPitch),h*i.sleevecapQ4Spread2*-1),l.sleevecap=(new r).move(s.bicepsRight).curve(s.bicepsRight,s.capQ1Cp1,s.capQ1).curve(s.capQ1Cp2,s.capQ2Cp1,s.capQ2).curve(s.capQ2Cp2,s.capQ3Cp1,s.capQ3).curve(s.capQ3Cp2,s.capQ4Cp1,s.capQ4).curve(s.capQ4Cp2,s.bicepsLeft,s.bicepsLeft),o.pset("sleevecapLength",l.sleevecap.length()),o.pset("sleevecapHeight",l.sleevecap.edge("bottom").x-l.sleevecap.edge("top").x),0===e){let t=o.pget("frontArmholeLength",250)+o.pget("backArmholeLength",250),e=t*i.sleevecapEase;o.pset("sleevecapEase",e),o.pset("sleevecapTarget",t+e)}}const v="advanced.sleevecap",y={library:!0,name:"library.sleeve",measurements:["biceps","hpsToWaistBack","shoulderToWrist","waistToArmpit","wrist"],options:{optionPrefix:"",mockSleeve:!1,sleevecapEase:{pct:0,min:0,max:10,menu:v},sleevecapTopFactorX:{pct:50,min:25,max:75,menu:v},sleevecapTopFactorY:{pct:45,min:35,max:125,menu:v},sleevecapBackFactorX:{pct:60,min:35,max:65,menu:v},sleevecapBackFactorY:{pct:33,min:30,max:65,menu:v},sleevecapFrontFactorX:{pct:55,min:35,max:65,menu:v},sleevecapFrontFactorY:{pct:33,min:30,max:65,menu:v},sleevecapQ1Offset:{pct:1.7,min:0,max:7,menu:v},sleevecapQ2Offset:{pct:3.5,min:0,max:7,menu:v},sleevecapQ3Offset:{pct:2.5,min:0,max:7,menu:v},sleevecapQ4Offset:{pct:1,min:0,max:7,menu:v},sleevecapQ1Spread1:{pct:10,min:4,max:20,menu:v},sleevecapQ1Spread2:{pct:15,min:4,max:20,menu:v},sleevecapQ2Spread1:{pct:15,min:4,max:20,menu:v},sleevecapQ2Spread2:{pct:10,min:4,max:20,menu:v},sleevecapQ3Spread1:{pct:10,min:4,max:20,menu:v},sleevecapQ3Spread2:{pct:8,min:4,max:20,menu:v},sleevecapQ4Spread1:{pct:7,min:4,max:20,menu:v},sleevecapQ4Spread2:{pct:6.3,min:4,max:20,menu:v},sleeveLengthBonus:{pct:0,min:-40,max:10,menu:"style"},sleeveWidthGuarantee:{pct:90,min:25,max:100,menu:"advanced"}},draft:({store:t,sa:e,macro:o,snippets:a,Snippet:i,units:n,options:s,Point:r,points:l,Path:c,paths:p,log:d,measurements:h,part:m})=>
1{if(!g(y,"mockSleeve",t,s))return m;t.pset("__sleevecapFactor",1);let f=0,u=0;do{C(m,f),u=w(t),k(t),f++}while((s.mockSleeve||!0===s.libraryFitSleeve)&&f<50&&Math.abs(w(t))>2);p.sleevecap.attr("class","fabric"),t.pset("sleeveLength",h.shoulderToWrist*(1+s.sleeveLengthBonus)),l.sleeveTip=p.sleevecap.edge("top"),l.sleeveTop=new r(0,l.sleeveTip.y),l.centerWrist=l.sleeveTop.shift(-90,t.pget("sleeveLength")),l.wristRight=l.centerWrist.shift(0,h.wrist*(1+s.cuffEase)/2),l.wristLeft=l.wristRight.rotate(180,l.centerWrist),l.gridAnchor=new r(0,0),p.sleevecap.hide(),p.seam=(new c).move(l.bicepsLeft).move(l.wristLeft).move(l.wristRight).line(l.bicepsRight).join(p.sleevecap).close().attr("class","fabric"),e&&(p.sa=p.seam.offset(e).attr("class","fabric sa")),l.gridAnchor=new r(0,0),o("grainline",{from:l.centerWrist,to:l.centerBiceps});let b=t.pget("cutlist",{});Array.isArray(b)||(b=[b]);for(const g of b)t.cutlist.addCut({cut:2,from:"fabric",...g});l.logo=l.centerBiceps.shiftFractionTowards(l.centerWrist,.3),a.logo=new i("logo",l.logo);const v=t.pget("title",{});return o("title",{at:l.centerBiceps,nr:1,title:"sleeve",...v}),(s.mockSleeve||t.pget("frontArmholeToArmholePitch"))&&(l.frontNotch=p.sleevecap.shiftAlong(t.pget("frontArmholeToArmholePitch",150)),a.frontNotch=new i("notch",l.frontNotch)),(s.mockSleeve||t.pget("backArmholeToArmholePitch"))&&(l.backNotch=p.sleevecap.reverse().shiftAlong(t.pget("backArmholeToArmholePitch",150)),a.backNotch=new i("bnotch",l.backNotch)),o("vd",{id:"hCuffToArmhole",from:l.wristLeft,to:l.bicepsLeft,x:l.bicepsLeft.x-e-15}),o("vd",{id:"hFull",from:l.wristLeft,to:l.sleeveTip,x:l.bicepsLeft.x-e-30}),o("hd",{id:"wFull",from:l.bicepsLeft,to:l.bicepsRight,y:l.sleeveTip.y-e-30}),o("hd",{id:"wCuff",from:l.wristLeft,to:l.wristRight,y:l.wristLeft.y+e+30}),o("pd",{id:"lSleevevap",path:p.sleevecap.reverse(),d:-1*e-15}),m},store:{reads:["backArmholeLength","backArmholeToArmholePitch","frontArmholeLength","frontArmholeToArmholePitch","cutlist","title"],writes:["sleevecapHeight","sleevecapLength","sleeveLength","sleevecapTarget","sleevecapEase"],uses:["__sleevecapFactor"]}};const T={name:"library.twoPartSleeve",hide:{self:!0},measurements:["shoulderToElbow","shoulderToWrist","wrist"],options:{mockTwoPartSleeve:!1,cuffEase:{pct:40,min:2,max:100,...(0,n.Wx)("wrist"),menu:"fit"},sleeveLengthBonus:{pct:0,min:-20,max:15,menu:"fit"},sleeveBend:{deg:10,min:0,max:20,menu:"fit"},sleevecapHeight:{pct:45,min:40,max:60,menu:"advanced"},sleevecapEase:{pct:1,min:0,max:10,menu:"advanced"}},draft:function({Path:t,paths:e,points:o,store:a,options:i,part:n}){function s(t,e){let{Point:o,Path:a,points:i,store:n,options:s,measurements:r,utils:l}=t.shorthand();i.top=new o(0,0);const c=r.biceps/4*(1+(s.bicepsEase||.15));i.boxTopRight=i.top.shift(0,c*e),i.boxTopLeft=i.boxTopRight.flipX(),i.boxBottom=i.top.shift(-90,r.shoulderToWrist*(1+s.sleeveLengthBonus)),i.boxBottomRight=i.boxBottom.shift(0,i.boxTopRight.x),i.boxBottomLeft=i.boxBottomRight.flipX(),i.armCenter=i.top.shift(-90,r.biceps*(1+(s.bicepsEase||.15))*s.sleevecapHeight*e),i.armRight=i.armCenter.shift(0,i.boxTopRight.x),i.armLeft=i.armRight.flipX(),i.elbowCenter=i.top.shift(-90,r.shoulderToElbow),i.elbowRight=i.elbowCenter.shift(0,i.boxTopRight.x),i.elbowLeft=i.elbowRight.flipX();let p=i.boxTopRight.x;i.backPitchPoint=new o(p,i.armCenter.y/3),i.usTip=i.backPitchPoint.shift(180,p/4),i.tsLeftEdge=i.armLeft.shift(180,p/4),i.usLeftEdge=i.armLeft.shift(0,p/4),i.tsRightEdge=i.armRight.shift(0,p/9),i.usRightEdge=i.armRight.shift(180,p/9),i.frontPitchPoint=new o(i.boxTopLeft.x,.6*i.armCenter.y),i.tsElbowLeft=i.elbowLeft.shift(180,p/9),i.usElbowLeft=i.elbowLeft.shift(0,p/2.4),i.tsWristRight=l.beamsIntersect(i.elbowRight,i.boxBottomRight.rotate(-1*s.sleeveBend,i.elbowRight),i.boxBottomLeft,i.boxBottomRight),i.usWristRight=i.tsWristRight.clone();let d=r.wrist*(1+s.cuffEase),h=d/2+p/5,m=d/2-p/5;i.tsWristLeftHelperBottom=i.tsWristRight.shift(180,h/2),i.usWristLeftHelperBottom=i.usWristRight.shift(180,m/2),i.tsWristLeftHelperTop=i.tsElbowLeft.shiftFractionTowards(i.elbowRight,.5),i.usWristLeftHelperTop=i.usElbowLeft.shiftFractionTowards(i.elbowRight,.5);let f=i.tsWristLeftHelperBottom.angle(i.tsWristLeftHelperTop),u=i.usWristLeftHelperBottom.angle(i.usWristLeftHelperTop);i.tsWristLeft=i.tsWristRight.shift(f-90,-1*h),i.usWristLeft=i.usWristRight.shift(u-90,-1*m),i.tsRightEdgeCpTop=i.tsRightEdge.shift(90,i.backPitchPoint.dy(i.tsRightEdge)/2),i.tsRightEdgeCpBottom=i.tsRightEdgeCpTop.flipY(i.tsRightEdge),i.elbowRightCpTop=i.tsWristRight.shiftFractionTowards(i.elbowRight,1.15),i.topCpRight=i.top.shift(0,p/1.6),i.topCpLeft=i.topCpRight.flipX(),i.tsLeftEdgeCpRight=i.tsLeftEdge.shift(0,i.tsLeftEdge.dist(i.armLeft)/2),i.frontPitchPointCpBottom=i.frontPitchPoint.shiftFractionTowards(i.tsLeftEdgeCpRight,.666),i.frontPitchPointCpTop=i.frontPitchPointCpBottom.rotate(180,i.frontPitchPoint),i.tsElbowLeftCpTop=i.tsWristLeft.shiftFractionTowards(i.tsElbowLeft,1.2),i.usRightEdgeCpBottom=i.usRightEdge.shift(i.usTip.angle(i.elbowRight),i.usTip.dy(i.usRightEdge)/2),i.usRightEdgeCpTop=i.usRightEdgeCpBottom.rotate(180,i.usRightEdge),i._helper1=(new a).move(i.backPitchPoint)._curve(i.topCpRight,i.top).shiftAlong(5),i._helper2=(new a).move(i.backPitchPoint)._curve(i.tsRightEdgeCpTop,i.tsRightEdge).shiftAlong(5),i.usLeftEdgeRight=i.usLeftEdge.shift(0,i.usLeftEdge.dist(i.armCenter)/3),i.usLeftEdgeCpRight=i.usLeftEdge.shift(0,i.usLeftEdge.dist(i.armCenter)/1.2);let g=i._helper1.angle(i.backPitchPoint)-i.backPitchPoint.angle(i._helper2);i.usTipCpBottom=i.usRightEdgeCpTop.rotate(-1*g,i.usTip),i.usElbowLeftCpTop=i.usWristLeft.shiftFractionTowards(i.usElbowLeft,1.2);let b=(new a).move(i.backPitchPoint).curve(i.backPitchPoint,i.topCpRight,i.top).curve(i.topCpLeft,i.frontPitchPointCpTop,i.frontPitchPoint).curve(i.frontPitchPointCpBottom,i.tsLeftEdgeCpRight,i.tsLeftEdge).length(),w=(new a).move(i.usTip).curve(i.usTipCpBottom,i.usLeftEdgeCpRight,i.usLeftEdgeRight).line(i.usLeftEdge).length();n.set("sleevecapLength",b+w)}if(!g(T,"mockTwoPartSleeve",a,i))return n;let r=a.pget("frontArmholeLength",200)+a.pget("backArmholeLength",200),l=r*i.sleevecapEase;a.set("sleevecapEase",l),a.set("sleevecapTarget",r+l);let c=0,p=0,d=1,h=a.pget("sleevecapTarget");do{s(n,d),p++,c=a.pget("sleevecapLength")-h,d*=c>0?.99:1.02}while(Math.abs(c)>2&&p<25);return e.ts=(new t).move(o.tsWristRight).line(o.elbowRight).curve(o.elbowRightCpTop,o.tsRightEdgeCpBottom,o.tsRightEdge).curve_(o.tsRightEdgeCpTop,o.backPitchPoint).curve(o.backPitchPoint,o.topCpRight,o.top).curve(o.topCpLeft,o.frontPitchPointCpTop,o.frontPitchPoint).curve(o.frontPitchPointCpBottom,o.tsLeftEdgeCpRight,o.tsLeftEdge).curve(o.tsLeftEdge,o.tsElbowLeftCpTop,o.tsElbowLeft).line(o.tsWristLeft).line(o.tsWristRight).close().hide(),e.us=(new t).move(o.usWristRight).line(o.elbowRight).curve(o.elbowRightCpTop,o.usRightEdgeCpBottom,o.usRightEdge).curve_(o.usRightEdgeCpTop,o.usTip).curve(o.usTipCpBottom,o.usLeftEdgeCpRight,o.usLeftEdgeRight).line(o.usLeftEdge).curve(o.usLeftEdge,o.usElbowLeftCpTop,o.usElbowLeft).line(o.usWristLeft).line(o.usWristRight).close().hide(),n},store:{reads:["frontArmholeLength","backArmholeLength","cutlist","t
1itle"],writes:["sleevecapLength","sleevecapTarget"]}};function x(t,e){let{macro:o,points:a,sa:i}=t.shorthand();o("ld",{id:"wAtCuff",from:a[e+"WristLeft"],to:a[e+"WristRight"],d:15}),o("ld",{id:"wAtElbow",from:a[e+"ElbowLeft"],to:a.elbowRight}),o("ld",{id:"wAtArmhole",from:a[e+"LeftEdge"],to:a[e+"RightEdge"]}),o("hd",{id:"wArmholeInnerToElbowInner",from:a[e+"LeftEdge"],to:a[e+"ElbowLeft"],y:a[e+"WristRight"].y+3*i+15}),o("hd",{id:"wArmholeInnerToCuffInner",from:a[e+"LeftEdge"],to:a[e+"WristLeft"],y:a[e+"WristRight"].y+3*i+30}),o("hd",{id:"wCuffHorizontal",from:a[e+"LeftEdge"],to:a[e+"WristRight"],y:a[e+"WristRight"].y+3*i+45}),o("hd",{id:"wCuffInnerToElbow",from:a[e+"LeftEdge"],to:a.elbowRight,y:a[e+"WristRight"].y+3*i+60}),o("vd",{id:"hElbowToArmholeInner",from:a[e+"ElbowLeft"],to:a[e+"LeftEdge"],x:a[e+"LeftEdge"].x-i-15}),o("vd",{id:"hCuffInnerToArmholeInner",from:a[e+"WristLeft"],to:a[e+"LeftEdge"],x:a[e+"LeftEdge"].x-i-30}),o("vd",{id:"hCuffOuterToArmholeInner",from:a[e+"WristRight"],to:a[e+"LeftEdge"],x:a[e+"LeftEdge"].x-i-45})}const B={name:"library.topsleeve",from:T,draft:function({macro:t,Path:e,Point:o,points:a,paths:i,snippets:n,Snippet:s,options:r,sa:l,store:c,part:p}){if(!g(T,"mockTwoPartSleeve",c,r))return p;delete i.us,i.seam=i.ts.clone().unhide().setClass("fabric"),delete i.ts,l&&(i.sa=i.seam.clone(),i.sa.ops.splice(-2),i.sa=i.sa.offset(l).join((new e).move(a.tsWristLeft).line(a.tsWristRight).offset(3*l)).close().addClass("fabric sa"));let d=c.pget("cutlist",{});Array.isArray(d)||(d=[d]);for(const m of d)c.cutlist.addCut({cut:2,from:"fabric",...m});n.logo=new s("logo",a.elbowCenter.shift(90,50));const h=c.pget("title",{});return t("title",{at:a.armCenter,nr:3,title:"topsleeve",...h}),t("grainline",{from:new o(a.top.x,a.tsWristLeft.y),to:a.top}),x(p,"ts"),t("vd",{id:"hSleeveCap",from:a.tsLeftEdge,to:a.top,x:a.tsLeftEdge.x-l-15}),t("hd",{id:"wArmholeInnerToSleevecapTop",from:a.tsLeftEdge,to:a.top,y:a.top.x-l-15}),t("hd",{id:"wArmholeInnerToSleevecapEnd",from:a.tsLeftEdge,to:a.backPitchPoint,y:a.top.x-l-30}),t("hd",{id:"wSleeveHead",from:a.tsLeftEdge,to:a.tsRightEdge,y:a.top.x-l-45}),t("vd",{id:"hArmholeInnerToSleeveCapEnd",from:a.tsRightEdge,to:a.backPitchPoint,x:a.tsRightEdge.x+l+15}),p},options:T.options};const S={name:"library.undersleeve",from:T,draft:function({macro:t,Path:e,Point:o,points:a,paths:i,snippets:n,Snippet:s,options:r,sa:l,store:c,part:p}){if(!g(T,"mockTwoPartSleeve",c,r))return p;delete i.ts,i.seam=i.us.clone().unhide().setClass("fabric"),delete i.us,a.anchor=a.usTip.clone(),l&&(i.sa=i.seam.clone(),i.sa.ops.splice(-2),i.sa=i.sa.offset(l).join((new e).move(a.usWristLeft).line(a.usWristRight).offset(3*l)).close().attr("class","fabric sa"));let d=c.pget("cutlist",{});Array.isArray(d)||(d=[d]);for(const m of d)c.cutlist.addCut({cut:2,from:"fabric",...m});n.logo=new s("logo",a.elbowCenter);const h=c.pget("title",{});return t("title",{at:a.armCenter,nr:4,title:"undersleeve",...h}),t("grainline",{from:new o(a.usLeftEdgeCpRight.x,a.usWristLeft.y),to:a.usLeftEdgeCpRight}),x(p,"us"),t("hd",{id:"wArmholeInnerSleeveCapTip",from:a.usLeftEdge,to:a.usTip,y:a.usTip.y-l-15}),t("vd",{id:"hArmholeInnerSleeveCapTip",from:a.tsRightEdge,to:a.usTip,x:a.tsRightEdge.x+l+15}),p},options:T.options},L=new n.pT({data:l,parts:[b,y,B,S,T]});function P(t,e,o,a,i){0!==a.s3Armhole&&(t.shoulderNotch=new e(i,o.shoulder)),0!==a.s3Collar&&(t.collarNotch=new e(i,o.hps))}function R(t,e){return(new e).move(t.armhole).curve(t.armholeCp2,t.armholeHollowCp1,t.armholeHollow).curve(t.armholeHollowCp2,t.armholePitchCp1,t.armholePitch).curve(t.armholePitchCp2,t.shoulderCp1,t.shoulder).length()}function F(t,e){return(new e).move(t.armhole).curve(t.armholeCp2,t.armholeHollowCp1,t.armholeHollow).curve(t.armholeHollowCp2,t.armholePitchCp1,t.armholePitch).length()}function E(t,e){const{macro:o,points:a,Path:i,sa:n,paths:s}=t.shorthand();o("pd",{id:"lArmhole",path:(new i).move(a.armhole).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.armholePitchCp1,a.armholePitch).join(s[`${e}Armhole`]),d:n+15}),o("pd",{id:"lShoulderToArmholePitch",path:s[`${e}Armhole`],d:-15}),o("vd",{id:"hHemToArmhole",from:a.hem,to:a.armhole,x:a.hips.x+n+15}),o("vd",{id:"hHemToArmholePitch",from:a.hem,to:a.armholePitch,x:a.hips.x+n+30}),o("vd",{id:"hHemToShoulder",from:a.hem,to:a.s3ArmholeSplit,x:a.hips.x+n+45}),o("vd",{id:"hTotal",from:a.hem,to:a.s3CollarSplit,x:a.hips.x+n+60}),o("ld",{id:"lShoulder",from:a.s3CollarSplit,to:a.s3ArmholeSplit,d:n+15})}const W=JSON.parse('{"id":"plugin-bust","r":"4.6.0"}'),H={name:W.id,version:W.r,hooks:{preSetDraft:function({settings:t,activeSet:e}){const o=t[Number(e)];o.measurements&&o.options?.draftForHighBust&&o.measurements?.highBust&&void 0===o.measurements.bust&&(o.measurements.bust=o.measurements.chest,o.measurements.chest=o.measurements.highBust)}}},A=H,O=H,D={name:"brian.base",hide:{self:!0},measurements:["biceps","chest","hpsToBust","hpsToWaistBack","neck","shoulderToShoulder","shoulderSlope","waistToArmpit","waistToHips"],optionalMeasurements:["highBust"],options:{libraryFitSleeve:!0,brianFitCollar:!0,collarFactor:4.8,bicepsEase:{pct:15,min:0,max:50,...(0,n.Wx)("biceps"),menu:"fit"},chestEase:{pct:15,min:-4,max:35,...(0,n.Wx)("chest"),menu:"fit"},collarEase:{pct:5,min:0,max:10,...(0,n.Wx)("neck"),menu:"fit"},cuffEase:{pct:20,min:0,max:200,...(0,n.Wx)("wrist"),menu:"fit"},draftForHighBust:{bool:!1,menu:t=>!!t?.measurements?.highBust&&"fit"},shoulderEase:{pct:0,min:-2,max:6,...(0,n.Wx)("shoulderToShoulder"),menu:"fit"},lengthBonus:{pct:0,min:-4,max:60,menu:"style"},s3Collar:{pct:0,min:-100,max:100,menu:"style"},s3Armhole:{pct:0,min:-100,max:100,menu:"style"},acrossBackFactor:{pct:98,min:93,max:100,menu:"advanced"},armholeDepth:{pct:2,min:-10,max:50,menu:(t,e)=>!e?.legacyArmholeDepth&&"advanced"},armholeDepthFactor:{pct:55,min:50,max:70,menu:(t,e)=>!!e?.legacyArmholeDepth&&"advanced"},backNeckCutout:{pct:5,min:2,max:8,menu:"advanced"},frontArmholeDeeper:{pct:.2,min:0,max:.5,menu:"advanced"},shoulderSlopeReduction:{pct:0,min:0,max:80,menu:"advanced"},legacyArmholeDepth:{bool:!1,menu:"advanced"}},plugins:[A],draft:({measurements:t,options:e,store:o,points:a,snippets:i,Point:n,Snippet:s,Path:r,paths:l,utils:c,macro:p,part:d})=>{o.set("shoulderEase",t.shoulderToShoulder*e.shoulderEase/2),a.cbHps=new n(0,0),a.cbNeck=new n(0,e.backNeckCutout*t.neck),a.cbChest=new n(0,t.hpsToBust),a.cbWaist=new n(0,t.hpsToWaistBack),a.cbHips=new n(0,a.cbWaist.y+t.waistToHips),a.neck=new n(t.neck*(1+e.collarEase)/e.collarFactor,0),a.hps=a.neck.clone(),a.shoulder=c.beamsIntersect(a.hps,a.hps.shift(-1*t.shoulderSlope,100),new n(t.shoulderToShoulder/2+o.get("shoulderEase"),-100),new n(t.shoulderToShoulder/2+o.get("shoulderEase"),100)),a.cbShoulder=new n(0,a.shoulder.y),e.legacyArmholeDepth?a.cbArmhole=new n(0,a.shoulder.y+t.biceps*(1+e.bicepsEase)*e.armholeDepthFactor):a.cbArmhole=new n(0,a.cbWaist.y-t.waistToArmpit*(1-e.armholeDepth-e.bicepsEase/2)),a.shoulder.y-=(a.shoulder.y-a.cbHps.y)*e.shoulderSlopeReduction,a.shoulder.y<a.cbHps.y&&(a.shoulder=new n(a.shoulder.x,0)),a.cbHem=new n(0,a.cbHips.y*(1+e.lengthBonus)),a.armhole=new n(t.chest*(1+e.chestEase)/4,a.cbArmhole.y),a.shoulder.x>=a.armhole.x&&o.flag.warn({msg:"brian:largeShoulderWidth"}),a.waist=new n(a.armhole.x,a.cbWaist.y),a.hips=new n(a.armhole.x,a.cbHips.y),a.hem=new n(a.armhole.x,a.cbHem.y),a.armholePitch=new n(t.shoulderToShoulder*e.acrossBackFactor/2+o.get("shoulderEase")/2,a.shoulder.y+a.shoulder.dy(a.armhole)/2),a.backArmholePitch=a.armholePitch.clone(),a.frontArmholePitch=a.armholePitch.clone(),a._tmp1=new n(a.armholePitch.x,a.armhole.y),a._tmp2=a._tmp1.shift(45,10),a._tmp3=c.beamsIntersect(a._tmp1,a._tmp2,a.armhole,a.armholePitch),a.armholeHollow=a._tmp1.shiftFractionTowards(a._tmp3,.5),a.armholeCp2=a.armhole.shift(180,a._tmp1.dx(a.armhole)/4),a.armholeHollowCp1=a.armholeHollow.shift(-45,a.armholeHollow.dy(a.armhole)/2),a.armholeHollowCp2=a.armholeHollow.shift(135,a.armholePitch.dx(a.armholeHollow)),a.armholePitchCp1=a.armholePitch.shift(-90,a.armholePitch.dy(a.armholeHollow)/2),a.backArmholePitchCp1=a.armholePitchCp1.clone(),a.frontArmholePitchCp1=a.armholePitchCp1.clone(),a.armholePitchCp2=a.armholePitch.shift(90,a.shoulder.dy(a.armholePitch)/2),a.backArmholePitchCp2=a.armholePitchCp2.clone(),a.frontArmholePitchCp2=a.armholePitchCp2.clone(),a.shoulderCp1=a.shoulder.shiftTowards(a.neck,a.shoulder.dy(a.armholePitch)/5).rotate(90,a.shoulder),a._tmp4=a.neck.shiftTowards(a.shoulder,10).rotate(-90,a.neck),a.neckCp2=c.beamIntersectsY(a.neck,a._tmp4,a.cbNeck.y),a.cfNeck=a.neck.rotate(-90,new n(0,0));let h=t.neck*(1+e.collarEase),m=0,f=0;do{f++,a.cfNeck=a.cfNeck.shift(90,m/3),a.frontNeckCpEdge=c.beamsIntersect(a.neck,a.neckCp2,a.cfNeck,new n(20,a.cfNeck.y)),a.cfNeckCp1=a.cfNeck.shiftFractionTowards(a.frontNeckCpEdge,.55),a.neckCp2Front=a.neck.shiftFractionTowards(a.frontNeckCpEdge,.65),l.neckOpening=(new r).move(a.cfNeck).curve(a.cfNeckCp1,a.neckCp2Front,a.neck).curve(a.neckCp2,a.cbNeck,a.cbNeck).attr("class","dashed stroke-xl various"),m=2*l.neckOpening.length()-h}while(Math.abs(m)>1&&e.brianFitCollar&&f<10);delete l.neckOpening,a.gridAnchor=a.cbHem;let u=t.chest*e.frontArmholeDeeper;for(const g of["","Cp1","Cp2"])a[`frontArmholePitch${g}`]=a[`armholePitch${g}`].shift(180,u);return p("mirror",{mirror:[a.hps,a.shoulder],points:["neckCp2Front","cfNeckCp1","cfNeck","cbNeck","neckCp2","frontArmholePitch","frontArmholePitchCp2","shoulderCp1"],clone:!0}),o.set("s3CollarMaxFront",a.hps.dy(a.cfNeck)/2),o.set("s3CollarMaxBack",a.hps.dy(a.cbNeck)/2),o.set("s3ArmholeMax",a.shoulder.dy(a.frontArmholePitch)/4),a.title=new n(a.armholePitch.x/2,a.armholePitch.y),p("title",{nr:0,title:"base",at:a.title}),a.logo=a.title.shift(-90,100),i.logo=new s("logo",a.logo),d}},N={from:D,options:D.options,name:"brian.back",draft:({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,complete:l,macro:c,options:p,utils:d,part:h})=>{a.anchor=a.hps.clone(),p.s3Collar<.1&&p.s3Collar>-.1?(a.s3CollarSplit=a.hps,n.backCollar=(new i).move(a.hps).curve_(a.neckCp2,a.cbNeck).hide()):p.s3Collar>0?(a.s3CollarSplit=d.curveIntersectsY(a.hps,a.mirroredNeckCp2Front,a.mirroredCfNeckCp1,a.mirroredCfNeck,-1*t.get("s3CollarMaxFront")*p.s3Collar),n.backCollar=(new i).move(a.hps)._curve(a.mirroredNeckCp2Front,a.mirroredCfNeckCp1,a.mirroredCfNeck).split(a.s3CollarSplit)[0].reverse().join((new i).move(a.hps).curve_(a.neckCp2,a.cbNeck)).hide()):p.s3Collar<0&&(a.s3CollarSplit=d.curveIntersectsY(a.hps,a.neckCp2,a.cbNeck,a.cbNeck,-1*t.get("s3CollarMaxBack")*p.s3Collar),n.backCollar=(new i).move(a.cbNeck)._curve(a.neckCp2,a.neck).split(a.s3CollarSplit)[0].reverse().hide()),p.s3Armhole<.1&&p.s3Armhole>-.1?(a.s3ArmholeSplit=a.shoulder,n.backArmhole=(new i).move(a.armholePitch).curve(a.armholePitchCp2,a.shoulderCp1,a.shoulder).hide()):p.s3Armhole>0?(a.s3ArmholeSplit=d.curveIntersectsY(a.shoulder,a.mirroredShoulderCp1,a.mirroredFrontArmholePitchCp2,a.mirroredFrontArmholePitch,-1*t.get("s3ArmholeMax")*p.s3Armhole+a.shoulder.y),n.backArmhole=(new i).move(a.armholePitch).curve(a.armholePitchCp2,a.shoulderCp1,a.shoulder).join((new i).move(a.shoulder).curve(a.mirroredShoulderCp1,a.mirroredFrontArmholePitchCp2,a.mirroredFrontArmholePitch).split(a.s3ArmholeSplit)[0]).hide()):p.s3Armhole<0&&(a.s3ArmholeSplit=d.curveIntersectsY(a.shoulder,a.shoulderCp1,a.armholePitchCp2,a.armholePitch,-1*t.get("s3ArmholeMax")*p.s3Armhole+a.shoulder.y),n.backArmhole=(new i).move(a.armholePitch).curve(a.armholePitchCp2,a.shoulderCp1,a.shoulder).split(a.s3ArmholeSplit)[0].hide()),n.saBase=(new i).move(a.cbHem).line(a.hem).line(a.armhole).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.armholePitchCp1,a.armholePitch).join(n.backArmhole).line(a.s3CollarSplit).join(n.backCollar).hide(),n.seam=(new i).move(a.cbNeck).line(a.cbHips).join(n.saBase).attr("class","fabric");for(const m of["sleeve","twoPartSleeve","topsleeve","undersleeve"])t.set(`library.${m}.backArmholeLength`,R(a,i)),t.set(`library.${m}.backArmholeToArmholePitch`,F(a,i));
1return t.set("library.sleeve.title",{nr:3}),e&&(n.sa=n.saBase.offset(e).attr("class","fabric sa").line(a.cbNeck).move(a.cbHips),n.sa.line(n.sa.start())),c("cutonfold",{from:a.cbNeck,to:a.cbHips,grainline:!0}),t.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),c("title",{at:a.title,nr:2,title:"back"}),r.armholePitchNotch=new s("bnotch",a.armholePitch),a.chest=new o(a.armhole.x,a.cbChest.y),l&&(n.chest=(new i).move(a.cbChest).line(a.chest).attr("class","contrast help"),c("banner",{id:"chestLine",classes:"center contrast help",path:n.chest,text:"brian:chestLine"})),l&&(n.waist=(new i).move(a.cbWaist).line(a.waist).attr("class","contrast help"),c("banner",{id:"waistLine",classes:"center contrast help",path:n.waist,text:"brian:waistLine"})),P(r,s,a,p,"bnotch"),E(h,"back"),c("hd",{id:"wHem",from:a.cbHips,to:a.hips,y:a.hem.y+e+15}),c("vd",{id:"hHemToWaist",from:a.cbHem,to:a.cbWaist,x:a.cbHips.x-15}),c("vd",{id:"hHemToNeckOpeningBottom",from:a.cbHem,to:a.cbNeck,x:a.cbHips.x-30}),c("hd",{id:"wCFrontToHps",from:a.cbNeck,to:a.s3CollarSplit,y:a.s3CollarSplit.y-e-15}),c("hd",{id:"lShoulder",from:a.cbNeck,to:a.s3ArmholeSplit,y:a.s3CollarSplit.y-e-30}),h}},I={from:N,options:N.options,name:"brian.front",draft:({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,options:l,complete:c,macro:p,utils:d,part:h})=>{a.armholePitchCp1=a.frontArmholePitchCp1,a.armholePitch=a.frontArmholePitch,a.armholePitchCp2=a.frontArmholePitchCp2,l.s3Collar<.1&&l.s3Collar>-.1?(a.s3CollarSplit=a.hps,n.frontCollar=(new i).move(a.hps).curve(a.neckCp2Front,a.cfNeckCp1,a.cfNeck).hide()):l.s3Collar>0?(a.s3CollarSplit=d.curveIntersectsY(a.hps,a.neckCp2Front,a.cfNeckCp1,a.cfNeck,t.get("s3CollarMaxFront")*l.s3Collar),n.frontCollar=(new i).move(a.hps).curve(a.neckCp2Front,a.cfNeckCp1,a.cfNeck).split(a.s3CollarSplit)[1].hide()):l.s3Collar<0&&(a.s3CollarSplit=d.curveIntersectsY(a.mirroredCbNeck,a.mirroredCbNeck,a.mirroredNeckCp2,a.hps,t.get("s3CollarMaxBack")*l.s3Collar),n.frontCollar=(new i).move(a.hps).curve_(a.mirroredNeckCp2,a.mirroredCbNeck).split(a.s3CollarSplit)[0].reverse().join((new i).move(a.hps).curve(a.neckCp2Front,a.cfNeckCp1,a.cfNeck)).hide()),l.s3Armhole<.1&&l.s3Armhole>-.1?(a.s3ArmholeSplit=a.shoulder,n.frontArmhole=(new i).move(a.armholePitch).curve(a.armholePitchCp2,a.shoulderCp1,a.shoulder).hide()):l.s3Armhole>0?(a.s3ArmholeSplit=d.curveIntersectsY(a.shoulder,a.shoulderCp1,a.armholePitchCp2,a.armholePitch,t.get("s3ArmholeMax")*l.s3Armhole+a.shoulder.y),n.frontArmhole=(new i).move(a.armholePitch).curve(a.armholePitchCp2,a.shoulderCp1,a.shoulder).split(a.s3ArmholeSplit)[0].hide()):l.s3Armhole<0&&(a.s3ArmholeSplit=d.curveIntersectsY(a.shoulder,a.mirroredShoulderCp1,a.mirroredFrontArmholePitchCp2,a.mirroredFrontArmholePitch,t.get("s3ArmholeMax")*l.s3Armhole+a.shoulder.y),n.frontArmhole=(new i).move(a.armholePitch).curve(a.armholePitchCp2,a.shoulderCp1,a.shoulder).join((new i).move(a.shoulder).curve(a.mirroredShoulderCp1,a.mirroredFrontArmholePitchCp2,a.mirroredFrontArmholePitch).split(a.s3ArmholeSplit)[0]).hide());for(let m of["Shoulder","Armhole","Waist","Hips","Hem"])a[`cf${m}`]=new o(a[`cb${m}`].x,a[`cb${m}`].y),delete a[`cb${m}`];a.neckCp2=new o(a.neckCp2Front.x,a.neckCp2Front.y),n.saBase=(new i).move(a.cfHem).line(a.hem).line(a.armhole).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.armholePitchCp1,a.armholePitch).join(n.frontArmhole).line(a.s3CollarSplit).join(n.frontCollar),n.saBase.hide(),n.seam=(new i).move(a.cfNeck).line(a.cfHem).join(n.saBase).attr("class","fabric"),e&&(n.sa=n.saBase.offset(e).attr("class","fabric sa").line(a.cfNeck).move(a.cfHips),n.sa.line(n.sa.start()));for(const m of["sleeve","twoPartSleeve","topsleeve","undersleeve"])t.set(`library.${m}.frontArmholeLength`,R(a,i)),t.set(`library.${m}.frontArmholeToArmholePitch`,F(a,i));return p("cutonfold",{from:a.cfNeck,to:a.cfHips,grainline:!0}),p("title",{at:a.title,nr:1,title:"front"}),r.armholePitchNotch=new s("notch",a.armholePitch),P(r,s,a,l,"notch"),E(h,"front"),p("hd",{id:"wHem",from:a.cfHips,to:a.hips,y:a.hem.y+e+15}),p("vd",{id:"hHemToWaist",from:a.cfHem,to:a.cfWaist,x:a.cfHips.x-e-15}),p("vd",{id:"hHemToNeckOpeningBottom",from:a.cfHem,to:a.cfNeck,x:a.cfHips.x-e-30}),p("hd",{id:"wCFrontToHps",from:a.cfNeck,to:a.s3CollarSplit,y:a.s3CollarSplit.y-e-15}),p("hd",{id:"WCFrontToShoulder",from:a.cfNeck,to:a.s3ArmholeSplit,y:a.s3CollarSplit.y-e-30}),h}},M=new n.pT({data:r,parts:[N,I,y]}),_=(0,n.D4)([f,s]),j={en:JSON.parse('{"t":"Aaron A-Shirt","d":"Aaron is an athletic shirt or tank top.","p":{"armBinding":"Arm opening knit binding","neckBinding":"Neck opening knit binding"},"s":{"cutArmBinding.t":"The arm opening knit binding is not shown","cutArmBinding.d":"The **Arm opening knit binding** are two strips of fabric {{{ width }}} wide and {{{ length }}} long.","cutNeckBinding.t":"The neck opening knit binding is not shown","cutNeckBinding.d":"The **Neck opening knit binding** is a strip of fabric {{{ width }}} wide and {{{ length }}} long.","cutOneStripToFinishTheNeckOpening":"Cut one strip to finish the neck opening","cutTwoStripsToFinishTheArmholes":"Cut two strips to finish the armholes","largeSaAdaptKnitBindingWidth.t":"Consider lowering the knit binding width","largeSaAdaptKnitBindingWidth.d":"The default width of the knit binding is 6 times the seam allowance. Because your chosen seam allowance ({{{ sa }}}) is larger than the 1cm used when designing the pattern, your knit binding is likely to be too wide. \\n\\nYou can lower the knit binding width to compensate for your larger seam allowance.","length":"Length","width":"Width"},"o":{"armholeDrop":{"t":"Armhole drop","d":"Lower the armhole by this amount. Negative values will raise it."},"backlineBend":{"t":"Back armhole shape","d":"Determines the shape/bend of the back of the armholes."},"hipsEase":{"t":"Hips ease","d":"The amount of ease at your hips."},"knitBindingWidth":{"t":"Knit binding width","d":"Controls the width of the knit binding as a percentage of the chosen seam allowance, or 1cm if no seam allowance is used."},"necklineBend":{"t":"Neckline shape","d":"Determines the shape/bend of the neckline at the front."},"necklineDrop":{"t":"Neckline drop","d":"The amount the neck is cutout at the front."},"shoulderStrapPlacement":{"t":"Shoulderstrap placement","d":"Determines whether the shoulder strap is placed closer to the neck (lower numbers) or the shoulder (higher numbers)."},"shoulderStrapWidth":{"t":"Shoulderstrap width","d":"The width of the shoulder straps."},"stretchFactor":{"t":"Stretch","d":"Determines the horizontal negative ease."}}}')},G=JSON.parse('{"id":"aaron","code":"Joost De Cock","name":"Aaron A-shirt","description":"A FreeSewing pattern for a A-shirt or tank top","design":"Joost De Cock","difficulty":2,"tags":["tops","underwear"],"techniques":["hem","stretch","knit-binding","curved-seam"],"version":"4.6.0","pkg":"@freesewing/aaron","collection":true}');function U(t,e,o){t("hd",{id:"wHem",from:e.cfHem,to:e.hem,y:e.hem.y+2.5*o+15}),t("hd",{id:"wCfToStrapIn",from:e.cfNeck,to:e.strapLeft,y:e.neck.y-o-15}),t("hd",{id:"wCfToStrapOut",from:e.cfNeck,to:e.strapRight,y:e.neck.y-o-30}),t("vd",{id:"hHemToArmhole",from:e.hem,to:e.armhole,x:e.armhole.x+o+15}),t("vd",{id:"hHemToStrapOut",from:e.hem,to:e.strapRight,x:e.armhole.x+o+30}),t("vd",{id:"hHemToStrapIn",from:e.hem,to:e.strapLeft,x:e.armhole.x+o+45}),t("hd",{id:"wFull",from:e.cfNeck,to:e.armhole,y:e.neck.y-o-45})}const Y={from:D,name:"aaron.front",measurements:["hips"],options:{brianFitCollar:!1,libraryFitSleeve:!1,acrossBackFactor:.97,bicepsEase:.05,shoulderEase:0,collarEase:0,frontArmholeDeeper:0,armholeDepthFactor:.6,shoulderSlopeReduction:0,chestEase:{pct:8,min:0,max:20,...(0,n.Wx)("chest"),menu:"fit"},draftForHighBust:{bool:!1,menu:"fit"},hipsEase:{pct:8,min:0,max:20,...(0,n.Wx)("hips"),menu:"fit"},stretchFactor:{pct:5,min:0,max:15,menu:"fit"},armholeDrop:{pct:10,min:0,max:75,menu:"style"},lengthBonus:{pct:10,min:-20,max:60,menu:"style"},necklineBend:{pct:100,min:40,max:100,menu:"style"},necklineDrop:{pct:20,min:10,max:35,menu:"style"},shoulderStrapWidth:{pct:15,min:10,max:40,menu:"style"},shoulderStrapPlacement:{pct:40,min:20,max:80,menu:"style"}}
1,draft:({utils:t,store:e,sa:o,Point:a,points:i,Path:n,paths:s,Snippet:r,snippets:l,options:c,measurements:p,macro:d,part:h,complete:m})=>{for(let f of Object.keys(s))s[f].hide();for(let f in i)i[f].x=i[f].x*(1-c.stretchFactor);for(let f of["Neck","Shoulder","Armhole","Hips","Hem"])i[`cf${f}`]=i[`cb${f}`].clone();if(i.cfNeck=i.cfNeck.shift(-90,c.necklineDrop*p.hpsToWaistBack),i.strapCenter=i.neck.shiftFractionTowards(i.shoulder,c.shoulderStrapPlacement),i.strapLeft=i.strapCenter.shiftTowards(i.neck,i.neck.dist(i.shoulder)*c.shoulderStrapWidth),i.strapRight=i.strapLeft.rotate(180,i.strapCenter),i.necklineCorner=t.beamsIntersect(i.strapLeft,i.strapRight.rotate(-90,i.strapLeft),i.cfNeck.shift(0,i.armholePitch.x/4),i.cfNeck),i.strapLeftCp2=i.strapLeft.shiftFractionTowards(i.necklineCorner,c.necklineBend),i.cfNeckCp1=i.cfNeck.shiftFractionTowards(i.necklineCorner,c.necklineBend),e.set("armholeY",i.armhole.y*(1+c.armholeDrop)),i.hips.x=(p.hips+c.hipsEase*p.hips)/4*(1-c.stretchFactor),i.waist.x=i.hips.x,i.hipsCp2=new a(i.hi
1ps.x,e.get("armholeY")+(i.hips.y-e.get("armholeY"))/2),i.hem.x=i.hips.x,i.armhole=t.beamIntersectsY(i.armhole,i.hips,i.armhole.y*(1+c.armholeDrop)),i.armholeCorner=t.beamsIntersect(i.armhole,i.armhole.shift(180,10),i.strapRight,i.strapLeft.rotate(90,i.strapRight)),i.armholeCp2=i.armhole.shiftFractionTowards(i.armholeCorner,.5),i.strapRightCp1=i.strapRight.shiftFractionTowards(i.armholeCorner,.5),i.anchor=i.cfNeck.clone(),s.seam=(new n).move(i.cfNeck).line(i.cfHem).line(i.hem).curve_(i.hipsCp2,i.armhole).curve(i.armholeCp2,i.strapRightCp1,i.strapRight).line(i.strapLeft).curve(i.strapLeftCp2,i.cfNeckCp1,i.cfNeck).close().attr("class","fabric"),o){let t=(new n).move(i.strapRight).line(i.strapLeft).offset(o);s.saShoulder=(new n).move(i.strapRight).line(t.start()).join(t).line(i.strapLeft).attr("class","fabric sa"),s.sa=(new n).move(i.cfHem).line(i.cfHem).join((new n).move(i.cfHem).line(i.hem).offset(2.5*o)).join((new n).move(i.hem).curve_(i.waist,i.armhole).offset(o).line(i.armhole)).attr("class","fabric sa")}return e.set("frontArmholeLength",(new n).move(i.armhole).curve(i.armholeCp2,i.strapRightCp1,i.strapRight).length()),e.set("frontNeckOpeningLength",(new n).move(i.strapLeft).curve(i.cfNeckCp1,i.cfNeckCp1,i.cfNeck).length()),i.gridAnchor=i.cfHem,e.cutlist.addCut({cut:1,from:"fabric",onFold:1}),i.title=new a(i.waist.x/2,i.waist.y),d("title",{at:i.title,nr:1,title:"front"}),d("cutonfold",{from:i.cfNeck,to:i.cfHem,grainline:!0}),i.logo=i.title.shift(-90,75),l.logo=new r("logo",i.logo),U(d,i,o),d("vd",{from:i.cfHem,to:i.cfNeck,x:i.cfHem.x-o-15,id:"hHemToCfNeck"}),i.chest=new a(i.armhole.x,i.cbChest.y),m&&(s.chest=(new n).move(i.cbChest).line(i.chest).attr("class","contrast help"),d("banner",{id:"chestLine",classes:"center contrast help",path:s.chest,text:"aaron:chestLine"})),m&&(s.waist=(new n).move(i.cbWaist).line(i.waist).attr("class","contrast help"),d("banner",{id:"waistLine",classes:"center contrast help",path:s.waist,text:"aaron:waistLine"})),h}},$={from:Y,name:"aaron.back",options:{backNeckCutout:.05,backlineBend:{pct:50,min:25,max:100,menu:"style"},knitBindingWidth:{pct:600,min:300,max:800,menu:"style"},libraryFitSleeve:!1,cuffEase:0,s3Collar:0,s3Armhole:0},draft:({store:t,sa:e,Point:o,points:a,Path:i,paths:n,options:s,complete:r,expand:l,macro:c,utils:p,units:d,measurements:h,part:m})=>(a.cbNeck.y=h.neck/10,a.strapLeftCp2=p.beamsIntersect(a.strapLeft,a.strapCenter.rotate(90,a.strapLeft),a.cbNeck,a.cbNeck.shift(0,10)),a.armholeCp2=a.armhole.shiftFractionTowards(a.armholeCorner,s.backlineBend),a.strapRightCp1=a.strapRight.shiftFractionTowards(a.armholeCorner,s.backlineBend),a.anchor=a.cbNeck.clone(),n.seam=(new i).move(a.cbNeck).line(a.cbHem).line(a.hem).curve_(a.hipsCp2,a.armhole).curve(a.armholeCp2,a.strapRightCp1,a.strapRight).line(a.strapLeft).line(a.strapLeft).curve(a.strapLeftCp2,a.cbNeck,a.cbNeck).close().attr("class","fabric"),a.gridAnchor=a.cfHem,c("cutonfold",{from:a.cfNeck,to:a.cfHem,grainline:!0}),c("title",{at:a.title,nr:2,title:"back"}),a.scaleboxAnchor=a.scalebox=a.title.shift(90,100),c("scalebox",{at:a.scalebox}),t.set("bindingWidth",(e||10)*s.knitBindingWidth),t.set("armBindingLength",.95*((new i).move(a.armhole).curve(a.armholeCp2,a.strapRightCp1,a.strapRight).length()+t.get("frontArmholeLength"))),t.set("neckBindingLength",2*((new i).move(a.strapLeft).curve(a.strapLeftCp2,a.cbNeck,a.cbNeck).length()+t.get("frontNeckOpeningLength"))*.95),e>10&&t.get("bindingWidth")>61&&t.flag.tip({msg:"aaron:largeSaAdaptKnitBindingWidth",replace:{sa:d(e),width:d(t.get("bindingWidth"))},suggest:{text:"flag:apply",icon:"options",update:{settings:[["options","knitBindingWidth"],60/t.get("bindingWidth")*6]}}}),r&&!l&&(a.bindingAnchor=new o(a.armhole.x/4,a.armhole.y).attr("data-text","aaron:cutTwoStripsToFinishTheArmholes").attr("data-text",":\n").attr("data-text",`2x: ${d(t.get("bindingWidth"))} x ${d(t.get("armBindingLength"))}`).attr("data-text","\n \n").attr("data-text","aaron:cutOneStripToFinishTheNeckOpening").attr("data-text",":\n").attr("data-text",`${d(t.get("bindingWidth"))} x ${d(t.get("neckBindingLength"))}`)),U(c,a,e),c("vd",{from:a.cbHem,to:a.cbNeck,x:a.cbHem.x-e-15}),m)},z={name:"aaron.armBinding",after:$,draft:({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,macro:l,complete:c,expand:p,units:d,part:h})=>{const m=t.get("bindingWidth"),f=t.get("armBindingLength");if(!p)return t.flag.note({msg:"aaron:cutArmBinding",notes:["flag:saUnused","flag:partHiddenByExpand"],replace:{width:d(m),length:d(f)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),t.flag.preset("expand"),h.hide();if(t.flag.preset("expandIsOn"),a.topLeft=new o(0,0),a.bottomLeft=new o(0,f),a.bottomRight=new o(m,f),a.topRight=new o(m,0),n.seam=(new i).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).line(a.topLeft).close().addClass("fabric"),t.cutlist.addCut({cut:2}),a.title=new o(m/2,f/8),l("title",{at:a.title,nr:4,title:"aaron:armBinding",align:"center",scale:.5}),c)for(const u of[1,2,3])n[`fold${u}`]=(new i).move(a.topLeft.shiftFractionTowards(a.topRight,.25*u)).line(a.bottomLeft.shiftFractionTowards(a.bottomRight,.25*u)).addClass("note help"),l("banner",{id:`foldHere${u}`,path:n[`fold${u}`],text:"foldHere",classes:"fill-note text-sm center",repeat:30,space
1s:60});return a.logo=a.title.shift(-90,75),r.logo=new s("logo",a.logo).scale(.75),l("vd",{from:a.bottomRight,to:a.topRight,x:a.topRight.x+e+15}),l("hd",{from:a.bottomLeft,to:a.bottomRight,y:a.bottomRight.y+e+15}),h}},J={name:"aaron.neckBinding",after:$,draft:({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,macro:l,complete:c,expand:p,units:d,part:h})=>{const m=t.get("bindingWidth"),f=t.get("neckBindingLength");if(!p)return t.flag.note({msg:"aaron:cutNeckBinding",notes:["flag:saUnused","flag:partHiddenByExpand"],replace:{width:d(m),length:d(f)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),t.flag.preset("expand"),h.hide();if(t.flag.preset("expandIsOn"),a.topLeft=new o(0,0),a.bottomLeft=new o(0,f),a.bottomRight=new o(m,f),a.topRight=new o(m,0),n.seam=(new i).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).line(a.topLeft).close().addClass("fabric"),t.cutlist.addCut({cut:1}),a.title=new o(m/2,f/8),l("title",{at:a.title,nr:3,title:"aaron:neckBinding",align:"center",scale:.5}),a.logo=a.title.shift(-90,75),r.logo=new s("logo",a.logo).scale(.75),c)for(const u of[1,2,3])n[`fold${u}`]=(new i).move(a.topLeft.shiftFractionTowards(a.topRight,.25*u)).line(a.bottomLeft.shiftFractionTowards(a.bottomRight,.25*u)).addClass("note help"),l("banner",{id:`foldHere${u}`,path:n[`fold${u}`],text:"foldHere",classes:"fill-note text-sm center",repeat:30,spaces:60});return l("vd",{from:a.bottomRight,to:a.topRight,x:a.topRight.x+e+15}),l("hd",{from:a.bottomLeft,to:a.bottomRight,y:a.bottomRight.y+e+15}),h}},K=new n.pT({data:G,parts:[$,Y,z,J]}),V=(0,n.D4)([_,j],{p:{keep:["front","back","armBinding","neckBinding"]},o:{keep:[...Object.keys($.options),...Object.keys(Y.options),"cuffEase","s3Collar","s3Armhole","legacyArmholeDepth","legacyArmholeDepthNo","legacyArmholeDepthYes","armholeDepth","draftForHighBustNo","draftForHighBustYes"]},s:{drop:[]}}),X=JSON.parse('{"id":"albert","name":"Albert apron","code":"Wouter Van Wageningen","description":"A FreeSewing pattern for an apron","design":"Wouter Van Wageningen","difficulty":2,"tags":["accessories"],"techniques":["hem","knit-binding","curved-seam","pocket"],"version":"4.6.0","pkg":"@freesewing/albert","collection":true}'),Q={name:"albert.front",measurements:["chest","hpsToWaistBack","waist","waistToKnee","hips"],options:{backOpening:{pct:10,min:0,max:25,menu:"fit"},bibWidth:{pct:100,min:50,max:125,menu:"style"},bibLength:{pct:75,min:0,max:90,menu:"style"},lengthBonus:{pct:0,min:-20,max:25,menu:"style"}},draft:({options:t,measurements:e,Point:o,Path:a,points:i,paths:n,Snippet:s,snippets:r,sa:l,complete:c,macro:p,store:d,part:h})=>{const m=e.chest/4*t.bibWidth,f=e.hpsToWaistBack*t.bibLength,u=e.hpsToWaistBack*t.bibLength+e.waistToKnee*(1+t.lengthBonus),g=e.waist*(1-t.backOpening),b=e.hpsToWaistBack*t.strapWidth/8,w=u/4;if(d.set("bibWidth",m),d.set("apronLength",u),d.set("apronWidth",g),d.set("strapWidth",b),d.set("pocketSize",w),i.topLeft=new o(0,0),i.topLeftHem=i.topLeft.shift(270,b),i.bottomLeftHem=i.topLeftHem.shift(270,u),i.waistLeft=i.topLeftHem.shift(270,f),i.bottomLeft=i.bottomLeftHem.shift(270,b),i.topRight=i.topLeft.shift(0,m/2),i.topRightHem=i.topLeftHem.shift(0,m/2),i.bottomRightHem=i.bottomLeftHem.shift(0,g/2),i.bottomRight=i.bottomLeft.shift(0,g/2),i.topRightBack=i.bottomRightHem.shift(90,u-f),i.topRightBackCPfront=i.topRightBack.shift(180,(g-m)/2/1.5),i.topRightCPdown=i.topRightHem.shift(270,e.hpsToWaistBack*t.bibLength/4),i.topCOF=i.topLeft.shift(270,u/5),i.bottomCOF=i.bottomLeft.shift(90,u/5),i.pocketLeftTop=i.waistLeft.shift(270,b),i.pocketRightTop=i.pocketLeftTop.shift(0,w),i.pocketLeftBottom=i.pocketLeftTop.shift(270,w),i.pocketRightBottom=i.pocketLeftBottom.shift(0,w),i.crossBox1TopLeft=new o(i.topRightHem.x-b,i.topRightHem.y-b),i.crossBox1BottomRight=new o(i.crossBox1TopLeft.x+b,i.crossBox1TopLeft.y+b),i.crossBox2TopLeft=i.topRightBack.copy().shift(180,b),i.crossBox2BottomRight=new o(i.crossBox2TopLeft.x+b,i.crossBox2TopLeft.y+b),n.seam=(new a).move(i.bottomRight).line(i.topRightBack).curve(i.topRightBackCPfront,i.topRightCPdown,i.topRightHem).line(i.topRight).line(i.topLeft).line(i.bottomLeft).line(i.bottomRight).close().addClass("class","fabric"),c&&(n.pocket=(new a).move(i.pocketLeftBottom).line(i.pocketLeftTop).line(i.pocketRightTop).line(i.pocketRightBottom).line(i.pocketLeftBottom).addClass("fabric help"),p("banner",{id:"pocket",path:n.pocket,text:"pocket",classes:"fill-note center"})),l){const t=(new a).move(i.bottomLeft.shift(-90,b-l)).line(i.bottomRight.shift(-90,b-l).shift(0,b-l)).line(i.topRightBack.shift(0,b-l)).curve(i.topRightBackCPfront,i.topRightCPdown,i.topRightHem).line(i.topRight.shift(90,b-l)).line(i.topLeft.shift(90,b-l));n.sa=t.clone().offset(2*l).addClass("fabric sa"),n.sa=(new a).move(i.bottomLeft).line(n.sa.start()).join(n.sa).line(i.topLeft).attr("class","fabric sa"),c&&(n.hemHint=t.clone().offset(l).addClass("note help"),p("banner",{id:"narrowHem",path:n.hemHint,text:"albert:narrowHem",repeat:60,spaces:60,classes:"fill-note center"})),p("hd",{from:i.bottomRight,to:i.bottomRight.shift(0,b),y:i.bottomLeft.y+l+(l?b:0)+15,id:"wBottomHem"}),p("vd",{from:i.topLeft,to:i.topLeft.shift(90,b),x:i.topLeftHem.x-15,id:"foldoverTop"}),p("vd",{from:i.bottomLeft.shift(270,b),to:i.bottomLeft,x:i.topLeftHem.x-15,id:"hLeftToFoldover"})}return d.cutlist.addCut({cut:1,from:"fabric"}),p("cutonfold",{to:i.bottomCOF,from:i.topCOF,reverse:!0}),i.logo=i.topRightBack.shiftFractionTowards(i.pocketRightBottom,.5),r.logo=new s("logo",i.logo),i.title=i.logo.shift(-90,100),p("title",{nr:1,at:i.title,title:"front"}),i.scaleboxAnchor=i.pocketLeftBottom.shiftFractionTowards(i.bottomRight,.5),p("scalebox",{at:i.scaleboxAnchor}),p("crossbox",{topLeft:i.crossBox1TopLeft,bottomRight:i.crossBox1BottomRight,id:"crossbox1"}),p("crossbox",{topLeft:i.crossBox2TopLeft,bottomRight:i.crossBox2BottomRight,id:"crossbox2",text:"albert:attachStrap"}),p("hd",{from:i.bottomLeft,to:i.bottomRight,y:i.bottomLeft.y+l+(l?b:0)+15,id:"wBottom"}),p("hd",{from:i.topLeft,to:i.topRight,y:i.topLeft.y-l-(l?b:0)-15,id:"wTop"}),p("vd",{from:i.bottomLeft,to:i.topLeft,x:i.topLeft.x-15,id:"hLeft"}),p("vd",{from:i.bottomRight,to:i.topRightBack,x:i.topRightBack.x+l+(l?b:0)+15,id:"hRightBottom"}),p("vd",{from:i.topRightBack,to:i.topRight,x:i.topRightBack.x+l+(l?b:0)+15,id:"hRightTop"}),h}},q={name:"albert.pocket",after:Q,draft:({Point:t,Path:e,points:o,paths:a,Snippet:i,snippets:n,sa:s,macro:r,expand:l,units:c,store:p,part:d,complete:h})=>{const m=p.get("pocketSize");if(!l){const t=s?2*s:0;return p.flag.note({msg:"albert:cutPocket",notes:[s?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{width:c(2*m+t),length:c(m+t+p.get("strapWidth"))},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),p.flag.preset("expand"),d.hide()}return o.topLeft=new t(0,0),o.topRight=new t(m,0),o.bottomLeft=o.topLeft.shift(270,m),o.bottomRight=o.topRight.shift(270,m),a.seam=(new e).move(o.bottomLeft).line(o.bottomRight).line(o.topRight).line(o.topLeft).line(o.bottomLeft).close().attr("class","fabric"),s&&(a.sa=(new e).move(o.bottomLeft).line(o.bottomRight).line(o.topRight.shift(90,p.get("strapWidth"))).line(o.topLeft.shift(90,p.get("strapWidth"))).offset(s).attr("class","fabric sa"),a.sa=(new e).move(o.bottomLeft).line(a.sa.start()).join(a.sa).line(o.topLeft).attr("class","fabric sa"),h&&(a.SAhemHint=(new e).move(o.topRight.shift(90,p.get("strapWidth")).shift(0,s)).line(o.topLeft.shift(90,p.get("strapWidth"))).addClass("note help"),r("banner",{id:"SAfoldHere",path:a.SAhemHint.reverse(),text:"albert:foldHere",repeat:60,spaces:30,classes:"fill-note center"}),a.hemHint=(new e).move(o.topRight.shift(0,s)).line(o.topLeft).setHidden(!0),r("banner",{id:"foldHere",path:a.hemHint.reverse(),text:"albert:foldHere",repeat:60,spaces:30,classes:"fill-note center"}),r("vd",{from:o.topLeft,to:o.topLeft.shift(90,p.get("strapWidth")),x:o.topLeft.x-15,id:"heightHem"}))),p.cutlist.addCut({cut:1,from:"fabric"}),r("cutonfold",{from:o.topLeft,to:o.bottomLeft,reverse:!0}),o.logo=o.topLeft.shiftFractionTowards(o.bottomRight,.5),n.logo=new i("logo",o.logo),o.title=o.logo.shift(-90,45),r("title",{nr:3,at:o.title,title:"Pocket"}),r("hd",{from:o.bottomLeft,to:o.bottomRight,y:o.bottomLeft.y+s+15,id:"width"}),r("vd",{from:o.bottomLeft,to:o.topLeft,x:o.topLeft.x-15,id:"height"}),d}},Z={name:"albert.strap",after:Q,options:{chestDepth:{pct:22,min:15,max:90,menu:"fit"},strapWidth:{pct:60,min:20,max:100,menu:"style"}}
1,draft:({options:t,measurements:e,Point:o,Path:a,points:i,paths:n,Snippet:s,snippets:r,sa:l,macro:c,store:p,complete:d,units:h,expand:m,part:f})=>{const u=p.get("bibWidth"),g=(p.get("apronWidth")-Math.max(e.hips,e.waist))/2+u/2,b=e.hpsToWaistBack+e.hpsToWaistBack-e.hpsToWaistBack*t.bibLength,w=p.get("strapWidth"),k=Math.sqrt(g*g+b*b)+e.chest*t.chestDepth;if(!m){const t=l?2*l:0;return p.flag.note({msg:"albert:cutStrap",notes:[l?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{width:h(2*w+t),length:h(k+2*w+t)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),p.flag.preset("expand"),f.hide()}return i.topLeft=new o(0,0),i.topLeftHem=i.topLeft.shift(270,w),i.topMiddle=new o(w,0),i.topMiddleHem=new o(w,w),i.topRight=new o(2*w,0),i.bottomLeftHem=new o(0,k+w),i.bottomLeft=new o(0,k+2*w),i.bottomMiddleHem=new o(w,k+w),i.bottomMiddle=new o(w,k+2*w),i.bottomRight=new o(2*w,k+2*w),n.seam=(new a).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).line(i.topLeft).close().attr("class","fabric"),d&&(n.fold=(new a).move(i.topMiddle).line(i.bottomMiddle).addClass("note help").addText("albert:foldHere","fill-note center"),c("banner",{id:"foldHere",path:n.fold,text:"albert:foldHere"})),l&&(n.sa=n.seam.offset(l).attr("class","fabric sa")),p.cutlist.addCut({cut:2,from:"fabric"}),i.logo=i.topLeft.shiftFractionTowards(i.bottomRight,.5),r.logo=new s("logo",i.logo),i.title=i.logo.shift(-90,70),c("title",{nr:2,at:i.title,title:"strap",align:"center"}),c("crossbox",{topLeft:i.topLeft,bottomRight:i.topMiddleHem,id:"crossbox1"}),c("crossbox",{topLeft:i.bottomLeftHem,bottomRight:i.bottomMiddle,id:"crossbox2"}),c("hd",{from:i.bottomLeft,to:i.bottomRight,y:i.bottomLeft.y+l+15,id:"wBottom"}),c("vd",{from:i.bottomLeft,to:i.topLeft,x:i.topLeft.x-l-30,id:"hLeft"}),c("vd",{from:i.topMiddleHem,to:i.topMiddle,x:i.topLeft.x-l-15,id:"crossboxTop"}),c("vd",{from:i.bottomMiddleHem,to:i.topMiddleHem,x:i.topLeft.x-l-15,id:"betweenCrossboxes"}),c("vd",{from:i.bottomMiddle,to:i.bottomMiddleHem,x:i.topLeft.x-l-15,id:"crossboxBottom"}),f}},tt={en:JSON.parse('{"t":"Albert apron","d":"Albert is an apron.","p":{"front":"Front","pocket":"Pocket","strap":"Strap"},"s":{"attachStrap":"Attach strap","cutPocket.t":"The pocket is not currently shown","cutPocket.d":"The **Pocket** is a rectangular piece of fabric {{{ width }}} wide and {{{ length }}} long.","cutStrap.t":"The straps are not currently shown","cutStrap.d":"The **Straps** are two strips of fabric {{{ width }}} wide and {{{ length }}} long.","foldHere":"Fold here"},"o":{"backOpening":{"t":"Back opening","d":"Controls the opening at the back of the apron"},"chestDepth":{"t":"Strap length","d":"Controls the length of the straps"},"lengthBonus":{"t":"Length bonus","d":"Controls the length of the apron"},"bibLength":{"t":"Bib length","d":"Controls the length of the bib"},"bibWidth":{"t":"Bib width","d":"Controls the width of the bib"},"strapWidth":{"t":"Strap width","d":"Controls the width of the strap"}}}')},et=new n.pT({data:X,parts:[Q,q,Z]}),ot=JSON.parse('{"id":"bee","name":"Bee bikini top","code":"bobgeorgethe3rd","description":"A FreeSewing pattern for a bikini top","design":"PrudenceRabbit","difficulty":3,"tags":["tops","swimwear"],"techniques":["hem","stretch","curved-seam","precision"],"version":"4.6.0","pkg":"@freesewing/bee","collection":true}'),at=JSON.parse('{"id":"bella","name":"Bella body block","code":"Joost De Cock","description":"A FreeSewing pattern for a womenswear bodice block","design":["Bella Incognito","Joost De Cock"],"difficulty":3,"tags":["blocks","tops"],"techniques":["dart","block"],"block":true,"version":"4.6.0","pkg":"@freesewing/bella","collection":true}'),it={name:"bella.back",measurements:["highBust","chest","underbust","waist","waistBack","bustSpan","neck","hpsToBust","hpsToWaistFront","hpsToWaistBack","shoulderToShoulder","shoulderSlope"],options:{acrossBackFactor:.925,shoulderSlopeBack:1.23,neckWidthBack:.197,neckWidthFront:.17,backDartLocation:.145,backCenterWaistReduction:.35,collarFactor:.19,bustSpanEase:{pct:10,min:0,max:20,...(0,n.Wx)("bustSpan"),menu:"fit"},chestEase:{pct:11,min:5,max:20,...(0,n.Wx)("chest"),menu:"fit"},fullChestEaseReduction:{pct:4,min:0,max:8,menu:"fit"},shoulderToShoulderEase:{pct:-.5,min:-1,max:5,...(0,n.Wx)("shoulderToShoulder"),menu:"fit"},waistEase:{pct:5,min:1,max:20,...(0,n.Wx)("waist"),menu:"fit"},backDartHeight:{pct:46,min:38,max:54,menu:"darts"},bustDartCurve:{pct:100,min:-100,max:100,menu:"darts"},bustDartLength:{pct:90,min:75,max:100,menu:"darts"},bustDartAngle:{count:0,min:-45,max:45,menu:"darts"},bustDartMinimumFabric:{pct:5,min:1,max:50,menu:"darts"},waistDartLength:{pct:90,min:75,max:95,menu:"darts"},waistDartCurve:{pct:100,min:-100,max:100,menu:"darts"},armholeDepth:{pct:44,min:38,max:46,menu:"armhole"},backArmholeCurvature:{pct:63,min:50,max:85,menu:"armhole"},backArmholePitchDepth:{pct:35,max:40,min:30,menu:"armhole"},backArmholeSlant:{deg:5,min:1,max:9,menu:"armhole"},frontArmholeCurvature:{pct:63,min:50,max:85,menu:"armhole"},frontArmholePitchDepth:{pct:29,max:31,min:27,menu:"armhole"},backHemSlope:{deg:2.5,min:0,max:5,menu:"advanced"},backNeckCutout:{pct:6,min:3,max:9,menu:"advanced"},frontShoulderWidth:{pct:95,max:98,min:92,menu:"advanced"},highBustWidth:{pct:86,max:92,min:80,menu:"advanced"}},draft:({store:t,sa:e,Point:o,points:a,Path:i,paths:n,options:s,macro:r,utils:l,measurements:c,log:p,part:d})=>{a.cbNeck=new o(0,c.neck*s.backNeckCutout),a.hps=new o(c.neck*s.neckWidthBack,0),a.cbNeckCp1=new o(.8*a.hps.x,a.cbNeck.y);let h=c.shoulderSlope*s.shoulderSlopeBack*-1;a.shoulder=l.beamsIntersect(new o(c.shoulderToShoulder*(1+s.shoulderToShoulderEase)/2,0),new o(c.shoulderToShoulder*(1+s.shoulderToShoulderEase)/2,100),a.hps,a.hps.shift(h,85)),a.armholePitch=new o(a.shoulder.x*s.acrossBackFactor,c.hpsToWaistBack*s.backArmholePitchDepth),a.dartTip=new o(c.underbust*s.backDartLocation,c.hpsToWaistBack*s.backDartHeight);let m=c.underbust/4*(1+s.chestEase),f=c.waistBack/2*(1+s.waistEase),u=m-f;a.cbWaist=new o(0,c.hpsToWaistBack),a.waistCenter=a.cbWaist.shift(0,u*s.backCenterWaistReduction),a.waistSide=a.waistCenter.shift(s.backHemSlope,f+u*(1-s.backCenterWaistReduction/2)),a.dartBottomCenter=l.beamIntersectsX(a.waist
1Center,a.waistSide,a.dartTip.x);let g=u*(1-.5*s.backCenterWaistReduction);g<=0&&(g=0,p.info("`"+d.name+"`: Back dart omitted (because the calculated dart width was 0.0 mm/inches or less).")),a.dartBottomLeft=a.dartBottomCenter.shift(180,g/2),a.dartBottomRight=a.dartBottomLeft.rotate(180,a.dartBottomCenter),a.dartLeftCp=a.dartBottomLeft.shift(90,a.dartTip.dy(a.dartBottomLeft)/2),a.dartRightCp=new o(a.dartBottomRight.x,a.dartLeftCp.y);let b=c.hpsToWaistBack*s.armholeDepth+a.shoulder.y;a.cbNeckCp2=new o(0,b);let w=l.curveIntersectsY(a.dartBottomLeft,a.dartLeftCp,a.dartTip,a.dartTip,b),k=0;if(a.cbArmhole=l.curveIntersectsY(a.cbNeck,a.cbNeckCp2,a.waistCenter,a.waistCenter,b),w&&(a.dartLeftArmhole=w,k=2*a.dartLeftArmhole.dx(a.dartTip)+a.cbArmhole.x),a.armhole=new o(c.underbust/4*(1+s.chestEase)+k,b),a.waistSideCp2=a.waistSide.shift(90,a.armhole.dy(a.waistSide)/2),a.armholeCp2=a.armhole.shift(180-s.backArmholeSlant,40),a.armholePitchCp1=a.armholePitch.shift(-90-s.backArmholeSlant,40),a.armholeCpTarget=l.beamsIntersect(a.armhole,a.armhole.shift(180-s.backArmholeSlant,40),a.armholePitch,a.armholePitch.shift(-90-s.backArmholeSlant,40)),a.armholeCp2=a.armhole.shiftFractionTowards(a.armholeCpTarget,s.backArmholeCurvature),a.armholePitchCp1=a.armholePitch.shiftFractionTowards(a.armholeCpTarget,s.backArmholeCurvature),a.armholePitchCp2=a.armholePitchCp1.rotate(180,a.armholePitch),a.armholePitchCp2.y<a.shoulder.y&&(a.armholePitchCp2.y=a.shoulder.y+a.shoulder.dy(a.armholePitch)/2),c.hpsToBust<a.waistCenter.y?a.bustCenter=l.curveIntersectsY(a.cbNeck,a.cbNeckCp2,a.waistCenter,a.waistCenter,c.hpsToBust):(p.warn("Unable to place bust above waist on center back seam. Using waist height instead."),t.flag.warn({msg:"bella:cbSeamBustBelowWaist"}),a.bustCenter=a.waistCenter.clone()),a.bustCenter.y<a.armhole.y){a.sideArmhole=a.armhole.clone();let t=(new i).move(a.armhole).curve(a.armhole,a.waistSideCp2,a.waistSide).shiftAlong(10);a.sideArmhole=t.shiftOutwards(a.armhole,100),a.bustSide=l.beamIntersectsY(a.armhole,a.sideArmhole,c.hpsToBust)}else c.hpsToBust<a.waistSide.y?a.bustSide=l.curveIntersectsY(a.waistSide,a.waistSideCp2,a.armhole,a.armhole,c.hpsToBust):(p.warn("Unable to place bust above waist on side back seam. Using waist height instead."),t.flag.warn({msg:"bella:sideSeamBustBelowWaist"}),a.bustSide=a.waistSide.clone());a.bustCenter.y<a.dartTip.y?(a.bustDartLeft=a.bustCenter.clone(),a.bustDartLeft.x=a.dartTip.x):c.hpsToBust<a.dartBottomLeft.y?a.bustDartLeft=l.curveIntersectsY(a.dartBottomLeft,a.dartLeftCp,a.dartTip,a.dartTip,c.hpsToBust):(p.warn("Unable to adjust bottom of dart on back part. Using unadjusted dart instead."),t.flag.warn({msg:"bella:bustDartCompromise"}),a.bustDartLeft=a.dartBottomLeft.clone()),a.bustDartRight=a.bustDartLeft.flipX(a.dartTip),t.set("bustWidthBack",a.bustCenter.dx(a.bustDartLeft)+a.bustDartRight.dx(a.bustSide)),t.set("sideSeamLength",(new i).move(a.waistSide).curve_(a.waistSideCp2,a.armhole).length()),t.set("backHemLength",a.waistCenter.dist(a.dartBottomLeft)+a.dartBottomRight.dist(a.waistSide)),t.set("sideReduction",a.armhole.x-a.waistSide.x),n.seam=(new i).move(a.cbNeck).curve_(a.cbNeckCp2,a.waistCenter).line(a.dartBottomLeft),g>0?n.seam.curve_(a.dartLeftCp,a.dartTip)._curve(a.dartRightCp,a.dartBottomRight):n.seam.line(a.dartBottomRight),n.seam.line(a.waistSide).curve_(a.waistSideCp2,a.armhole).curve(a.armholeCp2,a.armholePitchCp1,a.armholePitch).curve_(a.armholePitchCp2,a.shoulder).line(a.hps)._curve(a.cbNeckCp1,a.cbNeck).close().attr("class","fabric"),n.saBase=(new i).move(a.cbNeck).curve_(a.cbNeckCp2,a.waistCenter).line(a.dartBottomLeft).line(a.dartBottomRight).line(a.waistSide).curve_(a.waistSideCp2,a.armhole).curve(a.armholeCp2,a.armholePitchCp1,a.armholePitch).curve_(a.armholePitchCp2,a.shoulder).line(a.hps)._curve(a.cbNeckCp1,a.cbNeck).close().hide(),r("grainline",{from:new o(a.hps.x/2,a.shoulder.y),to:new o(a.hps.x/2,a.waistSide.y)}),e&&(n.sa=n.saBase.offset(e).attr("class","fabric sa")),t.cutlist.addCut({cut:2,from:"fabric",onFold:!0}),a.titleAnchor=new o(a.hps.x,a.armholePitchCp2.y),r("title",{nr:2,title:"back",at:a.titleAnchor}),r("sprinkle",{snippet:"bnotch",on:["armholePitch","bustCenter"]}),r("vd",{id:"hHemToWaistDartTop",from:a.waistCenter,to:a.dartTip,x:a.cbNeck.x-e-15}),r("vd",{id:"hHemToBackNeckCutout",from:a.waistCenter,to:a.cbNeck,x:a.cbNeck.x-e-30}),r("vd",{id:"hTotal",from:a.waistCenter,to:a.hps,x:a.cbNeck.x-e-45}
1),r("hd",{id:"wCbTopToCnBottom",from:a.cbNeck,to:a.waistCenter,y:a.waistCenter.y+e+15});let C=0;return g>0&&(C=30,r("hd",{id:"wCbToWaistDartLeft",from:a.cbNeck,to:a.dartBottomLeft,y:a.waistCenter.y+e+30}),r("hd",{id:"wCbToWaistDartRight",from:a.cbNeck,to:a.dartBottomRight,y:a.waistCenter.y+e+45}),r("hd",{id:"wWaistDart",from:a.dartBottomLeft,to:a.dartBottomRight,y:a.waistCenter.y+e+15})),r("hd",{id:"wCbToHemEdge",from:a.cbNeck,to:a.waistSide,y:a.waistCenter.y+e+30+C}),r("hd",{id:"wTotal",from:a.cbNeck,to:a.armhole,y:a.waistCenter.y+e+45+C}),r("vd",{id:"hHemRightToArmhole",from:a.waistSide,to:a.armhole,x:a.armhole.x+e+15}),r("vd",{id:"hHemRightToArmholePitch",from:a.waistSide,to:a.armholePitch,x:a.armhole.x+e+30}),r("vd",{id:"hHemRightToArmholeShoulder",from:a.waistSide,to:a.shoulder,x:a.armhole.x+e+45}),r("vd",{id:"hTotal",from:a.waistSide,to:a.hps,x:a.armhole.x+e+60}),r("vd",{id:"hemRiseRight",from:a.waistCenter,to:a.waistSide,x:a.waistSide.x+e+15}),r("hd",{id:"wCbToHps",from:a.cbNeck,to:a.hps,y:a.hps.y-e-15}),r("hd",{id:"wCbToArmholePitch",from:a.cbNeck,to:a.armholePitch,y:a.hps.y-e-30}),r("hd",{id:"wCbToShoulder",from:a.cbNeck,to:a.shoulder,y:a.hps.y-e-45}),r("hd",{id:"wCbToArmhole",from:a.cbNeck,to:a.armhole,y:a.hps.y-e-60}),r("ld",{id:"shoulderLength",from:a.hps,to:a.shoulder,d:10+e}),d}},nt={name:"bella.frontSideDart",after:it,draft:({store:t,sa:e,Point:o,points:a,Path:i,paths:n,options:s,complete:r,macro:l,utils:c,measurements:p,log:d,part:h})=>{a.cfNeck=new o(0,p.neck*s.collarFactor),a.hps=new o(p.neck*s.neckWidthFront,0),a.cfNeckCp1=new o(.8*a.hps.x,a.cfNeck.y),a.hpsCp2=new o(a.hps.x,a.cfNeck.y/2);let m=p.shoulderSlope*(2-s.shoulderSlopeBack)*-1,f=p.shoulderToShoulder*(1+s.shoulderToShoulderEase)/2*s.frontShoulderWidth;a.shoulder=c.beamsIntersect(new o(f,0),new o(f,100),a.hps,a.hps.shift(m,85)),a.ex=a.shoulder.shift(180,10),a.armholePitch=new o(a.shoulder.x*s.acrossBackFactor,p.hpsToWaistBack*s.frontArmholePitchDepth);let u=p.hpsToWaistBack*s.armholeDepth+a.shoulder.y;a.armhole=new o(p.highBust/4*(1+s.chestEase)*s.highBustWidth,u),a.bust=new o(.5*p.bustSpan*(1+s.bustSpanEase),p.hpsToBust),a.armholeCp2=a.armhole.shift(180,40),a.armholePitchCp1=a.armholePitch.shift(-90,40),a.armholeCpTarget=c.beamsIntersect(a.armhole,a.armhole.shift(180,40),a.armholePitch,a.armholePitch.shift(-90,40)),a.armholeCp2=a.armhole.shiftFractionTowards(a.armholeCpTarget,s.frontArmholeCurvature),a.armholePitchCp1=a.armholePitch.shiftFractionTowards(a.armholeCpTarget,s.frontArmholeCurvature),a.armholePitchCp2=a.armholePitchCp1.rotate(180,a.armholePitch),a.armholePitchCp2.y<a.shoulder.y&&(a.armholePitchCp2.y=a.shoulder.y+a.shoulder.dy(a.armholePitch)/2),a.cfHem=new o(0,p.hpsToWaistFront),a.sideHem=new o(a.armhole.x,a.cfHem.y);let g=p.chest*(1+s.chestEase-s.fullChestEaseReduction)/2-t.get("bustWidthBack"),b=["armhole","armholeCp2","armholePitchCp1","bustB","sideHem"];a.bustA=a.bust.clone(),a.bustB=a.bust.clone(),a.bustSide=c.beamIntersectsY(a.armhole,a.sideHem,a.bust.y);let w=0,k=0;for(;a.bustSide.x<g&&w<80;){for(const t of b)a[t]=a[t].rotate(.5,a.armholePitch);k+=.5,a.bustSide=c.beamIntersectsY(a.armhole,a.sideHem,a.bust.y),w++}t.set("bustDartAngleSide",k),a.cfBust=new o(0,a.bust.y),a.pitchMax=c.beamsIntersect(a.armholePitchCp1,a.armholePitchCp2,a.armholePitch,a.armholePitch.shift(a.armholePitchCp1.angle(a.armholePitchCp2)-90,30)),a.armholePitch=a.armholePitch.shiftFractionTowards(a.pitchMax,.2),a.armholePitchCp1=a.armholePitch.shiftFractionTowards(a.armholePitchCp2.rotate(180,a.armholePitch),.8);const C=t.get("sideSeamLength"),v=C*s.bustDartMinimumFabric;a.bustDartTop=c.beamsIntersect(a.armhole,a.sideHem,a.bust,a.bust.shift(Number(s.bustDartAngle),100)),a.bustDartTop.y<a.armhole.y+v&&(a.bustDartTop=a.armhole.shiftTowards(a.sideHem,v),d.info(h.name+": Restricted bust dart angle to ensure minimum fabric above the bust dart.")),a.armhole.dist(a.bustDartTop)>C-v&&(a.bustDartTop=a.armhole.shiftTowards(a.sideHem,C-v),d.info(h.name+": Restricted bust dart angle to ensure minimum fabric below the bust dart.")),a.bustDartBottom=a.bustDartTop.rotate(-1*k,a.bust),a.bustDartMiddle=a.bustDartTop.shiftFractionTowards(a.bustDartBottom,.5),a.bustDartTip=a.bustDartMiddle.shiftFractionTowards(a.bust,s.bustDartLength),a.bustDartEdge=c.beamsIntersect(a.bust,a.bustDartMiddle,a.armhole,a.bustDartTop),a.bustDartCpTop=a.bust.shiftFractionTowards(a.bustDartTop,.666).rotate(5*s.bustDartCurve,a.bust),a.bustDartCpBottom=a.bust.shiftFractionTowards(a.bustDartBottom,.666).rotate(-5*s.bustDartCurve,a.bust);const y=C-a.armhole.dist(a.bustDartTop);a.sideHemInitial=a.bustDartBottom.shift(-90,y).shift(180,t.get("sideReduction")),a.sideHem=a.bustDartBottom.shiftTowards(a.sideHemInitial,y);let T=p.waist/2*(1+s.waistEase)-t.get("backHemLength"),x=a.cfHem.dist(a.sideHemInitial)-T,B=!0;x<=0&&(B=!1,d.info("`"+h.name+"`: Front waist dart omitted (because the calculated dart width was 0.0 mm/inches or less).")),a.waistDartHem=new o(a.bust.x,a.cfHem.y),a.waistDartLeft=a.waistDartHem.shift(180,x/2),a.waistDartRight=a.waistDartHem.shift(0,x/2),a.waistDartTip=a.waistDartHem.shiftFractionTowards(a.bust,s.waistDartLength),a.waistDartLeftCp=a.waistDartLeft.shift(90,a.waistDartHem.dist(a.bust)/2),a.waistDartRightCp=a.waistDartRight.shift(90,a.waistDartHem.dist(a.bust)/2),a.waistDartLeftMid=(new i).move(a.bust).line(a.waistDartLeft).shiftFractionAlong(.5),a.waistDartRightMid=(new i).move(a.bust).line(a.waistDartRight).shiftFractionAlong(.5);const S=a.waistDartLeftMid.dist(a.waistDartLeftCp)*s.waistDartCurve;a.waistDartLeftCp.x=a.waistDartLeftMid.x-S,a.waistDartRightCp.x=a.waistDartRightMid.x+S,n.seam=(new i).move(a.cfHem),B&&n.seam.line(a.waistDartLeft).curve_(a.waistDartLeftCp,a.waistDartTip)._curve(a.waistDartRightCp,a.waistDartRight).line(a.waistDartRight),n.seam.line(a.sideHem).line(a.bustDartBottom)._curve(a.bustDartCpBottom,a.bustDartTip).curve_(a.bustDartCpTop,a.bustDartTop).line(a.armhole).curve(a.armholeCp2,a.armholePitchCp1,a.armholePitch).curve_(a.armholePitchCp2,a.shoulder).line(a.hps).curve(a.hpsCp2,a.cfNeckCp1,a.cfNeck).line(a.cfHem).close().attr("class","fabric"),n.saBase=(new i).move(a.cfHem),B&&n.saBase.line(a.waistDartLeft).line(a.waistDartRight),n.saBase.line(a.sideHem).line(a.bustDartBottom).line(a.bustDartEdge).line(a.bustDartTop).line(a.armhole).curve(a.armholeCp2,a.armholePitchCp1,a.armholePitch).curve_(a.armholePitchCp2,a.shoulder).line(a.hps).curve(a.hpsCp2,a.cfNeckCp1,a.cfNeck).hide(),r&&(n.dart=(new i).move(a.bustDartTop).line(a.bustDartEdge).line(a.bustDartBottom).attr("class","help")),e&&(n.sa=n.saBase.offset(e).line(a.cfNeck).attr("class","fabric sa"),n.sa=n.sa.move(a.cfHem).line(n.sa.start())),t.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),l("cutonfold",{from:a.cfNeck,to:a.cfHem,grainline:!0,reverse:!0}),a.titleAnchor=new o(a.armholePitch.x/2,a.armholePitchCp2.y),l("title",{at:a.titleAnchor,nr:1,title:"front"}),a.scaleboxAnchor=a.titleAnchor.shift(-90,70),l("scalebox",{at:a.scaleboxAnchor}),l("sprinkle",{snippet:"notch",on:["bust","armholePitch","cfBust"]});let L=0;return B&&(L=15,l("vd",{id:"hCfHemToWaistDartTop",from:a.cfHem,to:a.waistDartTip,x:-15})),l("vd",{id:"hCfHemToBustPoint",from:a.cfHem,to:a.bust,x:-15-L}),l("vd",{id:"hCfHemToNeckCutout",from:a.cfHem,to:a.cfNeck,x:-30-L}),l("vd",{id:"hTotal",from:a.cfHem,to:a.hps,x:-45-L}),l("hd",{id:"wCfToWaistDartTip",from:a.cfBust,to:a.bust,y:a.bust.y-15}),l("hd",{id:"wCfToBustDartTip",from:a.cfBust,to:a.bustDartTip,y:a.bust.y-30}),L=0,B&&(L=30,l("hd",{id:"wCfToWaistDartLeft",from:a.cfHem,to:a.waistDartLeft,y:a.cfHem.y+e+15}),l("hd",{id:"wCfToWaistDartRight",from:a.cfHem,to:a.waistDartRight,y:a.cfHem.y+e+30})),l("hd",{id:"wHemTotal",from:a.cfHem,to:a.sideHem,y:a.cfHem.y+e+15+L}),l("hd",{id:"wCfHemToBustDartBottom",from:a.cfHem,to:a.bustDartBottom,y:a.cfHem.y+e+30+L}),l("hd",{id:"wCfHemToBustDartTop",from:a.cfHem,to:a.bustDartTop,y:a.cfHem.y+e+45+L}),l("vd",{id:"hHemRightToBustDartBottom",from:a.sideHem,to:a.bustDartBottom,x:a.bustDartTop.x+e+15}),l("vd",{id:"hHemRightToBustDartTop",from:a.sideHem,to:a.bustDartTop,x:a.bustDartTop.x+e+30}),l("vd",{id:"hHemRightToArmhole",from:a.sideHem,to:a.armhole,x:a.bustDartTop.x+e+45}),l("vd",{id:"hHemRightToArmholePitch",from:a.sideHem,to:a.armholePitch,x:a.bustDartTop.x+e+60}),l("vd",{id:"hHemRightToShoulder",from:a.sideHem,to:a.shoulder,x:a.bustDartTop.x+e+75}),l("hd",{id:"wCbToHps",from:a.cfNeck,to:a.hps,y:a.hps.y-e-15}),l("hd",{id:"wCbToArmholePitch",from:a.cfNeck,to:a.armholePitch,y:a.hps.y-e-30}),l("hd",{id:"wCbToShoulder",from:a.cfNeck,to:a.shoulder,y:a.hps.y-e-45}),l("hd",{id:"wCbToArmhole",from:a.cfNeck,to:a.armhole,y:a.hps.y-e-60}),h}},st={en:JSON.parse('{"t":"Bella body block","d":"Bella is a basic body block for people with breasts.","p":{"back":"Back","frontSideDart":"Front"},"s":{"cbSeamBustBelowWaist.t":"Bust height compromised at center back","cbSeamBustBelowWaist.d":"No solution was found to place the bust point above the waist line on the center back seam. As a compromise, we\'ve used the waist height instead. \\n\\nPlease verify your measurements before contacting support.","sideSeamBustBelowWaist.t":"Bust height compromised at side seam","sideSeamBustBelowWaist.d":"No solution was found to place the bust point above the waist line on the side seam. As a compromise, we\'ve used the waist height instead. \\n\\nPlease verify your measurements before contacting support.","bustDartCompromise.t":"Bust dart tip compromised","bustDartCompromise.d":"No solution was found to adjust the bust dart. As a compromise we are using the bust draft as initially drafted.\\n\\nPlease verify your measurements before contacting support."},"o":{"chestEase":{"t":"Chest ease","d":"Controls the amount of ease at the fullest part of your chest"},"waistEase":{"t":"Waist ease","d":"Controls the amount of ease at your waist"},"bustSpanEase":{"t":"Bust span ease","d":"Controls the amount of (horizontal) ease added to your bust span when locating the bust point."},"shoulderToShoulderEase":{"t":"Shoulder to Shoulder ease","d":"Controls the amount of ease between your shoulders. Initially set to -.5% because Bella implements a block that is used in the industry."},"fullChestEaseReduction":{"t":"Full chest ease reduction","d":"Allows you to independently reduce the ease around the chest to make it fit tight(er) in that area"},"backDartHeight":{"t":"Back dart height","d":"Controls the height of the back dart"},"bustDartLength":{"t":"Bust dart length","d":"Controls the length of the bust dart"},"waistDartLength":{"t":"Waist dart length","d":"Controls the length of the waist dart"},"bustDartCurve":{"t":"Bust dart curve","d":"Controls the curvature of the bust dart"},"bustDartAngle":{"t":"Bust dart angle","d":"The angle of the bust dart"},"bustDartMinimumFabric":{"t":"Bust dart minimum fabric","d":"The minimum amount of side seam above and below the bust dart"}
1,"waistDartCurve":{"t":"Waist dart curve","d":"Controls the curvature of the waist dart"},"armholeDepth":{"t":"Armhole depth","d":"Controls the depth of the armhole"},"backArmholeSlant":{"t":"Back armhole slant","d":"Slightly rotates the armhole around its pitch point"},"frontArmholeCurvature":{"t":"Front armhole curvature","d":"Controls how deep the armhole is scooped out at the front bottom"},"backArmholeCurvature":{"t":"Back armhole curvature","d":"Controls how deep the armhole is scooped out at the back bottom"},"frontArmholePitchDepth":{"t":"Front armhole pitch depth","d":"Tweaks the horizontal placement of the front armhole pitch point"},"backArmholePitchDepth":{"t":"Back armhole pitch depth","d":"Tweaks the horizontal placement of the back armhole pitch point"},"backNeckCutout":{"t":"Back neck cutout","d":"Controls how deep the neck opening is scooped out at at the back"},"backHemSlope":{"t":"Back hem slope","d":"Controls the slope of the hem at the back"},"frontShoulderWidth":{"t":"Front shoulder width","d":"Controls the narrowness of the front shoulders relative to the back"},"highBustWidth":{"t":"High bust width","d":"Allows you to tweak the high bust width at the front"}}}')},rt=new n.pT({data:at,parts:[it,nt]}),lt={name:"bee.neckTie",measurements:["underbust","hpsToBust","hpsToWaistFront"],options:{ties:{bool:!0,menu:"style"},crossBackTies:{bool:!1,menu:"style"},bandLength:{pct:85,min:75,max:90,menu:"style"},neckTieLength:{pct:80,min:70,max:100,menu:"style"},neckTieWidth:{pct:6,min:2,max:18,snap:6.35,menu:"style",...(0,n.Wx)("bustSpan")},pointedNeckTieEnds:{bool:!1,menu:"style"},duoNeckTieColours:{bool:!1,menu:"style"},reversible:{bool:!1,menu:"style"}},draft:({store:t,sa:e,Point:o,points:a,Path:i,paths:n,options:s,units:r,paperless:l,macro:c,measurements:p,expand:d,absoluteOptions:h,part:m})=>{s.reversible&&(s.duoNeckTieColours=!0);const f=s.crossBackTies?Math.sqrt(Math.pow(p.hpsToWaistFront,2)+Math.pow(.5*(p.underbust*s.bandLength-.5*p.underbust),2))*(1+s.neckTieLength):p.hpsToBust*(1+s.neckTieLength),u=s.duoNeckTieColours?h.neckTieWidth:2*h.neckTieWidth;if(t.set("neckTieLength",f),!d&&!s.pointedNeckTieEnds||!s.ties){const o=e?2*e:0;return t.flag.note({msg:"bee:cutNeckTie",notes:[e?"flag:saIncluded":"flag:saExcluded"],replace:{width:r(u+o),length:r(f)}}),m.hide()}return a.topLeft=new o(0,0),a.topRight=new o(u,a.topLeft.y),a.bottomLeft=new o(a.topLeft.x,f),a.bottomRight=new o(a.topRight.x,a.bottomLeft.y),a.topMid=new o(u/2,a.topLeft.y),a.bottomMid=new o(a.topMid.x,a.bottomLeft.y),a.topPeak=s.pointedNeckTieEnds?s.duoNeckTieColours?a.topRight.shift(90,u):a.topMid.shift(90,u/2):a.topMid,n.seam=(new i).move(a.bottomLeft).line(a.bottomRight).line(a.topRight).line(a.topPeak).line(a.topLeft).line(a.bottomLeft).close().addClass("fabric"),e&&(n.sa=n.seam.offset(e).close().addClass("fabric sa")),a.grainlineFrom=a.topLeft.shift(0,h.neckTieWidth/2),a.grainlineTo=new o(a.grainlineFrom.x,a.bottomLeft.y),c("grainline",{from:a.grainlineFrom,to:a.grainlineTo}),t.cutlist.addCut({cut:2,from:"fabric",identical:"true"}),s.duoNeckTieColours&&t.cutlist.addCut({cut:2,from:"contrast",identical:"true"}),a.title=a.topLeft.translate(h.neckTieWidth/8,a.bottomLeft.y/4),c("title",{at:a.title,nr:2,title:"neckTie",scale:.2}),s.duoNeckTieColours||(n.foldline=(new i).move(a.topPeak).line(a.bottomMid).addText("foldLine","center fill-note text-sm").attr("class","note help")),l&&(c("vd",{from:a.topLeft,to:a.bottomLeft,x:a.topLeft.x-e-15,id:"vd0"}),c("hd",{from:a.bottomLeft,to:a.bottomRight,y:a.bottomLeft.y+e+15,id:"hd0"}),s.pointedNeckTieEnds&&(c("vd",{from:a.topPeak,to:a.topLeft,x:a.topLeft.x-e-15,id:"vdP0"}),c("vd",{from:a.topPeak,to:a.bottomLeft,x:a.topLeft.x-e-30,id:"vdP1"}),s.duoNeckTieColours||c("hd",{from:a.topLeft,to:a.topPeak,y:a.topPeak.y-e-15,id:"hdP0"}))),m}},ct={name:"bee.cup",from:nt,hide:{from:!0,inherited:!0},after:lt,measurements:["bustPointToUnderbust"],options:{backArmholeCurvature:.63,backArmholePitchDepth:.35,backArmholeSlant:5,frontArmholeCurvature:.63,bustDartCurve:1,bustDartLength:1,waistDartLength:1,backHemSlope:2.5,backNeckCutout:.06,bustDartAngle:0,waistDartCurve:1,bustDartMinimumFabric:.05,topDepth:{pct:54,min:50,max:80,menu:"fit"},bottomCupDepth:{pct:8,min:0,max:20,menu:"fit"},sideDepth:{pct:20.6,min:0,max:30,menu:"fit"},sideCurve:{pct:0,min:-50,max:50,menu:"fit"},frontCurve:{pct:0,min:-50,max:50,menu:"fit"},bellaGuide:{bool:!1,menu:"fit"}
1,bandTieLength:{pct:35,min:30,max:50,menu:"style"},armholeDepth:{pct:44,min:38,max:46,menu:"advanced"},frontArmholePitchDepth:{pct:29,max:31,min:27,menu:"advanced"},backDartHeight:{pct:46,min:38,max:54,menu:"advanced"},frontShoulderWidth:{pct:95,max:98,min:92,menu:"advanced"},highBustWidth:{pct:86,max:92,min:80,menu:"advanced"}},draft:({store:t,sa:e,points:o,Point:a,Path:i,paths:n,options:s,macro:r,utils:l,measurements:c,snippets:p,Snippet:d,absoluteOptions:h,paperless:m,expand:f,part:u})=>{for(const k in n)delete n[k];for(const k in p)delete p[k];r("rmtitle"),r("rmscalebox"),r("rmcutonfold");const g=c.bustPointToUnderbust*(1+s.bottomCupDepth),b=s.crossBackTies?0:h.bandTieWidth;o.bustDartClosed=o.bustDartTop;const w=["waistDartRightCp","waistDartRight","sideHemInitial"];for(const k of w)o[k]=o[k].rotate(t.get("bustDartAngleSide"),o.bust);return o.sideHem=l.beamsIntersect(o.waistDartRight,o.sideHemInitial,o.armhole,o.bustDartClosed),s.bellaGuide&&(n.bellaGuide=(new i).move(o.sideHem).line(o.bustDartTop).line(o.armhole).curve(o.armholeCp2,o.armholePitchCp1,o.armholePitch).curve_(o.armholePitchCp2,o.shoulder).line(o.hps).curve(o.hpsCp2,o.cfNeckCp1,o.cfNeck).line(o.cfHem).line(o.waistDartLeft).line(o.bust).line(o.waistDartRight).line(o.sideHem).addClass("various lashed").close()),o.topMid=o.bust.shiftTowards(o.hps,c.hpsToBust*s.topDepth),o.topLeft=o.topMid.shift(o.topMid.angle(o.hps)+90,h.neckTieWidth/2),o.topRight=o.topMid.shift(o.topMid.angle(o.hps)-90,h.neckTieWidth/2),o.leftDart=o.bust.shiftTowards(o.waistDartLeft,g),o.rightDart=o.bust.shiftTowards(o.waistDartRight,g),o.bottomLeft=l.beamsIntersect(o.leftDart,o.bust.rotate(90,o.leftDart),o.cfNeck,o.cfHem),o.bottomRightAnchor=l.beamsIntersect(o.rightDart,o.bust.rotate(-90,o.rightDart),o.armhole,o.sideHem),o.bottomRight=o.bottomRightAnchor.shiftFractionTowards(o.rightDart,s.sideDepth),o.sideEdge=o.bottomRight.shift(o.armhole.angle(o.sideHem),b),o.frontEdge=o.bottomLeft.shift(o.cfNeck.angle(o.cfHem),b),o.bottomDart=o.bust.shift(o.bust.angle(o.leftDart)+(o.bust.angle(o.rightDart)-o.bust.angle(o.leftDart))/2,o.bust.dist(o.leftDart)),o.dartEdge=o.bust.shiftOutwards(o.bottomDart,b),o.frontEdgeCp2=l.beamsIntersect(o.dartEdge,o.dartEdge.shift(o.bust.angle(o.bottomDart)-90,10),o.cfNeck,o.cfHem),o.sideEdgeCp2Target=l.beamsIntersect(o.dartEdge,o.dartEdge.shift(o.bust.angle(o.bottomDart)+90,10),o.armhole,o.sideHem),o.frontEdgeCp2=o.dartEdge.shiftFractionTowards(o.frontEdgeCp2,.5),o.sideEdgeCp1=o.dartEdge.shiftFractionTowards(o.sideEdgeCp2Target,.5),o.middleSideFront=o.bottomRight.shiftFractionTowards(o.topRight,.5),o.bottomRightCp2=o.middleSideFront.shiftFractionTowards(o.bust,s.sideCurve),o.middleFront=o.topLeft.shiftFractionTowards(o.bottomLeft,.5),o.bottomLeftCp1=o.middleFront.shiftFractionTowards(o.bust,s.frontCurve),o.bottomLeftCp2=o.frontEdgeCp2.shiftTowards(o.topMid,b),o.bottomRightCp1=o.sideEdgeCp1.shiftTowards(o.topMid,b),n.seam=(new i).move(o.sideEdge).line(o.bottomRight).curve_(o.bottomRightCp2,o.topRight).line(o.topLeft).curve_(o.bottomLeftCp1,o.bottomLeft).line(o.frontEdge).curve_(o.frontEdgeCp2,o.dartEdge).curve_(o.sideEdgeCp1,o.sideEdge).close().addClass("fabric"),e&&(n.sa=n.seam.offset(e).close().addClass("fabric sa")),s.crossBackTies&&(o.leftSplit=l.lineIntersectsCurve(o.bust,o.waistDartLeft,o.frontEdge,o.frontEdgeCp2,o.dartEdge,o.dartEdge),o.rightSplit=l.lineIntersectsCurve(o.bust,o.waistDartRight,o.dartEdge,o.sideEdgeCp1,o.sideEdge,o.sideEdge),n.bottomCurve=(new i).move(o.bottomLeft).line(o.frontEdge).curve_(o.frontEdgeCp2,o.dartEdge).curve_(o.sideEdgeCp1,o.sideEdge).hide(),t.set("cupWidth",n.bottomCurve.split(o.leftSplit)[0].length()+n.bottomCurve.split(o.rightSplit)[1].length())),o.grainlineFrom=o.topMid.shiftFractionTowards(o.bust,.05),o.grainlineTo=o.bust.shiftFractionTowards(o.topMid,.05),r("grainline",{from:o.grainlineFrom,to:o.grainlineTo}),s.reversible?(t.cutlist.setCut({cut:2,from:"fabric"}),t.cutlist.addCut({cut:2,from:"contrast"})):t.cutlist.setCut({cut:4,from:"fabric"}),n.frontCurve=(new i).move(o.topLeft).curve_(o.bottomLeftCp1,o.bottomLeft).hide(),o.frontNotch=n.frontCurve.shiftFractionAlong(.5),r("sprinkle",{snippet:"notch",on:["frontNotch","bottomLeft","bottomRight"]}),s.crossBackTies||(r("sprinkle",{snippet:"notch",on:["frontEdge","sideEdge"]}),n.casingline=(new i).move(o.bottomLeft).curve_(o.bottomLeftCp2,o.bottomDart).curve_(o.bottomRightCp1,o.bottomRight).addClass("fabric lashed").addText("bee:casingStitchingLine","center")),o.title=o.bottomLeftCp1.shiftFractionTowards(o.bottomRight,.5),r("title",{at:o.title,nr:1,title:"cup",scale:.7}),o.scalebox=new a(o.bottomLeft.x+12.7,o.topLeft.y+12.7),r("miniscale",{at:o.scalebox}),o.logo=o.bust.shiftFractionTowards(o.bottomDart,.5),p.logo=new d("logo",o.logo).attr("data-scale",.7),s.ties&&f||(o.neckTieLength=o.topLeft.shiftFractionTowards(o.bottomLeft,.7).addText("Neck Tie Length: "+l.units(t.get("neckTieLength"))),s.crossBackTies||(o.backTieLength=o.topLeft.shiftFractionTowards(o.bottomLeft,.8).addText("Band Tie Length: "+l.units(c.underbust*(1+s.bandTieLength))))),m&&(r("vd",{from:o.bottomLeft,to:n.seam.bbox().bottomRight,x:o.bottomLeft.x-e-15,id:"vd0"}),r("vd",{from:o.topMid,to:o.bottomLeft,x:o.bottomLeft.x-e-15,id:"vd1"}),r("vd",{from:o.topRight,to:n.seam.bbox().bottomRight,x:o.bottomLeft.x-e-30,id:"vd3"}),r("vd",{from:o.topRight,to:o.bottomRight,x:o.sideEdge.x+e+15,id:"vd4"}),r("vd",{from:o.sideEdge,to:n.seam.bbox().bottomRight,x:o.sideEdge.x+e+15,id:"vd5"}),r("vd",{from:o.topRight,to:n.seam.bbox().bottomRight,x:o.sideEdge.x+e+30,id:"vd6"}),r("vd",{from:o.topMid,to:o.dartEdge,x:o.topMid.x,id:"vd7"}),r("hd",{from:o.bottomLeft,to:o.topLeft,y:o.topLeft.y-e-15,id:"hd0"}),r("hd",{from:o.topLeft,to:o.topRight,y:o.topRight.y-e-30,id:"hd1"}),r("hd",{from:o.topRight,to:o.bottomRight,y:o.topRight.y-e-15,id:"hd2"}),r("hd",{from:o.bottomLeft,to:o.sideEdge,y:o.topRight.y-e-45,id:"hd3"}),r("hd",{from:o.topMid,to:o.dartEdge,y:o.dartEdge.y,id:"hd4"}),r("hd",{from:o.frontEdge,to:o.dartEdge,y:o.dartEdge.y+e+15,id:"hd5"}),r("hd",{from:o.dartEdge,to:n.seam.bbox().bottomRight,y:o.dartEdge.y+e+15,id:"hd6"}),r("hd",{from:o.frontEdge,to:n.seam.bbox().bottomRight,y:o.dartEdge.y+e+30,id:"hd7"}),r("ld",{from:o.topLeft,to:o.topRight,d:e+15,id:"ld0"}),r("ld",{from:o.topMid,to:o.dartEdge,id:"ld1"}),s.crossBackTies||(r("vd",{from:o.bottomLeft,to:o.frontEdge,x:o.bottomLeft.x-e-15,id:"vdC0"}),r("vd",{from:o.bottomRight,to:o.sideEdge,x:o.sideEdge.x+e+15,id:"vdC1"}),r("hd",{from:o.bottomRight,to:o.sideEdge,y:o.topRight.y-e-15,id:"hdC0"}))),u}},pt={name:"bee.bandTie",after:ct,options:{bandTieWidth:{pct:3,min:1,max:9,snap:6.35,...(0,n.Wx)("hpsToWaistFront"),menu:"style"},pointedBandTieEnds:{bool:!1,menu:"style"},duoBandTieColours:{bool:!1,menu:"style"}}
1,draft:({store:t,sa:e,Point:o,points:a,Path:i,paths:n,options:s,macro:r,measurements:l,snippets:c,expand:p,Snippet:d,paperless:h,utils:m,absoluteOptions:f,part:u})=>{s.reversible&&(s.duoBandTieColours=!0);const g=s.crossBackTies?l.underbust*s.bandLength/2+2*s.neckTieWidth:l.underbust*(1+s.bandTieLength)/2,b=s.crossBackTies||!s.duoBandTieColours?2*f.bandTieWidth:f.bandTieWidth;if(!((p||s.pointedBandTieEnds)&&s.ties||s.crossBackTies)){const o=e?2*e:0;return t.flag.note({msg:"bee:cutBandTie",notes:[e?"flag:saIncluded":"flag:saExcluded"],replace:{width:m.units(b+o),length:m.units(2*g)}}),u}return a.topLeft=new o(0,0),a.topRight=new o(b,a.topLeft.y),a.bottomLeft=new o(a.topLeft.x,g),a.bottomRight=new o(a.topRight.x,a.bottomLeft.y),a.topMid=new o(a.topRight.x/2,a.topLeft.y),a.bottomMid=new o(a.topMid.x,a.bottomLeft.y),a.topPeak=s.crossBackTies||!s.pointedBandTieEnds?a.topMid:s.duoBandTieColours?a.topRight.shift(90,b):a.topMid.shift(90,b/2),n.seam=(new i).move(a.bottomRight).line(a.topRight).line(a.topPeak).line(a.topLeft).line(a.bottomLeft).close().addClass("fabric"),e&&(n.sa=n.seam.offset(e).close().addClass("fabric sa")),a.cutOnFoldFrom=a.bottomLeft,a.cutOnFoldTo=a.bottomRight,r("cutonfold",{from:a.cutOnFoldFrom,to:a.cutOnFoldTo,grainline:!0}),t.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),s.duoBandTieColours&&!s.crossBackTies&&t.cutlist.addCut({cut:1,from:"contrast",onFold:!0}),s.crossBackTies&&(a.sideNotchLeft=a.bottomLeft.shift(90,t.get("cupWidth")),a.sideNotchRight=a.sideNotchLeft.flipX(a.topMid),r("sprinkle",{snippet:"notch",on:["bottomRight","sideNotchLeft","sideNotchRight"]})),a.title=a.topLeft.translate(b/8,g/4),r("title",{at:a.title,nr:3,title:s.crossBackTies?"band":"bandTie",scale:.5}),!s.crossBackTies&&s.duoBandTieColours||(n.foldline=(new i).move(a.topPeak).line(a.bottomMid).addText("foldLine","center fill-note text-sm").addClass("note help")),h&&(r("vd",{from:a.topLeft,to:a.bottomLeft,x:a.topLeft.x-e-15,id:"vd0"}),r("hd",{from:a.bottomLeft,to:a.bottomRight,y:a.bottomLeft.y+e+15,id:"hd0"}),s.pointedBandTieEnds&&!s.crossBackTies&&(r("vd",{from:a.topPeak,to:a.topLeft,x:a.topLeft.x-e-15,id:"vdP0"}),r("vd",{from:a.topPeak,to:a.bottomLeft,x:a.topLeft.x-e-30,id:"vdP1"}),s.duoBandTieColours||r("hd",{from:a.topLeft,to:a.topPeak,y:a.topPeak.y-e-15,id:"hdP0"}))),u}},dt={en:JSON.parse('{"t":"Bee bikini top","d":"Bee is a bikini top","p":{"bandTie":"Band Tie","cup":"Cup","neckTie":"Neck Tie"},"s":{"casingStitchingLine":"Sew down casing here","cutBandTie.t":"The band ties are not shown","cutBandTie.d":"The **band ties** are {{{ width }}} wide and {{{ length }}} long.","cutNeckTie.t":"The neck ties are not shown","cutNeckTie.d":"The **neck ties** are {{{ width }}} wide and {{{ length }}} long."},"o":{"chestEase":{"t":"Chest ease","d":"Controls the chest ease in the underlying Bella block Bee is based on"},"waistEase":{"t":"Waist ease","d":"Controls the waist ease in the underlying Bella block Bee is based on"},"bustSpanEase":{"t":"Bust span ease","d":"Controls the bust span ease in the underlying Bella block Bee is based on"},"topDepth":{"t":"Top Depth","d":"Controls how far the bikini cup extends upwards"},"bottomCupDepth":{"t":"Bottom depth","d":"Controls how far the bikini cup extends downwards"},"sideDepth":{"t":"Side depth","d":"Controls how far the bikini cup extends towards the side"},"sideCurve":{"t":"Side curve","d":"Controls the curvature of the side of the bikini cup"},"frontCurve":{"t":"Front curve","d":"Controls the curvature of the front of the bikini cup"},"bellaGuide":{"t":"Show Bella outline","d":"Do you want the pattern to show the outline of the Bella block Bee is based on?"},"bellaGuideYes":{"t":"Show Bella","d":"Shows the outline of the Bella block"},"bellaGuideNo":{"t":"Do not show Bella","d":"Only shows the final Bee pattern"},"ties":{"t":"Ties","d":"Whether to includes ties on the pattern"},"tiesYes":{"t":"With ties","d":"Draft a pattern including ties"},"tiesNo":{"t":"Without ties","d":"Draft a pattern without ties"},"bandTieWidth":{"t":"Band (chest) tie width","d":"Controls the width of the ties around your chest"},"bandTieLength":{"t":"Band (chest) tie length","d":"Controls the length of the ties around your chest"},"pointedBandTieEnds":{"t":"Pointed band tie ends","d":"Enable this options if you prefer band tie ends to be pointy, rather than straight"},"pointedBandTieEndsYes":{"t":"Pointy band tie ends","d":"Make the band tie ends pointy"},"pointedBandTieEndsNo":{"t":"Straight band tie ends","d":"Make the band tie ends straight"},"pointedNeckTieEnds":{"t":"Pointed neck tie ends","d":"Enable this options if you prefer neck tie ends to be pointy, rather than straight"},"pointedNeckTieEndsYes":{"t":"Pointy neck tie ends","d":"Make the neck tie ends pointy"},"pointedNeckTieEndsNo":{"t":"Straight neck tie ends","d":"Make the neck tie ends straight"},"duoBandTieColours":{"t":"Duo-coloured band ties","d":"Enable this option to generate a pattern for bands using two band tie colours instead of one"},"duoBandTieColoursYes":{"t":"Two band tie colours","d":"Use two band tie colours for the ties"},"duoBandTieColoursNo":{"t":"Single band tie colour","d":"Use a single band tie colour for the ties"},"duoNeckTieColours":{"t":"Duo-coloured neck ties","d":"Enable this option to generate a pattern for bands using two neck tie colours instead of one"},"duoNeckTieColoursYes":{"t":"Two neck tie colours","d":"Use two neck tie colours for the ties"},"duoNeckTieColoursNo":{"t":"Single neck tie colour","d":"Use a single neck tie colour for the ties"},"neckTieWidth":{"t":"Neck tie width","d":"Controls the width of the ties around your chest"},"neckTieLength":{"t":"Neck tie length","d":"Controls the length of the ties around your chest"},"neckTieEnds":{"t":"Neck tie ends","d":"Whether you like straight or pointy ends on the ties around your chest"},"neckTieColours":{"t":"Neck tie colours","d":"Whether you want single color ties around your chest, or dual-coloured ones"},"crossBackTies":{"t":"Cross back ties","d":"Whether you\'d like to use the cross back tie variation of Bee"},"crossBackTiesYes":{"t":"Use cross back ties","d":"Generate a pattern for ties that cross your back"},"crossBackTiesNo":{"t":"Use regular ties","d":"Generate a pattern for the default ties"},"bandLength":{"t":"Band Length (Cross back ties)","d":"Controls the length of the band around your chest for the cross back ties variation of Bee"},"backDartHeight":{"t":"Back dart height (Bella)","d":"Controls the back dart height in the underlying Bella block Bee is based on"},"armholeDepth":{"t":"Armhole depth (Bella)","d":"Controls the armhole depth in the underlying Bella block Bee is based on"},"frontArmholePitchDepth":{"t":"Front armhole pitch depth (Bella)","d":"Controls the front armhole pitch depth in the underlying Bella block Bee is based on"},"frontShoulderWidth":{"t":"Front shoulder width (Bella)","d":"Controls the front shoulder width in the underlying Bella block Bee is based on"},"fullChestEaseReduction":{"t":"Full chest reduction (Bella)","d":"Controls the full chest reduction in the underlying Bella block Bee is based on"},"highBustWidth":{"t":"High bust width (Bella)","d":"Controls the high bust width in the underlying Bella block Bee is based on"},"shoulderToShoulderEase":{"t":"Shoulder to Shoulder ease (Bella)","d":"Controls the shoulder to shoulder ease in the underlying Bella block Bee is based on"},"reversible":{"t":"Reversible","d":"Whether you want to make a fully reversible Bee or not"},"reversibleYes":{"t":"Make it reversible","d":"Create a Bee that you can wear with both sides out, possibly using different fabrics"},"reversibleNo":{"t":"Do not make it reversible","d":"Create a Bee with where only one side is intended to be worn on the outside"}}}')},ht=new n.pT({data:ot,parts:[ct,lt,pt]}),mt=[...Object.keys(ct.options),...Object.keys(lt.options),...Object.keys(pt.options),"bustDartCurve","bustSpanEase","chestEase","fullChestEaseReduction","shoulderToShoulderEase","waistEase","backDartHeight","bustDartLength","waistDartLength","armholeDepth","backArmholeCurvature","backArmholePitchDepth","backArmholeSlant","frontArmholeCurvature","frontArmholePitchDepth","backHemSlope","backNeckCutout","frontShoulderWidth","highBustWidth"];for(const Eu of["reversible","duoColorTies","pointedTieEnds","crossBackTies","bellaGuide","ties"])mt.push(Eu+"Yes",Eu+"No");
1const ft=(0,n.D4)([st,dt],{o:{keep:mt}}),ut=JSON.parse('{"id":"benjamin","name":"Benjamin bow tie","code":"Wouter Van Wageningen","description":"A FreeSewing pattern for a bow tie","design":"Wouter Van Wageningen","difficulty":3,"tags":["accessories"],"techniques":["precision","interfacing"],"version":"4.6.0","pkg":"@freesewing/benjamin","collection":true}');const gt={name:"benjamin.base",hide:{self:!0},measurements:["neck"],options:{transitionLength:2,bandLength:.17,adjustmentRibbonWidth:20,collarEase:{pct:3,min:0,max:6,...(0,n.Wx)("neck"),menu:"fit"},adjustmentRibbon:{bool:!1,menu:"fit"},tipWidth:{pct:15,min:0,max:20,menu:"style"},knotWidth:{pct:7,min:5,max:10,menu:"style"},bowLength:{pct:28,min:23,max:33,menu:"style"},bowStyle:{dflt:"butterfly",list:["diamond","butterfly","square","widesquare"],menu:"style"},endStyle:{dflt:"straight",list:["straight","pointed","rounded"],menu:"style"},collarBandHeight:{pct:6,min:5,max:8,menu:"style"}},draft:function({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,utils:l,options:c,measurements:p,macro:d,part:h}){"square"===c.bowStyle&&(c.tipWidth=c.knotWidth);for(let C of["collarBandHeight","bandLength","tipWidth","knotWidth","bowLength","collarEase"])t.set(C,p.neck*c[C]);c.adjustmentRibbon&&t.set("collarBandHeight",Math.max(c.adjustmentRibbonWidth,t.get("collarBandHeight")));const m=t.get("collarBandHeight");t.set("knotWidth",Math.max(m,t.get("knotWidth")));const f=t.get("knotWidth");t.set("tipWidth",Math.max(f,t.get("tipWidth")));const u=t.get("tipWidth"),g=t.get("bandLength"),b=f*c.transitionLength,w=t.get("bowLength");if(a.bandBottomLeft=new o(0,m/2),a.bandTopLeft=a.bandBottomLeft.flipY(),a.bandBottomRight=a.bandBottomLeft.shift(0,g),a.bandTopRight=a.bandBottomRight.flipY(),a.transitionBottomRight=new o(g+b,f/2),a.transitionTopRight=a.transitionBottomRight.flipY(),a.tip1Bottom=new o(g+b+.5*w,u/2),a.tip1Top=a.tip1Bottom.flipY(),a.tip2Bottom=new o(g+b+1.5*w,u/2),a.tip2Top=a.tip2Bottom.flipY(),a.knotBottom=new o(g+b+w,f/2),a.knotTop=a.knotBottom.flipY(),"pointed"===c.endStyle||"rounded"===c.endStyle?a.tip=new o(a.tip2Bottom.x+a.tip2Bottom.y,0):a.tip=new o(a.tip2Bottom.x,0),a.titleAnchor=new o(a.tip1Top.x,0),n.cap=(new i).hide().move(a.tip2Bottom),"straight"===c.endStyle)n.cap=(new i).move(a.tip2Bottom).line(a.tip2Top);else if("pointed"===c.endStyle)n.cap=(new i).move(a.tip2Bottom).line(a.tip).line(a.tip2Top);else{a.roundBottom=new o(a.tip.x,a.tip2Bottom.y),a.roundTop=a.roundBottom.flipY();const t={bottom:d("round",{id:"bottom",from:a.tip2Bottom,to:a.tip,via:a.roundBottom,hide:!1}),top:d("round",{id:"top",from:a.tip,to:a.tip2Top,via:a.roundTop,hide:!1})};for(const e in t)for(const o of["start","cp1","cp2","end"])a[`${e}${l.capitalize(o)}`]=a[t[e].points[o]].copy();n.cap=n[t.top.paths.path].clone().reverse().join(n[t.bottom.paths.path].clone().reverse()).reverse()}if("diamond"===c.bowStyle||"butterfly"===c.bowStyle){const t="diamond"===c.bowStyle?w/10:w/4;a.transitionBottomRightCp2=a.bandBottomRight.shiftOutwards(a.transitionBottomRight,t),a.transitionBottomRightCp2.y>a.tip1Bottom.y&&(a.transitionBottomRightCp2.y=a.tip1Bottom.y),a.transitionTopRightCp1=a.transitionBottomRightCp2.flipY(),a.tip1TopCp2=a.tip1Top.shift(180,t),a.tip1TopCp1=a.tip1Top.shift(0,t),a.tip1BottomCp1=a.tip1Bottom.shift(180,t),a.tip1BottomCp2=a.tip1Bottom.shift(0,t),a.knotTopCp2=a.knotTop.shift(180,t),a.knotTopCp1=a.knotTop.shift(0,t),a.knotBottomCp2=a.knotBottom.shift(0,t),a.knotBottomCp1=a.knotBottom.shift(180,t),a.tip2TopCp2=a.tip2Top.shift(180,t),a.tip2BottomCp1=a.tip2Bottom.shift(180,t),n.bow=(new i).move(a.bandBottomRight).line(a.transitionBottomRight).curve(a.transitionBottomRightCp2,a.tip1BottomCp1,a.tip1Bottom).curve(a.tip1BottomCp2,a.knotBottomCp1,a.knotBottom).curve(a.knotBottomCp2,a.tip2BottomCp1,a.tip2Bottom).join(n.cap).line(a.tip2Top).curve(a.tip2TopCp2,a.knotTopCp1,a.knotTop).curve(a.knotTopCp2,a.tip1TopCp1,a.tip1Top).curve(a.tip1TopCp2,a.transitionTopRightCp1,a.transitionTopRight).line(a.bandTopRight).hide()}else n.bow=(new i).move(a.bandBottomRight).line(a.transitionBottomRight).line(a.tip2Bottom).join(n.cap).line(a.tip2Top).line(a.transitionTopRight).line(a.bandTopRight).hide();a.logoAnchor=a.tip.shift(180,20),r.logo=new s("logo",a.logoAnchor).attr("data-scale",u/120);let k=a.tip2Bottom.y+e+15;return d("hd",{id:"wEdgeToKnot",from:a.knotBottom,to:a.tip2Bottom,y:k}),k+=15,["butterfly","diamond"].includes(c.bowStyle)&&(d("hd",{id:"wEdgeToMidTip",from:a.tip1Bottom,to:a.tip2Bottom,y:k}),k+=15,d("vd",{id:"hMidTip",from:a.tip1Bottom,to:a.tip1Top})),d("hd",{id:"wEdgeToBandTransitionStart",from:a.transitionBottomRight,to:a.tip2Bottom,y:k}),k+=15,d("hd",{id:"wEdgeToBandTransitionEnd",from:a.bandBottomRight,to:a.tip2Bottom,y:k}),k+=15,t.set("baseY",k),d("vd",{id:"hBandTransitionEnd",from:a.bandBottomRight,to:a.bandTopRight}),d("vd",{id:"hBandTransitionStart",from:a.transitionBottomRight,to:a.transitionTopRight}),d("vd",{id:"hEdge",from:a.tip2Bottom,to:a.tip2Top,x:a.tip.x+15+e}),"straight"!==c.endStyle&&d("hd",{id:"wEdgeToStyledTip",from:a.tip2Bottom,to:a.tip,y:a.tip2Bottom.y+15+e}),h}};const bt={name:"benjamin.bow1",from:gt,draft:function({Point:t,points:e,Path:o,paths:a,macro:i,sa:n,store:s,options:r,part:l}){return e.bandBottomLeft=e.bandBottomLeft.shift(0,0),e.bandTopLeft=e.bandBottomLeft.flipY(),e.grainlineStart=new t(0,0),a.seam=(new o).move(e.bandTopLeft).line(e.bandBottomLeft).join(a.bow).line(e.bandTopLeft).close().attr("class","fabric").unhide(),n&&(a.sa=a.seam.offset(n).attr("class","fabric sa").unhide()),i("grainline",{from:e.grainlineStart,to:e.tip.shift(180,20)}),s.cutlist.addCut(r.adjustmentRibbon?[{cut:1,from:"fabric"},{cut:1,from:"interfacing"}]:[{cut:4,from:"fabric"},{cut:4,from:"interfacing"}]),i("title",{at:e.titleAnchor,nr:1,title:r.adjustmentRibbon?"Short Bow":"Bow",scale:s.get("tipWidth")/75}),e.scaleboxAnchor=e.bandTopLeft.shift(30,80),i("scalebox",{at:e.scaleboxAnchor}),i("hd",{id:"wFull",from:e.bandBottomLeft,to:e.tip2Bottom,y:s.get("baseY")}),l}};const wt={name:"benjamin.bow2",from:gt,draft:function({options:t,Point:e,points:o,Path:a,paths:i,macro:n,sa:s,store:r,part:l}){return t.adjustmentRibbon?(o.bandBottomLeft=o.bandBottomLeft.shift(180,90),o.bandTopLeft=o.bandBottomLeft.flipY(),o.grainlineStart=new e(-90,0),n("grainline",{from:o.grainlineStart,to:o.tip.shift(180,20)}),i.seam=(new a).move(o.bandTopLeft).line(o.bandBottomLeft).join(i.bow).line(o.bandTopLeft).close().attr("class","fabric").unhide(),s&&(i.sa=i.seam.offset(s).attr("class","fabric sa").unhide()),r.cutlist.addCut([{cut:2,from:"fabric"},{cut:2,from:"interfacing"}
1]),n("title",{at:o.titleAnchor,nr:2,title:"Medium Bow",scale:r.get("tipWidth")/75}),n("hd",{id:"wFull",from:o.bandBottomLeft,to:o.tip2Bottom,y:r.get("baseY")}),l):l.hide()}};const kt={name:"benjamin.bow3",from:gt,draft:function({options:t,Point:e,points:o,Path:a,paths:i,macro:n,sa:s,store:r,part:l}){return t.adjustmentRibbon?(o.bandBottomLeft=o.bandBottomLeft.shift(180,290),o.bandTopLeft=o.bandBottomLeft.flipY(),o.grainlineStart=new e(-290,0),i.seam=(new a).move(o.bandTopLeft).line(o.bandBottomLeft).join(i.bow).line(o.bandTopLeft).close().attr("class","fabric").unhide(),s&&(i.sa=i.seam.offset(s).attr("class","fabric sa").unhide()),r.cutlist.addCut([{cut:1,from:"fabric"},{cut:1,material:"interfacing"}]),n("grainline",{from:o.grainlineStart,to:o.tip.shift(180,20)}),n("title",{at:o.titleAnchor,nr:3,title:"Long Bow",scale:r.get("tipWidth")/75}),n("hd",{id:"wFull",from:o.bandBottomLeft,to:o.tip2Bottom,y:r.get("baseY")}),l):l.hide()}};const Ct={name:"benjamin.collarBand",after:gt,draft:function({Point:t,Path:e,measurements:o,store:a,options:i,macro:n,points:s,paths:r,sa:l,expand:c,utils:p,part:d}){if(i.adjustmentRibbon)return d.hide();const h={h:p.units(a.get("collarBandHeight")+2*l),l:p.units(o.neck*(1+i.collarEase)-2*a.get("knotWidth"))};return c?(s.bottomLeft=new t(0,.5*a.get("collarBandHeight")),s.topLeft=s.bottomLeft.flipY(),s.bottomRight=s.bottomLeft.shift(0,o.neck*(1+i.collarEase)-2*a.get("knotWidth")),s.topRight=s.bottomRight.flipY(),s.titleAnchor=s.topLeft.shiftFractionTowards(s.bottomRight,.5),r.seam=(new e).move(s.topLeft).line(s.bottomLeft).line(s.bottomRight).line(s.topRight).line(s.topLeft).close().attr("class","fabric"),l&&(r.sa=r.seam.offset(l).attr("class","fabric sa")),a.cutlist.addCut({cut:2,from:"fabric"}),a.cutlist.addCut({cut:2,from:"interfacing"}),n("title",{at:s.titleAnchor,nr:2,title:"collarBand",scale:.5}),n("hd",{id:"wFull",from:s.bottomLeft,to:s.bottomRight,y:s.bottomLeft.y+15+l}),n("vd",{id:"hFull",from:s.bottomRight,to:s.topRight,x:s.topRight.x+15+l}),d):(s.text=new t(10,10).addText("benjamin:cutCollarBand","fill-note").addText(":").addText(h.h).addText(" x ").addText(h.l),r.diag=(new e).move(new t(0,0)).line(new t(100,15)).addClass("hidden"),a.flag.note({msg:"benjamin:cutCollarBandFlag",notes:[l?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{height:h.h,length:h.l},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),a.flag.preset("expand"),d)}},vt={en:JSON.parse('{"t":"Benjamin bow tie","d":"Benjamin is a bow tie pattern with four different shape options.","p":{"base":"Base","bow1":"Bow","bow2":"Bow","bow3":"Bow","collarBand":"Collar band"},"s":{"cutRibbon":"Cut the adjustment ribbon:","cutCollarBandFlag.t":"The collar band is not shown","cutCollarBandFlag.d":"The **Collar band** are two strips of fabric {{ height }} wide and {{ length }} long."},"o":{"adjustmentRibbon":{"t":"Adjustment ribbon","d":"Whether or not to include an adjustment ribbon"},"adjustmentRibbonYes":{"t":"Include adjustment ribbon","d":"Generate a pattern with an adjustment ribbon included"},"adjustmentRibbonNo":{"t":"Exclude adjustment ribbon","d":"Generate a pattern without an adjustment ribbon included"},"bandLength":{"t":"Band length","d":"Length of the band"},"tipWidth":{"t":"Tip width","d":"Width of the tips"},"knotWidth":{"t":"Knot width","d":"Width of the knot"},"bowLength":{"t":"Bow length","d":"Length of the bow (when knotted)"},"bowStyle":{"t":"Bow style","d":"Style of the bow"},"bowStyle.diamond":{"t":"Diamond","d":"Use a diamond-shaped bow style"},"bowStyle.butterfly":{"t":"Butterfly","d":"Use a butterfly bow style"},"bowStyle.square":{"t":"Square","d":"Use a square bow style"},"bowStyle.widesquare":{"t":"Wide square","d":"Use a wide square bow style"},"endStyle":{"t":"End style","d":"Style of the bow ends"},"endStyle.straight":{"t":"Straight","d":"Use a straight style for the bow ends"},"endStyle.pointed":{"t":"Pointed","d":"Use a pointy style for the bow ends"},"endStyle.rounded":{"t":"Rounded","d":"Use a rounded style for the bow ends"},"collarEase":{"t":"Collar ease","d":"The amount of ease at your neck"},"collarBandHeight":{"t":"Collar band height","d":"The height (width if you will) of the collar band"}}}')}
1,yt=new n.pT({data:ut,parts:[bt,wt,kt,Ct]}),Tt=JSON.parse('{"id":"bent","name":"Bent body block","code":"Joost De Cock","description":"A FreeSewing pattern for a menswear body block with a two-part sleeve","design":"Joost De Cock","difficulty":3,"tags":["blocks","tops"],"techniques":["hem","curved-seam","set-sleeve"],"block":true,"version":"4.6.0","pkg":"@freesewing/bent","collection":true}'),xt={en:JSON.parse('{"t":"Bent body Block","d":"This two-part sleeve block is the basis of our coat and jacket patterns.","p":{},"s":{},"o":{}}')},Bt=new n.pT({data:Tt,parts:[I,N,B,S]}),St=(0,n.D4)([u,_,xt],{o:{drop:["sleevecapTopFactorX","sleevecapTopFactorY","sleevecapBackFactorX","sleevecapBackFactorY","sleevecapFrontFactorX","sleevecapFrontFactorY","sleevecapQ1Offset","sleevecapQ2Offset","sleevecapQ3Offset","sleevecapQ4Offset","sleevecapQ1Spread1","sleevecapQ1Spread2","sleevecapQ2Spread1","sleevecapQ2Spread2","sleevecapQ3Spread1","sleevecapQ3Spread2","sleevecapQ4Spread1","sleevecapQ4Spread2","sleeveWidthGuarantee"]}}),Lt=JSON.parse('{"id":"bibi","name":"Bibi body block","code":"Jonathan Haas","description":"A FreeSewing pattern for a knit top body block","design":"Jonathan Haas","difficulty":2,"tags":["blocks","tops"],"techniques":["curved-seam","hem","flat-sleeve"],"block":true,"version":"4.6.0","pkg":"@freesewing/bibi","collection":true}'),Pt={en:JSON.parse('{"t":"Bibi body block","d":"Bibi is a multifunctional building block for knit tops and dresses.","p":{"back":"Back","front":"Front","sleeve":"Sleeve","waistband":"Waistband","cuff":"Cuff","neckBinding":"Neck Binding","armholeBinding":"Armhole Binding"},"s":{"dartNo.t":"No bust dart","dartNo.d":"Gather fabric instead","dartYes.t":"Create a bust dart","dartYes.d":"If necessary, draft a bust dart to match side seam lengths","sleevesNo.t":"Sleeveless","sleevesNo.d":"Draft the pattern without sleeves","sleevesYes.t":"With sleeves","sleevesYes.d":"Draft the pattern with sleeves","fitWaistNo.t":"Don\'t fit the waist","fitWaistNo.d":"Create a loose fit and a more rectangular shape","fitWaistYes.t":"Fit the waist","fitWaistYes.d":"Create a more body-fitting shape","length.underbust.t":"Underbust","length.underbust.d":"Create a bralette top that only covers the bust.","length.waist.t":"Waist","length.waist.d":"Create a crop top.","length.hips.t":"Hips","length.hips.d":"Create a hip-length top.","length.seat.t":"Seat","length.seat.d":"Create a seat-length top.","length.knee.t":"Knee","length.knee.d":"Create a knee-length dress.","length.floor.t":"Floor","length.floor.d":"Create a floor-length dress. Use a negative length bonus to prevent the garment from actually dragging on the floor.","cutCuff.t":"The cuff is not shown","cutCuff.d":"The **Cuff** (6) is a rectangular piece of ribbing fabric {{{ w }}} wide and {{{ l }}} long.","cutWaistband.t":"The waistband is not shown","cutWaistband.d":"The **Waistband** (5) is a rectangular piece of ribbing fabric {{{ w }}} wide and {{{ l }}} long.","cutNeckBinding.t":"The neck binding is not shown","cutNeckBinding.d":"The **Neck Binding** (3) is a rectangular piece of ribbing fabric {{{ w }}} wide and {{{ l }}} long.","cutArmholeBinding.t":"The armhole binding is not shown","cutArmholeBinding.d":"The **Armhole Binding** (4) is a rectangular piece of ribbing fabric {{{ w }}} wide and {{{ l }}} long.","useWaistRibbingNo.t":"No ribbing","useWaistRibbingNo.d":"Do not include ribbing","useWaistRibbingYes.t":"Include ribbing","useWaistRibbingYes.d":"Include ribbing on the waistband","useCuffRibbingNo.t":"No ribbing","useCuffRibbingNo.d":"Do not include ribbing","useCuffRibbingYes.t":"Include ribbing","useCuffRibbingYes.d":"Include ribbing on the sleeve"},"o":{"draftForHighBust":{"t":"Bust adjustment","d":"If the pattern should be drafted with a basic full bust adjustment (FBA). This will result in a more fitted garment for people with breasts."},"draftForHighBustYes":{"t":"Draft with bust adjustment","d":"Suggested for most people with breasts. This option only has an effect if the optional bust-related measurements are available."}
1,"draftForHighBustNo":{"t":"Draft without bust adjustment","d":"Drafts a pattern using the chest measurement only."},"cuffEase":{"t":"Sleeve fullness","d":"Controls how wide the sleeves are."},"sleeveLength":{"t":"Sleeve length","d":"Controls the length of your sleeves"},"necklineBend":{"t":"Front neckline curvature","d":"Controls the curvature of the front neckline."},"backNeckBend":{"t":"Back neckline curvature","d":"Controls the curvature of the back neckline."},"necklineDepth":{"t":"Front neckline depth","d":"Controls how deep the neck opening plunges down at the front."},"backNeckCutout":{"t":"Back neckline depth","d":"Controls how deep the neck opening plunges down on the back."},"necklineWidth":{"t":"Neckline width","d":"Controls the width of the neck opening."},"fitWaist":{"t":"Fit the waist","d":"Whether or not to fit the waist."},"waistEase":{"t":"Waist ease","d":"Ease at the waist (only applies when the waist is fitted)."},"hipsEase":{"t":"Hips ease","d":"Ease at the hips."},"seatEase":{"t":"Seat ease","d":"Ease at the seat."},"bustEase":{"t":"Bust ease","d":"Ease at the bust. Only applies when bust adjustment is enabled."},"flare":{"t":"Flare","d":"How much fabric to use at the bottom hem of the design. Only applies when the design goes below the waist."},"dart":{"t":"Allow bust dart","d":"Allow creating a bust dart if this is necessary"},"sleeves":{"t":"Sleeves","d":"Draft the pattern with sleeves"},"strapWidth":{"t":"Strap width","d":"How wide the shoulder straps are. Only applies when sleeves are disabled."},"armholeCurveFront":{"t":"Armhole curve front","d":"How round the armhole curve is at the front. Higher options expose more skin."},"armholeCurveBack":{"t":"Armhole curve back","d":"How round the armhole curve is at the back. Higher options leave the shoulder blades free."},"armholeDropBack":{"t":"Armhole drop back","d":"How much the back armhole curves towards the bottom."},"length":{"t":"Length","d":"Which measurement line to use for the bottom hem. You can do fine adjustments using the bonus length option."},"useWaistRibbing":{"t":"Waistband ribbing","d":"Include ribbing on the waistband"},"useCuffRibbing":{"t":"Cuff ribbing","d":"Include ribbing on the sleeve"},"ribbingHeight":{"t":"Ribbing height","d":"Controls the height of the ribbing"},"ribbingStretch":{"t":"Ribbing stretch","d":"Use this to adapt the pattern to how stretchy the ribbing that you are using is."},"bindingHeight":{"t":"Knit binding height","d":"Controls the height of the knit binding for neck and armhole."},"seatBackAdjustment":{"t":"Seat back adjustment","d":"Controls the influence of the seat back measurement."},"curvatureAdjustment":{"t":"Curvature adjustment","d":"Controls how straight the side seam is above the hem."},"lengthAdjustment":{"t":"Length adjustment","d":"Controls how much the front part is made longer to compensate for the curve around the bust. Has little effect on smaller busts."},"waistAdjustment":{"t":"Waist adjustment","d":"Controls the minimum width around the waist to prevent an excessive hourglass shape."}}}')};function Rt(t,e,o){const a=e.split(o);return Array.isArray(a[0])&&(a[0]=(new t).move(o)),Array.isArray(a[1])&&(a[1]=(new t).move(o)),a}function Ft(t,e){const{measurements:o,points:a}=t.shorthand();void 0!==o.waistToKnee?a[e+"Knee"]=a[e+"Waist"].translate(0,o.waistToKnee):a[e+"Knee"]=a[e+"Waist"].translate(0,1.5*o.hpsToWaistBack),void 0!==o.waistToFloor?a[e+"Floor"]=a[e+"Waist"].translate(0,o.waistToFloor):a[e+"Floor"]=a[e+"Waist"].translate(0,2.5*o.hpsToWaistBack),a.sideTarget=a[e+"Knee"].translate(a.seatBase.x,0)}function Et(t){const{measurements:e,options:o,points:a,Point:i}=t.shorthand();a.cfBust=new i(0,e.hpsToBust),e.bustSpan?a.bust=new i(e.bustSpan/2,e.hpsToBust):a.bust=new i(e.chest/8,e.hpsToBust),a.chest=new i(e.chest*(1+o.chestEase)/4,e.hpsToBust),a.cbWaist=new i(0,e.hpsToWaistBack),a.cfWaist=new i(0,Math.max(e.hpsToWaistBack,e.hpsToWaistFront)).shiftFractionTowards(a.cbWaist,1-o.lengthAdjustment);const n=e.waist*(1+o.waistEase)/4,s=a.armhole.x*o.waistAdjustment;a.waist=new i(Math.max(n,s),a.cfWaist.y),a.cfArmhole=new i(0,a.cbWaist.y-e.waistToArmpit*(1-o.armholeDepth-o.bicepsEase/2)),a.armhole=new i(a.armhole.x,a.cfArmhole.y),a.armholeCp2=a.armhole.shift(180,a._tmp1.dx(a.armhole)/4),a.cfUnderbust=ne
1w i(0,a.cfWaist.y-(e.waistToUnderbust??e.hpsToWaistBack/6)),a.underbust=new i(e.chest*(1+o.chestEase)/4,a.cfUnderbust.y),a.cfHips=new i(0,a.cfWaist.y+e.waistToHips),a.hips=new i(e.hips*(1+o.hipsEase)/4,a.cfHips.y);const r=e.seat-e.seatBack,l=(e.seatBack-r)/4;a.cfSeat=new i(0,a.cfWaist.y+e.waistToSeat),a.seatBase=new i(e.seat*(1+o.seatEase)/4,a.cfSeat.y),a.seat=Ot(a.seatBase,a.hips,-l*o.seatBackAdjustment),Ft(t,"cf")}function Wt(t){const{measurements:e,options:o,points:a,Point:i}=t.shorthand();a.chest=new i(e.chest*(1+o.chestEase)/4,e.hpsToBust),a.cbWaist=new i(0,e.hpsToWaistBack);const n=e.waist*(1+o.waistEase)/4,s=a.armhole.x*o.waistAdjustment;a.waist=new i(Math.max(n,s),a.cbWaist.y),a.cbUnderbust=new i(0,a.cbWaist.y-(e.waistToUnderbust??e.hpsToWaistBack/6)),a.underbust=new i(e.chest*(1+o.chestEase)/4,a.cbUnderbust.y),a.cbHips=new i(0,a.cbWaist.y+e.waistToHips),a.hips=new i(e.hips*(1+o.hipsEase)/4,a.cbHips.y),a.cbSeat=new i(0,a.cbWaist.y+e.waistToSeat);const r=e.seat-e.seatBack,l=(e.seatBack-r)/4;a.seatBase=new i(e.seat*(1+o.seatEase)/4,a.cbSeat.y),a.seat=Ot(a.seatBase,a.hips,l*o.seatBackAdjustment),Ft(t,"cb")}function Ht(t,e){return t-(t*t*(3-2*t)-e)/(-6*(t-1)*t)}function At(t){let e=.5;for(let o=0;o<10;o++)e=Ht(e,t);return e}function Ot(t,e,o){const a=e.dist(t);return t.rotate(o/a*90,e)}function Dt(t){const{options:e,points:o,utils:a}=t.shorthand();o.chestBelowArmhole=o.chest.y>o.armhole.y?o.chest:o.armhole,!e.sleeves&&o.armhole.y>o.chest.y&&(o.armhole=a.beamIntersectsY(o.chest,o.waist,o.armhole.y),o.armholeCp2=o.armhole.shift(180,o._tmp1.dx(o.armhole)/4)),o.armhole.y>.8*o.chest.y?o.armholeCp1=o.chestBelowArmhole.shift(o.armholeCp2.angle(o.armhole)-90,.2*o.chest.y):o.armholeCp1=o.chest.shiftFractionTowards(o.armhole,-1)}function Nt(t,e,o,a,i){t:for(;;){let n=null,s=null,r=null;for(const e of o)e.x>a.x&&(a=new t(e.x,a.y));for(const t of o){const o=e.dx(t)/e.dx(a),l=e.dy(t)/e.dy(a),c=e.dy(t)/e.dy(a),p=.95;if(o>p&&l>p)continue;const d=At(o);let h=1-(c-3*.5*(1-d)*(1-d)*d-d*d*d)/(3*(1-d)*d*d);h=Math.max(i,Math.min(h,1));let m=(c-3*(1-h)*(1-d)*d*d-d*d*d)/(3*(1-d)*(1-d)*d);if(m<0){a=a.translate(5,0);continue t}m=Math.min(.5,m),h=1-(c-3*m*(1-d)*(1-d)*d-d*d*d)/(3*(1-d)*d*d),h=Math.max(i,Math.min(h,1));let f=m-h;h>0&&(null===r||f<r)&&(n=m,s=h,r=f)}return null===n&&(n=.5,s=i),[e.translate(0,n*e.dy(a)),a.translate(0,-s*e.dy(a)),a]}}function It(t,e){const{points:o,options:a,paths:i,Path:n,Point:s}=t.shorthand(),r=Nt(s,o.waist,[o.hips],o.seat,a.curvatureAdjustment),l=(new n).move(o.armhole).line(o.chestBelowArmhole).curve(o.armholeCp1,o.waistCp2,o.waist).curve(r[0],r[1],r[2]);i.base=l.hide(),o.baseBottom=r[2];let c,p=function(t,e){const o=t.intersectsY(e);return o.length>0?o:(e+=.001,t.intersectsY(e))}(l,e)[0];if(p||(p=function(t,e){const o=(e-t.baseBottom.y)/t.baseBottom.dy(t.sideTarget);return t.baseBottom.shiftFractionTowards(t.sideTarget,o)}(o,e)),o.hem=p,o.hem.y<o.waist.y)c=(new n).move(o.armhole).line(o.chestBelowArmhole).join(function(t,e,o,a,i,n,s){return e.waistCp1=a??o.translate(0,.2*o.dy(n)),e.hemCp2=i??n.translate(0,o.dy(n)*-s),(new t).move(o).curve(e.waistCp1,e.hemCp2,n)}(n,o,o.chestBelowArmhole,o.armholeCp1,null,o.hem,a.curvatureAdjustment));else{let t,e;c=(new n).move(o.armhole).line(o.chestBelowArmhole).curve(o.armholeCp1,o.waistCp2,o.waist),e=o.hem.y<=o.hips.y?[]:o.hem.y<=o.seat.y?[o.hips]:[o.hips,o.seat],t=Nt(s,o.waist,e,o.hem,a.curvatureAdjustment),o.waistCp1=t[0],o.hemCp2=t[1],o.hem=t[2];let i=a.flare/2;o.hem.y<o.waist.y?i=0:o.hem.y<o.seat.y&&(i*=o.waist.dy(o.hem)/o.waist.dy(o.seat)),o.waistCp1=o.waistCp1.shiftFractionTowards(o.waist,i),o.hemCp2=o.hemCp2.rotate(45*i,o.waist).shiftFractionTowards(o.waist,i),o.hem=o.hem.rotate(90*i,o.waist),c=c.curve(o.waistCp1,o.hemCp2,o.hem)}return c.reverse()}function Mt(t){const{options:e,points:o}=t.shorthand();(!e.fitWaist||o.waist.x>o.armhole.x)&&(o.waist.x<o.armhole.x&&(o.waist.x=o.armhole.x),o.waistCp2=o.waist.shiftFractionTowards(o.armhole,.2),o.hips.x<o.waist.x&&(o.hips.x=o.waist.x)),o.hips.x<o.waist.x&&(o.hips.x=o.waist.x),o.seat.x<o.hips.x&&(o.seat.x=o.hips.x),o.waistCp2=o.waist.shift(90,.2*o.armhole.dy(o.waist)),o.seatCp2=o.seat.shift(90,.3*o.hips.dy(o.seat)),o.hipsCp2=o.waist.shiftFractionTowards(o.hips,.6)}function _t(t,e=0){const{measurements:o,options:a,points:i,paths:n,Path:s,Point:r,log:l}=t.shorthand();let c,p=0,d=o.hpsToWaistBack;switch(a.length){case"underbust":c=i.cbUnderbust,d=o.waistToUnderbust;break;case"waist":c=i.cbWaist;break;case"hips":c=i.cbHips;break;case"seat":c=i.cbSeat,p=o.seatBack-o.seat/2,d*=2;break;case"knee":c=i.cbKnee,p=o.seatBack-o.seat/2,d*=3;break;case"floor":c=i.cbFloor,p=o.seatBack-o.seat/2,d*=3}c||(c=i.cbSeat);let h=c.y+d*a.lengthBonus+e;h<=1.1*i.armhole.y&&(l.warn("Adjusting hem as it would be above or too close to armhole."),h=1.1*i.armhole.y),h<=i.underbust.y&&(l.warn("Adjusting hem as it would be above the underbust."),h=i.underbust.y),i.cbHem=new r(0,h+p*a.seatBackAdjustment),n.sideSeam=It(t,h).clean().addClass("fabric"),i.midHemCp1=new r(.66*i.hem.x,i.cbHem.y),i.midHemCp2=i.hem.shift(n.sideSeam.angleAt(i.hem)+90,.1*i.hem.x),n.hem=(new s).move(i.cbHem).curve(i.midHemCp1,i.midHemCp2,i.hem).addClass("fabric")}function jt(t,e=0){const{measurements:o,options:a,points:i,paths:n,Path:s,Point:r,log:l}=t.shorthand();let c,p=o.hpsToWaistBack;switch(a.length){case"underbust":c=i.cfUnderbust,p=o.waistToUnderbust;break;case"waist":c=i.cfWaist;break;case"hips":c=i.cfHips;break;case"seat":c=i.cfSeat,p*=2;break;case"knee":c=i.cfKnee,p*=3;break;case"floor":c=i.cfFloor,p*=3}c||(c=i.cfSeat);let d=c.y+p*a.lengthBonus+e;d<=1.1*i.armhole.y&&(l.warn("Adjusting hem as it would be above or too close to armhole."),d=1.1*i.armhole.y),d<=i.underbust.y&&(l.warn("Adjusting hem as it would be above the underbust."),d=i.underbust.y),i.cfHem=new r(0,d),n.sideSeam=It(t,d).clean().addClass("fabric"),i.midHemCp1=new r(.66*i.hem.x,i.cfHem.y),i.midHemCp2=i.hem.shift(n.sideSeam.angleAt(i.hem)+90,.1*i.hem.x),n.hem=(new s).move(i.cfHem).curve(i.midHemCp1,i.midHemCp2,i.hem).addClass("fabric")}function Gt(t,e,o,a,i="notch"){const{store:n,options:s,points:r,paths:l,Path:c,snippets:p,Snippet:d,utils:h}=t.shorthand();if(s.sleeves)if(n.get("capSleeves")){const t=4*(s.sleeveLength+.2)*n.get("sleeveCapHeight");r.sleeveCap=r.shoulder.shift(r.neck.angle(r.shoulder)-30+15*s.cuffEase,t),r.sleeveCapStart=r.shoulder.shift(r.neck.angle(r.shoulder),-.2*t),r.armholePitchCp1=r.sleeveCap.shiftFractionTowards(r.sleeveCapStart.rotate(90,r.sleeveCap),.5),r.sleeveCapCp=r.sleeveCap.shiftTowards(r.armholePitchCp1,.3*t).rotate(-90,r.sleeveCap),l.shoulder=(new c).move(r.sleeveCap).curve(r.sleeveCapCp,r.shoulder,r.sleeveCapStart).line(r.neck).addClass("fabric"),l.armhole=(new c).move(r.armhole).curve(r.armholeCp2,r.armholeHollowCp1,r.armholeHollow).curve(r.armholeHollowCp2,r.armholePitchCp1,r.sleeveCap).addClass("fabric")}else l.shoulder=(new c).move(r.shoulder).line(r.neck).addClass("fabric"),l.armhole=(new c).move(r.armhole).curve(r.armholeCp2,r.armholeHollowCp1,r.armholeHollow).curve(r.armholeHollowCp2,r.armholePitchCp1,r.armholePitch).curve(r.armholePitchCp2,r.shoulderCp1,r.shoulder).addClass("fabric"),p.armholePitchNotch=new d(i,r.armholePitch);else r.strapTop=r.neck.shift(r.shoulder.angle(r.hps),-e*r.shoulder.dist(r.hps)),r.strapTopCp1=r.strapTop.shiftTowards(r.hps,.2*r.strapTop.dy(r.armhole)).rotate(90,r.strapTop),r.armholeCp2=r.armhole.shiftFractionTowards(r.armholeCp2,3),r.armholeIntersection=h.beamsIntersect(r.strapTop,r.strapTopCp1,r.armhole,r.armholeCp2),r.armholeIntersectionDrop=r.armholeIntersection.shiftFractionTowards(r.strapTop,-a),r.armholeCp2=r.armholeCp2.shiftFractionTowards(r.armholeIntersection,o),r.strapTopCp1=r.strapTopCp1.shiftFractionTowards(r.armholeIntersectionDrop,o),l.armhole=(new c).move(r.armhole).curve(r.armholeCp2,r.strapTopCp1,r.strapTop).addClass("fabric"),l.shoulder=(new c).move(r.strapTop).line(r.neck).addClass("fabric")}function Ut(t,e){const{points:o,macro:a,utils:i}=t.shorthand(),n={seat:o.seat.y,hips:o.hips.y,waist:o.waist.y,underbust:o.underbust.y,dart:o.dartTip?.y,armhole:o.armhole.y+.01};let s=(o.cfHem??o.cbHem).y;const r=Object.keys(n);for(let l=0;l<r.length;l++){const t=r[l];let c=n[t];if(!c||c>o.hem.y)continue;let p=e.intersectsY(c);if(0===p.length&&(c+=.001,p=e.intersectsY(c)),p.length>0){const e=p[0],o=e.clone();o.x=0;const n=o.clone();n.y=s,s=c,a("hd",{id:"wAt"+i.capitalize(t),from:o,to:e,y:c}),a("vd",{id:"hBelow"+i.capitalize(t),from:o,to:n,x:30})}}}function Yt(t,e){const{store:o,measurements:a,options:i,points:s,paths:r,Path:l,Point:c,expand:p,sa:d,macro:h,units:m,complete:f}=t.shorthand();(void 0===o.get("ribbingHeight")||t.context.settings.sample)&&o.set("ribbingHeight",(a.hpsToWaistBack+a.waistToHips)*i.ribbingHeight);const u=o.get("ribbingHeight");if(!p){const a=d?2*d:0;return o.flag.note({msg:`bibi:cut${(0,n.ZH)(t.name.split(".")[1])}`,notes:[d?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:m(2*u+a),l:m(e+a)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),o.flag.preset("expandIsOff"),t.hide()}o.flag.preset("expandIsOn"),s.topLeft=new c(0,0),s.topRight=new c(2*u,0),s.topFold=new c(u,0),s.bottomLeft=new c(0,e),s.bottomRight=new c(s.topRight.x,e),s.bottomFold=new c(s.topFold.x,e),r.seam=(new l).move(s.bottomRight).line(s.topRight).line(s.topLeft).line(s.bottomLeft).line(s.bottomRight).close().addClass("various"),f&&(r.fold=(new l).move(s.topFold).line(s.bottomFold).addClass("various help")),d&&(r.sa=r.seam.offset(d).addClass("various s
1a")),s.title=new c(s.bottomRight.x/3,s.bottomRight.y/3),h("vd",{id:"hFull",from:s.bottomRight,to:s.topRight,x:s.topRight.x+d+15}),h("hd",{id:"wFull",from:s.topLeft,to:s.topRight,y:s.topRight.y-d-15})}function $t(t,e){const{store:o,absoluteOptions:a,points:i,paths:s,Path:r,Point:l,expand:c,sa:p,macro:d,units:h,complete:m}=t.shorthand();(void 0===o.get("bindingHeight")||t.context.settings.sample)&&o.set("bindingHeight",a.bindingHeight);const f=o.get("bindingHeight");if(!c){const a=p?2*p:0;return o.flag.note({msg:`bibi:cut${(0,n.ZH)(t.name.split(".")[1])}`,notes:[p?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:h(4*f),l:h(e+a)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),o.flag.preset("expandIsOff"),t.hide()}o.flag.preset("expandIsOn"),i.topLeft=new l(0,0),i.topRight=new l(4*f,0),i.topFold=new l(f,0),i.bottomLeft=new l(0,e),i.bottomRight=new l(i.topRight.x,e),i.bottomFold=new l(i.topFold.x,e),s.seam=(new r).move(i.bottomRight).line(i.topRight).line(i.topLeft).line(i.bottomLeft).line(i.bottomRight).close().addClass("various"),m&&(s.fold=(new r).move(i.topFold).line(i.bottomFold).addClass("various help")),p&&(s.sa=(new r).move(i.topLeft).line(i.topLeft.translate(0,-p)).line(i.topRight.translate(0,-p)).line(i.topRight).move(i.bottomLeft).line(i.bottomLeft.translate(0,p)).line(i.bottomRight.translate(0,p)).line(i.bottomRight).addClass("various sa")),i.title=new l(i.bottomRight.x/3,i.bottomRight.y/3),d("vd",{id:"hFull",from:i.bottomRight,to:i.topRight,x:i.topRight.x+p+15}),d("hd",{id:"wFull",from:i.topLeft,to:i.topRight,y:i.topRight.y-p-15}),d("hd",{id:"wFold",from:i.bottomFold,to:i.bottomRight,y:i.bottomFold.y+p+15})}const zt={name:"bibi.waistband",from:D,hide:{from:!0},options:{fitWaist:{bool:!0,menu:"fit",order:"EBA"},waistEase:{pct:5,min:-10,max:20,...(0,n.Wx)("waist"),menu:(t,e)=>!!e.fitWaist&&"fit",order:"EBB"},hipsEase:{pct:5,min:-5,max:50,...(0,n.Wx)("hips"),menu:"fit",order:"ECA"},seatEase:{pct:2,min:-5,max:50,...(0,n.Wx)("seat"),menu:"fit",order:"EDA"},chestEase:{pct:2,min:-5,max:25,...(0,n.Wx)("chest"),menu:"fit",order:"EAB"},length:{dflt:"seat",list:["underbust","waist","hips","seat","knee","floor"],menu:"style.length"},flare:{pct:0,min:0,max:150,menu:(t,e)=>("waist"===e.length&&e.lengthBonus>0||"hips"===e.length||"seat"===e.length||"knee"===e.length||"floor"===e.length)&&"style.length"},backNeckCutout:{pct:6,min:2,max:110,menu:"style"},backNeckBend:{pct:50,min:0,max:70,menu:"style"},lengthBonus:{pct:0,min:-30,max:30,menu:"style.length"},draftForHighBust:{bool:!0,menu:"fit"},useWaistRibbing:{bool:!1,menu:"style"},ribbingStretch:{pct:15,min:0,max:30,menu:"fit"},ribbingHeight:{pct:10,min:5,max:15,menu:(t,e)=>!(!e.useWaistRibbing&&!e.useCuffRibbing)&&"style",toAbs:(t,{measurements:e})=>(e.hpsToWaistBack+e.waistToHips)*t},necklineWidth:{pct:15,min:-5,max:90,menu:"style"},strapWidth:{pct:40,min:15,max:100,menu:(t,e)=>!e.sleeves&&"style.sleeves"},sleeves:{bool:!0,menu:"style.sleeves"},seatBackAdjustment:{pct:20,min:0,max:100,menu:"advanced"},curvatureAdjustment:{pct:50,min:.1,max:100,menu:"advanced"},waistAdjustment:{pct:95,min:50,max:100,menu:(t,e)=>!!e.fitWaist&&"advanced"},lengthAdjustment:{pct:25,min:0,max:100,menu:"advanced"}},draft:function({part:t,store:e,measurements:o,options:a,paths:i,points:n,snippets:s,macro:r}){if(e.set("ribbingHeight",(o.hpsToWaistBack+o.waistToHips)*a.ribbingHeight),!a.useWaistRibbing)return t.hide();Wt(t),Mt(t),Dt(t),_t(t),e.set("backHemLength",2*i.hem.length()),Et(t),Mt(t),jt(t),e.set("frontHemLength",2*i.hem.length());for(const l of Object.keys(i))delete i[l];for(const l of Object.keys(s))delete s[l];for(const l of Object.keys(n))delete n[l];return Yt(t,(e.frontHemLength+e.backHemLength)*(1-a.ribbingStretch)),e.cutlist.setCut({cut:1,from:"ribbing"}),r("title",{at:n.title,nr:5,scale:.5,rotation:90,title:"waistband"}),t}};const Jt={name:"bibi.cuff",from:y,after:[I,N],hide:{from:!0,inherited:!0,after:!0},options:{s3Collar:0,s3Armhole:0,libraryFitSleeve:!0,brianFitCollar:!1,bicepsEase:{pct:5,min:0,max:50,...(0,n.Wx)("biceps"),menu:"fit"},collarEase:0,shoulderSlopeReduction:0,sleeveWidthGuarantee:.85,frontArmholeDeeper:.01,legacyArmholeDepth:!1,armholeDepthFactor:.5,sleeveLengthBonus:0,shoulderEase:{pct:0,min:-2,max:6,...(0,n.Wx)("shoulderToShoulder"),menu:"fit"},cuffEase:{pct:20,min:0,max:200,...(0,n.Wx)("wrist"),menu:(t,e)=>!1!==e.sleeves&&"style.sleeves"},armholeDepth:{pct:2,min:-10,max:50,menu:(t,e)=>!e?.legacyArmholeDepth&&"style.sleeves"},armholeCurveBack:{pct:30,min:-10,max:120,menu:(t,e)=>!e.sleeves&&"style.sleeves"},armholeDropBack:{pct:20,min:-50,max:50,menu:(t,e)=>!e.sleeves&&"style.sleeves"},useCuffRibbing:{bool:!1,menu:(t,e)=>!!(e.sleeves&&e.sleeveLength>=.05)&&"style"},ribbingStretch:{pct:15,min:0,max:30,menu:"fit"},ribbingHeight:{pct:10,min:5,max:15,menu:(t,e)=>!(!e.useWaistRibbing&&!e.useCuffRibbing)&&"style",toAbs:(t,{measurements:e})=>(e.hpsToWaistBack+e.waistToHips)*t}},draft:function({part:t,store:e,measurements:o,options:a,paths:i,points:n,snippets:s,Point:r,macro:l}){l("rmtitle"),l("rmscalebox");for(const c of Object.keys(i))i[c].hide();for(const c of Object.keys(s))delete s[c];if(e.set("ribbingHeight",(o.hpsToWaistBack+o.waistToHips)*a.ribbingHeight),!a.useCuffRibbing||!a.sleeves||a.sleeveLength<.05)return e.set("cuffSize",0),t.hide();return n.sleeveTip=i.sleevecap.edge("top"),n.sleeveTop=new r(0,n.sleeveTip.y),n.centerWrist=n.sleeveTop.shift(-90,o.shoulderToWrist),n.wristRight=n.centerWrist.shift(0,o.wrist*(1+a.cuffEase)/2),n.wristLeft=n.wristRight.rotate(180,n.centerWrist),n.cuffRight=n.bicepsRight.shiftFractionTowards(n.wristRight,a.sleeveLength),n.cuffLeft=n.bicepsLeft.shiftFractionTowards(n.wristLeft,a.sleeveLength),n.centerCuff=n.cuffRight.shiftFractionTowards(n.cuffLeft,.5),e.set("cuffSize",n.cuffLeft.dist(n.cuffRight)),i.sleevecap.hide(),Yt(t,e.cuffSize*(1-a.ribbingStretch)),e.cutlist.setCut({cut:2,from:"ribbing",identical:!0}),l("title",{at:n.title,nr:6,scale:.5,rotation:90,title:"cuff"}),t}};const Kt={name:"bibi.sleeve",from:Jt,options:{sleeveLength:{pct:20,min:-20,max:110,menu:(t,e)=>!1!==e.sleeves&&"style.sleeves"}},measurements:["shoulderToWrist","wrist"],draft:function({options:t,store:e,measurements:o,points:a,paths:i,Point:n,Path:s,sa:r,macro:l,snippets:c,Snippet:p,part:d,utils:h}){for(const m of Object.keys(i))i[m].hide();if(a.sleeveTip=i.sleevecap.edge("top"),a.sleeveTop=new n(0,a.sleeveTip.y),e.set("sleeveLength",o.shoulderToWrist*t.sleeveLength),e.set("capSleeves",t.sleeveLength<.05),e.set("separateSleeves",!0),e.set("sleeveCapHeight",-a.sleeveTop.y),e.get("capSleeves"))return e.set("separateSleeves",!1),d.hide();if(!t.sleeves)return e.set("sleeveLength",0),e.set("separateSleeves",!1),d.hide();if(a.centerWrist=a.sleeveTop.shift(-90,o.shoulderToWrist),a.wristRight=a.centerWrist.shift(0,o.wrist*(1+t.cuffEase)/2),a.wristLeft=a.wristRight.rotate(180,a.centerWrist),a.cuffRight=a.bicepsRight.shiftFractionTowards(a.wristRight,t.sleeveLength),a.cuffLeft=a.bicepsLeft.shiftFractionTowards(a.wristLeft,t.sleeveLength),e.cuffSize>0){let t;t=a.bicepsLeft.dy(a.cuffLeft)>1.5*e.ribbingHeight?a.cuffLeft.y-e.ribbingHeight:.5*e.ribbingHeight,a.cuffLeft=h.beamIntersectsY(a.bicepsLeft,a.cuffLeft,t),a.cuffRight=h.beamIntersectsY(a.bicepsRight,a.cuffRight,t)}a.centerCuff=a.cuffRight.shiftFractionTowards(a.cuffLeft,.5),i.sleevecap.hide(),i.seam=(new s).move(a.bicepsLeft).line(a.cuffLeft).line(a.cuffRight).line(a.bicepsRight).join(i.sleevecap).close().attr("class","fabric"),r&&(0===e.cuffSize?(a.hemLeft=h.beamIntersectsY(a.bicepsRight,a.cuffRight,a.cuffRight.y+2*r).translate(a.cuffRight.dx(a.cuffLeft),0),a.hemRight=h.beamIntersectsY(a.bicepsLeft,a.cuffLeft,a.cuffLeft.y+2*r).translate(a.cuffLeft.dx(a.cuffRight),0),i.saB
1ottom=(new s).move(a.cuffLeft).line(a.hemLeft).line(a.hemRight).line(a.cuffRight).hide()):i.saBottom=(new s).move(a.cuffLeft).line(a.cuffRight).hide(),i.sa=(new s).move(a.bicepsLeft).join(i.saBottom).line(a.bicepsRight).join(i.sleevecap).close().offset(r).attr("class","fabric sa"));return a.gridAnchor=new n(0,0),l("grainline",{from:a.centerCuff,to:a.centerBiceps}),e.cutlist.addCut({cut:2,from:"fabric"}),a.logo=a.centerBiceps.shiftFractionTowards(a.centerCuff,.3),c.logo=new p("logo",a.logo),l("title",{at:a.centerBiceps,nr:4,title:"sleeve"}),a.frontNotch=i.sleevecap.shiftAlong(e.get("library.sleeve.frontArmholeToArmholePitch")),a.backNotch=i.sleevecap.reverse().shiftAlong(e.get("library.sleeve.backArmholeToArmholePitch")),c.frontNotch=new p("notch",a.frontNotch),c.backNotch=new p("bnotch",a.backNotch),l("vd",{id:"hCuffToArmhole",from:a.cuffLeft,to:a.bicepsLeft,x:a.bicepsLeft.x-r-15}),l("vd",{id:"hFull",from:a.cuffLeft,to:a.sleeveTip,x:a.bicepsLeft.x-r-30}),l("hd",{id:"wFull",from:a.bicepsLeft,to:a.bicepsRight,y:a.sleeveTip.y-r-30}),l("hd",{id:"wCuff",from:a.cuffLeft,to:a.cuffRight,y:a.cuffLeft.y+r+30}),l("pd",{id:"lSleevevap",path:i.sleevecap.reverse(),d:-1*r-15}),d}};const Vt={name:"bibi.back",from:D,measurements:["hips","waist","hpsToWaistBack","chest","seat","seatBack","waistToSeat"],optionalMeasurements:["bustSpan","highBust","waistToUnderbust","waistToKnee","waistToFloor"],hide:{from:!0},after:[zt,Kt],options:{},draft:function({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,options:l,absoluteOptions:c,macro:p,complete:d,part:h}){for(const u of Object.keys(n))n[u].hide();a.armholePitchCp1=a.backArmholePitchCp1,a.armholePitch=a.backArmholePitch,a.armholePitchCp2=a.backArmholePitchCp2,delete a.frontArmholePitchCp1,delete a.frontArmholePitch,delete a.frontArmholePitchCp2,delete a.backArmholePitchCp1,delete a.backArmholePitch,delete a.backArmholePitchCp2,delete a.cfNeck,delete a.cfNeckCp1,Wt(h),Mt(h),Dt(h),_t(h,l.useWaistRibbing?-t.get("ribbingHeight"):0),t.set("backSideSeamLength",n.sideSeam.length());const m=l.sleeves?0:l.strapWidth;a.neck=a.hps.shiftFractionTowards(a.shoulder,l.necklineWidth*(1-m)),a.cbNeck=new o(0,a.neck.y+l.backNeckCutout*a.neck.dy(a.cbChest)),a.cbNeckCp1=a.cbNeck.shift(0,a.neck.x*l.backNeckBend),a.neckCp2=a.neck.shiftTowards(a.shoulder,a.neck.dy(a.cbNeck)*(.2+l.backNeckBend)).rotate(-90,a.neck),n.backNeck=(new i).move(a.neck).curve(a.neckCp2,a.cbNeckCp1,a.cbNeck).addClass("fabric"),Gt(h,m,l.armholeCurveBack,l.armholeDropBack,"bnotch"),n.centerLine=(new i).move(a.cbNeck).line(a.cbHem).addClass("fabric"),t.set("gatherAreaStart",Math.min(a.armhole.dy(a.cbWaist)/10,.1*n.sideSeam.length())),t.set("gatherAreaLength",Math.min(.8*n.sideSeam.length(),.5*a.armhole.dy(a.cbWaist))),t.set("armholeSizeBack",n.armhole.length()),t.set("neckSizeBack",n.backNeck.length());const f=n.sideSeam.reverse();r.gatherAreaStart=new s("notch",f.shiftAlong(t.get("gatherAreaStart"))),r.gatherAreaBack=new s("notch",f.shiftAlong(t.get("gatherAreaStart")+t.get("gatherAreaLength"))),e&&(n.sa=(new i).move(a.cbHem).join(n.hem.offset(e*(l.useWaistRibbing?1:3))).join(n.sideSeam.offset(e)).join(n.armhole.offset(e*(t.separateSleeves?1:0))).join(n.shoulder.offset(e)).line(a.neck).attr("class","fabric sa"));p("cutonfold",{from:a.cbNeck,to:a.cbHem,grainline:!0}),delete r.logo,a.title=a.cbHem.shift(45,60),p("title",{at:a.title,nr:2,title:"back"}),d&&(a.hem.y>a.waist.y&&(n.waist=(new i).move(a.cbWaist).line(a.waist).attr("class","help")),t.separateSleeves||(n.armholeBinding=n.armhole.offset(-c.bindingHeight).addClass("various help")),n.neckBinding=n.backNeck.offset(-c.bindingHeight).addClass("various help"));return p("pd",{id:"pArmhole",path:n.armhole.reverse(),d:-1*e-15}),p("pd",{id:"pNeck",path:n.backNeck.reverse(),d:-1*e-15}),p("pd",{id:"pShoulder",path:n.shoulder.reverse(),d:-1*e-15}),p("hd",{id:"wAtHem",from:a.cbHem,to:a.hem,y:a.cbHem.y+2.5*e+15}),p("vd",{id:"hHemToNeck",from:a.cbHem,to:a.cbNeck,x:a.cbHem.x-e-15}),p("vd",{id:"hShoulderToArmhole",from:a.shoulder,to:a.armhole,x:a.armhole.x+e+15}),p("vd",{id:"hSide",from:a.armhole,to:a.hem,x:a.hem.x+e+15}),p("vd",{id:"hNeckToArmhole",from:a.neck,to:a.armhole,x:a.armhole.x+e+30}),Ut(h,n.sideSeam),h}};const Xt={name:"bibi.front",from:D,measurements:["hips","waist","hpsToWaistBack","chest","hpsToWaistFront","seat","seatBack","waistToSeat","hpsToBust"],optionalMeasurements:["bustSpan","highBust","waistToUnderbust","waistToKnee","waistToFloor"],hide:{from:!0},plugins:[],after:Vt,options:{dart:{bool:!1,menu:"fit"},bustEase:{pct:0,min:0,max:10,menu:(t,e)=>!!e.draftForHighBust&&"fit",order:"EAA"},necklineDepth:{pct:25,min:20,max:110,menu:"style"},necklineBend:{pct:50,min:0,max:70,menu:"style"},armholeCurveFront:{pct:15,min:-10,max:30,menu:(t,e)=>!e.sleeves&&"style.sleeves"}},draft:function({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,options:l,absoluteOptions:c,measurements:p,macro:d,complete:h,part:m}){for(const C of Object.keys(n))n[C].hide();let f;a.armholePitchCp1=a.frontArmholePitchCp1,a.armholePitch=a.frontArmholePitch,a.armholePitchCp2=a.frontArmholePitchCp2,delete a.frontArmholePitchCp1,delete a.frontArmholePitch,delete a.frontArmholePitchCp2,delete a.backArmholePitchCp1,delete a.backArmholePitch,delete a.backArmholePitchCp2,delete a.cbHem,delete a.cbNeck,Et(m),a.originalChest=a.chest,a.originalArmhole=a.armhole,a.originalArmholeCp2=a.armholeCp2,l.draftForHighBust&&p.bustSpan&&p.highBust&&(f=function(t,e,o,a,i){const n=t.dist(e),s=Math.asin((e.x-t.x)/n);let r=Math.asin((e.x-t.x+a)/n);isNaN(r)&&(r=Math.PI/2);const l=new i(t.x+n*Math.sin(r),t.y+n*Math.cos(r)),c=l.y-e.y,p=r-s,d=e=>e.rotate(p/Math.PI*180,t),h=d(o),m=o.translate(a,c),f=m.angle(e)-h.angle(e);return{dx:a,dy:c,rotateUpper:d,rotateLower:t=>t.translate(a,c).rotate(-f,e),bustOffset:l,sideOffset0:h,sideOffset1:m}}(a.neck.shiftFractionTowards(a.shoulder,.5),a.bust,a.armholeHollow,(p.bust*(1+l.bustEase)-p.chest)/2,o),a.bustOffset=f.bustOffset,a.sideOffset0=f.sideOffset0,a.sideOffset1=f.sideOffset1,a.chest=f.rotateLower(a.chest),a.armhole=f.rotateUpper(a.armhole),a.armholeCp2=f.rotateUpper(a.armholeCp2),a.armholeHollowCp1=f.rotateUpper(a.armholeHollowCp1),a.armholeHollow=f.rotateUpper(a.armholeHollow),a.armholeHollowCp2=f.rotateUpper(a.armholeHollowCp2),a.armholePitchCp1=f.rotateUpper(a.armholePitchCp1),a.armholePitch=f.rotateUpper(a.armholePitch),a.armholePitchCp2=f.rotateUpper(a.armholePitchCp2),a.shoulderCp1=f.rotateUpper(a.shoulderCp1),a.shoulder=f.rotateUpper(a.shoulder));Mt(m),Dt(m);const u=l.sleeves?0:l.strapWidth;a.neck=a.hps.shiftFractionTowards(a.shoulder,l.necklineWidth*(1-u)),a.cfNeck=new o(0,a.neck.y+l.necklineDepth*a.neck.dy(a.cfBust)),a.cfNeckCp1=a.cfNeck.shift(0,a.neck.x*l.necklineBend),a.neckCp2=a.neck.shiftTowards(a.shoulder,a.neck.dy(a.cfNeck)*(.2+l.necklineBend)).rotate(-90,a.neck),n.frontNeck=(new i).move(a.neck).curve(a.neckCp2,a.cfNeckCp1,a.cfNeck).addClass("fabric"),jt(m,l.useWaistRibbing?-t.get("ribbingHeight"):0),t.set("frontSideSeamLength",n.sideSeam.length());const g=t.get("frontSideSeamLength"),b=t.get("backSideSeamLength")??0,w=g-b,k=((e,o,a)=>{const n=e.length();a=Math.max(0,Math.min(a,n));const s=(t.get("gatherAreaLength")??0)+a;let r=.5*(s-a);const l=n-(t.get("gatherAreaStart")??0)-s,c=e.shiftAlong(l),p=e.shiftAlong(l+r),d=e.shiftAlong(l+r+a),h=e.shiftAlong(l+s);let m=Rt(i,e,c);const f=m[0];m=Rt(i,m[1],h);const u=m[0],g=m[1],b=e.angleAt(c),w=e.angleAt(h),k=c.shift(b,r/3),C=h.shift(w,-r/3),v=Math.max(o.dist(p),o.dist(d)),y=o.shiftTowards(p,v),T=o.shiftTowards(d,v),x=y.shiftFractionTowards(T,.5),B=o.shiftFractionTowards(x,.25),S=B.shiftFractionTowards(x,.25).shiftFractionTowards(y,.25),L=B.shiftFractionTowards(x,.25).shiftFractionTowards(T,.25),P=y.angle(T),R=2*p.angle(d)-P;let F=B.angle(T)-B.angle(y);F<-180&&(F+=360);const E=y.shift(R-F/2,-r/3),W=T.shift(R+F/2,r/3);return{beforeDart:f.clone().curve(k,E,y),dart:(new i).move(y)._curve(S,B).curve_(L,T),afterDart:(new i).move(T).
1curve(W,C,h).join(g),dartMiddle:(new i).move(x).line(B),startGather:c,endGather:h,startDart:y,endDart:T,dartTip:B,gatherArea:s,gatherPath:u,dartLength:a,offset:l}})(n.sideSeam,a.bust,w);t.set("dart",k),a.startGather=k.startGather,a.endGather=k.endGather,a.startDart=k.startDart,a.endDart=k.endDart,a.dartTip=k.dartTip,n.sideSeamWithDart=n.originalSideSeam=n.sideSeam.clone().hide(),l.dart&&w>k.gatherArea/5&&(n.sideSeam1=k.beforeDart.hide(),n.dart=k.dart.addClass("fabric"),n.sideSeam2=k.afterDart.hide(),h&&(n.dartMiddle=k.dartMiddle.addClass("help")),n.sideSeam=n.sideSeam1.clone().combine(n.sideSeam2).addClass("fabric"),n.sideSeamWithDart=n.sideSeam1.clone().join(n.dart).join(n.sideSeam2).hide());h&&(r.startGather=new s("notch",a.startGather),r.endGather=new s("notch",a.endGather),w>k.gatherArea/10&&!n.dart&&(n.gatherPath=(new i).move(a.startGather).join(k.gatherPath.offset(-20)).line(a.endGather).addClass("dashed various").addText("gather","center various help")));Gt(m,u,l.armholeCurveFront,0),t.set("armholeSizeFront",n.armhole.length()),t.set("neckSizeFront",n.frontNeck.length()),n.centerLine=(new i).move(a.cfNeck).line(a.cfHem).addClass("fabric"),a.title=a.bust.shift(0,5),d("title",{at:a.title,nr:1,title:"front"}),d("cutonfold",{from:a.cfNeck,to:a.cfHem,grainline:!0}),e&&(n.sideSeam1?n.sa=(new i).move(a.cfHem).join(n.hem.offset(e*(l.useWaistRibbing?1:3))).join(n.sideSeam1.offset(e)).join(n.sideSeam2.offset(e)).join(n.armhole.offset(e*(t.separateSleeves?1:0))).join(n.shoulder.offset(e)).line(a.neck).attr("class","fabric sa"):n.sa=(new i).move(a.cfHem).join(n.hem.offset(e*(l.useWaistRibbing?1:3))).join(n.sideSeam.offset(e)).join(n.armhole.offset(e*(t.separateSleeves?1:0))).join(n.shoulder.offset(e)).line(a.neck).attr("class","fabric sa"));h&&(a.hem.y>a.waist.y&&(n.waist=(new i).move(a.cfWaist).line(a.waist).attr("class","help")),t.separateSleeves||(n.armholeBinding=n.armhole.offset(-c.bindingHeight).addClass("various help")),n.neckBinding=n.frontNeck.offset(-c.bindingHeight).addClass("various help"));d("pd",{id:"pArmhole",path:n.armhole.reverse(),d:-1*e-15}),d("pd",{id:"pNeck",path:n.frontNeck.reverse(),d:-1*e-15}),d("pd",{id:"pShoulder",path:n.shoulder.reverse(),d:-1*e-15}),d("hd",{id:"wAtHem",from:a.cfHem,to:a.hem,y:a.hem.y+2.5*e+15}),d("vd",{id:"hHemToNeck",from:a.cfHem,to:a.cfNeck,x:a.cfHem.x-e-15}),d("vd",{id:"hNeckToArmhole",from:a.neck,to:a.armhole,x:a.armhole.x+e+30}),d("vd",{id:"hShoulderToArmhole",from:a.shoulder,to:a.armhole,x:a.armhole.x+e+15}),d("vd",{id:"hSide",from:a.armhole,to:a.hem,x:a.hem.x+e+15}),n.dart&&(d("vd",{id:"hDart",from:a.endDart,to:a.startDart,x:a.endDart.x+e+15}),d("ld",{id:"pDartStart",from:a.dartTip,to:a.startDart,d:-e-15}),d("ld",{id:"pDartEnd",from:a.dartTip,to:a.endDart,d:e+15}));return r.bustPoint=new s("notch",a.bust),Ut(m,n.sideSeamWithDart),m}};const Qt={name:"bibi.armholeBinding",after:[Xt,Vt],options:{bindingHeight:{pct:2.5,min:1.25,max:5,menu:"style",snap:{metric:[10,15,20,25,30],imperial:[12.7,19.05,25.4,31.75,38.1]},toAbs:(t,{measurements:e})=>(e.hpsToWaistBack+e.waistToHips)*t}},draft:function({part:t,store:e,points:o,macro:a}){if(e.separateSleeves)return t.hide();return $t(t,e.armholeSizeBack+e.armholeSizeFront),e.cutlist.setCut({cut:2,from:"ribbing",identical:!0}),a("title",{at:o.title,nr:4,scale:.5,rotation:90,title:"armholeBinding"}),t}};const qt={name:"bibi.neckBinding",after:[Xt,Vt],options:{bindingHeight:{pct:2.5,min:1.25,max:5,menu:"style",snap:{metric:[10,15,20,25,30],imperial:[12.7,19.05,25.4,31.75,38.1]},toAbs:(t,{measurements:e})=>(e.hpsToWaistBack+e.waistToHips)*t}},draft:function({part:t,store:e,points:o,macro:a}){return $t(t,2*(e.neckSizeBack+e.neckSizeFront)),e.cutlist.setCut({cut:1,from:"ribbing"}),a("title",{at:o.title,nr:3,scale:.5,rotation:90,title:"neckBinding"}),t}};const Zt=new n.pT({data:Lt,parts:[zt,Jt,Qt,qt,Kt,Vt,Xt]}),te=(0,n.D4)([_,Pt],{o:{drop:["sleeveLengthBonus"]}}),ee=JSON.parse('{"id":"bob","name":"Bob the bib","code":"Joost De Cock","description":"A FreeSewing pattern for a bib","design":"Joost De Cock","difficulty":3,"tags":["accessories","infants"],"techniques":["bias-tape","curved-seam","snap"],"version":"4.6.0","pkg":"@freesewing/bob","collection":true}'),oe={name:"bob.bib",measurements:[],optionalMeasurements:["head"],options:{neckRatio:{pct:80,min:70,max:90,menu:"fit"},widthRatio:{pct:45,min:35,max:55,menu:"fit"},lengthRatio:{pct:75,min:55,max:85,menu:"fit"},headSize:{pct:100,min:10,max:200,snap:5,menu:"size"}},draft:({Point:t,points:e,Path:o,paths:a,utils:i,measurements:n,options:s,macro:r,complete:l,snippets:c,Snippet:p,store:d,units:h,part:m})=>{const f=("head"in n?n.head:360)*s.headSize,u=f*s.neckRatio/4;let g,b=1;do{e.right=new t(b*f/10,0),e.bottom=new t(0,b*f/12),e.rightCp1=e.right.shift(90,e.bottom.dy(e.right)/2),e.bottomCp2=e.bottom.shift(0,e.bottom.dx(e.right)/2),a.neck=(new o).move(e.right).curve(e.rightCp1,e.bottomCp2,e.bottom),g=a.neck.length()-u,b*=g>0?.99:1.02}while(Math.abs(g)>1);e.rightCp2=e.rightCp1.flipY(),e.bottomCp1=e.bottomCp2.flipX(),e.left=e.right.flipX(),e.leftCp1=e.rightCp2.flipX(),e.leftCp2=e.rightCp1.flipX(),e.top=e.bottom.flipY(),e.topCp1=e.bottomCp2.flipY(),e.topCp2=e.bottomCp1.flipY();let w=f*s.widthRatio,k=f*s.lengthRatio;e.topLeft=new t(w/-2,e.top.y-(w/2-e.right.x)),e.topRight=e.topLeft.shift(0,w),e.bottomLeft=e.topLeft.shift(-90,k),e.bottomRight=e.topRight.shift(-90,k),e.edgeLeft=new t(e.topLeft.x,e.left.y),e.edgeRight=new t(e.topRight.x,e.right.y),e.edgeTop=new t(0,e.topLeft.y),e.edgeLeftCp=e.edgeLeft.shiftFractionTowards(e.topLeft,.5),e.edgeRightCp=e.edgeLeftCp.flipX(),e.edgeTopLeftCp=e.edgeTop.shiftFractionTowards(e.topLeft,.5),e.edgeTopRightCp=e.edgeTopLeftCp.flipX();let C=e.edgeTop.dy(e.top);e.tipRight=e.edgeTop.translate(C/2,C/2),e.tipRightTop=new t(e.tipRight.x,e.edgeTop.y),e.tipRightBottom=new t(e.tipRight.x,e.top.y);const v={tipRightTop:r("round",{id:"tipRightTop",from:e.edgeTop,to:e.tipRight,via:e.tipRightTop}),tipRightBottom:r("round",{id:"tipRightBottom",from:e.tipRight,to:e.top,via:e.tipRightBottom})};for(const x in v)for(const t of["start","cp1","cp2","end"])e[`${x}${i.capitalize(t)}`]=e[v[x].points[t]].copy();let y=["edgeTopLeftCp","edgeTop","tipRight","tipRightTop","tipRightTopStart","tipRightTopCp1","tipRightTopCp2","tipRightTopEnd","tipRightBottomStart","tipRightBottomCp1","tipRightBottomCp2","tipRightBottomEnd","tipRightBottom","top","topCp2"];for(;e.tipRightBottomStart.x>-1;)for(let t of y)e[t]=e[t].rotate(1,e.edgeLeft);e.snapLeft=e.top.shiftFractionTowards(e.edgeTop,.5),e.edgeTopRightCp=e.edgeTopLeftCp.flipX(),e.topCp1=e.topCp2.flipX(),e.tipLeftTopStart=e.tipRightTopStart.flipX(),e.tipLeftTopCp1=e.tipRightTopCp1.flipX(),e.tipLeftTopCp2=e.tipRightTopCp2.flipX(),e.tipLeftTopEnd=e.tipRightTopEnd.flipX(),e.tipLeftBottomStart=e.tipRightBottomStart.flipX(),e.tipLeftBottomCp1=e.tipRightBottomCp1.flipX(),e.tipLeftBottomCp2=e.tipRightBottomCp2.flipX(),e.tipLeftBottomEnd=e.tipRightBottomEnd.flipX(),e.snapRight=e.snapLeft.flipX();const T={bottomLeft:r("round",{id:"bottomLeft",from:e.topLeft,to:e.bottomRight,via:e.bottomLeft,radiu
1s:e.bottomRight.x/4}),bottomRight:r("round",{id:"bottomRight",from:e.bottomLeft,to:e.topRight,via:e.bottomRight,radius:e.bottomRight.x/4})};for(const x in T)for(const t of["start","cp1","cp2","end"])e[`${x}${i.capitalize(t)}`]=e[T[x].points[t]].copy();return a.seam=(new o).move(e.edgeLeft).line(e.bottomLeftStart).curve(e.bottomLeftCp1,e.bottomLeftCp2,e.bottomLeftEnd).line(e.bottomRightStart).curve(e.bottomRightCp1,e.bottomRightCp2,e.bottomRightEnd).line(e.edgeRight).curve(e.edgeRightCp,e.edgeTopRightCp,e.tipLeftTopStart).curve(e.tipLeftTopCp1,e.tipLeftTopCp2,e.tipLeftTopEnd).curve(e.tipLeftBottomCp1,e.tipLeftBottomCp2,e.tipLeftBottomEnd).curve(e.topCp1,e.rightCp2,e.right).curve(e.rightCp1,e.bottomCp2,e.bottom).curve(e.bottomCp1,e.leftCp2,e.left).curve(e.leftCp1,e.topCp2,e.tipRightBottomEnd).curve(e.tipRightBottomCp2,e.tipRightBottomCp1,e.tipRightBottomStart).curve(e.tipRightTopCp2,e.tipRightTopCp1,e.tipRightTopStart).curve(e.edgeTopLeftCp,e.edgeLeftCp,e.edgeLeft).close().attr("class","fabric"),d.flag.note({msg:"bob:biasTapeLength",replace:{l:h(a.seam.length())}}),d.cutlist.addCut({cut:1,from:"fabric"}),c.snapStud=new p("snap-stud",e.snapLeft),c.snapSocket=new p("snap-socket",e.snapRight).attr("opacity",.5),l&&(a.bias=a.seam.offset(-5).attr("class","note dashed").attr("data-text","bob:finishWithBiasTape").attr("data-text-class","center fill-note")),e.title=e.bottom.shift(-90,45),r("title",{at:e.title,nr:1,title:"bib",align:"center",scale:.8}),e.scalebox=e.title.shift(-90,65),r("scalebox",{at:e.scalebox}),e.logo=new t(0,0),c.logo=new p("logo",e.logo),r("hd",{id:"wFull",from:e.bottomLeftStart,to:e.bottomRightEnd,y:e.bottomLeft.y+15}),r("vd",{id:"hBottomToOpeningBottom",from:e.bottomRightStart,to:e.bottom,x:e.bottomRight.x+15}),r("vd",{id:"hBottomToOpeningCenter",from:e.bottomRightStart,to:e.right,x:e.bottomRight.x+30}),r("vd",{id:"hTotal",from:e.bottomRightStart,to:e.tipLeftTopStart,x:e.bottomRight.x+45}),r("hd",{id:"wOpening",from:e.left,to:e.right,y:e.left.y+25}),r("ld",{id:"wStrap",from:e.tipLeftBottomEnd,to:e.tipLeftTopStart,d:-15}),m}},ae={en:JSON.parse('{"t":"Bob the bib","d":"This is the bib that you can create by following our design tutorial","p":{"bib":"Bib"},"s":{"biasTapeLength.t":"Bias tape: {{{ l }}}","biasTapeLength.d":"To finish the edge, you will need {{{ l }}} of [bias tape](/docs/sewing/bias-tape)","fabricNeeded":"You need a {{{ w }}} by {{{ h }}} piece of [suitable fabric](/docs/designs/bob/fabric) to make this bib","finishWithBiasTape":"Finish raw edge with bias tape"},"o":{"neckRatio":{"t":"Neck opening","d":"Controls the size of the neck opening relative to the bib size"},"widthRatio":{"t":"Width","d":"Controls the width of the bib"},"lengthRatio":{"t":"Length","d":"Controls the length of the bib"},"headSize":{"t":"Head size","d":"The head circumference you want the bib to accommodate"}}}')},ie=new n.pT({data:ee,parts:[oe]}),ne=JSON.parse('{"id":"breanna","name":"Breanna body block","code":"Joost De Cock","description":"A FreeSewing pattern for a basic body block for womenswear","design":"Joost De Cock","difficulty":3,"tags":["blocks","tops"],"techniques":["block","dart"],"block":true,"version":"4.6.0","pkg":"@freesewing/breanna","collection":true}');const se=(t,e)=>!!e?.shoulderDart&&"fit",re=(t,e)=>!(!e?.waistDart&&void 0!==e?.waistDart)&&"fit",le={name:"breanna.base",hide:{self:!0},measurements:["biceps","bustFront","bustSpan","highBust","highBustFront","hpsToBust","hpsToWaistBack","hpsToWaistFront","waist","waistToHips","neck","shoulderToShoulder","shoulderSlope"],options:{collarFactor:4.8,armholeDepthBase:.6,shoulderSeamLength:.95,sleeveWidthGuarantee:.9,breannaFitSleeve:!0,breannaFitCollar:!0,shoulderDart:{bool:!1,menu:"fit"},waistDart:{bool:!0,menu:"fit"},primaryBustDart:{list:["06:00","07:00","08:00","09:00","10:00","11:00","11:30","12:00","12:30","13:00","13:30","14:00","15:00","16:00","17:00"],dflt:"06:00",doNotTranslate:!0,menu:"style"},secondaryBustDart:{list:["none","06:00","07:00","08:00","09:00","10:00","11:00","11:30","12:00","12:30","13:00","13:30","14:00","15:00","16:00","17:00"],dflt:"13:30",doNotTranslate:!0,menu:"style"},acrossBackFactor:{pct:96,min:93,max:100,menu:"advanced"},armholeDepthFactor:{pct:100,min:80,max:120,menu:"advanced"},backNeckCutout:{pct:5,min:2,max:8,menu:"advanced"},bicepsEase:{pct:15,min:0,max:50,...(0,n.Wx)("biceps"),menu:"fit"},shoulderDartSize:{pct:7,min:4,max:10,menu:se},shoulderDartLength:{pct:85,min:60,max:100,menu:se},waistDartSize:{pct:10,min:4,max:15,menu:re},waistDartLength:{pct:85,min:60,max:100,menu:re},verticalEase:{pct:2,min:0,max:8,menu:"fit"},frontArmholeDeeper:{pct:1,min:0,max:5,menu:"advanced"},shoulderEase:{pct:0,min:0,max:4,...(0,n.Wx)("shoulderToShoulder"),menu:"fit"},collarEase:{pct:3.5,min:0,max:10,...(0,n.Wx)("neck"),menu:"fit"},chestEase:{pct:10,min:5,max:20,...(0,n.Wx)("chest"),menu:"fit"},waistEase:{pct:10,min:5,max:20,...(0,n.Wx)("waist"),menu:"fit"},primaryBustDartShaping:{pct:50,min:25,max:75,menu:"style"},primaryBustDartLength:{pct:85,min:65,max:95,menu:"style"},secondaryBustDartLength:{pct:85,min:65,max:95,menu:"style"},shoulderSlopeReduction:{pct:0,min:0,max:100,menu:"advanced"},frontScyeDart:{pct:25,min:0,max:45,menu:"fit"}},draft:function({store:t,points:e,Point:o,measurements:a,options:i,utils:n,part:s}
1){return e.hps=new o(a.neck*(1+i.collarEase)/i.collarFactor,0),t.set("shoulderEase",a.shoulderToShoulder*i.shoulderEase/2),e.shoulder=n.beamsIntersect(e.hps,e.hps.shift(-1*a.shoulderSlope,100),new o(a.shoulderToShoulder/2+t.get("shoulderEase"),-100),new o(a.shoulderToShoulder/2+t.get("shoulderEase"),100)),e.cbHps=new o(0,0),e.cbNeck=new o(0,i.backNeckCutout*a.neck),e.cbWaist=new o(0,a.hpsToWaistBack*(1+i.verticalEase)),e.cbHips=new o(0,(a.hpsToWaistBack+a.waistToHips)*(1+i.verticalEase)),e.shoulder.y-=(e.shoulder.y-e.cbHps.y)*i.shoulderSlopeReduction,e.shoulder.y<e.cbHps.y&&(e.shoulder=new o(e.shoulder.x,0)),e.shoulderNoEase=e.shoulder.clone(),e.hpsCp2=n.beamIntersectsY(e.hps,e.hps.shiftTowards(e.shoulder,10).rotate(-90,e.hps),e.cbNeck.y),e.waist=e.cbWaist.shift(0,a.waist*(1+i.waistEase)/4),e.armhole=new o((a.highBust-a.highBustFront)*(1+i.chestEase)/2,(e.shoulder.y+a.biceps*i.armholeDepthBase)*i.armholeDepthFactor*(1+i.verticalEase)*(1+i.bicepsEase)),e.armholePitch=new o(e.shoulder.x*i.acrossBackFactor,e.armhole.y/2),e.armholeCp2=n.beamIntersectsX(e.armhole,e.armhole.shift(e.armhole.angle(e.waist)-90,10),e.armholePitch.x),e.shoulderCp1=e.shoulder.shiftTowards(e.hps,e.shoulder.dist(e.armholePitch)/8).rotate(90,e.shoulder),e.armholePitchCp2=e.armholePitch.shift(90,e.shoulder.dist(e.armholePitch)/3),e.armholePitchCp1=e.armholePitchCp2.rotate(180,e.armholePitch),s}};const ce={from:le,name:"breanna.back",draft:function({sa:t,points:e,Path:o,paths:a,Snippet:i,snippets:n,macro:s,Point:r,options:l,utils:c,store:p,part:d}){if(l.shoulderDart){e.shoulderDartCenter=e.hps.shiftFractionTowards(e.shoulder,.5),e.shoulderDartTarget=c.beamIntersectsY(e.shoulderDartCenter,e.hps.rotate(90,e.shoulderDartCenter),e.armholePitch.y),e.shoulderDart2=e.shoulderDartCenter.shiftFractionTowards(e.hps,l.shoulderDartSize),e.shoulderDart1=e.shoulderDart2.rotate(180,e.shoulderDartCenter),e.shoulderDartTip=e.shoulderDartCenter.shiftFractionTowards(e.shoulderDartTarget,l.shoulderDartLength),e.shoulderDartEdge=c.beamsIntersect(e.shoulderDart1,e.shoulderDartTip.rotate(90,e.shoulderDart1),e.shoulderDart2,e.shoulderDartTip.rotate(90,e.shoulderDart2));let t=e.hps.angle(e.shoulder),o=e.shoulderDart1.dist(e.shoulderDart2);e.shoulder=e.shoulder.shift(t,o),e.shoulderCp1=e.shoulderCp1.shift(t,o),e.armholePitch=c.beamIntersectsY(e.armholePitchCp1,e.shoulderCp1,e.armholePitch.y),e.armholePitchCp2=e.armholePitchCp1.rotate(180,e.armholePitch)}if(l.waistDart&&(e.waistDartCenter=e.cbWaist.shift(0,e.waist.x/2+e.waist.x*l.waistDartSize),e.waistDartTarget=new r(e.waistDartCenter.x,1.1*e.armhole.y),e.waistDartTip=e.waistDartCenter.shiftFractionTowards(e.waistDartTarget,l.waistDartLength),e.waistDart1=e.waistDartCenter.shift(180,e.waist.x*l.waistDartSize/2),e.waistDart2=e.waistDart1.rotate(180,e.waistDartCenter),e.waist=e.waist.shift(0,e.waist.x*l.waistDartSize),e.waistDartEdge=c.beamsIntersect(e.waistDart1,e.
1waistDartTarget.rotate(90,e.waistDart1),e.waistDart2,e.waistDartTarget.rotate(90,e.waistDart2))),a.seam=(new o).move(e.cbNeck).line(e.cbWaist).noop("waistDart").line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).noop("shoulderDart").line(e.hps).curve_(e.hpsCp2,e.cbNeck),a.saBase=a.seam.clone(),l.waistDart){let t=(new o).line(e.waistDart1).line(e.waistDartTip).line(e.waistDart2);a.seam=a.seam.insop("waistDart",t);let i=(new o).line(e.waistDart1).line(e.waistDartEdge).line(e.waistDart2);a.saBase=a.saBase.insop("waistDart",i),a.waistDartHint=(new o).move(e.waistDart1).line(e.waistDartEdge).line(e.waistDart2).attr("class","fabric dotted stroke-sm")}if(l.shoulderDart){let t=(new o).line(e.shoulderDart2).line(e.shoulderDartTip).line(e.shoulderDart1);a.seam=a.seam.insop("shoulderDart",t);let i=(new o).line(e.shoulderDart1).line(e.shoulderDartEdge).line(e.shoulderDart2);a.saBase=a.saBase.insop("shoulderDart",i),a.shoulderDartHint=(new o).move(e.shoulderDart1).line(e.shoulderDartEdge).line(e.shoulderDart2).attr("class","fabric dotted stroke-sm")}a.seam.close().attr("class","fabric"),a.saBase.close(),a.saBase.hide(),l.shoulderDart?p.set("backShoulderSeamLength",e.hps.dist(e.shoulderDart1)+e.shoulder.dist(e.shoulderDart2)):p.set("backShoulderSeamLength",e.hps.dist(e.shoulder)),l.waistDart?p.set("backWaistLength",2*(e.cbWaist.dist(e.waistDart1)+e.waistDart2.dist(e.waist))):p.set("backWaistLength",2*e.cbWaist.dist(e.waist)),p.set("backArmholeToArmholePitch",(new o).move(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).length()),p.set("backArmholeLength",(new o).move(e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).length()+p.get("backArmholeToArmholePitch")),p.set("backSideSeamLength",e.armhole.dist(e.waist)),p.set("backCollarLength",2*(new o).move(e.cbNeck)._curve(e.hpsCp2,e.hps).length()),t&&(a.sa=a.saBase.offset(t).attr("class","sa")),e.gridAnchor=e.cbNeck.clone();const h=.1*(e.armhole.x-e.cbNeck.x);if(s("grainline",{from:e.cbNeck.shift(0,h),to:e.cbWaist.shift(0,h)}),p.cutlist.addCut({cut:2,from:"fabric",onFold:!0}),e.title=new r(e.armhole.x/4,e.armhole.y-60),s("title",{nr:1,title:"back",at:e.title}),e.logo=new r(e.armhole.x/1.5,e.armhole.y),n.logo=new i("logo",e.logo),n.armholePitch=new i("bnotch",e.armholePitch),s("vd",{id:"hCBackHemToCBackNeck",from:e.cbWaist,to:e.cbNeck,x:-15-t}),l.waistDart){let o=e.waist.y+15+t;s("hd",{id:"wCBackHemToWaistDartInner",from:e.cbWaist,to:e.waistDart1,y:o}),s("hd",{id:"wCBackHemToWaistDartCenter",from:e.cbWaist,to:e.waistDartEdge,y:o+15}),s("hd",{id:"wCBackHemToWaistDartOuter",from:e.cbWaist,to:e.waistDart2,y:o+30}),s("hd",{id:"wHemFull",from:e.cbWaist,to:e.waist,y:o+45}),s("hd",{id:"wCBackHemToArmhole",from:e.cbWaist,to:e.armhole,y:o+60}),s("vd",{id:"hWaistDart",from:e.waistDart2,to:e.waistDartTip,x:e.waistDart2.x+15})}else{let o=e.waist.y+15+t;s("hd",{id:"wCBackToSide",from:e.cbWaist,to:e.waist,y:e.waist.y+15+t}),s("hd",{id:"wCBackToArmhole",from:e.cbWaist,to:e.armhole,y:o+30})}let m=e.armhole.x+15+t;return s("vd",{id:"hHemToArmhole",from:e.waist,to:e.armhole,x:m}),s("vd",{id:"hHemToArmholePitch",from:e.waist,to:e.armholePitch,x:m+15}),s("vd",{id:"hHemToShoulder",from:e.waist,to:e.shoulder,x:m+30}),s("vd",{id:"hHemToHps",from:e.waist,to:e.hps,x:m+45}),s("hd",{id:"wCBackToArmholePitch",from:e.cbNeck,to:e.armholePitch,y:e.armholePitch.y+25}),s("hd",{id:"wCBackToHps",from:e.cbNeck,to:e.hps,y:e.hps.y-t-15}),s("hd",{id:"wCBacktoShoulder",from:e.cbNeck,to:e.shoulder,y:e.hps.y-t-30}),d}};const pe={name:"breanna.frontBase",hide:{self:!0},from:le,after:ce,draft:function({points:t,Path:e,paths:o,Point:a,measurements:i,options:n,utils:s,store:r,part:l}){if(t.cfHps=t.cbHps.clone(),t.cfNeck=t.hps.rotate(-90,t.cfHps),n.breannaFitCollar){let o=0,a=0,l=r.get("backCollarLength"),
1c=i.neck*(1+n.collarEase);do{t.cfNeck=t.cfNeck.shift(90,o/1.5),t.hpsCp2=s.beamIntersectsY(t.hps,t.hps.shiftTowards(t.shoulder,10).rotate(-90,t.hps),t.cfNeck.y),a=2*(new e).move(t.hps).curve_(t.hpsCp2,t.cfNeck).length(),o=a+l-c}while(Math.abs(o)>1)}else t.hpsCp2=s.beamIntersectsY(t.hps,t.hps.shiftTowards(t.shoulder,10).rotate(-90,t.hps),t.cfNeck.y);if(n.frontArmholeDeeper>0)for(let d of["armholePitch","armholePitchCp1","armholePitchCp2"])t[d].x-=i.shoulderToShoulder*n.frontArmholeDeeper/2;t.cfBust=new a(0,i.hpsToBust*(1+n.verticalEase)),t.bustSide=new a(i.bustFront*(1+n.chestEase)/2,t.cfBust.y),t.bustPoint=t.cfBust.shift(0,i.bustSpan/2);let c=t.armhole.dx(t.bustSide)*t.armholePitch.dy(t.armhole)/t.armholePitch.dy(t.bustSide);t.armhole=t.armhole.shift(0,c),t.cfWaist=new a(0,i.hpsToWaistFront*(1+n.verticalEase)),t.waist=s.beamIntersectsY(t.armhole,t.bustSide,t.cfWaist.y),t.waist=t.armhole.shiftTowards(t.waist,r.get("backSideSeamLength"));for(let d of["Center","Tip","Target","Left"])delete t["waistDart"+d];t.primaryBustDartCenter=s.beamsIntersect(t.cfWaist,t.waist,t.bustPoint,t.bustPoint.shift(t.cfWaist.angle(t.waist)+90,10)),t.primaryBustDartTip=t.bustPoint.clone();let p=2*t.cfWaist.dist(t.waist)-r.get("backWaistLength");if(t.primaryBustDart1=t.primaryBustDartCenter.shiftTowards(t.cfWaist,p/4),t.primaryBustDart2=t.primaryBustDart1.rotate(180,t.primaryBustDartCenter),n.frontScyeDart){let e=t.bustPoint.angle(t.armhole),o=t.bustPoint.angle(t.armholePitch),a=t.bustPoint.shift(e+(o-e)/2,6.66*i.highBustFront),r=a.shiftFractionTowards(t.bustPoint,2);t.scyeDart1=s.lineIntersectsCurve(a,r,t.armhole,t.armholeCp2,t.armholePitchCp1,t.armholePitch);let l=(i.bustFront-i.highBustFront)*n.frontScyeDart;t.scyeDart2=t.scyeDart1.shiftTowards(t.bustPoint,l).rotate(90,t.scyeDart1);let c=t.bustPoint.angle(t.scyeDart1)-t.bustPoint.angle(t.scyeDart2),p=["armholeCp2","armhole","waist","primaryBustDart2"];for(let i of p)t[i]=t[i].rotate(c,t.bustPoint);t.primaryBustDartCenter=t.primaryBustDartCenter.rotate(c/2,t.bustPoint)}return r.set("bustDartAngle",Math.abs(t.primaryBustDartTip.angle(t.primaryBustDart1)-t.primaryBustDartTip.angle(t.primaryBustDart2))),r.set("frontArmholeToArmholePitch",(new e).move(t.armhole).curve(t.armholeCp2,t.armholePitchCp1,t.armholePitch).length()),r.set("frontArmholeLength",(new e).move(t.armholePitch).curve(t.armholePitchCp2,t.shoulderCp1,t.shoulder).length()+r.get("frontArmholeToArmholePitch")),o.seam=(new e).move(t.cfNeck).line(t.cfWaist).line(t.primaryBustDart1).line(t.bustPoint).line(t.primaryBustDart2).line(t.waist).line(t.armhole).curve(t.armholeCp2,t.armholePitchCp1,t.armholePitch).curve(t.armholePitchCp2,t.shoulderCp1,t.shoulder).line(t.hps).curve_(t.hpsCp2,t.cfNeck).close(),l}};function de(t,e,o,a){let i=t.bustPoint;switch(o){case 700:return t.cfWaist.clone();case 800:return t.cfBust.clone();case 900:return e.beamIntersectsX(i,t.cfBust.rotate(-.5*a,i),0);case 1e3:return e.beamIntersectsX(i,t.cfBust.rotate(-1*a,i),0);case 1100:return t.cfNeck.clone();case 1130:return t.hps.clone();case 1200:return t.hps.shiftFractionTowards(t.shoulder,.5);case 1230:return t.shoulder.clone();case 1300:return t.armholePitch.clone();case 1330:return t.armhole.clone();case 1400:return t.bustSide.clone();case 1500:return e.beamsIntersect(i,t.bustSide.rotate(-.5*a,i),t.armhole,t.waist);case 1600:return e.beamsIntersect(i,t.bustSide.rotate(-1*a,i),t.armhole,t.waist);case 1700:return t.waist.clone();default:return!1}}const he=(t,e)=>{let o=[(new t).line(e.primaryBustDart1).line(e.primaryBustDartTip).line(e.primaryBustDart2)];return"secondaryBustDart1"in e&&o.push((new t).line(e.secondaryBustDart1).line(e.secondaryBustDartTip).line(e.secondaryBustDart2)),o},me=(t,e)=>{let o=[(new t).line(e.primaryBustDart1).line(e.primaryBustDartEdge).line(e.primaryBustDart2)];return"secondaryBustDart1"in e&&o.push((new t).line(e.secondaryBustDart1).line(e.secondaryBustDartEdge).line(e.secondaryBustDart2)),o};function fe(t,e,o){t.primaryBustDartEdge=o.beamsIntersect(t.primaryBustDart1,t.primaryBustDartTip.rotate(90,t.primaryBustDart1),t.primaryBustDart2,t.primaryBustDartTip.rotate(90,t.primaryBustDart2)),t.primaryBustDartTip=t.primaryBustDartEdge.shiftFractionTowards(t.primaryBustDartTip,e.primaryBustDartLength),void 0!==t.secondaryBustDart1&&(t.secondaryBustDartEdge=o.beamsIntersect(t.secondaryBustDart1,t.secondaryBustDartTip.rotate(90,t.secondaryBustDart1),t.secondaryBustDart2,t.secondaryBustDartTip.rotate(90,t.secondaryBustDart2)),t.secondaryBustDartTip=t.secondaryBustDartEdge.shiftFractionTowards(t.secondaryBustDartTip,e.secondaryBustDartLength))}const ue={name:"breanna.front",from:pe,after:ce,draft:function({options:t,store:e,utils:o,points:a,Path:i,paths:n,sa:s,macro:r,snippets:l,Snippet:c,part:p}){let[d,h]=function(t){let e=t.primaryBustDart,o=t.secondaryBustDart;return e=Number(e.slice(0,2)+e.slice(-2)),"none"===o?[e,0]:(o=Number(o.slice(0,2)+o.slice(-2)),e>o?[o,e]:[e,o])}(t);
1e.set("primaryBustDartLocation",d),e.set("secondaryBustDartLocation",h);let m=e.get("bustDartAngle");if(a.origBustDart1=a.primaryBustDart1.clone(),a.origBustDart2=a.primaryBustDart2.clone(),600!==d){a.primaryBustDart1=de(a,o,d,m),a.primaryBustDart2=a.primaryBustDart1.rotate(m,a.primaryBustDartTip);for(let t of function(t){let e=["cfWaist"];return t>=1100&&e.push("cfNeck"),t>=1130&&e.push("hpsCp2"),t>=1200&&e.push("hps"),t>=1300&&e.push("shoulder","shoulderCp1","armholePitchCp2"),t>=1330&&e.push("armholeCp2","armholePitchCp1","armholePitch"),t>=1400&&e.push("armhole"),e}(d))a[t]=a[t].rotate(m,a.primaryBustDartTip);if(d>=1100){let t=270-a.cfNeck.angle(a.cfWaist);for(let e in a)a[e]=a[e].rotate(t,a.cfNeck)}}if(0===h||d===h){fe(a,t,o);let e=function(t){let{points:e,Path:o,store:a}=t.shorthand();switch(a.get("primaryBustDartLocation")){case 600:return(new o).move(e.cfNeck).line(e.cfWaist).noop("primary").line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 700:return(new o).move(e.cfNeck).noop("primary").line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 800:case 900:case 1e3:return(new o).move(e.cfNeck).noop("primary").line(e.cfWaist).line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1100:return(new o).move(e.primaryBustDart1).noop("primary").line(e.cfWaist).line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.primaryBustDart1);case 1130:return(new o).move(e.cfNeck).line(e.cfWaist).line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).noop("primary").curve_(e.hpsCp2,e.cfNeck);case 1200:case 1230:return(new o).move(e.cfNeck).line(e.cfWaist).line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).noop("primary").line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1300:return(new o).move(e.cfNeck).line(e.cfWaist).line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).noop("primary").curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1330:return(new o).move(e.cfNeck).line(e.cfWaist).line(e.waist).line(e.armhole).noop("primary").curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1400:case 1500:case 1600:case 1700:return(new o).move(e.cfNeck).line(e.cfWaist).line(e.waist).noop("primary").line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck)}}(p),[s]=he(i,a),[r]=me(i,a);n.seam=e.insop("primary",s),n.saBase=e.insop("primary",r)}else{m*=1-t.primaryBustDartShaping,a.secondaryBustDart1=de(a,o,h,m),a.secondaryBustDart2=a.secondaryBustDart1.rotate(m,a.primaryBustDartTip),a.secondaryBustDartTip=a.primaryBustDartTip.clone();for(let t of function(t,e){let o=["primaryBustDart1"];return t<=700&&e>=800&&o.push("cfWaist"),t<=1e3&&e>=1100&&o.push("cfNeck"),t<=1100&&e>=1130&&o.push("hpsCp2"),t<=1130&&e>=1200&&o.push("hps"),t<=1230&&e>=1300&&o.push("shoulder","shoulderCp1","armholePitchCp2"),t<=1300&&e>=1330&&o.push("armholeCp2","armholePitchCp1","armholePitch"),t<=1330&&e>=1400&&o.push("armhole"),o}(d,h))a[t]=a[t].rotate(m,a.secondaryBustDartTip);fe(a,t,o);let e,s=270-a.cfNeck.angle(700===d?a.primaryBustDart1:a.cfWaist);for(let t in a)a[t]=a[t].rotate(s,a.cfNeck);e=d<=600?function(t){let{points:e,Path:o,store:a}=t.shorthand();switch(a.get("secondaryBustDartLocation")){case 700:return(new o).move(e.cfNeck).noop("secondary").noop("primary").line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 800:case 900:case 1e3:return(new o).move(e.cfNeck).noop("secondary").line(e.cfWaist).noop("primary").line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1100:return(new o).move(e.cfNeck).line(e.cfWaist).noop("primary").line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.secondaryBustDart1).noop("secondary");case 1130:return(new o).move(e.cfNeck).line(e.cfWaist).noop("primary").line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).noop("secondary").curve_(e.hpsCp2,e.cfNeck);case 1200:return(new o).move(e.cfNeck).line(e.cfWaist).noop("primary").line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.secondaryBustDart1).noop("secondary").line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1230:return(new o).move(e.cfNeck).line(e.cfWaist).noop("primary").line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).noop("secondary").line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1300:return(new o).move(e.cfNeck).line(e.cfWaist).noop("primary").line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).noop("secondary").curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1330:return(new o).move(e.cfNeck).line(e.cfWaist).noop("primary").line(e.waist).line(e.armhole).noop("secondary").curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1400:case 1500:case 1600:return(new o).move(e.cfNeck).line(e.cfWaist).noop("primary").line(e.waist).line(e.secondaryBustDart1).noop("secondary").line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1700:return(new o).move(e.cfNeck).line(e.cfWaist).noop("primary").line(e.waist).noop("secondary").line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);default:return new o}}(p):d<=700?function(t){let{points:e,Path:o,store:a}=t.shorthand();switch(a.get("secondaryBustDartLocation")){case 800:case 900:case 1e3:return(new o).move(e.cfNeck).noop("secondary").noop("primary").line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1100:return(new o).move(e.cfNeck).noop("primary").line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.secondaryBustDart1).noop("secondary");case 1130:return(new o).move(e.cfNeck).noop("primary").line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).noop("secondary").curve_(e.hpsCp2,e.cfNeck);case 1200:return(new o).move(e.cfNeck).noop("primary").line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.secondaryBustDart1).noop("secondary").line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1230:return(new o).move(e.cfNeck).noop("primary").line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).noop("secondary").line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1300:return(new o).move(e.cfNeck).noop("primary").line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).noop("secondary").curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1330:return(new o).move(e.cfNeck).noop("primary").line(e.waist).line(e.armhole).noop("secondary").curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1400:case 1500:case 1600:return(new o).move(e.cfNeck).noop("primary").line(e.waist).line(e.secondaryBustDart1).noop("secondary").line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1700:return(new o).move(e.cfNeck).noop("primary").line(e.waist).noop("secondary").line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);default:return new o}}(p):d<=1e3?function(t){let{points:e,Path:o,store:a}=t.shorthand();switch(a.get("secondaryBustDartLocation")){case 900:case 1e3:return(new o).move(e.cfNeck).noop("secondary").line(e.primaryBustDart1).noop("primary").line(e.cfWaist).line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1100:return(new o).move(e.secondaryBustDart1).noop("secondary").line(e.primaryBustDart1).noop("primary").line(e.cfWaist).line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.secondaryBustDart1);case 1130:return(new o).move(e.cfNeck).line(e.primaryBustDart1).noop("primary").line(e.cfWaist).line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).noop("secondary").curve_(e.hpsCp2,e.cfNeck);case 1200:return(new o).move(e.cfNeck).noop("primary").line(e.cfWaist).line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.secondaryBustDart1).noop("secondary").line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1230:return(new o).move(e.cfNeck).noop("primary").line(e.cfWaist).line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).noop("secondary").line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1300:return(new o).move(e.cfNeck).noop("primary").line(e.cfWaist).line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).noop("secondary").curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1330:return(new o).move(e.cfNeck).noop("primary").line(e.cfWaist).line(e.waist).line(e.armhole).noop("secondary").curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1400:case 1500:case 1600:return(new o).move(e.cfNeck).noop("primary").line(e.cfWaist).line(e.waist).line(e.secondaryBustDart1).noop("secondary").line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1700:return(new o).move(e.cfNeck).noop("primary").line(e.cfWaist).line(e.waist).noop("secondary").line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);default:return new o}}(p):d<=1100?function(t){let{points:e,Path:o,store:a}=t.shorthand();switch(a.get("secondaryBustDartLocation")){case 1130:return(new o).move(e.primaryBustDart1).noop("primary").line(e.cfWaist).line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).noop("secondary").curve_(e.hpsCp2,e.primaryBustDart1);case 1200:return(new o).move(e.primaryBustDart1).noop("primary").line(e.cfWaist).line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.secondaryBustDart1).noop("secondary").line(e.hps).curve_(e.hpsCp2,e.primaryBustDart1);case 1230:return(new o).move(e.primaryBustDart1).noop("primary").line(e.cfWaist).line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).noop("secondary").line(e.hps).curve_(e.hpsCp2,e.primaryBustDart1);case 1300:return(new o).move(e.primaryBustDart1).noop("primary").line(e.cfWaist).line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).noop("secondary").curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.primaryBustDart1);case 1330:return(new o).move(e.primaryBustDart1).noop("primary").line(e.cfWaist).line(e.waist).line(e.armhole).noop("secondary").curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.primaryBustDart1);case 1400:case 1500:case 1600:return(new o).move(e.primaryBustDart1).noop("primary").line(e.cfWaist).line(e.waist).line(e.secondaryBustDart1).noop("secondary").line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.primaryBustDart1);case 1700:return(new o).move(e.primaryBustDart1).noop("primary").line(e.cfWaist).line(e.waist).noop("secondary").line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.primaryBustDart1);default:return new o}}(p):d<=1130?function(t){let{points:e,Path:o,store:a}=t.shorthand();switch(a.get("secondaryBustDartLocation")){case 1200:return(new o).move(e.cfNeck).line(e.cfWaist).line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).noop("secondary").line(e.primaryBustDart1).noop("primary").line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1230:return(new o).move(e.cfNeck).line(e.cfWaist).line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).noop("secondary").line(e.hps).noop("primary").curve_(e.hpsCp2,e.cfNeck);case 1300:return(new o).move(e.cfNeck).line(e.cfWaist).line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).noop("secondary").curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).noop("primary").curve_(e.hpsCp2,e.cfNeck);case 1330:return(new o).move(e.cfNeck).line(e.cfWaist).line(e.waist).line(e.armhole).noop("secondary").curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).noop("primary").curve_(e.hpsCp2,e.cfNeck);case 1400:case 1500:case 1600:return(new o).move(e.cfNeck).line(e.cfWaist).line(e.waist).line(e.secondaryBustDart1).noop("secondary").line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).noop("primary").curve_(e.hpsCp2,e.cfNeck);case 1700:return(new o).move(e.cfNeck).line(e.cfWaist).line(e.waist).noop("secondary").line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).noop("primary").curve_(e.hpsCp2,e.cfNeck);default:return new o}}(p):d<=1230?function(t){let{points:e,Path:o,store:a}=t.shorthand();switch(a.get("secondaryBustDartLocation")){case 1230:return(new o).move(e.cfNeck).line(e.cfWaist).line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).noop("secondary").line(e.primaryBustDart1).noop("primary").line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1300:return(new o).move(e.cfNeck).line(e.cfWaist).line(e.waist).line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).noop("secondary").curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.primaryBustDart1).noop("primary").line(e.hps).
1curve_(e.hpsCp2,e.cfNeck);case 1330:return(new o).move(e.cfNeck).line(e.cfWaist).line(e.waist).line(e.armhole).noop("secondary").curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.primaryBustDart1).noop("primary").line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1400:case 1500:case 1600:return(new o).move(e.cfNeck).line(e.cfWaist).line(e.waist).line(e.secondaryBustDart1).noop("secondary").line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.primaryBustDart1).noop("primary").line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1700:return(new o).move(e.cfNeck).line(e.cfWaist).line(e.waist).noop("secondary").line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.primaryBustDart1).noop("primary").line(e.hps).curve_(e.hpsCp2,e.cfNeck);default:return new o}}(p):d<=1300?function(t){let{points:e,Path:o,store:a}=t.shorthand();switch(a.get("secondaryBustDartLocation")){case 1330:return(new o).move(e.cfNeck).line(e.cfWaist).line(e.waist).line(e.armhole).noop("secondary").curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).noop("primary").curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1400:case 1500:case 1600:return(new o).move(e.cfNeck).line(e.cfWaist).line(e.waist).line(e.secondaryBustDart1).noop("secondary").line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).noop("primary").curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1700:return(new o).move(e.cfNeck).line(e.cfWaist).line(e.waist).noop("secondary").line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).noop("primary").curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);default:return new o}}(p):d<=1330?function(t){let{points:e,Path:o,store:a}=t.shorthand();switch(a.get("secondaryBustDartLocation")){case 1400:case 1500:case 1600:return(new o).move(e.cfNeck).line(e.cfWaist).line(e.waist).line(e.secondaryBustDart1).noop("secondary").line(e.armhole).noop("primary").curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1700:return(new o).move(e.cfNeck).line(e.cfWaist).line(e.waist).noop("secondary").line(e.armhole).noop("primary").curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);default:return new o}}(p):function(t){let{points:e,Path:o,store:a}=t.shorthand();switch(a.get("secondaryBustDartLocation")){case 1500:case 1600:return(new o).move(e.cfNeck).line(e.cfWaist).line(e.waist).line(e.secondaryBustDart1).noop("secondary").noop("primary").line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);case 1700:return(new o).move(e.cfNeck).line(e.cfWaist).line(e.waist).noop("secondary").noop("primary").line(e.armhole).curve(e.armholeCp2,e.armholePitchCp1,e.armholePitch).curve(e.armholePitchCp2,e.shoulderCp1,e.shoulder).line(e.hps).curve_(e.hpsCp2,e.cfNeck);default:return new o}}(p);let[r,l]=he(i,a),[c,f]=me(i,a);n.seam=e.insop("primary",r).insop("secondary",l),n.saBase=e.insop("primary",c).insop("secondary",f),n.secondaryBustDartHint=(new i).move(a.secondaryBustDart1).line(a.secondaryBustDartEdge).line(a.secondaryBustDart2).attr("class","fabric dotted stroke-sm")}n.primaryBustDartHint=(new i).move(a.primaryBustDart1).line(a.primaryBustDartEdge).line(a.primaryBustDart2).attr("class","fabric dotted stroke-sm"),s&&(n.sa=n.saBase.offset(s).attr("class","sa")),n.seam.close().attr("class","fabric"),n.saBase.close().hide(),a.gridAnchor=a.cfNeck.clone(),r("cutonfold",{from:a.cfNeck,to:a.cfWaist,grainline:!0}),e.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),a.logo=a.cfNeck.shift(-60,70),l.logo=new c("logo",a.logo),a.title=a.logo.shift(-90,70),r("title",{nr:2,title:"front",at:a.title}),l.bustNotch=new c("notch",a.bustPoint),l.armholePitch=new c("notch",a.armholePitch);let f=n.seam.edge("topLeft"),u=n.seam.edge("bottomRight");return r("vd",{id:"hHemToBustPoint",from:a.cfWaist,to:a.bustPoint,x:f.x-15-s}),r("vd",{id:"hHemToNeckOpeningBottom",from:a.cfWaist,to:a.cfNeck,x:f.x-30-s}),r("vd",{id:"hHemToHps",from:a.cfWaist,to:a.hps,x:f.x-45-s}),r("vd",{id:"hHemToBustDartTip",from:a.waist,to:a.armhole,x:u.x+15+s}),r("vd",{id:"hHemToArmholePitch",from:a.waist,to:a.armholePitch,x:u.x+30+s}),r("vd",{id:"hHemToShoulder",from:a.waist,to:a.shoulder,x:u.x+45+s}),r("vd",{id:"hFull",from:a.waist,to:a.hps,x:u.x+60+s}),r("hd",{id:"wCFrontToHps",from:a.cfNeck,to:a.hps,y:f.y-15-s}),r("hd",{id:"wCFrontToShoulder",from:a.cfNeck,to:a.shoulder,y:f.y-30-s}),r("hd",{id:"wFull",from:a.cfNeck,to:a.armhole,y:f.y-45-s}),r("hd",{id:"wCFrontToWaistDartCenter",from:a.cfWaist,to:a.bustPoint,y:u.
1y+15+s}),r("hd",{id:"wHemFull",from:a.cfWaist,to:a.waist,y:u.y+30+s}),r("ld",{id:"wWaistDart",from:a.primaryBustDart1,to:a.primaryBustDart2,d:15}),r("ld",{id:"lWaistDartSide",from:a.primaryBustDart2,to:a.primaryBustDartTip,d:-15}),0!==h&&d!==h&&r("ld",{id:"lBustDartSide",from:a.secondaryBustDartTip,to:a.secondaryBustDart2,d:15}),p}};function ge(t,e=!1,o=null){return e?t.get("sleevecapLength")-2*t.get("backArmholeLength")*(1+o.sleevecapEase):t.get("sleevecapLength")-t.get("sleevecapTarget")}function be(t,e=!1,o=null){let a=ge(t,e,o),i=t.get("sleeveFactor");i*=a>10?.75:a>0?.9:1.05,t.set("sleeveFactor",i)}function we(t,e){const{store:o,measurements:a,options:i,Point:n,points:s,Path:r,paths:l,part:c}=t;s.centerBiceps=new n(0,0),s.centerCap=s.centerBiceps.shift(90,i.sleevecapTopFactorY*(a.biceps/2*(1+i.bicepsEase)*o.get("sleeveFactor")));let p=a.biceps*(1+i.bicepsEase)/2;s.bicepsLeft=s.centerBiceps.shift(180,p*i.sleeveWidthGuarantee+p*(1-i.sleeveWidthGuarantee)*o.get("sleeveFactor")),s.bicepsRight=s.bicepsLeft.flipX(),s.capLeft=new n(s.bicepsLeft.x,s.centerCap.y),s.capRight=s.capLeft.flipX(),s.centerCap=s.capLeft.shiftFractionTowards(s.capRight,i.sleevecapTopFactorX);let d=s.bicepsRight.x,h=s.centerCap.y;s.backPitch=new n(-1*d*i.sleevecapBackFactorX,h*i.sleevecapBackFactorY),s.frontPitch=new n(d*i.sleevecapFrontFactorX,h*i.sleevecapFrontFactorY),s.capQ1Base=s.frontPitch.shiftFractionTowards(s.bicepsRight,.5),s.capQ2Base=s.frontPitch.shiftFractionTowards(s.centerCap,.5),s.capQ3Base=s.backPitch.shiftFractionTowards(s.centerCap,.5),s.capQ4Base=s.backPitch.shiftFractionTowards(s.bicepsLeft,.5);let m=a.biceps*(1+i.bicepsEase);if(s.capQ1=s.capQ1Base.shift(s.bicepsRight.angle(s.frontPitch)+90,m*i.sleevecapQ1Offset),s.capQ2=s.capQ2Base.shift(s.centerCap.angle(s.frontPitch)+90,m*i.sleevecapQ2Offset),s.capQ3=s.capQ3Base.shift(s.centerCap.angle(s.backPitch)-90,m*i.sleevecapQ3Offset),s.capQ4=s.capQ4Base.shift(s.bicepsLeft.angle(s.backPitch)-90,m*i.sleevecapQ4Offset),s.capQ1Cp1=s.capQ1.shift(s.frontPitch.angle(s.bicepsRight),m*i.sleevecapQ1Spread1),s.capQ1Cp2=s.capQ1.shift(s.frontPitch.angle(s.bicepsRight),m*i.sleevecapQ1Spread2*-1),s.capQ2Cp1=s.capQ2.shift(s.centerCap.angle(s.frontPitch),m*i.sleevecapQ2Spread1),s.capQ2Cp2=s.capQ2.shift(s.centerCap.angle(s.frontPitch),m*i.sleevecapQ2Spread2*-1),s.capQ3Cp1=s.capQ3.shift(s.backPitch.angle(s.centerCap),m*i.sleevecapQ3Spread1),s.capQ3Cp2=s.capQ3.shift(s.backPitch.angle(s.centerCap),m*i.sleevecapQ3Spread2*-1),s.capQ4Cp1=s.capQ4.shift(s.bicepsLeft.angle(s.backPitch),m*i.sleevecapQ4Spread1),s.capQ4Cp2=s.capQ4.shift(s.bicepsLeft.angle(s.backPitch),m*i.sleevecapQ4Spread2*-1),l.sleevecap=(new r).move(s.bicepsRight)._curve(s.capQ1Cp1,s.capQ1).curve(s.capQ1Cp2,s.capQ2Cp1,s.capQ2).curve(s.capQ2Cp2,s.capQ3Cp1,s.capQ3).curve(s.capQ3Cp2,s.capQ4Cp1,s.capQ4).curve_(s.capQ4Cp2,s.bicepsLeft),o.set("sleevecapLength",l.sleevecap.length()),0===e){let t,e;t=2*o.get("backArmholeLength"),e=t*i.sleevecapEase,o.set("sleevecapEase",e),o.set("sleevecapTarget",t+e)}return c}function ke(t,e){let{store:o,points:a,Path:i,paths:n}=t,s=a.bicepsRight.x;for(let r of["bicepsRight","capQ1Cp1","capQ1","capQ1Base","capQ1Cp2","frontPitch","capQ2Cp1","capQ2","capQ2Base","capQ2Cp2"])a[r].x+=a[r].x/s*e*-1;n.sleevecap=(new i).move(a.bicepsRight)._curve(a.capQ1Cp1,a.capQ1).curve(a.capQ1Cp2,a.capQ2Cp1,a.capQ2).curve(a.capQ2Cp2,a.capQ3Cp1,a.capQ3).curve(a.capQ3Cp2,a.capQ4Cp1,a.capQ4).curve_(a.capQ4Cp2,a.bicepsLeft),o.set("sleevecapLength",n.sleevecap.length())}const Ce={name:"breanna.sleevecap",hide:{self:!0},after:[ue,pe,ce],options:{sleevecapEase:{pct:.5,min:0,max:2.5,menu:"advanced.sleevecap"},sleevecapTopFactorX:{pct:50,min:25,max:75,menu:"advanced.sleevecap"},sleevecapTopFactorY:{pct:110,min:35,max:165,menu:"advanced.sleevecap"},sleevecapBackFactorX:{pct:45,min:35,max:55,menu:"advanced.sleevecap"},sleevecapBackFactorY:{pct:33,min:30,max:65,menu:"advanced.sleevecap"},sleevecapFrontFactorX:{pct:55,min:35,max:65,menu:"advanced.sleevecap"},sleevecapFrontFactorY:{pct:33,min:30,max:65,menu:"advanced.sleevecap"},sleevecapQ1Offset:{pct:3,min:0,max:7,menu:"advanced.sleevecap"},sleevecapQ2Offset:{pct:5.5,min:0,max:7,menu:"advanced.sleevecap"},sleevecapQ3Offset:{pct:4.5,min:0,max:7,menu:"advanced.sleevecap"},sleevecapQ4Offset:{pct:1,min:0,max:7,menu:"advanced.sleevecap"},sleevecapQ1Spread1:{pct:10,min:4,max:20,menu:"advanced.sleevecap"},sleevecapQ1Spread2:{pct:12.5,min:4,max:20,menu:"advanced.sleevecap"},sleevecapQ2Spread1:{pct:12.5,min:4,max:20,menu:"advanced.sleevecap"},sleevecapQ2Spread2:{pct:12.5,min:4,max:20,menu:"advanced.sleevecap"},sleevecapQ3Spread1:{pct:12.5,min:4,max:20,menu:"advanced.sleevecap"},sleevecapQ3Spread2:{pct:8,min:4,max:20,menu:"advanced.sleevecap"},sleevecapQ4Spread1:{pct:7,min:4,max:20,menu:"advanced.sleevecap"},sleevecapQ4Spread2:{pct:7,min:4,max:20,menu:"advanced.sleevecap"}},draft:function(t){const{store:e,options:o,Point:a,points:i,paths:n,part:s}=t;e.set("sleeveFactor",1);let r=0;do{we(t,r),be(e,!0,o),r++}while(!0===o.breannaFitSleeve&&r<50&&Math.abs(ge(e,!0,o))>2);
1let l=e.get("frontArmholeLength")+e.get("backArmholeLength"),c=l*o.sleevecapEase;e.set("sleevecapEase",c),e.set("sleevecapTarget",l+c),r=0;do{ke(t,ge(e)),be(e),r++}while(!0===o.breannaFitSleeve&&r<50&&Math.abs(ge(e))>2);return n.sleevecap.attr("class","fabric"),i.gridAnchor=new a(0,0),s}};const ve={name:"breanna.sleeve",from:Ce,after:[ue,pe,ce],measurements:["shoulderToWrist","wrist"],options:{cuffEase:{pct:20,min:0,max:50,...(0,n.Wx)("wrist"),menu:"fit"},sleeveLengthBonus:{pct:0,min:-40,max:10,menu:"style"}},draft:function(t){const{store:e,sa:o,measurements:a,options:i,Point:n,points:s,Path:r,paths:l,Snippet:c,snippets:p,macro:d,part:h}=t;let m=l.sleevecap.edge("topLeft").y;s.centerWrist=new n(0,m+a.shoulderToWrist*(1+i.sleeveLengthBonus)*(1+i.verticalEase)),s.wristRight=s.centerWrist.shift(0,a.wrist*(1+i.cuffEase)/2),s.wristLeft=s.wristRight.rotate(180,s.centerWrist),s.sleeveTip=l.sleevecap.shiftFractionAlong(.5),s.wristRight=s.bicepsRight.shiftTowards(s.wristRight,s.bicepsLeft.dist(s.wristLeft)),l.sleevecap.hide(),l.seam=(new r).move(s.bicepsLeft).line(s.wristLeft).line(s.wristRight).line(s.bicepsRight).join(l.sleevecap).close().attr("class","fabric"),o&&(l.sa=l.seam.offset(o).attr("class","fabric sa")),s.gridAnchor=new n(0,0),d("grainline",{from:s.centerWrist,to:s.centerBiceps}),e.cutlist.addCut({cut:2,from:"fabric"}),s.logo=s.centerBiceps.shiftFractionTowards(s.centerWrist,.3),p.logo=new c("logo",s.logo),d("title",{at:s.centerBiceps,nr:3,title:"sleeve"}),s.scaleboxAnchor=s.scalebox=s.centerBiceps.shiftFractionTowards(s.centerWrist,.5),d("scalebox",{at:s.scalebox});let f=(new r).move(s.bicepsRight)._curve(s.capQ1Cp1,s.capQ1),u=f.length(),g=e.get("frontArmholeToArmholePitch");if(u===g)s.frontNotch=s.capQ1.clone();else if(u>g)s.frontNotch=f.shiftAlong(g);else{let t=(new r).move(s.capQ1).curve(s.capQ1Cp2,s.capQ2Cp1,s.capQ2).curve(s.capQ2Cp2,s.capQ3Cp1,s.capQ3);s.frontNotch=t.shiftAlong(g-u)}let b=(new r).move(s.bicepsLeft)._curve(s.capQ4Cp2,s.capQ4),w=b.length(),k=e.get("backArmholeToArmholePitch");if(w===k)s.backNotch=s.capQ4.clone();else if(w>k)s.backNotch=b.shiftAlong(k);else{let t=(new r).move(s.capQ4).curve(s.capQ4Cp1,s.capQ3Cp2,s.capQ3).curve(s.capQ3Cp1,s.capQ2Cp2,s.capQ2);s.backNotch=t.shiftAlong(k-w)}return p.frontNotch=new c("notch",s.frontNotch),p.backNotch=new c("bnotch",s.backNotch),d("vd",{id:"hWristToArmholeLeft",from:s.wristLeft,to:s.bicepsLeft,x:s.bicepsLeft.x-o-15}),d("vd",{id:"hFull",from:s.wristLeft,to:s.sleeveTip,x:s.bicepsLeft.x-o-30}),d("hd",{id:"wFull",from:s.bicepsLeft,to:s.bicepsRight,y:s.sleeveTip.y-o-30}),d("hd",{id:"wCuf",from:s.wristLeft,to:s.wristRight,y:s.wristLeft.y+o+30}),d("pd",{id:"lSleevecap",path:l.sleevecap.reverse(),d:-1*o-15}),h}},ye={en:JSON.parse('{"t":"Breanna body block","d":"Breanna is a basic body block for people with breasts.","p":{"back":"Back","base":"Base","frontBase":"Front base","front":"Front","sleevecap":"Sleevecap","sleeve":"Sleeve"},"s":{},"o":{"acrossBackFactor":{"t":"Across back factor","d":"Controls your across back width as a factor of your shoulder to shoulder measurement."},"armholeDepthFactor":{"t":"Armhole depth factor","d":"Controls the depth of the armhole. Higher values make a deeper armhole."},"backNeckCutout":{"t":"Back neck cutout","d":"How deep the neck is cut out at the back"},"bicepsEase":{"t":"Biceps ease","d":"The amount of ease at your upper arm. Note that while we try to respect this, fitting the sleeve to the armhole takes precedence over respecting the exact amount of ease."},"collarEase":{"t":"Collar ease","d":"The amount of ease around your neck"},"chestEase":{"t":"Chest ease","d":"The amount of ease at your chest."},"cuffEase":{"t":"Cuff ease","d":"The amount of ease at your wrist."},"frontArmholeDeeper":{"t":"Front armhole extra cutout","d":"How much do you want the front armhole to be cut out deeper than the back."},"frontScyeDart":{"t":"Front scye dart","d":"Controls the dart at the front of the arm opening. This can help control gaping at the armhole."},"shoulderDart":{"t":"Shoulder dart","d":"Whether or not to include a dart at the shoulder to round the back"},"shoulderDartNo":{"t":"Do not draft a shoulder dart","d":"Drafts a pattern without shoulder darts"},"shoulderDartYes":{"t":"Draft a shoulder dart","d":"Drafts a pattern with shoulder darts"},"shoulderDartSize":{"t":"Shoulder dart size","d":"The size of the shoulder dart"},"shoulderDartLength":{"t":"Shoulder dart length","d":"The length of the shoulder dart"},"shoulderEase":{"t":"Shoulder ease","d":"The amount of ease at your shoulder. This increases the shoulder to shoulder distance to accommodate additional layers or thickness."},"shoulderSlopeReduction":{"t":"Shoulder slope reduction","d":"The amount by which the shoulder slope is reduced to allow for shoulder padding."},"sleeveLengthBonus":{"t":"Sleeve length bonus","d":"The amount to lengthen the sleeve. A negative value will shorten it."},"sleevecapEase":{"t":"Sleevecap ease","d":"The amount by which the sleevecap seam is longer than the armhole seam."},"sleevecapTopFactorX":{"t":"Sleevecap top X","d":"Controls the horizontal location of the sleevecap top."},"sleevecapTopFactorY":{"t":"Sleevecap top Y","d":"Controls the height of the sleevecap. A higher value results in a higher and more narrow sleevecap."},"sleevecapBackFactorX":{"t":"Sleevecap back X","d":"Controls the placement of the sleevecap back pitchpoint on the X-axis (horizontal)"},"sleevecapBackFactorY":{"t":"Sleevecap back Y","d":"Controls the placement of the sleevecap back pitchpoint on the Y-axis (vertical)"},"sleevecapFrontFactorX":{"t":"Sleevecap front X","d":"Controls the placement of the sleevecap front pitchpoint on the X-axis (horizontal)"},"sleevecapFrontFactorY":{"t":"Sleevecap front Y","d":"Controls the placement of the sleevecap front pitchpoint on the Y-axis (vertical)"},"sleevecapQ1Offset":{"t":"Sleevecap Q1 offset","d":"Controls the curvature of the sleevecap in the first quadrant (front armhole)"},"sleevecapQ2Offset":{"t":"Sleevecap Q2 offset","d":"Controls the curvature of the sleevecap in the second quadrant (front shoulder)"},"sleevecapQ3Offset":{"t":"Sleevecap Q3 offset","d":"Controls the curvature of the sleevecap in the third quadrant (back shoulder)"},"sleevecapQ4Offset":{"t":"Sleevecap Q4 offset","d":"Controls the curvature of the sleevecap in the fourth quadrant (back armhole)"},"sleevecapQ1Spread1":{"t":"Sleevecap Q1 downward spread","d":"Controls the spread of the sleevecap first quadrant curvature towards the armhole"},"sleevecapQ1Spread2":{"t":"Sleevecap Q1 upward spread","d":"Controls the spread of the sleevecap first quadrant curvature towards the shoulder"},"sleevecapQ2Spread1":{"t":"Sleevecap Q2 downward spread","d":"Controls the spread of the sleevecap second quadrant curvature towards the armhole"},"sleevecapQ2Spread2":{"t":"Sleevecap Q2 upward spread","d":"Controls the spread of the sleevecap second quadrant curvature towards the shoulder"},"sleevecapQ3Spread1":{"t":"Sleevecap Q3 upward spread","d":"Controls the spread of the sleevecap third quadrant curvature towards the shoulder"},"sleevecapQ3Spread2":{"t":"Sleevecap Q3 downward spread","d":"Controls the spread of the sleevecap third quadrant curvature towards the armhole"},"sleevecapQ4Spread1":{"t":"Sleevecap Q4 upward spread","d":"Controls the spread of the sleevecap fourth quadrant curvature towards the shoulder"},"sleevecapQ4Spread2":{"t":"Sleevecap Q4 downward spread","d":"Controls the spread of the sleevecap fourth quadrant curvature towards the armhole"},"waistDart":{"t":"Waist dart","d":"Whether or not to include a dart at the waist to round the back"},"waistDartNo":{"t":"Do not draft a waist dart","d":"Drafts a pattern without waist darts"},"waistDartYes":{"t":"Draft a waist dart","d":"Drafts a pattern with waist darts"},"waistDartSize":{"t":"Waist dart size","d":"The size of the waist dart"},"waistDartLength":{"t":"Waist dart length","d":"The length of the waist dart"},"verticalEase":{"t":"Vertical ease","d":"The amount of ease to distribute along the length of the garment"},"waistEase":{"t":"Waist ease","d":"The amount of ease at the waist"},"primaryBustDart":{"t":"Bust dart","d":"Where to place the bust dart to shape the chest"},"primaryBustDartLength":{"t":"Bust dart length","d":"The length of the bust dart"},"secondaryBustDart":{"t":"Secondary bust dart","d":"Optionally include a secondary bust dart to distribute the shaping of the chest"},"secondaryBustDartLength":{"t":"Secondary bust dart length","d":"The length of the secondary bust dart"},"primaryBustDartShaping":{"t":"Bust darts shaping","d":"Controls the balance between the main and secondary bust darts"}}}')},Te=new n.pT({data:ne,parts:[ce,ue,ve,le,pe,Ce]}),xe=JSON.parse('{"id":"bruce","name":"Bruce boxer briefs","code":"Joost De Cock","description":"A FreeSewing pattern for boxer briefs","design":"Joost De Cock","difficulty":3,"tags":["bottoms","underwear"],"techniques":["stretch","hem","curved-seam","elastic"],"version":"4.6.0","pkg":"@freesewing/bruce","collection":true}');function Be(t){let{store:e,options:o,measurements:a,utils:i}=t.shorthand();if(e.setIfUnset("init",!1),!0!==e.get("init")||t.context.settings.sample){e.set("yScale",1);
1const t=a.waistToUpperLeg-a.waistToHips;e.set("rise",t*o.rise*e.get("yScale")),e.set("backRise",t*o.backRise*e.get("yScale")),e.set("sideRise",.75*e.get("backRise")),e.set("frontRise",.25*e.get("backRise")),e.set("legBonus",t*o.legBonus*e.get("yScale")),e.set("xScale",i.stretchToScale(o.stretch)),e.set("xScaleLegs",i.stretchToScale(o.legStretch)),e.set("hips",a.hips*e.get("xScale")),e.set("hipsFront",e.get("hips")*o.hipRatioFront);let n=(1-(o.hipRatioFront+o.hipRatioBack))/2;e.set("hipsSide",e.get("hips")*n),e.set("hipsBack",e.get("hips")*o.hipRatioBack),e.set("leg",a.upperLeg*e.get("xScaleLegs")),e.set("legInset",e.get("leg")*o.legRatioInset);let s=1-o.legRatioInset-o.legRatioBack;e.set("legSide",e.get("leg")*s),e.set("legBack",e.get("leg")*o.legRatioBack),e.set("gusset",a.hips*o.gussetRatio),e.set("gussetInsetRatio",o.gussetInsetRatio),e.set("length",t*e.get("yScale")),e.set("riseLength",t+e.get("rise")),e.set("fullLength",e.get("riseLength")+e.get("legBonus")*e.get("yScale")),e.set("heightInset",e.get("riseLength")*o.heightRatioInset+e.get("legBonus")*e.get("yScale")),e.set("heightFront",e.get("riseLength")*(1-o.heightRatioInset)),e.set("init",!0)}}const Se={name:"bruce.back",measurements:["hips","upperLeg","waistToHips","waistToUpperLeg"],options:{hipRatioFront:.245,hipRatioBack:.315,legRatioInset:.3,legRatioBack:.32,gussetRatio:.0666,gussetInsetRatio:.6,heightRatioInset:.65,bulge:{deg:20,min:0,max:40,menu:"fit"},legBonus:{pct:0,min:-10,max:20,menu:"style"},rise:{pct:10,min:0,max:25,menu:"style"},stretch:{pct:15,min:5,max:25,menu:"fit"},legStretch:{pct:40,min:25,max:45,menu:"fit"},backRise:{pct:5,min:0,max:10,menu:"fit"}},draft:function({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,complete:l,macro:c,utils:p,part:d}){Be(d),a.zero=new o(0,0),a.center=a.zero.shift(90,t.get("rise")),a.sideRight=new o(t.get("hipsBack")/2,a.center.y),a.gussetTop=a.center.shift(-90,t.get("riseLength")),a.gussetBottom=a.gussetTop.shift(-90,t.get("gusset")+t.get("legBonus")),a.gussetRight=a.gussetBottom.shift(0,t.get("gusset")*t.get("xScale")/2),a.gussetCpRight=new o(a.gussetRight.x,a.gussetTop.y);let h=p.circlesIntersect(a.gussetRight,t.get("legBack"),a.sideRight,t.get("fullLength"));if(a.legRight=h[1],a.legLeft=a.legRight.flipX(a.center),t.set("backSeamLength",a.sideRight.dist(a.legRight)),t.set("crotchSeamLength",(new i).move(a.gussetTop).curve(a.gussetCpRight,a.gussetRight,a.gussetRight).length()),a.center=a.center.shift(90,t.get("backRise")),a.sideRight=a.sideRight.shift(90,t.get("sideRise")),a.centerCpRight=new o(a.sideRight.x/2,a.center.y),a.centerCpLeft=a.centerCpRight.flipX(),n.seam=(new i).move(a.gussetTop).curve(a.gussetCpRight,a.gussetRight,a.gussetRight).line(a.legRight).line(a.sideRight).curve(a.sideRight,a.centerCpRight,a.center).line(a.gussetTop).close().attr("class","fabric"),e){let t=(new i).move(a.legRight).line(a.sideRight).curve(a.sideRight,a.centerCpRight,a.center).offset(e),o=(new i).move(a.gussetTop).curve(a.gussetCpRight,a.gussetRight,a.gussetRight).offset(e),s=(new i).move(a.gussetRight).line(a.legRight).offset(2*e);n.sa=(new i).move(a.gussetTop).line(o.start()).join(o).join(s).join(t).line(a.center).attr("class","fabric sa")}return t.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),a.title=new o(.6*a.sideRight.x,.6*a.gussetTop.y),c("title",{at:a.title,nr:1,title:"back"}),c("cutonfold",{from:a.center,to:a.gussetTop,grainline:!0}),r.logo=new s("logo",a.title.shift(90,50)),r.backNotch=new s("bnotch",a.sideRight.shiftFractionTowards(a.legRight,.5)),l&&(n.sideNote=(new i).move(a.legRight).line(a.sideRight).addClass("hidden"),c("banner",{id:"side",path:n.sideNote,text:"&",classes:"text-sm fill-note center"}),n.gussetNote=(new i).move(a.gussetTop).curve_(a.gussetCpRight,a.gussetRight).addClass("hidden"),c("banner",{id:"gusset",path:n.gussetNote,text:"*",classes:"text-sm fill-note center"})),c("vd",{id:"hCbCrotchToCbWaist",from:a.gussetTop,to:a.center,x:a.center.x-15}),c("vd",{id:"hFull",from:a.gussetRight,to:a.center,x:a.center.x-30}),c("vd",{id:"hSideHemToSideWaist",from:a.legRight,to:a.sideRight,x:a.legRight.x+15+e}),c("vd",{id:"hSideHemToCbWaist",from:a.legRight,to:a.center,x:a.legRight.x+30+e}),c("hd",{id:"wCbWaistToSideWaist",from:a.center,to:a.sideRight,y:a.center.y-15-e}),c("hd",{id:"wCbCrotchToInnerLeg",from:a.gussetTop,to:a.gussetRight,y:a.gussetRight.y+15+2*e}),c("hd",{id:"wFull",from:a.gussetTop,to:a.legRight,y:a.gussetRight.y+30+2*e}),c("ld",{id:"lLegOpening",from:a.gussetRight,to:a.legRight,d:-15-2*e}),d}};const Le={name:"bruce.inset",after:Se,draft:function({store:t,sa:e,Point:o,points:a,Path:i,paths:n,complete:s,macro:r,Snippet:l,snippets:c,part:p}){return Be(p),a.topLeft=new o(0,0),a.bottomLeft=a.topLeft.shift(-90,t.get("heightInset")),a.bottomRight=new o(t.get("legInset"),a.bottomLeft.y),a.tip=new o(1.111*a.bottomRight.x,a.bottomRight.y-t.get("gusset")),a.tip=a.bottomRight.shiftTowards(a.tip,t.get("crotchSeamLength")-t.get("gusset")*(1-t.get("gussetInsetRatio"))),a.tipCpTop=new o(1.2*t.get("gusset"),0),a.tipCpBottom=a.tip.shift(a.bottomRight.angle(a.tip)+90,1.5*t.get("gusset")),t.set("curve",(new i).move(a.tip).curve(a.tipCpBottom,a.tipCpTop,a.topLeft).length()),n.saBase=(new i).move(a.bottomRight).line(a.tip).curve(a.tipCpBottom,a.tipCpTop,a.topLeft).line(a.bottomLeft).hide(),n.hemBase=(new i).move(a.bottomLeft).line(a.bottomRight).hide(),n.seam=n.saBase.join(n.hemBase).close().attr("class","fabric"),e&&(n.sa=n.saBase.offset(e).join(n.hemBase.offset(2*e)).close().attr("class","fabric sa")),t.cutlist.addCut({cut:2,from:"fabric"}),a.title=a.topLeft.shiftFractionTowards(a.bottomRight,.5),r("title",{at:a.title.shift(-90,15),nr:4,title:"inset"}),r("grainline",{from:a.bottomLeft.shift(0,15),to:a.topLeft.shift(0,15)}),c.notch=new l("notch",(new i).move(a.tip).curve(a.tipCpBottom,a.tipCpTop,a.topLeft).shiftFractionAlong(.5)),s&&(n.sideNote=(new i).move(a.bottomLeft).line(a.topLeft).addClass("hidden"),n.gussetNote=(new i).move(a.bottomRight).line(a.tip).addClass("hidden"),n.curveNote=(new i).move(a.tip).curve(a.tipCpBottom,a.tipCpTop,a.topLeft).addClass("hidden"),r("banner",{id:"side",path:n.sideNote,text:"#",dy:7,classes:"text-sm fill-note center"}),r("banner",{id:"gusset",path:n.gussetNote,text:"*",classes:"text-sm fill-note center"}),r("banner",{id:"curve",path:n.curveNote,text:"~",classes:"text-sm fill-note center"})),r("vd",{id:"hFull",from:a.bottomLeft,to:a.topLeft,x:a.topLeft.x-15-e}),r("vd",{id:"hGusset",from:a.bottomRight,to:a.tip,x:a.tip.x+15+e}),r("hd",{id:"wLeg",from:a.bottomLeft,to:a.bottomRight,y:a.bottomRight.y+15+e}),r("hd",{id:"wFull",from:a.bottomLeft,to:a.tip,y:a.bottomRight.y+30+e}),p}};function Pe(t,e,o){return(new t).move(e.midRight).curve(e.curveRightCpTop,e.curveRightCpBottom,e.rightTuskRight).length()-o.get("curve")}function Re(t,e){let o;o=Math.abs(t)>2?3:5,e.rightTuskRight=e.rightTuskRight.shift(90,t/o),e.rightTuskLeft=e.rightTuskLeft.shift(90,t/o),e.curveRightCpBottom=e.curveRightCpBottom.shift(90,t/o)}const Fe={name:"bruce.front",after:Le,draft:function({store:t,sa:e,Point:o,points:a,Path:i,paths:n,options:s,complete:r,macro:l,snippets:c,Snippet:p,log:d,part:h}){let m=!1;Be(h),a.topRight=new o(t.get("hipsFront")/2,0),a.topLeft=a.topRight.flipX(),a.midMid=new o(0,t.get("heightFront")),a.midRight=new o(a.topRight.x+.05*t.get("heightFront"),a.midMid.y),a.midLeft=a.midRight.flipX(),t.set("frontNotch",a.topRight.dist(a.midRight)),a.bottomMid=new o(0,t.get("riseLength")),a.rightTuskRight=new o(t.get("gusset")*t.get("xScale")*(1-t.get("gussetInsetRatio")),a.bottomMid.y),a.rightTuskLeft=a.bottomMid.clone(),a.curveRightCpTop=new o(a.midRight.x-1.3*t.get("gusset"),a.midRight.y),a.curveRightCpBottom=new o(a.rightTuskRight.x,a.r
1ightTuskRight.y-1.3*t.get("gusset"));let f,u=Pe(i,a,t);const g=["rightTuskRight","rightTuskLeft","curveRightCpBottom"];let b=[],w=!1;Math.abs(u)<=1&&(w=!0);let k=0;for(;!w;){for(const t of g)b[t]=a[t];if(f=u,Re(u,a),u=Pe(i,a,t),k++,Math.abs(u)<=1)w=!0;else if((Math.abs(u)>Math.abs(f)||k>=150)&&(w=!0,d.warn("Unable to adjust the front tusk length to fit the given measurements, after "+k+" iterations."),m=!0,Math.abs(u)>Math.abs(f)))for(const t of g)a[t]=b[t]}if(a.bottomMid=new o(0,a.rightTuskLeft.y),s.bulge>0){for(let t of["curveRightCpTop","curveRightCpBottom","rightTuskRight","rightTuskLeft"])a[t]=a[t].rotate(s.bulge,a.midRight);a.dartJoin=new o(0,a.midMid.y+.65*a.midMid.dist(a.bottomMid)),a.dartCpRight=new o(0,a.dartJoin.y+a.dartJoin.dist(a.bottomMid)*(s.bulge/30)),a.dartCpRight=a.dartCpRight.rotate(s.bulge,a.dartJoin),a.dartCpLeft=a.dartCpRight.flipX()}else a.dartJoin=a.rightTuskLeft;if(a.leftTuskRight=a.rightTuskLeft.flipX(),a.leftTuskLeft=a.rightTuskRight.flipX(),a.curveLeftCpBottom=a.curveRightCpBottom.flipX(),a.curveLeftCpTop=a.curveRightCpTop.flipX(),a.topMid=new o(0,a.topLeft.y),a.topLeft=a.topLeft.shift(90,t.get("frontRise")),a.topRight=a.topRight.shift(90,t.get("frontRise")),a.topMidCpRight=new o(a.topRight.x/2,a.topMid.y),a.topMidCpLeft=a.topMidCpRight.flipX(),s.bulge>0?(n.trimBase=(new i).move(a.rightTuskLeft).curve(a.rightTuskLeft,a.dartCpRight,a.dartJoin).curve(a.dartCpLeft,a.leftTuskRight,a.leftTuskRight),n.seamStart=(new i).move(a.midLeft).line(a.topLeft).curve(a.topLeft,a.topMidCpLeft,a.topMid).curve(a.topMidCpRight,a.topRight,a.topRight).line(a.midRight).curve(a.curveRightCpTop,a.curveRightCpBottom,a.rightTuskRight).line(a.rightTuskLeft),n.seamEnd=(new i).move(a.leftTuskRight).line(a.leftTuskLeft).curve(a.curveLeftCpBottom,a.curveLeftCpTop,a.midLeft),n.seamStart.hide(),n.trimBase.hide(),n.seamEnd.hide(),n.seam=n.seamStart.join(n.trimBase).join(n.seamEnd)):n.seam=(new i).move(a.midLeft).line(a.topLeft).curve(a.topLeft,a.topMidCpLeft,a.topMid).curve(a.topMidCpRight,a.topRight,a.topRight).line(a.midRight).curve(a.curveRightCpTop,a.curveRightCpBottom,a.rightTuskRight).line(a.leftTuskLeft).curve(a.curveLeftCpBottom,a.curveLeftCpTop,a.midLeft),n.seam.close().attr("class","fabric"),e)if(s.bulge>0){let t=n.seamStart.offset(-1*e),o=n.trimBase.offset(-1*e).trim(),a=n.seamEnd.offset(-1*e);n.sa=t.join(o).join(a).close().attr("class","fabric sa")}else n.sa=n.seam.offset(-1*e).trim().close().attr("class","fabric sa");return t.cutlist.addCut({cut:2,from:"fabric"}),l("title",{at:a.midMid,nr:2,title:"front"}),l("grainline",{from:a.dartJoin,to:a.topMid}),c.sideNotch=new p("notch",a.midRight),a.curveNotch=(new i).move(a.midRight).curve(a.curveRightCpTop,a.curveRightCpBottom,a.rightTuskRight).shiftFractionAlong(.5),c.curveNotch1=new p("notch",a.curveNotch),c.curveNotch2=new p("notch",a.curveNotch.flipX()),r&&(n.sideNoteLeft=(new i).move(a.midLeft).line(a.topLeft).addClass("hidden"),n.sideNoteRight=(new i).move(a.topRight).line(a.midRight).addClass("hidden"),n.tuskNoteLeft=(new i).move(a.leftTuskLeft).line(a.leftTuskRight).addClass("hidden"),n.tuskNoteRight=(new i).move(a.rightTuskLeft).line(a.rightTuskRight).addClass("hidden"),n.curveNoteRight=(new i).move(a.rightTuskRight).curve(a.curveRightCpBottom,a.curveRightCpTop,a.midRight).addClass("hidden"),n.curveNoteLeft=(new i).move(a.midLeft).curve(a.curveLeftCpTop,a.curveLeftCpBottom,a.leftTuskLeft).addClass("hidden"),l("banner",{id:"sideLeft",path:n.sideNoteLeft,text:"#",dy:7,classes:"text-sm fill-note center"}),l("banner",{id:"sideRight",path:n.sideNoteRight,text:"#",dy:7,classes:"text-sm fill-note center"}),l("banner",{id:"tuskLeft",path:n.tuskNoteLeft,text:"*",spaces:2,classes:"text-sm fill-note center"}),l("banner",{id:"tuskRight",path:n.tuskNoteRight,text:"*",spaces:2,classes:"text-sm fill-note center"}),l("banner",{id:"curveLeft",path:n.curveNoteLeft,text:"~",classes:"text-sm fill-note center"}),l("banner",{id:"curveRight",path:n.curveNoteRight,text:"~",classes:"text-sm fill-note center"})),l("hd",{id:"wWaist",from:a.topLeft,to:a.topRight,y:a.topLeft.y-15-e}),l("hd",{id:"wFull",from:a.midLeft,to:a.midRight,y:a.topLeft.y-30-e}),l("vd",{id:"hInsetPointToCfWaist",from:a.midLeft,to:a.topMid,x:a.midLeft.x-15-e}),l("vd",{id:"hInsetPointToTop",from:a.midLeft,to:a.topLeft,x:a.midLeft.x-30-e}),0===s.bulge?(l("hd",{id:"wTusk",from:a.leftTuskLeft,to:a.rightTuskRight,y:a.leftTuskLeft.y+15+e}),l("vd",{id:"hFull",from:a.leftTuskLeft,to:a.topLeft,x:a.midLeft.x-45-e})):(l("vd",{id:"hTuskOuterToTop",from:a.leftTuskLeft,to:a.topLeft,x:a.midLeft.x-45-e}),l("vd",{id:"hFull",from:a.leftTuskRight,to:a.topLeft,x:a.midLeft.x-60-e}),a.narrowRight=(new i).move(a.midRight).curve(a.curveRightCpTop,a.curveRightCpBottom,a.rightTuskRight).edge("left"),a.narrowLeft=(new i).move(a.midLeft).curve(a.curveLeftCpTop,a.curveLeftCpBottom,a.leftTuskLeft).attr("class","various stroke-xl lashed").edge("right"),l("hd",{id:"wBetweenInsets",from:a.narrowLeft,to:a.narrowRight,y:a.narrowLeft.y}),l("hd",{id:"wBetweenTustInnerTips",from:a.leftTuskRight,to:a.rightTuskLeft,y:a.rightTuskLeft.y+15+e}),l("hd",{id:"wBetweenTustOuterTips",from:a.leftTuskLeft,to:a.rightTuskRight,y:a.rightTuskLeft.y+30+e}),l("ld",{id:"lTustBottom",from:a.rightTuskLeft,to:a.rightTuskRight,d:-15-e}),l("vd",{id:"hInflectionToTop",from:a.narrowRight,to:a.topRight,x:a.topRight.x+15+e}),l("vd",{id:"hTustJointToTop",from:a.dartJoin,to:a.topRight,x:a.topRight.x+30+e})),m&&d.warn("We were not able to generate the Front pattern piece correctly. Manual fitting and alteration of this and other pattern pieces are likely to be needed. First, please retake your measurements and generate a new pattern using the new measurements. If you still see this warning with the new pattern, then please make a test garment, check fit, and make alterations as 
1necessary before trying to make the final garment."),h}};const Ee={name:"bruce.side",after:[Se,Fe],draft:function({store:t,sa:e,Point:o,points:a,Path:i,paths:n,complete:s,macro:r,utils:l,snippets:c,Snippet:p,log:d,part:h}){let m=!1;Be(h),a.zero=new o(0,0),a.topLeft=a.zero.shift(90,t.get("rise")),a.topRight=new o(t.get("hipsSide"),a.topLeft.y),a.bottomRight=a.topRight.shift(-90,t.get("fullLength"));let f=l.circlesIntersect(a.bottomRight,t.get("legSide"),a.topLeft,t.get("backSeamLength"));return f?a.bottomLeft=f[0]:(d.warn("Unable to calculate a correct bottom left point on the side part."),m=!0,a.bottomLeft=a.bottomRight.shiftFractionTowards(a.topLeft,.5)),t.set("sideSeamLength",a.topRight.dist(a.bottomRight)),a.topLeft=a.topLeft.shift(90,t.get("sideRise")),a.topRight=a.topRight.shift(90,t.get("frontRise")),n.saBase=(new i).move(a.bottomLeft).line(a.topLeft).line(a.topRight).line(a.bottomRight),n.hemBase=(new i).move(a.bottomRight).line(a.bottomLeft),n.saBase.hide(),n.hemBase.hide(),n.seam=n.saBase.join(n.hemBase).close().attr("class","fabric"),e&&(n.sa=n.saBase.offset(-1*e).join(n.hemBase.offset(-2*e)).close().attr("class","fabric sa")),t.cutlist.addCut({cut:2,from:"fabric"}),a.anchor=a.topLeft,a.title=a.topLeft.shiftFractionTowards(a.bottomRight,.5),r("title",{at:a.title.shift(90,30),nr:3,title:"side"}),r("grainline",{from:new o(a.bottomRight.x/2,a.bottomRight.y),to:new o(a.bottomRight.x/2,a.topRight.y)}),r("scalebox",{at:a.title.shift(-90,40)}),c.frontNotch=new p("notch",a.topRight.shiftTowards(a.bottomRight,t.get("frontNotch"))),c.backNotch=new p("bnotch",a.topLeft.shiftFractionTowards(a.bottomLeft,.5)),s&&(n.backNote=(new i).move(a.bottomLeft).line(a.topLeft).addClass("hidden"),n.frontNote=(new i).move(a.bottomRight).line(a.topRight).addClass("hidden"),r("banner",{id:"back",path:n.backNote,text:"&",dy:7,classes:"text-sm fill-note center"}),r("banner",{id:"front",path:n.frontNote,text:"#",classes:"text-sm fill-note center"})),r("vd",{id:"hBack",from:a.bottomLeft,to:a.topLeft,x:a.topLeft.x-15-e}),r("vd",{id:"hFront",from:a.bottomRight,to:a.topRight,x:a.topRight.x+15+e}),r("hd",{id:"wWaist",from:a.topLeft,to:a.topRight,y:a.topLeft.y-15-e}),r("hd",{id:"wHem",from:a.bottomLeft,to:a.bottomRight,y:a.bottomLeft.y+15+e}),m&&d.warn("We were not able to generate the Side pattern piece correctly. Manual fitting and alteration of this and other pattern pieces are likely to be needed. First, please retake your measurements and generate a new pattern using the new measurements. If you still see this warning with the new pattern, then please make a test garment, check fit, and make alterations as necessary before trying to make the final garment."),h}},We={en:JSON.parse('{"t":"Bruce boxer briefs","d":"Bruce are comfortable yet stylish boxer briefs.","p":{"back":"Back","front":"Front","inset":"Inset","side":"Side"},"s":{},"o":{"bulge":{"t":"Bulge","d":"Increase angle to create more room in the front pouch."},"legBonus":{"t":"Leg length bonus","d":"Extra length to add to the legs."},"rise":{"t":"Rise","d":"Amount to raise the waist. A negative value will lower it."},"stretch":{"t":"Stretch","d":"The amount of negative ease."},"legStretch":{"t":"Leg stretch","d":"For best results, you want to fit your legs a bit more snugly \u2014 say no to gaping."},"backRise":{"t":"Back rise","d":"Percentage by which the waist will be raised at the back."}}}')},He=new n.pT({data:xe,parts:[Se,Ee,Fe,Le]}),Ae=JSON.parse('{"id":"carlita","name":"Carlita coat","code":"Joost De Cock","description":"A FreeSewing pattern for Sherlock Holmes cosplay; Or just a nice long coat","design":["Anneke Caramin","Joost De Cock"],"difficulty":5,"tags":["tops","coats"],"techniques":["hem","pocket","curved-seam","precision","set-sleeve","welt-pocket","lining","princess-seam","interfacing","button"],"version":"4.6.0","pkg":"@freesewing/carlita","collection":true}'),Oe=JSON.parse('{"id":"carlton","name":"Carlton coat","code":"Joost De Cock","description":"A FreeSewing pattern for Sherlock Holmes cosplay; Or just a nice long coat","design":["Anneke Caramin","Joost De Cock"],"difficulty":5,"tags":["tops","coats"],"techniques":["hem","pocket","curved-seam","precision","set-sleeve","welt-pocket","lining","interfacing","button"],"version":"4.6.0","pkg":"@freesewing/carlton","collection":true}'),De={en:JSON.parse('{"t":"Carlton coat","d":"For Sherlock Holmes cosplay, or just a really nice coat.","p":{"back":"Back","backStay":"Back stay","belt":"Belt","chestPocketWelt":"Chest pocket welt","chestPocketBag":"Chest pocket bag","collar":"Collar","collarStand":"Collar stand","cuffFacing":"Cuff facing","front":"Front","frontFacing":"Front facing","frontLining":"Front lining","innerPocketBag":"Inner pocket bag","innerPocketTab":"Inner pocket tab","innerPocketWelt":"Inner pocket welt","pocketFlap":"Pocket flap","pocketLining":"Pocket lining","pocket":"Pocket","tail":"Tail","topsleeve":"Topsleeve","undersleeve":"Undersleeve"},"s":{"cutBackStay.t":"The back stay is not shown","cutBackStay.d":"The **Back stay** (2a) is not shown, but you can trace it from the Back part (2). Trace the outline above the canvas line that curves from the top of the back fold to under the armhole.","cutChestPocketBag.t":"The chest pocket bag is not shown","cutChestPocketBag.d":"The **Chest pocket bag** (17) is a rectangular piece of fabric {{{ w }}} wide and {{{ l }}} long.","cutChestPocketWelt.t":"The chest pocket welt is not shown","cutChestPocketWelt.d":"The **Chest pocket welt** (12) is a rectangular piece of fabric {{{ w }}} wide and {{{ l }}} long.","cutFrontFacing.t":"The front facing is not shown","cutFrontFacing.d":"The **Front facing** (1a) is not shown, but you can trace it from the Front part (1). Trace the outline left from the facing/lining boundary.","cutFrontLining.t":"The front lining is not shown","cutFrontLining.d":"The **Front lining** (1b) is not shown, but you can trace it from the Front part (1). Trace the outline right from the facing/lining boundary.","cutInnerPocketBag.t":"The inner pocket bag is not shown","cutInnerPocketBag.d":"The **Inner pocket bag** (14) is a rectangle {{{ w }}} wide and {{{ l }}} long.","cutInnerPocketWelt.t":"The inner pocket welt is not shown","cutInnerPocketWelt.d":"The **Inner pocket welt** (13) is a rectangle {{{ w }}} wide and {{{ l }}} long.","cutTail.t":"The tail is not shown","cutTail.d":"The **Tail** (5) is a rectangular piece of fabric {{{ w }}} wide and {{{ l }}} long.","flbFacingSide":"Facing/Lining boundary - Facing side","flbLiningSide":"Facing/Lining boundary - Lining side","hipLine":"Hip Line","seatLine":"Seat Line"},"o":{"seatEase":{"t":"Seat ease","d":"Amount of ease around your bum"},"pocketPlacementHorizontal":{"t":"Horizontal pocket placement","d":"The (horizontal) location of the pockets"},"pocketPlacementVertical":{"t":"Vertical pocket placement","d":"The (vertical) location of the pockets"},"collarHeight":{"t":"Collar height","d":"Height of the collar"},"length":{"t":"Length","d":"Total length"}
1,"pocketFlapRadius":{"t":"Pocket flap radius","d":"The amount by which the pocket flap is rounded"},"pocketRadius":{"t":"Pocket radius","d":"The amount by which the pocket is rounded"},"chestPocketHeight":{"t":"Chest pocket height","d":"Height of the chest pocket"},"beltWidth":{"t":"Belt width","d":"Width of the belt"},"buttonSpacingHorizontal":{"t":"Horizontal button spacing","d":"Horizontal spacing of the buttons, also determines the front closure overlap"},"lapelReduction":{"t":"Lapel reduction","d":"Controls how much the lapel tip goes inwards."},"frontOverlap":{"t":"Front overlap","d":"Controls how much the right and left front of the garment overlap at the center front."},"pocketHeight":{"t":"Pocket height","d":"Controls the height of the front pockets"},"pocketWidth":{"t":"Pocket width","d":"Controls the width of the front pockets"},"chestPocketPlacement":{"t":"Chest pocket placement","d":"Controls the location of the chest pocket."},"chestPocketAngle":{"t":"Chest pocket angle","d":"Controls the slant of the chest pocket."},"chestPocketWidth":{"t":"Chest pocket width","d":"Controls the width of the chest pocket."},"innerPocketPlacement":{"t":"Inner pocket placement","d":"Controls the location of the inner pocket."},"innerPocketDepth":{"t":"Inner pocket depth","d":"Controls the depth of the inner pocket."},"innerPocketWidth":{"t":"Inner pocket width","d":"Controls the width of the inner pocket."},"innerPocketWeltHeight":{"t":"Inner pocket welt height","d":"Controls the height of the inner pocket welts."},"sleeveBend":{"t":"Sleeve bend","d":"The angle of the sleeve at the elbow."},"sleevecapHeight":{"t":"Sleevecap height","d":"Controls the height of the sleevecap."},"sleevecapEase":{"t":"Sleevecap ease","d":"Controls the amount of sleevecap ease."},"cuffLength":{"t":"Cuff length","d":"Controls the length (height if you wish) of the cuffs."},"collarFlare":{"t":"Collar flare","d":"Controls the flare of the collar by altering the fall length (between the neck and the tips) of the collar."},"collarSpread":{"t":"Collar spread","d":"Controls how close the collar lies to the neck."},"waistEase":{"t":"Waist ease","d":"Controls the amount of ease at your waist."}}}')};function Ne(t){let{store:e,measurements:o,options:a}=t.shorthand();e.set("chest",o.chest*(1+a.chestEase)),e.set("waist",o.waist*(1+a.waistEase)),e.set("seat",o.seat*(1+a.seatEase)),e.set("waistReduction",e.get("chest")-e.get("waist"))}const Ie={name:"carlton.front",from:I,hide:n.V9.HIDE_TREE,measurements:["waist","waistToFloor","waistToSeat","seat"],options:{chestEase:{pct:10,min:5,max:20,...(0,n.Wx)("chest"),menu:"fit"},buttonSpacingHorizontal:{pct:43.5,min:15,max:60,menu:"style"},length:{pct:69,min:35,max:100,menu:"style"},lapelReduction:{pct:5,min:0,max:10,menu:"advanced"},frontOverlap:{pct:1.5,min:1,max:2,menu:"advanced"},pocketPlacementHorizontal:{pct:11,min:5,max:20,menu:"pockets"},pocketPlacementVertical:{pct:6,min:5,max:60,menu:"pockets"},pocketWidth:{pct:95,min:70,max:120,menu:"pockets"},pocketHeight:{pct:15,min:0,max:40,menu:"pockets"},pocketRadius:{pct:20,min:0,max:50,menu:"pockets"},pocketFlapRadius:{pct:15,min:0,max:50,menu:"pockets"},chestPocketPlacement:{pct:55,min:30,max:65,menu:"pockets"},chestPocketAngle:{deg:4,min:0,max:6,menu:"pockets"},chestPocketHeight:{pct:60,min:40,max:80,menu:"pockets"},chestPocketWidth:{pct:25,min:15,max:50,menu:"pockets"},innerPocketPlacement:{pct:53,min:42,max:62,menu:"pockets"},innerPocketWidth:{pct:50,min:45,max:65,menu:"pockets"},waistEase:{pct:14,min:8,max:25,...(0,n.Wx)("waist"),menu:"fit"},seatEase:{pct:14,min:8,max:25,...(0,n.Wx)("seat"),menu:"fit"},innerPocketWeltHeight:{pct:3.5,min:2.5,max:5,menu:"pockets"}},draft:function({sa:t,snippets:e,Snippet:o,utils:a,store:i,complete:n,points:s,measurements:r,options:l,macro:c,Point:p,paths:d,Path:h,part:m}){Ne(m),s.waist=s.cfWaist.shift(0,i.get("chest")/4-i.get("waistReduction")/8),s.waistCp1=s.waist.shift(-90,s.waist.dy(s.hips)/2),s.waistCp2=s.waist.shift(90,s.armhole.dy(s.waist)/2),s.cfSeat=s.cfWaist.shift(-90,r.waistToSeat),s.seat=s.cfSeat.shift(0,i.get("seat")/4),s.seatCp2=s.seat.shift(90,s.waist.dy(s.seat)/3),s.cfHem=s.cfWaist.shift(-90,r.waistToFloor*l.length),s.hem=new p(s.seat.x,s.cfHem.y),i.set("waistToHem",s.cfHem.y-s.waist.y);let f=s.waist.x*l.buttonSpacingHorizontal,u=s.waist.dy(s.hips)/1.5;s.button1Left=s.cfHips.shift(180,f/2),s.button1Right=s.cfHips.shift(0,f/2),s.button2Left=s.button1Left.shift(90,u),s.button2Right=s.button2Left.shift(0,f),s.button3Left=s.button2Left.shift(90,u),s.button3Right=s.button3Left.shift(0,f),s.collarEdge=new p(s.button1Left.x-r.waist*l.frontOverlap,s.cfNeck.y),s.hemEdge=new p(s.collarEdge.x,s.hem.y),s.collarTip=s.collarEdge.shiftFractionTowards(s.cfNeck,l.lapelReduction),s.lapelStraightEnd=new p(s.collarEdge.x,s.armhole.y),s.lapelStraightEndCp1=s.lapelStraightEnd.shiftFractionTowards(s.collarEdge,.7),s.pocketTopLeft=new p(s.button1Right.x+s.button1Right.dx(s.hips)*l.pocketPlacementHorizontal,s.button1Right.y+s.button1Right.dy(s.button3Right)*l.pocketPlacementVertical);let g=s.button1Right.dx(s.hips)*l.pocketWidth,b=g*(1+l.pocketHeight);if(s.pocketTopRight=s.pocketTopLeft.shift(0,g),s.pocketBottomLeft=s.pocketTopLeft.shift(-90,b),s.pocketBottomRight=s.pocketTopRight.shift(-90,b),l.pocketRadius>0){let t=g*l.pocketRadius;const e={pocketRoundLeft:c("round",{id:"pocketRoundLeft",from:s.pocketTopLeft,to:s.pocketBottomRight,via:s.pocketBottomLeft,radiu
1s:t}),pocketRoundRight:c("round",{id:"pocketRoundRight",from:s.pocketBottomLeft,to:s.pocketTopRight,via:s.pocketBottomRight,radius:t})};for(const o in e)for(const t of["start","cp1","cp2","end"])s[`${o}${a.capitalize(t)}`]=s[e[o].points[t]].copy();i.set("pocketRadius",t)}i.set("pocketWidth",g),i.set("pocketHeight",b),s.pocketFlapMid=s.pocketTopLeft.shift(0,g/2);let w=.3*b;if(i.set("pocketFlapHeight",w),s.pocketFlapTopLeft=new p(s.pocketTopLeft.x-.005*g,s.pocketTopLeft.y-w/4),s.pocketFlapBottomLeft=new p(s.pocketFlapTopLeft.x,s.pocketTopLeft.y+.75*w),s.pocketFlapTopRight=s.pocketFlapTopLeft.flipX(s.pocketFlapMid),s.pocketFlapBottomRight=s.pocketFlapBottomLeft.flipX(s.pocketFlapMid),l.pocketFlapRadius>0){let t=g*l.pocketFlapRadius;const e={pocketFlapRoundLeft:c("round",{id:"pocketFlapRoundLeft",from:s.pocketFlapTopLeft,to:s.pocketFlapBottomRight,via:s.pocketFlapBottomLeft,radius:t}),pocketFlapRoundRight:c("round",{id:"pocketFlapRoundRight",from:s.pocketFlapBottomLeft,to:s.pocketFlapTopRight,via:s.pocketFlapBottomRight,radius:t})};for(const o in e)for(const t of["start","cp1","cp2","end"])s[`${o}${a.capitalize(t)}`]=s[e[o].points[t]].copy();i.set("pocketFlapRadius",t)}s.chestPocketAnchor=new p(s.waist.x*l.chestPocketPlacement,s.button2Right.shiftFractionTowards(s.button3Right,.2).y);let k=s.armhole.dy(s.chestPocketAnchor)*l.chestPocketHeight,C=k*l.chestPocketWidth;i.set("chestPocketHeight",k),i.set("chestPocketWidth",C),s.chestPocketBottomLeft=s.chestPocketAnchor.shift(180,C/2),s.chestPocketTopLeft=s.chestPocketBottomLeft.shift(90,k),s.chestPocketBottomRight=s.chestPocketBottomLeft.flipX(s.chestPocketAnchor),s.chestPocketTopRight=s.chestPocketTopLeft.flipX(s.chestPocketAnchor);for(let T of["chestPocketTopLeft","chestPocketBottomLeft","chestPocketTopRight","chestPocketBottomRight"])s[T]=s[T].rotate(l.chestPocketAngle,s.chestPocketAnchor);i.set("chestPocketBagDepth",s.button3Left.dx(s.chestPocketBottomLeft)),s.innerPocketAnchor=new p(s.waist.x*l.innerPocketPlacement,s.button2Right.shiftFractionTowards(s.button3Right,1.5).y);let v=s.waist.x*l.innerPocketWidth,y=v*l.innerPocketWeltHeight;if(i.set("innerPocketWeltHeight",y),i.set("innerPocketWidth",v),s.innerPocketTop=s.innerPocketAnchor.shift(90,y),s.innerPocketBottom=s.innerPocketAnchor.shift(-90,y),s.innerPocketLeft=s.innerPocketAnchor.shift(180,v/2),s.innerPocketRight=s.innerPocketLeft.flipX(s.innerPocketAnchor),s.innerPocketTopLeft=s.innerPocketLeft.shift(90,y),s.innerPocketTopRight=s.innerPocketTopLeft.flipX(s.innerPocketAnchor),s.innerPocketBottomLeft=s.innerPocketLeft.shift(-90,y),s.innerPocketBottomRight=s.innerPocketBottomLeft.flipX(s.innerPocketAnchor),s.rollLineEdge=s.shoulder.shiftFractionTowards(s.neck,1.15),s.rollLineStart=new p(s.collarEdge.x,s.button3Left.y),s.rollLineEnd=a.lineIntersectsCurve(s.rollLineStart,s.rollLineEdge,s.cfNeck,s.cfNeckCp1,s.neckCp2Front,s.neck),s.flbX=s.button1Right.shift(0,s.button1Right.dx(s.pocketTopLeft)/2),s.flbHem=new p(s.flbX.x,s.hemEdge.y),s.flbHem.x<=s.cfNeck.x)s.flbTop=new p(s.flbX.x,s.cfNeck.y);else if(s.flbHem.x<s.neck.x)s.flbTop=a.lineIntersectsCurve(s.flbHem,s.flbX.shift(90,2*s.flbHem.y),s.cfNeck,s.cfNeckCp1,s.neckCp2Front,s.neck);else{if(!(s.flbHem.x<s.shoulder.x))throw new Error("Could not find intersection of facing/lining boundary with neckline");s.flbTop=a.beamsIntersect(s.flbHem,s.flbX,s.neck,s.shoulder)}i.set("frontCollarLength",(new h).move(s.cfNeck).curve(s.cfNeckCp1,s.neckCp2Front,s.neck).length()),i.set("library.twoPartSleeve.frontArmholePitchToShoulder",(new h).move(s.armholePitch).curve(s.armholePitchCp2,s.shoulderCp1,s.shoulder).length());for(let T in d)-1===["frontArmhole","frontCollar","chest","waist"].indexOf(T)&&delete d[T];for(let T in e)delete e[T];return d.saBase=(new h).move(s.hem).line(s.seat).curve(s.seatCp2,s.waistCp1,s.waist).curve_(s.waistCp2,s.armhole).curve(s.armholeCp2,s.armholeHollowCp1,s.armholeHollow).curve(s.armholeHollowCp2,s.armholePitchCp1,s.armholePitch).join(d.frontArmhole).line(s.s3CollarSplit).join(d.frontCollar).line(s.collarTip)._curve(s.lapelStraightEndCp1,s.lapelStraightEnd).line(s.hemEdge).line(s.flbHem),d.hemBase=(new h).move(s.flbHem).line(s.hem),d.saBase.hide(),d.hemBase.hide(),d.seam=d.saBase.join(d.hemBase).close().addClass("fabric"),t&&(d.sa=d.saBase.offset(t).join(d.hemBase.offset(3*t)).close().addClass("fabric sa")),n&&(d.rollLine=(new h).move(s.rollLineStart).line(s.rollLineEnd).addClass("note help"),d.chestPiece=(new h).move(s.rollLineStart).curve(s.button3Right,s.waistCp2,s.armhole).addClass("note help"),d.flb=(new h).move(s.flbHem).line(s.flbTop
1).addClass("note help"),c("banner",{id:"flbFacing",path:d.flb,text:"carlton:flbFacingSide",classes:"text-sm fill-fabric center",repeat:66}),c("banner",{id:"flbLining",path:d.flb,text:"carlton:flbLiningSide",dy:7,classes:"text-sm fill-lining center",repeat:66}),d.pocket=(new h).move(s.pocketTopLeft),l.pocketRadius>0?d.pocket=d.pocket.line(s.pocketRoundLeftStart).curve(s.pocketRoundLeftCp1,s.pocketRoundLeftCp2,s.pocketRoundLeftEnd).line(s.pocketRoundRightStart).curve(s.pocketRoundRightCp1,s.pocketRoundRightCp2,s.pocketRoundRightEnd):d.pocket=d.pocket.line(s.pocketBottomLeft).line(s.pocketBottomRight),d.pocket=d.pocket.line(s.pocketTopRight).line(s.pocketTopLeft).close().addClass("note help"),d.pocketFlap=(new h).move(s.pocketFlapTopLeft),l.pocketFlapRadius>0?d.pocketFlap=d.pocketFlap.line(s.pocketFlapRoundLeftStart).curve(s.pocketFlapRoundLeftCp1,s.pocketFlapRoundLeftCp2,s.pocketFlapRoundLeftEnd).line(s.pocketFlapRoundRightStart).curve(s.pocketFlapRoundRightCp1,s.pocketFlapRoundRightCp2,s.pocketFlapRoundRightEnd):d.pocketFlap=d.pocketFlap.line(s.pocketFlapBottomLeft).line(s.pocketFlapBottomRight),d.pocketFlap=d.pocketFlap.line(s.pocketFlapTopRight).line(s.pocketFlapTopLeft).close().addClass("note help"),d.chestPocket=(new h).move(s.chestPocketTopLeft).line(s.chestPocketBottomLeft).line(s.chestPocketBottomRight).line(s.chestPocketTopRight).line(s.chestPocketTopLeft).close().addClass("note help"),d.innerPocket=(new h).move(s.innerPocketTopLeft).line(s.innerPocketBottomLeft).line(s.innerPocketBottomRight).line(s.innerPocketTopRight).line(s.innerPocketTopLeft).close().addClass("note help"),c("banner",{id:"chestLine",classes:"center contrast help",path:d.chest,text:"carlton:chestLine"}),c("banner",{id:"waistLine",classes:"center contrast help",path:d.waist,text:"carlton:waistLine"}),d.hip=(new h).move(s.cfHips).line(s.hips).addClass("help contrast"),c("banner",{id:"hipLine",classes:"center contrast help",path:d.hip,text:"carlton:hipLine"}),d.seat=(new h).move(s.cfSeat).line(s.seat).addClass("help contrast"),c("banner",{id:"seatLine",classes:"center contrast help",path:d.seat,text:"carlton:seatLine"})),i.cutlist.removeCut(),i.cutlist.addCut({cut:2,from:"fabric"}),c("title",{at:s.title,nr:1,title:"front"}),e.button1Left=new o("button",s.button1Left).attr("data-scale",2),e.button1Right=new o("button",s.button1Right).attr("data-scale",2),e.button2Left=new o("button",s.button2Left).attr("data-scale",2),e.button2Right=new o("button",s.button2Right).attr("data-scale",2),e.button3Left=new o("button",s.button3Left).attr("data-scale",2),e.button3Right=new o("button",s.button3Right).attr("data-scale",2),c("sprinkle",{snippet:"notch",on:["shoulder","cfNeck","rollLineStart","waist","seat","frontArmholePitch"]}),s.logo=new p(s.chestPocketTopRight.x,s.armhole.y),e.logo=new o("logo",s.logo),c("grainline",{from:s.cfHem,to:s.cfNeck}),c("ld",{id:"wHemClosureToLining",from:s.hemEdge,to:s.flbHem,d:15}),c("ld",{id:"wLiningToHemSide",from:s.flbHem,to:s.hem,d:15}),c("hd",{id:"wHemFull",from:s.hemEdge,to:s.hem,y:s.hem.y+15+3*t}),c("hd",{id:"wClosureToPocketLeft",from:s.rollLineStart,to:s.pocketTopLeft,y:s.pocketFlapBottomLeft.y}),c("vd",{id:"hPocketFlapTopToWaist",from:s.pocketFlapTopRight,to:s.waist,x:s.pocketTopRight.x-15}),c("vd",{id:"hPocketTopToWaist",from:s.pocketTopRight,to:s.waist,x:s.pocketTopRight.x-30}),c("vd",{id:"hChestPocketBottomToWaist",from:s.chestPocketBottomLeft,to:s.waist,x:s.chestPocketBottomLeft.x-15}),c("hd",{id:"wClosureToChestPocketBottomLeft",from:s.rollLineStart,to:s.chestPocketBottomLeft,y:s.chestPocketBottomLeft.y+15}),c("hd",{id:"wClosureToButtonLeft",from:s.rollLineStart,to:s.button3Left,y:s.button3Left.y+15}),c("hd",{id:"wClosureToButtonRight",from:s.button3Left,to:s.button3Right,y:s.button3Left.y+15}),c("vd",{id:"hHemToSeat",from:s.hem,to:s.seat,x:s.hem.x+t+15}),c("vd",{id:"hHemToWaist",from:s.hem,to:s.waist,x:s.hem.x+t+30}),c("vd",{id:"hHemToArmhole",from:s.hem,to:s.armhole,x:s.hem.x+t+45}),c("vd",{id:"hArmholeToArmholePitch",from:s.armhole,to:s.armholePitch,x:s.armhole.x+t+15}),c("vd",{id:"hArmholetoShoulder",from:s.armhole,to:s.s3ArmholeSplit,x:s.armhole.x+t+30}),c("vd",{id:"hArmholeToHps",from:s.armhole,to:s.s3CollarSplit,x:s.armhole.x+t+45}),c("vd",{id:"hTopButtonToClosureTop",from:s.rollLineStart,to:s.collarTip,x:s.rollLineStart.x-t-15}),c("vd",{id:"hTopButtonToButtonBelow",from:s.button2Left,to:s.rollLineStart,x:s.rollLineStart.x-t-15}),c("vd",{id:"hMiddleButtonToBottomButton",from:s.button1Left,to:s.button2Left,x:s.rollLineStart.x-t-15}),c("vd",{id:"hHemToClosureTop",from:s.hemEdge,to:s.collarTip,x:s.rollLineStart.x-t-30}),c("vd",{id:"hFull",from:s.hemEdge,to:s.s3CollarSplit,x:s.rollLineStart.x-t-45}),c("hd",{id:"wLapelCurve",from:s.lapelStraightEnd,to:s.collarTip,y:s.collarTip.y-t-15}),c("hd",{id:"wClosureTopToCf",from:s.lapelStraightEnd,to:s.cfNeck,y:s.collarTip.y-t-30}),c("hd",{id:"wClosureTopToLapelFoldTop",from:s.lapelStraightEnd,to:s.rollLineEnd,y:s.collarTip.y-t-45}),c("hd",{id:"wClosureTopToHps",from:s.lapelStraightEnd,to:s.neck,y:s.s3CollarSplit.y-t-15}),c("hd",{id:"wClosureTopToArmholePitchPoint",from:s.lapelStraightEnd,to:s.armholePitch,y:s.s3CollarSplit.y-t-30}),c("hd",{id:"wClosureTopToShoulder",from:s.lapelStraightEnd,to:s.s3ArmholeSplit,y:s.s3CollarSplit.y-t-45}),c("hd",{id:"wFull",from:s.lapelStraightEnd,to:s.armhole,y:s.s3CollarSplit.y-t-60}),m}};const Me={name:"carlton.frontFacing",from:Ie,draft:function({sa:t,snippets:e,Snippet:o,store:a,points:i,macro:n,expand:s,paths:r,Path:l,part:c}){if(!s)return a.flag.note({msg:"carlton:cutFrontFacing",notes:"flag:partHiddenByExpand",suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),a.flag.preset("expandIsOff"),c.hide();a.flag.preset("expandIsOn"),r.seam=(new l).move(i.hemEdge).line(i.flbHem).line(i.flbTop
1).join(r.frontCollar.split(i.flbTop)[1]).line(i.collarTip)._curve(i.lapelStraightEndCp1,i.lapelStraightEnd).line(i.hemEdge).close().addClass("fabric"),t&&(r.sa=r.seam.offset(t).addClass("fabric sa")),n("rmad");for(const p in r)["seam","sa"].includes(p)||delete r[p];for(const p in e)delete e[p];return a.cutlist.removeCut(),a.cutlist.addCut({cut:2,from:"fabric"}),i.title=i.cfNeck.shift(-90,180),n("title",{at:i.title,nr:"1a",title:"frontFacing",align:"center"}),i.logo=i.title.shift(-90,100),e.logo=new o("logo",i.logo),n("grainline",{from:i.cfHem,to:i.cfNeck}),n("hd",{id:"wTop",from:i.collarTip,to:i.flbTop,y:i.flbTop.y-t-15}),n("hd",{id:"wFull",from:i.rollLineStart,to:i.flbTop,y:i.flbTop.y-t-30}),n("vd",{id:"hHemToCollar",from:i.hemEdge,to:i.collarTip,x:i.hemEdge.x-t-15}),n("vd",{id:"hFull",from:i.hemEdge,to:i.flbTop,x:i.hemEdge.x-t-30}),c}};const _e={name:"carlton.frontLining",from:Ie,draft:function({sa:t,snippets:e,Snippet:o,store:a,points:i,macro:n,Point:s,expand:r,paths:l,Path:c,part:p}){if(!r)return a.flag.note({msg:"carlton:cutFrontLining",notes:"flag:partHiddenByExpand",suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),a.flag.preset("expandIsOff"),p.hide();a.flag.preset("expandIsOn"),l.seam=(new c).move(i.flbHem).line(i.hem).line(i.seat).curve(i.seatCp2,i.waistCp1,i.waist).curve_(i.waistCp2,i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.armholePitchCp1,i.armholePitch).join(l.frontArmhole).line(i.s3CollarSplit).join(l.frontCollar.split(i.flbTop)[0]).line(i.flbHem).close().addClass("lining"),t&&(l.sa=l.seam.offset(t).addClass("lining sa")),n("rmad"),n("rmbanner","flbFacing"),n("rmbanner","flbLining");for(const d in l)["seam","sa"].includes(d)||delete l[d];for(const d in e)delete e[d];return a.cutlist.removeCut(),a.cutlist.addCut({cut:2,from:"lining"}),i.title=i.flbTop.shiftFractionTowards(i.seat,.5),n("rmtitle"),n("title",{at:i.title,nr:"1b",title:"frontLining",align:"center"}),i.logo=i.title.shift(-90,100),e.logo=new o("logo",i.logo),i.grainlineTop=i.flbTop.shift(0,30),i.grainlineBottom=new s(i.grainlineTop.x,i.hemEdge.y),n("grainline",{from:i.grainlineBottom,to:i.grainlineTop}),n("hd",{id:"wToHps",from:i.flbTop,to:i.s3CollarSplit,y:i.s3CollarSplit.y-t-15}),n("hd",{id:"wToHps",from:i.flbTop,to:i.s3CollarSplit,y:i.s3CollarSplit.y-t-15}),n("hd",{id:"wToShoulder",from:i.flbTop,to:i.s3ArmholeSplit,y:i.s3CollarSplit.y-t-30}),n("hd",{id:"wToArmhole",from:i.flbTop,to:i.armhole,y:i.s3CollarSplit.y-t-45}),n("hd",{id:"wToSeat",from:i.flbTop,to:i.seat,y:i.s3CollarSplit.y-t-60}),n("vd",{id:"hToCollar",from:i.flbHem,to:i.flbTop,x:i.flbTop.x-t-15}),n("vd",{id:"hFull",from:i.flbHem,to:i.s3CollarSplit,x:i.flbTop.x-t-30}),p}};const je={name:"carlton.back",from:N,hide:n.V9.HIDE_TREE,measurements:["chest","hpsToWaistBack"],options:{backPleat:.048,beltWidth:{pct:15,min:10,max:20,menu:"style"},waistEase:{pct:14,min:8,max:25,...(0,n.Wx)("waist"),menu:"fit"},seatEase:{pct:14,min:8,max:25,...(0,n.Wx)("seat"),menu:"fit"}},draft:function({sa:t,snippets:e,Snippet:o,store:a,complete:i,points:n,measurements:s,options:r,macro:l,Point:c,paths:p,Path:d,part:h}){Ne(h);let m=s.hpsToWaistBack*r.beltWidth;a.set("beltWidth",m),n.bpStart=new c(0,n.armholePitch.y),n.bpTop=new c(s.chest*r.backPleat*-1,n.armholePitch.y),n.bpBottom=new c(n.bpTop.x,n.cbWaist.y-m/2),n.bpTriangleEdge=n.bpStart.shift(0,.6*n.bpTop.dx(n.bpStart)),n.bpTriangleTip=n.bpStart.shift(90,n.bpStart.dx(n.bpTriangleEdge)),n.waist=new c(a.get("chest")/4-a.get("waistReduction")/8,n.bpBottom.y),n.waistCp2=n.waist.shift(90,n.armhole.dy(n.waist)/3),n.cbWaist=new c(0,n.bpBottom.y),n.dartCenter=n.cbWaist.shiftFractionTowards(n.waist,.4),n.dartTip=n.dartCenter.shift(90,.85*n.armhole.dy(n.dartCenter)),n.dartRight=n.dartCenter.shift(0,a.get("waistReduction")/8),n.dartLeft=n.dartRight.flipX(n.dartCenter),n.dartLeftCp=n.dartLeft.shift(90,.6*n.dartTip.dy(n.dartCenter)),n.dartRightCp=n.dartLeftCp.flipX(n.dartCenter),a.set("cbToDart",n.dartLeft.x),a.set("dartToSide",n.dartRight.dx(n.waist)),n.bpEnd=(new d).move(n.armhole)._curve(n.waistCp2,n.waist).shiftFractionAlong(.1),n.bsCp1=n.bpStart.shiftFractionTowards(n.armholePitch,.5),n.bsCp2=n.bpEnd.shiftFractionTowards(n.cbArmhole,.3),a.set("backCollarLength",(new d).move(n.cbNeck)._curve(n.neckCp2,n.neck).length()),a.set("library.twoPartSleeve.backArmholePitchToShoulder",(new d).move(n.armholePitch).curve(n.armholePitchCp2,n.shoulderCp1,n.shoulder).length());for(let f in p)-1===["backArmhole","backCollar"].indexOf(f)&&delete p[f];for(let f in e)delete e[f];return p.seam1=(new d).move(n.cbNeck).line(n.bpStart).line(n.bpTop).line(n.bpBottom),p.dart=(new d).move(n.dartLeft).curve_(n.dartLeftCp,n.dartTip)._curve(n.dartRightCp,n.dartRight),p.seam2=(new d).move(n.waist).curve_(n.waistCp2,n.armhole).curve(n.armholeCp2,n.armholeHollowCp1,n.armholeHollow).curve(n.armholeHollowCp2,n.armholePitchCp1,n.armholePitch).join(p.backArmhole).line(n.s3CollarSplit).join(p.backCollar),p.seam=p.seam1.join(p.dart).join(p.seam2).close().attr("class","fabric"),t&&(p.sa=p.seam1.line(n.waist).offset(t).join(p.seam2.offset(t)).close().trim().close().addClass("fabric sa")),i&&(p.backStay=(new d).move(n.bpStart).curve(n.bsCp1,n.bsCp2,n.bpEnd).addClass("canvas help"),p.triangle=(new d).move(n.bpTriangleTip).line(n.bpTriangleEdge).line(n.bpStart).addClass("dashed"),p.chest=(new d).move(n.cbChest).line(n.chest).addClass("help contrast"),l("banner",{id:"chestLine",classes:"center contrast help",path:p.chest,text:"carlton:chestLine"})),a.cutlist.removeCut("fabric"),a.cutlist.addCut([{cut:2,from:"fabric"},{cut:2,from:"lining"}]),l("title",{at:n.title,nr:"2",title:"back"}),l("sprinkle",{snippet:"bnotch",on:["shoulder","bpTriangleTip","backArmholePitch"]}),l("grainline",{from:n.cbWaist,to:n.bpStart}),n.logo=new c(.7*n.armhole.x,n.dartTip.y),e.logo=new o("logo",n.logo),l("hd",{id:"wFold",from:n.bpBottom,to:n.bpStart,y:n.bpBottom.y+15+t}),l("hd",{id:"wCbWaistToWaistDartInner",from:n.cbWaist,to:n.dartLeft,y:n.cbWaist.y+15+t}),l("hd",{id:"wWaistDart",from:n.dartLeft,to:n.dartRight,y:n.cbWaist.y+15+t}),l("hd",{id:"wWaistDartOuterToWaistSide",from:n.dartRight,to:n.waist,y:n.cbWaist.y+15+t}),l("hd",{id:"hTriangle",from:n.cbWaist,to:n.waist,y:n.cbWaist.y+30+t}),l("hd",{id:"wWaist",from:n.bpBottom,to:n.waist,y:n.cbWaist.y+45+t}),l("vd",{id:"hWaistToArmhole",from:n.waist,to:n.armhole,x:n.armhole.x+15+t}),l("vd",{id:"hArmholeToArmpit",from:n.armhole,to:n.armholePitch,x:n.armhole.x+15+t}),l("vd",{id:"hArmpitToShoulder",from:n.armhole,to:n.s3ArmholeSplit,x:n.armhole.x+30+t}),l("vd",{id:"hWaistToShoulder",from:n.waist,to:n.s3ArmholeSplit,x:n.armhole.x+45+t}),l("vd",{id:"hDart",from:n.dartRight,to:n.dartTip,x:n.dartRight.x+15}),l("vd",{id:"hWaistToFoldTop",from:n.bpBottom,to:n.bpTop,x:n.bpTop.x-15-t}),l("vd",{id:"hFoldTopToNeckOpening",from:n.bpTop,to:n.cbNeck,x:n.bpTop.x-15-t}),l("vd",{id:"hFull",from:n.bpBottom,to:n.s3CollarSplit,x:n.bpTop.x-30-t}),l("vd",{id:"hTriangle",from:n.bpStart,to:n.bpTriangleTip,x:n.bpTriangleEdge.x+15}),l("hd",{id:"wTriangle",from:n.bpStart,to:n.bpTriangleEdge,y:n.bpTriangleEdge.y+15}),l("hd",{id:"wNeckOpening",from:n.cbNeck,to:n.s3CollarSplit,y:n.s3CollarSplit.y-15-t}),l("hd",{id:"wCbToArmholePitch",from:n.cbNeck,to:n.armholePitch,y:n.s3CollarSplit.y-30-t}),l("hd",{id:"wCbToShoulder",from:n.cbNeck,to:n.shoulder,y:n.s3CollarSplit.y-45-t}),l("hd",{id:"wFull",from:n.cbNeck,to:n.armhole,y:n.s3CollarSplit.y-60-t}),h}};const Ge={name:"carlton.backStay",from:je,draft:function({sa:t,snippets:e,Snippet:o,store:a,points:i,macro:n,expand:s,Point:r,paths:l,Path:c,part:p}){if(!s)return a.flag.note({msg:"carlton:cutBackStay",notes:"flag:partHiddenByExpand",suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),a.flag.preset("expandIsOff"),p.hide();a.flag.preset("expandIsOn"),l.seam=(new c).move(i.bpStart).curve(i.bsCp1,i.bsCp2,i.bpEnd).line(i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.armholePitchCp1,i.armholePitch).join(l.backArmhole).line(i.s3CollarSplit).join(l.backCollar).line(i.bpStart).close().addClass("canvas"),t&&(l.sa=l.seam.offset(t).addClass("canvas sa")),n("rmad");for(const d in l)["seam","sa"].includes(d)||delete l[d];for(const d in e)delete e[d];return a.cutlist.removeCut(),a.cutlist.addCut({cut:1,from:"canvas",onFold:!0}),n("rmtitle"),n("title",{at:i.title,nr:"2a",title:"backStay"}),n("cutonfold",{from:i.cbNeck,to:i.bpStart,grainline:!0,reverse:!0}),i.logo=new r(i.s3CollarSplit.x,i.title.y/2),e.logo=new o("logo",i.logo),n("vd",{id:"hBottomToArmhole",from:i.bpEnd,to:i.armhole,x:i.armhole.x+15+t}),n("vd",{id:"hBottomToShoulder",from:i.bpEnd,to:i.s3ArmholeSplit,x:i.armhole.x+30+t}),n("vd",{id:"hFull",from:i.bpEnd,to:i.s3CollarSplit,x:i.armhole.x+45+t}),n("hd",{id:"wNeckOpening",from:i.cbNeck,to:i.s3CollarSplit,y:i.s3CollarSplit.y-15-t}),n("hd",{id:"wCbToArmholePitch",from:i.cbNeck,to:i.armholePitch,y:i.s3CollarSplit.y-30-t}),n("hd",{id:"wCbToShoulder",from:i.cbNeck,to:i.shoulder,y:i.s3CollarSplit.y-45-t}),n("hd",{id:"wFull",from:i.cbNeck,to:i.armhole,y:i.s3CollarSplit.y-60-t}),n("vd",{id:"hToCenter",from:i.bpEnd,to:i.bpStart,x:i.bpStart.x-15+t}),n("vd",{id:"hToNeck",from:i.bpEnd,to:i.cbNeck,x:i.bpStart.x-30+t}),p}};const Ue={name:"carlton.tail",after:[Ie,je],draft:function({units:t,sa:e,store:o,c
1omplete:a,points:i,macro:n,Point:s,paths:r,Path:l,expand:c,part:p}){const d=o.get("waistToHem")-o.get("beltWidth")/2;if(!c){const a=e?2*e:0;return o.flag.note({msg:"carlton:cutTail",notes:[e?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:t(3*o.get("cbToDart")+o.get("dartToSide")+a),l:t(d+2*a)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),o.flag.preset("expandIsOff"),p.hide()}o.flag.preset("expandIsOn"),i.cbTop=new s(0,0),i.fold1Top=i.cbTop.shift(0,o.get("cbToDart")/2),i.fold2Top=i.cbTop.shift(0,o.get("cbToDart")),i.fold3Top=i.cbTop.shift(0,2*o.get("cbToDart")),i.fold4Top=i.fold3Top.shift(0,o.get("cbToDart")/2),i.fold5Top=i.fold4Top.shift(0,o.get("cbToDart")/2),i.waistTop=i.fold5Top.shift(0,o.get("dartToSide"));for(let h of["cb","fold1","fold2","fold3","fold4","fold5","waist"])i[h+"Mid"]=i[h+"Top"].shift(-90,d/2),i[h+"Bottom"]=i[h+"Top"].shift(-90,d);if(r.seam=(new l).move(i.cbTop).line(i.cbBottom).line(i.waistBottom).line(i.waistTop).line(i.cbTop).addClass("fabric"),a&&(r.folds=(new l).move(i.fold1Top).line(i.fold1Bottom).move(i.fold2Top).line(i.fold2Bottom).move(i.fold3Top).line(i.fold3Bottom).move(i.fold4Top).line(i.fold4Bottom).addClass("fabric help"),r.foldEdge=(new l).move(i.fold5Top).line(i.fold5Bottom).addClass("fabric dashed stroke-sm")),e){const t=(new l).move(i.waistBottom).line(i.waistTop).line(i.cbTop).line(i.cbBottom),o=(new l).move(i.cbBottom).line(i.waistBottom);r.sa=t.offset(e).join(o.offset(3*e)).close().addClass("sa fabric")}return o.cutlist.addCut([{cut:2,from:"fabric"},{cut:2,from:"lining"}]),i.title=i.cbTop.shiftFractionTowards(i.waistBottom,.2),n("title",{at:i.title,nr:5,title:"tail"}),n("banner",{path:(new l).move(i.cbBottom).line(i.cbTop),text:"carlton:centerBack",classes:"text-sm center fill-note",dy:7,repeat:66}),n("sewtogether",{id:"fold1",from:i.cbMid,to:i.fold2Mid,text:"foldUnderToAlign"}),n("pleat",{id:"fold1",from:i.fold2Mid,to:i.cbMid,classes:{from:"stroke-lg note",to:"stroke-lg note"}}),n("sewtogether",{id:"fold2",from:i.fold3Mid,to:i.fold5Mid,text:"foldUnderToAlign"}),n("pleat",{id:"fold2",from:i.fold3Mid,to:i.fold5Mid,margin:-35,classes:{from:"stroke-lg note",to:"stroke-lg note"}}),n("sprinkle",{snippet:"bnotch",on:["fold1Top","fold2Top","fold3Top","fold4Top","fold5Top","fold1Bottom","fold2Bottom","fold3Bottom","fold4Bottom","fold5Bottom","cbMid","fold2Mid","fold3Mid","fold5Mid"]}),n("grainline",{from:i.fold5Bottom.shiftFractionTowards(i.waistBottom,.5),to:i.fold5Top.shiftFractionTowards(i.waistTop,.5)}),n("hd",{id:"wFold1",from:i.cbBottom,to:i.fold1Bottom,y:i.cbBottom.y+3*e+15}),n("hd",{id:"wFold2",from:i.cbBottom,to:i.fold2Bottom,y:i.cbBottom.y+3*e+30}),n("hd",{id:"wFold3",from:i.cbBottom,to:i.fold3Bottom,y:i.cbBottom.y+3*e+45}),n("hd",{id:"wFold4",from:i.cbBottom,to:i.fold4Bottom,y:i.cbBottom.y+3*e+60}),n("hd",{id:"wFull",from:i.cbBottom,to:i.waistBottom,y:i.cbBottom.y+3*e+75}),n("vd",{from:i.waistBottom,to:i.waistTop,x:i.waistTop.x+e+15}),p}};const Ye={name:"carlton.topsleeve",from:B,after:[I,Ie,je],hide:{from:!0,inherited:!0},measurements:["shoulderToWrist"],options:{cuffLength:{pct:15,min:10,max:20,menu:"style"},libraryFitSleeve:!0,brianFitCollar:!0,collarFactor:4.8,chestShapingMax:5,lengthBonus:0,collarEase:.145,acrossBackFactor:{pct:97,min:93,max:100,menu:"fit"},armholeDepthFactor:{pct:65,min:50,max:70,menu:"fit"},bicepsEase:{pct:20,min:0,max:50,...(0,n.Wx)("biceps"),menu:"fit"},cuffEase:{pct:60,min:30,max:100,...(0,n.Wx)("wrist"),menu:"fit"},shoulderEase:{pct:0,min:-2,max:6,...(0,n.Wx)("shoulderToShoulder"),menu:"fit"},sleeveBend:{deg:10,min:0,max:20,menu:"fit"},sleeveLengthBonus:{pct:7,min:0,max:20,menu:"fit"},s3Collar:{pct:0,min:-100,max:100,menu:"style"},s3Armhole:{pct:0,min:-100,max:100,menu:"style"},draftForHighBust:{bool:!1,menu:"fit"},backNeckCutout:{pct:5,min:2,max:8,menu:"advanced"},frontArmholeDeeper:{pct:.5,min:0,max:1.5,menu:"advanced"},shoulderSlopeReduction:{pct:12,min:0,max:80,menu:"advanced"},sleevecapHeight:{pct:45,min:40,max:60,menu:"advanced"},sleevecapEase:{pct:1,min:0,max:10,menu:"advanced"}},draft:function({sa:t,store:e,complete:o,points:a,measurements:i,options:n,macro:s,utils:r,Point:l,paths:c,Path:p,Snippet:d,snippets:h,part:m}){let f=i.shoulderToWrist*n.cuffLength,u=a.tsWristRight.angle(a.tsWristLeft);a.cuffBottomRight=a.tsWristRight.shift(u+90,f),a.cuffBottomLeft=a.tsWristLeft.shift(u+90,f);
1const g=s("round",{id:"round",to:a.tsWristRight,from:a.cuffBottomLeft,via:a.cuffBottomRight,radius:f/3});for(const v of["start","cp1","cp2","end"])a[`round${r.capitalize(v)}`]=a[g.points[v]].copy();e.set("topCuffWidth",a.tsWristLeft.dist(a.tsWristRight)),e.set("cuffLength",f),e.set("cuffRadius",f/3);for(let v in c)delete c[v];c.seam=(new p).move(a.tsLeftEdge)._curve(a.tsElbowLeftCpTop,a.tsElbowLeft).line(a.tsWristLeft).line(a.cuffBottomLeft).line(a.roundStart).curve(a.roundCp1,a.roundCp2,a.roundEnd).line(a.tsWristRight).line(a.elbowRight).curve(a.elbowRightCpTop,a.tsRightEdgeCpBottom,a.tsRightEdge).curve_(a.tsRightEdgeCpTop,a.backPitchPoint)._curve(a.topCpRight,a.top).curve(a.topCpLeft,a.frontPitchPointCpTop,a.frontPitchPoint).curve(a.frontPitchPointCpBottom,a.tsLeftEdgeCpRight,a.tsLeftEdge).close().attr("class","fabric"),t&&(c.sa=c.seam.offset(t).attr("class","fabric sa")),o&&(c.cuff=(new p).move(a.tsWristLeft).line(a.usWristRight).addClass("note help")),e.cutlist.removeCut(),e.cutlist.addCut([{cut:2,from:"fabric"},{cut:2,from:"lining"}]),s("rmtitle"),s("title",{at:a.armCenter,nr:3,title:"topsleeve",align:"center"}),s("grainline",{from:a.boxBottom,to:a.top}),s("scalebox",{at:new l(a.top.x,.666*a.elbowRight.y)}),a.logo=new l(a.top.x,1.1*a.elbowRight.y),h.logo=new d("logo",a.logo),h.sleeveTop=new d("notch",a.top);const b=(new p).move(a.top).curve(a.topCpLeft,a.frontPitchPointCpTop,a.frontPitchPoint).length(),w=e.get("library.twoPartSleeve.frontArmholePitchToShoulder")+e.get("sleevecapEase")/2;a.sleeveNotchFront=w===b?a.frontPitchPoint.copy():w>b?(new p).move(a.frontPitchPoint).curve(a.frontPitchPointCpBottom,a.tsLeftEdgeCpRight,a.tsLeftEdge).shiftAlong(w-b):(new p).move(a.top).curve(a.topCpLeft,a.frontPitchPointCpTop,a.frontPitchPoint).shiftAlong(w),h.frontSleeveNotch=new d("notch",a.sleeveNotchFront);const k=(new p).move(a.top).curve_(a.topCpRight,a.backPitchPoint).length(),C=e.get("library.twoPartSleeve.backArmholePitchToShoulder")+e.get("sleevecapEase")/2;return C===k?(a.sleeveNotchBack=a.backPitchPoint.copy(),h.backSleeveNotch=new d("bnotch",a.sleeveNotchBack)):C<k?(a.sleeveNotchBack=(new p).move(a.top).move(a.top).curve_(a.topCpRight,a.backPitchPoint).shiftAlong(C),h.backSleeveNotch=new d("bnotch",a.sleeveNotchBack)):e.set("undersleeveTipToNotch",C-k),s("ld",{id:"lCuff",from:a.tsWristLeft,to:a.tsWristRight,d:-15}),s("vd",{id:"hCuffToElbowFront",from:a.tsWristLeft,to:a.tsElbowLeft,x:a.tsLeftEdge.x-t-15}),s("vd",{id:"hCuffToArmholeFront",from:a.tsWristLeft,to:a.tsLeftEdge,x:a.tsLeftEdge.x-t-30}),s("ld",{id:"lCuffFoldover",from:a.cuffBottomLeft,to:a.tsWristLeft,d:15+t}),s("vd",{id:"hCuffFoldover",from:a.cuffBottomRight,to:a.usWristRight,x:a.usWristRight.x+15+t}),s("vd",{id:"hCuffToElbowBack",from:a.usWristRight,to:a.elbowRight,x:a.elbowRight.x+15+t}),s("vd",{id:"hCuffBackToArmholeFront",from:a.usWristRight,to:a.tsRightEdge,x:a.elbowRight.x+30+t}),s("vd",{id:"hCuffToArmholeBack",from:a.usWristRight,to:a.backPitchPoint,x:a.elbowRight.x+45+t}),s("vd",{id:"hCuffToTop",from:a.usWristRight,to:a.top,x:a.elbowRight.x+60+t}),s("vd",{id:"hCuffToTop",from:a.cuffBottomRight,to:a.top,x:a.elbowRight.x+75+t}),s("ld",{id:"wElbow",from:a.tsElbowLeft,to:a.elbowRight}),s("ld",{id:"wAtArmholeFront",from:a.tsLeftEdge,to:a.tsRightEdge}),s("hd",{id:"wArmholeFrontToTop",from:a.tsLeftEdge,to:a.top,y:a.top.y-t-15}),s("hd",{id:"wArmholeFrontToArmholeBack",from:a.tsLeftEdge,to:a.backPitchPoint,y:a.top.y-t-30}),s("hd",{id:"wFull",from:a.tsLeftEdge,to:a.tsRightEdge,y:a.top.y-t-45}),m}};const $e={name:"carlton.undersleeve",from:S,after:I,hide:{from:!0,after:!0,inherited:!0},measurements:["shoulderToWrist"],options:{cuffLength:{pct:15,min:10,max:20,menu:"style"},libraryFitSleeve:!0,brianFitCollar:!0,collarFactor:4.8,chestShapingMax:5,lengthBonus:0,collarEase:.145,acrossBackFactor:{pct:97,min:93,max:100,menu:"fit"},armholeDepthFactor:{pct:65,min:50,max:70,menu:"fit"},bicepsEase:{pct:20,min:0,max:50,...(0,n.Wx)("biceps"),menu:"fit"},cuffEase:{pct:60,min:30,max:100,...(0,n.Wx)("wrist"),menu:"fit"},shoulderEase:{pct:0,min:-2,max:6,...(0,n.Wx)("shoulderToShoulder"),menu:"fit"},sleeveBend:{deg:10,min:0,max:20,menu:"fit"},sleeveLengthBonus:{pct:7,min:0,max:20,menu:"fit"},s3Collar:{pct:0,min:-100,max:100,menu:"style"},s3Armhole:{pct:0,min:-100,max:100,menu:"style"},draftForHighBust:{bool:!1,menu:"fit"},backNeckCutout:{pct:5,min:2,max:8,menu:"advanced"},frontArmholeDeeper:{pct:.5,min:0,max:1.5,menu:"advanced"},shoulderSlopeReduction:{pct:12,min:0,max:80,menu:"advanced"},sleevecapHeight:{pct:45,min:40,max:60,menu:"advanced"},sleevecapEase:{pct:1,min:0,max:10,menu:"advanced"}},draft:function({sa:t,store:e,complete:o,points:a,utils:i,measurements:n,options:s,macro:r,Point:l,paths:c,Path:p,Snippet:d,snippets:h,part:m}){let f=n.shoulderToWrist*s.cuffLength,u=a.usWristRight.angle(a.usWristLeft);a.cuffBottomRight=a.usWristRight.shift(u+90,f),a.cuffBottomLeft=a.usWristLeft.shift(u+90,f);
1const g=r("round",{id:"round",to:a.usWristRight,from:a.cuffBottomLeft,via:a.cuffBottomRight,radius:f/3});for(const w of["start","cp1","cp2","end"])a[`round${i.capitalize(w)}`]=a[g.points[w]].copy();e.set("underCuffWidth",a.usWristLeft.dist(a.usWristRight));for(let w in c)delete c[w];c.seam=(new p).move(a.usLeftEdge)._curve(a.usElbowLeftCpTop,a.usElbowLeft).line(a.usWristLeft).line(a.cuffBottomLeft).line(a.roundStart).curve(a.roundCp1,a.roundCp2,a.roundEnd).line(a.usWristRight).line(a.elbowRight).curve(a.elbowRightCpTop,a.usRightEdgeCpBottom,a.usRightEdge).curve_(a.usRightEdgeCpTop,a.usTip).curve(a.usTipCpBottom,a.usLeftEdgeCpRight,a.usLeftEdgeRight).line(a.usLeftEdge).close().addClass("fabric"),t&&(c.sa=c.seam.offset(t).addClass("fabric sa")),o&&(c.cuff=(new p).move(a.usWristLeft).line(a.usWristRight).addClass("note help")),e.cutlist.addCut({cut:2,from:"fabric"}),e.cutlist.addCut({cut:2,from:"lining"});const b=e.get("undersleeveTipToNotch");return b&&(h.backSleeveNotch=new d("bnotch",(new p).move(a.usTip).curve(a.usTipCpBottom,a.usLeftEdgeCpRight,a.usLeftEdge).shiftAlong(b))),r("title",{at:new l(a.armCenter.x,.666*a.elbowLeft.y),nr:4,title:"undersleeve",align:"center"}),r("grainline",{from:a.boxBottom,to:new l(a.top.x,a.usLeftEdge.y)}),r("ld",{id:"lWrist",from:a.usWristLeft,to:a.usWristRight,d:-15}),r("vd",{id:"hWristToElbow",from:a.usWristLeft,to:a.usElbowLeft,x:a.usLeftEdge.x-t-15}),r("vd",{id:"hWristToArmholeFront",from:a.usWristLeft,to:a.usLeftEdge,x:a.usLeftEdge.x-t-30}),r("ld",{id:"lCuffFoldOver",from:a.cuffBottomLeft,to:a.usWristLeft,d:15+t}),r("vd",{id:"hCuffFoldOver",from:a.cuffBottomRight,to:a.usWristRight,x:a.usWristRight.x+15+t}),r("vd",{id:"hCuffToElbowBack",from:a.usWristRight,to:a.elbowRight,x:a.elbowRight.x+15+t}),r("vd",{id:"wristToTipBack",from:a.usWristRight,to:a.usTip,x:a.elbowRight.x+30+t}),r("vd",{id:"hFull",from:a.cuffBottomRight,to:a.usTip,x:a.elbowRight.x+45+t}),r("ld",{id:"wAtElbow",from:a.usElbowLeft,to:a.elbowRight}),r("ld",{id:"wAtTopFront",from:a.usLeftEdge,to:a.usRightEdge,d:-15}),r("hd",{id:"wAtTop",from:a.usLeftEdge,to:a.usTip,y:a.usTip.y-t-15}),r("vd",{id:"hSleevecap",from:a.usLeftEdge,to:a.usTip,x:a.usLeftEdge.x-t-15}),m}};const ze={name:"carlton.belt",after:je,draft:function({sa:t,snippets:e,Snippet:o,store:a,points:i,macro:n,utils:s,Point:r,paths:l,Path:c,part:p}){const d=1.6*(a.get("cbToDart")+a.get("dartToSide")),h=a.get("beltWidth");i.topLeft=new r(0,0),i.topRight=new r(d,0),i.bottomLeft=new r(0,h),i.bottomRight=new r(d,h),i.button=new r(h/2,h/2);const m={roundTop:n("round",{id:"roundTop",from:i.topRight,to:i.bottomLeft,via:i.topLeft,radius:h/4}),roundBottom:n("round",{id:"roundBottom",from:i.topLeft,to:i.bottomRight,via:i.bottomLeft,radius:h/4})};for(const f in m)for(const t of["start","cp1","cp2","end"])i[`${f}${s.capitalize(t)}`]=i[m[f].points[t]].copy();return l.seam=(new c).move(i.roundTopStart).curve(i.roundTopCp1,i.roundTopCp2,i.roundTopEnd).line(i.roundBottomStart).curve(i.roundBottomCp1,i.roundBottomCp2,i.roundBottomEnd).line(i.bottomRight).line(i.topRight).line(i.roundTopStart).close().attr("class","fabric"),t&&(l.sa=l.seam.offset(t).attr("class","fabric sa")),a.cutlist.addCut({cut:4,from:"fabric"}),e.button=new o("button",i.button).attr("data-scale",2),e.buttonhole=new o("buttonhole",i.button).scale(2).rotate(90),i.title=new r(i.bottomRight.x/2,i.bottomRight.y/2),n("title",{at:i.title,nr:6,title:"belt"}),i.logo=new r(.75*i.bottomRight.x,.65*i.bottomRight.y),e.logo=new o("logo",i.logo),e.waistNotch=new o("notch",i.bottomRight.shiftFractionTowards(i.topRight,.5)),n("hd",{id:"wRoundedCorner",from:i.roundBottomStart,to:i.roundBottomEnd,y:i.roundBottomEnd.y+t+15}),n("hd",{id:"wToButton",from:i.roundBottomStart,to:i.button,y:i.roundBottomEnd.y+t+30}),n("hd",{id:"wFull",from:i.roundBottomStart,to:i.bottomRight,y:i.roundBottomEnd.y+t+45}),n("vd",{id:"hFull",from:i.bottomRight,to:i.topRight,x:i.topRight.x+t+15}),p}};const Je={name:"carlton.collarStand",after:[Ie,je],options:{collarHeight:{pct:9.6,min:8,max:11,menu:"collar"},collarFlare:{pct:20,min:0,max:40,menu:"collar"}},draft:function({sa:t,store:e,points:o,measurements:a,options:i,macro:n,Point:s,paths:r,Path:l,part:c}){const p=a.chest*i.collarHeight,d=e.get("frontCollarLength")+e.get("backCollarLength");o.topLeft=new s(0,0),o.bottomLeft=new s(0,p),o.topRight=new s(d,-1*p*i.collarFlare),o.bottomRight=new s(d,p),o.bottomLeftCp=o.bottomLeft.shift(0,.4*o.bottomRight.x),o.standTop=o.bottomLeft.shiftFractionTowards(o.topLeft,.25),o.standTip=new s(.75*o.topRight.x,o.bottomLeft.y+o.topRight.x/8.5),o.standTipCp=o.standTip.shift(180,o.standTop.dy(o.bottomLeft)),o.standTopCp=o.standTop.shift(0,.9*o.standTip.x);for(let h of["standTopCp","standTip","standTipCp","bottomLeftCp"])o[h+"Left"]=o[h].flipX();return o.anchor=o.standTop.clone(),r.seam=(new l).move(o.bottomLeft).curve(o.bottomLeftCp,o.standTipCp,o.standTip)._curve(o.standTopCp,o.standTop).curve_(o.standTopCpLeft,o.standTipLeft).curve(o.standTipCpLeft,o.bottomLeftCpLeft,o.bottomLeft).close().attr("class","fabric"),t&&(r.sa=r.seam.offset(t).attr("class","fabric sa")),e.cutlist.removeCut(),e.cutlist.addCut({cut:2,from:"fabric"}),e.cutlist.addCut({cut:1,from:"canvas"}),o.title=o.standTop.clone(),n("title",{at:o.title,nr:7,title:"collarStand",scale:.8}),n("grainline",{from:o.bottomLeft,to:o.standTop}),n("hd",{id:"wFull",from:o.standTipLeft,to:o.standTip,y:o.standTip.y+t+15}),n("vd",{id:"hCenter",from:o.bottomLeft,to:o.standTop,x:o.standTip.x+t+15}),n("vd",{id:"hFull",from:o.standTip,to:o.standTop,x:o.standTip.x+t+30}),c}};const Ke={name:"carlton.collar",from:Je,options:{collarSpread:{deg:4,min:2,max:6,menu:"collar"}},draft:function({sa:t,points:e,options:o,macro:a,paths:i,Path:n,part:s,store:r}){e.cutTop1=e.topLeft.shiftFractionTowards(e.topRight,.2),e.cutTop2=e.topLeft.shiftFractionTowards(e.topRight,.4),e.cutTop3=e.topLeft.shiftFractionTowards(e.topRight,.6),e.cutTop4=e.topLeft.shiftFractionTowards(e.topRight,.8);let l=(new n).move(e.standTop).curve_(e.standTopCp,e.standTip);e.cutBottom1=l.shiftFractionAlong(.25),e.cutBottom2=l.shiftFractionAlong(.5),e.cutBottom3=l.shiftFractionAlong(.75);let c=l.split(e.cutBottom2),p=[];p.push(...c[0].split(e.cutBottom1)),p.push(...c[1].split(e.cutBottom3)),e.q1Cp1=p[0].ops[1].cp1,e.q1Cp2=p[0].ops[1].cp2,e.q2Cp1=p[1].ops[1].cp1,e.q2Cp2=p[1].ops[1].cp2,e.q3Cp1=p[2].ops[1].cp1,e.q3Cp2=p[2].ops[1].cp2,e.q4Cp1=p[3].ops[1].cp1,e.q4Cp2=p[3].ops[1].cp2;const d={1:{pivot:"cutBottom1",points:["cutBottom2","cutTop1","cutTop2","q2Cp1","q2Cp2"]},2:{pivot:"cutBottom2",points:["cutBottom3","cutTop2","cutTop3","q3Cp1","q3Cp2"]},3:{pivot:"cutBottom3",points:["standTip","bottomRight","cutTop4","cutTop3","q4Cp1"]},4:{pivot:"standTip",points:["topRight","bottomRight","cutTop4"]}};let h=-1*o.collarSpread,m=[];for(let u of[4,3,2,1]){let t=d[u],o=t.pivot,a=!1;for(let i of t.points){!1===a&&(a=i);let t=`rot${u}${i}`;e[t]=e[i].rotate(h,e[o]),m.push(t)}if(u<4)for(let i of m)e[i]=e[i].rotate(h,e[o])}h=e.cutBottom2.angle(e.rot1cutBottom2)+180;let f=-1*e.cutBottom2.dist(e.rot1cutBottom2);for(let u of["cutBottom2","rot2cutTop2","rot2cutTop3","rot2cutBottom3","rot2q3Cp1","rot2q3Cp2"])e[u]=e[u].shift(h,f);h=e.cutBottom3.angle(e.rot2cutBottom3)+180,f=-1*e.cutBottom3.dist(e.rot2cutBottom3);for(let u of["cutBottom3","rot3cutTop3","rot3cutTop4","rot3standTip","rot3q4Cp1"])e[u]=e[u].shift(h,f);h=e.standTip.angle(e.rot3standTip)+180,f=-1*e.standTip.dist(e.rot3standTip);for(let u of["standTip","rot4cutTop4","rot4topRight","rot4bottomRight"])e[u]=e[u].shift(h,f);return e.topLeftCp=e.topLeft.shift(0,.6*e.rot4topRight.x),i.saBase=(new n).move(e.standTop).curve_(e.standTopCp,e.rot3standTip).line(e.rot4bottomRight).line(e.rot4topRight)._curve(e.topLeftCp,e.topLeft),i.seam=i.saBase.clone().line(e.standTop).close().attr("class","fabric"),t&&(i.sa=i.saBase.offset(t).line(e.topLeft),i.sa.move(e.standTop).line(i.sa.start()).addClass("fabric sa")),r.cutlist.removeCut(),r.cutlist.addCut([{cut:2,from:"fabric"},{cut:1,from:"canvas"}]),a("rmgrainline"),a("cutonfold",{from:e.topLeft,to:e.standTop,grainline:!0}),e.title=e.standTopCp.clone(),a("title",{at:e.title,nr:8,title:"collar"}),a("hd",{id:"wCenterToTipInner",from:e.standTop,to:e.rot3standTip,y:e.rot4bottomRight.y+t+15}),a("hd",{id:"wCenterToTipOuter",from:e.standTop,to:e.rot4bottomRight,y:e.rot4bottomRight.y+t+30}),a("hd",{id:"wFull",from:e.standTop,to:e.rot4topRight,y:e.rot4bottomRight.y+t+45}),a("vd",{id:"hCenter",from:e.standTop,to:e.topLeft,x:e.topLeft.x-15}),a("vd",{id:"hFromTipInner",from:e.rot3standTip,to:e.topLeft,x:e.topLeft.x-30}),a("vd",{id:"hFromTipTop",from:e.rot4topRight,to:e.topLeft,x:e.rot4topRight.x+t+15}),a("vd",{id:"hFull",from:e.rot4bottomRight,to:e.topLeft,x:e.rot4topRight.x+t+30}),a("ld",{id:"lCollarHeight",from:e.rot4bottomRight,to:e.rot4topRight,d:-1*t-15}),a("ld",{id:"lCollarBottom",from:e.rot3standTip,to:e.rot4bottomRight,d:-1*t-15}),s}};const Ve={name:"carlton.cuffFacing",after:[Ye,$e],draft:function({sa:t,store:e,utils:o,points:a,macro:i,Point:n,paths:s,Path:r,part:l}){a.topLeft=new n(0,0),a.bottomRight=new n(e.get("topCuffWidth")+e.get("underCuffWidth"),1.5*e.get("cuffLength")),a.bottomLeft=new n(a.topLeft.x,a.bottomRight.y),a.topRight=new n(a.bottomRight.x,a.topLeft.y);
1const c={roundLeft:i("round",{id:"roundLeft",from:a.topLeft,to:a.bottomRight,via:a.bottomLeft,radius:e.get("cuffRadius")}),roundRight:i("round",{id:"roundRight",from:a.bottomLeft,to:a.topRight,via:a.bottomRight,radius:e.get("cuffRadius")})};for(const p in c)for(const t of["start","cp1","cp2","end"])a[`${p}${o.capitalize(t)}`]=a[c[p].points[t]].copy();return s.seam=(new r).move(a.topLeft).line(a.roundLeftStart).curve(a.roundLeftCp1,a.roundLeftCp2,a.roundLeftEnd).line(a.roundRightStart).curve(a.roundRightCp1,a.roundRightCp2,a.roundRightEnd).line(a.topRight).line(a.topLeft).close().attr("class","fabric"),t&&(s.sa=s.seam.offset(t).attr("class","fabric sa")),e.cutlist.addCut({cut:2,from:"fabric"}),e.cutlist.addCut({cut:2,from:"canvas"}),a.title=a.topLeft.shiftFractionTowards(a.bottomRight,.5),i("title",{at:a.title,nr:9,title:"cuffFacing"}),i("grainline",{from:a.bottomLeft.shift(0,10+e.get("cuffRadius")),to:a.topLeft.shift(0,10+e.get("cuffRadius"))}),i("vd",{id:"hRoundedCorner",from:a.roundRightStart,to:a.roundRightEnd,x:a.topRight.x+t+15}),i("vd",{id:"hFull",from:a.roundRightStart,to:a.topRight,x:a.topRight.x+t+30}),i("hd",{id:"wRoundedCorner",from:a.roundRightStart,to:a.roundRightEnd,y:a.bottomRight.y+t+15}),i("hd",{id:"wFull",from:a.roundLeftStart,to:a.roundRightEnd,y:a.bottomRight.y+t+30}),l}};const Xe={name:"carlton.pocket",after:Ie,draft:function({sa:t,store:e,complete:o,utils:a,points:i,options:n,macro:s,Point:r,paths:l,Path:c,part:p}){if(i.topLeft=new r(0,0),i.bottomRight=new r(e.get("pocketWidth"),e.get("pocketHeight")),i.bottomLeft=new r(i.topLeft.x,i.bottomRight.y),i.topRight=new r(i.bottomRight.x,i.topLeft.y),i.edgeLeft=i.bottomLeft.shiftFractionTowards(i.topLeft,1.25),i.edgeRight=new r(i.topRight.x,i.edgeLeft.y),n.pocketRadius>0){const t={roundLeft:s("round",{id:"roundLeft",from:i.topLeft,to:i.bottomRight,via:i.bottomLeft,radius:e.get("pocketRadius")}),roundRight:s("round",{id:"roundRight",from:i.bottomLeft,to:i.topRight,via:i.bottomRight,radius:e.get("pocketRadius")})};for(const e in t)for(const o of["start","cp1","cp2","end"])i[`${e}${a.capitalize(o)}`]=i[t[e].points[o]].copy();l.seam=(new c).move(i.edgeLeft).line(i.roundLeftStart).curve(i.roundLeftCp1,i.roundLeftCp2,i.roundLeftEnd).line(i.roundRightStart).curve(i.roundRightCp1,i.roundRightCp2,i.roundRightEnd)}else l.seam=(new c).move(i.edgeLeft).line(i.bottomLeft).line(i.bottomRight);return l.seam=l.seam.line(i.edgeRight).line(i.edgeLeft).close().attr("class","fabric"),t&&(l.sa=l.seam.offset(t).attr("class","fabric sa")),o&&(l.fold=(new c).move(i.topLeft).line(i.topRight).addClass("class","fabric help")),e.cutlist.addCut({cut:2,from:"fabric"}),i.title=i.topLeft.shiftFractionTowards(i.bottomRight,.5),s("title",{at:i.title,nr:10,title:"pocket"}),s("grainline",{from:i.bottomLeft.shift(0,10+(e.get("pocketRadius")||0)),to:i.edgeLeft.shift(0,10+(e.get("pocketRadius")||0))}),s("vd",{id:"hToFold",from:i.bottomRight,to:i.topRight,x:i.topRight.x+t+15}),s("vd",{id:"hFull",from:i.bottomRight,to:i.edgeRight,x:i.topRight.x+t+30}),s("hd",{id:"wFull",from:i.edgeLeft,to:i.edgeRight,y:i.edgeRight.y-t-15}),n.pocketRadius>0&&s("hd",{id:"wRoundedCorner",from:i.roundRightStart,to:i.roundRightEnd,y:i.bottomRight.y+t+15}),p}};const Qe={name:"carlton.pocketFlap",after:Ie,draft:function({sa:t,store:e,utils:o,points:a,options:i,macro:n,Point:s,paths:r,Path:l,part:c}){if(a.topLeft=new s(0,0),a.bottomRight=new s(e.get("pocketWidth"),e.get("pocketFlapHeight")),a.bottomLeft=new s(a.topLeft.x,a.bottomRight.y),a.topRight=new s(a.bottomRight.x,a.topLeft.y),i.pocketFlapRadius>0){const t={roundLeft:n("round",{id:"roundLeft",from:a.topLeft,to:a.bottomRight,via:a.bottomLeft,radius:e.get("pocketFlapRadius")}),roundRight:n("round",{id:"roundRight",from:a.bottomLeft,to:a.topRight,via:a.bottomRight,radius:e.get("pocketFlapRadius")})};for(const e in t)for(const i of["start","cp1","cp2","end"])a[`${e}${o.capitalize(i)}`]=a[t[e].points[i]].copy();r.seam=(new l).move(a.topLeft).line(a.roundLeftStart).curve(a.roundLeftCp1,a.roundLeftCp2,a.roundLeftEnd).line(a.roundRightStart).curve(a.roundRightCp1,a.roundRightCp2,a.roundRightEnd)}else r.seam=(new l).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight);return r.seam=r.seam.line(a.topRight).line(a.topLeft).close().attr("class","fabric"),t&&(r.sa=r.seam.offset(t).attr("class","fabric sa")),e.cutlist.addCut({cut:4,from:"fabric"}),e.cutlist.addCut({cut:2,from:"canvas"}),a.title=a.topLeft.shiftFractionTowards(a.bottomRight,.5),n("title",{at:a.title,nr:11,title:"pocketFlap",scale:.8}),n("grainline",{from:a.bottomLeft.shift(0,a.topRight.x/5),to:a.topLeft.shift(0,a.topRight.x/5)}),n("hd",{from:a.topLeft,to:a.topRight,y:a.topLeft.y-t-15}),i.pocketFlapRadius>0?(n("vd",{id:"hRoundedCorner",from:a.roundRightStart,to:a.roundRightEnd,x:a.topRight.x+t+15}),n("vd",{id:"hFull",from:a.roundRightStart,to:a.topRight,x:a.topRight.x+t+30})):n("vd",{id:"hFull",from:a.bottomRight,to:a.topRight,x:a.topRight.x+t+15}),c}};const qe={name:"carlton.pocketLining",from:Xe,draft:function({sa:t,utils:e,store:o,points:a,options:i,macro:n,Point:s,paths:r,Path:l,part:c}){if(delete r.fold,a.topLeft=a.bottomLeft.shiftFractionTowards(a.topLeft,.75),a.topRight=new s(a.bottomRight.x,a.topLeft.y),i.pocketRadius>
10){const t={roundLeft:n("round",{id:"roundLeft",from:a.topLeft,to:a.bottomRight,via:a.bottomLeft,radius:o.get("pocketRadius")}),roundRight:n("round",{id:"roundRight",from:a.bottomLeft,to:a.topRight,via:a.bottomRight,radius:o.get("pocketRadius")})};for(const o in t)for(const i of["start","cp1","cp2","end"])a[`${o}${e.capitalize(i)}`]=a[t[o].points[i]].copy();r.seam=(new l).move(a.topLeft).line(a.roundLeftStart).curve(a.roundLeftCp1,a.roundLeftCp2,a.roundLeftEnd).line(a.roundRightStart).curve(a.roundRightCp1,a.roundRightCp2,a.roundRightEnd)}else r.seam=(new l).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight);return r.seam=r.seam.line(a.topRight).line(a.topLeft).close().attr("class","lining"),t&&(r.sa=r.seam.offset(t).attr("class","lining sa")),o.cutlist.addCut({cut:2,from:"lining"}),a.title=a.topLeft.shiftFractionTowards(a.bottomRight,.5),n("title",{at:a.title,nr:16,title:"pocketLining"}),n("grainline",{from:a.bottomLeft.shift(0,10+(o.get("pocketRadius")||0)),to:a.topLeft.shift(0,10+(o.get("pocketRadius")||0))}),n("rmad"),n("vd",{id:"hFull",from:a.bottomRight,to:a.topRight,x:a.topRight.x+t+15}),n("hd",{id:"wFull",from:a.bottomLeft,to:a.bottomRight,y:a.bottomRight.y+t+15}),i.pocketRadius>0&&n("hd",{from:a.roundRightStart,to:a.roundRightEnd,y:a.roundRightEnd.y}),c}};const Ze={name:"carlton.chestPocketWelt",after:Ie,draft:function({sa:t,store:e,complete:o,points:a,macro:i,Point:n,paths:s,Path:r,expand:l,units:c,part:p}){if(!l){const o=t?2*t:0;return e.flag.note({msg:"carlton:cutChestPocketWelt",notes:[t?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:c(2*e.get("chestPocketWidth")+o),l:c(e.get("
1chestPocketHeight")+o)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),e.flag.preset("expandIsOff"),p.hide()}return e.flag.preset("expandIsOn"),a.topLeft=new n(0,0),a.bottomRight=new n(2*e.get("chestPocketWidth"),e.get("chestPocketHeight")),a.bottomLeft=new n(a.topLeft.x,a.bottomRight.y),a.topRight=new n(a.bottomRight.x,a.topLeft.y),a.topMid=new n(e.get("chestPocketWidth"),a.topRight.y),a.bottomMid=new n(a.topMid.x,a.bottomRight.y),s.seam=(new r).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).line(a.topLeft).close().attr("class","fabric"),t&&(s.sa=s.seam.offset(t).attr("class","fabric sa")),o&&(s.fold=(new r).move(a.topMid).line(a.bottomMid).addClass("fabric help")),e.cutlist.addCut({cut:2,from:"fabric"},{cut:2,from:"canvas"}),a.title=new n(a.bottomRight.x/4,a.bottomRight.y/2),i("title",{at:a.title,nr:12,title:"chestPocketWelt",scale:.8}),i("hd",{id:"wFull",from:a.bottomLeft,to:a.bottomRight,y:a.bottomLeft.y+t+15}),i("vd",{id:"hFull",from:a.bottomRight,to:a.topRight,x:a.topRight.x+t+15}),p}};const to={name:"carlton.chestPocketBag",after:Ie,draft:function({units:t,sa:e,store:o,points:a,macro:i,Point:n,paths:s,Path:r,expand:l,part:c}){if(!l){const a=e?2*e:0;return o.flag.note({msg:"carlton:cutChestPocketBag",notes:[e?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:t(o.get("chestPocketHeight")+a),l:t(2*o.get("chestPocketBagDepth")+a)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),o.flag.preset("expandIsOff"),c.hide()}return o.flag.preset("expandIsOn"),a.topLeft=new n(0,0),a.bottomRight=new n(o.get("chestPocketHeight"),2*o.get("chestPocketBagDepth")),a.bottomLeft=new n(a.topLeft.x,a.bottomRight.y),a.topRight=new n(a.bottomRight.x,a.topLeft.y),s.seam=(new r).move(a.topRight).line(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).close().addClass("lining"),e&&(s.sa=s.seam.offset(e).attr("class","lining sa")),o.cutlist.addCut({material:"lining"}),a.title=a.topLeft.shiftFractionTowards(a.bottomRight,.2),i("title",{at:a.title,nr:17,title:"chestPocketBag"}),i("grainline",{from:a.bottomLeft.shift(0,10),to:a.topLeft.shift(0,10)}),i("vd",{id:"hFull",from:a.bottomRight,to:a.topRight,x:a.topRight.x+e+15}),i("hd",{id:"wFull",from:a.bottomLeft,to:a.bottomRight,y:a.bottomLeft.y+e+15}),c}};const eo={name:"carlton.innerPocketWelt",after:Ie,draft:function({sa:t,store:e,complete:o,points:a,macro:i,expand:n,units:s,Point:r,paths:l,Path:c,part:p}){if(!n){const o=t?2*t:0;return e.flag.note({msg:"carlton:cutInnerPocketWelt",notes:[t?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:s(1.4*e.get("innerPocketWidth")+o),l:s(6*e.get("innerPocketWeltHeight")+o)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),e.flag.preset("expandIsOff"),p.hide()}return e.flag.preset("expandIsOn"),a.topLeft=new r(0,0),a.bottomRight=new r(1.4*e.get("innerPocketWidth"),6*e.get("innerPocketWeltHeight")),a.bottomLeft=new r(a.topLeft.x,a.bottomRight.y),a.topRight=new r(a.bottomRight.x,a.topLeft.y),a.leftMid=new r(0,a.bottomRight.y/2),a.rightMid=new r(a.bottomRight.x,a.bottomRight.y/2),a.realTopLeft=new r(.2*e.get("innerPocketWidth"),2*e.get("innerPocketWeltHeight")),a.realTopRight=new r(1.2*e.get("innerPocketWidth"),a.realTopLeft.y),a.realBottomLeft=new r(a.realTopLeft.x,4*e.get("innerPocketWeltHeight")),a.realBottomRight=new r(a.realTopRight.x,a.realBottomLeft.y),l.seam=(new c).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).line(a.topLeft).close().attr("class","fabric"),t&&(l.sa=l.seam.offset(t).attr("class","fabric sa")),o&&(l.fold=(new c).move(a.leftMid).line(a.rightMid).addClass("fabric help"),l.welt=(new c).move(a.realTopLeft).line(a.realBottomLeft).line(a.realBottomRight).line(a.realTopRight).line(a.realTopLeft).close().addClass("note dashed stroke-sm")),e.cutlist.addCut({cut:2,from:"fabric"}),e.cutlist.addCut({cut:2,from:"canvas"}),a.title=a.topLeft.shiftFractionTowards(a.bottomRight,.5),i("title",{at:a.title,nr:13,title:"innerPocketWelt"}),i("grainline",{from:a.bottomLeft.shift(0,10),to:a.topLeft.shift(0,10)}),i("vd",{id:"hWelt",from:a.realBottomRight,to:a.realTopRight,x:a.topRight.x+t+15}),i("vd",{id:"hFull",from:a.bottomRight,to:a.topRight,x:a.topRight.x+t+30}),i("hd",{id:"wWelt",from:a.realBottomLeft,to:a.realBottomRight,y:a.bottomLeft.y+t+15}),i("hd",{id:"wFull",from:a.bottomLeft,to:a.bottomRight,y:a.bottomLeft.y+t+30}),p}};
1const oo={name:"carlton.innerPocketBag",after:Ie,options:{innerPocketDepth:{pct:110,min:75,max:140,menu:"pockets"}},draft:function({units:t,sa:e,store:o,points:a,options:i,macro:n,Point:s,paths:r,Path:l,expand:c,part:p}){if(!c){const a=e?2*e:0;return o.flag.note({msg:"carlton:cutInnerPocketBag",notes:[e?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:t(o.get("innerPocketWidth")+a),l:t(o.get("innerPocketWidth")*i.innerPocketDepth*2+a)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),o.flag.preset("expandIsOff"),p.hide()}return o.flag.preset("expandIsOn"),a.topLeft=new s(0,0),a.bottomRight=new s(o.get("innerPocketWidth"),o.get("innerPocketWidth")*i.innerPocketDepth*2),a.bottomLeft=new s(a.topLeft.x,a.bottomRight.y),a.topRight=new s(a.bottomRight.x,a.topLeft.y),r.seam=(new l).move(a.topRight).line(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).close().addClass("lining"),e&&(r.sa=r.seam.offset(e).attr("class","lining sa")),o.cutlist.addCut({cut:2,from:"lining"}),a.title=a.topLeft.shiftFractionTowards(a.bottomRight,.2),n("rmtitle"),n("title",{at:a.title,nr:14,title:"innerPocketBag"}),n("grainline",{from:a.bottomLeft.shift(0,10),to:a.topLeft.shift(0,10)}),n("vd",{from:a.bottomRight,to:a.topRight,x:a.topRight.x+e+15}),n("hd",{from:a.bottomLeft,to:a.bottomRight,y:a.bottomLeft.y+e+15}),p}};const ao={name:"carlton.innerPocketTab",after:Ie,draft:function({sa:t,store:e,complete:o,points:a,macro:i,Point:n,paths:s,Path:r,part:l}){return a.topLeft=new n(0,0),a.topRight=new n(1.2*e.get("innerPocketWidth"),0),a.bottom=new n(.6*e.get("innerPocketWidth"),.6*e.get("innerPocketWidth")),a.top=new n(.6*e.get("innerPocketWidth"),0),s.seam=(new r).move(a.topLeft).line(a.bottom).line(a.topRight).line(a.topLeft).close().attr("class","lining"),t&&(s.sa=s.seam.offset(t).attr("class","lining sa")),o&&(s.hint=(new r).move(a.top).line(a.bottom).attr("class","lining help")),e.cutlist.addCut({cut:1,material:"lining"}),a.title=a.top.shiftFractionTowards(a.bottom,.5),i("title",{at:a.title,nr:15,title:"innerPocketTab",scale:.7}),i("grainline",{from:a.top,to:a.top.shift(-45,.7*a.top.x)}),i("hd",{from:a.topLeft,to:a.top,y:a.topLeft.y-t-15}),i("hd",{from:a.topLeft,to:a.topRight,y:a.topLeft.y-t-30}),i("vd",{from:a.bottom,to:a.topRight,x:a.topRight.x+t+15}),l}},io=new n.pT({data:Oe,parts:[Ie,Me,_e,je,Ge,Ue,Ye,$e,ze,Je,Ke,Ve,Xe,Qe,qe,Ze,to,eo,oo,ao]}),no=(0,n.D4)([m,_,De],{o:{keep:[...Object.keys(N.options),...Object.keys(io.patternConfig.options),...Object.keys(B.options)]}});const so={name:"carlita.front",from:Ie,hide:n.V9.HIDE_TREE,measurements:["highBust","bustSpan","hpsToBust"],plugins:[O],options:{draftForHighBust:!0,contour:{pct:50,min:25,max:75,menu:"advanced"},chestPocketAngle:0},draft:function({sa:t,snippets:e,Snippet:o,utils:a,store:i,complete:n,points:s,measurements:r,options:l,macro:c,Point:p,paths:d,Path:h,part:m}){s.bustPoint=new p(r.bustSpan/2+r.bustSpan/r.bust*l.chestEase/4,s.neck.y+r.hpsToBust),s.psHem=new p(s.bustPoint.x,s.hem.y),s.bustPointCp1=s.bustPoint.shift(90,s.armholePitch.dy(s.bustPoint)/2);let f=["bustPoint","bustPointCp1","psHem","hem","seat","seatCp2","waistCp1","waist","waistCp2","armhole","armholeCp2","armholeHollowCp1","armholeHollow","armholeHollowCp2","armholePitchCp1","armholePitch"];i.set("side",f);let u=r.bust-r.highBust,g=0,b=10,w=1;for(;Math.abs(b)>.5&&w<50;){for(let t of f)s[t+"Rot1"]=s[t].rotate(b/5,s.armholePitch);g=s.bustPoint.dx(s.bustPointRot1),b=u-g,w++}let k=-1*(s.bustPointRot1.angle(s.psHemRot1)-270);for(let T of f)s[T+"Rot2"]=s[T+"Rot1"].rotate(k,s.bustPointRot1);s.bustPointRot2=s.bustPoint.rotate(k,s.bustPointRot1),s.bustPointCp1Rot2=s.bustPointCp1.rotate(k,s.bustPointRot1),s.bustPointCp2=s.bustPointCp1Rot2.rotate(180,s.bustPointRot2).shiftFractionTowards(s.bustPointRot2,.5),s.psWaist=new p(s.psHemRot2.x,s.waistRot2.y),s.psWaistCp1=s.psWaist.shift(90,s.bustPointRot2.dy(s.psWaist)*l.contour);let C=(new h).move(s.armholePitch)._curve(s.bustPointCp1,s.bustPoint).line(new p(s.psHem.x,s.waist.y)).length(),v=(new h).move(s.armholePitchRot2)._curve(s.bustPointCp1Rot2,s.bustPointRot2).curve(s.bustPointCp2,s.psWaistCp1,s.psWaist).length()-C,y=["button1Left","button2Left","button3Left","button1Right","button2Right","button3Right","rollLineStart","hemEdge","flbHem","psHem","pocketTopLeft","pocketTopRight","pocketBottomLeft","pocketBottomRight","pocketRoundLeftStart","pocketRoundLeftCp1","pocketRoundLeftCp2","pocketRoundLeftEnd","pocketRoundRightStart","pocketRoundRightCp1","pocketRoundRightCp2","pocketRoundRightEnd","pocketFlapTopLeft","pocketFlapTopRight","pocketFlapBottomLeft","pocketFlapBottomRight","pocketFlapRoundLeftStart","pocketFlapRoundLeftCp1","pocketFlapRoundLeftCp2","pocketFlapRoundLeftEnd","pocketFlapRoundRightStart","pocketFlapRoundRightCp1","pocketFlapRoundRightCp2","pocketFlapRoundRightEnd","innerPocketTopLeft","innerPocketTopRight","innerPocketBottomLeft","innerPocketBottomRight","chestPocketTopLeft","chestPocketTopRight","chestPocketBottomLeft","chestPocketBottomRight"];for(let T of y)void 0!==s[T]&&(s[T]=s[T].shift(-90,v));s.chestPocketBottomLeft=new p(s.bustPoint.x,s.button2Right.y-s.button3Right.dy(s.button2Right)/10),s.chestPocketTopLeft=s.chestPocketBottomLeft.shift(90,i.get("chestPocketHeight")),s.chestPocketTopRight=s.chestPocketTopLeft.shift(0,i.get("chestPocketWidth")),s.chestPocketBottomRight=s.chestPocketBottomLeft.shift(0,i.get("chestPocketWidth"));for(let T in d)-1===["frontArmhole","frontCollar"].indexOf(T)&&delete d[T];for(let T in e)delete e[T];
1if(d.saBase=(new h).move(s.psHem).line(s.bustPoint).curve_(s.bustPointCp1,s.armholePitch).join(d.frontArmhole).line(s.s3CollarSplit).join(d.frontCollar).line(s.collarTip)._curve(s.lapelStraightEndCp1,s.lapelStraightEnd).line(s.hemEdge).line(s.flbHem),d.seam=d.saBase.clone().line(s.psHem).close().attr("class","fabric"),t){const e=(new h).move(s.flbHem).line(s.psHem);d.sa=d.saBase.offset(t).join(e.offset(3*t)).line(s.psHem.shift(-90,3*t).shift(0,t)).close().attr("class","fabric sa")}return n&&(d.rollLine=(new h).move(s.rollLineStart).line(s.rollLineEnd).addClass("fabric help"),d.flb=(new h).move(s.flbHem).line(s.flbTop).addClass("note help"),c("banner",{id:"flbFacing",path:d.flb,text:"carlton:flbFacingSide",classes:"text-sm fill-fabric center",repeat:66}),c("banner",{id:"flbLining",path:d.flb,text:"carlton:flbLiningSide",dy:7,classes:"text-sm fill-lining center",repeat:66}),d.pocket=(new h).move(a.beamsIntersect(s.pocketTopLeft,s.pocketTopRight,s.bustPoint,s.psHem)).line(s.pocketTopLeft).attr("class","fabric help"),l.pocketRadius>0?d.pocket=d.pocket.line(s.pocketRoundLeftStart).curve(s.pocketRoundLeftCp1,s.pocketRoundLeftCp2,s.pocketRoundLeftEnd):d.pocket=d.pocket.line(s.pocketBottomLeft).line(a.beamsIntersect(s.pocketBottomLeft,s.pocketBottomRight,s.bustPoint,s.psHem)),d.pocketFlap=(new h).move(a.beamsIntersect(s.pocketFlapTopLeft,s.pocketFlapTopRight,s.bustPoint,s.psHem)).line(s.pocketFlapTopLeft).attr("class","fabric help"),l.pocketFlapRadius>0?d.pocketFlap=d.pocketFlap.line(s.pocketFlapRoundLeftStart).curve(s.pocketFlapRoundLeftCp1,s.pocketFlapRoundLeftCp2,s.pocketFlapRoundLeftEnd):d.pocketFlap=d.pocketFlap.line(s.pocketFlapBottomLeft).line(a.beamsIntersect(s.pocketFlapBottomLeft,s.pocketFlapBottomRight,s.bustPoint,s.psHem)),d.chestPocket=(new h).move(s.chestPocketTopLeft).line(s.chestPocketBottomLeft).line(s.chestPocketBottomRight).line(s.chestPocketTopRight).line(s.chestPocketTopLeft).close().attr("class","fabric help"),d.innerPocket=(new h).move(s.innerPocketTopLeft).line(s.innerPocketBottomLeft).line(s.innerPocketBottomRight).line(s.innerPocketTopRight).line(s.innerPocketTopLeft).close().attr("class","fabric help")),s.frontChest=new p(s.hemEdge.x,s.cbChest.y),s.sideSeamChest=new p(s.psHem.x,s.cbChest.y),s.frontWaist=new p(s.hemEdge.x,s.cfWaist.y),s.sideSeamWaist=new p(s.psHem.x,s.cfWaist.y),s.sideSeamHips=new p(s.psHem.x,s.cfHips.y),s.frontHips=new p(s.hemEdge.x,s.cfHips.y),s.frontSeat=new p(s.hemEdge.x,s.cfSeat.y),s.sideSeamSeat=new p(s.sideSeamWaist.x,s.cfSeat.y),n&&(d.chest=(new h).move(s.frontChest).line(s.sideSeamChest).addClass("contrast help"),c("banner",{id:"chestLine",classes:"center contrast help",path:d.chest,text:"carlita:chestLine"}),d.waist=(new h).move(s.frontWaist).line(s.sideSeamWaist).addClass("contrast help"),c("banner",{id:"waistLine",classes:"center contrast help",path:d.waist,text:"carlita:waistLine"}),d.hips=(new h).move(s.frontHips).line(s.sideSeamHips).addClass("contrast help"),c("banner",{id:"hipLine",classes:"center contrast help",path:d.hips,text:"carlita:hipLine"}),d.seat=(new h).move(s.frontSeat).line(s.sideSeamSeat).addClass("contrast help"),c("banner",{id:"seatLine",classes:"center contrast help",path:d.seat,text:"carlita:seatLine"})),i.cutlist.setCut([{cut:2,from:"fabric"},{cut:2,from:"lining"}]),e.button1Left=new o("button",s.button1Left).attr("data-scale",2),e.button1Right=new o("button",s.button1Right).attr("data-scale",2),e.button2Left=new o("button",s.button2Left).attr("data-scale",2),e.button2Right=new o("button",s.button2Right).attr("data-scale",2),e.button3Left=new o("button",s.button3Left).attr("data-scale",2),e.button3Right=new o("button",s.button3Right).attr("data-scale",2),c("sprinkle",{snippet:"notch",on:["cfNeck","rollLineStart","bustPoint","chestPocketTopLeft","chestPocketBottomLeft","sideSeamWaist","sideSeamHips"]}),s.logo=s.cfSeat.shiftFractionTowards(s.cfHem,.5),e.logo=new o("logo",s.logo),c("title",{at:s.title,nr:"1a",title:"front"}),c("grainline",{from:s.cfHem,to:s.cfNeck}),c("ld",{id:"wHemClosureToFlb",from:s.hemEdge,to:s.flbHem,d:15}),c("hd",{id:"wHem",from:s.hemEdge,to:s.psHem,y:s.psHem.y+15+3*t}),c("hd",{id:"wClosureToPocketLeft",from:s.rollLineStart,to:s.pocketTopLeft,y:s.pocketFlapBottomLeft.y}),c("vd",{id:"hTopButtonToPocketFlapTop",from:s.pocketFlapTopLeft,to:s.button3Right,x:s.bustPoint.x+t+15}),c("vd",{id:"hTopButtonToPocketTop",from:s.pocketTopLeft,to:s.button3Right,x:s.bustPoint.x+t+30}),c("vd",{id:"hTopButtonToChestPocketBottom",from:s.chestPocketBottomLeft,to:s.button3Right,x:s.bustPoint.x-1
15}),c("hd",{id:"wClosureToChestPocket",from:s.rollLineStart,to:s.chestPocketBottomLeft,y:s.chestPocketBottomLeft.y+15}),c("hd",{id:"wClosureToFirstButton",from:s.rollLineStart,to:s.button3Left,y:s.button3Left.y+15}),c("hd",{id:"wBetweenButtons",from:s.button3Left,to:s.button3Right,y:s.button3Left.y+15}),c("vd",{id:"hHemToStartBustCurve",from:s.psHem,to:s.bustPoint,x:s.bustPoint.x+t+45}),c("vd",{id:"hHemTOPrinceSeamEnd",from:s.psHem,to:s.armholePitch,x:s.armholePitch.x+t+15}),c("vd",{id:"hPrincessSeamEndToShoulder",from:s.armholePitch,to:s.s3ArmholeSplit,x:s.s3ArmholeSplit.x+t+15}),c("vd",{id:"hPrincessSeamEndToHps",from:s.armholePitch,to:s.s3CollarSplit,x:s.s3ArmholeSplit.x+t+30}),c("vd",{id:"hTopButtonToTopClosure",from:s.rollLineStart,to:s.collarTip,x:s.rollLineStart.x-t-15}),c("vd",{id:"HTopButtonToMiddleButton",from:s.button2Left,to:s.rollLineStart,x:s.rollLineStart.x-t-15}),c("vd",{id:"hBottomButtonToMiddleButton",from:s.button1Left,to:s.button2Left,x:s.rollLineStart.x-t-15}),c("vd",{id:"hHemToTopClosure",from:s.hemEdge,to:s.collarTip,x:s.rollLineStart.x-t-30}),c("hd",{id:"wClosureBend",from:s.lapelStraightEnd,to:s.collarTip,y:s.collarTip.y-t-15}),c("hd",{id:"wClosureToCf",from:s.lapelStraightEnd,to:s.cfNeck,y:s.collarTip.y-t-30}),c("hd",{id:"wClosureToTopRollLine",from:s.lapelStraightEnd,to:s.rollLineEnd,y:s.collarTip.y-t-45}),c("hd",{id:"wClosureToHps",from:s.lapelStraightEnd,to:s.s3CollarSplit,y:s.s3CollarSplit.y-t-15}),c("hd",{id:"wClosureToTopPrincessSeam",from:s.lapelStraightEnd,to:s.armholePitch,y:s.armholePitch.y-15}),c("hd",{id:"wFull",from:s.lapelStraightEnd,to:s.s3ArmholeSplit,y:s.s3CollarSplit.y-t-30}),m}};const ro={name:"carlita.side",from:so,draft:function({sa:t,snippets:e,Snippet:o,store:a,points:i,macro:n,Point:s,paths:r,Path:l,part:c}){for(let p of a.get("side"))i[p]=i[p+"Rot2"].clone();for(let p in r)-1===["frontArmhole","frontCollar"].indexOf(p)&&delete r[p];for(let p in e)delete e[p];return i.anchor=i.armholePitchRot2.clone(),r.saBase=(new l).move(i.hem).line(i.seat).curve(i.seatCp2,i.waistCp1,i.waist).curve_(i.waistCp2,i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.armholePitchCp1,i.armholePitch)._curve(i.bustPointCp1,i.bustPoint).curve(i.bustPointCp2,i.psWaistCp1,i.psWaist).line(i.psHem),r.seam=r.saBase.clone().line(i.hem).close().attr("class","fabric"),t&&(r.sa=r.saBase.offset(t).line(i.psHem.shift(-90,3*t).shift(180,t)).line(i.hem.shift(-90,3*t).shift(0,t)).close().addClass("fabric sa")),i.title=i.bustPoint.shiftFractionTowards(i.waist,.5),n("title",{at:i.title,nr:"1b",title:"side"}),i.logo=i.psHem.shiftFractionTowards(i.seat,.5),e.logo=new o("logo",i.logo),i.grainlineFrom=i.psHem.shiftFractionTowards(i.hem,.5),i.grainlineTo=new s(i.grainlineFrom.x,i.armholePitchCp1.y),n("grainline",{from:i.grainlineFrom,to:i.grainlineTo}),i.sideSeamWaist=new s(i.psHemRot2.x,i.cfWaist.y),i.sideSeamHips=new s(i.psHemRot2.x,i.cfHips.y),e.bust=new o("notch",i.bustPoint),e.sideSeamWaist=new o("notch",i.sideSeamWaist),e.sideSeamHips=new o("notch",i.sideSeamHips),n("vd",{id:"hHemToWaist",from:i.psHem,to:i.psWaist,x:i.psWaist.x-t-15}),n("vd",{id:"hHemToBustPoint",from:i.psHem,to:i.bustPoint,x:i.bustPoint.x-t-15}),n("vd",{id:"hHemToSeat",from:i.hem,to:i.seat,x:i.hem.x+t+15}),n("vd",{id:"hHemToPrincessSeamEnd",from:i.hem,to:i.armhole,x:i.hem.x+t+30}),n("vd",{id:"hFull",from:i.hem,to:i.armholePitch,x:i.hem.x+t+45}),n("hd",{id:"wAtWaist",from:i.psWaist,to:i.waist}),n("hd",{id:"wBustToWaist",from:i.bustPoint,to:i.waist,y:i.bustPoint.y}),n("hd",{id:"wBustToPrincessSeamTip",from:i.bustPoint,to:i.armholePitch,y:i.armholePitch.y-t-15}),n("hd",{id:"wFull",from:i.bustPoint,to:i.armhole,y:i.armholePitch.y-t-30}),n("hd",{id:"wHem",from:i.psHem,to:i.hem,y:i.hem.y+3*t+15}),c}};const lo={name:"carlita.back",from:je,hide:n.V9.HIDE_TREE,draft:function({complete:t,macro:e,part:o,paths:a}){return t&&e("banner",{id:"chestLine",classes:"center contrast help",path:a.chest,text:"carlita:chestLine"}),o}},co={name:"carlita.frontFacing",from:Me,draft:({points:t,macro:e,expand:o,store:a,part:i})=>o?(a.flag.preset("expandIsOn"),e("title",{at:t.title,nr:"1c",title:"frontFacing",align:"center"}),i):(a.flag.note({msg:"carlton:cutFrontFacing",suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),a.flag.preset("expandIsOff"),i.hide()),hide:{from:!0,inherited:!0}};const po={name:"carlita.frontLining",from:so,draft:function({sa:t,snippets:e,Snippet:o,store:a,points:i,macro:n,expand:s,paths:r,Path:l,part:c}){if(!s)return a.flag.note({msg:"carlton:cutFrontLining",suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),a.flag.preset("expandIsOff"),c.hide();a.flag.preset("expandIsOn");
1const p=r.frontCollar.split(i.flbTop),d=r.frontArmhole;n("rmad");for(const h in r)["frontCollar"].includes(h)||delete r[h];for(const h in e)delete e[h];return r.seam=(new l).move(i.psHem).line(i.bustPoint).curve_(i.bustPointCp1,i.armholePitch).join(d).line(i.s3CollarSplit).join(p[0]).line(i.flbHem).line(i.psHem).close().addClass("lining"),t&&(r.sa=r.seam.offset(t).addClass("sa lining")),a.cutlist.setCut({cut:2,from:"lining"}),i.title=i.s3CollarSplit.shiftFractionTowards(i.bustPointRot2,.5),n("rmtitle"),n("title",{at:i.title,nr:"1d",title:"frontLining"}),i.logo=i.s3CollarSplit.shiftFractionTowards(i.armholePitchRot1,.5),e.logo=new o("logo",i.logo),i.grainlineFrom=i.flbHem.shift(0,10),i.grainlineTo=i.flbTop.shift(0,10),n("grainline",{from:i.grainlineFrom,to:i.grainlineTo}),e.bust=new o("notch",i.bustPoint),n("hd",{id:"wHem",from:i.flbHem,to:i.psHem,y:i.psHem.y+t+15}),n("hd",{id:"wFull",from:i.flbTop,to:i.s3ArmholeSplit,y:i.s3CollarSplit.y-t-15}),c}},ho={en:JSON.parse('{"t":"Carlita coat","d":"The version for breasts of our Carlton coat, aka Sherlock Holmes coat.","p":{"front":"Front","side":"Side"},"s":{},"o":{"contour":{"t":"Contour","d":"Controls how sharply the princess seam is contoured."}}}')},mo=new n.pT({data:Ae,parts:[so,co,po,ro,lo,Ge,Ue,ze,Ye,$e,Je,Ke,Ve,Xe,Qe,qe,Ze,to,eo,oo,ao]}),fo=(0,n.D4)([no,ho]),uo=JSON.parse('{"id":"cathrin","name":"Cathrin corset","code":"Joost De Cock","description":"A FreeSewing pattern for a underbust corset / waist trainer","design":["Cathrin \xc5hl\xe9n","Joost De Cock"],"difficulty":4,"tags":["tops","underwear"],"techniques":["boning","precision","curved-seam","interfacing"],"version":"4.6.0","pkg":"@freesewing/cathrin","collection":true}');const go={name:"cathrin.base",hide:{self:!0},measurements:["underbust","waist","hips","waistToUnderbust","waistToHips"],options:{waistReduction:{pct:10,min:2,max:20,menu:"fit"},panels:{list:["11","13"],dflt:"13",menu:"fit"},backOpening:{pct:4,min:3,max:10,menu:"style"},backRise:{pct:15,min:1,max:25,menu:"style"},backDrop:{pct:2,min:-10,max:5,menu:"style"},frontRise:{pct:4,min:-10,max:8,menu:"style"},frontDrop:{pct:5,min:0,max:10,menu:"style"},hipRise:{pct:5,min:0,max:15,menu:"style"}},draft:function({measurements:t,options:e,store:o,points:a,paths:i,Point:n,Path:s,part:r}){"11"===e.panels?o.set("gaps",[.15,.275,.4,.6,.75]):o.set("gaps",[.2,.35,.5,.65,.8]),o.set("waistReduction",t.waist*e.waistReduction),o.set("backOpening",t.underbust*e.backOpening);let l=t.waistToUnderbust+t.waistToHips;for(let p of["backRise","backDrop","frontRise","frontDrop","hipRise"])o.set(p,l*e[p]);o.set("length",l),o.set("width",.5*(t.hips-o.get("backOpening"))),o.set("waistIntake",.5*(t.hips-t.waist+o.get("waistReduction"))),o.set("bustIntake",.5*(t.hips-t.underbust));let c=o.get("width");return a.underbustCF=new n(0,0),a.hipsCF=new n(0,l),a.hipsCB=new n(c,l),a.underbustCB=new n(c,0),a.topSide=a.underbustCF.shiftFractionTowards(a.underbustCB,.5),a.bottomSide=a.hipsCF.shiftFractionTowards(a.hipsCB,.5),a.waistCF=a.underbustCF.shift(-90,t.waistToUnderbust),a.waistCB=new n(a.hipsCB.x,a.waistCF.y),a.topCF=a.underbustCF.shift(90,o.get("frontRise")),a.frontRiseStart=a.underbustCF.shift(0,.15*c),a.frontRiseStartCp2=a.underbustCF.shift(0,.11*c),a.topCFCp1=a.topCF.shift(0,.11*c),a.bottomCF=a.hipsCF.shift(-90,o.get("frontDrop")),a.bottomCFCp2=a.bottomCF.shift(0,.11*c),a.hipRise=a.bottomSide.shift(90,o.get("hi
1pRise")),a.hipRiseCp1=a.hipRise.shift(180,.3*c),a.hipRiseCp2=a.hipRise.shift(0,.2*c),a.backDrop=a.hipsCB.shift(-90,o.get("backDrop")),a.backDropCp1=a.backDrop.shift(180,.3*c),a.backRise=a.underbustCB.shift(90,o.get("backRise")),a.backRiseCp1=a.backRise.shift(180,.4*c),a.topSideCp1=a.topSide.shift(0,.2*c),i.help1=(new s).move(a.underbustCF).line(a.hipsCF).line(a.hipsCB).line(a.underbustCB).close(),i.help2=(new s).move(a.topSide).line(a.bottomSide).line(a.waistCF).line(a.waistCB),i.help1.hide(),i.help2.hide(),i.outline=(new s).move(a.bottomCF).curve(a.bottomCFCp2,a.hipRiseCp1,a.hipRise).curve(a.hipRiseCp2,a.backDropCp1,a.backDrop).line(a.backRise).curve(a.backRiseCp1,a.topSideCp1,a.topSide).line(a.frontRiseStart).curve(a.frontRiseStartCp2,a.topCFCp1,a.topCF).line(a.bottomCF).close(),r}};const bo={name:"cathrin.panels",from:go,hide:{self:!0},draft:function({measurements:t,options:e,store:o,points:a,paths:i,Point:n,Path:s,part:r}){let l=1,c=(new s).move(a.bottomCF).curve(a.bottomCFCp2,a.hipRiseCp1,a.hipRise).curve(a.hipRiseCp2,a.backDropCp1,a.backDrop).attr("class","lashed various stroke-xl");for(let m of o.get("gaps"))a[`underbustGap${l}`]=new n(o.get("width")*m,0),a[`underbustGap${l}Right`]=a[`underbustGap${l}`].shift(0,.1*o.get("bustIntake")),a[`underbustGap${l}Left`]=a[`underbustGap${l}`].shift(180,.1*o.get("bustIntake")),a[`underbustGap${l}RightCp`]=a[`underbustGap${l}Right`].shift(-90,.15*t.waistToUnderbust),a[`underbustGap${l}LeftCp`]=a[`underbustGap${l}Left`].shift(-90,.15*t.waistToUnderbust),a[`waistGap${l}`]=new n(o.get("width")*m,a.waistCF.y),a[`waistGap${l}Right`]=a[`waistGap${l}`].shift(0,.1*o.get("waistIntake")),a[`waistGap${l}Left`]=a[`waistGap${l}`].shift(180,.1*o.get("waistIntake")),a[`waistGap${l}RightCp1`]=a[`waistGap${l}Right`].shift(90,.2*t.waistToUnderbust),a[`waistGap${l}LeftCp2`]=a[`waistGap${l}Left`].shift(90,.2*t.waistToUnderbust),a[`waistGap${l}RightCp2`]=a[`waistGap${l}Right`].shift(-90,.2*t.waistToHips),a[`waistGap${l}LeftCp1`]=a[`waistGap${l}Left`].shift(-90,.2*t.waistToHips),a[`hipsGap${l}`]=new n(o.get("width")*m,a.hipsCF.y),a[`hipsGap${l}`]=c.intersectsX(a[`waistGap${l}`].x).pop(),a[`hipsGap${l}Cp`]=a[`hipsGap${l}`].shiftFractionTowards(a[`waistGap${l}`],.2),l++;i.panel1=c.split(a.hipsGap1)[0].curve(a.hipsGap1Cp,a.waistGap1LeftCp1,a.waistGap1Left).curve(a.waistGap1LeftCp2,a.underbustGap1LeftCp,a.underbustGap1Left).curve(a.frontRiseStartCp2,a.topCFCp1,a.topCF).line(a.bottomCF).close().attr("class","fabric"),i.panel2=c.split(a.hipsGap2)[0].split(a.hipsGap1)[1].curve(a.hipsGap2Cp,a.waistGap2LeftCp1,a.waistGap2Left).curve(a.waistGap2LeftCp2,a.underbustGap2LeftCp,a.underbustGap2Left).line(a.underbustGap1Right).curve(a.underbustGap1RightCp,a.waistGap1RightCp1,a.waistGap1Right).curve(a.waistGap1RightCp2,a.hipsGap1Cp,a.hipsGap1).close().attr("class","fabric");let p=(new s).move(a.bottomCF).curve(a.bottomCFCp2,a.hipRiseCp1,a.hipRise).split(a.hipsGap2)[1];"11"===e.panels&&(p=p.split(a.hipsGap3)[0]),i.panel3=p.curve(a.hipsGap3Cp,a.waistGap3LeftCp1,a.waistGap3Left).curve(a.waistGap3LeftCp2,a.underbustGap3LeftCp,a.underbustGap3Left).line(a.underbustGap2Right).curve(a.underbustGap2RightCp,a.waistGap2RightCp1,a.waistGap2Right).curve(a.waistGap2RightCp2,a.hipsGap2Cp,a.hipsGap2).close().attr("class","fabric");let d=(new s).move(a.backRise).curve(a.backRiseCp1,a.topSideCp1,a.topSide);a.underbustGap4Left=d.intersectsX(a.underbustGap4Left.x).pop(),i.panel4=(new s).move(a.hipRise).curve(a.hipRiseCp2,a.backDropCp1,a.backDrop).split(a.hipsGap4)[0].curve(a.hipsGap4Cp,a.waistGap4LeftCp1,a.waistGap4Left).curve(a.waistGap4LeftCp2,a.underbustGap4LeftCp,a.underbustGap4Left).join(d.split(a.underbustGap4Left)[1]),"11"===e.panels&&i.panel4.line(a.underbustGap3Right),i.panel4.curve(a.underbustGap3RightCp,a.waistGap3RightCp1,a.waistGap3Right).curve(a.waistGap3RightCp2,a.hipsGap3Cp,a.hipsGap3),"11"===e.panels&&i.panel4.line(a.hipRise),i.panel4.close().attr("class","fabric"),a.underbustGap4Right=d.intersectsX(a.underbustGap4Right.x).pop(),a.underbustGap5Left=d.intersectsX(a.underbustGap5Left.x).pop();let h=d.split(a.underbustGap5Left)[1].split(a.underbustGap4Right)[0];return i.panel5=c.split(a.hipsGap5)[0].split(a.hipsGap4)[1].curve(a.hipsGap5Cp,a.waistGap5LeftCp1,a.waistGap5Left).curve(a.waistGap5LeftCp2,a.underbustGap5LeftCp,a.underbustGap5Left).curve(h.ops[1].cp1,h.ops[1].cp2,h.ops[1].to).curve(a.underbustGap4RightCp,a.waistGap4RightCp1,a.waistGap4Right).curve(a.waistGap4RightCp2,a.hipsGap4Cp,a.hipsGap4).close().attr("class","fabric"),a.underbustGap5Right=d.intersectsX(a.underbustGap5Right.x).pop(),i.panel6=c.split(a.hipsGap5)[1].line(a.backRise).join(d.split(a.underbustGap5Right)[0]).curve(a.underbustGap5RightCp,a.waistGap5RightCp1,a.waistGap5Right).curve(a.waistGap5RightCp2,a.hipsGap5Cp,a.hipsGap5).close().attr("class","fabric"),i.outline.hide(),r}};const wo={name:"cathrin.panel1",from:bo,draft:function(t){const{macro:e,sa:o,store:a,paths:i,points:n,options:s,Point:r,Path:l,complete:c,part:p}=t;return n.anchor=n.topCF.clone(),delete i.outline,delete i.panel2,delete i.panel3,delete i.panel4,delete i.panel5,delete i.panel6,"13"===s.panels?function({macro:t,utils:e,sa:o,points:a,paths:i,Point:n,Path:s,store:r,complete:l,part:c}){a.anchor=a.topCF.clone();let p=(new s).move(a.underbustGap1Left).curve(a.frontRiseStartCp2,a.topCFCp1,a.topCF);a.topABsplit=p.shiftFractionAlong(.3);let d=(new s).move(a.bottomCF).curve(i.panel1.ops[1].cp1,i.panel1.ops[1].cp2,i.panel1.ops[1].to);a.bottomABsplit=d.shiftFractionAlong(.3),i.panel1a_nonfold=(new s).move(a.bottomCF).join(d.split(a.bottomABsplit)[0]).line(a.topABsplit).join(p.split(a.topABsplit)[1]).hide(),i.panel1a=i.panel1a_nonfold.clone().close().attr("class","fabric").unhide(),i.panel1b=d.split(a.bottomABsplit)[1].curve(a.hipsGap1Cp,a.waistGap1LeftCp1,a.waistGap1Left).curve(a.waistGap1LeftCp2,a.underbustGap1LeftCp,a.underbustGap1Left).join(p.split(a.topABsplit)[0]).line(a.bottomABsplit).close().attr("class","fabric");let h=5;return o&&(h=2*o+5),i.panel1b=i.panel1b.translate(h,0),delete i.panel1,o&&(i.saA=i.panel1a_nonfold.offset(o).attr("class","fabric sa"),i.saA.line(a.topCF).move(a.bottomCF).line(i.saA.start()),i.saB=i.panel1b.offset(o).attr("class","fabric sa")),r.cutlist.setCut([{cut:1,from:"interfacing"},{cut:1,from:"fabric"}]),t("cutonfold",{to:a.bottomCF,from:a.topCF,grainline:!0}),t("grainline",{to:a.topABsplit.translate(h,0),from:new n(a.topABsplit.translate(h,0).x,a.hipsGap1.translate(h,0).y)}),a.midwayAB=a.topABsplit.shiftFractionTowards(a.bottomABsplit,.5),a.titleA=a.underbustCF.shiftFractionTowards(a.midwayAB,.5),t("title",{id:"1a",nr:"1a",title:"panel1a",at:a.titleA,align:"center",scale:.7}),r.cutlist.setCut([{cut:2,from:"interfacing"},{cut:2,from:"fabric"}]),a.titleB=a.hipsGap1.translate(h,0).shiftFractionTowards(a.midwayAB,.5),t("title",{id:"1b",nr:"1b",title:"panel1b",at:a.titleB,align:"center",scale:.7}
1),t("vd",{id:"hCfBottomToWaist1a",from:a.bottomCF,to:a.waistCF,x:a.topCF.x-o-30}),t("vd",{id:"hCfWaistToTop1a",from:a.waistCF,to:a.topCF,x:a.topCF.x-o-30}),a.waistAB=e.beamsIntersect(a.topABsplit,a.bottomABsplit,a.waistCF,a.waistGap1),t("vd",{id:"hSideBottomToWaist1a",from:a.bottomABsplit,to:a.waistAB,x:a.topCF.x-o-15}),t("vd",{id:"hSideWaistToTop1a",from:a.waistAB,to:a.topABsplit,x:a.topCF.x-o-15}),t("hd",{id:"wBottom1a",from:a.bottomCF,to:a.bottomABsplit,y:a.bottomCF.y+o+15}),t("ld",{id:"wAtWaist1a",from:a.waistCF,to:a.waistAB}),t("hd",{id:"wAtTop1a",from:a.topCF,to:a.topABsplit,y:a.topCF.y-o-15}),t("vd",{id:"hSideBottomToWaist1b",from:a.hipsGap1.translate(h,0),to:a.waistGap1Left.translate(h,0),x:a.underbustGap1Left.translate(h,0).x+o+15}),t("vd",{id:"hSideWaistToTop1b",from:a.waistGap1Left.translate(h,0),to:a.underbustGap1Left.translate(h,0),x:a.underbustGap1Left.translate(h,0).x+o+15}),t("vd",{id:"hCenterBottomToWaist1b",from:a.bottomABsplit.translate(h,0),to:a.waistAB.translate(h,0),x:a.underbustGap1Left.translate(h,0).x+o+30}),t("vd",{id:"hCenterwaistTotop",from:a.waistAB.translate(h,0),to:a.topABsplit.translate(h,0),x:a.underbustGap1Left.translate(h,0).x+o+30}),t("hd",{id:"wBottom1b",from:a.bottomABsplit.translate(h,0),to:a.hipsGap1.translate(h,0),y:a.bottomABsplit.y+o+15}),t("ld",{id:"wAtWaist1b",from:a.waistAB.translate(h,0),to:a.waistGap1Left.translate(h,0)}),t("hd",{id:"wAtTop1b",from:a.topABsplit.translate(h,0),to:a.underbustGap1Left.translate(h,0),y:a.topABsplit.y-o-15}),l&&(a.waistGap0Left=new n(a.topCF.x,a.waistCF.y),i.panel1aWaist=(new s).move(a.waistGap0Left).line(a.waistAB).attr("class","dashed mark stroke-sm").addText("cathrin:waistLine","text-xs mark"),i.panel1bWaist=(new s).move(a.waistAB).line(a.waistGap1Left).attr("class","dashed mark stroke-sm").addText("cathrin:waistLine","text-xs mark"),i.panel1bWaist=i.panel1bWaist.translate(h,0)),c}(t):(o&&(i.sa=i.panel1.offset(o).attr("class","fabric sa")),a.cutlist.setCut([{cut:1,from:"interfacing"},{cut:1,from:"fabric"}]),e("cutonfold",{to:n.bottomCF,from:n.topCF,grainline:!0}),n.title=n.waistCF.shiftFractionTowards(n.underbustGap1Left,.5),e("title",{nr:1,title:"",at:n.title,align:"center",scale:.7}),e("vd",{id:"hCfBottomToWais",from:n.bottomCF,to:n.waistCF,x:n.topCF.x-o-15}),e("vd",{id:"hCfWaistToTop",from:n.waistCF,to:n.topCF,x:n.topCF.x-o-15}),e("vd",{id:"hSideBottomToWaist",from:n.hipsGap1,to:n.waistGap1Left,x:n.hipsGap1.x+o+15}),e("vd",{id:"hSideWaistToTop",from:n.waistGap1Left,to:n.underbustGap1Left,x:n.hipsGap1.x+o+15}),e("hd",{id:"wBottom",from:n.bottomCF,to:n.hipsGap1,y:n.bottomCF.y+o+15}),e("hd",{id:"wTop",from:n.topCF,to:n.underbustGap1Left,y:n.topCF.y-o-15}),e("ld",{id:"wAtWaist",from:n.waistCF,to:n.waistGap1Left}),c&&(n.waistGap0Left=new r(n.topCF.x,n.waistCF.y),i.panel1Waist=(new l).move(n.waistGap1Left).line(n.waistGap0Left).attr("class","dashed mark stroke-sm").addText("cathrin:waistLine","text-xs mark")),p)}};const ko={name:"cathrin.panel2",from:bo,draft:function({macro:t,sa:e,points:o,paths:a,Point:i,store:n,complete:s,Path:r,part:l}){return o.anchor=o.underbustGap1Right.clone(),delete a.outline,delete a.panel1,delete a.panel3,delete a.panel4,delete a.panel5,delete a.panel6,e&&(a.sa=a.panel2.offset(e).attr("class","fabric sa")),n.cutlist.setCut([{cut:2,from:"interfacing"},{cut:2,from:"fabric"}]),o.grainlineTop=new i(o.waistGap1Right.shiftFractionTowards(o.waistGap2Left,.5).x,o.underbustGap1Right.y),o.grainlineBottom=new i(o.grainlineTop.x,o.hipsGap2.y),t("grainline",{from:o.grainlineBottom,to:o.grainlineTop}),s&&(a.panel2Waist=(new r).move(o.waistGap1Right).line(o.waistGap2Left).attr("class","dashed mark stroke-sm").addText("cathrin:waistLine","text-xs mark")),o.title=o.grainlineTop.shift(-90,o.grainlineTop.dy(o.waistGap2Left)/2),t("title",{nr:2,title:"panel2",at:o.title,align:"center",scale:.7}),t("hd",{id:"wBottom",from:o.hipsGap1,to:o.hipsGap2,y:o.hipsGap1.y+e+15}),t("ld",{id:"wAtWaist",from:o.waistGap1Right,to:o.waistGap2Left}),t("hd",{id:"wAtTop",from:o.underbustGap1Right,to:o.underbustGap2Left,y:o.underbustGap1Right.y-e-15}),t("vd",{id:"hCenterBottomToWaist",from:o.hipsGap1,to:o.waistGap1Right,x:o.hipsGap1.x-e-15}),t("vd",{id:"hCenterWaistToTop",from:o.waistGap1Right,to:o.underbustGap1Right,x:o.hipsGap1.x-e-15}),t("vd",{id:"hSideBottomToWaist",from:o.hipsGap2,to:o.waistGap1Right,x:o.hipsGap2.x+e+15}),t("vd",{id:"hSideWaistToTop",from:o.waistGap1Right,to:o.underbustGap2Left,x:o.hipsGap2.x+e+15}),l}};const Co={name:"cathrin.panel3",from:bo,draft:function({macro:t,sa:e,points:o,paths:a,Point:i,store:n,Path:s,complete:r,part:l}){return o.anchor=o.underbustGap2Right.clone(),delete a.outline,delete a.panel1,delete a.panel2,delete a.panel4,delete a.panel5,delete a.panel6,e&&(a.sa=a.panel3.offset(e).attr("class","fabric sa")),n.cutlist.setCut([{cut:2,from:"interfacing"},{cut:2,from:"fabric"}]),o.grainlineTop=new i(o.waistGap2Right.shiftFractionTowards(o.waistGap3Left,.5).x,o.underbustGap2Right.y),o.grainlineBottom=new i(o.grainlineTop.x,o.hipsGap3.y),t("grainline",{from:o.grainlineBottom,to:o.grainlineTop}),r&&(a.panel3Waist=(new s).move(o.waistGap2Right).line(o.waistGap3Left).attr("class","dashed mark stroke-sm").addText("cathrin:waistLine","text-xs mark")),o.title=o.grainlineTop.shift(-90,o.grainlineTop.dy(o.waistGap3Left)/2),t("title",{nr:3,title:"",at:o.title,scale:.7,align:"center"}),t("hd",{id:"wBottom",from:o.hipsGap2,to:o.hipsGap3,y:o.hipsGap2.y+e+15}),t("ld",{id:"wAtWaist",from:o.waistGap2Right,to:o.waistGap3Left}),t("hd",{id:"wAtTop",from:o.underbustGap2Right,to:o.underbustGap3Left,y:o.underbustGap2Right.y-e-15}),t("vd",{id:"hCenterBottomToWaist",from:o.hipsGap2,to:o.waistGap2Right,x:o.hipsGap2.x-e-15}),t("vd",{id:"hCenterBottomToWaist",from:o.waistGap2Right,to:o.underbustGap2Right,x:o.hipsGap2.x-e-15}),t("vd",{id:"hSideBottomToWaist",from:o.hipsGap3,to:o.waistGap2Right,x:o.hipsGap3.x+e+15}),t("vd",{id:"hSideWaistToTop",from:o.waistGap2Right,to:o.underbustGap3Left,x:o.hipsGap3.x+e+15}),l}};const vo={name:"cathrin.panel4",from:bo,draft:function({macro:t,sa:e,snippets:o,Snippet:a,points:i,paths:n,Point:s,store:r,Path:l,complete:c,part:p}){return i.anchor=i.underbustGap3Right.clone(),delete n.outline,delete n.panel1,delete n.panel2,delete n.panel3,delete n.panel5,delete n.panel6,e&&(n.sa=n.panel4.offset(e).attr("class","fabric sa")),r.cutlist.setCut([{cut:2,from:"interfacing"},{cut:2,from:"fabric"}]),i.grainlineTop=new s(i.waistGap3Right.shiftFractionTowards(i.waistGap4Left,.5).x,i.underbustGap3Right.y),i.grainlineBottom=new s(i.grainlineTop.x,i.hipsGap4.y),t("grainline",{from:i.grainlineBottom,to:i.grainlineTop}),c&&(n.panel4Waist=(new l).move(i.waistGap3Right).line(i.waistGap4Left).attr("class","dashed mark stroke-sm").addText("cathrin:waistLine","text-xs mark")),i.title=i.grainlineTop.shift(-90,i.grainlineTop.dy(i.waistGap4Left)/2),t("title",{nr:4,title:"",at:i.title,scale:.7,align:"center"}),i.logo=i.grainlineTop.shiftFractionTowards(i.grainlineBottom,.8),o.logo=new a("logo",i.logo).attr("data-scale",.8),t("hd",{id:"wBottom",from:i.hipsGap3,to:i.hipsGap4,y:i.hipsGap3.y+e+15}),t("ld",{id:"wAtWaist",from:i.waistGap3Right,to:i.waistGap4Left}),t("hd",{id:"wAtTop",from:i.underbustGap3Right,to:i.underbustGap4Left,y:i.underbustGap4Left.y-e-15}),t("vd",{id:"hLeftBottomToWaist",from:i.hipsGap3,to:i.waistGap3Right,x:i.hipsGap3.x-e-15}),t("vd",{id:"hLeftWaistToTop",from:i.waistGap3Right,to:i.underbustGap3Right,x:i.hipsGap3.x-e-15}),t("vd",{id:"hRightBottomToWaist",from:i.hipsGap4,to:i.waistGap3Right,x:i.hipsGap4.x+e+15}),t("vd",{id:"hRightWaistToTop",from:i.waistGap3Right,to:i.underbustGap4Left,x:i.hipsGap4.x+e+15}),p}};const yo={name:"cathrin.panel5",from:bo,draft:function({macro:t,sa:e,points:o,paths:a,Point:i,store:n,Path:s,complete:r,part:l}){return o.anchor=o.underbustGap4Right.clone(),delete a.outline,delete a.panel1,delete a.panel2,delete a.panel3,delete a.panel4,delete a.panel6,e&&(a.sa=a.panel5.offset(e).attr("class","fabric sa")),n.cutlist.setCut([{cut:2,from:"interfacing"},{cut:2,from:"fabric"}]),o.grainlineTop=new i(o.waistGap4Right.shiftFractionTowards(o.waistGap5Left,.5).x,o.underbustGap4Right.y),o.grainlineBottom=new i(o.grainlineTop.x,o.hipsGap5.y),t("grainline",{from:o.grainlineBottom,to:o.grainlineTop}),r&&(a.panel5Waist=(new s).move(o.waistGap4Right).line(o.waistGap5Left).attr("class","dashed mark stroke-sm").addText("cathrin:waistLine","text-xs mark")),o.title=o.grainlineTop.shift(-90,o.grainlineTop.dy(o.waistGap5Left)/2),t("title",{nr:5,title:"",at:o.title,scale:.7,align:"center"}),t("hd",{id:"wAtBottom",from:o.hipsGap4,to:o.hipsGap5,y:o.hipsGap4.y+e+15}),t("ld",{id:"wAtWaist",from:o.waistGap4Right,to:o.waistGap5Left}),t("hd",{id:"wAtTop",from:o.underbustGap4Right,to:o.underbustGap5Left,y:o.underbustGap5Left.y-e-15}),t("vd",{id:"hLeftBottomToWaist",from:o.hipsGap4,to:o.waistGap4Right,x:o.hipsGap4.x-e-15}),t("vd",{id:"hLefWaistToTop",from:o.waistGap4Right,to:o.underbustGap4Right,x:o.hipsGap4.x-e-15}),t("vd",{id:"hRightBottomToWaist",from:o.hipsGap5,to:o.waistGap4Right,x:o.hipsGap5.x+e+15}),t("vd",{id:"hRightWaistToTop",from:o.waistGap4Right,to:o.underbustGap5Left,x:o.hipsGap5.x+e+15}),l}};const To={name:"cathrin.panel6",from:bo,draft:function({macro:t,sa:e,points:o,paths:a,Point:i,store:n,Path:s,complete:r,part:l}){return o.anchor=o.backRise.clone(),delete a.outline,delete a.panel1,delete a.panel2,delete a.panel3,delete a.panel4,delete a.panel5,e&&(a.sa=a.panel6.offset(e).attr("class","fabric sa")),n.cutlist.setCut([{cut:2,from:"interfacing"},{cut:2,from:"fabric"}]),o.grainlineTop=new i(o.waistGap5Right.shiftFractionTowards(o.waist
1CB,.5).x,o.underbustGap5Right.y),o.grainlineBottom=new i(o.grainlineTop.x,o.hipsGap5.y),t("grainline",{from:o.grainlineBottom,to:o.grainlineTop}),r&&(a.panel6Waist=(new s).move(o.waistGap5Right).line(o.waistCB).attr("class","dashed mark stroke-sm").addText("cathrin:waistLine","text-xs mark")),o.title=o.grainlineTop.shift(-90,o.grainlineTop.dy(o.waistGap5Right)/2),t("title",{nr:6,title:"",at:o.title,scale:.7,align:"center"}),o.scalebox=new i(o.grainlineTop.x,o.hipsGap5.y-55),t("scalebox",{at:o.scalebox,rotate:90}),t("hd",{id:"wBottom",from:o.hipsGap5,to:o.backDrop,y:o.backDrop.y+e+15}),t("ld",{id:"wAtWaist",from:o.waistGap5Right,to:o.waistCB}),t("hd",{id:"wAtTop",from:o.underbustGap5Right,to:o.backRise,y:o.backRise.y-e-15}),t("vd",{id:"hLeftTopWaist",from:o.hipsGap5,to:o.waistGap5Right,x:o.hipsGap5.x-e-15}),t("vd",{id:"hLeftWaistToTop",from:o.waistGap5Right,to:o.underbustGap5Right,x:o.hipsGap5.x-e-15}),t("vd",{id:"hRightBottomToWaist",from:o.backDrop,to:o.waistCB,x:o.backDrop.x+e+15}),t("vd",{id:"hRightWaistToTop",from:o.waistCB,to:o.backRise,x:o.backDrop.x+e+15}),l}},xo={en:JSON.parse('{"t":"Cathrin corset","d":"Cathrin is an underbust corset or waist trainer.","p":{"base":"Base","panel1":"Panel 1","panel1a":"Panel 1a","panel1b":"Panel 1b","panel2":"Panel 2","panel3":"Panel 3","panel4":"Panel 4","panel5":"Panel 5","panel6":"Panel 6","panels":"Panels"},"s":{"waistLine":"waist line"},"o":{"panels":{"t":"Number of panels","d":"The number of panels to draft. More panels are better to fit a curvier model."},"panels.11":{"t":"11 Panels","d":"Draft a pattern for a corset with 11 panels."},"panels.13":{"t":"13 Panels","d":"Draft a pattern for a corset with 13 panels."},"waistReduction":{"t":"Waist reduction","d":"The amount by which you want the corset to pinch your waist."},"backOpening":{"t":"Back opening","d":"Opening at the center back closure."},"backRise":{"t":"Back rise","d":"How much the back panels rise from your arms to your center back."},"backDrop":{"t":"Back drop","d":"How much the back panels lower from your hips towards your center back. Negative values will raise the back."},"frontRise":{"t":"Front rise","d":"Rise of the front panels at center front, between your breasts. Negative values will lower them."},"frontDrop":{"t":"Front drop","d":"How much the front panels lower from your hips towards your center front."},"hipRise":{"t":"Hip rise","d":"How much the side panels rise on your hips."}}}')},Bo=new n.pT({data:uo,parts:[wo,ko,Co,vo,yo,To]}),So=JSON.parse('{"id":"charlie","name":"Charlie chinos","code":"Joost De Cock","description":"A FreeSewing pattern for chino trousers","design":"Joost De Cock","difficulty":3,"tags":["bottoms","trousers"],"techniques":["welt-pocket","curved-seam","interfacing","fly","zipper","button","dart","hem","seam-pocket"],"version":"4.6.0","pkg":"@freesewing/charlie","collection":true}'),Lo=JSON.parse('{"id":"titan","name":"Titan trouser block","code":"Joost De Cock","description":"A FreeSewing pattern for a unisex trouser block","design":["Debra Bean","Joost De Cock"],"difficulty":3,"tags":["blocks","bottoms"],"block":true,"techniques":[],"version":"4.6.0","pkg":"@freesewing/titan","collection":true}'),Po={en:JSON.parse('{"t":"Titan trouser block","d":"Titan is a dartless trouser block.","p":{"back":"Back","front":"Front"},"s":{"crossSeamFitFailedBack.t":"Back cross seam compromised","crossSeamFitFailedBack.d":"No solution was found to fit the cross seam in the back part. As a compromise, we\'ve used the best available solution instead.\\n\\nPlease verify your measurements before contacting support.","crossSeamFitFailedFront.t":"Front cross seam compromised","crossSeamFitFailedFront.d":"No solution was found to fit the cross seam in the front part. As a compromise, we\'ve used the best available solution instead.\\n\\nPlease verify your measurements before contacting support.","lowFrontHeight.t":"Front waist too low","lowFrontHeight.d":"The front cross seam curve was adjusted as the front waistband was unexpectedly low.\\n\\nThe generated pattern is likely not correct. Please verify your measurements before contacting support.","lowBackHeight.t":"Back waist too low","lowBackHeight.d":"The back cross 
1seam curve was adjusted as the back waistband was unexpectedly low.\\n\\nThe generated pattern is likely not correct. Please verify your measurements before contacting support."},"o":{"kneeEase":{"t":"Knee ease","d":"Controls the amount of ease at the knee"},"waistHeight":{"t":"Waist height","d":"Controls the height of the waist, 100% = waist height, 0% = hip height"},"lengthBonus":{"t":"Length bonus","d":"Controls the length of the trousers"},"crotchDrop":{"t":"Crotch drop","d":"Lowers the crotch for a more relaxed fit"},"fitKnee":{"t":"Fit the knee","d":"Fits the legs from based on the knee circumference, rather than seat circumference"},"fitKneeNo":{"t":"Do not fit the knee","d":"Disregard the knee measurements and draft a pattern that tapers from upper leg to ankle"},"fitKneeYes":{"t":"Do fit the knee","d":"Use the knee measurement to draft a pattern that tapers from upper leg to knee, to then continue straight down below the knee."},"legBalance":{"t":"Leg balance","d":"Controls the ratio between front and back panel of the leg"},"crossSeamCurveStart":{"t":"Start of the cross seam curve","d":"Controls how far into the cross seam we start to curve"},"crossSeamCurveBend":{"t":"Cross seam bend","d":"Controls the curvature of the cross seam"},"crossSeamCurveAngle":{"t":"Cross seam angle","d":"Controls the angle of the cross seam"},"crotchSeamCurveStart":{"t":"Start of the crotch seam curve","d":"Controls how far into the crotch seam we start to curve"},"crotchSeamCurveBend":{"t":"Crotch seam bend","d":"Controls the curvature of the crotch seam"},"crotchSeamCurveAngle":{"t":"Crotch seam angle","d":"Controls the angle of the crotch seam"},"seatEase":{"t":"Seat ease","d":"Controls the amount of ease at your seat"},"waistBalance":{"t":"Waist balance","d":"Controls the horizontal position of the waist relative to the seat"},"waistbandWidth":{"t":"Waistband width","d":"The width of the waistband"},"waistEase":{"t":"Waist ease","d":"Controls the amount of ease at your waist"},"waistAngle":{"t":"Waistband angle","d":"Change the angle of the waistband when viewed from the side"},"useWaistAngleFor":{"t":"Use waistband angle for","d":"Apply the waistband angle to the front, back or both"},"useWaistAngleFor.both":{"t":"Both","d":"Apply the waistband angle to the front and back"},"useWaistAngleFor.backOnly":{"t":"Back","d":"Apply the waistband angle only to the back"},"useWaistAngleFor.frontOnly":{"t":"Front","d":"Apply the waistband angle only to the front"},"grainlinePosition":{"t":"Grainline position","d":"Controls the horizontal position of the leg relative to the seat"}}}')};var Ro=o(23773);const Fo={name:"titan.back",measurements:["crossSeam","crossSeamFront","knee","seat","seatBack","waist","waistBack","waistToFloor","waistToKnee","waistToHips","waistToSeat","waistToUpperLeg"],options:{fitCrossSeam:!0,fitCrossSeamFront:!0,fitCrossSeamBack:!0,fitGuides:!0,waistEase:{pct:2,min:0,max:10,...(0,n.Wx)("waist"),menu:"fit"},seatEase:{pct:2,min:0,max:10,...(0,n.Wx)("seat"),menu:"fit"},kneeEase:{pct:6,min:1,max:25,...(0,n.Wx)("knee"),menu:"fit"},waistHeight:{pct:100,min:0,max:100,menu:"style"},lengthBonus:{pct:2,min:-20,max:10,menu:"style"},crotchDrop:{pct:2,min:0,max:15,menu:"style"},fitKnee:{bool:!1,menu:"style"},waistAngle:{deg:0,min:-20,max:20,menu:"style"},useWaistAngleFor:{dflt:"both",list:["both","backOnly","frontOnly"],menu:"style"},legBalance:{pct:57.5,min:52.5,max:62.5,menu:"advanced"},crossSeamCurveStart:{pct:85,min:60,max:100,menu:"advanced"},crossSeamCurveBend:{pct:65,min:45,max:85,menu:"advanced"},crossSeamCurveAngle:{deg:12,min:0,max:20,menu:"advanced"},crotchSeamCurveStart:{pct:80,min:60,max:95,menu:"advanced"},crotchSeamCurveBend:{pct:80,min:45,max:100,menu:"advanced"},crotchSeamCurveAngle:{deg:25,min:0,max:35,menu:"advanced"},waistBalance:{pct:60,min:30,max:90,menu:"advanced"},grainlinePosition:{pct:45,min:30,max:60,menu:"advanced"},waistbandWidth:{pct:3,min:1,max:6,snap:Ro.HJ,...(0,n.Wx)("waistToFloor"),menu:"advanced"}},draft:function({points:t,Point:e,paths:o,Path:a,measurements:i,options:n,complete:s,store:r,macro:l,utils:c,snippets:p,Snippet:d,sa:h,absoluteOptions:m,log:f,units:u,part:g}){const b=()=>n.fitKnee?(new a).move(t.fork).curve(t.forkCp2,t.kneeInCp1,t.kneeIn).line(t.floorIn):(new a).move(t.fork).curve(t.forkCp2,t.kneeInCp1,t.floorIn),w=()=>{let e=t.styleWaistOut||t.waistOut;return n.fitKnee?t.waistOut.x>t.seatOut.x?(new a).move(t.floorOut).line(t.kneeOut).curve(t.kneeOutCp2,t.seatOut,e):(new a).move(t.floorOut).line(t.kneeOut).curve(t.kneeOutCp2,t.seatOutCp1,t.seatOut).curve_(t.seatOutCp2,e):t.waistOut.x>t.seatOut.x?(new a).move(t.floorOut).curve(t.kneeOutCp2,t.seatOut,e):(new a).move(t.floorOut).curve(t.kneeOutCp2,t.seatOutCp1,t.seatOut).curve_(t.seatOutCp2,e)},k=()=>(new a).move(t.waistIn).line(t.crossSeamCurveStart).curve(t.crossSeamCurveCp1,t.crossSeamCurveCp2,t.fork).length()-i.crossSeamBack,C=()=>{t.crossSeamCurveStart=t.waistIn.shiftFractionTowards(t.cbSeat,n.crossSeamCurveStart),t.crossSeamCurveMax=c.beamsIntersect(t.waistIn,t.cbSeat,t.fork,t.fork.shift(0,666)),t.crossSeamCurveCp1=t.crossSeamCurveStart.shiftFractionTowards(t.crossSeamCurveMax,n.crossSeamCurveBend),t.crossSeamCurveCp2=t.fork.shiftFractionTowards(t.crossSeamCurveMax,n.crossSeamCurveBend).rotate(n.crossSeamCurveAngle,t.fork)};t.waistX=new e(-1*i.waistBackArc*(1+n.waistEase),0),t.upperLegY=new e(0,i.waistToUpperLeg),t.seatX=new e(-1*i.seatBackArc*(1+n.seatEase),0),t.seatY=new e(0,i.waistToSeat),t.seatOut=t.seatY,t.cbSeat=new e(t.seatX.x,t.seatY.y),t.fork=new e(i.seatBackArc*(1+n.seatEase)*-1.25,t.upperLegY.y*(1+n.crotchDrop)),t.grainlineTop=t.upperLegY.shiftFractionTowards(t.fork,n.grainlinePosition),t.knee=ne
1w e(t.grainlineTop.x,i.waistToKnee),t.floor=new e(t.grainlineTop.x,i.waistToFloor*(1+n.lengthBonus)),t.grainlineBottom=t.floor;let v=i.knee*(1+n.kneeEase);if(!n.fitKnee){let t=i.seatFront;t>v&&(v=t)}r.set("kneeTotal",v),r.set("kneeBack",v*n.legBalance),r.set("kneeFront",v*(1-n.legBalance));let y=r.get("kneeBack")/2;if(t.kneeOut=t.knee.shift(0,y),t.kneeIn=t.kneeOut.flipX(t.knee),t.floorOut=t.floor.shift(0,y),t.floorIn=t.floorOut.flipX(t.floor),t.kneeInCp1=t.kneeIn.shift(90,t.fork.dy(t.knee)/3),t.kneeOutCp2=t.kneeOut.shift(90,t.fork.dy(t.knee)/3),t.seatOutCp1=t.seatOut.shift(-90,t.seatOut.dy(t.knee)/3),t.seatOutCp2=t.seatOut.shift(90,t.seatOut.y/2),t.cbSeat.x<t.waistX.x){let e=t.cbSeat.dx(t.waistX);t.waistIn=t.waistX.shift(180,e*(1-n.waistBalance))}else t.waistIn=t.waistX;let T=t.waistX.x;if(t.waistOut=t.waistIn.shift(180,T),C(),n.fitCrossSeam&&n.fitCrossSeamBack){let e,o=["waistIn","waistOut"],a=[],i=k(),n=0;do{e=i,n++;for(const e of o)a[e]=t[e],t[e]=t[e].rotate(i/15,t.seatOut);a.fork=t.fork,t.fork=t.fork.shift(0,i/5),a.forkCp2=t.forkCp2,t.forkCp2=t.crossSeamCurveCp2.rotate(-90,t.fork),C(),i=k()}while(Math.abs(i)>1&&n<15&&Math.abs(i)<Math.abs(e));if(Math.abs(i)>Math.abs(e)){for(const e of o)t[e]=a[e];t.fork=a.fork,t.forkCp2=a.forkCp2}(Math.abs(i)>1||Math.abs(i)>Math.abs(e))&&(f.warn("Unable to adjust the back crotch seam to fit the given measurements."),r.flag.warn({msg:"titan:crossSeamFitFailedBack"}))}if(r.set("inseamBack",b().length()),r.set("outseamBack",w().length()),n.waistHeight<1||m.waistbandWidth>0?(t.styleWaistOut=w().reverse().shiftAlong(i.waistToHips*(1-n.waistHeight)+m.waistbandWidth),t.styleWaistIn=c.beamsIntersect(t.styleWaistOut,t.styleWaistOut.shift(t.waistOut.angle(t.waistIn),10),t.waistIn,t.crossSeamCurveStart),t.styleWaistIn.y>=t.crossSeamCurveStart.y&&(r.flag.warn({msg:"titan:lowBackHeight"}),t.crossSeamCurveStart=t.styleWaistIn.shiftFractionTowards(t.crossSeamCurveMax,.001))):(t.styleWaistIn=t.waistIn.clone(),t.styleWaistOut=t.waistOut.clone()),t.styleWaistInNoAngle=t.styleWaistIn.clone(),0!==n.waistAngle&&("both"===n.useWaistAngleFor||"backOnly"===n.useWaistAngleFor)){let e,o;e=t.fork.dx(t.crossSeamCurveStart),o=Math.tan(n.waistAngle*Math.PI/180)*e,t.styleWaistIn=t.crossSeamCurveStart.shiftOutwards(t.styleWaistIn,o),f.info(["additionalHeightCenterBack",u(o)])}return t.seatOutCp2.y=t.seatOut.y-t.styleWaistOut.dy(t.seatOut)/2,o.seam=(()=>{let e=t.styleWaistIn||t.waistIn;return b().line(t.floorOut).join(w()).line(e).line(t.crossSeamCurveStart).curve(t.crossSeamCurveCp1,t.crossSeamCurveCp2,t.fork).close()})().attr("class","fabric"),h&&(o.saBase=w().join((new a).move(t.styleWaistOut).line(t.styleWaistIn).line(t.crossSeamCurveStart).curve(t.crossSeamCurveCp1,t.crossSeamCurveCp2,t.fork)).join(b()),o.hemBase=(new a).move(t.floorIn).line(t.floorOut),o.sa=o.hemBase.offset(3*h).join(o.saBase.offset(h)).close().attr("class","fabric sa"),o.saBase.hide(),o.hemBase.hide()),s&&(o.hint=(new a).move(t.crossSeamCurveStart).line(t.crossSeamCurveMax).line(t.fork).addClass("note help")),r.cutlist.setCut({cut:2,from:"fabric"}),t.grainlineTop.y=t.styleWaistOut.y,l("grainline",{from:t.grainlineTop,to:t.grainlineBottom}),l("scalebox",{at:t.knee}),t.logoAnchor=new e(t.crossSeamCurveStart.x/2,t.fork.y),p.logo=new d("logo",t.logoAnchor),t.titleAnchor=t.logoAnchor.shift(-90,60),l("title",{nr:1,title:"back",at:t.titleAnchor}),l("hd",{id:"wHem",from:t.floorIn,to:t.floorOut,y:t.floorIn.y-30}),l("hd",{id:"wHemLeft",from:t.floorIn,to:t.floor,y:t.floorIn.y-15}),l("hd",{id:"wHemRight",from:t.floor,to:t.floorOut,y:t.floorIn.y-15}),l("vd",{id:"hHemToSideWaist",from:t.floorOut,to:t.styleWaistOut,x:(t.seatOut.x>t.styleWaistOut.x?t.seatOut.x:t.styleWaistOut.x)+h+15}),l("vd",{id:"hHemToFork",from:t.floorIn,to:t.fork,x:t.fork.x-h-15}),l("vd",{id:"hForkToCbWaist",from:t.fork,to:t.styleWaistIn,x:t.fork.x-h-15}),l("vd",{id:"hFull",from:t.floorIn,to:t.styleWaistIn,x:t.fork.x-h-30}),l("vd",{id:"hStartCrotchCurveToCbWaist",from:t.crossSeamCurveStart,to:t.styleWaistIn,x:t.crossSeamCurveStart.x-h-15}),l("hd",{id:"wCbWaistToPleat",from:t.styleWaistIn,to:t.grainlineTop,y:t.styleWaistIn.y-h-15}),l("hd",{id:"wStartCrotchCurveToPleat",from:t.crossSeamCurveStart,to:t.grainlineTop,y:t.styleWaistIn.y-h-30}),l("hd",{id:"wForkProjectionToPleat",from:t.crossSeamCurveMax,to:t.grainlineTop,y:t.styleWaistIn.y-h-45}),l("hd",{id:"wForkToPleat",from:t.fork,to:t.grainlineTop,y:t.styleWaistIn.y-h-60}),l("hd",{id:"wPleatToSideWaist",from:t.grainlineTop,to:t.styleWaistOut,y:t.styleWaistIn.y-h-15}),t.seatOut.x>t.styleWaistOut.x&&l("hd",{id:"wPleatToSideWaistAlt",from:t.grainlineTop,to:t.seatOut,y:t.styleWaistIn.y-h-30}),g}};const Eo={name:"titan.front",after:Fo,draft:function({points:t,Point:e,paths:o,Path:a,measurements:i,options:n,complete:s,store:r,macro:l,utils:c,snippets:p,Snippet:d,sa:h,absoluteOptions:m,log:f,units:u,part:g}){const b=()=>n.fitKnee?(new a).move(t.floorIn).line(t.kneeIn).curve(t.kneeInCp2,t.forkCp1,t.fork):(new a).move(t.floorIn).curve(t.kneeInCp2,t.forkCp1,t.fork),w=()=>{let e=t.styleWaistOut||t.waistOut;return n.fitKnee?t.waistOut.x<t.seatOut.x?(new a).move(e).curve(t.seatOut,t.kneeOutCp1,t.kneeOut).line(t.floorOut):(new a).move(e)._curve(t.seatOutCp1,t.seatOut).curve(t.seatOutCp2,t.kneeOutCp1,t.kneeOut).line(t.floorOut):t.waistOut.x<t.seatOut.x?(new a).move(e).curve(t.seatOut,t.kneeOutCp1,t.floorOut):(new a).move(e)._curve(t.seatOutCp1,t.seatOut).curve(t.seatOutCp2,t.kneeOutCp1,t.floorOut)},k=()=>(new a).move(t.waistIn).line(t.crotchSeamCurveStart).curve(t.crotchSeamCurveCp2,t.crotchSeamCurveCp1,t.fork).length()-i.crossSeamFront,C=()=>{t.crotchSeamCurveStart=t.waistIn.shiftFractionTowards(t.cfSeat,n.crotchSeamCurveStart),t.crotchSeamCurveMax=c.beamsIntersect(t.waistIn,t.cfSeat,t.fork,t.fork.shift(0,666)),t.crotchSeamCurveCp1=t.fork.shiftFractionTowards(t.crotchSeamCurveMax,n.crotchSeamCurveBend).rotate(-1*n.crotchSeamCurveAngle,t.fork),t.crotchSeamCurveCp2=t.crotchSeamCurveStart.shiftFractionTowards(t.crotchSeamCurveMax,n.crotchSeamCurveBend),t.forkCp1=t.crotchSeamCurveCp1.rotate(90,t.fork)},v=()=>b().length()-r.get("inseamBack"),y=()=>w().length()-r.get("outseamBack"),T=()=>{let t=v(),e=y();return Math.abs(t)>Math.abs(e)?e:t},x=e=>{const o="out"===e;let a=["cfSeat","crotchSeamCurveCp1","crotchSeamCurveCp2","crotchSeamCurveStart","waistIn","cfWaist","waistOut"];a.push(o?"seatOut":"fork");const i=o?y:v;let n=0,s=i();do{for(const e of a)t[e]=t[e].rotate(s/10*(o?1:-1),t[o?"fork":"seatOut"]);n++,s=i()}while(Math.abs(s)>1&&n<20)},B=()=>x("out"),S=()=>x("in");t.waistX=new e(i.waistFrontArc*(1+n.waistEase),0),t.upperLegY=new e(0,i.waistToUpperLeg),t.seatX=new e(i.seatFrontArc*(1+n.seatEase),0),t.seatY=new e(0,i.waistToSeat),t.seatOut=t.seatY,t.cfSeat=new e(t.seatX.x,t.seatY.y),t.fork=new e(i.seatFrontArc*(1+n.seatEase)*1.25,t.upperLegY.y*(1+n.crotchDrop)),t.grainlineTop=t.upperLegY.shiftFractionTowards(t.fork,n.grainlinePosition),t.knee=ne
1w e(t.grainlineTop.x,i.waistToKnee),t.floor=new e(t.grainlineTop.x,i.waistToFloor*(1+n.lengthBonus)),t.grainlineBottom=t.floor;let L=r.get("kneeFront")/2;t.kneeOut=t.knee.shift(180,L),t.kneeIn=t.kneeOut.flipX(t.knee),t.floorOut=t.floor.shift(180,L),t.floorIn=t.floorOut.flipX(t.floor),t.kneeInCp2=t.kneeIn.shift(90,t.fork.dy(t.knee)/3),t.kneeOutCp1=t.kneeOut.shift(90,t.fork.dy(t.knee)/3),t.seatOutCp1=t.seatOut.shift(90,i.waistToHips*n.waistHeight+m.waistbandWidth),t.seatOutCp2=t.seatOut.shift(-90,t.seatOut.dy(t.knee)/3);let P=t.waistX.dx(t.cfSeat),R=t.waistX.x;if(t.waistOut=new e(P*n.waistBalance,0),t.waistIn=t.waistOut.shift(0,R),t.cfWaist=t.waistIn,C(),n.fitCrossSeam&&n.fitCrossSeamFront){let e,o=k(),a=["waistIn","waistOut","cfWaist"],i=[],n=0;do{e=o,n++;for(const e of a)i[e]=t[e],t[e]=t[e].rotate(o/-15,t.seatOut);i.fork=t.fork,t.fork=t.fork.shift(180,o/5),C(),o=k()}while(Math.abs(o)>1&&n<15&&Math.abs(o)<Math.abs(e));if(Math.abs(o)>Math.abs(e)){for(const e of a)t[e]=i[e];t.fork=i.fork}(Math.abs(o)>1||Math.abs(o)>Math.abs(e))&&(f.warn("Unable to adjust the front crotch seam to fit the given measurements, after "+n+" iterations."),r.flag.warn({msg:"titan:crossSeamFitFailedFront"}))}if((v()<0&&y()<0||v()>0&&y()>0)&&(()=>{let e=["kneeInCp2","kneeOutCp1","kneeIn","kneeOut","knee","floorIn","floorOut","floor","grainlineBottom"],o=T(),a=0;do{a++;for(const a of e)t[a]=t[a].shift(90,o);o=T()}while(Math.abs(o)>1&&a<10)})(),B(),S(),B(),S(),n.waistHeight<1||m.waistbandWidth>0?(t.styleWaistOut=w().shiftAlong(i.waistToHips*(1-n.waistHeight)+m.waistbandWidth),t.styleWaistIn=c.beamsIntersect(t.styleWaistOut,t.styleWaistOut.shift(t.waistOut.angle(t.waistIn),10),t.waistIn,t.crotchSeamCurveStart),t.styleWaistIn.y>=t.crotchSeamCurveStart.y&&(r.flag.warn({msg:"titan:lowFrontHeight"}),t.crotchSeamCurveStart=t.styleWaistIn.shiftFractionTowards(t.crotchSeamCurveMax,.001))):(t.styleWaistIn=t.waistIn.clone(),t.styleWaistOut=t.waistOut.clone()),t.styleWaistInNoAngle=t.styleWaistIn.clone(),0!=n.waistAngle&&("both"===n.useWaistAngleFor||"frontOnly"===n.useWaistAngleFor)){let e,o;e=t.fork.dx(t.crotchSeamCurveStart),o=Math.tan(n.waistAngle*Math.PI/180)*e,t.styleWaistIn=t.crotchSeamCurveStart.shiftOutwards(t.styleWaistIn,o),f.info(["heightReductionCenterFront",u(-o)])}return o.seam=(()=>{let e=t.styleWaistIn||t.waistIn,o=t.styleWaistOut||t.waistOut;return w().line(t.floorIn).join(b()).curve(t.crotchSeamCurveCp1,t.crotchSeamCurveCp2,t.crotchSeamCurveStart).line(e).line(o).close()})().attr("class","fabric"),s&&(o.hint=(new a).move(t.crotchSeamCurveStart).line(t.crotchSeamCurveMax).line(t.fork).addClass("note help")),h&&(o.saBase=b().join((new a).move(t.fork).curve(t.crotchSeamCurveCp1,t.crotchSeamCurveCp2,t.crotchSeamCurveStart).line(t.styleWaistIn).line(t.styleWaistOut)).join(w()),o.hemBase=(new a).move(t.floorOut).line(t.floorIn),o.sa=o.hemBase.offset(3*h).join(o.saBase.offset(h)).close().attr("class","fabric sa"),o.saBase.hide(),o.hemBase.hide()),r.cutlist.setCut({cut:2,from:"fabric"}),t.grainlineTop.y=t.styleWaistIn.y,l("grainline",{from:t.grainlineTop,to:t.grainlineBottom}),t.logoAnchor=new e(t.crotchSeamCurveStart.x/2,t.fork.y),p.logo=new d("logo",t.logoAnchor),t.titleAnchor=t.logoAnchor.shift(-90,60),l("title",{nr:2,title:"front",at:t.titleAnchor}),l("hd",{id:"wHemLeftToPleat",from:t.floorOut,to:t.floor,y:t.floorIn.y-15}),l("hd",{id:"wHemRightToPleat",from:t.floor,to:t.floorIn,y:t.floorIn.y-15}),l("hd",{id:"wHem",from:t.floorOut,to:t.floorIn,y:t.floorIn.y-30}),l("vd",{id:"hHemToFork",from:t.floorOut,to:t.fork,x:t.fork.x+h+15}),l("vd",{id:"hForkToCfWaist",from:t.fork,to:t.styleWaistIn,x:t.fork.x+h+15}),l("vd",{id:"hHemToSideWaist",from:t.floorIn,to:t.styleWaistOut,x:(t.seatOut.x<t.styleWaistOut.x?t.seatOut.x:t.styleWaistOut.x)-h-15}),l("vd",{id:"hStartCrotchCurveToCfWaist",from:t.crotchSeamCurveStart,to:t.styleWaistIn,x:t.crotchSeamCurveStart.x+h+15}),l("hd",{id:"wSideWaistToPleat",from:t.seatOut,to:t.grainlineTop,y:t.styleWaistIn.y-h-15}),t.styleWaistOut.x<t.seatOut.x&&l("hd",{id:"wSideWaistToPleatAlt",from:t.styleWaistOut,to:t.grainlineTop,y:t.styleWaistIn.y-h-30}),l("hd",{id:"wPleatToCfWaist",from:t.grainlineTop,to:t.styleWaistIn,y:t.styleWaistIn.y-h-15}),l("hd",{id:"wPleastToStartCrotchCurve",from:t.grainlineTop,to:t.crotchSeamCurveStart,y:t.styleWaistIn.y-h-30}),l("hd",{id:"wPleastToCrotchProjection",from:t.grainlineTop,to:t.crotchSeamCurveMax,y:t.styleWaistIn.y-h-45}),l("hd",{id:"wPleastToFork",from:t.grainlineTop,to:t.fork,y:t.styleWaistIn.y-h-60}),g}},Wo=new n.pT({data:Lo,parts:[Fo,Eo]}),Ho={en:JSON.parse('{"t":"Charlie chinos","d":"Charlie is a chino trouser pattern.","p":{"back":"Back","backPocketBag":"Back pocket bag","backPocketFacing":"Back pocket facing","backPocketInterfacing":"Back pocket interfacing","backPocketWelt":"Back pocket welt","beltLoops":"Beltloops","flyExtension":"Fly extension","flyFacing":"Fly facing","front":"Front","frontPocketBag":"Front pocket bag","frontPocketFacing":"Front pocket facing","waistband":"Waistband","waistbandCurved":"Curved waistband"},"s":{"cutBeltloops.t":"The belt loops are not shown","cutBeltloops.d":"The **Belt loops** are {{{ count }}} rectangular piece of fabric {{{ width }}} wide and {{{ length }}} long.","cutBackPocketInterfacing.t":"The back pocket interfacing is not shown","cutBackPocketInterfacing.d":"The **Back pocket interfacing** is a rectangular piece of fusible interfacing {{{ width }}} wide and {{{ length }}} long.","cutWaistband.t":"The waistband is not shown","cutWaistband.d":"The **Waistband** is a rectangular piece of fabric {{{ width }}} wide and {{{ length }}} long."},"o":{"backPocketHorizontalPlacement":{"t":"Back pocket horizontal placement","d":"Controls the horizontal placement of the back pocket"},"backPocketVerticalPlacement":{"t":"Back pocket vertical placement","d":"Controls the vertical placement of the back pocket"},"backPocketWidth":{"t":"Back pocket width","d":"Controls the width of the back pocket"},"backPocketDepth":{"t":"Back pocket depth","d":"Controls the depth of the back pocket"},"backPocketFacing":{"t":"Back pocket facing","d":"Controls whether or not to include facing on the back pockets"},"backPocketFacingNo":{"t":"Do not include back pocket facing","d":"Drafts a pattern that does not includes facing for the back pockets, showing the lining when peeking in the back pocket opening."},"backPocketFacingYes":{"t":"Include back pocket facing","d":"Drafts a pattern that includes facing for the back pockets"},"frontPocketSlantDepth":{"t":"Front pocket slant depth","d":"Controls the depth of the (front) pocket slant"},"frontPocketSlantWidth":{"t":"Front pocket slant width","d":"Controls the width of the (front) pocket slant"},"frontPocketSlantRound":{"t":"Front pocket slant round","d":"Controls how far from the end of the slant we start rounding into the outseam"},"frontPocketSlantBend":{"t":"Front pocket slant bend","d":"Controls the radius by which we round the pocket slant into the outseam"},"frontPocketWidth":{"t":"Front pocket width","d":"Controls the width of the front pocket bag"},"frontPocketDepth":{"t":"Front pocket depth","d":"Controls the depth of the front pocket bag"},"frontPocketFacing":{"t":"Front pocket facing","d":"Controls how far the pocket facing extends into the pocket bag"},"beltLoops":{"t":"Belt loops","d":"Controls the amount of belt loops"},"flyCurve":{"t":"Fly curve","d":"Controls the curvature of the fly J-seam"},"flyLength":{"t":"Fly length","d":"Controls the length of the fly"},"flyWidth":{"t":"Fly width","d":"Controls how far the J-seam of offset from the fly edge"},"waistbandCurve":{"t":"Waistband Curve","d":"Controls how curved the waistband is."}}}')};const Ao={name:"charlie.front",from:Eo,hide:n.V9.HIDE_TREE,measurements:["crossSeam","crossSeamFront","knee","seat","seatBack","waist","waistBack","waistToFloor","waistToKnee","waistToHips","waistToSeat","
1waistToUpperLeg"],options:{fitCrossSeam:!0,fitCrossSeamFront:!0,fitCrossSeamBack:!0,fitGuides:!1,fitKnee:!0,waistbandReduction:.25,waistbandFactor:.1,waistEase:{pct:1,min:0,max:5,...(0,n.Wx)("waist"),menu:"fit"},seatEase:{pct:5,min:0,max:10,...(0,n.Wx)("seat"),menu:"fit"},kneeEase:{pct:15,min:10,max:30,...(0,n.Wx)("knee"),menu:"fit"},waistHeight:{pct:-4,min:-15,max:40,menu:"style"},waistbandWidth:{pct:3,min:1,max:6,snap:Ro.HJ,...(0,n.Wx)("waistToFloor"),menu:"style"},lengthBonus:{pct:2,min:-20,max:10,menu:"style"},crotchDrop:{pct:2,min:0,max:15,menu:"style"},crossSeamCurveStart:{pct:85,min:60,max:100,menu:"advanced"},crossSeamCurveBend:{pct:65,min:45,max:85,menu:"advanced"},crossSeamCurveAngle:{deg:12,min:0,max:20,menu:"advanced"},crotchSeamCurveStart:{pct:80,min:60,max:95,menu:"advanced"},crotchSeamCurveBend:{pct:80,min:45,max:100,menu:"advanced"},crotchSeamCurveAngle:{deg:25,min:0,max:35,menu:"advanced"},grainlinePosition:{pct:50,min:30,max:60,menu:"advanced"},legBalance:{pct:57.5,min:52.5,max:62.5,menu:"advanced"},waistBalance:{pct:55,min:30,max:90,menu:"advanced"},frontPocketSlantDepth:{pct:85,min:70,max:100,menu:"pockets.frontpockets"},frontPocketSlantWidth:{pct:25,min:15,max:35,menu:"pockets.frontpockets"},frontPocketSlantRound:{pct:30,min:5,max:50,menu:"pockets.frontpockets"},frontPocketSlantBend:{pct:25,min:5,max:50,menu:"pockets.frontpockets"},frontPocketWidth:{pct:55,min:45,max:65,menu:"pockets.frontpockets"},frontPocketDepth:{pct:100,min:85,max:110,menu:"pockets.frontpockets"},frontPocketFacing:{pct:45,min:25,max:65,menu:"pockets.frontpockets"},flyCurve:{pct:72,min:50,max:100,menu:"advanced.fly"},flyLength:{pct:45,min:30,max:60,menu:"advanced.fly"},flyWidth:{pct:15,min:10,max:20,menu:"advanced.fly"}},draft:function({points:t,Point:e,paths:o,Path:a,options:i,complete:n,measurements:s,store:r,macro:l,utils:c,snippets:p,Snippet:d,sa:h,log:m,part:f}){const u=()=>(new a).move(t.slantTop).line(t.slantCurveStart).curve(t.slantCurveCp1,t.slantCurveCp2,t.slantCurveEnd).join(b.split(t.slantCurveEnd).pop()),g=()=>{let t=u();return w.clone().join(k).join(t)},b=t.waistOut.x<t.seatOut.x?(new a).move(t.styleWaistOut).curve(t.seatOut,t.kneeOutCp1,t.kneeOut).line(t.floorOut):(new a).move(t.styleWaistOut)._curve(t.seatOutCp1,t.seatOut).curve(t.seatOutCp2,t.kneeOutCp1,t.kneeOut).line(t.floorOut),w=(new a).move(t.floorIn).line(t.kneeIn).curve(t.kneeInCp2,t.forkCp1,t.fork),k=(new a).move(t.fork).curve(t.crotchSeamCurveCp1,t.crotchSeamCurveCp2,t.crotchSeamCurveStart).line(t.styleWaistIn),C=c.curveIntersectsY(t.crotchSeamCurveStart,t.crotchSeamCurveCp2,t.crotchSeamCurveCp1,t.fork,t.cfSeat.shiftFractionTowards(t.crotchSeamCurveCp2,i.flyLength).y);C?t.flyBottom=C:m.error("Unable to locate the fly bottom. This draft will fail."),t.flyExtensionBottom=c.curveIntersectsY(t.crotchSeamCurveStart,t.crotchSeamCurveCp2,t.crotchSeamCurveCp1,t.fork,t.cfSeat.shiftFractionTowards(t.crotchSeamCurveCp2,1.5*i.flyLength).y),t.flyTop=t.styleWaistOut.shiftFractionTowards(t.styleWaistIn,1-i.flyWidth),t.flyCorner=t.flyTop.shift(t.styleWaistIn.angle(t.crotchSeamCurveStart),t.styleWaistIn.dist(t.flyBottom)),t.flyCurveStart=t.flyCorner.shiftTowards(t.flyTop,t.flyBottom.dist(t.flyCorner)),t.flyCurveCp1=t.flyBottom.shiftFractionTowards(t.flyCorner,i.flyCurve),t.flyCurveCp2=t.flyCurveStart.shiftFractionTowards(t.flyCorner,i.flyCurve);let v=8*(1-i.flyWidth);t.flyTopSeamline=t.flyTop.shiftTowards(t.styleWaistIn,v),t.flyBottomSeamLine=c.curveIntersectsY(t.crotchSeamCurveStart,t.crotchSeamCurveCp2,t.crotchSeamCurveCp1,t.fork,t.flyBottom.shiftTowards(t.crotchSeamCurveStart,v).y),o.flyFacingLine=(new a).move(t.flyTop).line(t.flyCurveStart).curve(t.flyCurveCp2,t.flyCurveCp1,t.flyBottom).setClass("lining dashed");let y=o.flyFacingLine.offset(-v);if(s.waist>500){const e=y.split(t.flyBottomSeamLine)[0];e&&(o.completeJseam=e.clone().setClass("dashed").addText("jseamStitchLine","center text-sm"),o.flyRightLegExtension=k.clone().split(t.flyBottom)[1].offset(v).line(t.styleWaistIn).reverse().line(t.flyExtensionBottom).reverse().setClass("fabric").addText("rightLegSeamline","center fill-note text-sm"))}
1t.slantTop=t.styleWaistIn.shiftFractionTowards(t.styleWaistOut,1-i.frontPocketSlantWidth),t.slantLowest=b.intersectsY(t.fork.y).pop(),r.set("slantWidth",t.styleWaistOut.dist(t.slantTop)),r.set("slantLength",b.split(t.slantLowest).shift().length()*i.frontPocketSlantDepth),t.slantBottom=b.shiftAlong(r.get("slantLength")),t.slantCurveStart=t.slantBottom.shiftFractionTowards(t.slantTop,i.frontPocketSlantRound),t.slantCurveEnd=b.shiftAlong(t.slantBottom.dist(t.slantCurveStart)+r.get("slantLength")),t.slantCurveCp1=t.slantBottom.shiftFractionTowards(t.slantCurveStart,i.frontPocketSlantBend),t.slantCurveCp2=b.shiftAlong(t.slantBottom.dist(t.slantCurveCp1)+r.get("slantLength")),t.pocketbagTopRight=t.slantTop.shiftFractionTowards(t.styleWaistIn,i.frontPocketWidth),t.pocketbagBottomRight=t.pocketbagTopRight.shift(t.slantTop.angle(t.pocketbagTopRight)-90,t.styleWaistIn.dy(t.fork)*i.frontPocketDepth*1.5),t.pocketbagBottomCp2=b.intersectsY(t.pocketbagBottomRight.y).pop(),t.pocketbagBottom=t.pocketbagBottomRight.shiftFractionTowards(t.pocketbagBottomCp2,.5),t.pocketbagBottomCp1=t.slantCurveCp2.rotate(180,t.slantCurveEnd),t.pocketFacingTop=t.slantTop.shiftFractionTowards(t.pocketbagTopRight,i.frontPocketFacing),t.facingDirection=t.slantCurveStart.shift(0,t.slantTop.dist(t.pocketFacingTop)),t.pocketFacingBottom=(new a).move(t.pocketFacingTop).line(t.pocketFacingTop.shiftFractionTowards(t.facingDirection,4)).intersects((new a).move(t.slantCurveStart).curve(t.slantCurveCp1,t.slantCurveCp2,t.slantCurveEnd).curve(t.pocketbagBottomCp1,t.pocketbagBottomCp2,t.pocketbagBottom).line(t.pocketbagBottomRight)).pop(),t.anchor=t.fork.clone(),o.seam=g().close().attr("class","fabric"),h&&(o.sa=g().offset(h).join((new a).move(t.floorOut).line(t.floorIn).offset(6*h)).close().trim().addClass("fabric sa")),r.set("waistbandFront",t.styleWaistIn.dist(t.slantTop)),r.set("waistbandFly",t.styleWaistIn.dist(t.flyTop)),r.set("legWidthFront",t.floorIn.dist(t.floorOut)),r.set("frontInseamLength",w.length()),r.set("frontOutseamLength",u().length());const T=(new a).move(t.flyCurveStart).curve(t.flyCurveCp2,t.flyCurveCp1,t.flyBottom);if(n&&(t.titleAnchor=new e(t.knee.x,t.fork.y),l("title",{at:t.titleAnchor,nr:2,title:"front"}),p.logo=new d("logo",t.titleAnchor.shiftFractionTowards(t.knee,.666)),t.topPleat=c.beamsIntersect(t.styleWaistIn,t.styleWaistOut,t.knee,t.grainlineBottom),t.slantBottomNotch=(new a).move(t.slantCurveStart).curve(t.slantCurveCp1,t.slantCurveCp2,t.slantCurveEnd).intersectsY(t.slantBottom.y).pop(),t.slantTopNotch=t.slantTop.shiftFractionTowards(t.slantCurveStart,.1),r.set("slantTopNotchDistance",t.slantTop.dist(t.slantTopNotch)),l("sprinkle",{snippet:"notch",on:["slantBottomNotch","slantTopNotch","topPleat","grainlineBottom","flyBottom","flyExtensionBottom","flyBottomSeamLine"]}),o.pocketBag=(new a).move(t.slantTop).line(t.slantCurveStart).curve(t.slantCurveCp1,t.slantCurveCp2,t.slantCurveEnd).curve(t.pocketbagBottomCp1,t.pocketbagBottomCp2,t.pocketbagBottom).line(t.pocketbagBottomRight).line(t.pocketbagTopRight).move(t.pocketFacingTop).line(t.pocketFacingBottom).setClass("lining dashed"),l("bartack",{anchor:t.slantTopNotch,angle:t.slantTopNotch.angle(t.slantCurveStart)+90,length:h?h/1.5:7.5,suffix:"slantTop"}),l("bartack",{anchor:t.slantBottomNotch,length:h?h/2:5,suffix:"slantBottom"}),s.waist>200&&l("bartackFractionAlong",{path:y.reverse(),start:.02,end:.05,suffix:"stom"}),h&&(o.sa=g().offset(h).join((new a).move(t.floorOut).line(t.floorIn).offset(6*h)).close().trim().setClass("fabric sa"),s.waist>500))){let t=o.flyRightLegExtension.offset(h);o.flyRightLegExtensionSa=t.split(t.intersects(o.sa)[0])[1].setClass("dotted").addText("rightLegSeamAllowance","center fill-note text-sm")}delete o.hint,r.cutlist.setCut({cut:2,from:"fabric"}),t.titleAnchor=new e(t.knee.x,t.fork.y),l("title",{at:t.titleAnchor,nr:2,title:"front"}),p.logo=new d("logo",t.titleAnchor.shiftFractionTowards(t.knee,.666)),t.topPleat=c.beamsIntersect(t.styleWaistIn,t.styleWaistOut,t.knee,t.grainlineBottom),t.slantBottomNotch=(new a).move(t.slantCurveStart).curve(t.slantCurveCp1,t.slantCurveCp2,t.slantCurveEnd).intersectsY(t.slantBottom.y).pop(),t.slantTopNotch=t.slantTop.shiftFractionTowards(t.slantCurveStart,.1),r.set("slantTopNotchDistance",t.slantTop.dist(t.slantTopNotch)),l("sprinkle",{snippet:"notch",on:["slantBottomNotch","slantTopNotch","topPleat","grainlineBottom","flyBottom","flyExtensionBottom"]}),l("bartack",{anchor:t.slantTopNotch,angle:t.slantTopNotch.angle(t.slantCurveStart)+90,length:h?h/1.5:7.5,suffix:"slantTop"}),l("bartack",{anchor:t.slantBottomNotch,length:h?h/2:5,suffix:"slantBottom"}),s.waist>200&&l("bartackFractionAlong",{path:T.reverse(),start:0,end:.1,suffix:"stom"}),l("rmad"),l("hd",{id:"wPleatToHemRight",from:t.grainlineBottom,to:t.floorIn,y:t.floorIn.y-15}),l("hd",{id:"wPleastToHemLeft",from:t.floorOut,to:t.grainlineBottom,y:t.floorIn.y-15}),l("hd",{id:"wHem",from:t.floorOut,to:t.floorIn,y:t.floorIn.y-30});let x=t.styleWaistIn.y-h;l("hd",{id:"wPleatToJseam",from:t.topPleat,to:t.flyTop,y:x-15}),l("hd",{id:"wPleatToCfWaist",from:t.topPleat,to:t.styleWaistIn,y:x-30}),l("hd",{id:"wPleatToJeamEnd",from:t.topPleat,to:t.flyBottom,y:x-45}),l("hd",{id:"wPleatToCrotchCurveStart",from:t.topPleat,to:t.flyExtensionBottom,y:x-60}),l("hd",{id:"wPleatToFork",from:t.topPleat,to:t.fork,y:x-75}),l("hd",{id:"wPleatToPocketFacingWaist",from:t.pocketFacingTop,to:t.topPleat,y:x-15}),l("hd",{id:"wPleatToSideWaist",from:t.slantTop,to:t.topPleat,y:x-30}),l("hd",{id:"wPleatToSide",from:t.slantBottomNotch,to:t.topPleat,y:x-45});let B=t.fork.x+h;return l("vd",{id:"hHemToFork",from:t.floorIn,to:t.fork,x:B+15}),l("vd",{id:"hForkToStartCrotchSeam",from:t.fork,to:t.flyExtensionBottom,x:B+15}),l("vd",{id:"hForkToJeamEnd",from:t.fork,to:t.flyBottom,x:B+30}),l("vd",{id:"hForkToCfWaist",from:t.fork,to:t.slantTop,x:B+45}),l("vd",{id:"hForkToSideWaist",from:t.fork,to:t.styleWaistIn,x:B+60}),f}};const Oo={name:"charlie.back",from:Fo,after:Ao,hide:n.V9.HIDE_TREE,options:{backPocketVerticalPlacement:{pct:24,min:18,max:30,menu:"pockets.backp
1ockets"},backPocketHorizontalPlacement:{pct:55,min:48,max:62,menu:"pockets.backpockets"},backPocketWidth:{pct:55,min:50,max:60,menu:"pockets.backpockets"},backPocketDepth:{pct:60,min:40,max:80,menu:"pockets.backpockets"},backPocketFacing:{bool:!0,menu:"pockets.backpockets"}},draft:function({points:t,Point:e,paths:o,Path:a,options:i,complete:n,store:s,macro:r,snippets:l,Snippet:c,sa:p,log:d,units:h,utils:m,part:f}){const u=()=>(new a).move(t.slantOut).line(t.slantCurveStart).curve(t.slantCurveCp1,t.slantCurveCp2,t.slantCurveEnd).join(k.split(t.slantCurveEnd).pop()).reverse();let g=t.styleWaistIn.dist(t.styleWaistOut),b=t.styleWaistIn.angle(t.styleWaistOut);s.set("backPocketToWaistband",g*i.backPocketVerticalPlacement),s.set("backPocketWidth",g*i.backPocketWidth),s.set("backPocketDepth",g*i.backPocketDepth),t.waistPocketCenter=t.styleWaistIn.shiftFractionTowards(t.styleWaistOut,i.backPocketHorizontalPlacement),t.pocketCenter=t.waistPocketCenter.shift(b-90,s.get("backPocketToWaistband")),t.pocketRight=t.pocketCenter.shift(b,s.get("backPocketWidth")/2),t.pocketLeft=t.pocketCenter.shift(b,s.get("backPocketWidth")/-2),t.tmp1=t.waistPocketCenter.rotate(8.66,t.pocketCenter),t.tmp2=t.waistPocketCenter.rotate(-8.66,t.pocketCenter),t.backDartLeft=t.pocketCenter.shiftFractionTowards(t.tmp1,1.05),t.backDartRight=t.pocketCenter.shiftFractionTowards(t.tmp2,1.05);let w=g-(t.styleWaistIn.dist(t.backDartLeft)+t.styleWaistOut.dist(t.backDartRight));for(let W of["styleWaistIn","crossSeamCurveStart","crossSeamCurveCp1"])t[W]=t[W].shift(b+180,w/2);t.styleWaistOut=t.styleWaistOut.shift(b,w/2);const k=t.waistOut.x>t.seatOut.x?(new a).move(t.floorOut).line(t.kneeOut).curve(t.kneeOutCp2,t.seatOut,t.styleWaistOut).reverse():(new a).move(t.floorOut).line(t.kneeOut).curve(t.kneeOutCp2,t.seatOutCp1,t.seatOut).curve_(t.seatOutCp2,t.styleWaistOut).reverse(),C=(new a).move(t.fork).curve(t.forkCp2,t.kneeInCp1,t.kneeIn).line(t.floorIn);t.seatOutCp2.y=t.styleWaistOut.y+t.styleWaistOut.dy(t.seatOut)/2,t.slantBottom=k.shiftAlong(s.get("slantLength")),t.slantOut=t.styleWaistIn.shiftOutwards(t.styleWaistOut,s.get("slantWidth"));let v=t.styleWaistOut.dist(t.waistPocketCenter)/3;t.cbCp=t.styleWaistIn.shiftTowards(t.crossSeamCurveStart,v).rotate(90,t.styleWaistIn),t.backDartLeftCp=t.backDartLeft.shiftTowards(t.pocketCenter,v).rotate(-90,t.backDartLeft),t.backDartRightCp=t.backDartRight.shiftTowards(t.pocketCenter,v).rotate(90,t.backDartRight),s.set("waistbandBack",(new a).move(t.styleWaistIn).curve(t.cbCp,t.backDartLeftCp,t.backDartLeft).length()+(new a).move(t.backDartRight).curve_(t.backDartRightCp,t.slantOut).length()),s.set("legWidthBack",t.floorIn.dist(t.floorOut)),t.slantCurveStart=t.slantBottom.shiftFractionTowards(t.slantOut,i.frontPocketSlantRound),t.slantCurveEnd=k.shiftAlong(t.slantBottom.dist(t.slantCurveStart)+s.get("slantLength")),t.slantCurveCp1=t.slantBottom.shiftFractionTowards(t.slantCurveStart,i.frontPocketSlantBend),t.slantCurveCp2=k.shiftAlong(t.slantBottom.dist(t.slantCurveCp1)+s.get("slantLength")),o.saBase=(()=>{let e=t.styleWaistIn||t.waistIn;return u()._curve(t.backDartRightCp,t.backDartRight).noop("dart").line(t.backDartLeft).curve(t.backDartLeftCp,t.cbCp,e).line(t.crossSeamCurveStart).curve(t.crossSeamCurveCp1,t.crossSeamCurveCp2,t.fork).curve(t.forkCp2,t.kneeInCp1,t.kneeIn).line(t.floorIn)})(),o.seam=o.saBase.insop("dart",(new a).line(t.pocketCenter)).close().attr("class","fabric"),o.saBase.hide(),p&&(o.sa=o.saBase.offset(p).join((new a).move(t.floorIn).line(t.floorOut).offset(6*p)).close().addClass("fabric sa")),n&&(o.pocketLine=(new a).move(t.pocketLeft).line(t.pocketRight).attr("class","fabric dashed"));const y=C.length(),T=s.get("frontInseamLength"),x=T-y;let B="Charlie back inseam is longer than front";x>0&&(B="Charlie front inseam is longer than back"),Math.abs(x)>1&&(d.warn(B+" by "+m.round(Math.abs(x))+" mm"),d.debug("Charlie frontInseam: "+m.round(T).toString()),d.debug("Charlie backInseam: "+m.round(y).toString()));const S=u().length(),L=s.get("frontOutseamLength"),P=L-S;let R="Charlie back outseam is longer than front";P>0&&(R="Charlie front outseam is longer than back"),Math.abs(P)>1&&(d.warn(R+" by "+m.round(Math.abs(P))+" mm"),d.debug("Charlie frontOutseam: "+m.round(L).toString()),d.debug("Charlie backOutseam: "+m.round(S).toString())),s.cutlist.setCut({cut:2,from:"fabric"}),t.titleAnchor=new e(t.knee.x,t.fork.y),r("title",{at:t.titleAnchor,nr:1,title:"back"}),l.logo=new c("logo",t.titleAnchor.shiftFractionTowards(t.knee,.5)),t.slantBottomNotch=(new a).move(t.slantCurveStart).curve(t.slantCurveCp1,t.slantCurveCp2,t.slantCurveEnd).intersectsY(t.slantBottom.y).pop(),t.slantTopNotch=t.slantOut.shiftTowards(t.slantCurveStart,s.get("slantTopNotchDistance")),r("sprinkle",{snippet:"bnotch",on:["grainlineBottom","slantBottomNotch","slantTopNotch"]}),r("bartack",{anchor:t.slantTopNotch,angle:t.slantTopNotch.angle(t.slantBottomNotch)-90,length:p?p/2:5,suffix:"slantTop"}),r("bartack",{anchor:t.slantBottomNotch,length:p?p/2:5,angle:180,suffix:"slantBottom"}),d.info(`Inseam height: ${h(t.fork.dy(t.floorIn))} | Waist: ${h(2*(s.get("waistbandBack")+s.get("waistbandFront")))} | Bottom leg width: ${h((s.get("legWidthBack")+s.get("legWidthFront"))/2)}`),r("rmad"),delete o.hint,r("hd",{id:"wHemLeftToPleat",from:t.floorIn,to:t.grainlineBottom,y:t.floorIn.y-15}),r("hd",{id:"wHemRightToPleat",from:t.grainlineBottom,to:t.floorOut,y:t.floorIn.y-15}),r("hd",{id:"wHem",from:t.floorIn,to:t.floorOut,y:t.floorIn.y-30});let F=t.floorIn.y+6*p;
1r("hd",{id:"wForkToPleat",from:t.fork,to:t.grainlineBottom,y:F+15}),r("hd",{id:"wPleatToStartPocketSlant",from:t.grainlineBottom,to:t.slantBottomNotch,y:F+15}),r("hd",{id:"wPleatToWaistSide",from:t.grainlineBottom,to:t.slantOut,y:F+30}),F=t.styleWaistIn.y-p,r("hd",{id:"wCbWaistToPleat",from:t.styleWaistIn,to:t.grainlineTop,y:F-15}),r("hd",{id:"wForkToPleat",from:t.fork,to:t.grainlineTop,y:F-30}),r("hd",{id:"wPleatToDartMid",from:t.grainlineTop,to:t.waistPocketCenter,y:F-15}),r("hd",{id:"wPleatToWaistSide",from:t.grainlineTop,to:t.slantOut,y:F-30}),r("ld",{id:"lWelt",from:t.pocketLeft,to:t.pocketRight,d:-15}),r("ld",{id:"lDart",from:t.backDartLeft,to:t.backDartRight,d:15}),r("ld",{id:"lWaistToWeltPocket",from:t.pocketCenter,to:t.waistPocketCenter,d:25});let E=t.fork.x-p;return r("vd",{id:"hForkToDartTip",from:t.fork,to:t.pocketCenter,x:E-15}),r("vd",{id:"hForkToDartMid",from:t.fork,to:t.waistPocketCenter,x:E-30}),r("vd",{id:"hForkToCbWaist",from:t.fork,to:t.styleWaistIn,x:E-45}),E=t.slantOut.x+p,r("vd",{id:"hHemToPocketSlantStart",from:t.floorOut,to:t.slantBottomNotch,x:E+15}),r("vd",{id:"wHemToSideWaist",from:t.floorOut,to:t.slantOut,x:E+30}),f}};const Do={name:"charlie.waistband",after:[Fo,Eo,Oo,Ao],options:{waistbandCurve:{pct:0,min:0,max:35,menu:"fit"}},draft:function({points:t,Point:e,paths:o,Path:a,units:i,options:n,complete:s,store:r,macro:l,expand:c,snippets:p,Snippet:d,sa:h,absoluteOptions:m,part:f}){if(r.set("waistbandWidth",m.waistbandWidth),n.waistbandCurve>0)return f;if(!c){const t=h?2*h:0;return r.flag.note({msg:"charlie:cutWaistband",notes:[h?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{width:i(2*m.waistbandWidth+1.5*t),length:i(2*r.get("waistbandBack")+2*r.get("waistbandFront")+r.get("waistbandFly")+t)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),r.flag.preset("expandIsOff"),f.hide()}r.flag.preset("expandIsOn"),t.topLeft=new e(0,0),t.top=new e(r.get("waistbandWidth"),0),t.topRight=new e(2*t.top.x,0),t.bottomLeft=new e(0,2*r.get("waistbandBack")+2*r.get("waistbandFront")+r.get("waistbandFly")),t.bottom=new e(t.top.x,t.bottomLeft.y),t.bottomRight=new e(t.topRight.x,t.bottomLeft.y),t.cfRight=t.topRight.shift(-90,r.get("waistbandFly")),t.cfLeft=new e(0,t.cfRight.y),t.rsRight=t.cfRight.shift(-90,r.get("waistbandFront")),t.rsLeft=new e(0,t.rsRight.y),t.cbRight=t.rsRight.shift(-90,r.get("waistbandBack")),t.cbLeft=new e(0,t.cbRight.y),t.lsRight=t.cbRight.shift(-90,r.get("waistbandBack")),t.lsLeft=new e(0,t.lsRight.y),o.saBase=(new a).move(t.topLeft).line(t.topRight).line(t.bottomRight).line(t.bottomLeft).hide(),o.seam=o.saBase.clone().close().attr("class","fabric").unhide(),h&&(o.sa=o.saBase.offset(-1*h).join((new a).move(t.bottomLeft).line(t.topLeft).offset(-2*h)).close().addClass("fabric sa")),s&&(o.cf=(new a).move(t.cfLeft).line(t.cfRight).attr("class","dashed").attr("data-text","centerFront").attr("data-text-class","center"),o.cf2=(new a).move(t.bottomLeft).line(t.bottomRight).attr("class","hidden").attr("data-text","centerFront").attr("data-text-class","center"),o.cb=(new a).move(t.cbLeft).line(t.cbRight).attr("class","dashed").attr("data-text","centerBack").attr("data-text-class","center"),o.rs=(new a).move(t.rsLeft).line(t.rsRight).attr("class","dashed").attr("data-text","rightSide").attr("data-text-class","center"),o.ls=(new a).move(t.lsLeft).line(t.lsRight).attr("class","dashed").attr("data-text","leftSide").attr("data-text-class","center"),o.fold=(new a).move(t.top).line(t.bottom).attr("class","fabric help")),r.cutlist.setCut({cut:1,from:"fabric"}),l("sprinkle",{snippet:"notch",on:["cfRight","cfLeft","rsRight","rsLeft","cbRight","cbLeft","lsRight","lsLeft"]}),t.titleAnchor=t.top.shiftFractionTowards(t.bottom,.4),l("title",{at:t.titleAnchor,nr:11,title:"waistband",rotation:90}),t.logoAnchor=t.top.shiftFractionTowards(t.bottom,.6),p.logo=new d("logo",t.logoAnchor),l("grainline",{from:t.rsLeft.shift(90,30),to:t.rsRight.shift(90,30)}),t.button=new e(.7*t.topRight.x,.6*t.cfRight.y);let u=t.top.x/14;return p.button=new d("button",t.button).attr("data-scale",u),t.buttonhole=new e(t.button.x,t.bottom.y-.4*t.cfRight.y),p.buttonhole=new d("button
1hole-start",t.buttonhole).attr("data-scale",u),l("hd",{id:"wFull",from:t.bottomLeft,to:t.bottomRight,y:t.bottomLeft.y+h+15}),l("vd",{id:"hFull",from:t.bottomRight,to:t.topRight,x:t.bottomRight.x+h+15}),f}};const No={name:"charlie.waistbandCurved",after:[Fo,Eo,Ao,Oo],draft:function({points:t,Point:e,paths:o,Path:a,options:i,absoluteOptions:n,complete:s,store:r,macro:l,snippets:c,Snippet:p,sa:d,part:h}){if(0==i.waistbandCurve)return h;r.set("waistbandWidth",n.waistbandWidth);const m=2*(r.get("waistbandBack")+r.get("waistbandFront")),f=.5*r.get("waistbandFront")/(r.get("waistbandBack")+r.get("waistbandFront")),u=m/(2*Math.PI*i.waistbandCurve),g=360*i.waistbandCurve;t.center=new e(0,0),t.cfLeftBottom=t.center.shift(0,u),t.cbBottom=t.cfLeftBottom.rotate(.5*g,t.center),t.cfRightBottom=t.cfLeftBottom.rotate(g,t.center),t.cfLeftTop=t.cfLeftBottom.shiftTowards(t.center,r.get("waistbandWidth")),t.cbTop=t.cfLeftTop.rotate(.5*g,t.center),t.cfRightTop=t.cfRightBottom.shiftTowards(t.center,r.get("waistbandWidth"));const b=4/3*Math.tan(2*Math.PI*i.waistbandCurve/4);t.cfLeftBottomCp=t.cfLeftBottom.shift(90,b*u),t.cfRightBottomCp=t.cfRightBottom.shift(g-90,b*u),t.cfLeftTopCp=t.cfLeftTop.shift(90,b*(u-r.get("waistbandWidth"))),t.cfRightTopCp=t.cfRightTop.shift(g-90,b*(u-r.get("waistbandWidth"))),t.edgeRightTop=t.cfRightTop.shiftTowards(t.cfRightTopCp,-r.get("waistbandFly")),t.edgeRightBottom=t.cfRightBottom.shiftTowards(t.cfRightBottomCp,-r.get("waistbandFly")),o.waistbandTop=(new a).move(t.cfRightTop).curve(t.cfRightTopCp,t.cfLeftTopCp,t.cfLeftTop).hide(),o.waistbandBottom=(new a).move(t.cfRightBottom).curve(t.cfRightBottomCp,t.cfLeftBottomCp,t.cfLeftBottom),t.ssRightBottom=o.waistbandBottom.shiftFractionAlong(f),t.ssLeftBottom=o.waistbandBottom.shiftFractionAlong(1-f),t.ssRightTop=o.waistbandTop.shiftFractionAlong(f),t.ssLeftTop=o.waistbandTop.shiftFractionAlong(1-f),o.saBase=(new a).move(t.cfLeftBottom).curve(t.cfLeftBottomCp,t.cfRightBottomCp,t.cfRightBottom).line(t.edgeRightBottom).line(t.edgeRightTop).line(t.cfRightTop).curve(t.cfRightTopCp,t.cfLeftTopCp,t.cfLeftTop).line(t.cfLeftBottom).close().hide(),o.seam=o.saBase.clone().attr("class","fabric").unhide(),d&&(o.sa=o.saBase.offset(d).close().attr("class","fabric sa")),s&&(o.cf=(new a).move(t.cfRightTop).line(t.cfRightBottom).attr("class","dashed").attr("data-text","centerFront").attr("data-text-class","center"),o.rs=(new a).move(t.ssRightTop).line(t.ssRightBottom).attr("class","dashed").attr("data-text","rightSide").attr("data-text-class","center"),o.ls=(new a).move(t.ssLeftTop).line(t.ssLeftBottom).attr("class","dashed").attr("data-text","leftSide").attr("data-text-class","center")),r.cutlist.setCut({cut:1,from:"fabric"}),l("sprinkle",{snippet:"notch",on:["cfRightBottom","cfRightTop","cbBottom","cbTop","ssLeftBottom","ssRightBottom","ssLeftTop","ssRightTop"]}),t.titleAnchor=t.cfLeftTop.shiftFractionTowards(t.ssLeftBottom,.5),l("title",{at:t.titleAnchor,nr:11,title:"waistband",rotation:90}),l("grainline",{from:t.cbTop,to:t.cbBottom});let w=r.get("waistbandWidth")/14;return t.button=t.edgeRightBottom.shiftFractionTowards(t.cfRightTop,.6),c.button=new p("button",t.button).attr("data-scale",w),t.buttonhole=new e(t.cfLeftTop.x+.4*r.get("waistbandWidth"),t.cfLeftTop.y-.4*r.get("waistbandFly")),c.buttonhole=new p("buttonhole-start",t.buttonhole).attr("data-scale",w),l("hd",{id:"wFull",from:t.edgeRightBottom,to:t.cfLeftBottom,y:t.edgeRightBottom.y-d-30}),l("vd",{id:"hFull",from:t.edgeRightBottom,to:t.cfLeftBottom,x:t.cfLeftBottom.x+d+30}),l("hd",{id:"wTopToSegment1",from:t.edgeRightBottom,to:t.ssRightBottom,y:t.edgeRightBottom.y-d-15}),l("vd",{id:"hTopToSegment1",from:t.edgeRightBottom,to:t.ssRightBottom,x:t.ssRightBottom.x+d+15}),l("hd",{id:"wSegment1To2",from:t.ssRightBottom,to:t.cbBottom,y:t.ssRightBottom.y-d-15}),l("vd",{id:"hSegment1To2",from:t.ssRightBottom,to:t.cbBottom,x:t.cbBottom.x+d+15}),l("hd",{id:"wSegment2To3",from:t.cbBottom,to:t.ssLeftBottom,y:t.cbBottom.y-d-15}),l("vd",{id:"hSegment2To3",from:t.cbBottom,to:t.ssLeftBottom,x:t.ssLeftBottom.x+d+15}),l("hd",{id:"wToFinalSegment",from:t.ssLeftBottom,to:t.cfLeftBottom,y:t.ssLeftBottom.y-d-15}),l("vd",{id:"hToFinalSegment",from:t.ssLeftBottom,to:t.cfLeftBottom,x:t.cfLeftBottom.x+d+15}),l("hd",{id:"wWaistband",from:t.cfLeftTop,to:t.cfLeftBottom,y:t.cfLeftTop.y+d+15}),l("hd",{id:"horWidthWaistband",from:t.edgeRightBottom,to:t.edgeRightTop,y:t.edgeRightBottom.y-d-15}),l("vd",{id:"verWidthWaistband",from:t.edgeRightBottom,to:t.edgeRightTop,x:t.edgeRightTop.x-d-15}),l("hd",{id:"wInnerCurve",from:t.edgeRightTop,to:t.cfLeftTop,y:t.edgeRightTop.y+d+30}),l("vd",{id:"hInnerCurve",from:t.edgeRightTop,to:t.cfLeftTop,x:t.edgeRightTop.x-d-30}),l("hd",{id:"wInnerTopToSegment1",from:t.edgeRightTop,to:t.ssRightTop,y:t.edgeRightTop.y+d+15}),l("vd",{id:"hInnerTopToSegment1",from:t.edgeRightTop,to:t.ssRightTop,x:t.edgeRightTop.x-d-15}),l("hd",{id:"wInnerSegment1To2",from:t.ssRightTop,to:t.cbTop,y:t.ssRightTop.y+d+15}),l("vd",{id:"hInnerSegment1To2",from:t.ssRightTop,to:t.cbTop,x:t.ssRightBottom.x-d-15}),l("hd",{id:"wInnerSegment2To3",from:t.cbTop,to:t.ssLeftTop,y:t.cbTop.y+d+15}),l("vd",{id:"hInnerSegment3To4",from:t.cbTop,to:t.ssLeftTop,x:t.cbTop.x-d-15}),l("hd",{id:"wInnerSegment4To5",from:t.ssLeftTop,to:t.cfLeftTop,y:t.ssLeftTop.y+d+15}),l("vd",{id:"hInnerSegment4To5",from:t.ssLeftTop,to:t.cfLeftTop,x:t.ssLeftTop.x-d-15}),h}};const Io={name:"charlie.frontPocketBag",from:Ao,draft:function({points:t,paths:e,Path:o,store:a,macro:i,snippets:n,Snippet:s,sa:r,part:l}){for(let c in e)delete e[c];
1for(let c in n)delete n[c];return t.anchor=t.pocketbagTopRight.clone(),e.saBase=(new o).move(t.pocketbagTopRight).line(t.pocketFacingTop).line(t.pocketFacingBottom).join((new o).move(t.slantCurveStart).curve(t.slantCurveCp1,t.slantCurveCp2,t.slantCurveEnd).curve(t.pocketbagBottomCp1,t.pocketbagBottomCp2,t.pocketbagBottom).line(t.pocketbagBottomRight).split(t.pocketFacingBottom).pop()),e.seam=e.saBase.clone().line(t.pocketbagTopRight).close().setClass("lining"),r&&(e.sa=(new o).move(t.pocketbagTopRight).join(e.saBase.offset(r)).line(t.pocketbagBottomRight).attr("class","lining sa")),a.cutlist.setCut({cut:2,from:"lining"}),t.titleAnchor=t.pocketbagTopRight.shiftFractionTowards(t.pocketbagBottomCp2,.5),i("title",{at:t.titleAnchor,nr:7,title:"frontPocketBag",align:"center",scale:.7}),i("cutonfold",{from:t.pocketbagBottomRight,to:t.pocketbagTopRight,grainline:!0}),n.notch=new s("notch",t.facingDirection),i("ld",{id:"hFull",from:t.pocketbagBottomRight,to:t.topPleat,d:-15}),i("hd",{id:"wFull",from:t.pocketFacingBottom,to:t.pocketbagBottomRight,y:t.pocketbagBottomRight.y+r+15}),l}};const Mo={name:"charlie.frontPocketFacing",from:Io,draft:function({points:t,Point:e,paths:o,Path:a,store:i,macro:n,snippets:s,sa:r,part:l}){for(let c in o)delete o[c];for(let c in s)delete s[c];return t.anchor=t.pocketFacingTop.clone(),o.seam=(new a).move(t.pocketFacingTop).line(t.slantTop).line(t.slantCurveStart).join((new a).move(t.slantCurveStart).curve(t.slantCurveCp1,t.slantCurveCp2,t.slantCurveEnd).curve(t.pocketbagBottomCp1,t.pocketbagBottomCp2,t.pocketbagBottom).split(t.pocketFacingBottom).shift()).line(t.pocketFacingTop).close().setClass("fabric"),r&&(o.sa=o.seam.offset(r).attr("class","fabric sa",!0)),i.cutlist.setCut({cut:4,from:"fabric"}),t.titleAnchor=t.slantBottomNotch.shift(0,10),n("title",{at:t.titleAnchor,nr:8,title:"frontPocketFacing"}),n("grainline",{from:t.slantTop,to:new e(t.slantTop.x,t.facingDirection.y)}),n("sprinkle",{snippet:"notch",on:["facingDirection","slantTopNotch","slantBottomNotch"]}),l}};const _o={name:"charlie.backPocketBag",after:Oo,draft:function({points:t,Point:e,paths:o,Path:a,complete:i,store:n,macro:s,snippets:r,Snippet:l,sa:c,part:p}){return t.leftNotch=new e(n.get("backPocketWidth")/-2,0),t.rightNotch=t.leftNotch.flipX(),t.waistbandLeft=new e(t.leftNotch.x,-1*n.get("backPocketToWaistband")),t.waistbandRight=t.waistbandLeft.flipX(),t.curveStartLeft=new e(1.2*t.leftNotch.x,t.leftNotch.y),t.curveStartRight=t.curveStartLeft.flipX(),t.cpLeft=t.curveStartLeft.shift(90,n.get("backPocketToWaistband")/2),t.cpRight=t.cpLeft.flipX(),t.foldLeft=new e(t.curveStartLeft.x,t.leftNotch.y+n.get("backPocketDepth")),t.foldRight=t.foldLeft.flipX(),t.bottomLeft=new e(t.curveStartLeft.x,t.foldLeft.y+n.get("backPocketDepth")),t.bottomRight=t.bottomLeft.flipX(),t.anchor=t.waistbandLeft.shiftFractionTowards(t.waistbandRight,.5),o.seam=(new a).move(t.waistbandRight).line(t.waistbandLeft)._curve(t.cpLeft,t.curveStartLeft).line(t.bottomLeft).line(t.bottomRight).line(t.curveStartRight).curve_(t.cpRight,t.waistbandRight).close().addClass("lining"),c&&(o.sa=o.seam.offset(c).attr("class","lining sa")),i&&(o.opening=(new a).move(t.leftNotch).line(t.rightNotch).addClass("note dashed"),o.fold=(new a).move(t.foldLeft).line(t.foldRight).addClass("lining help")),n.cutlist.setCut({cut:2,from:"lining"}),t.titleAnchor=t.rightNotch.shiftFractionTowards(t.foldLeft,.5),s("title",{at:t.titleAnchor,nr:5,title:"backPocketBag"}),t.logoAnchor=t.foldLeft.shiftFractionTowards(t.bottomRight,.5),r.logo=new l("logo",t.logoAnchor),t.grainlineTop=t.waistbandLeft.shiftFractionTowards(t.waistbandRight,.15),t.grainlineBottom=new e(t.grainlineTop.x,t.bottomLeft.y),s("grainline",{from:t.grainlineTop,to:t.grainlineBottom}),s("hd",{id:"wFull",from:t.bottomLeft,to:t.bottomRight,y:t.bottomLeft.y+15}),s("vd",{id:"hToFold",from:t.bottomRight,to:t.foldRight,x:t.foldRight.x+15}),s("vd",{id:"hToOpenning",from:t.bottomRight,to:t.rightNotch,x:t.foldRight.x+30}),s("vd",{id:"hFull",from:t.bottomRight,to:t.waistbandRight,x:t.foldRight.x+45}),s("hd",{id:"wtop",from:t.waistbandLeft,to:t.waistbandRight,y:t.waistbandLeft.y-c-15}),p}};const jo={name:"charlie.backPocketFacing",from:_o,draft:function({points:t,Point:e,paths:o,Path:a,complete:i,store:n,macro:s,snippets:r,sa:l,part:c}){return delete o.fold,delete r.logo,t.bottomLeft=t.curveStartLeft.shift(-90,t.rightNotch.x/1.75),t.bottomRight=t.bottomLeft.flipX(),o.saBase=(new a).move(t.bottomRight).line(t.curveStartRight).curve_(t.cpRight,t.waistbandRight).line(t.waistbandLeft)._curve(t.cpLeft,t.curveStartLeft).line(t.bottomLeft).hide(),o.seam=o.saBase.clone().close().unhide().attr("class","fabric"),i&&(o.opening=(new a).move(t.leftNotch).line(t.rightNotch).attr("class","dashed")),l&&(o.sa=o.seam.offset(l).attr("class","fabric sa")),n.cutlist.setCut({cut:2,from:"fabric"}),t.titleAnchor=t.rightNotch.shiftFractionTowards(t.leftNotch,.5),s("title",{at:t.titleAnchor,nr:6,title:"backPocketBagFacing"}),t.grainlineTop=t.waistbandLeft.shiftFractionTowards(t.waistbandRight,.15),t.grainlineBottom=new e(t.grainlineTop.x,t.bottomLeft.y),s("grainline",{from:t.grainlineTop,to:t.grainlineBottom}),s("rmad"),s("hd",{id:"wFull",from:t.bottomLeft,to:t.bottomRight,y:t.bottomLeft.y+1
15}),s("hd",{id:"wTop",from:t.waistbandLeft,to:t.waistbandRight,y:t.waistbandLeft.y-l-15}),s("vd",{id:"hToOpening",from:t.bottomRight,to:t.rightNotch,x:t.bottomRight.x+l+15}),s("vd",{id:"hFull",from:t.bottomRight,to:t.waistbandRight,x:t.bottomRight.x+l+30}),c}};const Go={name:"charlie.backPocketInterfacing",from:_o,draft:function({points:t,Point:e,paths:o,Path:a,complete:i,macro:n,store:s,units:r,snippets:l,expand:c,part:p}){const d=s.get("backPocketWidth"),h=d/3;if(!c)return s.flag.note({msg:"charlie:cutBackPocketInterfacing",notes:["flag:saUnused","flag:partHiddenByExpand"],replace:{width:r(d),length:r(h)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),s.flag.preset("expandIsOff"),p.hide();s.flag.preset("expandIsOn");for(let m in o)delete o[m];return delete l.logo,t.bottomLeft=t.curveStartLeft.shift(-90,t.rightNotch.x/1.75),t.bottomRight=t.bottomLeft.flipX(),t.midLeft=t.bottomLeft.shift(90,h),t.midRight=t.bottomRight.shift(90,h),t.topLeft=t.bottomLeft.shift(90,2*h),t.topRight=t.bottomRight.shift(90,2*h),t.leftNotch=new e(t.leftNotch.x,t.midRight.y),t.rightNotch=t.leftNotch.flipX(),i&&(o.fold=(new a).move(t.leftNotch).line(t.rightNotch).attr("class","interfacing dashed")),t.anchor=t.topLeft.shiftFractionTowards(t.topRight,.5),o.seam=(new a).move(t.topLeft).line(t.bottomLeft).line(t.bottomRight).line(t.topRight).line(t.topLeft).close().addClass("interfacing"),s.cutlist.setCut({cut:2,from:"interfacing"}),t.titleAnchor=t.rightNotch.shiftFractionTowards(t.leftNotch,.5),n("title",{at:t.titleAnchor,nr:3,title:"backPocketInterfacing",align:"center",scale:.7}),n("hd",{id:"width",from:t.bottomLeft,to:t.bottomRight,y:t.bottomLeft.y+15}),n("vd",{id:"height",from:t.bottomRight,to:t.topRight,x:t.topRight.x+15}),p}};const Uo={name:"charlie.backPocketWelt",from:jo,draft:function({points:t,Point:e,paths:o,Path:a,complete:i,macro:n,snippets:s,store:r,part:l}){for(let p in o)delete o[p];delete s.logo;const c=t.bottomRight.x/5;return t.bottomLeft=t.curveStartLeft.shift(-90,t.rightNotch.x/1.75),t.bottomRight=t.bottomLeft.flipX(),t.midLeft=t.bottomLeft.shift(90,c),t.midRight=t.bottomRight.shift(90,c),t.topLeft=t.bottomLeft.shift(90,2*c),t.topRight=t.bottomRight.shift(90,2*c),t.leftNotch=new e(t.leftNotch.x,t.midRight.y),t.rightNotch=t.leftNotch.flipX(),t.anchor=t.topLeft.shiftFractionTowards(t.topRight,.5),o.seam=(new a).move(t.topLeft).line(t.bottomLeft).line(t.bottomRight).line(t.topRight).line(t.topLeft).close().attr("class","fabric"),i&&(o.fold=(new a).move(t.midLeft).line(t.midRight).attr("class","help")),r.cutlist.setCut({cut:4,from:"fabric"}),t.titleAnchor=t.rightNotch.shiftFractionTowards(t.leftNotch,.5),n("title",{at:t.titleAnchor,nr:4,title:"backPocketWelt",scale:.5}),t.grainlineTop=t.topLeft.shiftFractionTowards(t.topRight,.15),t.grainlineBottom=new e(t.grainlineTop.x,t.bottomLeft.y),n("grainline",{from:t.grainlineTop,to:t.grainlineBottom}),n("hd",{id:"width",from:t.bottomLeft,to:t.bottomRight,y:t.bottomLeft.y+15}),n("vd",{id:"height",from:t.bottomRight,to:t.topRight,x:t.topRight.x+15}),l}};const Yo={name:"charlie.flyFacing",from:Ao,draft:function({points:t,Point:e,paths:o,Path:a,macro:i,snippets:n,store:s,sa:r,part:l}){for(let c in o)delete o[c];for(let c in n)delete n[c];return t.anchor=t.flyTop.clone(),o.saBase=(new a).move(t.fork).curve(t.crotchSeamCurveCp1,t.crotchSeamCurveCp2,t.crotchSeamCurveStart).line(t.styleWaistIn).line(t.flyTop).split(t.flyBottom).pop(),o.seam=o.saBase.clone().line(t.flyCurveStart).curve(t.flyCurveCp2,t.flyCurveCp1,t.flyBottom).close().attr("class","fabric"),r&&(o.sa=o.saBase.offset(r).line(t.flyCurveStart).reverse().line(t.flyBottom).addClass("sa fabric")),s.cutlist.setCut({cut:1,from:"fabric"}),t.grainlineTop=t.flyTop.shiftFractionTowards(t.styleWaistIn,.5),t.grainlineBottom=new e(t.grainlineTop.x,t.flyCurveCp2.y),i("grainline",{from:t.grainlineTop,to:t.grainlineBottom}),t.titleAnchor=t.grainlineTop.shiftFractionTowards(t.grainlineBottom,.5),i("title",{at:t.titleAnchor,nr:9,title:"flyFacing",align:"center",scale:.5}),l}};const $o={name:"charlie.flyExtension",from:Yo,draft:function({points:t,paths:e,Path:o,macro:a,store:i,sa:n,part:s}){for(let l in e)delete e[l];const r=-1*t.flyTop.angle(t.flyCorner)+270;for(let l in t)"flyTop"!==l&&(t[l]=t[l].rotate(r,t.flyTop));return t.anchor=t.flyTop.clone(),e.saBase=(new o).move(t.flyCorner).line(t.flyExtensionBottom).join((new o).move(t.fork).curve(t.crotchSeamCurveCp1,t.crotchSeamCurveCp2,t.crotchSeamCurveStart).split(t.flyExtensionBottom).pop()).line(t.styleWaistIn).line(t.flyTop).hide(),e.seam=e.saBase.clone().line(t.flyCorner).close().unhide().attr("class","fabric"),n&&(e.sa=e.saBase.offset(n).line(t.flyTop).reverse().line(t.flyCorner).addClass("fabric sa")),i.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),a("cutonfold",{from:t.flyTop,to:t.flyCorner,grainline:!0}),t.titleAnchor=t.flyCurveStart,a("title",{at:t.titleAnchor,nr:10,title:"flyExtension"}),s}};const zo={name:"charlie.beltLoops",after:Do,options:{beltLoops:{count:8,min:6,max:12,menu:"advanced"}},draft:function({store:t,points:e,Point:o,paths:a,Path:i,options:n,exp
1and:s,units:r,complete:l,macro:c,part:p}){const d=n.beltLoops,h=2.5*t.get("waistbandWidth")*d,m=t.get("waistbandWidth")/4;if(!s)return t.flag.note({msg:"charlie:cutBeltloops",notes:["flag:saUnused","flag:partHiddenByExpand"],replace:{count:d,width:r(4*m),length:r(h/d)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),t.flag.preset("expandIsOff"),p.hide();t.flag.preset("expandIsOn"),e.topLeft=new o(0,0),e.topRight=new o(2.8*m,0),e.bottomLeft=new o(0,h),e.bottomRight=new o(2.8*m,h),e.topFold1=new o(.8*m,0),e.topFold2=new o(1.8*m,0),e.bottomFold1=new o(.8*m,h),e.bottomFold2=new o(1.8*m,h);for(let f=1;f<d;f++)e[`cut${f}a`]=e.topLeft.shiftFractionTowards(e.bottomLeft,f/d),e[`cut${f}b`]=e.topRight.shiftFractionTowards(e.bottomRight,f/d);if(a.seam=(new i).move(e.topLeft).line(e.bottomLeft).line(e.bottomRight).line(e.topRight).line(e.topLeft).close().addClass("fabric"),l){a.fold=(new i).move(e.topFold1).line(e.bottomFold1).move(e.bottomFold2).line(e.topFold2).attr("class","fabric help");for(let t=1;t<d;t++)a[`cut${t}`]=(new i).move(e[`cut${t}a`]).line(e[`cut${t}b`]).attr("class","fabric dashed")}return t.cutlist.setCut({cut:1,from:"fabric"}),c("title",{at:new o(m/2,h/2),nr:12,title:"beltLoops",rotation:90,scale:.7}),e.grainlineTop=new o(e.topRight.x/2,0),e.grainlineBottom=new o(e.topRight.x/2,h),c("grainline",{from:e.grainlineTop,to:e.grainlineBottom}),c("hd",{id:"wFull",from:e.bottomLeft,to:e.bottomRight,y:e.bottomLeft.y+15}),c("vd",{id:"hFull",from:e.bottomRight,to:e.topRight,x:e.bottomRight.x+15}),p}},Jo=new n.pT({data:So,parts:[Ao,Oo,Do,No,Io,Mo,_o,jo,Go,Uo,Yo,$o,zo]}),Ko=(0,n.D4)([Po,Ho]),Vo=JSON.parse('{"id":"cornelius","name":"Cornelius cycling breeches","code":"Wouter Van Wageningen","description":"A FreeSewing pattern for cycling breeches, based on the Keystone drafting system","design":"Wouter Van Wageningen","difficulty":3,"tags":["bottoms","trousers"],"techniques":["curved-seam","fly","zipper","button","pocket"],"version":"4.6.0","pkg":"@freesewing/cornelius","collection":true}'),Xo={name:"cornelius.frontpoints",hide:{self:!0},measurements:["waist","hips","inseam","seat","waistToKnee","waistToHips","waistToFloor","knee"],options:{pctAtoO:.5,pctAtoC:.25,pctAtoT:.33333,pctUtoA:.25,pctJtoA:.25,pctSeatAdjustment:.5,ventLength:{pct:70,min:25,max:110,toAbs:(t,{options:e,measurements:o},a)=>(void 0===e||void 0===e.bandBelowKnee?.25:e.bandBelowKnee)*o.waistToKnee*t,menu:"style"},fullness:{pct:0,min:0,max:55,menu:"fit"},waistbandBelowWaist:{pct:5,min:0,max:15,...(0,n.Wx)("waistToHips"),menu:"style"},waistReduction:{pct:1,min:-2,max:10,...(0,n.Wx)("waist"),menu:"fit"},bandBelowKnee:{pct:25,min:15,max:50,...(0,n.Wx)("waistToKnee"),menu:"advanced"}},draft:({options:t,measurements:e,Point:o,Path:a,points:i,paths:n,store:s,log:r,part:l})=>{const c=e.waistToKnee/48,p=e.inseam-(e.waistToFloor-e.waistToKnee),d=e.seat*t.pctSeatAdjustment,h=e.waist*t.pctSeatAdjustment-e.waist*t.waistReduction,m=e.waistToHips*t.waistbandBelowWaist,f=e.waistToKnee-m;s.set("waist",h),s.set("seat",d),s.set("halfInch",c),s.set("ventLength",f*t.bandBelowKnee*t.ventLength);let u=0;e.waist>e.seat&&(u=(e.waist-e.seat)/4),i.pO=new o(0,0),i.pB=i.pO.shift(270,f-m),i.pA=i.pB.shift(90,p),i.pC=i.pB.shift(270,f*t.bandBelowKnee),i.pT=i.pA.shift(90,(f-p)*t.pctAtoT),i.pE=i.pA.shift(180,d/4),i.pF=i.pA.shift(180,d/2),i.pD=i.pO.shift(180,d/4),i.pH=i.pC.shift(180,d/4),i.pG=i.pO.shift(180,d/2),i.pW=i.pG.shift(180,u),i.pV=i.pF.shift(0,c),i.pX=i.pF.shift(180,c);let g=(new a).move(i.pG).line(i.pV),b=g.intersectsY(i.pT.y);null!=b&&b.length>0?i.pS=b[0].clone():r.error("Something is not quite right here!"),g=(new a).move(i.pG).line(i.pX),b=g.intersectsY(i.pT.y),null!=b&&b.length>0?i.pZ=b[0].clone():r.error("Could not find an intersection to create the crotch point Z"),i.pP=i.pE.shift(180,d/3),i.pR=i.pP.shift(180,c+c),i.pJ=i.pH.shift(0,e.knee/4),i.pK=i.pH.shift(180,e.knee/4),i.pU=i.pG.shift(0,h/2),i.pAextra=i.pA.shift(0,c*(1+(t.fullness>.3?t.fullness:0)));const w=i.pA.dist(i.pO)*t.pctAtoO,k=i.pA.dist(i.pC)*t.pctAtoC;return i.pAextraCPu=i.pAextra.shift(90,w),i.pAextraCPj=i.pAextra.shift(270,k),i.pUcpA=i.pU.shiftFractionTowards(i.pAextraCPu,t.pctUtoA),i.pJcpA=i.pJ.shiftFractionTowards(i.pAextraCPj,t.pctJtoA).shift(0,i.pJ.dist(i.pH)*t.fullness),n.sideSeam=(new a).move(i.pJ).curve(i.pJcpA,i.pAextraCPj,i.pAextra).curve(i.pAextraCPu,i.pUcpA,i.pU).hide(),n.waistSeam=(new a).move(i.pU).line(i.pD).line(i.pW).hide(),i.pocketWaist=n.waistSeam.shiftAlong(h/2/4.5),i.pocketFacingTL=n.waistSeam.shiftAlong(h/2/4.5+3*c),i.pocketTL=n.waistSeam.shiftAlong(h/2*.75),i.pocketBL=new o(i.pocketTL.x,i.pF.y),i.pocketSide=n.sideSeam.shiftAlong(n.sideSeam.length()-h/2/4.5*3.5),i.pocketFacingBR=n.sideSeam.shiftAlong(n.sideSeam.length()-h/2/4.5*3.5-3*c),l}},Qo={name:"cornelius.front",from:Xo,options:{pctZtoR:.35,pctRtoZin:.75,pctRtoZup:.25,pctRtoKin:.75,pctRtoKdown:.25,pctKtoRout:.15,pctKtoRup:.25,pctKtoH:.7,flyWidth:{pct:.38,min:.2,max:.6,...(0,n.Wx)("waist"),menu:"style"}}
1,draft:({options:t,Path:e,points:o,paths:a,Snippet:i,snippets:n,sa:s,store:r,measurements:l,macro:c,part:p})=>{const d=.551915024494,h=r.get("halfInch"),m=r.get("ventLength"),f=r.get("waist"),u="keystone"==t.cuffStyle,g=t.flyWidth*l.waist;r.set("flyWidth",g),r.set("sideSeam",a.sideSeam.length()),o.pZcpR=o.pZ.shiftFractionTowards(o.pX,t.pctZtoR),o.pRcpZ=o.pR.shiftFractionTowards(o.pF,t.pctRtoZin).shiftFractionTowards(o.pZ,t.pctRtoZup);let b=Math.abs(o.pW.angle(o.pD)-o.pW.angle(o.pZ));b>180&&(b-=180);r.set("flyConst",14),o.flyTop=o.pW.shift(o.pW.angle(o.pZ)-180+b,14*g),o.flyBottom=o.flyTop.shift(o.pW.angle(o.pZ),o.pW.dist(o.pZ)-14*g),o.pZcpFB=o.pZ.shift(o.pW.angle(o.pZ)-b,14*g*d),o.pFBcpZ=o.flyBottom.shift(o.pW.angle(o.pZ),h*g*d),a.fly=(new e).move(o.pW).line(o.flyTop).line(o.flyBottom).curve(o.pFBcpZ,o.pZcpFB,o.pZ).hide(),a.flyFold=(new e).move(o.pW).line(o.pZ).attr("class","fabric dashed").setText("basteHere","text-xs center"),r.set("flyLength",a.flyFold.length()),r.set("frontWaistLength",a.waistSeam.line(o.flyTop).length()),a.crotchSeam=(new e).move(o.pZ).curve(o.pZcpR,o.pRcpZ,o.pR).hide(),o.pRcpK=o.pR.shiftFractionTowards(o.pF,t.pctRtoKin).shiftFractionTowards(o.pK,t.pctRtoKdown),o.pKcpR=o.pK.shiftFractionTowards(o.pH,-1*(t.pctKtoRout+t.fullness)).shiftFractionTowards(o.pR,t.pctKtoRup),a.insideSeam=(new e).move(o.pR).curve(o.pRcpK,o.pKcpR,o.pK).hide(),r.set("insideSeam",a.insideSeam.length());let w=o.pH.shift(270,1.5*h);return o.pKcpH=o.pK.shiftFractionTowards(w,t.pctKtoH),o.pJcpH=o.pJ.shiftFractionTowards(w,t.pctKtoH),a.legSeam=(new e).move(o.pK).curve(o.pKcpH,o.pJcpH,o.pJ).hide(),r.set("frontLegSeam",a.legSeam.length()),u&&(o.pSlitBottom=a.legSeam.shiftAlong(a.legSeam.length()-4*h),o.pSlitTop=o.pSlitBottom.shift(90,5*h*t.ventLength),r.set("slitDistance",a.legSeam.length()-4*h)),o.pocketWaist=a.waistSeam.shiftAlong(f/2/4.5),o.pocketSide=a.sideSeam.shiftAlong(a.sideSeam.length()-f/2/4.5*3.5),a.pocketSeam=(new e).move(o.pocketSide).line(o.pocketWaist).hide(),a.waistSeam=a.waistSeam.split(o.pocketWaist)[1],a.sideSeam=a.sideSeam.split(o.pocketSide)[0],a.seam=a.waistSeam.join(a.fly).join(a.crotchSeam).join(a.insideSeam).join(a.legSeam).join(a.sideSeam).join(a.pocketSeam).close().attr("class","fabric"),o.topOfVent=a.sideSeam.shiftAlong(m),n.n1=new i("notch",o.pK),n.n2=new i("notch",o.pJ),n.n3=new i("notch",o.pocketWaist),n.n4=new i("notch",o.pocketSide),n.n5=new i("notch",o.pZ),u?(a.slit=(new e).move(o.pSlitBottom).line(o.pSlitTop).attr("class","fabric").attr("data-text","vent").attr("data-text-class","text-xs center"),n.n6=new i("notch",o.pSlitBottom)):(w=a.sideSeam.shiftAlong(m),a.vent=a.sideSeam.split(w)[0].attr("data-text","vent").attr("data-text-class","text-xs center")),n.n5=new i("notch",o.topOfVent),o.gridAnchor=o.pO.clone(),r.cutlist.addCut({cut:2,from:"fabric"}),o.logo=o.pE.clone(),n.logo=new i("logo",o.logo),o.title=o.logo.shift(270,80),c("title",{nr:5,at:o.title,title:"Front",align:"center"}),o.scaleboxAnchor=o.pD.shift(270,60),c("scalebox",{at:o.scaleboxAnchor}),c("grainline",{from:o.pocketBL.shiftFractionTowards(o.pocketTL,-.9),to:o.pocketTL}),s&&(a.sa=a.seam.offset(s).attr("class","fabric sa")),c("ld",{id:1,from:o.topOfVent,to:o.pJ,d:s+15}),c("hd",{id:2,from:o.pocketWaist,to:o.pocketSide,y:o.pocketWaist.y-s-15}),c("hd",{id:3,from:o.pW,to:o.pocketWaist,y:o.pocketWaist.y-s-15}),c("hd",{id:4,from:o.flyTop,to:o.pW,y:o.pocketWaist.y-s-15}),c("hd",{id:5,from:o.pR,to:o.pAextra}),c("hd",{id:6,from:o.pK,to:o.pJ,y:o.pJ.y-15}),u&&(c("hd",{id:7,from:o.pSlitBottom,to:o.pJ,y:o.pJ.y-30}),c("vd",{id:8,from:o.pSlitBottom,to:o.pSlitTop,x:o.pSlitTop.x-15})),c("vd",{id:9,from:o.pocketSide,to:o.pocketWaist,x:o.pocketSide.x}),c("vd",{id:10,from:o.pR,to:o.pW,x:o.pR.x-s-15}),c("vd",{id:11,from:o.pK,to:o.pR,x:o.pR.x-s-15}),c("vd",{id:12,from:o.pZ,to:o.pW,x:o.pW.x+15}),c("vd",{id:13,from:o.pJ,to:o.pocketWaist,x:o.pocketWaist.x}),p}};const qo={name:"cornelius.back",from:Xo,after:Qo,draft:({options:t,Path:e,points:o,paths:a,Snippet:i,snippets:n,sa:s,store:r,macro:l,part:c})=>{let p=null;const d=r.get("waist"),h=r.get("seat"),m=r.get("halfInch"),f=r.get("ventLength"),u="traditional"==t.cuffStyle;o.p2=o.pD.shift(90,h/12+m),o.p10=o.pK.shiftTowards(o.pH,-m),function(t,e,o,a){const{options:i,Path:n,points:s,paths:r,store:l,log:c}=t.shorthand(),p=l.get("insideSeam"),d=e.dist(a);let h,m,f,u=Math.atan(o/d)*(180/Math.PI),g=o/d*-3,b=0,w=0;do{s.p3=e.rotate(u,a),s.p3cp10=s.p3.shiftFractionTowards(s.pF,i.pctRtoKin/2).shiftFractionTowards(s.p10,i.pctRtoKdown),s.p10cp3=s.p10.shiftFractionTowards(s.pH,-1*(i.pctKtoRout+i.fullness)).shiftFractionTowards(s.p3,i.pctKtoRup),r.insideSeam=(new n).move(s.p3).curve(s.p3cp10,s.p10cp3,s.p10),f=r.insideSeam.length(),h=e.dist(s.p3),m=o-h,b=f-p,b>.1?e=e.shiftTowards(a,-.9*b):b<-.1?e=e.shiftTowards(a,.8*b):(g*=m>0?g>0?.8:-.8:g>0?-.9:.9,u+=g),w++}while((m>.1||m<-.1||b<-.1||b>.1)&&w<100);w>=100&&c.error('Could not find a point for "3" within 100 iterations')}(c,o.pR.clone(),2*m,o.pK),o.p11=o.pJ.shiftTowards(o.pH,-m),function(t,e,o,a,i){const{options:n,Path:s,points:r,paths:l,store:c,log:p}=t.shorthand();let d,h,m=null;const f=c.get("sideSeam"),u=c.get("halfInch");let g,b,w,k,C,v,y=0;const T=e.dist(a);let x=1,B=Math.atan(Math.abs(o)/T)*(180/Math.PI);o<0&&(B=360-B,o*=-1,x=-1);let S=e.rotate(B,a),L=i.dist(S)/T*-3,P=0;do{S=e.rotate(B,a),r.p4=S.clone(),k=r.pJ.angle(r.p4),C=r.pJ.angle(r.pU),v=C-k,r.p6=r.pJ.shift(r.pJ.angle(r.pT)-v,r.pJ.dist(r.pT)),r.p7=r.pJ.shift(r.pJ.angle(r.pA)-v,r.pJ.dist(r.pA)),r.p6=r.p6.shift(r.pJ.angle(r.pT)-v-90,u*n.fullness*2),r.p7=r.p7.shift(r.pJ.angle(r.pA)-v-90,u*n.fullness*2),d=r.p7.dist(r.p4)*n.pctAtoO,h=r.p7.dist(r.p11)*n.pctAtoC,m=r.p4.angle(r.p11),r.p7cp4=r.p7.shift(m+180+5*n.fullness,d),r.p7cp11=r.p7.shift(m,h),r.p4cp7=r.p4.shiftFractionTowards(r.p7cp4,n.pctUtoA),r.p11cp7=r.p11.shiftFractionTowards(r.p7cp11,n.pctJtoA).shift(0,r.p11.dist(r.pH)*n.fullness),l.sideSeam=(new s).move(r.p11).curve(r.p11cp7,r.p7cp11,r.p7).curve(r.p7cp4,r.p4cp7,r.p4),g=l.sideSeam.length(),w=i.dist(r.p4),y=o-w,b=g-f,b>.1?e=e.shiftTowards(a,.9*b):b<-.1?e=e.shiftTowards(a,.8*b):(L*=y>0?L>0?.8:-.9:L>0?-.9:.9,B+=L*x),P++}while((y>.1||y<-.1||b>.1||b<-.1)&&P<100);P>=100&&p.error('Could not find a point for "4" within 100 iterations')}(c,o.pU,-1*(d/2+m),o.p11,o.p2),o.p2a=o.p2.shiftTowards(o.p4,m),p=o.p6.shiftTowards(o.pT,1e3);const g=(new e).move(o.pF).line(o.p2a),b=(new e).move(o.p6).line(p);o.p5=b.intersects(g)[0],o.p5cp3=o.p5.shiftFractionTowards(o.pF,2*t.pctZtoR),o.p3cp5=o.p3.shiftFractionTowards(o.pF,t.pctRtoZin).shiftFractionTowards(o.p5,t.pctRtoZup/4),o.p2cp5=o.p2.shiftFractionTowards(o.pD,t.pctZtoR),o.p5cp2=o.p5.shiftFractionTowards(o.p2a,t.pctZtoR),a.crotchSeam=(new e).move(o.p2).curve(o.p2cp5,o.p5cp2,o.p5).curve(o.p5cp3,o.p3cp5,o.p3),p=u?o.pH.shift(90,2*m):o.pH.shift(90,1*m),o.p10cpH=o.p10.shiftFractionTowards(p,t.pctKtoH),o.p11cpH=o.p11.shiftFractionTowards(p,t.pctKtoH),a.legSeam=(new e).move(o.p10).curve(o.p10cpH,o.p11cpH,o.p11),r.set("backLegSeam",a.legSeam.length()),a.waistSeam=(new e).move(o.p4).line(o.p2),r.set("backWaistLength",a.waistSeam.length()),a.seam=a.waistSeam.join(a.crotchSeam).join(a.insideSeam).join(a.legSeam).join(a.sideSeam).close().attr("class","fabric"),o.topOfVent=a.sideSeam.shiftAlong(f),n.n1=new i("notch",o.p10),n.n2=ne
1w i("notch",o.p11),n.n3=new i("notch",o.topOfVent),a.vent=a.sideSeam.split(o.topOfVent)[0],a.vent.attr("data-text","Vent").attr("data-text-class","center").attr("class","fabric sa"),o.gridAnchor=o.pO.clone(),o.logo=o.pE.clone(),n.logo=new i("logo",o.logo),o.title=o.logo.shift(270,80),l("title",{nr:6,at:o.title,title:"Back",align:"center"});const w=o.p11.angle(o.p4),k=o.p11.dist(o.p4);return l("grainline",{from:o.pA.shift(w,.35*k),to:o.pA.shift(w+180,.35*k)}),r.cutlist.addCut({cut:2,from:"fabric"}),s&&(a.sa=a.seam.offset(s).attr("class","fabric sa")),p=a.sideSeam.intersectsY(o.p3.y)[0],l("hd",{id:1,from:o.p2,to:o.p4,y:o.p2.y-s-25}),l("hd",{id:2,from:o.p10,to:o.p11,y:o.p10.y+s+15}),l("vd",{id:3,from:o.p3,to:o.p2,x:o.p3.x-s-15}),l("vd",{id:4,from:o.p4,to:o.p2,x:o.p2.x-s-15}),l("vd",{id:5,from:o.p10,to:o.p3,x:o.p3.x-s-15}),l("ld",{id:6,from:o.topOfVent,to:o.p11,d:s+15}),l("ld",{id:7,from:o.p2,to:o.p4,d:s+15}),l("ld",{id:8,from:o.p5,to:p}),l("ld",{id:9,from:o.p3,to:p}),l("ld",{id:10,from:o.p5,to:o.p2,d:+s+20}),l("ld",{id:11,from:o.p4,to:o.p11,d:-15}),l("ld",{id:12,from:p,to:o.p4,d:-s-20}),c}};const Zo={name:"cornelius.legband",after:[qo,Qo],options:{kneeToBelow:{pct:94,min:85,max:110,menu:"advanced"},cuffWidth:{pct:0,min:-50,max:150,toAbs:(t,{options:e,measurements:o},a)=>o.waistToKnee/48*4*(1+t),menu:"style"},cuffStyle:{dflt:"elegant",list:["traditional","elegant","keystone"],menu:"style"}},draft:({options:t,Point:e,Path:o,points:a,paths:i,Snippet:n,snippets:s,sa:r,store:l,macro:c,part:p})=>{if("keystone"==t.cuffStyle)return p;const d=.551915024494,h="traditional"==t.cuffStyle,m=l.get("halfInch"),f=l.get("backLegSeam")*(h?t.kneeToBelow:1),u=l.get("frontLegSeam")*(h?t.kneeToBelow:1),g=4*m*(1+t.cuffWidth),b=3*m/f;if(a.pA=new e(0,0),a.pB=a.pA.shift(270,u),a.pE=a.pB.shift(0,g),a.pF=a.pA.shift(0,g),h){const t=function(t,e,o){let{log:a}=t.shorthand(),i=0,n=.5,s=n*e/(1-Math.cos(n/2))-o;do{n*=s<0?.995+s/1e3:1.003+s/1e3,s=n*e/(1-Math.cos(n/2))-o,i++}while((s<-1||s>1)&&i<50);return i>=500&&a.error("Could not find the radius for the legband within 500 iterations"),n*(180/Math.PI)}(p,m/4*5,f),e=t/(180/Math.PI),o=f/e;a.pC=a.pB.shift(270-t/2,2*o*Math.sin(e/2)),a.pBcpC=a.pB.shift(270,o*d/2),a.pCcpB=a.pC.shift(90-t,o*d/2),a.pD=a.pC.shift(0-t,g),a.pDcpE=a.pD.shift(90-t,(o+g)*d/2),a.pEcpD=a.pE.shift(270,(o+g)*d/2),a.pAout=a.pA.shift(90+t/2*b,2*o*Math.sin(e/2)*b),a.pAcpAout=a.pA.shift(90,o*b*d/2),a.pAoutcpA=a.pAout.shift(270+t*b,o*d/2*b),a.pFout=a.pAout.shift(0+t*b,g),a.pFoutcpF=a.pFout.shift(270+t*b,(o+g)*d/2*b),a.pFcpFout=a.pF.shift(90,(o+g)*d/2*b)}else a.pC=a.pB.shift(270,f),a.pBcpC=a.pB.shift(270,10),a.pCcpB=a.pC.shift(90,10),a.pD=a.pC.shift(0,g),a.pDcpE=a.pD.shift(90,10),a.pEcpD=a.pE.shift(270,10),a.pAout=a.pA.shift(90,f*b),a.pAcpAout=a.pA.shift(90,1),a.pAoutcpA=a.pAout.shift(270,1),a.pFout=a.pAout.shift(0,g),a.pFoutcpF=a.pFout.shift(270,1),a.pFcpFout=a.pF.shift(90,1);return a.pG=a.pAout.shift(a.pAout.angle(a.pFout)+45,Math.sqrt(g/2*2*(g/2))),i.seam=(new o).move(a.pA).line(a.pB).curve(a.pBcpC,a.pCcpB,a.pC).line(a.pD).curve(a.pDcpE,a.pEcpD,a.pE).line(a.pF).curve(a.pFcpFout,a.pFoutcpF,a.pFout).line(a.pG).line(a.pAout).curve(a.pAoutcpA,a.pAcpAout,a.pA).close().attr("class","fabric"),i.mark=(new o).move(a.pA).line(a.pF).attr("class","fabric"),a.buttonHole=a.pAout.shiftFractionTowards(a.pFout,.5),a.button=a.pC.shiftFractionTowards(a.pD,.5).shift(a.pC.angle(a.pD)+90,f*b),s.bh=new n("buttonhole",a.buttonHole),s.b=new n("button",a.button),s.n1=new n("notch",a.pA),s.n2=new n("notch",a.pB),s.n3=new n("notch",a.pC),a.gridAnchor=(h?a.pF:a.pG).clone(),l.cutlist.addCut({cut:4,from:"fabric"}),a.logo=a.pA.shiftFractionTowards(a.pE,.5),s.logo=new n("logo",a.logo).attr("data-scale",.7),a.title=a.logo.shift(270,70),c("title",{nr:7,at:a.title,title:"LegBand",align:"center",rotation:90,scale:.5}),r&&(i.sa=i.seam.offset(r).attr("class","fabric sa")),c("hd",{id:1,from:a.pA,to:a.pF,y:a.pA.y}),h&&c("hd",{id:2,from:a.pC,to:a.pB,y:a.pB.y}),c("ld",{id:3,from:a.pC,to:a.pD,d:-r-15}),c("ld",{id:4,from:a.pA,to:a.pAout,d:+r+15}),c("vd",{id:5,from:a.pB,to:a.pA,x:a.pA.x-r-15}),c("vd",{id:6,from:a.pC,to:a.pB,x:a.pC.x-(h?0:r+15)}),p}},ta={name:"cornelius.legbandKeystone",after:[qo,Qo],draft:({options:t,measurements:e,Point:o,Path:a,points:i,paths:n,Snippet:s,snippets:r,sa:l,store:c,macro:p,part:d})=>{if("keystone"!=t.cuffStyle)return d;let h=c.get("halfInch"),m=c.get("slitDistance");return i.pA=new o(0,0),i.pD=i.pA.shift(270,8*h),i.pO=i.pA.shift(180,1.5*h),i.pB=i.pA.shift(180,m),i.pE=i.pB.shift(270,h),i.pF=i.pE.shift(180,h),i.pC=i.pA.shift(180,e.knee+3*h),i.pG=i.pD.shift(0,h),i.pH=i.pG.shift(180,e.knee+5*h),i.pJ=i.pE.shift(180,h/2).shift(270,i.pA.dist(i.pG)),i.pAcpE=i.pA.shift(i.pA.angle(i.pG)-90,.5*i.pA.dist(i.pE)),i.pEcpA=i.pE.shift(0,.2*i.pE.dist(i.pA)),i.pCcpF=i.pC.shift(i.pC.angle(i.pH)+90,.5*i.pC.dist(i.pF)),i.pFcpC=i.pF.shift(180,.15*i.pF.dist(i.pC)),i.pGcpJ=i.pG.shift(i.pG.angle(i.pA)+90,.5*i.pG.dist(i.pJ)),i.pJcpG=i.pJ.shift(0,.25*i.pJ.dist(i.pG)),i.pHcpJ=i.pH.shift(i.pH.angle(i.pC)-90,.5*i.pH.dist(i.pJ)),i.pJcpH=i.pJ.shift(180,.25*i.pJ.dist(i.pH)),i.pCout=i.pCcpF.shiftOutwards(i.pC,2*h),i.pHout=i.pHcpJ.shiftOutwards(i.pH,2*h),n.top=(new a).move(i.pA).curve(i.pAcpE,i.pEcpA,i.pE).line(i.pF).curve(i.pFcpC,i.pCcpF,i.pC).line(i.pCout),n.left=(new a).move(i.pCout).line(i.p
1Hout),n.bottom=(new a).move(i.pHout).line(i.pH).curve(i.pHcpJ,i.pJcpH,i.pJ).curve(i.pJcpG,i.pGcpJ,i.pG),n.right=(new a).move(i.pG).line(i.pA),n.seam=n.top.join(n.left).join(n.bottom).join(n.right).close().attr("class","fabric"),n.dart=(new a).move(i.pF).line(i.pJ).line(i.pE).attr("class","fabric").attr("data-text","dart").attr("data-text-class","text-xs"),i.buttonsTop=n.top.shiftAlong(1.5*h),i.buttonsBottom=n.bottom.shiftAlong(n.bottom.length()-1.5*h),i.pBH1=i.buttonsTop.shiftFractionTowards(i.buttonsBottom,.2),i.pBH2=i.buttonsTop.shiftFractionTowards(i.buttonsBottom,.5),i.pBH3=i.buttonsTop.shiftFractionTowards(i.buttonsBottom,.8),i.pB1=i.pC.shiftFractionTowards(i.pH,.2),i.pB2=i.pC.shiftFractionTowards(i.pH,.5),i.pB3=i.pC.shiftFractionTowards(i.pH,.8),r.bh1=new s("buttonhole",i.pBH1),r.bh2=new s("buttonhole",i.pBH2),r.bh3=new s("buttonhole",i.pBH3),r.b1=new s("button",i.pB1),r.b2=new s("button",i.pB2),r.b3=new s("button",i.pB3),r.n1=new s("notch",i.pA),r.n2=new s("notch",i.pC.shiftTowards(i.pCcpF,1.5*h)),i.gridAnchor=i.pA.clone(),c.cutlist.addCut({cut:2,from:"fabric"}),i.logo=i.pA.shiftFractionTowards(i.pH,.5).shift(180,70).shift(270,30),r.logo=new s("logo",i.logo),i.title=i.logo.shift(0,70),p("title",{nr:7,at:i.title,title:"LegBand"}),l&&(n.sa=n.seam.offset(l).attr("class","fabric sa")),p("hd",{id:1,from:i.pCout,to:i.pF,y:i.pA.y-l-15}),p("hd",{id:2,from:i.pF,to:i.pE,y:i.pA.y-l-15,noStartMarker:!0,noEndMarker:!0}),p("hd",{id:3,from:i.pE,to:i.pA,y:i.pA.y-l-15}),p("hd",{id:4,from:i.pHout,to:i.pG,y:i.pG.y+l+15}),p("ld",{id:5,from:i.pC,to:i.pB1,d:15,noStartMarker:!0,noEndMarker:!0}),p("ld",{id:6,from:i.pB1,to:i.pB2,d:15,noStartMarker:!0,noEndMarker:!0}),p("ld",{id:7,from:i.pB2,to:i.pB3,d:15,noStartMarker:!0,noEndMarker:!0}),p("ld",{id:8,from:i.pB3,to:i.pH,d:15,noStartMarker:!0,noEndMarker:!0}),p("ld",{id:9,from:i.pA,to:i.pG,d:15+l}),p("vd",{id:10,from:i.pE,to:i.pJ,x:i.pJ.x-15}),p("vd",{id:11,from:i.pF,to:i.pA,x:i.pF.x-15,noStartMarker:!0,noEndMarker:!0}),d}},ea={name:"cornelius.waistband",after:[qo,Qo],draft:({Point:t,Path:e,points:o,paths:a,Snippet:i,snippets:n,sa:s,store:r,expand:l,units:c,macro:p,part:d})=>{const h=r.get("halfInch"),m=r.get("flyWidth"),f=r.get("frontWaistLength")+r.get("backWaistLength")+m*h/2;return l?(o.pA=new t(0,0),o.pB=o.pA.shift(270,f),o.pC=o.pB.shift(180,3.5*h),o.pD=o.pA.shift(180,3.5*h),a.seam=(new e).move(o.pB).line(o.pA).line(o.pD).line(o.pC).attr("class","fabric"),a.seam2=(new e).move(o.pC).line(o.pB).attr("class","fabric"),o.button=o.pA.shift(270,h*(m/2)).shift(180,1.75*h),o.foldLeft=o.pD.shift(270,m*h),o.foldRight=o.pA.shift(270,m*h),a.fold=(new e).move(o.foldLeft).line(o.foldRight).addClass("fabric dashed"),n.bh=new i("buttonhole",o.button),n.b=new i("button",o.button),n.n1=new i("notch",o.pA.shift(270,r.get("frontWaistLength"))),p("cutonfold",{from:o.pC,to:o.pB}),r.cutlist.addCut({cut:2,from:"fabric"}),o.gridAnchor=o.pA.clone(),o.logo=o.pA.shiftFractionTowards(o.pC,.5),n.logo=new i("logo",o.logo).attr("data-scale",.7),o.title=o.logo.shift(90,70),p("title",{nr:1,at:o.title,title:"WaistBand",align:"center",rotation:90,scale:.5}),s&&(a.sa=(new e).move(o.pC).line(o.pC.shift(180,s)).join(a.seam.offset(s)).line(o.pB).attr("class","fabric sa")),p("hd",{id:1,from:o.pD,to:o.pA,y:o.pA.y-s-15}),p("vd",{id:2,from:o.pC,to:o.pD,x:o.pC.x-s-15}),p("vd",{id:3,from:o.foldRight,to:o.pA,x:o.pA.x+s+15}),d):(r.flag.note({msg:"cornelius:cutWaistband",replace:{width:c(3.5*h*2),length:c(2*f)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),r.flag.preset("expand"),d.hide())}},oa={name:"cornelius.pocketFacing",from:Xo,draft:({Path:t,Point:e,points:o,paths:a,Snippet:i,snippets:n,sa:s,store:r,macro:l,part:c})=>{const p=r.get("halfInch"),d=r.get("waist");return a.waistSeam=a.waistSeam.split(o.pocketFacingTL)[0].hide(),o.pocketFacingBR=a.sideSeam.shiftAlong(a.sideSeam.length()-d/2/4.5*3.5-3*p+s),o.pocketFacingBR.sitsOn(o.pAextra)?a.sideSeam=(new t).move(o.pAextra).curve(o.pAextraCPu,o.pUcpA,o.pU).hide():a.sideSeam=a.sideSeam.split(o.pocketFacingBR)[1].hide(),o.brCPtl=o.pocketFacingBR.shift(o.pocketFacingBR.angle(o.pocketSide)+90,3*p),o.tlCPbr=
1o.pocketFacingTL.shift(o.pocketFacingTL.angle(o.pocketWaist)-90,6*p),a.facingInside=(new t).move(o.pocketFacingTL).curve(o.tlCPbr,o.brCPtl,o.pocketFacingBR).hide(),a.seam=a.waistSeam.join(a.facingInside).join(a.sideSeam).close().attr("class","fabric"),n.n1=new i("notch",o.pocketWaist),n.n2=new i("notch",o.pocketSide),o.gridAnchor=o.pU.clone(),o.title=o.pUcpA.shiftFractionTowards(o.pocketFacingTL,.5).shift(270,40),o.logo=o.title.shiftFractionTowards(o.pocketFacingBR,.35),n.logo=new i("logo",o.logo).attr("data-scale",.7),l("title",{nr:3,at:o.title,title:"PocketFacing",align:"center",rotation:90,scale:.5}),l("grainline",{from:o.pU,to:new e(o.pU.x,o.title.y)}),r.cutlist.addCut({cut:2,from:"fabric"}),s&&(a.sa=a.seam.offset(s).attr("class","fabric sa")),l("hd",{id:0,from:o.pocketSide,to:o.pocketFacingBR,y:o.pU.y-s-15,noStartMarker:!0,noEndMarker:!0}),l("hd",{id:1,from:o.pU,to:o.pocketSide,y:o.pU.y-s-15}),l("hd",{id:2,from:o.pocketWaist,to:o.pU,y:o.pU.y-s-15}),l("hd",{id:3,from:o.pocketFacingTL,to:o.pocketWaist,y:o.pU.y-s-15}),l("vd",{id:4,from:o.pU,to:o.pocketSide,x:o.pocketSide.x+s+15}),l("vd",{id:5,from:o.pocketSide,to:o.pocketFacingBR,x:o.pocketSide.x+s+15}),c}},aa={name:"cornelius.pocket",from:Xo,draft:({Path:t,points:e,paths:o,Snippet:a,snippets:i,sa:n,store:s,macro:r,part:l})=>{const c=s.get("halfInch");return o.waistSeam=o.waistSeam.split(e.pocketFacingTL)[0].hide(),o.sideSeam=o.sideSeam.split(e.pocketFacingBR)[1].hide(),e.brCPtl=e.pocketFacingBR.shift(e.pocketFacingBR.angle(e.pocketSide)+90,3*c),e.tlCPbr=e.pocketFacingTL.shift(e.pocketFacingTL.angle(e.pocketWaist)-90,6*c),o.facingInside=(new t).move(e.pocketFacingTL).curve(e.tlCPbr,e.brCPtl,e.pocketFacingBR).hide(),o.pocketFold=(new t).move(e.pocketTL).line(e.pocketBL).attr("class","fabric dashed"),e.pocketBLcpBR=e.pocketBL.shift(0,.75*e.pocketBL.dist(e.pocketFacingBR)),e.pocketBRcpBL=e.pocketFacingBR.shift(180,.35*e.pocketBL.dist(e.pocketFacingBR)),e.mpocketBLcpBR=e.pocketBLcpBR.flipX(e.pocketTL),e.mpocketBRcpBL=e.pocketBRcpBL.flipX(e.pocketTL),e.mpocketFacingBR=e.pocketFacingBR.flipX(e.pocketTL),e.mpocketSide=e.pocketSide.flipX(e.pocketTL),e.mpocketWaist=e.pocketWaist.flipX(e.pocketTL),o.pocketBottom=(new t).move(e.mpocketFacingBR).curve(e.mpocketBRcpBL,e.mpocketBLcpBR,e.pocketBL).curve(e.pocketBLcpBR,e.pocketBRcpBL,e.pocketFacingBR).attr("class","fabric"),o.seam=o.waistSeam.line(e.mpocketWaist).line(e.mpocketSide).join(o.pocketBottom).join(o.sideSeam).close().attr("class","fabric"),i.n1=new a("notch",e.pocketWaist),i.n2=new a("notch",e.pocketSide),i.n3=new a("notch",e.mpocketWaist),i.n4=new a("notch",e.mpocketSide),e.gridAnchor=e.pocketTL.clone(),s.cutlist.addCut({cut:2,from:"lining"}),e.logo=e.pocketSide.shiftFractionTowards(e.pocketTL,.5),i.logo=new a("logo",e.logo),e.title=e.logo.shift(270,80),r("title",{nr:2,at:e.title,title:"Pocket",align:"center"}),n&&(o.sa=o.seam.offset(n).attr("class","fabric sa")),r("hd",{id:1,from:e.mpocketFacingBR,to:e.mpocketWaist,y:e.pU.y-n-15}),r("hd",{id:2,from:e.mpocketWaist,to:e.pocketTL,y:e.pU.y-n-15}),r("hd",{id:3,from:e.pocketTL,to:e.pocketWaist,y:e.pU.y-n-15}),r("hd",{id:4,from:e.pocketWaist,to:e.pU,y:e.pU.y-n-15}),r("hd",{id:5,from:e.pU,to:e.pocketFacingBR,y:e.pU.y-n-15}),r("hd",{id:6,from:e.pocketFacingTL,to:e.pocketWaist,y:e.pU.y-n-15}),r("vd",{id:7,from:e.pU,to:e.pocketSide,x:e.pocketSide.x+n+15}),r("vd",{id:8,from:e.pocketTL,to:e.pocketBL,x:e.pocketTL.x+15}),r("vd",{id:9,from:e.pocketSide,to:e.mpocketWaist,x:e.pocketSide.x+n+15}),r("vd",{id:10,from:e.pocketSide,to:e.pocketFacingBR,x:e.pocketSide.x+n+15}),r("vd",{id:11,from:e.mpocketWaist,to:e.mpocketSide,x:e.mpocketSide.x-n-15}),r("vd",{id:12,from:e.mpocketSide,to:e.mpocketFacingBR,x:e.mpocketSide.x-n-15}),l}},ia={name:"cornelius.zipperguard",after:Qo,draft:({Point:t,Path:e,points:o,paths:a,Snippet:i,snippets:n,sa:s,store:r,macro:l,part:c})=>{const p=.551915024494,d=r.get("flyConst"),h=r.get("flyWidth")*d,m=r.get("flyLength");return o.pA=new t(0,0),o.pB=o.pA.shift(180,h),o.pC=o.pB.shift(270,m-h),o.pD=o.pA.shift(270,m),o.pDcpC=o.pD.shift(180,h*p),o.pCcpD=o.pC.shift(270,h*p),a.seam=(new e).move(o.pA).line(o.pB).line(o.pC).curve(o.pCcpD,o.pDcpC,o.pD).attr("class","fabric"),a.seam2=(new e).move(o.pD).line(o.pA).attr("class","fabric"),l("cutonfold",{from:o.pD,to:o.pA}),o.gridAnchor=o.pA.clone(),r.cutlist.addCut({cut:1,from:"fabric"}),o.logo=o.pA.shiftFractionTowards(o.pC,.5),n.logo=new i("logo",o.logo).attr("data-scale",.7),o.title=o.logo.shiftFractionTowards(o.pDcpC,.5),l("title",{nr:4,at:o.title,title:"ZipperGuard",align:"center",rotation:90,scale:.5}),s&&(a.sa=(new e).move(o.pA).line(o.pA.shift(90,s)).join(a.seam.offset(s)).line(o.pD).attr("class","fabric sa")),l("hd",{id:1,from:o.pB,to:o.pA,y:o.pA.y-s-15}),l("vd",{id:2,from:o.pA,to:o.pD,x:o.pA.x+15}),c}},na={en:JSON.parse('{"t":"Cornelius cycling breeches","d":"Cornelius are cycling breeches based on the Keystone drafting method.","p":{"back":"Back","basteHere":"Baste here","front":"Front","frontpoints":"Front points","legband":"Legband","legbandKeystone":"Legband Keystone","pocket":"Pocket","pocketFacing":"Pocket facing","waistband":"Waistband","zipperguard":"Zipperguard"},"s":{"Vent":"Vent","PocketFacing":"Pocket facing","cutWaistband.t":"The waist band is not shown","cutWaistband.d":"The **waist band** is a strip of fabric {{{ width }}} wide and {{{ length }}} long."},"o":{"bandBelowKnee":{"t":"Cuff below knee","d":"Controls the cuff distance from the knee"},"cuffStyle":{"t":"Cuff style","d":"Style of the leg cuff"},"cuffStyle.traditional":{"t":"Traditional cuff style","d":"A single buttoned curved band with a pointed edge"},"cuffStyle.elegant":{"t":"Elegant cuff style","d":"A single buttoned straight band with a pointed edge"}
1,"cuffStyle.keystone":{"t":"Keystone cuff style","d":"A slightly curved band that is wider than the others using 3 buttons rather than 1. This one is based of off the one in the Keystone Draft this pattern is based on."},"cuffWidth":{"t":"Cuff width","d":"Width of the leg cuff"},"flyWidth":{"t":"Fly Guard width","d":"Width of the fly guard"},"fullness":{"t":"Fullness of the legs","d":"Influences the ease on the legs for a looser style"},"kneeToBelow":{"t":"Cuff length","d":"Controls the tightness of the cuff as compared to the knee"},"ventLength":{"t":"Vent length","d":"Controls the length of the vent between knee and cuff"},"waistbandBelowWaist":{"t":"Lower waistband","d":"Percentage to move the waistband below the actual waist"},"waistReduction":{"t":"Waist reduction","d":"Percentage to reduce the waistband"}}}')},sa=new n.pT({data:Vo,parts:[Qo,qo,Zo,ta,ea,oa,aa,ia]}),ra=JSON.parse('{"id":"crux","code":"Wouter Van Wageningen","name":"Crux Climbing pants","design":"Wouter Van Wageningen","description":"A FreeSewing pattern for climbing or hiking pants","difficulty":3,"tags":["bottoms","trousers"],"techniques":["curved-seam","fly","zipper","button","pocket","dart"],"version":"4.6.0","pkg":"@freesewing/crux","collection":true}');function la(t,e){let{macro:o,points:a,sa:i}=t.shorthand();e.forEach((t=>{const e=t[0]+t[1]+t[2],n=i*(t[4]>0?1:-1);o(t[0]+"d",{id:e,from:a[t[1]],to:a[t[2]],y:a[t[3]].y+n+t[4],x:a[t[3]].x+n+t[4],d:n+t[4]})}))}function ca(t,e,o){const{utils:a}=t.shorthand();let i=e.ops[0].to;for(const n of e.ops){switch(n.type){case"line":if(a.pointOnLine(i,n.to,o))return!0;break;case"curve":if(a.pointOnCurve(i,n.cp1,n.cp2,n.to,o))return!0}i=n.to}return!1}function pa(t,e,o,a,i,n,s){t[e]=a.shift(o,i*n*(o>60&&o<120||o>240&&o<300?1+(s<0?-1*s:0):1+(s>0?s:0)))}function da(t,e,o,a,i,n,s,r){t[e]=t[o].shift(a,n*s*i*(a>60&&a<120||a>240&&a<300?1+(r<0?-1*r:0):1+(r>0?r:0)))}const ha={standard:{backPocketWidth:.15,backPocketHeight:.42,backPocketCurve:.52,backPocketOpening:.4,backPocketOpeningSquareness:0,backPocketOpeningAspect:-.6,backPocketOpeningOffset:.15},hole:{backPocketWidth:.15,backPocketHeight:.4,backPocketCurve:.52,backPocketOpening:.23,backPocketOpeningSquareness:0,backPocketOpeningAspect:.85,backPocketOpeningOffset:.4},square:{backPocketWidth:.15,backPocketHeight:.4,backPocketCurve:0,backPocketOpening:.9,backPocketOpeningSquareness:0,backPocketOpeningAspect:3,backPocketOpeningOffset:-.5},diamond:{backPocketWidth:.15,backPocketHeight:.35,backPocketCurve:.04,backPocketOpening:.23,backPocketOpeningSquareness:.72,backPocketOpeningAspect:.8,backPocketOpeningOffset:.4}},ma={standard:{frontPocketWidth:.18,frontPocketHeight:.44,frontPocketCurve:.52,frontPocketOpening:.3,frontPocketOpeningSquareness:0,frontPocketOpeningAspect:.4,frontPocketOpeningOffset:.34},hole:{frontPocketWidth:.18,frontPocketHeight:.44,frontPocketCurve:.52,frontPocketOpening:.25,frontPocketOpeningSquareness:0,frontPocketOpeningAspect:.4,frontPocketOpeningOffset:.45},square:{frontPocketWidth:.18,frontPocketHeight:.48,frontPocketCurve:0,frontPocketOpening:.45,frontPocketOpeningSquareness:0,frontPocketOpeningAspect:.35,frontPocketOpeningOffset:0},diamond:{frontPocketWidth:.18,frontPocketHeight:.45,frontPocketCurve:.04,frontPocketOpening:.245,frontPocketOpeningSquareness:.72,frontPocketOpeningAspect:.6,frontPocketOpeningOffset:.5}};function fa(t,e,o,a,i,n=!1){const{options:s,macro:r}=t.shorthand();let l;if(a>e.length())return null;o<a/1.9&&(o=a/2.1),e.length()-o<a&&(o=e.length()-a/1.95);const c=e.shiftAlong(o),p=e.split(c);if(p[0].length()<a/2||p[1].length()<a/2)return null;const d=p[0].reverse().shiftAlong(a/2),h=p[1].shiftAlong(a/2),m=.0015,f=Math.max(p[0].length()*m,p[0].ops[1].to.dist(p[0].ops[1].cp2)),u=Math.max(p[1].length()*m,p[1].ops[0].to.dist(p[1].ops[1].cp1)),g=c.shift(d.angle(h)-90,i),b=d.shift(d.angle(g)+90,f),w=h.shift(h.angle(g)-90,u),k=(new t.Path).move(p[0].ops[0].to).curve(p[0].ops[1].cp1,b,d).hide(),C=(new t.Path).move(h).curve(w,p[1].ops[1].cp2,p[1].ops[1].to).hide();let v=null;if(s.curvedDarts)if(Math.abs(g.angle(d)-g.angle(h))<2*s.curvedDartControlAngle)v=(new t.Path).move(d).line(g).line(h).hide();else{const e=g.shiftFractionTowards(c,s.curvedDartBottomControlOffset).rotate(s.curvedDartControlAngle,g),o=g.shiftFractionTowards(c,s.curvedDartBottomControlOffset).rotate(360-s.curvedDartControlAngle,g),a=d.shiftFractionTowards(g,s.curvedDartTopControlOffset),i=h.shiftFractionTowards(g,s.curvedDartTopControlOffset);v=(new t.Path).move(d).curve(a,e,g).curve(o,i,h).hide()}else v=(new t.Path).move(d).line(g).line(h).hide();if(n){const e=c.shiftFractionTowards(d,2),o=c.shiftFractionTowards(h,2),a=k.intersectsBeam(g,e)[0],i=C.intersectsBeam(g,o)[0];void 0!==a&&(t.paths.dartFoldLeft=k.split(a)[1],r("mirror",{clone:!1,mirror:[g,d],paths:["dartFoldLeft"]}),l=t.paths.dartFoldLeft.reverse().hide(),delete t.paths.dartFoldLeft),void 0!==i&&(t.paths.dartFoldRight=C.split(i)[0],r("mirror",{clone:!1,mirror:[g,h],paths:["dartFoldRight"]}),l=void 0!==a?l.join(t.paths.dartFoldRight.reverse()).hide():t.paths.dartFoldRight.reverse().hide(),delete t.paths.dartFoldRight)}return{left:k,dart:v,right:C,sa:l}}const ua={bool:!0,menu:"style",order:"180"},ga=2,ba=.2,wa=.4,ka=.55,Ca=.25,va=.7,ya=0,Ta=.35,xa=.75,Ba=.25,Sa=2,La=.5,Pa=.08,Ra=.2,Fa=.7,Ea=.22,Wa={pct:3.8,min:2,max:6,...(0,n.Wx)("waist"),menu:"advanced",order:"902"},Ha={pct:0,min:0,max:25,menu:"fit",order:"240"},Aa={pct:0,min:-10,max:10,...(0,n.Wx)("hips"),menu:"fit",order:"250"},Oa={dflt:"standard",list:["standard","elastic","ribknit"],menu:"style",order:"140"},Da={pct:80,min:0,max:100,...(0,n.Wx)("waistToHips"),menu:"style",order:"142"},Na={pct:3.2,min:1,max:10,...(0,n.Wx)("waistToFloor"),menu:"style",order:"144"},Ia={pct:0,min:0,max:10,menu:"fit",order:"202"},Ma={dflt:"long",list:["long","capris","shorts","custom"],menu:"style",order:"110"},_a={pct:95,min:40,max:100,...(0,n.Wx)("waistToFloor"),menu:(t,e)=>"custom"===e.legLength&&"style",order:"112"},ja={dflt:"hem",list:["hem","ribknit"],menu:(t,e)=>"long"===e.legLength&&"style",order:"160"},Ga={pct:3,min:1,max:10,...(0,n.Wx)("waistToFloor"),menu:(t,e)=>"capris"!==e.legLength&&"style",order:"162"},Ua={bool:!0,menu:(t,e)=>
1"shorts"!==e.legLength&&(("custom"===e.legLength&&t.measurements.waistToKnee/(t.measurements.waistToFloor*e.legLengthCustom))<.9&&"style"),order:"150"},Ya=.15,$a=.026,za=70,Ja={pct:0,min:0,max:100,menu:"fit.gusset",order:"222"},Ka={pct:20,min:5,max:25,menu:"fit.gusset",order:"224"},Va={pct:25,min:20,max:50,menu:"fit.gusset",order:"226"},Xa={pct:15,min:5,max:20,menu:"fit.gusset",order:"228"},Qa={dflt:"standard",list:["standard","hole","square","diamond"],menu:"style.pockets",order:"130"},qa={bool:!1,menu:(t,e)=>"square"!==e.backPocketType&&"style.pockets",order:"132"},Za={bool:!1,menu:(t,e)=>!e.backPocketInside&&"style.pockets",order:"134"},ti={pct:2,min:.3,max:5,...(0,n.Wx)("waistToFloor"),menu:(t,e)=>!!e.backPocketCargo&&"style.pockets",order:"136"},ei={dflt:"standard",list:["standard","hole","square","diamond"],menu:"style.pockets",order:"120"},oi={bool:!1,menu:"style.pockets",order:"122"},ai={bool:!1,menu:(t,e)=>!e.frontPocketInside&&"style.pockets",order:"124"},ii={pct:2,min:.3,max:5,...(0,n.Wx)("waistToFloor"),menu:(t,e)=>!!e.frontPocketCargo&&"style.pockets",order:"126"},ni={name:"crux.basepoints",from:Xo,hide:{self:!0,from:!0,inherited:!0},measurements:["waist","waistBack","hips","inseam","seat","seatBack","waistToKnee","waistToHips","waistToSeat","waistToFloor","knee","heel"],options:a,draft:({options:t,measurements:e,Point:o,Path:a,points:i,paths:s,store:r,log:l,macro:c,utils:p,part:d})=>{const h=.5*e.hips+t.hipsShift*e.hips,m=.5*e.hips-t.hipsShift*e.hips,f=e.waist-e.waistBack-h,u=e.waistBack-m,g="long"===t.legLength?.97-("ribknit"===t.hemType?t.hemLength:0):"capris"===t.legLength?.725:"shorts"===t.legLength?.47:t.legLengthCustom,b=f*(1-t.waistbandLower)+.5*h*(1-t.waistReduction),w=u*(1-t.waistbandLower)+.5*m*(1-t.waistReduction)*("standard"===t.waistbandType?1:"ribknit"===t.waistbandType?1.025:1.05);r.set("waistbandTargetFront",b),r.set("waistbandTargetBack",w),r.set("hipsFront",h),r.set("hipsBack",m),r.set("legLength",g);const k=e.waistToHips*t.waistbandLower,C=e.waistToFloor-k,v=e.seat-e.seatBack;r.set("waistDown",k),i.pE=i.pA.shift(180,v/4),i.pF=i.pA.shift(180,v/2),i.pD=i.pO.shift(180,v/4),i.pH=i.pC.shift(180,v/4),i.pG=i.pO.shift(180,v/2),i.wHips=i.pE.shift(90,e.waistToFloor-e.inseam-e.waistToHips),i.newWaistBand=i.wHips.shift(90,e.waistToHips*(1-t.waistbandLower)),i.floorMiddle=i.pD.shift(270,e.waistToFloor),i.floorSide=i.floorMiddle.shift(0,e.heel/4),i.floorIn=i.floorMiddle.shift(180,e.heel/4),i.floorSideCpA=i.floorSide.shiftFractionTowards(i.pAextraCPj,t.pctJtoA).shift(0,i.pJ.dist(i.pH)*t.fullness);let y,T=0,x=0,B=i.pU.shift(180,T);do{B=B.shift(180,T),y=B.shiftFractionTowards(i.pAextraCPu,t.pctUtoA),s.sideSeamFront=(new a).move(i.floorSide).curve(i.floorSideCpA,i.pAextraCPj,i.pAextra).curve(i.pAextraCPu,y,B).hide(),i.frontWaistSide=s.sideSeamFront.intersectsY(i.newWaistBand.y)[0],i.frontWaistCenter=p.beamIntersectsY(i.pW,i.pZ,i.newWaistBand.y),T=i.frontWaistSide.dist(i.frontWaistCenter)-b,x++}while(x<100&&(T>.1||T<-.1));x>=100&&l.error("Could not create the sdie seam"),i.frontWaistMiddle=new o(i.pD.x,i.newWaistBand.y),s.sideSeamFront=s.sideSeamFront.split(i.frontWaistSide)[0].hide();const S=r.get("halfInch"),L=r.get("waist"),P=t.flyWidth*e.waist;r.set("flyWidth",P),i.pZcpR=i.pZ.shiftFractionTowards(i.pX,t.pctZtoR),i.pRcpZ=i.pR.shiftFractionTowards(i.pF,t.pctRtoZin).shiftFractionTowards(i.pZ,t.pctRtoZup);let R=Math.abs(i.pW.angle(i.pD)-i.pW.angle(i.pZ));R>180&&(R-=180),s.waistSeamFront=(new a).move(i.frontWaistSide).line(i.frontWaistCenter).hide().addText("target: "+b,"note center"),i.flyTop=i.frontWaistCenter.shift(2*(i.frontWaistCenter.angle(i.pZ)-270)+180,P),i.flyBottom=i.flyTop.shift(i.frontWaistCenter.angle(i.pZ),i.frontWaistCenter.dist(i.pZ)-P),i.pZcpFB=i.pZ.shift(i.frontWaistCenter.angle(i.pZ)-R,P*n.Qr),i.pFBcpZ=i.flyBottom.shift(i.frontWaistCenter.angle(i.pZ),P*n.Qr),i.flyTopCenter=i.frontWaistCenter.clone(),s.fly=(new a).move(i.flyTopCenter).line(i.flyTop).line(i.flyBottom).curve(i.pFBcpZ,i.pZcpFB,i.pZ).hide(),s.flyFold=(new a).move(i.frontWaistCenter).line(i.pZ).hide(),r.set("flyLength",s.flyFold.length()),s.crotchSeamFront=(new a).move(i.pZ).curve(i.pZcpR,i.pRcpZ,i.pR).hide(),i.pRcpK=i.pR.shiftFractionTowards(i.pF,t.pctRtoKin).shiftFractionTowards(i.pK,t.pctRtoKdown),i.pKcpR=i.pK.shiftFractionTowards(i.pH,-1*(t.pctKtoRout+t.fullness)).shiftFractionTowards(i.pR,t.pctKtoRup),i.floorInCpR=i.floorIn.shiftFractionTowards(i.pH,-1*(t.pctKtoRout+t.fullness)).shiftFractionTowards(i.pR,t.pctKtoRup),s.insideSeamFront=(new a).move(i.pR).curve(i.pRcpK,i.floorInCpR,i.floorIn).hide(),r.set("insideSeamFront",s.insideSeamFront.length()),s.insideSeamFrontTemp=s.insideSeamFront.clone().unhide().setClass("lining").hide();const F=.7*(r.get("insideSeamFront")-e.inseam);s.sideSeamFrontTemp=s.sideSeamFront.clone().unhide().setClass("lining"),c("transform",{transform:"translate",x:0,y:-1*F,clone:!1,paths:["sideSeamFrontTemp"]}),i.frontWaistCenterTemp=s.sideSeamFrontTemp.end(),s.waistSeamFrontTemp=(new a).move(i.frontWaistCenter).curve(i.frontWaistCenter.shiftFractionTowards(i.frontWaistSide,.8),i.frontWaistCenterTemp,i.frontWaistCenterTemp).addClass("lining"),T=s.waistSeamFrontTemp.length()-b,x=0;const E=i.floorSide.angle(i.frontWaistCenterTemp);do{const t=i.floorSide.angle(i.frontWaistCenterTemp);i.frontWaistCenterTemp=i.frontWaistCenterTemp.shift(t+90,T),s.waistSeamFrontTemp=(new a).move(i.frontWaistCenter).curve(i.frontWaistCenter.shiftFractionTowards(i.frontWaistSide,.8),i.frontWaistCenterTemp,i.frontWaistCenterTemp).addClass("lining").hide(),T=s.waistSeamFrontTemp.length()-b,x++}while(x<100&&(T>.1||T<-.1));x>=100&&l.error("Could not find the waist center point within 100 iterations"),s.sideSeamFrontTemp=s.sideSeamFrontTemp.rotate(i.floorSide.angle(i.frontWaistCenterTemp)-E,i.floorSide),i.frontWaistCenter=i.frontWaistCenterTemp.clone(),i.floorSide=s.sideSeamFrontTemp.start(),s.sideSeamFront=s.sideSeamFrontTemp.clone(),s.waistSeamFront=s.waistSeamFrontTemp.clone().reverse().hide(),s.waistSeamFrontTemp.hide(),s.sideSeamFrontTemp.hide(),i.waistSeamFrontStart=s.waistSeamFront.start(),r.set("waistLengthFront",s.waistSeamFront.length()),r.set("sideSeamFront",s.sideSeamFront.length()),i.hemSide=s.sideSeamFront.reverse().shiftAlong(C*g),s.sideSeamFront=s.sideSeamFront.split(i.hemSide)[1].hide(),r.set("sideSeamFrontHem",s.sideSeamFront.length()),i.hemIn=s.insideSeamFront.intersectsY(i.hemSide.y)[0],s.insideSeamFront=s.insideSeamFront.split(i.hemIn)[0].hide(),r.set("insideSeamFrontHem",s.insideSeamFront.length()),s.legSeamFront=(new a).move(i.hemIn).line(i.hemSide).hide(),r.set("legSeamFront",s.legSeamFront.length()),i.gussetFront=s.crotchSeamFront.shiftFractionAlong(1-t.gussetWidthFront),i.gussetFrontLeg=s.insideSeamFront.shiftAlong(r.get("insideSeamFront")*t.gussetDepth),i.gussetFrontCp=i.gussetFront.shift(s.crotchSeamFront.angleAt(i.gussetFront)+90,r.get("insideSeamFront")*t.gussetDepth*.5*(1-t.gussetWidthFront)),s.gussetFront=(new a).move(i.gussetFront).curve(i.gussetFrontCp,i.gussetFrontLeg,i.gussetFrontLeg).hide();const W=s.crotchSeamFront.split(i.gussetFront);s.crotchSeamFront=W[0].hide(),s.gussetCrotchFront=W[1].hide();const H=s.insideSeamFront.split(i.gussetFrontLeg);s.insideSeamFront=H[1].hide(),s.gussetLegFront=H[0].hide();let A=null;const O=e.seatBack;i.p2=i.frontWaistMiddle.shift(90,O/12),i.p10=i.floorIn.shiftTowards(i.floorMiddle,-S),function(t,e,o,a){const{options:i,Path:n,points:s,paths:r,store:l,log:c}=t.shorthand(),p=l.get("insideSeamFront"),d=e.dist(a);let h,m,f,u=Math.atan(o/d)*(180/Math.PI),g=o/d*-3,b=0,w=0;do{s.p3=e.rotate(u,a),s.p3cp10=s.p3.shiftFractionTowards(s.pF,i.pctRtoKin).shiftFractionTowards(s.p10,i.pctRtoKdown),s.p10cp3=s.p10.shiftFractionTowards(s.floorMiddle,-1*(i.pctKtoRout+i.fullness)).shiftFractionTowards(s.p3,i.pctKtoRup),r.insideSeamBack=(new n).move(s.p3).curve(s.p3cp10,s.p10cp3,s.p10).hide(),f=r.insideSeamBack.length(),h=e.dist(s.p3),m=o-h,b=f-p,b>.1?e=e.shiftTowards(a,.9*b):b<-.1?e=e.shiftTowards(a,.8*b):(g*=m>0?g>0?.8:-.8:g>0?-.9:.9,u+=g),w++}while((m>.1||m<-.1||b<-.1||b>.1)&&w<100);w>=100&&c.error('Could not find a point for "3" within 100 iterations')}(d,i.pR.clone(),2*S,i.floorIn),i.p11=i.floorSide.shiftTowards(i.pH,-S),function(t,e,o,a){const{options:i,Path:n,points:s,paths:r,store:l,utils:c,measurements:p,log:d}=t.shorthand();let h,m,f=null;const u=l.get("waistbandTargetBack"),g=l.get("sideSeamFront"),b=l.get("halfInch");let w,k,C;const v=e.dist(a);let y=Math.atan(Math.abs(o)/v)*(180/Math.PI);o<0&&(y=360-y,o*=-1);let T,x=g,B=0,S=u+.6*(.5*p.seatBack-u),L=g,P=S,R=0,F=0;s.p4=c.circlesIntersect(s.p2,S,a,x)[1],s.p4orig=c.circlesIntersect(s.p2,u,a,x)[1],s.p2cp4=s.p2.shift(s.p2.angle(s.pX)+90,.2*s.p2.dist(s.pX));do{s.p4=s.p4.shiftTowards(a,R),s.p4=s.p4.shiftTowards(s.p2,F),s.p4orig=s.p4orig.shiftTowards(a,R),s.p4orig=s.p4orig.shiftTowards(s.p2,F),w=s.floorSide.angle(s.p4orig),k=s.floorSide.angle(s.pU),C=k-w,s.p6=s.floorSide.shift(s.floorSide.angle(s.pT)-C,s.floorSide.dist(s.pT)),s.p7=s.floorSide.shift(s.floorSide.angle(s.pA)-C,s.floorSide.dist(s.pA)),s.p6=s.p6.shift(s.floorSide.angle(s.pT)-C-90,b*i.fullness*2),s.p7=s.p7.shift(s.floorSide.angle(s.pA)-C-90,b*i.fullness*2),h=s.p7.dist(s.p4)*i.pctAtoO,m=s.p7.dist(s.p11)
1*i.pctAtoC,f=s.p4.angle(s.p11),s.p7cp4=s.p7.shift(f+180+5*i.fullness,h),s.p7cp11=s.p7.shift(f,m),s.p4cp7=s.p4.shiftFractionTowards(s.p7cp4,i.pctUtoA),s.p11cp7=s.p11.shiftFractionTowards(s.p7cp11,i.pctJtoA).shift(0,s.p11.dist(s.pH)*i.fullness),s.p4cp2=s.p4.shift(s.p4.angle(s.p4cp7)-90,s.p4.dist(s.p4cp7)),r.sideSeamBack=(new n).move(s.p11).curve(s.p11cp7,s.p7cp11,s.p7).curve(s.p7cp4,s.p4cp7,s.p4).hide(),r.waistBandBack=(new n).move(s.p4).curve(s.p4cp2,s.p2cp4,s.p2).hide(),T=fa(t,r.waistBandBack,r.waistBandBack.length()*i.dartPosition,.8*(.5*p.seatBack-u)*1,-.65*(p.waistToSeat-l.get("waistDown")),!0),L=r.sideSeamBack.length(),P=T.left.length()+T.right.length(),R=L-g,F=P-u,B++}while((R>.1||R<-.1||F>.1||F<-.1)&&B<100);B>=100&&d.error('Could not find a point for "4" within 100 iterations'),r.curveLeftOfDart=T.right.clone().hide(),r.curveRightOfDart=T.left.clone().hide(),r.curveDart=T.dart.clone().hide(),r.curveDartSA=T.sa,s.dartOpeningLeft=r.curveLeftOfDart.start(),s.dartOpeningRight=r.curveRightOfDart.end()}(d,i.pU,-1*(L/2+S),i.p11,i.p2),i.hemInBack=s.insideSeamBack.shiftAlong(r.get("insideSeamFrontHem")),i.hemSideBack=s.sideSeamBack.shiftAlong(r.get("sideSeamFront")-r.get("sideSeamFrontHem")),s.insideSeamBackTemp=s.insideSeamBack.clone().addClass("canvas").hide(),r.set("insideSeamBack",s.insideSeamBack.length()),s.sideSeamBack=s.sideSeamBack.split(i.hemSideBack)[1].hide(),s.insideSeamBack=s.insideSeamBack.split(i.hemInBack)[0].hide(),i.p2a=i.p2.shiftTowards(i.p4,S),A=i.p6.shiftTowards(i.pT,1e3);const D=(new a).move(i.pF).line(i.p2a),N=(new a).move(i.p6).line(A);i.p5=N.intersects(D)[0],i.p5cp3=i.p5.shiftFractionTowards(i.pF,2*t.pctZtoR),i.p3cp5=i.p3.shiftFractionTowards(i.pF,t.pctRtoZin).shiftFractionTowards(i.p5,t.pctRtoZup/4),i.p2cp5=i.p2.shiftFractionTowards(i.p5,t.pctZtoR),i.p5cp2=i.p5.shift(i.p5.angle(i.p5cp3)+180,i.p2.dist(i.p5)*t.pctZtoR),s.crotchSeamBack=(new a).move(i.p2).curve(i.p2cp5,i.p5cp2,i.p5).curve(i.p5cp3,i.p3cp5,i.p3).hide(),A=i.pH.shift(90,1*S),i.p10cpH=i.p10.shiftFractionTowards(A,t.pctKtoH),i.p11cpH=i.p11.shiftFractionTowards(A,t.pctKtoH),s.legSeamBack=(new a).move(i.hemInBack).line(i.hemSideBack).hide(),r.set("legSeamBack",s.legSeamBack.length()),s.waistSeamBackSA=(new a).move(i.p4).join(s.curveRightOfDart).join(s.curveDartSA).join(s.curveLeftOfDart).hide(),s.waistSeamBack=(new a).move(i.p4).join(s.curveRightOfDart).join(s.curveDart).join(s.curveLeftOfDart).hide(),r.set("waistLengthBack",s.curveLeftOfDart.length()+s.curveRightOfDart.length()),i.gussetBack=s.crotchSeamBack.shiftFractionAlong(1-t.gussetWidthBack),i.gussetBackLeg=s.insideSeamBack.shiftAlong(r.get("insideSeamBack")*t.gussetDepth),i.gussetBackCp=i.gussetBack.shift(s.crotchSeamBack.angleAt(i.gussetBack)+90,r.get("insideSeamBack")*t.gussetDepth*.75*(1-4*t.gussetWidthBack)),s.gussetBack=(new a).move(i.gussetBack).curve(i.gussetBackCp,i.gussetBackLeg,i.gussetBackLeg).hide();const I=s.crotchSeamBack.split(i.gussetBack);s.crotchSeamBack=I[0].hide(),s.gussetCrotchBack=I[1].hide();const M=s.insideSeamBack.split(i.gussetBackLeg);return s.insideSeamBack=M[1].hide(),s.gussetLegBack=M[0].hide(),d}},si={name:"crux.backpocketpoints",from:ni,hide:{self:!0,from:!0,inherited:!0},draft:({options:t,measurements:e,Path:o,points:a,paths:i,store:s,part:r})=>{const l=ha[t.backPocketType],c=l.backPocketWidth,p=l.backPocketHeight,d=l.backPocketCurve,h=l.backPocketOpening,m=l.backPocketOpeningSquareness,f=l.backPocketOpeningAspect,u=l.backPocketOpeningOffset;s.set("backPocketHeight",e.waistToKnee*p),a.backPocketTopLeft=i.curveLeftOfDart.shiftFractionAlong(4*c),a.backPocketTopRight=i.curveRightOfDart.shiftFractionAlong(1-4*c),a.backPocketTopMiddle=a.backPocketTopLeft.shiftFractionTowards(a.backPocketTopRight,.5);const g=a.backPocketTopRight.angle(a.backPocketTopLeft);
1s.set("backAngle",g),a.backPocketBottomLeft=a.backPocketTopLeft.shift(g+90,e.waistToKnee*p),a.backPocketBottomRight=a.backPocketTopRight.shift(g+90,e.waistToKnee*p),a.backPocketBottomMiddle=a.backPocketBottomLeft.shiftFractionTowards(a.backPocketBottomRight,.5);const b=a.backPocketBottomLeft.dist(a.backPocketBottomRight),w=d*b*.5,k=w*n.Qr;a.backPocketBottomLeftUp=a.backPocketBottomLeft.shift(g-90,w),a.backPocketBottomRightUp=a.backPocketBottomRight.shift(g-90,w),a.backPocketBottomLeftRight=a.backPocketBottomLeft.shift(g-180,w),a.backPocketBottomRightLeft=a.backPocketBottomRight.shift(g,w),a.backPocketBottomLeftToUpCp=a.backPocketBottomLeft.shift(g-90,k),a.backPocketBottomLeftToRightCp=a.backPocketBottomLeft.shift(g-180,k),a.backPocketBottomRightToUpCp=a.backPocketBottomRight.shift(g-90,k),a.backPocketBottomRightToLeftCp=a.backPocketBottomRight.shift(g,k),i.backPocketLeftBottomCurve=(new o).move(a.backPocketBottomLeftUp).curve(a.backPocketBottomLeftToUpCp,a.backPocketBottomLeftToRightCp,a.backPocketBottomLeftRight).hide(),i.backPocketRightBottomCurve=(new o).move(a.backPocketBottomRightLeft).curve(a.backPocketBottomRightToLeftCp,a.backPocketBottomRightToUpCp,a.backPocketBottomRightUp).hide();if(function(t,e,o,a,i,n,s){const{Path:r,points:l,paths:c}=t.shorthand();l.bpM=l.backPocketTopMiddle.shift(e+90,o*n),n*=.95,pa(l,"bpT",e-90,l.bpM,o,i,s),pa(l,"bpB",e+90,l.bpM,o,i,s),pa(l,"bpL",e,l.bpM,o,i,s),pa(l,"bpR",e+180,l.bpM,o,i,s),da(l,"bpT2R","bpT",e+180,a,o,i,s),da(l,"bpT2L","bpT",e,a,o,i,s),da(l,"bpB2R","bpB",e+180,a,o,i,s),da(l,"bpB2L","bpB",e,a,o,i,s),da(l,"bpR2T","bpR",e-90,a,o,i,s),da(l,"bpR2B","bpR",e+90,a,o,i,s),da(l,"bpL2T","bpL",e-90,a,o,i,s),da(l,"bpL2B","bpL",e+90,a,o,i,s),c.backPocketOpening=(new r).move(l.bpT).curve(l.bpT2L,l.bpL2T,l.bpL).curve(l.bpL2B,l.bpB2L,l.bpB).curve(l.bpB2R,l.bpR2B,l.bpR).curve(l.bpR2T,l.bpT2R,l.bpT).hide()}(r,g,b,n.Qr*(1-m),h,u,f),i.waistSeamPocketPart=i.waistSeamBack.split(a.backPocketTopLeft)[0].split(a.backPocketTopRight)[1],"square"===t.backPocketType?(a.backPocketTopLeft=a.backPocketTopLeft.shiftTowards(a.backPocketBottomLeft,a.backPocketTopMiddle.dist(a.bpB)),a.backPocketTopRight=a.backPocketTopRight.shiftTowards(a.backPocketBottomRight,a.backPocketTopMiddle.dist(a.bpB)),i.backPocketSeamMarker=(new o).move(a.backPocketTopLeft).line(a.backPocketBottomLeftUp).join(i.backPocketLeftBottomCurve).line(a.backPocketBottomRightLeft).join(i.backPocketRightBottomCurve).line(a.backPocketTopRight).hide(),i.backPocketSeam=(new o).move(a.backPocketTopLeft).join(i.backPocketSeamMarker).line(a.backPocketTopLeft).close().hide(),i.backPocketSeamOutline=i.backPocketSeam.clone().hide()):(i.backPocketSeamMarker=(new o).move(a.backPocketTopLeft).line(a.backPocketBottomLeftUp).join(i.backPocketLeftBottomCurve).line(a.backPocketBottomRightLeft).join(i.backPocketRightBottomCurve).line(a.backPocketTopRight).hide(),i.backPocketSeam=i.waistSeamPocketPart.clone().join(i.backPocketSeamMarker).close().hide(),i.backPocketSeamOutline=i.waistSeamBackSA.clone().split(a.backPocketTopLeft)[0].split(a.backPocketTopRight)[1].line(a.backPocketBottomLeftUp).join(i.backPocketLeftBottomCurve).line(a.backPocketBottomRightLeft).join(i.backPocketRightBottomCurve).line(a.backPocketTopRight).close().hide()),s.set("backPocketSeamCargoLength",i.backPocketSeamMarker.length()),"standard"===t.backPocketType)i.waistSeamPocketPart.hide(),i.backPocketSeamOutline.hide(),a.backOpeningLeft=i.waistSeamPocketPart.reverse().shiftFractionAlong(.06),a.backOpeningRight=i.waistSeamPocketPart.shiftFractionAlong(.06),a.bpT2L=a.backOpeningLeft.shift(250,.3*a.backOpeningLeft.dist(a.bpL)),a.bpT2R=a.backOpeningRight.shift(290,.3*a.backOpeningRight.dist(a.bpR)),a.bpL=a.bpL.shiftFractionTowards(a.bpL2B,.3),a.bpR=a.bpR.shiftFractionTowards(a.bpR2B,.3),a.bpL2T=a.bpL2T.shiftFractionTowards(a.bpL,.75),a.bpR2T=a.bpR2T.shiftFractionTowards(a.bpR,.75);else if("hole"===t.backPocketType||"diamond"===t.backPocketType){let t=i.waistSeamPocketPart.intersectsBeam(a.bpT2L,a.bpT2R);a.backOpeningLeft=t[1],a.backOpeningRight=t[0]}if("square"!==t.backPocketType){"diamond"===t.backPocketType&&(a.bpT2L=a.backOpeningLeft.clone());let e=i.waistSeamPocketPart.split(a.backOpeningLeft);i.waistSeamPocketPartLeft=e[1].hide(),e=e[0].split(a.backOpeningRight),i.waistSeamPocketPartRight=e[0].hide(),e="standard"===t.backPocketType?i.waistSeamBackSA.split(a.backOpeningLeft):i.waistSeamBack.split(a.backOpeningLeft),i.waistSeamLeft=e[1].hide(),e=e[0].split(a.backOpeningRight),i.waistSeamRight=e[0].hide(),i.opening=(new o).move(a.backOpeningRight).curve(a.bpT2R,a.bpR2T,a.bpR).curve(a.bpR2B,a.bpB2R,a.bpB).curve(a.bpB2L,a.bpL2B,a.bpL).curve(a.bpL2T,a.bpT2L,a.backOpeningLeft).hide(),i.backPocketSeam=i.waistSeamPocketPartLeft.clone().line(a.backPocketBottomLeftUp).join(i.backPocketLeftBottomCurve).line(a.backPocketBottomRightLeft).join(i.backPocketRightBottomCurve).line(a.backPocketTopRight).join(i.waistSeamPocketPartRight).join(i.opening).close().hide()}else i.waistSeamPocketPart.hide();return r}};function ri(t,e){const{Path:o,points:a,paths:i,measurements:n}=t.shorthand();a.markerKneeSide=i.sideSeamBack.reverse().shiftAlong(n.waistToKnee-e),a.indicatorKneeInside=a.markerKneeSide.shift(a.hemSideBack.angle(a.hemInBack),2e3),a.markerKneeInside=i.insideSeamBack.intersectsBeam(a.indicatorKneeInside,a.markerKneeSide)[0],i.kneeLine=(new o).move(a.markerKneeInside).line(a.markerKneeSide).hide()}const li={name:"crux.back",from:si,draft:({options:t,measurements:e,Path:o,points:a,paths:i,Snippet:n,snippets:s,sa:r,store:l,macro:c,complete:p,part:d})=>{a.mWaist=i.waistSeamBack.shiftFractionAlong(.5);const h=l.get("waistDown"),m=l.get("waistbandTargetBack");if("hem"===t.hemType||"elastic"===t.hemType){const n=e.waistToFloor*t.hemLength,s=a.hemInBack.angle(a.hemSideBack),r=a.hemInBack.shift(s+90,n).shift(s+180,400),l=a.hemSideBack.shift(s+90,n).shift(s,400);a.hemInUp=i.insideSeamBack.intersectsBeam(r,l)[0],a.hemSideUp=i.sideSeamBack.intersectsBeam(r,l)[0],i.hemIn=i.insideSeamBack.split(a.hemInUp)[1].hide(),i.hemSide=i.sideSeamBack.split(a.hemSideUp)[0].hide(),c("mirror",{clone:!1,mirror:[a.hemInBack,a.hemSideBack],paths:["hemIn","hemSide"],points:["hemInUp","hemSideUp"]}),i.legSeamBack=i.hemIn.reverse().clone().unhide().line(i.hemSide.end()).join(i.hemSide.reverse()),i.fold=(new o).move(a.hemInBack).line(a.hemSideBack).attr("class","fabric dashed").setText("fold","text-s center")}if(t.backPocketInside&&"square"!==t.backPocketType?(i.waistSeamPocketPart.hide(),i.seam=i.waistSeamRight.join(i.opening).join(i.waistSeamLeft).join(i.crotchSeamBack).join(i.gussetBack).join(i.insideSeamBack).join(i.legSeamBack).join(i.sideSeamBack).close().attr("class","fabric"),i.seamSA=i.seam.clone()):(i.seam=i.waistSeamBack.join(i.crotchSeamBack).join(i.gussetBack).join(i.insideSeamBack).join(i.legSeamBack).join(i.sideSeamBack).close().attr("class","fabric"),i.seamSA=i.waistSeamBackSA.join(i.crotchSeamBack).join(i.gussetBack).join(i.insideSeamBack).join(i.legSeamBack).join(i.sideSeamBack).close().hide()),t.articulatedKnee&&e.waistToKnee/(e.waistToFloor*l.get("legLength"))<.9){ri(d,h);const n=e.knee*t.articulatedKneeSize,s=e.knee*t.articulatedKneeDartSize,r=a.markerKneeSide.angle(a.markerKneeInside);a.artKneeInside=a.markerKneeInside.shiftTowards(a.markerKneeSide,1.5*n).shift(r+90,.25*n),a.artKneeSide=a.markerKneeSide.shiftTowards(a.markerKneeInside,1.5*n).shift(r+90,.25*n),a.artKneeMiddle=a.artKneeSide.shiftFractionTowards(a.artKneeInside,.5),a.artKneeMiddleUp=a.artKneeMiddle.shift(r-90,.5*s),a.artKneeMiddleDown=a.artKneeMiddle.shift(r+90,.5*s),a.artKneeMiddleUpCpInside=a.artKneeMiddleUp.shift(r,.5*n),a.artKneeMiddleUpCpSide=a.artKneeMiddleUp.shift(r+180,.5*n),a.artKneeMiddleDownCpInside=a.artKneeMiddleDown.shift(r,.5*n),a.artKneeMiddleDownCpSide=a.artKneeMiddleDown.shift(r+180,.5*n),i.kneeDart=(new o).move(a.artKneeInside).curve(a.artKneeInside,a.artKneeMiddleDownCpInside,a.artKneeMiddleDown).curve(a.artKneeMiddleDownCpSide,a.artKneeSide,a.artKneeSide).
1curve(a.artKneeSide,a.artKneeMiddleUpCpSide,a.artKneeMiddleUp).curve(a.artKneeMiddleUpCpInside,a.artKneeInside,a.artKneeInside).addClass("dotted").close()}s.gussetBack=new n("notch",a.gussetBack),s.gussetBackLeg=new n("notch",a.gussetBackLeg),s.backPocketTopLeft=new n("notch",ca(d,i.backPocketSeam,a.backPocketTopLeft)?a.backPocketTopLeft:a.waistSeamBackStart),s.backPocketTopRight=new n("notch",ca(d,i.backPocketSeam,a.backPocketTopRight)?a.backPocketTopRight:a.backPocketBackOpeningSeam),s.backPocketBottomMiddle=new n("notch",a.backPocketBottomMiddle),p&&(a.indicatorWaistbandSide=i.waistSeamBackSA.shiftFractionAlong(.2),a.indicatorWaistbandInside=i.waistSeamBackSA.shiftFractionAlong(.8),e.waistToHips/h>1.1&&(a.indicatorHipsSide=a.indicatorWaistbandSide.shift(i.waistSeamBackSA.angleAt(a.indicatorWaistbandSide)+90,e.waistToHips-h),a.indicatorHipsInside=a.indicatorWaistbandInside.shift(i.waistSeamBackSA.angleAt(a.indicatorWaistbandInside)+90,e.waistToHips-h),a.markerHipsSide=i.sideSeamBack.intersectsBeam(a.indicatorHipsInside,a.indicatorHipsSide)[0],a.markerHipsInside=i.crotchSeamBack.intersectsBeam(a.indicatorHipsInside,a.indicatorHipsSide)[0],i.hipsLine=(new o).move(a.markerHipsInside).line(a.markerHipsSide).attr("class","contrast help"),c("banner",{id:"hipsLine",classes:"center contrast help",path:i.hipsLine,text:"hipsLine"})),a.indicatorSeatSide=a.indicatorWaistbandSide.shift(i.waistSeamBackSA.angleAt(a.indicatorWaistbandSide)+90,e.waistToSeat-h),a.indicatorSeatInside=a.indicatorWaistbandInside.shift(i.waistSeamBackSA.angleAt(a.indicatorWaistbandInside)+90,e.waistToSeat-h),a.markerSeatSide=i.sideSeamBack.intersectsBeam(a.indicatorSeatInside,a.indicatorSeatSide)[0],a.markerSeatInside=i.crotchSeamBack.intersectsBeam(a.indicatorSeatInside,a.indicatorSeatSide)[0],i.seatLine=(new o).move(a.markerSeatInside).line(a.markerSeatSide).attr("class","contrast help"),c("banner",{id:"seatLine",classes:"center contrast help",path:i.seatLine,text:"seatLine"}),e.waistToKnee/(e.waistToFloor*l.get("legLength"))<.97&&(void 0===i.kneeLine?ri(d,h):i.kneeLine=(new o).move(a.markerKneeInside).line(a.markerKneeSide),i.kneeLine.unhide().attr("class","contrast help"),c("banner",{id:"kneeLine",classes:"center contrast help",path:i.kneeLine,text:"kneeLine"})),t.backPocketInside?i.backPocketSeamMarker.unhide().addClass("lining"):i.backPocketSeam.unhide().addClass("lining")),a.gridAnchor=a.pO.clone(),a.logo=a.pE.shift(180,.25*m),s.logo=new n("logo",a.logo),a.scaleboxAnchor=a.logo.shift(270,.25*m),c("scalebox",{at:a.scaleboxAnchor,rotation:180-l.get("backAngle")}),a.title=a.pE.shift(270,.7*m).shift(0,.3*m),c("title",{nr:2,at:a.title,title:"back",align:"center",rotation:180-l.get("backAngle")});const f=a.p11.angle(a.p4),u=.7*a.p11.dist(a.p4);return c("grainline",{from:a.p4orig.shift(f+180,.05*u),to:a.p4orig.shift(f+180,.6*u)}),l.cutlist.addCut({cut:2,from:"fabric"}),r&&(i.sa=i.seamSA.offset(r).attr("class","fabric sa")),la(d,[["h","p2","p4","p2",-15],["h","gussetBack","p2","p2",-15],["h","p2","dartOpeningLeft","p2",-5],["h","dartOpeningRight","p4","p2",-5],["v","hemIn","gussetBackLeg","gussetBack",-35],["v","gussetBackLeg","gussetBack","gussetBack",-35],["v","gussetBack","p2","gussetBack",-35],["v","p4","p2","p4",15],["v","hemSideBack","p4","p4",15]]),"hem"===t.hemType||"elastic"===t.hemType?la(d,[["h","hemSideBack","p4","hemSideUp",15],["h","hemInBack","hemSideBack","hemSideUp",15],["h","gussetBackLeg","hemInBack","hemSideUp",15],["v","hemInUp","hemIn","gussetBack",-35],["v","hemSideUp","hemSide","p4",15]]):la(d,[["h","hemSideBack","p4","hemSideBack",15],["h","hemInBack","hemSideBack","hemSideBack",15],["h","gussetBackLeg","hemInBack","hemSideBack",15]]),d}},ci={name:"crux.backpocket",from:si,options:{},draft:({options:t,points:e,Path:o,paths:a,Snippet:i,snippets:n,sa:s,store:r,macro:l,log:c,part:p})=>{const d=r.get("backAngle");return l("transform",{transform:"rotate",c:e.backPocketTopMiddle,angle:180-d,clone:!1,paths:["backPocketSeamOutline","backPocketOpening","backPocketSeam","backPocketLeftBottomCurve","backPocketRightBottomCurve","waistSeamPocketPartLeft","waistSeamPocketPartRight","curveLeftOfDart","curveRightOfDart","curveDart","curveDartSA","waistSeamPocketPart","opening"],points:["bpT2L","bpL2T","bpL","bpL2B","bpB2L","bpB","bpB2R","bpR2B","bpR","bpR2T","bpT2R","bpT","backPocketTopRight","backPocketTopLeft","backPocketBottomRight","backPocketBottomLeft","backPocketBottomLeftUp","backPocketBottomRightUp","backPocketBottomLeftRight","backPocketBottomRightLeft","backPocketBottomMiddle","backPocketBottomLeftToRightCp","backPocketBottomRightToLeftCp","backPocketBottomLeftToUpCp","backPocketBottomRightToUpCp"]}),a.backPocketOpening.hide(),a.backPocketLeftBottomCurve.hide(),a.backPocketRightBottomCurve.hide(),a.curveRightOfDart.hide(),a.curveDart.hide(),a.curveDartSA.hide(),a.curveLeftOfDart.hide(),a.backPocketSeamOutline.hide(),a.waistSeamPocketPart.hide(),"square"!==t.backPocketType&&a.opening.hide(),t.backPocketInside&&"square"!==t.backPocketType?(a.backPocketSeam=a.curveRightOfDart.clone().join(a.curveDart).join(a.curveLeftOfDart).split(e.backPocketTopLeft)[0].split(e.backPocketTopRight)[1].line(e.backPocketBottomLeftUp).join(a.backPocketLeftBottomCurve).line(e.backPocketBottomRightLeft).join(a.backPocketRightBottomCurve).line(e.backPocketTopRight).close(),a.backPocketSeamSA=a.curveRightOfDart.clone().join(a.curveDartSA).join(a.curveLeftOfDart).split(e.backPocketTopLeft)[0].split(e.backPocketTopRight)[1].line(e.backPocketBottomLeftUp).join(a.backPocketLeftBottomCurve).line(e.backPocketBottomRightLeft).join(a.backPocketRightBottomCurve).line(e.backPocketTopRight).close().hide()):("hole"===t.backPocketType||"diamond"===t.backPocketType?a.opening.unhide():"square"===t.backPocketType&&(e.backPocketTopLeftHem=e.backPocketTopLeft.shift(90,.1*r.get("backPocketHeight")),e.backPocketTopRightHem=e.backPocketTopRight.shift(90,.1*r.get("backPocketHeight")),a.backPocketSeam=(new o).move(e.backPocketTopLeftHem).line(e.backPocketBottomLeft).line(e.backPocketBottomRight).line(e.backPocketTopRightHem).line(e.backPocketTopLeftHem).close().hide(),a.backPocketFold=(new o).move(e.backPocketTopLeft).line(e.backPocketTopRight).attr("class","fabric dashed").setText("fold","text-s center")),a.backPocketSeamSA=a.backPocketSeam.clone().hide()),a.backPocketSeam.unhide(),void 0===a.backPocketSeam?(c.error("Pocket seam is missing!"),p.hide()):(e.gridAnchor=e.backPocketTopLeft.clone(),r.cutlist.addCut({cut:2,from:"fabric"}),n.backPocketTopLeft=new i("notch",ca(p,a.backPocketSeam,e.backPocketTopLeft)?e.backPocketTopLeft:e.waistSeamBackStart),n.backPocketTopRight=new i("notch",ca(p,a.backPocketSeam,e.backPocketTopRight)?e.backPocketTopRight:e.backPocketBackOpeningSeam),n.backPocketBottomMiddle=new i("notch",e.backPocketBottomMiddle),e.logo=e.backPocketTopMiddle.shiftFractionTowards(e.backPocketBottomMiddle,.7),e.title=e.logo.clone(),l("title",{nr:7,at:e.title,title:"pocketback",align:"center",scale:.5}),l("grainline",{from:e.backPocketBottomLeftUp.shift(0,10),to:e.backPocketTopLeft.shift(0,10)}),s&&(a.sa=a.backPocketSeamSA.offset(s).attr("class","fabric sa"),void 0!==a.backPocketOpening&&void 0!==a.backPocketOpeningFront&&(a.backPocketOpeningSA=a.backPocketOpening.reverse().offset(s).attr("class","fabric sa"))),"square"!==t.backPocketType?(e.bpOstart=a.opening.start(),e.bpOstop=a.opening.end(),la(p,[["h","backPocketTopLeft","backPocketTopRight","backPocketTopRight",-25],["h","bpOstop","bpOstart","bpOstop",-15],["h","backPocketBottomLeftRight","backPocketBottomRightLeft","backPocketBottomRight",15],["v","backPocketBottomRightUp","backPocketTopRight","backPocketTopRight",15],["v","backPocketBottomRightLeft","backPocketTopRight","backPocketTopRight",25]]),!1===t.backPocketInside&&la(p,[["h","bpL","bpR","bpB",15],["v","backPocketBottomMiddle","bpB","bpB",20]])):la(p,[["h","backPocketTopLeftHem","backPocketTopRightHem","backPocketTopRightHem",-15],["v","backPocketBottomRightLeft","backPocketTopRightHem","backPocketTopRightHem",25],["v","backPocketBottomRightUp","backPocketTopRight","backPocketTopRight",15]]),p)}},pi={name:"crux.backpocketfacing",from:ci,options:{},draft:({options:t,points:e,Path:o,paths:a,snippets:i,sa:n,store:s,macro:r,part:l})=>
1{if("square"===t.backPocketType)return l.hide();const c=-1*(n?Math.min(4*n,e.bpL.x-e.backPocketTopLeft.x):e.bpL.x-e.backPocketTopLeft.x);return"standard"===t.backPocketType?(a.facingOpening=(new o).move(e.bpR).curve(e.bpR2B,e.bpB2R,e.bpB).curve(e.bpB2L,e.bpL2B,e.bpL).hide(),a.openingOffset=a.facingOpening.offset(c).reverse().addText("Finish","center text-sm"),a.backPocketFacing=a.waistSeamPocketPartRight.clone().join(a.opening).join(a.waistSeamPocketPartLeft).join(a.openingOffset).line(a.waistSeamPocketPartRight.start()).close()):(a.openingOffset=a.opening.clone().offset(c).reverse(),a.backPocketFacing=a.opening.clone().line(a.openingOffset.start()).join(a.openingOffset).line(a.opening.start()).close()),a.backPocketSeam.hide(),a.waistSeamPocketPartLeft.hide(),a.waistSeamPocketPartRight.hide(),delete i.backPocketTopLeft,delete i.backPocketTopRight,delete i.backPocketBottomMiddle,n&&(a.sa=a.backPocketFacing.offset(n).attr("class","fabric sa")),r("rmgrainline"),r("rmahd"),r("rmavd"),n&&(a.backPocketFacingSA=a.backPocketFacing.offset(n).attr("class","fabric sa")),e.gridAnchor=e.backPocketTopLeft.clone(),s.cutlist.addCut({cut:2,from:"fabric"}),e.title=e.bpB.shift(270,5),r("title",{nr:8,at:e.title,title:"backpocketfacing",align:"center",scale:.25,classes:{nr:"text-xl note font-bold"}}),"square"!==t.backPocketType&&(e.bpOstart=a.opening.start(),e.bpOstop=a.opening.end(),e.offBottom=a.openingOffset.edge("bottom"),la(l,[["h","backPocketTopLeft","backPocketTopRight","backPocketTopRight",-25],["h","bpOstop","bpOstart","bpOstop",-15],["v","offBottom","backPocketTopRight","backPocketTopRight",15]])),l}},di={name:"crux.backpocketcargo",after:[ci],options:{},draft:({options:t,Point:e,points:o,Path:a,paths:i,sa:n,store:s,measurements:r,macro:l,part:c})=>{if(!t.backPocketCargo)return c.hide();const p=s.get("backPocketSeamCargoLength"),d=r.waistToFloor*t.backPocketCargoWidth;o.top=new e(0,0),o.topLeft=o.top.shift(270,2*d).shift(180,.5*d),o.topRight=o.top.shift(270,2*d).shift(0,.5*d),o.topCpDownLeft=o.top.shift(270,.5*d).shift(180,.5*d),o.topCpDownRight=o.top.shift(270,.5*d).shift(0,.5*d),o.bottom=o.top.shift(270,p);let h=0;do{o.bottom=o.bottom.shift(90,h),o.bottomLeft=o.bottom.shift(90,2*d).shift(180,.5*d),o.bottomCpUpLeft=o.bottom.shift(90,.5*d).shift(180,.5*d),i.left=(new a).move(o.top).curve(o.top,o.topCpDownLeft,o.topLeft).line(o.bottomLeft).curve(o.bottomCpUpLeft,o.bottom,o.bottom),h=i.left.length()-p}while(h>.1||h<-.1);return o.bottomRight=o.bottom.shift(90,2*d).shift(0,.5*d),o.bottomCpUpRight=o.bottom.shift(90,.5*d).shift(0,.5*d),i.right=(new a).move(o.bottom).curve(o.bottom,o.bottomCpUpRight,o.bottomRight).line(o.topRight).curve(o.topCpDownRight,o.top,o.top),i.seam=i.left.join(i.right).close(),s.cutlist.addCut({cut:2,from:"fabric"}),o.logo=o.top.shiftFractionTowards(o.bottom,.45),o.title=o.logo.clone(),l("title",{nr:9,at:o.title,title:"backpocketcargo",align:"center",scale:.25,rotation:90,classes:{nr:"text-xl note font-bold"}}),n&&(i.sa=i.seam.offset(n).attr("class","fabric sa")),la(c,[["h","topLeft","topRight","top",-15],["v","bottom","top","topRight",15]]),c}},hi={name:"crux.flyshield",from:ni,draft:({points:t,Path:e,paths:o,sa:a,store:i,macro:n,part:s})=>{for(const r in o)delete o[r];for(const r in t)-1===["pZ","flyTop","flyBottom","flyTopCenter","pFBcpZ","pZcpFB"].indexOf(r)&&delete t[r];if(n("transform",{transform:"rotate",angle:270-t.flyTopCenter.angle(t.pZ),c:t.flyTopCenter,clone:!1,points:["pZ","flyTop","flyBottom","pFBcpZ","pZcpFB"]}),t.flyTop.y=t.flyTopCenter.y,a?(t.flyTopCenter=t.flyTopCenter.shift(90,a).shift(0,a),t.flyTop=t.flyTop.shift(90,a),t.pZextra=t.pZ.shift(0,a)):t.pZextra=t.pZ.clone(),o.seam=(new e).move(t.flyTopCenter).line(t.flyTop).line(t.flyBottom).curve(t.pFBcpZ,t.pZcpFB,t.pZ).line(t.pZextra).close().attr("class","fabric").unhide(),t.gridAnchor=t.pZ.clone(),i.cutlist.addCut({cut:1,onFold:!0,from:"fabric"}),t.title=t.pZ.shiftFractionTowards(t.flyTop.shiftFractionTowards(t.flyTopCenter,.6),.5),n("title",{nr:11,at:t.title,title:"flyshield",align:"center",scale:.5,rotation:90,classes:{nr:"text-xl note font-bold"}}),n("cutonfold",{from:t.flyTop,to:t.flyBottom,offset:7}),a){o.sa=o.seam.offset(a);const i=o.sa.intersectsBeam(t.flyTop,t.flyBottom);o.sa=(new e).move(t.flyBottom).join(o.sa.split(i[1])[1].join(o.sa.split(i[0])[0])).line(t.flyTop).attr("class","fabric sa")}return la(s,[["h","flyTop","flyTopCenter","flyTopCenter",-15],["h","flyBottom","pZ","pZ",15],["v","pZextra","flyTopCenter","flyTopCenter",15],["v","pZ","flyBottom","flyBottom",
1-15]]),s}},mi={name:"crux.frontpocketpoints",from:ni,hide:{self:!0,from:!0,inherited:!0},draft:({options:t,measurements:e,Point:o,Path:a,points:i,paths:s,store:r,part:l})=>{const c=ma[t.frontPocketType],p=c.frontPocketWidth,d=c.frontPocketHeight,h=c.frontPocketCurve,m=c.frontPocketOpening,f=c.frontPocketOpeningSquareness,u=c.frontPocketOpeningAspect,g=c.frontPocketOpeningOffset;let b;s.sideSeamFrontOriginal=s.sideSeamFront.clone().hide(),i.frontPocketBottomRight=s.sideSeamFront.reverse().shiftAlong(e.waistToKnee*d),i.frontPocketBottomRightStart=i.frontPocketBottomRight.clone(),i.frontPocketTopLeft=s.waistSeamFront.shiftFractionAlong(4*p),b=s.waistSeamFront.split(i.frontPocketTopLeft),s.waistSeamFrontInside=b[1].hide(),s.waistSeamFrontOutside=b[0].hide(),i.frontPocketBottomLeft=new o(i.frontPocketTopLeft.x,i.frontPocketBottomRight.y);const w=i.frontPocketBottomRight.x-i.frontPocketBottomLeft.x;let k=i.frontPocketBottomLeft.dist(i.frontPocketBottomRight);const C=i.frontPocketBottomLeft.dist(i.frontPocketTopLeft);C/k<1.35&&(k=C/1.35);const v=Math.min(k*h,.52*w),y=v*n.Qr,T=n.Qr*(1-f);i.frontPocketBottomLeftUp=i.frontPocketBottomLeft.shift(90,v),i.frontPocketBottomLeftRight=i.frontPocketBottomLeft.shift(0,v),i.frontPocketBottomLeftToUpCp=i.frontPocketBottomLeft.shift(90,y),i.frontPocketBottomLeftToRightCp=i.frontPocketBottomLeft.shift(0,y);const x=new o(i.frontPocketBottomRight.x+10,i.frontPocketBottomRight.y);return i.frontPocketBottomRightUp=x.shift(90,v),i.frontPocketBottomRightLeft=x.shift(180,v),i.frontPocketBottomRightToLeftCp=x.shift(180,y),i.frontPocketBottomRightToLeftCp.x>i.frontPocketBottomRight.x&&(i.frontPocketBottomRightUp=i.frontPocketBottomRight.copy(),i.frontPocketBottomRightLeft=i.frontPocketBottomRight.copy(),i.frontPocketBottomRightToLeftCp=i.frontPocketBottomRight.copy()),s.frontPocketLeftBottomCurve=(new a).move(i.frontPocketBottomLeftUp).curve(i.frontPocketBottomLeftToUpCp,i.frontPocketBottomLeftToRightCp,i.frontPocketBottomLeftRight).hide(),function(t,e,o,a,i,n){const{points:s}=t.shorthand();s.fpM=s.frontWaistSide.shift(225,e*i),pa(s,"fpT",90,s.fpM,e,a,n),pa(s,"fpB",270,s.fpM,e,a,n),pa(s,"fpL",180,s.fpM,e,a,n),pa(s,"fpR",0,s.fpM,e,a,n),da(s,"fpT2R","fpT",0,o,e,a,n),da(s,"fpT2L","fpT",180,o,e,a,n),da(s,"fpB2R","fpB",0,o,e,a,n),da(s,"fpB2L","fpB",180,o,e,a,n),da(s,"fpR2T","fpR",90,o,e,a,n),da(s,"fpR2B","fpR",270,o,e,a,n),da(s,"fpL2T","fpL",90,o,e,a,n),da(s,"fpL2B","fpL",270,o,e,a,n)}(l,k,T,m,g,u),i.frontPocketBottomRight=s.sideSeamFront.reverse().shiftAlong(e.waistToKnee*d-.45*k),b=s.sideSeamFront.split(i.frontPocketBottomRight),s.sideSeamFrontLower=b[0].hide(),s.sideSeamFrontUpper=b[1].hide(),i.frontPocketTopMiddle=s.waistSeamFrontOutside.shiftFractionAlong("square"===t.frontPocketType?.7:.5),"standard"===t.frontPocketType||"square"===t.frontPocketType?("square"===t.frontPocketType&&(i.frontPocketTopMiddle.x=i.fpL.x),b=s.waistSeamFrontOutside.split(i.frontPocketTopMiddle),s.waistSeamFrontOutside=b[0].hide(),s.waistSeamFrontMiddle=b[1].hide(),i.frontPocketTopMiddleCp=i.frontPocketTopMiddle.shift(195,k*g*T*.5),i.frontPocketOpeningSideSeam=s.sideSeamFront.reverse().shiftAlong((i.fpR2B.y-i.fpT2R.y)*("square"===t.frontPocketType?.74:.85)),i.frontPocketOpeningSideSeamCp=i.frontPocketOpeningSideSeam.shift(245,k*g*T*.5),b=s.sideSeamFrontUpper.split(i.frontPocketOpeningSideSeam),s.sideSeamFrontUpper=b[1].hide(),s.sideSeamFrontMiddle=b[0].hide()):(s.sideSeamFrontMiddle=s.sideSeamFrontUpper.clone(),s.waistSeamFrontMiddle=s.waistSeamFrontOutside.clone(),i.frontPocketTopMiddle=i.waistSeamFrontStart.clone()),i.frontPocketBottomRightToUpCp=i.frontPocketBottomRight.shift(270,y*T),"diamond"===t.frontPocketType||"square"===t.frontPocketType?(b=s.sideSeamFrontLower.split(i.frontPocketBottomRightStart),s.frontPocketRightBottomCurve=b[1].clone().hide()):s.frontPocketRightBottomCurve=(new a).move(i.frontPocketBottomRightLeft).curve(i.frontPocketBottomRightToLeftCp,i.frontPocketBottomRightToUpCp,i.frontPocketBottomRight).hide(),s.frontPocketSeamMarker=(new a).move(i.frontPocketTopLeft).line(i.frontPocketBottomLeftUp).join(s.frontPocketLeftBottomCurve).line(i.frontPocketBottomRightLeft).join(s.frontPocketRightBottomCurve).hide(),s.frontPocketSeam=(new a).move(i.frontPocketTopMiddle).join(s.waistSeamFrontMiddle).join(s.frontPocketSeamMarker).join(s.sideSeamFrontMiddle).hide(),"standard"===t.frontPocketType?s.frontPocketOpening=(new a).move(i.frontPocketTopMiddle).curve(i.frontPocketTopMiddleCp,i.fpL2T,i.fpL).curve(i.fpL2B,i.fpB2L,i.fpB).curve(i.fpB2R,i.frontPocketOpeningSideSeamCp,i.frontPocketOpeningSideSeam).hide():"square"===t.frontPocketType?s.frontPocketOpening=(new a).move(i.frontPocketTopMiddle).line(i.fpL).curve(i.fpL2B,i.fpB2L,i.fpB).curve(i.fpB.shift(0,.5*i.fpB.dist(i.frontPocketOpeningSideSeam)),i.frontPocketOpeningSideSeam,i.frontPocketOpeningSideSeam).hide():"hole"!==t.frontPocketType&&"diamond"!==t.frontPocketType||(s.frontPocketOpening=(new a).move(i.fpT).curve(i.fpT2L,i.fpL2T,i.fpL).curve(i.fpL2B,i.fpB2L,i.fpB).curve(i.fpB2R,i.fpR2B,i.fpR).curve(i.fpR2T,i.fpT2R,i.fpT).hide()),r.set("frontPocketSeamCargoLength",s.frontPocketSeamMarker.length()),l}},fi={name:"crux.front",from:mi,draft:({options:t,Path:e,points:o,paths:a,Snippet:i,snippets:n,sa:s,store:r,measurements:l,complete:c,macro:p,part:d})=>{a.flyFold.unhide().attr("class","fabric dashed").setText("basteHere","text-xs center");const h=r.get("waistDown"),m=l.waistToKnee-h,f=a.sideSeamFront.length()-m;if(t.articulatedKnee&&l.waistToKnee/(l.waistToFloor*r.get("legLength"))<.8){const i=a.sideSeamFront.reverse(),n=l.knee*t.articulatedKneeSize,s=l.knee*t.articulatedKneeDartSize;o.artKneeSideUp=i.shiftAlong(l.waistToKnee-h),o.artKneeSideUpDart=i.shiftAlong(l.waistToKnee-h+s),o.artKneeSideDown=i.shiftAlong(l.waistToKnee-h+2*n),o.artKneeSideDownDart=i.shiftAlong(l.waistToKnee-h-s+2*n),o.artKneeSideInUp=o.artKneeSideUp.shift(i.angleAt(o.artKneeSideUp)-t.articulatedKneeAngle,n),o.artKneeSideUpDart=o.artKneeSideInUp.shiftTowards(o.artKneeSideUpDart,n),o.artKneeSideInDown=o.artKneeSideDown.shift(i.angleAt(o.artKneeSideDown)-(180-t.articulatedKneeAngle),n),o.artKneeSideDownDart=o.artKneeSideInDown.shiftTowards(o.artKneeSideDownDart,n);const r=a.insideSeamFront.reverse();o.artKneeInsideUp=r.shiftAlong(f),o.artKneeInsideUpDart=r.shiftAlong(f-s),o.artKneeInsideDown=r.shiftAlong(f-2*n),o.artKneeInsideDownDart=r.shiftAlong(f+s-2*n),o.artKneeInsideInUp=o.artKneeInsideUp.shift(r.angleAt(o.artKneeInsideUp)+t.articulatedKneeAngle+180,n),o.artKneeInsideUpDart=o.artKneeInsideInUp.shiftTowards(o.artKneeInsideUpDart,n),o.artKneeInsideInDown=o.artKneeInsideDown.shift(r.angleAt(o.artKneeInsideDown)+(180-t.articulatedKneeAngle)+180,n),o.artKneeInsideDownDart=o.artKneeInsideInDown.shiftTowards(o.artKneeInsideDownDart,n),a.artSideSeamUp=a.sideSeamFront.split(o.artKneeSideUp)[1].hide(),!t.frontPocketInside||"standard"!==t.frontPocketType&&"square"!==t.frontPocketType||(a.artSideSeamUp=a.artSideSeamUp.split(o.frontPocketOpeningSideSeam)[0].hide()),a.artSideSeamDown=a.sideSeamFront.split(o.artKneeSideDown)[0].hide(),a.artInsideSeamUp=a.insideSeamFront.split(o.artKneeInsideUp)[0].hide(),a.artInsideSeamDown=a.insideSeamFront.split(o.artKneeInsideDown)[1].hide(),p("transform",{transform:"translate",clone:!1,x:0,y:.96*s*2,paths:["artInsideSeamDown","artSideSeamDown","legSeamFront"],points:["artKneeSideDown","artKneeSideInDown","artKneeSideDownDart","artKneeInsideDown","artKneeInsideInDown","artKneeInsideDownDart","hemIn","hemSide"]}),a.sideSeamFront=(new e).move(o.hemSide).join(a.artSideSeamDown).line(o.artKneeSideDownDart).line(o.artKneeSideUpDart).line(o.artKneeSideUp).join(a.artSideSeamUp),a.insideSeamFront=(new e).move(o.gussetFrontLeg).join(a.artInsideSeamUp).line(o.artKneeInsideUpDart).line(o.artKneeInsideDownDart).line(o.artKneeInsideDown).join(a.artInsideSeamDown),a.darts1=(new e).move(o.artKneeSideUp).line(o.artKneeSideInUp).line(o.artKneeSideUpDart).addClass("dotted"),a.darts2=(new e).move(o.artKneeSideDown).line(o.artKneeSideInDown).line(o.artKneeSideDownDart).addClass("dotted"),a.darts3=(new e).move(o.artKneeInsideUp).line(o.artKneeInsideInUp).line(o.artKneeInsideUpDart).addClass("dotted"),a.darts4=(new e).move(o.artKneeInsideDown).line(o.artKneeInsideInDown).line(o.artKneeInsideDownDart).addClass("dotted")}if(a.sideSeamFrontFull=a.sideSeamFront.clone().hide(),"hem"===t.hemType||"elastic"===t.hemType){const i=l.waistToFloor*t.hemLength,n=o.hemIn.angle(o.hemSide),s=o.hemIn.shift(n+90,i).shift(n+180,400),r=o.hemSide.shift(n+90,i).shift(n,400);o.hemInUp=a.insideSeamFront.intersectsBeam(s,r)[0],o.hemSideUp=a.sideSeamFront.intersectsBeam(s,r)[0],a.hemIn=a.insideSeamFront.split(o.hemInUp)[1].hide(),a.hemSide=a.sideSeamFront.split(o.hemSideUp)[0].hide(),p("mirror",{clone:!1,mirror:[o.hemIn,o.hemSide],paths:["hemIn","hemSide"],points:["hemInUp","hemSideUp"]}),a.legSeamFront=a.hemIn.reverse().clone().unhide().line(a.hemSide.end()).join(a.hemSide.reverse()),a.fold=(new e).move(o.hemIn).line(o.hemSide).attr("class","fabric dashed").setText("fold","text-s center")}else t.hemType;if(t.frontPocketInside?"standard"===t.frontPocketType||"square"===t.frontPocketType?(a.sideSeamFront=a.sideSeamFront.split(o.frontPocketOpeningSideSeam)[0],a.seam=(new e).move(o.frontPocketTopMiddle).join(a.waistSeamFrontMiddle).join(a.waistSeamFrontInside).join(a.fly).join(a.crotchSeamFront).join(a.gussetFront).join(a.insideSeamFront).join(a.legSeamFront).join(a.sideSeamFront).join(a.frontPocketOpening.reverse()).close().attr("class","fabric")):(a.seam=(new e).move(o.waistSeamFrontStart).join(a.waistSeamFront).join(a.fly).join(a.crotchSeamFront).join(a.gussetFront).join(a.insideSeamFront).join(a.legSeamFront).join(a.sideSeamFront).close().attr("class","fabric"),a.frontPocketOpening.unhide().attr("class","fabric")):a.seam=a.waistSeamFront.join(a.fly).join(a.crotchSeamFront).join(a.gussetFront).join(a.insideSeamFront).join(a.legSeamFront).join(a.sideSeamFront).close().attr("class","fabric"),n.n5=new i("notch",o.pZ),n.gussetFront=new i("notch",o.gussetFront),n.gussetFrontLeg=new i("notch",o.gussetFrontLeg),c){const i=a.flyFold.join(a.crotchSeamFront).join(a.gussetFront);o.indicatorWaistbandSide=a.waistSeamFront.shiftFractionAlong(.2),o.indicatorWaistbandInside=a.waistSeamFront.shiftFractionAlong(.8),l.waistToHips/h>1.1&&(o.indicatorHipsSide=o.indicatorWaistbandSide.shift(a.waistSeamFront.angleAt(o.indicatorWaistbandSide)+90,l.waistToHips-h),o.indicatorHipsInside=o.indicatorWaistbandInside.shift(a.waistSeamFront.angleAt(o.indicatorWaistbandInside)+90,l.waistToHips-h),!t.frontPocketInside||"standard"!==t.frontPocketType&&"square"!==t.frontPocketType?o.markerHipsSide=a.sideSeamFrontFull.intersectsBeam(o.indicatorHipsInside,o.indicatorHipsSide)[0]:o.markerHipsSide=a.frontPocketOpening.intersectsBeam(o.indicatorHipsInside,o.indicatorHipsSide)[0],o.markerHipsInside=i.intersectsBeam(o.indicatorHipsInside,o.indicatorHipsSide)[0],a.hipsLine
1=(new e).move(o.markerHipsInside).line(o.markerHipsSide).attr("class","contrast help"),p("banner",{id:"hipsLine",classes:"center contrast help",path:a.hipsLine,text:"hipsLine"})),o.indicatorSeatSide=o.indicatorWaistbandSide.shift(a.waistSeamFront.angleAt(o.indicatorWaistbandSide)+90,l.waistToSeat-h),o.indicatorSeatInside=o.indicatorWaistbandInside.shift(a.waistSeamFront.angleAt(o.indicatorWaistbandInside)+90,l.waistToSeat-h),o.markerSeatSide=a.sideSeamFront.intersectsBeam(o.indicatorSeatInside,o.indicatorSeatSide)[0],o.markerSeatInside=i.intersectsBeam(o.indicatorSeatInside,o.indicatorSeatSide)[0],a.seatLine=(new e).move(o.markerSeatInside).line(o.markerSeatSide).attr("class","contrast help"),p("banner",{id:"seatLine",classes:"center contrast help",path:a.seatLine,text:"seatLine"}),l.waistToKnee/(l.waistToFloor*r.get("legLength"))<.97&&(o.markerKneeSide=a.sideSeamFrontOriginal.reverse().shiftAlong(l.waistToKnee-h+(t.articulatedKnee?l.knee*t.articulatedKneeDartSize*.96:0)),o.indicatorKneeInside=o.markerKneeSide.shift(o.hemSide.angle(o.hemIn),2e3),o.markerKneeInside=a.insideSeamFront.intersectsBeam(o.indicatorKneeInside,o.markerKneeSide)[0],a.kneeLine=(new e).move(o.markerKneeInside).line(o.markerKneeSide).attr("class","contrast help"),p("banner",{id:"kneeLine",classes:"center contrast help",path:a.kneeLine,text:"kneeLine"}))}return c&&(void 0!==a.frontPocketSeamMarker&&a.frontPocketSeamMarker.unhide().addClass("lining stroke-l"),0==t.frontPocketInside&&void 0!==a.frontPocketOpening&&(a.pocketOpeningMarker=a.frontPocketOpening.clone().unhide().addClass("lining"))),o.gridAnchor=o.pO.clone(),r.cutlist.addCut({cut:2,from:"fabric"}),o.logo=o.pE.clone(),n.logo=new i("logo",o.logo),o.title=o.logo.shift(270,80),p("title",{nr:1,at:o.title,title:"front",align:"center"}),p("grainline",{from:o.pocketBL.shiftFractionTowards(o.pocketTL,-.8),to:o.pocketBL.shiftFractionTowards(o.pocketTL,.65)}),s&&(a.sa=a.seam.offset(s).attr("class","fabric sa"),t.frontPocketInside&&(a.frontPocketOpeningSA=a.frontPocketOpening.reverse().offset(s).attr("class","fabric sa"))),o.seamRight=a.seam.edge("right"),la(d,[["h","flyTopCenter","waistSeamFrontStart","waistSeamFrontStart",-15],["h","flyTop","flyTopCenter","waistSeamFrontStart",-15],["h","flyBottom","flyTopCenter","waistSeamFrontStart",-25],["h","gussetFront","flyTopCenter","waistSeamFrontStart",-35],["h","waistSeamFrontStart","seamRight","waistSeamFrontStart",-15],["v","seamRight","waistSeamFrontStart","seamRight",15],["v","flyBottom","flyTopCenter","flyTop",-15],["v","pZ","flyTopCenter","flyTop",-25],["v","gussetFront","flyTopCenter","flyTop",-35],["v","gussetFrontLeg","gussetFront","flyTop",-35],["v","hemIn","gussetFrontLeg","flyTop",-35]]),"hem"===t.hemType||"elastic"===t.hemType?la(d,[["v","hemInUp","hemIn","flyTop",-35],["v","hemSideUp","waistSeamFrontStart","seamRight",25],["h","hemIn","hemSide","hemSideUp",15],["h","hemSide","seamRight","hemSideUp",15],["h","gussetFrontLeg","hemIn","hemSideUp",15],["h","gussetFront","hemIn","hemSideUp",25],["h","hemInUp","hemSideUp","hemSideUp",25]]):la(d,[["v","hemSide","waistSeamFrontStart","seamRight",25],["h","hemIn","hemSide","hemSide",15],["h","hemSide","seamRight","hemSide",15],["h","gussetFrontLeg","hemIn","hemSide",15],["h","gussetFront","hemIn","hemSide",25]]),t.articulatedKnee&&l.waistToKnee/(l.waistToFloor*r.get("legLength"))<.8&&la(d,[["v","hemIn","artKneeInsideUpDart","artKneeInsideUpDart",-25],["v","hemIn","artKneeInsideDownDart","artKneeInsideDownDart",-15],["v","hemSide","artKneeSideUpDart","artKneeSideUpDart",25],["v","hemSide","artKneeSideDownDart","artKneeSideDownDart",15]]),d}},ui={name:"crux.frontpocket",from:mi,options:{},draft:({options:t,points:e,paths:o,sa:a,store:i,macro:n,log:s,part:r})=>{if(t.frontPocketInside?"standard"!==t.frontPocketType&&"square"!==t.frontPocketType||(o.frontPocketSeam=o.frontPocketSeam.join(o.sideSeamFrontUpper).join(o.waistSeamFrontOutside)):"standard"===t.frontPocketType||"square"===t.frontPocketType?o.frontPocketSeam=o.frontPocketSeam.join(o.frontPocketOpening.reverse()):o.frontPocketOpening.unhide(),o.frontPocketSeam.unhide().close(),void 0===o.frontPocketSeam)return s.error("Pocket seam is missing!"),r.hide();switch(e.gridAnchor=e.frontPocketTopLeft.clone(),i.cutlist.addCut({cut:2,from:"fabric"}),e.logo=e.frontPocketTopLeft.shiftFractionTowards(e.frontPocketBottomRight,.6).shiftFractionTowards(e.frontPocketBottomRightLeft,.5),e.title=e.logo.clone(),n("title",{nr:4,at:e.title,title:"frontpocket",align:"center",scale:.5}),n("grainline",{from:e.frontPocketBottomLeftUp.shift(0,10),to:e.frontPocketTopLeft.shift(0,10)}),a&&(o.sa=o.frontPocketSeam.offset(a).attr("class","fabric sa"),0==t.frontPocketInside&&(o.frontPocketOpeningSA=o.frontPocketOpening.reverse().offset(a).attr("class","fabric sa"))),t.frontPocketType){case"standard":la(r,[["h","frontPocketTopLeft","frontPocketOpeningSideSeam","frontPocketTopLeft",-35]]);case"hole":case"diamond":la(r,[["h","frontPocketTopLeft","frontPocketBottomRight","frontPocketTopLeft",-25],["h","frontPocketBottomLeftUp","frontPocketBottomLeftRight","frontPocketBottomRightLeft",15],["h","frontPocketTopLeft","frontPocketTopMiddle","frontPocketTopLeft",-15],["v","frontPocketBottomRightLeft","frontPocketTopLeft","frontPocketTopLeft",-25],["v","frontPocketBottomRightLeft","frontPocketBottomLeftUp","frontPocketTopLeft",-15]]),!1===t.frontPocketInside&&la(r,[["v","frontPocketBottomRightLeft","fpB","fpB",20]]);break;case"square":la(r,[["h","frontPocketTopLeft","frontPocketBottomRight","frontPocketTopLeft",-25],["h","frontPocketTopLeft","frontPocketTopMiddle","frontPocketTopLeft",-15],["v","frontPocketBottomRightLeft","fpB","fpB",40],["v","frontPocketBottomLeftRight","frontPocketTopLeft","frontPocketTopLeft",-15]])}return r}},gi={name:"crux.frontpocketfacing",from:ui,options:{},draft:({options:t,points:e,Path:o,paths:a,sa:i,store:n,macro:s,part:r})=>{const l=-1*(i?Math.min(4*i,e.fpL.x-e.frontPocketTopLeft.x):e.fpL.x-e.frontPocketTopLeft.x);if(a.frontPocketSeam.hide(),"standard"===t.frontPocketType||"square"===t.frontPocketType){a.frontPocketOpeningFacing=a.frontPocketOpening.offset(-1*l);let t=a.frontPocketSeam.intersects(a.frontPocketOpeningFacing);t.length>0&&(a.frontPocketOpeningFacing=a.frontPocketOpeningFacing.split(t[0])[
11].hide()),t.length>1&&(a.frontPocketOpeningFacing=a.frontPocketOpeningFacing.split(t[t.length-1])[0].hide()),e.fpof0=a.frontPocketOpeningFacing.start().clone(),e.fpof1=a.frontPocketOpeningFacing.end().clone(),a.frontPocketOpeningFacing.unhide().addText("Finish","center text-sm"),a.frontPocketFacing=(new o).move(e.fpof0).join(a.frontPocketOpeningFacing).line(e.frontPocketOpeningSideSeam).join(a.frontPocketOpening.reverse()).line(e.fpof0).close()}else a.frontPocketFacing=a.frontPocketOpening.reverse().offset(l).reverse().close(),a.frontPocketOpening.unhide(),t.frontPocketInside&&(a.frontPocketOpeningSA=a.frontPocketOpening.reverse().offset(i).attr("class","fabric sa"));switch(i&&(a.sa=a.frontPocketFacing.offset(i).attr("class","fabric sa")),e.gridAnchor=e.frontPocketTopLeft.clone(),n.cutlist.addCut({cut:2,from:"fabric"}),e.title=e.fpL.shiftFractionTowards(e.fpB,.5).shift(225,e.fpL.dist(e.fpB)*("diamond"===t.frontPocketType?.15:.35)),s("title",{nr:5,at:e.title,title:"frontpocketfacing",align:"center",scale:"diamond"===t.frontPocketType?.15:.25,rotation:40}),s("rmgrainline"),s("rmahd"),s("rmavd"),t.frontPocketType){case"standard":e.frontFacingLeftEdge=a.frontPocketOpeningFacing.edge("left"),e.frontFacingBottomEdge=a.frontPocketOpeningFacing.edge("bottom"),la(r,[["h","frontFacingLeftEdge","fpof1","frontPocketTopLeft",-35]]),la(r,[["h","frontFacingLeftEdge","frontPocketOpeningSideSeam","frontPocketTopLeft",-25],["h","frontFacingLeftEdge","frontFacingBottomEdge","frontFacingBottomEdge",15],["h","frontFacingLeftEdge","frontPocketTopMiddle","frontPocketTopLeft",-15],["v","frontFacingBottomEdge","fpB","fpB",20],["v","frontFacingBottomEdge","fpof0","frontPocketTopLeft",-25],["v","frontFacingBottomEdge","frontFacingLeftEdge","frontPocketTopLeft",-15]]);break;case"hole":case"diamond":e.frontFacingLeftEdge=a.frontPocketFacing.edge("left"),e.frontFacingRightEdge=a.frontPocketFacing.edge("right"),e.frontFacingTopEdge=a.frontPocketFacing.edge("top"),e.frontFacingBottomEdge=a.frontPocketFacing.edge("bottom"),la(r,[["h","fpL","fpR","frontFacingTopEdge",-15],["h","frontFacingLeftEdge","frontFacingRightEdge","frontFacingTopEdge",-25],["v","fpB","fpT","frontFacingRightEdge",15],["v","frontFacingBottomEdge","frontFacingTopEdge","frontFacingRightEdge",25]]);break;case"square":la(r,[["h","fpof0","frontPocketOpeningSideSeamCp","fpof0",-25],["h","fpof0","frontPocketTopMiddle","fpof0",-15],["v","fpof1","fpB","fpof1",15],["v","fpof1","fpof0","fpof0",-15]])}return r}},bi={name:"crux.frontpocketcargo",after:[ui],options:{},draft:({options:t,Point:e,points:o,Path:a,paths:i,sa:n,store:s,measurements:r,macro:l,part:c})=>{if(!t.frontPocketCargo)return c.hide();const p=s.get("frontPocketSeamCargoLength"),d=r.waistToFloor*t.frontPocketCargoWidth;o.top=new e(0,0),o.topLeft=o.top.shift(270,2*d).shift(180,.5*d),o.topRight=o.top.shift(270,2*d).shift(0,.5*d),o.topCpDownLeft=o.top.shift(270,.5*d).shift(180,.5*d),o.topCpDownRight=o.top.shift(270,.5*d).shift(0,.5*d),o.bottom=o.top.shift(270,p);let h=0;do{o.bottom=o.bottom.shift(90,h),o.bottomLeft=o.bottom.shift(90,2*d).shift(180,.5*d),o.bottomCpUpLeft=o.bottom.shift(90,.5*d).shift(180,.5*d),i.left=(new a).move(o.top).curve(o.top,o.topCpDownLeft,o.topLeft).line(o.bottomLeft).curve(o.bottomCpUpLeft,o.bottom,o.bottom),h=i.left.length()-p}while(h>.1||h<-.1);return o.bottomRight=o.bottom.shift(90,2*d).shift(0,.5*d),o.bottomCpUpRight=o.bottom.shift(90,.5*d).shift(0,.5*d),i.right=(new a).move(o.bottom).curve(o.bottom,o.bottomCpUpRight,o.bottomRight).line(o.topRight).curve(o.topCpDownRight,o.top,o.top),i.seam=i.left.join(i.right).close(),s.cutlist.addCut({cut:2,from:"fabric"}),o.logo=o.top.shiftFractionTowards(o.bottom,.45),o.title=o.logo.clone(),l("title",{nr:6,at:o.title,title:"frontpocketcargo",align:"center",scale:.25,rotation:90,classes:{nr:"text-xl note font-bold"}}),n&&(i.sa=i.seam.offset(n).attr("class","fabric sa")),la(c,[["h","topLeft","topRight","top",-15],["v","bottom","top","topRight",15]]),c}};function wi(t,e,o,a,i,n){const{Path:s,points:r,paths:l,log:c}=t.shorthand();let p=0,d=0;do{r[e+"Cp"]=r[e].shift(i,n),l[e]=(new s).move(r[o]).curve(r[o],r[e+"Cp"],r[e]).hide(),d=a-l[e].length(),n+=.7*d,r[e]=r[e].shift(i+180,.3*d),p++}while(p<100&&(d>.1||d<-.1));p>=100&&c.error('Could not find a point for "gussetTopRight" within 100 iterations')}const ki={name:"crux.gusset",from:ni,draft:({options:t,Path:e,points:o,paths:a,Snippet:i,snippets:n,sa:s,store:r,measurements:l,complete:c,macro:p,part:d})=>{const h=o.gussetFrontLeg.x-o.gussetBackLeg.x,m=o.gussetFrontLeg.y-o.gussetBackLeg.y;o.gussetBackToP3cp=a.gussetCrotchBack.ops[1].cp1,o.gussetP3ToBackcp=a.gussetCrotchBack.ops[1].cp2,o.gussetP3ToBackLeg=a.gussetLegBack.ops[1].cp1,o.gussetBackLegToP3=a.gussetLegBack.ops[1].cp2,a.gussetB1=(new e).move(o.gussetBackLeg.copy()).curve(o.gussetBackLeg.copy(),o.gussetBackCp.copy(),o.gussetBack.copy()).curve(o.gussetBackToP3cp.copy(),o.gussetP3ToBackcp.copy(),o.p3.copy()).curve(o.gussetP3ToBackLeg.copy(),o.gussetBackLegToP3.copy(),o.gussetBackLeg.copy()).close().addClass("mark").hide(),a.gussetF1=(new e).move(o.gussetFrontLeg).curve(o.gussetFrontLeg,o.gussetFrontCp,o.gussetFront).join(a.gussetCrotchFront).join(a.gussetLegFront).close().addClass("various").hide(),p("mirror",{clone:!1,mirror:[o.gussetBackLeg,o.p3],points:["gussetBackCp","gussetBack","gussetBackToP3cp","gussetP3ToBackcp","gussetP3ToBackLeg","gussetBackLegToP3"]}),a.gussetB2=(new e).move(o.gussetBackLeg).curve(o.gussetBackLeg,o.gussetBackCp,o.gussetBack).curve(o.gussetBackToP3cp,o.gussetP3ToBackcp,o.p3).curve(o.gussetP3ToBackLeg,o.gussetBackLegToP3,o.gussetBackLeg).close().addClass("lining").hide(),p("transform",{transform:"translate",x:h,y:m,clone:!1,points:["p3","gussetBackCp","gussetBack","gussetBackLeg","gussetBackToP3cp","gussetP3ToBackcp","gussetP3ToBackLeg","gussetBackLegToP3"]}),a.gussetB3=(new e).move(o.gussetBackLeg.copy()).curve(o.gussetBackLeg.copy(),o.gussetBackCp.copy(),o.gussetBack.copy()).curve(o.gussetBackToP3cp.copy(),o.gussetP3ToBackcp.copy(),o.p3.copy()).curve(o.gussetP3ToBackLeg.copy(),o.gussetBackLegToP3.copy(),o.gussetBackLeg.copy()).close().addClass("canvas").hide();const f=(a.gussetCrotchFront.length()+a.gussetCrotchBack.length())*t.gussetExtraSpace,u=o.pR.shiftTowards(o.gussetFront,-1*f);p("transform",{transform:"rotate",angle:o.gussetBackLeg.angle(o.pR)-o.gussetBackLeg.angle(o.p3)-(o.gussetBackLeg.angle(o.pR)-o.gussetBackLeg.angle(u)),c:o.gussetBackLeg,clone:!1,points:["p3","gussetBackCp","gussetBack","gussetBackLeg","gussetBackToP3cp","gussetP3ToBackcp","gussetP3ToBackLeg","gussetBackLegToP3"]}),o.gussetRight=o.gussetFront.copy(),o.gussetLeft=o.gussetBack.copy(),o.gussetBottom=o.gussetBackLeg.copy();const g=a.gussetFront.length(),b=a.gussetBack.length();let w=o.gussetRight.dist(o.gussetFrontCp),k=o.gussetLeft.dist(o.gussetBackCp),C=o.gussetRight.angle(o.gussetLeft)+90;wi(d,"gussetRight","gussetBottom",g,C,w),C=o.gussetRight.angle(o.gussetLeft)+90,wi(d,"gussetLeft","gussetBottom",b,C,k),p("transform",{transform:"rotate",angle:270-C,c:o.gussetBottom,clone:!1,points:["gussetRight","gussetRightCp","gussetLeft","gussetLeftCp"],paths:["gussetLeft","gussetRight"]}),p("mirror",{clone:!0,mirror:[o.gussetRight,o.gussetLeft],points:["gussetBottom"],paths:["gussetLeft","gussetRight"]}),a.mirroredGussetRight=a.mirroredGussetRight.reverse().hide(),a.mirroredGussetLeft=a.mirroredGussetLeft.reverse().hide(),a.seam=(new e).move(o.gussetBottom).join(a.gussetRight).join(a.mirroredGussetRight).join(a.mirroredGussetLeft.reverse()).join(a.gussetLeft.reverse()).close(),o.gussetTopMiddle=o.gussetRight.shiftFractionTowards(o.gussetLeft,.5);const v=o.gussetRight.dist(o.gussetLeft);return o.gl1=o.gussetTopMiddle.shift(45,.5*v).shift(270,.3*v),o.gl2=o.gussetTopMiddle.shift(225,.5*v).shift(270,.3*v),a.gussetLeft=a.gussetLeft.reverse(),a.mirroredGussetLeft=a.mirroredGussetLeft.reverse(),c&&(a.gussetRight.addText("front","center"),a.mirroredGussetRight.addText("front","center").unhide(),a.gussetLeft.addText("back","center"),a.mirroredGussetLeft.addText("back","center").unhide()),n.right=new i("notch",o.gussetRight),n.left=new i("notch",o.gussetLeft),n.top=new i("notch",o.mirroredGussetBottom),n.bottom=new i("notch",o.gussetBottom),o.gridAnchor=o.gussetRight.clone(),r.cutlist.addCut({cut:1,from:"fabric"}),o.logo=o.gussetTopMiddle.clone(),o.title=o.logo.shift(90,.5*v),p("title",{nr:3,at:o.title,title:"gusset",align:"center",scale:.5,rotation:90}),p("grainline",{from:o.gl2,to:o.gl1}),s&&(a.sa=a.seam.offset(s).attr("class","fabric sa"),a.sa=(new e).move(o.gussetBottom.shiftOutwards(o.mirroredGussetBottom,2*s)).join(a.mirroredGussetLeft.offset(s)).join(a.gussetLeft.offset(s)).line(o.mirroredGussetBottom.shiftOutwards(o.gussetBottom,2*s)).join(a.gussetRight.offset(s)).join(a.mirroredGussetRight.offset(s)).close().attr("class","fabric sa")),la(d,[["h","gussetLeft","mirroredGussetBottom","mirroredGussetBottom",-15],["h","mirroredGussetBottom","gussetRight","mirroredGussetBottom",-15],["v","gussetBottom","gussetRight","gussetRight",15],["v","gussetRight","mirroredGussetBottom","gussetRight",15]]),d}},Ci={name:"crux.waistband",after:[fi,li],draft:({options:t,Path:e,Point:o,points:a,paths:i,Snippet:n,snippets:s,sa:r,expand:l,units:c,store:p,measurements:d,macro:h,part:m})=>{const f=p.get("waistLengthBack"),u=p.get("waistLengthFront"),g=p.get("flyWidth"),b=f+u+.5*g+.5*r,w=d.waistToFloor*t.waistBandWidth,k=Math.max(g,w);if(!l)return p.flag.note({msg:"devon:cutWaistband",replace:{width:c(2*w),length:c("ribknit"===t.waistbandType?k+g:2*b)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),p.flag.preset("expand"),m.hide();switch(a.topLeft=new o(0,0),t.waistbandType){case"standard":case"elastic":a.topMiddle=new o(w,0),a.topRight=new o(2*w,0),a.bottomLeft=a.topLeft.shift(270,b),a.bottomMiddle=a.topMiddle.shift(270,b),a.bottomRight=a.topRight.shift(270,b),a.flyMiddle=a.topMiddle.shift(270,g+r),a.flyRight=a.topRight.shift(270,g+r),a.sideLeft=a.topLeft.shift(270,u),s.sideLeft=new n("notch",a.sideLeft),a.backLeft=a.topLeft.shift(270,u+f),s.backLeft=new n("notch",a.backLeft),a.sideRight=a.topRight.shift(270,u+g+r),s.sideRight=new n("notch",a.sideRight),a.logo=a.topMiddle.shiftFractionTowards(a.bottomMiddle,.3),s.logo=new n("logo",a.logo),h("cutonfold",{from:a.bottomLeft,to:a.bottomRight});break;case"ribknit":a.topMiddle=new o(w,0),a.topRight=new o(2*w,0),a.bottomLeft=a.topLeft.shift(270,k+g+r),a.bottomMiddle=a.topMiddle.shift(270,k+g+r),a.bottomRight=a.topRight.shift(270,k+g+r),a.flyMiddle=a.topMiddle.shift(270,g+r),a.flyRight=a.topLeft.shift(270,g+r)}return i.seamSA=(new e).move(a.bottomRight).line(a.topRight).line(a.topLeft).line(a.bottomLeft),i.seam=i.seamSA.clone().line(a.bottomRight).close().attr("class","fabric"),i.fold=(new e).move(a.topMiddle).line(a.bottomMiddle).attr("class","fabric dashed").setText("fold","text-s center"),i.fly=(new e).move(a.flyMiddle).line(a.flyRight).attr("class","fabric dashed"),a.gridAnchor=a.topMiddle.clone(),p.cutlist.addCut({cut:1,from:"fabric",onFold:"ribknit"!==t.waistbandType}),s.flyRight=new n("notch",a.flyRight),a.title=a.topMiddle.shiftFractionTowards(a.topLeft,.7).shiftFractionTowards(a.bottomMiddle,.5),h("title",{nr:10,at:a.title,title:"waistband",align:"center",rotation:90,scale:.4}),r&&(i.sa=(new e).move(a.bottomRight).join(i.seamSA.offset(r)).line(a.bottomLeft).attr("class","fabric sa")),h("rmahd"),h("rmavd"),la(m,[["h","topLeft","topRight","topRight",-15]]),"ribknit"===t.waistbandType?la(m,[["v","bottomRight","topRight","topRight",15],["v","bottomLeft","flyRight","topLeft",-15]]):la(m,[["v","bottomRight","topRight","topRight",35],["v","bottomRight","flyRight","topRight",25],["v","bottomRight","sideRight","topRight",15],["v","sideLeft","topLeft","topLeft",-15],["v","backLeft","topLeft","topLeft",-25]]),m}},vi={name:"crux.waistbanda",after:Ci,draft:({options:t,Path:e,Point:o,points:a,paths:i,sa:n,store:s,expand:r,units:l,measurements:c,macro:p,part:d})=>{if("ribknit"!==t.waistbandType)return d.hide();const h=s.get("flyWidth"),m=c.waistToFloor*t.waistBandWidth,f=Math.max(h,m);return r?(a.topLeft=new o(0,0),a.topMiddle=new o(m,0),a.topRight=new o(2*m,0),a.bottomLeft=a.topLeft.shift(270,f),a.bottomMiddle=a.topMiddle.shift(270,f),a.bottomRight=a.topRight.shift(270,f),i.seam=(new e).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).line(a.topLeft).close().attr("class","fabric"),i.fold=(new e).move(a.topMiddle).line(a.bottomMiddle).attr("class","fabric dashed").setText("fold","text-s center"),a.gridAnchor=a.topMiddle.clone(),s.cutlist.addCut({cut:1,from:"fabric"}),a.title=a.topMiddle.shiftFractionTowards(a.topLeft,.7).shiftFractionTowards(a.bottomMiddle,.5),p("title",{nr:"10a",at:a.title,title:"waistbanda",align:"center",rotation:90,scale:.35}),n&&(i.sa=i.seam.offset(n).attr("class","fabric sa")),la(d,[["h","topLeft","topRight","topRight",-15],["v","bottomRight","topRight","topRight",15]]),d):(s.flag.note({msg:"devon:cutWaistbanda",replace:{width:l(2*m),length:l(f)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),s.flag.preset("expand"),d.hide())}},yi={en:JSON.parse('{"t":"Crux Climbing Pants","d":"Crux Climbing Pants","p":{"back":"Back","front":"Front","gusset":"Gusset","backpocket":"Back pocket","backpocketpoints":"Back pocket points","backpocketfacing":"Back pocket facing","backpocketcargo":"Back pocket cargo strip","flyshield":"Fly shield","frontpocket":"Front pocket","frontpocketpoints":"Front pocket points","frontpocketfacing":"Front pocket facing","frontpocketcargo":"Front pocket cargo strip","basepoints":"Base Points","waistband":"Waistband","waistbanda":"Waistband extra","hipsLine":"Approximate line of the hips","seatLine":"Approximate line of the seat","kneeLine":"Approximate line of the knee"},"s":{"cutWaistband.t":"The waist band is not shown","cutWaistband.d":"The **waist band** is a strip of fabric {{{ width }}} wide and {{{ length }}} long.","cutWaistbanda.t":"The extra waist band is not shown","cutWaistbanda.d":"The **extra waist band** is a strip of fabric {{{ width }}} wide and {{{ length }}} long."},"o":{"hemLength":{"t":"Hem length","d":"Length/Width of the hem"},"hemType":{"t":"Hem type","d":"The type of hem"},"hemType.hem":{"t":"Traditional hem","d":"Folded back hem"},"hemType.ribknit":{"t":"Rib knit hem","d":"Hem is replaced with rib knit"},"waistbandType":{"t":"Waistband type","d":"The type of waistband"},"waistbandType.standard":{"t":"Standard waistband","d":"Waistband made of main fabric"},"waistbandType.elastic":{"t":"Elastic waistband","d":"Waistband with elastic inside"},"waistbandType.ribknit":{"t":"Rib knit waistband","d":"Waistband is replaced with rib knit"},"waistBandWidth":{"t":"Waistband width","d":"The width of the waistband"},"waistbandLower":{"t":"Waistband position","d":"Percentage between waist and hips"},"articulatedKnee":{"t":"Articulated knee","d":"Type of pants leg"},"articulatedKneeYes":{"t":"Articulated knee","d":"Make the knee articulated"},"articulatedKneeNo":{"t":"Standard pants leg","d":"Do not make the knee articulated"},"curvedDarts":{"t":"Curved darts","d":"Type of darts"},"curvedDartsYes":{"t":"Curved darts","d":"Use curved darts"},"curvedDartsNo":{"t":"Straight darts","d":"Use straight darts"},"legLength":{"t":"Leg length","d":"Leg length type"},"legLength.long":{"t":"Long","d":"Standard long pant legs"},"legLength.capris":{"t":"Capris","d":"Pant legs just below the knee"},"legLength.shorts":{"t":"Shorts","d":"Shorts, just above the knee"},"legLength.custom":{"t":"Custom","d":"Set your own pant leg length"},"legLengthCustom":{"t":"Custom leg length","d":"Set your own pant leg length"},"frontPocketType":{"t":"Front pocket type","d":"The type of front pocket"},"frontPocketType.standard":{"t":"Standard","d":"Curved front pocket"},"frontPocketType.hole":{"t":"Hole","d":"Curved front pocket with a hole opening"},"frontPocketType.diamond":{"t":"Diamond","d":"Front pocket with a diamond shaped hole"},"frontPocketType.square":{"t":"Square","d":"Square front pocket"},"backPocketType":{"t":"Back pocket type","d":"The type of back pocket"},"backPocketType.standard":{"t":"Standard","d":"Curved back pocket"},"backPocketType.hole":{"t":"Hole","d":"Curved back pocket with a hole opening"},"backPocketType.diamond":{"t":"Diamond","d":"Back pocket with a diamond shaped hole"},"backPocketType.squar
1e":{"t":"Square","d":"Square back pocket"},"frontPocketCargo":{"t":"Cargo front pocket","d":"Add extra space"},"frontPocketCargoYes":{"t":"Cargo front pocket","d":"Add a strip of fabric to add depth to the front pocket"},"frontPocketCargoNo":{"t":"Normal patch pocket","d":"No extra fabric added"},"backPocketCargo":{"t":"Cargo back pocket","d":"Add extra space"},"backPocketCargoYes":{"t":"Cargo back pocket","d":"Add a strip of fabric to add depth to the back pocket"},"backPocketCargoNo":{"t":"Normal patch pocket","d":"No extra fabric added"},"frontPocketInside":{"t":"Front pocket on the inside","d":"Invert the front pocket"},"frontPocketInsideYes":{"t":"Move the pocket to the inside","d":"The patch pocket now becomes an internal pocket"},"frontPocketInsideNo":{"t":"Normal patch pocket","d":"The pocket is on the outside"},"backPocketInside":{"t":"Back pocket on the inside","d":"Invert the back pocket"},"backPocketInsideYes":{"t":"Move the pocket to the inside","d":"The patch pocket now becomes an internal pocket"},"backPocketInsideNo":{"t":"Normal patch pocket","d":"The pocket is on the outside"},"frontPocketCargoWidth":{"t":"Front pocket cargo width","d":"Adjust the width of the extra strip of fabric"},"backPocketCargoWidth":{"t":"Back pocket cargo width","d":"Adjust the width of the extra strip of fabric"},"fullness":{"t":"Fullness","d":"Add extra fullness to the pant legs"},"waistReduction":{"t":"Waist reduction","d":"Make the waist band smaller than calculated"},"hipsShift":{"t":"Hip shift","d":"Shifts fabric from the front to the back. This is to compensate if you need extra space around the hips in the back of the front. Negative numbers move it to the back."},"gussetDepth":{"t":"Gusset depth","d":"How far down the leg the gusset extends"},"gussetWidthFront":{"t":"Gusset Width in the front","d":"How far up the front seam the gusset extends"},"gussetWidthBack":{"t":"Gusset Width in the back","d":"How far up the back seam the gusset extends"},"gussetExtraSpace":{"t":"Extra Gusset space","d":"Adds extra space between the front and the back in the gusset"},"flyWidth":{"t":"Fly width","d":"The width of the fly"}}}')},Ti=new n.pT({data:ra,parts:[fi,li,ki,ni,hi,mi,ui,bi,gi,si,ci,di,pi,Ci,vi]}),xi={en:JSON.parse('{"t":"Devon","d":"A denim jacket design","p":{"backPanel":"Back panel","backSide":"Back outside","backYoke":"Back yoke","base":"Base","collar":"Collar","cuff":"Cuff","frontFacing":"Front facing","frontInside":"Front inside panel","frontPanel":"Front panel","frontSidePanel":"Front outside panel","frontYoke":"Front yoke","pocket":"Pocket","pocketflap":"Pocket flap","underCollar":"Under collar","upperCollar":"Upper collar","waistband":"Waistband"},"s":{"largeShoulderWidth.t":"Shoulder Width larger than anticipated","largeShoulderWidth.d":"The pattern was not able to generate an optimal armhole shape using the given measurements and options. Please be aware that the generated pattern may not be correct. Please retake your measurements, verify that they are correct, and try generating a new pattern with the new measurements.","cutWaistband.t":"The waist band is not shown","cutWaistband.d":"The **waist band** is a strip of fabric {{{ width }}} wide and {{{ length }}} long.","cutCuff.t":"The cuffs are not shown","cutCuff.d":"The **cuffs** require two strips of fabric {{{ width }}} wide and {{{ length }}} long."},"o":{"cuffWidth":{"t":"Cuff width","d":"The width of the cuff."},"frontPocket":{"t":"Front pocket","d":"Enable this option to create a front pocket"},"frontPocketNo":{"t":"Do not create a front pocket","d":"Leave out the front pocket in the panel seam"},"frontPocketYes":{"t":"Create a front pocket","d":"This creates a front pocket in the panel seam"},"fullBustAdjustment":{"t":"Full Bust Adjustment","d":"Tries to adjust the jacket to better fit a full bust."},"fullBustAdjustmentNo":{"t":"No Full Bust Adjustment","d":"Do not adjust the jacket to better fit a full bust."},"fullBustAdjustmentYes":{"t":"Full Bust Adjustment","d":"Adjust the jacket to better fit a full bust."},"hemEase":{"t":"Hem ease","d":"The amount of ease at the hem."},"neckDrop":{"t":"Neck drop","d":"The amount the front of the neck will drop."},"shoulderShift":{"t":"Shoulder shift","d":"This controls how far the shoulder seam is shifted to the front."},"waistAdjustment":{"t":"Waist/Hips adjustment","d":"Adjusts the bottom of the denim jacket to match the hips measurement."},"waistAdjustmentNo":{"t":"No waist/hips adjustment","d":"Do not Adjust the bottom of the denim jacket to match the hips measurement."},"waistAdjustmentYes":{"t":"Waist/Hips adjustment","d":"Adjust the bottom of the denim jacket to match the hips measurement."},"waistbandWidth":{"t":"Waistband width","d":"The width of the waistband."},"yokeDrop":{"t":"Yoke drop","d":"How far the yoke will drop down. Percentage of back neck-to-waist."}}}')},Bi=JSON.parse('{"id":"noble","name":"Noble body block","code":"Wouter Van Wageningen","de
1scription":"A FreeSewing pattern for a princess seam bodice block","design":"Wouter Van Wageningen","difficulty":3,"block":true,"tags":["blocks","tops"],"techniques":["block","curved-seam","precision","princess-seam"],"version":"4.6.0","pkg":"@freesewing/noble","collection":true}'),Si={en:JSON.parse('{"t":"Noble body block","d":"Noble is a body block with prince(ess) seams","p":{"back":"Back","backInside":"Back inside","backOutside":"Back outside","backPoints":"Back base","front":"Front","frontInside":"Front inside","frontOutside":"Front outside","frontPoints":"Front base"},"s":{},"o":{"dartPosition":{"t":"Dart position","d":"Controls whether to split at the shoulder or armhole"},"dartPosition.armhole":{"t":"Dart position at the armhole","d":"This moves the prince(ss) seam to the armhole"},"dartPosition.shoulder":{"t":"Dart position at the shoulder","d":"This moves the prince(ss) seam to the shoulder"},"chestEase":{"t":"Chest ease","d":"Controls the amount of ease at the chest"},"waistEase":{"t":"Waist ease","d":"Controls the amount of ease at the waist"},"bustSpanEase":{"t":"Bust span ease","d":"Controls the amount of ease along the bust span"},"waistdartposition":{"t":"Waist dart position","d":"Controls the position of the waist \'dart\', moving it to the center (negative) or side (positive)"},"backDartHeight":{"t":"Controls the height of the back dart","d":"Back dart height"},"waistDartLength":{"t":"Waist dart length","d":"Controls the length of the waist dart"},"shoulderDartCurvature":{"t":"Shoulder dart curvature","d":"Controls the curvature of the upper part of the shoulder dart"},"shoulderDartPosition":{"t":"Shoulder dart position","d":"Controls the position of the shoulder dart"},"upperDartLength":{"t":"Upper dart length","d":"Controls the length of the upper dart"},"armholeDartPosition":{"t":"Armhole dart position","d":"Controls the position of the armhole dart"},"armholeDepth":{"t":"Armhole depth","d":"Controls the depth of the armhole"},"armholeDartCurved":{"t":"Princess Seam Curviness","d":"Controls the curvature of the princess seam"},"armholeDartCurvedYes":{"t":"Cruved princess seam","d":"The princess seam will have the v1 curvature"},"armholeDartCurvedNo":{"t":"Straighter princess seam","d":"The princess seam will have the v2 curvature"},"armholeDartCurvePoint":{"t":"Armhole princess seam curve point","d":"This controls where (vertically) the curve of the princess seam starts"},"armholeDartCurveWidth":{"t":"Armhole princess seam curve width","d":"This controls the radius of the curve of the princess seam"},"backArmholeSlant":{"t":"Back armhole slant","d":"Controls the slant of the armhole at the back"},"backArmholeCurvature":{"t":"Back armhole curvature","d":"Controls how deep the armhole is scooped out at the back"},"frontArmholeCurvature":{"t":"Front armhole curvature","d":"Controls how deep the armhole is scooped out at the front bottom"},"frontArmholePitchDepth":{"t":"Front armhole pitch depth","d":"Controls how deep the armhole cuts into the front"},"backArmholePitchDepth":{"t":"Back armhole pitch depth","d":"Controls how deep the armhole cuts into the back"},"backNeckCutout":{"t":"Back neck cutout","d":"Controls how deep the neck is cutout in the back"},"backHemSlope":{"t":"Back hem slope","d":"Controls the slope of the back hem"},"frontShoulderWidth":{"t":"Front shoulder width","d":"Controls how much width is added to the shoulder in the front"},"highBustWidth":{"t":"High bust width","d":"Controls the width of the high bust"},"shoulderToShoulderEase":{"t":"Shoulder to shoulder ease","d":"Controls the amount of ease along the shoulder to shoulder measurement"},"fullChestEaseReduction":{"t":"Full chest ease reduction","d":"Allows you to independently reduce the ease around the chest to make it fit tight(er) in that area"}}}')},Li=.995,Pi=1,Ri=.9,Fi=0,Ei=1e-6,Wi=1,Hi={pct:0,min:-5,max:20,...(0,n.Wx)("bustSpan"),menu:"fit"},Ai={deg:2.5,min:0,max:5,menu:"advanced"},Oi={pct:90,min:80,max:95,menu:"darts"},Di={dflt:"shoulder",list:["shoulder","armhole"],menu:"darts"},Ni={pct:0,min:-100,max:100,menu:"darts"},Ii={pct:0,min:-5,max:2.5,menu:(t,e)=>"shoulder"===e.dartPosition&&"darts"},Mi={pct:50,min:10,max:90,menu:(t,e)=>"shoulder"===e.dartPosition&&"darts"},_i={pct:50,min:10,max:90,menu:(t,e)=>"armhole"===e.dartPosition&&"darts"},ji={bool:!0,menu:(t,e)=>"armhole"===e.dartPosition&&"darts"},Gi={pct:20,min:-20,max:90,menu:(t,e)=>"armhole"===e.dartPosition&&(!e.armholeDartCurved&&"darts")},Ui={pct:70,min:10,max:90,menu:(t,e)=>"armhole"===e.dartPosition&&(!e.armholeDartCurved&&"darts")},Yi={name:"noble.backPoints",from:it,hide:n.V9.HIDE_ALL,options:i,draft:({points:t,Path:e,paths:o,options:a,snippets:i,log:n,part:s})=>{for(const p of Object.keys(o))o[p].hide();for(const p in i)delete i[p];if(delete t.bustDartLeft,delete t.bustDartLeftCp,"shoulder"==a.dartPosition)t.
1shoulderDart=t.hps.shiftFractionTowards(t.shoulder,a.shoulderDartPosition);else{const o=(new e).move(t.shoulder)._curve(t.armholePitchCp2,t.armholePitch).curve(t.armholePitchCp1,t.armholeCp2,t.armhole);t.shoulderDart=o.shiftFractionAlong(a.armholeDartPosition)}let r=t.dartTip.angle(t.shoulderDart);r>180&&(r=360-r);const l=t.dartBottomRight.angle(t.dartTip),c=Math.abs(r-l)/("shoulder"==a.dartPosition?50:400);if("shoulder"==a.dartPosition){t.shoulderDartCpUp=t.shoulderDart.shiftFractionTowards(t.dartTip,1-c),t.shoulderDartCpDown=t.shoulderDart.shiftFractionTowards(t.dartTip,1+2*c);const o={i:(new e).move(t.dartBottomLeft).curve(t.dartLeftCp,t.shoulderDartCpDown,t.dartTip).curve(t.shoulderDartCpUp,t.shoulderDart,t.shoulderDart).length()};let a=0,i=0,s=0;do{o.o&&(s=i/(o.i/1300)*(o.o>o.i?-.1:.1)),t.dartBottomRight=t.dartBottomRight.rotate(s,t.waistSide),o.o=(new e).move(t.shoulderDart).curve(t.shoulderDart,t.shoulderDartCpUp,t.dartTip).curve(t.shoulderDartCpDown,t.dartRightCp,t.dartBottomRight).length(),i=o.o-o.i,a++}while(i<-.5||i>.5&&a<100);a>=100&&n.error("Something is not quite right here!")}else{t.shoulderDartCpUp=t.shoulderDart.shiftFractionTowards(t.dartTip,1-c),t.dartTip=t.dartLeftCp.shiftFractionTowards(t.dartTip,.5),t.shoulderDartCpDown=t.shoulderDartCpUp.shiftFractionTowards(t.dartTip,1+4*c);const o={i:(new e).move(t.dartBottomLeft).curve(t.dartLeftCp,t.shoulderDartCpDown,t.dartTip).curve(t.shoulderDartCpUp,t.shoulderDart,t.shoulderDart).length()};let a=0,i=0,s=0;do{o.o&&(s=i/(o.i/1300)*(o.o>o.i?-.1:.1)),t.dartBottomRight=t.dartBottomRight.rotate(s,t.waistSide),o.o=(new e).move(t.shoulderDart).curve(t.shoulderDart,t.shoulderDartCpUp,t.dartTip).curve(t.shoulderDartCpDown,t.dartRightCp,t.dartBottomRight).length(),i=o.o-o.i,a++}while(i<-.5||i>.5&&a<100);a>=100&&n.error("Something is not quite right here!")}return o.armhole=(new e).move(t.armhole).curve(t.armholeCp2,t.armholePitchCp1,t.armholePitch).curve_(t.armholePitchCp2,t.shoulder),s}},$i={name:"noble.backInside",from:Yi,draft:({sa:t,Point:e,points:o,Path:a,paths:i,Snippet:n,snippets:s,options:r,macro:l,store:c,part:p})=>{for(let d of Object.keys(i))i[d].hide();for(let d in s)delete s[d];return i.princess=(new a).move(o.dartBottomLeft).curve(o.dartLeftCp,o.shoulderDartCpDown,o.dartTip).curve(o.shoulderDartCpUp,o.shoulderDart,o.shoulderDart),"shoulder"===r.dartPosition?i.armhole=(new a).move(o.shoulderDart):i.armhole=i.armhole.split(o.shoulderDart)[1],i.insideSeam=(new a).move(o.cbNeck).curve_(o.cbNeckCp2,o.waistCenter).line(o.dartBottomLeft).curve(o.dartLeftCp,o.shoulderDartCpDown,o.dartTip).curve(o.shoulderDartCpUp,o.shoulderDart,o.shoulderDart).join(i.armhole).line(o.hps)._curve(o.cbNeckCp1,o.cbNeck).close().attr("class","fabric"),o.grainlineFrom=new e(o.hps.x/2,o.shoulder.y),o.grainlineTo=new e(o.hps.x/2,o.waistSide.y),l("grainline",{from:o.grainlineFrom,to:o.grainlineTo}),s.dartTip=new n("notch",o.dartTip),c.cutlist.removeCut(),c.cutlist.addCut({onF
1old:!1}),l("title",{at:o.titleAnchor,nr:3,title:"shoulder"!=r.dartPosition?"back":"backInside"}),o.gridAnchor=o.hps.clone(),t&&(i.sa=i.insideSeam.offset(t).attr("class","fabric sa")),"shoulder"==r.dartPosition?o.shoulderPoint=o.shoulderDart.clone():o.shoulderPoint=o.shoulder.clone(),l("hd",{from:o.waistCenter,to:o.shoulderPoint,y:o.waistCenter.y+t+25,id:"middleToShoulder"}),l("hd",{from:o.waistCenter,to:o.dartTip,y:o.waistCenter.y+t+35,id:"middleToDartPoint"}),l("hd",{from:o.waistCenter,to:o.dartBottomLeft,y:o.waistCenter.y+t+45,id:"middleToDart"}),l("hd",{from:o.cbNeck,to:o.dartBottomLeft,y:o.waistCenter.y+t+55,id:"neckToDart"}),l("hd",{from:o.cbNeck,to:o.hps,y:o.hps.y-t-15,id:"neckToHps"}),l("hd",{from:o.hps,to:o.shoulderPoint,y:o.hps.y-t-15,id:"hpsToShoulder"}),"shoulder"===r.dartPosition?l("vd",{from:o.hps,to:o.dartBottomLeft,x:o.shoulderPoint.x+t+45,id:"middleToHps"}):(l("hd",{from:o.waistCenter,to:o.shoulderDart,y:o.waistCenter.y+t+15,id:"middleToShoulderDart"}),l("vd",{from:o.shoulderDart,to:o.dartBottomLeft,x:o.shoulderDart.x+t+15,id:"dartToArmhole"})),l("vd",{from:o.shoulderPoint,to:o.dartTip,x:o.shoulderPoint.x+t+15,id:"dartPointToShoulder"}),l("vd",{from:o.shoulderPoint,to:o.dartBottomLeft,x:o.shoulderPoint.x+t+25,id:"dartToShoulder"}),l("vd",{from:o.shoulderPoint,to:o.waistCenter,x:o.shoulderPoint.x+t+35,id:"middleToShoulder"}),l("vd",{from:o.waistCenter,to:o.cbNeck,x:o.cbNeck.x-t-15,id:"hemToNeck"}),l("vd",{from:o.waistCenter,to:o.hps,x:o.cbNeck.x-t-25,id:"hemToHps"}),p}},zi={name:"noble.backOutside",from:Yi,draft:({sa:t,Point:e,points:o,Path:a,paths:i,Snippet:n,snippets:s,options:r,macro:l,store:c,part:p})=>{i.dart=(new a).move(o.shoulderDart).curve(o.shoulderDart,o.shoulderDartCpUp,o.dartTip).curve(o.shoulderDartCpDown,o.dartRightCp,o.dartBottomRight).hide(),"shoulder"!==r.dartPosition&&(i.armhole=i.armhole.split(o.shoulderDart)[0]),i.outsideSeam=(new a).move(o.dartBottomRight).line(o.waistSide).curve_(o.waistSideCp2,o.armhole).join(i.armhole).line(o.shoulderDart).join(i.dart).close().attr("class","fabric"),o.grainlineFrom=new e(Math.max(o.shoulderDart.x,o.dartBottomRight.x),1.2*Math.max(o.shoulder.y,o.shoulderDart.y)),o.grainlineTo=new e(o.grainlineFrom.x,.9*o.waistSide.y),l("grainline",{from:o.grainlineFrom,to:o.grainlineTo}),s.dartTip=new n("notch",o.dartTip),c.cutlist.removeCut(),c.cutlist.addCut({onF
1old:!1}),o.titleAnchor=o.dartBottomRight.shiftFractionTowards(o.waistSide,.1).shiftFractionTowards(o.shoulder,.3),l("title",{at:o.titleAnchor,nr:4,title:"backOutside"}),o.gridAnchor=o.armholeCpTarget.clone(),t&&(i.sa=i.outsideSeam.offset(t).attr("class","fabric sa"));let d=i.dart.edge("left");return l("hd",{from:d,to:o.waistSide,y:o.waistCenter.y+t+15,id:"leftToSide"}),l("hd",{from:o.dartBottomRight,to:o.armhole,y:o.waistCenter.y+t+25,id:"dartToArmhole"}),l("hd",{from:o.dartTip,to:o.waistSide,y:o.waistCenter.y+t+15,id:"leftToSide"}),l("hd",{from:o.dartBottomRight,to:o.waistSide,y:o.waistCenter.y+t+25,id:"dartToSide"}),l("hd",{from:o.shoulderDart,to:o.armhole,y:o.shoulderDart.y-t-35,id:"dartToArmhole"}),l("vd",{from:o.shoulder,to:o.dartTip,x:o.armhole.x+t+15,id:"dartPointToShoulder"}),l("vd",{from:o.armhole,to:o.waistSide,x:o.armhole.x+t+15,id:"sideToArmhole"}),l("vd",{from:o.shoulderDart,to:o.dartBottomRight,x:o.armhole.x+t+45,id:"dartToDart"}),"shoulder"===r.dartPosition?(l("hd",{from:d,to:o.shoulder,y:o.shoulderDart.y-t-15,id:"leftToShoulder"}),l("hd",{from:o.shoulderDart,to:o.shoulder,y:o.shoulderDart.y-t-25,id:"dartToShoulder"}),l("vd",{from:o.shoulder,to:o.dartTip,x:o.armhole.x+t+15,id:"dartPointToShoulder"}),l("vd",{from:o.shoulder,to:o.waistSide,x:o.armhole.x+t+25,id:"sideToShoulder"}),l("vd",{from:o.shoulder,to:o.dartBottomRight,x:o.armhole.x+t+35,id:"dartToShoulder"})):(l("hd",{from:d,to:o.shoulderDart,y:o.shoulderDart.y-t-15,id:"leftToShoulder"}),l("vd",{from:o.shoulderDart,to:o.dartTip,x:o.armhole.x+t+25,id:"dartPointToShoulder"}),l("vd",{from:o.shoulderDart,to:o.armhole,x:o.armhole.x+t+15,id:"dartPointToShoulder"})),p}},Ji=(t,e,o,a,i,s)=>{const r=t.waistDartRight.dist(t.sideHemInitial);t.waistDartRight=t.waistDartRight.rotate(i.rad2deg(Math.atan(a/r)),t.sideHemInitial);let l=(new e).move(t.waistDartRight).curve(t.bustAcp,t.shoulderDartTipCpDownOutside,t.shoulderDartOutside);return t.waistUpDartRight=l.shiftAlong(.5*t.waistDartRight.dist(t.waistDartRightCp)),t.waistUpDartRightCpDown=t.waistUpDartRight.shiftFractionTowards(t.waistDartRight,.25),t.waistUpDartRightCpUp=t.waistUpDartRight.shiftFractionTowards(t.waistDartRight,-.6),t.waistCpUp=t.waistDartRight.shiftTowards(t.sideHemInitial,.25*t.waistDartRight.dist(t.waistUpDartRight)).rotate(90,t.waistDartRight),t.waistCircleInsideCp1=t.armholeDartTip.shiftTowards(t.armholeDartTipCpDownInside,-.5*n.Qr*t.armholeDartInside.dist(t.armholeDartTip)),o.princessSeam=(new e).move(t.waistDartRight).curve(t.waistCpUp,t.waistUpDartRightCpDown,t.waistUpDartRight).join(((t,e,o)=>{const a=(new e).move(t.waistUpDartRight).curve(t.waistUpDartRightCpUp,t.shoulderDartTipCpDownOutside,t.shoulderDartOutside),i=a.shiftFractionAlong(.15+-1*o.shoulderDartCurvature),n=a.shiftFractionAlong(.5+-1*o.shoulderDartCurvature),s=a.shiftFractionAlong(.9+-.5*o.shoulderDartCurvature),r=a.split(i),l=r[1].split(n),c=l[1].split(s),p=r[0].clone(),d=l[0].clone(),h=c[0].clone(),m=c[1].clone();t.shoulderDartPart1from=p.ops[0].to.copy(),t.shoulderDartPart1cp1=p.ops[1].cp1.copy(),t.shoulderDartPart1cp2=p.ops[1].cp2.copy(),t.shoulderDartPart1to=p.ops[1].to.copy(),t.shoulderDartPart2from=d.ops[0].to.copy(),t.shoulderDartPart2cp1=d.ops[1].cp1.copy(),t.shoulderDartPart2cp2=d.ops[1].cp2.copy(),t.shoulderDartPart2to=d.ops[1].to.copy(),t.shoulderDartPart3from=h.ops[0].to.copy(),t.shoulderDartPart3cp1=h.ops[1].cp1.copy(),t.shoulderDartPart3cp2=h.ops[1].cp2.copy(),t.shoulderDartPart3to=h.ops[1].to.copy(),t.shoulderDartPart4from=m.ops[0].to.copy(),t.shoulderDartPart4cp1=m.ops[1].cp1.copy(),t.shoulderDartPart4cp2=m.ops[1].cp2.copy(),t.shoulderDartPart4to=m.ops[1].to.copy();const f=t.shoulderDartPart2to.angle(t.shoulderDartPart2cp2),u=t.shoulderDartPart2to.dist(t.shoulderDartPart2cp2),g=t.shoulderDartPart3from.angle(t.shoulderDartPart3cp1),b=t.shoulderDartPart3from.dist(t.shoulderDartPart3cp1);return t.shoulderDartPart2to=t.shoulderDartPart2to.rotate(100*o.shoulderDartCurvature,t.shoulderDartPart2from),t.shoulderDartPart3from=t.shoulderDartPart2to.copy(),t.shoulderDartPart2cp2=t.shoulderDartPart2to.shift(f,u),t.shoulderDartPart3cp1=t.shoulderDartPart3from.shift(g,b),(new e).move(t.shoulderDartPart1from).curve(t.shoulderDartPart1cp1,t.shoulderDartPart1cp2,t.shoulderDartPart1to).curve(t.shoulderDartPart2cp1,t.shoulderDartPart2cp2,t.shoulderDartPart2to).curve(t.shoulderDartPart3cp1,t.shoulderDartPart3cp2,t.shoulderDartPart3to).curve(t.shoulderDartPart4cp1,t.shoulderDartPart4cp2,t.shoulderDartPart4to)})(t,e,s)).reverse().hide(),o.princessSeam.length()},Ki=(t,e,o,a)=>{const i=t.armholeDartTipInside.dist(t.armholeDartTipCpDownInside);t.waistCircleOutsideCp1=t.waistCircleOutsideCp1.shiftTowards(t.waistUpDartRight,a),t.armholeDartTipCpDownInside=t.waistCircleInsideCp1.shiftOutwards(t.armholeDartTipInside,i),e.armholeTempCircleOutside=(new o).move(t.armholeDartOutside).curve(t.armholeCircleOutsideCp1,t.waistCircleOutsideCp1,t.waistUpDartRight).curve(t.waistUpDartRightCpDown,t.waistCpUp,t.waistDartRight).hide(),e.armholeTempCircleInside=(new o).move(t.armholeDartInside).curve(t.armholeCircleInsideCp1,t.waistCircleInsideCp1,t.armholeDartTipInside).curve(t.armholeDartTipCpDownInside,t.waistDartLeftCp,t.waistDartLeft).hide()},Vi={name:"noble.frontPoints",from:nt,hide:n.V9.HIDE_ALL,options:i,draft:({log:t,points:e,Path:o,paths:a,snippets:i,options:s,macro:r,part:l,utils:c})=>{for(const n of Object.keys(a))a[n].hide();for(const n in i)delete i[n];r("rmtitle"),r("rmscalebox");const p=(new o).move(e.shoulder)._curve(e.armholePitchCp2,e.armholePitch).curve(e.armholePitchCp1,e.armholeCp2,e.armhole);e.armholeDartInside=p.shiftFractionAlong("shoulder"==s.dartPosition?.5:s.armholeDartPosition),e.armholeDartOutside=e.armholeDartInside.clone();const d=p.split(e.armholeDartInside),h=d[0].clone().hide(),m=d[1].clone().hide();e.armholeInsidePitch=h.ops[1].to.clone(),e.armholeInsidePitchCp2=h.ops[1].cp2.clone(),e.shoulderCp1=h.ops[1].cp1.clone(),2==h.ops.length?(e.armholeInsidePitchCp1=e.armholeDartInside.clone(),e.armholeDartInsideCp2=e.armholeDartInside.clone()):(e.armholeInsidePitchCp1=h.ops[2].cp1.clone(),e.armholeDartInsideCp2=h.ops[2].cp2.clone()),e.armholeDartOutsideCp1=m.ops[1].cp1.clone(),e.armholeOutsidePitch=m.ops[1].to.clone(),e.armholeOutsidePitchCp2=m.ops[1].cp2.clone(),2==m.ops.length?(e.armholeOutsidePitchCp1=m.ops[1].cp1.clone(),e.armholeCp2=m.ops[1].cp2.clone()):(e.armholeOutsidePitchCp1=m.ops[2].cp1.clone(),e.armholeCp2=m.ops[2].cp2.clone()),e.armholeDartInside.sitsRoughlyOn(e.armholeInsidePitch)?a.armholeInside=(new o).move(e.armholeDartInside).curve(e.armholeInsidePitchCp2,e.shoulderCp1,e.shoulder).hide():a.armholeInside=(new o).move(e.armholeDartInside).curve(e.armholeDartInsideCp2,e.armholeInsidePitchCp1,e.armholeInsidePitch).curve(e.armholeInsidePitchCp2,e.shoulderCp1,e.shoulder).hide(),e.armholeDartArmhole=e.armholeDartInside.shiftFractionTowards(e.armholeDartOutside,.5),e.armholeDartTip=e.armholeDartArmhole.shiftFractionTowards(e.bust,s.upperDartLength);const f=e.waistDartLeft.dist(e.waistDartRight)/2*s.waistdartposition;if(e.waistDartLeft=e.waistDartLeft.shiftTowards(e.cfHem,-1*f),e.waistDartLeftCp=e.waistDartLeftCp.shift(270,2*f),e.waistDartRight=e.waistDartRight.shiftTowards(e.sideHemInitial,f),e.shoulderDartInside=e.hps.shiftFractionTowards(e.shoulder,"shoulder"==s.dartPosition?s.shoulderDartPosition:.5),s.armholeDartCurved){const t=h.reverse().shiftAlong(1).angle(m.shiftAlong(1))-90;e.armholeCircleInsideCp1=e.armholeDartInside.shift(t,n.Qr*e.armholeDartInside.dist(e.armholeDartTip)),e.armholeCircleOutsideCp1=e.armholeCircleInsideCp1.clone()}else e.aboveBustPointInside=e.bust.shiftFractionTowards(e.waistDartLeft,-1*s.armholeDartCurvePoint),e.armholeToBustInside=e.armholeDartInside.shiftFractionTowards(e.aboveBustPointInside,s.armholeDartCurveWidth),e.waistToBustInside=e.waistDartLeft.shiftFractionTowards(e.bust,.2),e.aboveBustPointOutside=e.aboveBustPointInside.clone(),e.armholeToBustOutside=e.armholeToBustInside.clone(),e.waistToBustOutside=e.waistToBustInside.clone();let u=e.shoulderDartInside.angle(e.bustA)-e.bustDartTop.angle(e.bustA);u<0&&(u+=360),u>360&&(u-=360),e.shoulderDartCpTop=e.bustDartCpTop.rotate(u,e.bustA),e.shoulderDartCpBottom=e.bustDartCpBottom.rotate(u,e.bustA),u=e.armholeDartInside.angle(e.bustA)-e.bustDartTop.angle(e.bustA),u<0&&(u+=360),u>360&&(u-=360),e.armholeDartCpTop=e.bustDartCpTop.rotate(u,e.bustA),e.armholeDartCpBottom=e.bustDartCpBottom.rotate(u,e.bustA);const g=e.bustA.angle(e.bustDartBottom)-e.bustA.angle(e.bustDartTop);e.shoulderDartOutside=e.shoulderDartInside.rotate(g,e.bustA),e.shoulderDartShoulder=e.shoulderDartInside.shiftFractionTowards(e.shoulderDartOutside,.5),e.shoulderDartTip=e.shoulderDartShoulder.shiftFractionTowards(e.bust,s.upperDartLength),e.shoulder=e.shoulder.rotate(g,e.bustA),e.armhole=e.armhole.rotate(g,e.bustA),e.armholeCp2=e.armholeCp2.rotate(g,e.bustA),e.armholePitch=e.armholePitch.rotate(g,e.bustA),e.armholePitchCp1=e.armholePitchCp1.rotate(g,e.bustA),e.armholePitchCp2=e.armholePitchCp2.rotate(g,e.bustA);const b=(new o).move(e.waistDartHem).line(e.waistDartTip).length()/(new o).move(e.shoulderDartShoulder).line(e.shoulderDartTip).length();if(e.armholeDartTipCpDownInside=e.armholeDartTip.shiftFractionTowards(e.waistDartLeft,1-s.upperDartLength+(1-s.waistDartLength)*b),e.shoulderDartTipCpDownOutside=e.shoulderDartOutside.shiftFractionTowards(e.bust,1-s.upperDartLength+1+(1-s.waistDartLength)*b),e.armholeDartOutside=e.armholeDartOutside.rotate(g,e.bustA),e.armholeDartOutsideCp1=e.armholeDartOutsideCp1.rotate(g,e.bustA),e.armholeOutsidePitchCp2=e.armholeOutsidePitchCp2.rotate(g,e.bustA),e.armholeOutsidePitch=e.armholeOutsidePitch.rotate(g,e.bustA),e.armholeOutsidePitchCp1=e.armholeOutsidePitchCp1.rotate(g,e.bustA),s.armholeDartCurved)e.armholeCircleOutsideCp1=e.armholeCircleOutsideCp1.rotate(g,e.bustA);else{e.aboveBustPointOutside=e.aboveBustPointOutside.rotate(g,e.bustA),e.armholeToBustOutside=e.armholeToBustOutside.rotate(g,e.bustA),e.waistToBustOutside=e.waistToBustOutside.rotate(g,e.bustA),e.bustAcp=e.waistDartRight.shiftOutwards(e.bustA,10);let t=(new o).move(e.waistDartRight).curve(e.bustAcp,e.shoulderDartTipCpDownOutside,e.shoulderDartOutside);e.waistUpDartRight=t.shiftAlong(.5*e.waistDartRight.dist(e.waistDartRightCp)),e.waistUpDartRightCpDown=e.waistUpDartRight.shiftFractionTowards(e.waistDartRight,.25),e.waistCpUp=e.waistDartRight.shiftTowards(e.sideHemInitial,.25*e.waistDartRight.dist(e.waistUpDartRight)).rotate(90,e.waistDartRight)}e.armhole.sitsRoughlyOn(e.armholeOutsidePitch)?a.armholeOutside=(new o).move(e.armholeDartOutside).curve(e.armholeDartOutsideCp1,e.armholeOutsidePitchCp2,e.armhole).hide():a.armholeOutside=(new o).move(e.armholeDartOutside).curve(e.armholeDartOutsideCp1,e.armholeOutsidePitchCp2,e.armholeOutsidePitch).curve(e.armholeOutsidePitchCp1,e.armholeCp2,e.armhole).hide(),a.armholeTempDart=(new o).move(e.armholeDartOutside)._curve(e.armholeDartCpBottom,e.armholeDartTip).curve_(e.armholeDartCpTop,e.armholeDartInside).hide(),e.shoulderDartTipCpDownInside=e.shoulderDartInside.shiftFractionTowards(e.shoulderDartTip,1-s.upperDartLength+1+(1-s.waistDartLength)*b),e.bustAcp=e.waistDartRight.shiftOutwards(e.bustA,10),a.shoulderInsideSeam=(new o).move(e.waistDartLeft).curve(e.waistDartLeftCp,e.shoulderDartTipCpDownInside,e.shoulderDartTip).line(e.shoulderDartInside).hide(),a.armholeInsideSeam=(new o).move(e.waistDartLeft).curve(e.waistDartLeftCp,e.armholeDartTipCpDownInside,e.armholeDartTip).hide(),a.sOutsideSeam=(new o).move(e.waistDartRight).curve(e.bustAcp,e.shoulderDartTipCpDownOutside,e.shoulderDartOutside).hide(),e.waistDartRightCp=e.bustAcp.clone();const w=(new o).move(e.waistDartLeft).curve(e.waistDartLeftCp,e.shoulderDartTipCpDownInside,e.shoulderDartTip).line(e.shoulderDartInside).hide();if(s.armholeDartCurved){e.waistUpDartLeft=a.armholeInsideSeam.shiftAlong(.5*e.waistDartLeft.dist(e.armholeDartTip)),e.waistCircleInsideCp1=e.waistUpDartLeft.shiftTowards(e.waistDartLeft,-.5*n.Qr*e.armholeDartOutside.dist(e.armholeDartTip)),e.shoulderDartTipCpDownOutside=e.shoulderDartTipCpDownOutside.rotate(2.5,e.shoulderDartOutside).shiftFractionTowards(e.shoulderDartOutside,.2);let i=1,r=0,l=Ji(e,o,a,r,c,s);do{l=Ji(e,o,a,r,c,s),r=w.length()-l,i++}while((r>1||r<-1)&&i<100);i>=100&&t.error("Something is not quite right here!"),e.waistDartRightCp=e.bustAcp.clone(),e.armholeDartTipInside=e.armholeDartTip.clone(),e.waistCircleOutsideCp1=e.waistUpDartRight.shiftTowards(e.waistDartRight,-1*n.Qr*e.armholeDartOutside.dist(e.armholeDartTip)),Ki(e,a,o,0),r=a.armholeTempCircleOutside.length()-a.armholeTempCircleInside.length(),i=0;do{Ki(e,a,o,r),r=a.armholeTempCircleOutside.length()-a.armholeTempCircleInside.length(),i++}while((r<-1||r>1)&&i<100);i>=100&&t.error("Something is not quite right here too!")}else{let i=1,r=0,l=Ji(e,o,a,r,c,s);e.waistCircleOutsideCp1=e.waistUpDartRight.shiftTowards(e.waistDartRight,-1*n.Qr*e.armholeDartOutside.dist(e.armholeDartTip));const p=(new o).move(e.waistDartLeft).line(e.waistToBustInside).curve(e.aboveBustPointInside,e.aboveBustPointInside,e.armholeToBustInside).line(e.armholeDartInside);do{l=Ji(e,o,a,r,c,s);const t=(new o).move(e.armholeDartOutside).line(e.armholeToBustOutside).curve(e.aboveBustPointOutside,e.waistCircleOutsideCp1,e.waistUpDartRight).curve(e.waistUpDartRightCpDown,e.waistCpUp,e.waistDartRight);r=p.length()-t.length(),i++}while((r>1||r<-1)&&i<3);i>=100&&t.error("Something is not quite right here!"),e.waistCircleOutsideCp1=e.waistUpDartRight.shiftTowards(e.waistDartRight,-1*n.Qr*e.armholeDartOutside.dist(e.armholeDartTip))}return l}},Xi={name:"noble.frontInside",from:Vi,draft:({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,options:l,macro:c,part:p})=>{delete a.waistDartHem,delete a.waistDartRight,delete a.waistDartRightCp,delete a.waistDartCpBottom,delete a.bustDartBottom,delete a.bustDartCpBottom,delete a.bustDartTip,delete a.bustDartTop,delete a.shoulderDartTipCpDownOutside,delete a.ex,delete a.bustB,delete a.shoulder,delete a.shoulderDartShoulder,delete a.shoulderDartOutside,delete a.pitchMax,delete a.armholeCpTarget,delete a.armholePitch,delete a.armholePitchCp1,delete a.armholePitchCp2,delete a.armhole,delete a.armholeCp2,delete a.bustDartCpTop,delete a.bustSide,delete a.bustDartMiddle,delete a.bustDartEdge,"
1shoulder"===l.dartPosition?(n.insideSeam=(new i).move(a.cfHem).line(a.waistDartLeft).curve(a.waistDartLeftCp,a.shoulderDartTipCpDownInside,a.shoulderDartTip).line(a.shoulderDartInside).line(a.hps).curve(a.hpsCp2,a.cfNeckCp1,a.cfNeck),n.seam=n.insideSeam.join((new i).move(a.cfNeck).line(a.cfHem)).close().attr("class","fabric"),t.set("shoulderDartTipNotch",(new i).move(a.waistDartLeft).curve(a.waistDartLeftCp,a.shoulderDartTipCpDownInside,a.shoulderDartTip).length())):l.armholeDartCurved?(n.insideSeam=(new i).move(a.cfHem).line(a.waistDartLeft).curve(a.waistDartLeftCp,a.armholeDartTipCpDownInside,a.armholeDartTipInside).curve(a.waistCircleInsideCp1,a.armholeCircleInsideCp1,a.armholeDartInside).join(n.armholeInside).line(a.hps).curve(a.hpsCp2,a.cfNeckCp1,a.cfNeck),n.seam=n.insideSeam.join((new i).move(a.cfNeck).line(a.cfHem)).close().attr("class","fabric"),t.set("shoulderDartTipNotch",(new i).move(a.waistDartLeft).curve(a.waistDartLeftCp,a.armholeDartTipCpDownInside,a.armholeDartTipInside).length())):(n.insideSeam=(new i).move(a.cfHem).line(a.waistDartLeft).line(a.waistToBustInside).curve(a.aboveBustPointInside,a.aboveBustPointInside,a.armholeToBustInside).line(a.armholeDartInside).join(n.armholeInside).line(a.hps).curve(a.hpsCp2,a.cfNeckCp1,a.cfNeck),n.seam=n.insideSeam.join((new i).move(a.cfNeck).line(a.cfHem)).close().attr("class","fabric"),t.set("shoulderDartTipNotch",(new i).move(a.waistDartLeft).line(a.waistToBustInside).curve(a.aboveBustPointInside,a.aboveBustPointInside,a.armholeToBustInside).length())),c("cutonfold",{from:a.cfNeck,to:a.cfHem,grainline:!0}),"shoulder"===l.dartPosition?r.shoulderDartTip=new s("notch",a.shoulderDartTip):l.armholeDartCurved?r.shoulderDartTip=new s("notch",a.armholeDartTipInside):r.shoulderDartTip=new s("notch",a.armholeToBustInside),a.titleAnchor=new o(.75*a.hpsCp2.x,1.5*a.cfNeckCp1.y),c("title",{at:a.titleAnchor,nr:1,title:"frontInside"}),a.gridAnchor=a.hps.clone(),a.scaleboxAnchor=a.titleAnchor.shift(-90,90).shift(0,10),c("scalebox",{at:a.scaleboxAnchor,rotate:270}),e&&(n.sa=n.insideSeam.offset(e).line(a.cfNeck).attr("class","fabric sa"),n.sa=n.sa.move(a.cfHem).line(n.sa.start()));let d=0;return"shoulder"===l.dartPosition?(c("hd",{from:a.cfNeck,to:a.shoulderDartInside,y:a.hps.y-25,id:"hpsToDart"}),c("vd",{from:a.cfHem,to:a.shoulderDartInside,x:-30,id:"hemToDart"}),c("vd",{from:a.cfHem,to:a.shoulderDartTip,x:-10,id:"hemToDartTip"}),c("hd",{from:a.cfBust,to:a.shoulderDartTip,y:a.cfHem.y+e+25,id:"middleToDartTip"})):(c("hd",{from:a.cfBust,to:a.armholeDartArmhole,y:a.cfHem.y+e+35,id:"middleToDartArmhole"}),d=10,c("hd",{from:a.hps,to:a.shoulderCp1,y:a.hps.y-35,id:"hpsToShoulder"}),c("hd",{from:a.hps,to:a.armholeDartInsideCp2,y:a.hps.y-25,id:"hpsToDart"}),c("vd",{from:a.cfHem,to:a.armholeDartArmhole,x:-20,id:"hemToDart"}),c("vd",{from:a.cfHem,to:a.shoulderCp1,x:-40,id:"hemToShoulder"}),l.armholeDartCurved&&(c("vd",{from:a.cfHem,to:a.armholeDartTipInside,x:-10,id:"hemToDartTip"}),c("hd",{from:a.cfBust,to:a.armholeDartTipInside,y:a.cfHem.y+e+25,id:"middleToDartTip"}))),c("vd",{from:a.cfHem,to:a.cfNeck,x:-20-d,id:"hemToNeck"}),c("vd",{from:a.cfHem,to:a.hps,x:-40-d,id:"hemToHps"}),c("hd",{from:a.cfHem,to:a.waistDartLeft,y:a.cfHem.y+e+15,id:"middleToDart"}),c("hd",{from:a.cfNeck,to:a.hps,y:a.hps.y-e-15,id:"middleToHps"}),p}},Qi={name:"noble.frontOutside",from:Vi,after:Xi,draft:({store:t,sa:e,points:o,Path:a,paths:i,Snippet:n,snippets:s,options:r,macro:l,part:c})=>{delete o.bustDartTop,delete o.bustSide,delete o.bustDartMiddle,delete o.bustDartBottom,delete o.bustDartCpBottom,delete o.bustB,delete o.bustDartEdge,l("rmcutonfold"),"shoulder"==r.dartPosition?(i.armhole=(new a).move(o.armhole).curve(o.armholeCp2,o.armholePitchCp1,o.armholePitch).curve_(o.armholePitchCp2,o.shoulder).hide(),i.seam=(new a).move(o.waistDartRight).line(o.sideHem).line(o.armhole).join(i.armhole).line(o.shoulderDartOutside).join(i.princessSeam).close().attr("class","fabric")):r.armholeDartCurved?(i.princessSeam=(new a).move(o.armholeDartOutside).curve(o.armholeCircleOutsideCp1,o.waistCircleOutsideCp1,o.waistUpDartRight).curve(o.waistUpDartRightCpDown,o.waistCpUp,o.waistDartRight).hide(),i.seam=(new a).move(o.waistDartRight).line(o.sideHem).line(o.armhole).join(i.armholeOutside.reverse()).join(i.princessSeam).close().attr("class","fabric")):(i.princessSeam=(new a).move(o.armholeDartOutside).line(o.armholeToBustOutside).curve(o.aboveBustPointOutside,o.waistCircleOutsideCp1,o.waistUpDartRight).curve(o.waistUpDartRightCpDown,o.waistCpUp,o.waistDartRight).hide(),i.seam=(new a).move(o.waistDartRight).line(o.sideHem).line(o.armhole).join(i.armholeOutside.reverse()).join(i.princessSeam).close().attr("class","fabric")),o.grainTop=o.armhole.shift(225,20),o.grainBottom=o.sideHemInitial.shift(135,20),l("grainline",{from:o.grainBottom,to:o.grainTop}),t.cutlist.removeCut(),t.cutlist.addCut(),o.snippet=i.princessSeam.shiftAlong(i.princessSeam.length()-t.get("shoulderDartTipNotch")),s.shoulderDartTip=new n("notch",o.snippet),o.titleAnchor=o.waistDartRight.shiftFractionTowards(o.armhole,.3).shiftFractionTowards(o.shoulderDartOutside,.2),l("title",{at:o.titleAnchor,nr:2,t
1itle:"frontOutside"}),o.gridAnchor=o.armholeCpTarget.clone(),e&&(i.sa=i.seam.offset(e).attr("class","fabric sa"));let p=i.princessSeam.edge("left");if(l("hd",{from:o.waistDartRight,to:o.armholeOutsidePitchCp1,y:o.sideHemInitial.y+e+35,id:"dartToArmhole"}),l("hd",{from:o.waistDartRight,to:o.sideHemInitial,y:o.sideHemInitial.y+e+25,id:"dartToSide"}),l("hd",{from:p,to:o.sideHemInitial,y:o.sideHemInitial.y+e+15,id:"leftToSide"}),l("vd",{from:o.armholeOutsidePitchCp1,to:o.sideHemInitial,x:o.sideHemInitial.x+e+15,id:"hemToArmhole"}),l("vd",{from:o.waistDartRight,to:p,x:p.x-e-15,id:"hemToLeft"}),"shoulder"===r.dartPosition){l("hd",{from:o.shoulderDartOutside,to:o.shoulder,y:o.shoulderDartOutside.y-e-15,id:"dartToShoulder"}),l("hd",{from:o.snippet,to:o.shoulder,y:o.shoulderDartOutside.y-e-25,id:"dartPointToShoulder"}),l("hd",{from:p,to:o.shoulder,y:o.shoulderDartOutside.y-e-35,id:"leftToShoulder"}),l("hd",{from:o.waistDartRight,to:o.shoulder,y:o.sideHemInitial.y+e+45,id:"hemDartToShoulder"}),l("vd",{from:o.shoulder,to:o.sideHemInitial,x:o.shoulder.x,id:"hemToShoulder"}),l("vd",{from:o.shoulderDartOutside,to:o.sideHemInitial,x:o.shoulderDartOutside.x,id:"sideHemToShoulderDart"}),l("vd",{from:o.waistDartRight,to:o.shoulderDartOutside,x:p.x-e-25,id:"hemToShoulderDart"}),l("vd",{from:o.snippet,to:o.shoulderDartOutside,x:p.x-e-15,id:"shoulderDartToDartPoint"});const t=i.armhole.edge("left");l("hd",{from:o.waistDartRight,to:t,y:o.sideHemInitial.y+e+5,id:"hemDartToRight"}),l("vd",{from:t,to:o.sideHemInitial,x:o.sideHemInitial.x+e+25,id:"hemSideToRight"})}else{let t=i.princessSeam.edge("top");l("hd",{from:p,to:o.armholeOutsidePitchCp1,y:t.y-e-35,id:"leftToArmhole"}),l("hd",{from:p,to:o.armholeDartOutside,y:t.y-e-25,id:"leftToArmholeDart"}),l("vd",{from:o.waistDartRight,to:t,x:p.x-e-25,id:"hemToTop"}),l("vd",{from:o.snippet,to:t,x:p.x-e-15,id:"topToDartPoint"}),l("vd",{from:o.armholeDartOutside,to:o.sideHemInitial,x:o.sideHemInitial.x+e+25,id:"sideHemToArmholeDart"}),r.armholeDartCurved&&(l("hd",{from:p,to:t,y:t.y-e-15,id:"leftToTop"}),l("vd",{from:t,to:o.sideHemInitial,x:o.sideHemInitial.x+e+35,id:"sideHemToTop"}))}return c}},qi=new n.pT({data:Bi,parts:[Yi,$i,zi,Vi,Xi,Qi]}),Zi=JSON.parse('{"id":"devon","name":"Devon denim jacket","code":"Wouter Van Wageningen","description":"A FreeSewing pattern for a denim jacket, based on the Bent block","design":"Wouter Van Wageningen","difficulty":4,"tags":["tops","coats"],"techniques":["pocket","precision","set-sleeve","buttonhole"],"version":"4.6.0","pkg":"@freesewing/devon","collection":true}'),tn={name:"devon.base",from:D,hide:{self:!0,from:!0,inherited:!0},measurements:["biceps","chest","highBust","hips","hpsToBust","hpsToWaistBack","neck","seat","seatBack","shoulderToShoulder","shoulderSlope","waistToArmpit","waistToHips","waist","waistBack"],options:{draftForHighBust:!0,pocketHeight:.5,frontPocketOpening:160/197,armholeDepth:{pct:12,min:-10,max:50,menu:(t,e)=>!e?.legacyArmholeDepth&&"advanced"},bicepsEase:{pct:15,min:0,max:50,menu:"fit"},chestEase:{pct:20,min:0,max:35,menu:"fit"},cuffEase:{pct:40,min:0,max:200,menu:"fit"},cuffWidth:{pct:7.5,min:0,max:10,menu:"style"},hemEase:{pct:12,min:0,max:20,menu:"fit"},lengthBonus:{pct:9,min:0,max:40,menu:"style"},neckDrop:{pct:6,min:0,max:10,menu:"style"},shoulderEase:{pct:20,min:-2,max:26,menu:"fit"},shoulderShift:{pct:2.6,min:0,max:6,menu:"style"},s3Collar:{pct:75,min:0,max:100,menu:"style"},s3Armhole:{pct:75,min:0,max:100,menu:"style"},waistbandWidth:{pct:4.67,min:1,max:10,menu:"style"},waistAdjustment:{bool:!0,menu:"style"},fullBustAdjustment:{bool:!1,menu:"style"},frontPocket:{bool:!0,menu:"style"},yokeDrop:{pct:33.5,min:17,max:50,menu:"style"}},draft:({options:t,points:e,snippets:o,Point:a,macro:i,part:n})=>{for(const s in o)delete o[s];i("rmtitle"),e.cbYoke=e.cbNeck.shiftFractionTowards(e.cbWaist,t.yokeDrop);for(let s of["Shoulder","Armhole","Chest","Waist","Hips","Hem","Yoke"])e[`cf${s}`]=new a(e[`cb${s}`].x,e[`cb${s}`].y);return e.cfNeckOrg=e.cfNeck.clone(),e.cfNeck=e.cfNeck.shiftFractionTowards(e.cfWaist,t.neckDrop),e.cfNeckCp1=e.cfNeckCp1.shift(270,e.cfNeckOrg.dist(e.cfNeck)),n}},en={name:"devon.back",from:tn,hide:{self:!0,from:!0,inherited:!0},options:{backYokePanelWidth:.66,backHemPanelWidth:.33},draft:({measurements:t,options:e,store:o,points:a,Path:i,paths:n,utils:s,part:r})=>{let l=Math.max(t.hips/2,t.waistBack)/2;l*=1+e.hemEase,a.hemBackOriginal=a.hem.copy(),a.hemBack=a.hem.copy();
1let c=s.circlesIntersect(a.cbHem,l,a.armhole,a.armhole.dist(a.hem));return c[0].x>c[1].x?a.hemBack=c[0]:a.hemBack=c[1],e.s3Collar<.1&&e.s3Collar>-.1?(a.s3CollarSplit=a.hps,n.backCollar=(new i).move(a.hps).curve_(a.neckCp2,a.cbNeck).hide()):e.s3Collar>0?(a.s3CollarSplit=s.curveIntersectsY(a.hps,a.mirroredNeckCp2Front,a.mirroredCfNeckCp1,a.mirroredCfNeck,-1*o.get("s3CollarMaxFront")*e.s3Collar),n.backCollarS3=(new i).move(a.hps)._curve(a.mirroredNeckCp2Front,a.mirroredCfNeckCp1,a.mirroredCfNeck).split(a.s3CollarSplit)[0].reverse().hide(),n.backCollar=(new i).move(a.hps).join((new i).move(a.hps).curve_(a.neckCp2,a.cbNeck)).hide(),o.set("sss",n.backCollarS3.length())):e.s3Collar<0&&(a.s3CollarSplit=s.curveIntersectsY(a.hps,a.neckCp2,a.cbNeck,a.cbNeck,-1*o.get("s3CollarMaxBack")*e.s3Collar),n.backCollar=(new i).move(a.cbNeck)._curve(a.neckCp2,a.neck).split(a.s3CollarSplit)[0].reverse().hide()),e.s3Armhole<.1&&e.s3Armhole>-.1?(a.s3ArmholeSplit=a.shoulder,n.backArmhole=(new i).move(a.armholePitch).curve(a.armholePitchCp2,a.shoulderCp1,a.shoulder).hide()):e.s3Armhole>0?(a.s3ArmholeSplit=s.curveIntersectsY(a.shoulder,a.mirroredShoulderCp1,a.mirroredFrontArmholePitchCp2,a.mirroredFrontArmholePitch,-1*o.get("s3ArmholeMax")*e.s3Armhole+a.shoulder.y),n.backArmhole=(new i).move(a.armholePitch).curve(a.armholePitchCp2,a.shoulderCp1,a.shoulder).join((new i).move(a.shoulder).curve(a.mirroredShoulderCp1,a.mirroredFrontArmholePitchCp2,a.mirroredFrontArmholePitch).split(a.s3ArmholeSplit)[0]).hide()):e.s3Armhole<0&&(a.s3ArmholeSplit=s.curveIntersectsY(a.shoulder,a.shoulderCp1,a.armholePitchCp2,a.armholePitch,-1*o.get("s3ArmholeMax")*e.s3Armhole+a.shoulder.y),n.backArmhole=(new i).move(a.armholePitch).curve(a.armholePitchCp2,a.shoulderCp1,a.shoulder).split(a.s3ArmholeSplit)[0].hide()),n.backArmholeComplete=(new i).move(a.armhole).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.armholePitchCp1,a.armholePitch).join(n.backArmhole).hide(),a.backArmholeYoke=n.backArmholeComplete.intersectsY(a.cbYoke.y)[0],a.backYokePanel=a.cbYoke.shiftFractionTowards(a.backArmholeYoke,e.backYokePanelWidth),a.backHemPanel=a.cbHem.shiftFractionTowards(a.hemBack,e.backHemPanelWidth),o.set("armholeYokeBack",n.backArmholeComplete.split(a.backArmholeYoke)[0].length()),o.set("library.twoPartSleeve.backArmholeLength",n.backArmholeComplete.length()),r}};function on(t,e){let{macro:o,points:a,sa:i}=t.shorthand();e.forEach((t=>{const e=t[0]+t[1]+t[2],n=i*(t[4]>0?1:-1);o(t[0]+"d",{id:e,from:a[t[1]],to:a[t[2]],y:a[t[3]].y+n+t[4],x:a[t[3]].x+n+t[4],d:n+t[4]})}))}const an={name:"devon.backPanel",from:en,hide:{self:!1,from:!0,inherited:!0},options:{},draft:({points:t,Path:e,paths:o,macro:a,sa:i,store:n,part:s})=>{a("rmcutonfold");for(const r in o)delete o[r];return o.seamBase=(new e).move(t.cbHem).line(t.backHemPanel).line(t.backYokePanel).line(t.backYokePanel).line(t.cbYoke),o.seam=o.seamBase.clone().line(t.cbHem).close().attr("class","fabric"),o.seamBase.hide(),i&&(o.sa=(new e).move(t.cbHem).join(o.seamBase.offset(i)).line(t.cbYoke).attr("class","fabric sa")),a("cutonfold",{from:t.cbYoke,to:t.cbHem,grainline:!0}),n.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),t.title=t.backYokePanel.shiftFractionTowards(t.cbChest,.6),a("title",{nr:1,title:"backPanel",at:t.title,rotation:90,scale:.75}),on(s,[["h","cbYoke","backYokePanel","cbYoke",-15],["h","cbHem","backHemPanel","cbHem",15],["v","cbHem","cbYoke","cbYoke",-15]]),s}},nn={name:"devon.backSide",from:en,hide:{self:!1,from:!0,inherited:!0},options:{backArmholeShift:.02},draft:({points:t,Path:e,paths:o,options:a,macro:i,sa:n,store:s,part:r})=>{i("rmcutonfold");for(const p in o)-1===["backArmholeComplete"].indexOf(p)&&delete o[p];const l=a.backArmholeShift*t.cbYoke.dist(t.backArmholeYoke);o.backYokeArmhole=o.backArmholeComplete.split(t.backArmholeYoke)[0].translate(0,l).hide();const c=["hem","backArmholeYoke"];for(let p of c)t[p]=t[p].translate(0,l);return t.backYokePanelCp1=t.backYokePanel.shift(0,.5*t.backYokePanel.dist(t.backArmholeYoke)),t.backYokeArmhole=o.backYokeArmhole.start(),o.seam=(new e).move(t.backArmholeYoke).curve(t.backArmholeYoke,t.backYokePanelCp1,t.backYokePanel).line(t.backHemPanel).line(a.waistAdjustment?t.hemBack:t.hemBackOriginal).join(o.backYokeArmhole).close().attr("class","fabric"),n&&(o.sa=o.seam.offset(n).attr("class","fabric sa")),s.cutlist.addCut({cut:2,from:"fabric",onFold:!1}),t.title=t.backYokePanel.shiftFractionTowards(t.hem,.3),i("title",{nr:2,title:"backSide",at:t.title,rotation:90,scale:.75}),t.bsGrainFrom=t.backYokePanel.shift(315,.1*t.backYokePanel.dist(t.backArmholeYoke)),t.bsGrainTo=t.bsGrainFrom.copy(),t.bsGrainTo.y=t.backHemPanel.y-(t.backYokePanel.y-t.bsGrainFrom.
1y),i("grainline",{from:t.bsGrainFrom,to:t.bsGrainTo}),on(r,[["h","backHemPanel","backYokePanel","backYokePanel",-15],["h","backYokePanel","backArmholeYoke","backYokePanel",-15],["h","backArmholeYoke","backYokeArmhole","backYokePanel",-15],["v","backHemPanel","backYokePanel","backHemPanel",-15],["v","backArmholeYoke","backYokePanel","backYokePanel",-15],["v","backYokeArmhole","backYokePanel","backYokeArmhole",15]]),a.waistAdjustment?on(r,[["h","backHemPanel","hemBack","backHemPanel",15],["h","hemBack","backYokeArmhole","hemBack",15]]):on(r,[["h","backHemPanel","hemBackOriginal","backHemPanel",15],["h","hemBackOriginal","backYokeArmhole","hemBackOriginal",15]]),s.set("hemBackLength",t.cbHem.dist(a.waistAdjustment?t.hemBack:t.hemBackOriginal)),r}},sn={name:"devon.backYoke",from:en,hide:{self:!1,from:!0,inherited:!0},options:{},draft:({points:t,Path:e,paths:o,macro:a,sa:i,store:n,part:s})=>{a("rmcutonfold");for(const r in o)-1===["backArmholeComplete","backCollar","backCollarS3"].indexOf(r)&&delete o[r];return o.backYokeSeam=(new e).move(t.cbYoke).line(t.backArmholeYoke).attr("class","fabric").hide(),o.backYokeArmhole=o.backArmholeComplete.split(t.backArmholeYoke)[1].hide(),o.seamBase=(new e).move(t.cbYoke).join(o.backYokeSeam).join(o.backYokeArmhole).join(o.backCollarS3).join(o.backCollar).hide(),o.seam=o.seamBase.clone().line(t.cbYoke).close().attr("class","fabric").unhide(),i&&(o.sa=(new e).move(t.cbYoke).join(o.seamBase.offset(i)).line(t.cbNeck).attr("class","fabric sa")),a("cutonfold",{from:t.cbNeck,to:t.cbYoke,grainline:!0}),n.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),t.title=t.backArmholeYoke.shiftFractionTowards(t.cbNeck,.7).shiftFractionTowards(t.cbYoke,.2),a("title",{nr:3,title:"backYoke",at:t.title}),on(s,[["h","cbYoke","backArmholeYoke","cbYoke",15],["h","cbNeck","s3CollarSplit","s3CollarSplit",-15],["h","s3CollarSplit","s3ArmholeSplit","s3CollarSplit",-15],["v","cbYoke","cbNeck","cbYoke",-15],["v","cbNeck","s3CollarSplit","cbNeck",-15],["v","s3ArmholeSplit","s3CollarSplit","s3ArmholeSplit",15],["v","backArmholeYoke","s3CollarSplit","s3ArmholeSplit",15]]),s}},rn={name:"devon.front",from:en,hide:{self:!0,from:!0,inherited:!0},options:{collarLengthRatio:3/83,frontYokePanelWidth:.3,frontYokeInsertWidth:.47,frontYokeSidePanelWidth:.23,frontHemPanelWidthRatio:.6,frontHemPanelWidth:.33,frontHemInsertWidth:.25,frontHemSidePanelWidth:.42,frontPocketRatio:.48,frontPocketWidthRatio:1.25,collarPoint:.275,pocketHeightRatio:1.125,pocketSideHeightRatio:11.5/12,pocketLowerWidthRatio:.875},draft:({measurements:t,options:e,store:o,Point:a,points:i,Path:n,paths:s,utils:r,macro:l,part:c})=>{l("rmcutonfold");const p=e.fullBustAdjustment&&(1+e.chestEase)*((void 0===t.bust?t.chest:t.bust)-t.highBust)/2;let d=Math.max(t.hips/2,t.waistFront)/2;d*=1+e.hemEase,i.hemOriginal=i.hem.copy();let h=r.circlesIntersect(i.cfHem,d,i.armhole,i.armhole.dist(i.hem));h[0].x>h[1].x?i.hem=h[0]:i.hem=h[1],e.s3Collar<.1&&e.s3Collar>-.1?(i.s3CollarSplit=i.hps,s.frontCollar=(new n).move(i.hps).curve(i.neckCp2Front,i.cfNeckCp1,i.cfNeck).hide()):e.s3Collar>0?(i.s3CollarSplit=r.curveIntersectsY(i.hps,i.neckCp2Front,i.cfNeckCp1,i.cfNeck,o.get("s3CollarMaxFront")*e.s3Collar),s.frontCollar=(new n).move(i.hps).curve(i.neckCp2Front,i.cfNeckCp1,i.cfNeck).split(i.s3CollarSplit)[1].hide()):e.s3Collar<0&&(i.s3CollarSplit=r.curveIntersectsY(i.mirroredCbNeck,i.mirroredCbNeck,i.mirroredNeckCp2,i.hps,o.get("s3CollarMaxBack")*e.s3Collar),s.frontCollar=(new n).move(i.hps).curve_(i.mirroredNeckCp2,i.mirroredCbNeck).split(i.s3CollarSplit)[0].reverse().join((new n).move(i.hps).curve(i.neckCp2Front,i.cfNeckCp1,i.cfNeck)).hide()),e.s3Armhole<.1&&e.s3Armhole>-.1?(i.s3ArmholeSplit=i.shoulder,s.frontArmhole=(new n).move(i.armholePitch).curve(i.armholePitchCp2,i.shoulderCp1,i.shoulder).hide()):e.s3Armhole>0?(i.s3ArmholeSplit=r.curveIntersectsY(i.shoulder,i.shoulderCp1,i.armholePitchCp2,i.armholePitch,o.get("s3ArmholeMax")*e.s3Armhole+i.shoulder.y),s.frontArmhole=(new n).move(i.armholePitch).curve(i.armholePitchCp2,i.shoulderCp1,i.shoulder).split(i.s3ArmholeSplit)[0].hide()):e.s3Armhole<0&&(i.s3ArmholeSplit=r.curveIntersectsY(i.shoulder,i.mirroredShoulderCp1,i.mirroredFrontArmholePitchCp2,i.mirroredFrontArmholePitch,o.get("s3ArmholeMax")*e.s3Armhole+i.shoulder.y),s.frontArmhole=(new n).move(i.armholePitch).curve(i.armholePitchCp2,i.shoulderCp1,i.shoulder).join((new n).move(i.shoulder).curve(i.mirroredShoulderCp1,i.mirroredFrontArmholePitchCp2,i.mirroredFrontArmholePitch).split(i.s3ArmholeSplit)[0]).hide()),s.saBase=(new n).move(i.cfHem).line(e.waistAdjustment?i.hem:i.hemOriginal).line(i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.armholePitchCp1,i.armholePitch).join(s.frontArmhole).line(i.s3CollarSplit).join(s.frontCollar),s.saBase.hide(),s.seam=(new n).move(i.cfNeck).line(i.cfHem).join(s.saBase).attr("class","fabric"),s.frontArmholeComplete=(new n).move(i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.armholePitchCp1,i.armholePitch).join(s.frontArmhole).hide(),o.set("library.twoPartSleeve.frontArmholeLength",s.frontArmholeComplete.length()),i.frontArmholeYoke=s.frontArmholeComplete.intersectsY(i.cfYoke.y)[0];i.cfYoke.dist(i.frontArmholeYoke);i.frontYokePanel=i.cfYoke.shiftFractionTowards(i.frontArmholeYoke,e.frontYokePanelWidth),i.frontYokeSidePanel=i.frontArmholeYoke.shiftFractionTowards(i.cfYoke,e.frontYokeSidePanelWidth);const m=i.frontYokePanel.dist(i.frontYokeSidePanel);i.frontYokePanelMiddle=i.frontYokePanel.shiftFractionTowards(i.frontYokeSidePanel,.5),i.frontHemPanelMiddle=new a(i.frontYokePanelMiddle.x,i.cfHem.y),i.frontHemPanel=i.frontHemPanelMiddle.shiftTowards(i.cfHem,e.frontHemPanelWidthRatio*(.5*m)),i.frontHemSidePanel=i.frontHemPanelMiddle.shiftTowards(i.cfHem,e.frontHemPanelWidthRatio*(-.5*m)),s.frontTempYoke=(new n).move(i.cfYoke).line(i.frontArmholeYoke),s.frontPanel=(new n).move(i.frontYokePanel).line(i.frontHemPanel),s.frontSidePanel=(new n).move(i.frontYokeSidePanel).line(i.frontHemSidePanel),i.frontBustPanel=r.beamIntersectsY(i.frontYokeSidePanel,i.frontHemSidePanel,i.cfChest.y);let f=r.circlesIntersect(i.frontBustPanel,p,i.shoulder,i.shoulder.dist(i.frontBustPanel));f[0].x>f[1].x?i.bustFBA=f[0]:i.bustFBA=f[1],o.set("frontSidePanelUpshift",i.bustFBA.y-i.frontBustPanel.y),s.frontSidePanelArmhole=s.frontArmholeComplete.split(i.frontArmholeYoke)[0].attr("class","note"),i.frontSideBust=r.beamIntersectsY(i.armhole,i.hem,i.frontBustPanel.y),f=r.circlesIntersect(i.frontBustPanel,p,i.frontArmholeYoke,i.frontArmholeYoke.dist(i.frontBustPanel)),f[0].x>f[1].x?i.bustFBA2=f[0].copy():i.bustFBA2=f[1].copy();let u=i.frontArmholeYoke.angle(i.bustFBA2)-i.frontArmholeYoke.angle(i.frontBustPanel);const g=["frontArmholeYoke","frontYokeSidePanel","frontBustPanel","frontSideBust","armhole"];for(let T of g)i["step1"+T]=i[T].rotate(u,i.frontArmholeYoke);let b=i.bustFBA2.x-i.frontBustPanel.x,w=i.bustFBA2.y-i.frontBustPanel.y;
1if(i.step1frontHemSidePanel=i.frontHemSidePanel.translate(b,w),i.step1hem=i.hem.translate(b,w),i.step1frontSideBust2=i.frontSideBust.translate(b,w),i.step1frontSidePanelBustPoint1=r.beamsIntersect(i.bustFBA2,i.step1frontSideBust,i.frontYokeSidePanel,i.frontHemSidePanel),i.step1frontSidePanelBustPoint2=r.beamsIntersect(i.bustFBA2,i.step1frontSideBust2,i.frontYokeSidePanel,i.frontHemSidePanel),i.step2hem=i.step1armhole.shiftOutwards(i.step1frontSideBust,i.step1frontSideBust2.dist(i.step1hem)),i.step2frontHemSidePanel=i.step1frontSidePanelBustPoint1.shiftTowards(i.frontHemSidePanel,i.frontBustPanel.dist(i.frontHemSidePanel)).translate(b,w).rotate(u,i.step1frontSidePanelBustPoint1),i.step1frontYokeSidePanel.dist(i.step1frontSidePanelBustPoint1)+i.step1frontSidePanelBustPoint1.dist(i.step2frontHemSidePanel)-i.frontYokeSidePanel.dist(i.frontHemSidePanel)>9){o.set("useFBA",!0),o.set("sidePanelLength",i.step1frontYokeSidePanel.dist(i.step1frontSidePanelBustPoint1)+i.step1frontSidePanelBustPoint1.dist(i.step2frontHemSidePanel));let t=i.frontYokeSidePanel.shiftTowards(i.frontHemSidePanel,o.get("sidePanelLength")).y,e=i.frontHemPanel.copy(),a=i.cfHem.copy();e.y=t,a.y=t,o.set("panelLength",i.frontYokePanel.dist(e)),o.set("frontLength",i.cfYoke.dist(a))}else o.set("useFBA",!1),o.set("sidePanelLength",i.frontYokeSidePanel.dist(i.frontHemSidePanel)),o.set("panelLength",i.frontYokePanel.dist(i.frontHemPanel)),o.set("frontLength",i.cfYoke.dist(i.cfHem));if(o.get("useFBA")){const t=["frontArmholeYoke","frontYokeSidePanel","frontBustPanel","frontSideBust","armhole","frontSidePanelBustPoint1","frontSidePanelBustPoint2"];for(let o of t)i[o]=i["step1"+o].rotate(-1*u,i.frontArmholeYoke);const e=["hem","frontHemSidePanel"];for(let o of e)i[o]=i["step2"+o].rotate(-1*u,i.frontArmholeYoke)}i.frontHemSidePanelSaved=i.frontHemSidePanel,i.frontHemPanel=i.frontYokePanel.shiftTowards(i.frontHemPanel,o.get("panelLength")),i.frontHemSidePanel=i.frontYokeSidePanel.shiftTowards(i.frontHemSidePanel,o.get("sidePanelLength")),i.cfHem=i.cfYoke.shiftTowards(i.cfHem,o.get("frontLength"));const k=i.frontYokePanel.dist(i.frontYokeSidePanel)*e.frontPocketWidthRatio;o.set("pocketWidth",k),i.pocketTopLeft=i.frontYokePanel.shiftFractionTowards(i.frontYokeSidePanel,.5).shift(180,k/2),i.pocketTopRight=i.frontYokePanel.shiftFractionTowards(i.frontYokeSidePanel,.5).shift(0,k/2),i.pocketBottomLeft=i.pocketTopLeft.shiftFractionTowards(i.pocketTopRight,1-e.pocketLowerWidthRatio).shift(270,k*e.pocketSideHeightRatio),i.pocketBottomRight=i.pocketTopLeft.shiftFractionTowards(i.pocketTopRight,e.pocketLowerWidthRatio).shift(270,k*e.pocketSideHeightRatio),i.pocketBottomMiddle=i.pocketTopLeft.shiftFractionTowards(i.pocketTopRight,.5).shift(270,k*e.pocketHeightRatio),i.pocketPanelLeft=r.beamsIntersect(i.pocketBottomLeft,i.pocketBottomMiddle,i.frontYokePanel,i.frontHemPanel),i.pocketPanelRight=r.beamsIntersect(i.pocketBottomRight,i.pocketBottomMiddle,i.frontYokeSidePanel,i.frontHemSidePanel),o.set("armholeYokeFront",s.frontArmholeComplete.split(i.frontArmholeYoke)[0].length()),o.set("waistbandWidth",e.waistbandWidth*(void 0===t.bust?t.chest:t.bust));const C=.5*o.get("waistbandWidth");i.frontNeck=i.cfNeck.shift(180,C),i.frontYoke=i.cfYoke.shift(180,C),i.frontHem=i.cfHem.shift(180,C),s.front=(new n).move(i.cfNeck).line(i.frontNeck).line(i.frontHem).line(i.cfHem);const v=i.cfNeck.dist(i.cfHem)/4;i.button1=i.cfNeck.shift(270,C+0*v),i.button2=i.cfNeck.shift(270,C+1*v),i.button3=i.cfNeck.shift(270,C+2*v),i.button4=i.cfNeck.shift(270,C+3*v);const y=s.backCollar.length()+s.backCollarS3.length()+s.frontCollar.length();return o.set("collarLength",y),o.set("collarLengthBack",s.backCollar.length()+s.backCollarS3.length()),o.set("facingLengthFromBack",y*(1-e.collarPoint)),i.frontCollarPoint=s.frontCollar.reverse().shiftAlong(y*e.collarPoint),l("mirror",{clone:!0,mirror:[i.cfNeck,i.cfHem],points:["frontNeck","frontYoke","frontHem"],nameFormat:t=>t.replace("front","facing")}),s.collarFacing=s.frontCollar.split(i.frontCollarPoint)[1].attr("class","note"),i.facingYokeCp1=i.facingYoke.shiftFractionTowards(i.facingNeck,.3),i.facingCollar=i.frontCollarPoint.copy(),i.facingCollarCp2=i.facingCollar.shift(i.facingCollar.angle(s.collarFacing.shiftAlong(2))+90,.33*i.facingYoke.dist(i.facingNeck)),c}},ln={name:"devon.sleeve",from:T,after:rn,hide:{self:!0,from:!0,inherited:!0},measurements:["shoulderToElbow"],options:{sleeveSlit:9/63,sleeveLengthBonus:{pct:3,min:-10,max:10,menu:"style"}}
1,draft:({measurements:t,options:e,store:o,points:a,Path:i,paths:n,utils:s,sa:r,part:l})=>{const c=e.cuffWidth*t.shoulderToWrist,p=e.sleeveSlit*t.shoulderToWrist;o.set("cuffWidth",c),o.set("sleeveSlit",p),a.tsOriginalWristRight=a.tsWristRight.copy(),a.usOriginalWristRight=a.usWristRight.copy(),a.tsWristRight=a.tsWristRight.shift(a.tsWristLeft.angle(a.tsWristRight),.5*c),a.usWristRight=a.usWristRight.shift(a.usWristLeft.angle(a.usWristRight),.5*c);const d=a.tsWristLeft.angle(a.tsWristRight)+90,h=a.usWristLeft.angle(a.usWristRight)+90;return a.tsHelperLeft=a.tsWristLeft.shift(d,c),a.tsHelperRight=a.tsWristRight.shift(d,c),a.usHelperLeft=a.usWristLeft.shift(h,c),a.usHelperRight=a.usWristRight.shift(h,c),a.tsCuffLeft=s.beamsIntersect(a.tsWristLeft,a.tsElbowLeft,a.tsHelperLeft,a.tsHelperRight),a.tsCuffRight=s.beamsIntersect(a.tsOriginalWristRight,a.elbowRight,a.tsHelperLeft,a.tsHelperRight),a.usCuffLeft=s.beamsIntersect(a.usWristLeft,a.usElbowLeft,a.usHelperLeft,a.usHelperRight),a.usCuffRight=s.beamsIntersect(a.usOriginalWristRight,a.elbowRight,a.usHelperLeft,a.usHelperRight),a.usSlit=a.usCuffRight.shiftTowards(a.elbowRight,p),a.tsSlit=a.tsCuffRight.shiftTowards(a.elbowRight,p),r?(a.usSlitRight=a.usSlit.shift(a.usSlit.angle(a.elbowRight)-90,2*r),a.tsSlitRight=a.tsSlit.shift(a.tsSlit.angle(a.elbowRight)-90,r)):(a.usSlitRight=a.usSlit.copy(),a.tsSlitRight=a.tsSlit.copy()),a.usCuffRight=s.beamsIntersect(a.usWristRight,a.usSlit,a.usCuffLeft,a.usCuffRight),a.tsCuffRight=s.beamsIntersect(a.tsWristRight,a.tsSlit,a.tsCuffLeft,a.tsCuffRight),o.set("cuffLength",a.tsCuffLeft.dist(a.tsCuffRight)+a.usCuffLeft.dist(a.usCuffRight)+r),r&&(a.tsCuffRight=a.tsCuffLeft.shiftOutwards(a.tsCuffRight,r),a.usCuffRight=a.usCuffLeft.shiftOutwards(a.usCuffRight,2*r)),n.topSleeve=(new i).move(a.tsCuffRight).line(a.tsSlitRight).line(a.tsSlit).line(a.elbowRight).curve(a.elbowRightCpTop,a.tsRightEdgeCpBottom,a.tsRightEdge).curve_(a.tsRightEdgeCpTop,a.backPitchPoint).curve(a.backPitchPoint,a.topCpRight,a.top).curve(a.topCpLeft,a.frontPitchPointCpTop,a.frontPitchPoint).curve(a.frontPitchPointCpBottom,a.tsLeftEdgeCpRight,a.tsLeftEdge).curve(a.tsLeftEdge,a.tsElbowLeftCpTop,a.tsElbowLeft).line(a.tsCuffLeft).line(a.tsCuffRight).close().attr("class","lining"),n.underSleeve=(new i).move(a.usCuffRight).line(a.usSlitRight).line(a.usSlit).line(a.elbowRight).curve(a.elbowRightCpTop,a.usRightEdgeCpBottom,a.usRightEdge).curve_(a.usRightEdgeCpTop,a.usTip).curve(a.usTipCpBottom,a.usLeftEdgeCpRight,a.usLeftEdgeRight).line(a.usLeftEdge).curve(a.usLeftEdge,a.usElbowLeftCpTop,a.usElbowLeft).line(a.usCuffLeft).line(a.usCuffRight).close().attr("class","interfacing"),l.hide()}},cn={name:"devon.cuff",after:ln,hide:{self:!1,from:!0,inherited:!0},options:{},draft:({Point:t,points:e,Path:o,paths:a,Snippet:i,snippets:n,macro:s,sa:r,complete:l,store:c,units:p,expand:d,part:h})=>{for(const u in a)delete a[u];for(const u in e)delete e[u];const m=c.get("cuffLength"),f=c.get("cuffWidth");return d?(e.topLeft=new t(0,0),e.topRight=new t(.5*m,0),e.bottomLeft=new t(0,2*f),e.bottomRight=new t(.5*m,2*f),a.seamBase=(new o).move(e.topRight).line(e.topLeft).line(e.bottomLeft).line(e.bottomRight).hide(),a.seam=(new o).move(e.topRight).join(a.seamBase).line(e.topRight).close().attr("class","fabric"),r&&(a.sa=(new o).move(e.topRight).join(a.seamBase.offset(r)).line(e.bottomRight).attr("class","fabric sa")),s("cutonfold",{from:e.bottomRight,to:e.topRight,grainline:!1}),e.button=e.topLeft.shift(0,.5*f).shift(270,.5*f),n.button=new i("button",e.button),c.cutlist.addCut({cut:2,from:"fabric",onFold:!0}),e.title=e.topLeft.shiftFractionTowards(e.bottomRight,.5),s("title",{nr:14,title:"cuff",at:e.title,scale:.4}),e.cGrainFrom=e.topLeft.shift(335,.3*e.topLeft.dist(e.topRight)),e.cGrainTo=e.cGrainFrom.copy(),e.cGrainTo.y=e.bottomLeft.y-(e.cGrainFrom.y-e.topLeft.y),s("grainline",{from:e.cGrainFrom,to:e.cGrainTo}),l&&(e.midLeft=e.topLeft.shift(270,f),e.midRight=e.topRight.shift(270,f),a.foldLine=(new o).move(e.midLeft).line(e.midRight).attr("class","note dashed").attr("data-text","foldLine").attr("data-text-class","
1note")),on(h,[["h","topLeft","topRight","topLeft",-15],["v","bottomLeft","topLeft","topLeft",-15]]),h):(c.flag.note({msg:"devon:cutCuff",replace:{width:p(m),length:p(2*f)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),c.flag.preset("expand"),h.hide())}},pn={name:"devon.frontFacing",from:rn,hide:{self:!1,from:!0,inherited:!0},options:{},draft:({points:t,Path:e,paths:o,macro:a,sa:i,store:n,part:s})=>{a("rmcutonfold");for(const r in o)-1===["frontCollar","collarFacing"].indexOf(r)&&delete o[r];return o.seam=(new e).move(t.facingHem).line(t.facingYoke).curve(t.facingYokeCp1,t.facingCollarCp2,t.facingCollar).join(o.collarFacing).line(t.frontNeck).line(t.frontYoke).line(t.frontHem).line(t.facingHem).close().attr("class","fabric"),i&&(o.sa=o.seam.offset(i).attr("class","fabric sa")),n.cutlist.addCut({cut:2,from:"fabric",onFold:!1}),t.title=t.frontNeck.shiftFractionTowards(t.facingYoke,.5),a("title",{nr:12,title:"frontFacing",at:t.title,scale:.5,rotation:90}),t.ffGrainFrom=t.frontNeck.shift(315,.3*t.frontNeck.dist(t.cfNeck)),t.ffGrainTo=t.ffGrainFrom.copy(),t.ffGrainTo.y=t.cfHem.y-(t.ffGrainFrom.y-t.cfNeck.y),a("grainline",{from:t.ffGrainFrom,to:t.ffGrainTo}),on(s,[["h","frontNeck","facingCollar","facingCollar",-15],["h","frontNeck","cfNeck","cfNeck",-15],["h","frontHem","facingHem","facingHem",15],["v","frontHem","frontNeck","frontNeck",-15],["v","facingNeck","facingCollar","frontNeck",-15],["v","facingHem","facingCollar","facingCollar",15],["v","facingHem","facingYoke","facingYoke",15]]),s}},dn={name:"devon.frontInside",from:rn,hide:{self:!1,from:!0,inherited:!0},options:{},draft:({points:t,Path:e,paths:o,Snippet:a,snippets:i,macro:n,store:s,sa:r,complete:l,part:c})=>{n("rmcutonfold");for(const d in o)delete o[d];const p=s.get("waistbandWidth");return t.stitchTop=t.frontYoke.shift(0,p),t.stitchBottom=t.frontHem.shift(0,p),o.seam=(new e).move(t.frontHemPanel).line(t.frontYokePanel).line(t.frontYoke).line(t.frontHem).line(t.frontHemPanel).close().attr("class","fabric"),r&&(o.sa=o.seam.offset(r).attr("class","fabric sa")),s.cutlist.addCut({cut:2,from:"fabric",onFold:!1}),i.button2=new a("button",t.button2),i.button3=new a("button",t.button3),i.button4=new a("button",t.button4),r&&(t.pocketSnip=t.pocketTopLeft.shiftFractionTowards(t.frontYokePanel,.5).shift(270,.5*r),i.pocketSnip=new a("notch",t.pocketSnip)),l&&(o.pocketTopStitch=(new e).move(t.pocketPanelLeft).line(t.pocketBottomLeft).line(t.pocketTopLeft).attr("class","lining dashed").attr("data-text","topStitchLine").attr("data-text-class","lining center"),o.stitchLine=(new e).move(t.stitchTop).line(t.stitchBottom).attr("class","lining dashed").attr("data-text","topStitchLine").attr("data-text-class","lining center"),on(c,[["h","stitchTop","frontYokePanel","frontYoke",-25]])),t.title=t.stitchTop.shiftFractionTowards(t.stitchBottom,.25),n("title",{nr:4,title:"frontInside",at:t.title,rotation:90,scale:.75}),n("grainline",{from:t.frontYoke.shiftFractionTowards(t.stitchTop,.25),to:t.frontHem.shiftFractionTowards(t.stitchBottom,.25)}),on(c,[["h","frontYoke","frontYokePanel","frontYoke",-15],["h","frontHem","frontHemPanel","frontHem",15],["h","frontYokePanel","frontHemPanel","frontYoke",-15],["v","frontHem","frontYoke","frontYoke",-15],["v","frontHemPanel","frontYokePanel","frontHemPanel",15],["v","frontHem","frontHemPanel","frontHemPanel",15]]),c}},hn={name:"devon.frontPanel",from:rn,hide:{self:!1,from:!0,inherited:!0},options:{},draft:({points:t,Path:e,paths:o,Snippet:a,snippets:i,macro:n,options:s,sa:r,store:l,complete:c,part:p})=>{n("rmcutonfold");for(const d in o)delete o[d];return t.panelPocketTop=t.frontHemSidePanel.shiftFractionTowards(t.frontYokeSidePanel,s.pocketHeight),t.cfPocketBottom=t.cfHem.copy(),t.cfPocketTop=t.cfPocketBottom.shiftFractionTowards(t.cfYoke,s.pocketHeight),n("mirror",{clone:!0,mirror:[t.frontHemSidePanel,t.frontYokeSidePanel],points:["cfPocketBottom","cfPocketTop"]}),s.frontPocket?(c&&(t.frontPocketTopSnippet=t.panelPocketTop.copy(),t.frontPocketBottomSnippet=t.panelPocketTop.shiftFractionTowards(t.frontHemSidePanelSaved,s.frontPocketOpening),i.frontPocketTop=new a("notch",t.frontPocketTopSnippet),i.frontPocketBottom=new a("notch",t.frontPocketBottomSnippet),on(p,[["l","frontPocketTopSnippet","frontPocketBottomSnippet","frontPocketTopSnippet",-15],["l","frontPocketBottomSnippet","frontHemSidePanelSaved","frontPocketTopSnippet",-15]])),o.pocket=(new e).move(t.frontHemSidePanel).line(t.mirroredCfPocketBottom).line(t.mirroredCfPocketTop).line(t.panelPocketTop).hide()):o.pocket=(new e).move(t.frontHemSidePanel).line(t.panelPocketTop).hide(),o.seam=(new e).move(t.frontHemSidePanel).join(o.pocket).line(t.frontYokeSidePanel).line(t.frontYokePanel).line(t.frontHemPanel).line(t.frontHemSidePanel).close().attr("class","fabric"),r&&(o.sa=o.seam.offset(r).attr("class","fabric sa")),l.cutlist.addCut({cut:2,from:"fabric",onFold:!1}),t.title=t.frontYokePanel.shiftFractionTowards(t.frontYokeSidePanel,.4).shiftFractionTowards(t.frontHemPanel.shiftFractionTowards(t.frontHemSidePanel,.35),.4),n("title",{nr:5,title:"frontPanel",at:t.title,rotation:90,scale:.75}),n("grainline",{from:t.frontYokePanelMiddle,to:t.frontHemPanelMiddle}),t.frontPanelSnippet=t.frontHemSidePanelSaved.copy(),i.frontPanel=new a("notch",t.frontPanelSnippet),c&&(o.pocketTopStitch=(new e).move(t.pocketPanelLeft).line(t.pocketBottomMiddle).line(t.pocketPanelRight).attr("class","lining dashed").attr("data-text","topStitchLine").attr("data-text-class","lining center")),on(p,[["h","frontYokePanel","frontYokeSidePanel","frontYokePanel",-15],["h","frontHemPanel","frontHemSidePanel","frontHemPanel",15],["h","frontYokePanel","frontHemPanel","frontHemPanel",15],["h","frontHemSidePanel","frontYokeSidePanel","frontHemPanel",15],["v","frontHemPanel","frontYokePanel","frontYokePanel",-15],["v","frontHemSidePanel","frontYokeSidePanel","frontYokeSidePanel",15],["v","frontHemPanel","frontHemSidePanel","frontYokeSidePanel",15],["v","frontHemPanel","frontHemSidePanel","frontYokeSidePanel",15]]),s.frontPocket&&on(p,[["l","frontHemSidePanel","mirroredCfPocketBottom","mirroredCfPocketBottom",15],["l","mirroredCfPocketBottom","mirroredCfPocketTop","mirroredCfPocketBottom",-15],["l","panelPocketTop","mirroredCfPocketTop","panelPocketTop",-15]]),p}},mn={name:"devon.frontSidePanel",from:rn,after:[hn,nn],hide:{self:!1,from:!0,inherited:!0},options:{},draft:({points:t,Path:e,paths:o,Snippet:a,snippets:i,macro:n,store:s,options:r,utils:l,sa:c,complete:p,part:d})=>{n("rmcutonfold");for(const k in o)-1===["frontSidePanelArmhole"].indexOf(k)&&delete o[k];const h=s.get("frontSidePanelUpshift"),m=s.get("sidePanelLength"),f=s.get("useFBA");let u=0;t.frontYokeSidePanelCP1=t.frontYokeSidePanel.shift(0,.5*t.frontYokeSidePanel.dist(t.frontArmholeYoke)),f&&(t.frontYokeSidePanelCp2=t.frontYokeSidePanel.shiftFractionTowards(t.frontSidePanelBustPoint1,1.1),t.frontHemSidePanelCp1=t.frontHemSidePanelSaved.shiftFractionTowards(t.frontSidePanelBustPoint1,1.1),u=t.frontHemSidePanelSaved.angle((new e).move(t.frontHemSidePanelSaved).curve(t.frontHemSidePanelCp1,t.frontYokeSidePanelCp2,t.frontYokeSidePanel).shiftAlong(2))-t.frontHemSidePanel.angle(t.frontYokeSidePanel),t.frontHemSidePanelCp2=t.frontHemSidePanelSaved.shift(u,.3*t.frontHemSidePanelSaved.dist(t.hem))),o.frontSidePanelArmhole=o.frontSidePanelArmhole.translate(0,h),t.armhole=t.armhole.translate(0,h),t.hem=t.hem.translate(0,h),t.frontArmholeYoke=t.frontArmholeYoke.translate(0,h);let g=0,b=0,w=1.5;do{t.frontYokeSidePanel=t.frontYokeSidePanel.rotate(w,t.hem),b=f?m-(new e).move(t.frontYokeSidePanel).curve(t.frontYokeSidePanelCp2,t.frontHemSidePanelCp1,t.frontHemSidePanelSaved).length():m-t.frontYokeSidePanel.dist(t.frontHemSidePanelSaved),w=b>0?-.7*Math.abs(w):.6*Math.abs(w)}while(g++<100&&(b>1||b<-1));if(f){o.sidePanelHem=(new e).move(t.frontYokeSidePanel).curve(t.frontYokeSidePanelCp2,t.frontHemSidePanelCp1,t.frontHemSidePanelSaved).hide();const a=t.pocketPanelRight.dist(t.frontYokeSidePanel);t.pocketPanelRight=o.sidePanelHem.shiftFractionAlong(a/t.frontYokeSidePanel.dist(t.frontHemSidePanel));let i=t.pocketPanelRight.shift(t.pocketBottomMiddle.angle(t.pocketBottomRight)+270-t.frontYokeSidePanel.angle(t.frontHemSidePanel)+o.sidePanelHem.angleAt(t.pocketPanelRight)+90,200);t.pocketBottomRight=l.beamIntersectsCircle(t.pocketTopRight,t.pocketTopRight.dist(t.pocketBottomRight),t.pocketPanelRight,i)[0],t.panelPocketTop=o.sidePanelHem.reverse().shiftAlong(r.pocketHeight*m),t.cfPocketBottom=t.cfHem.rotate(u,t.frontHemSidePanelSaved),t.cfPocketTop=t.cfPocketBottom.shift(90+u,t.cfHem.dist(t.cfYoke)*r.pocketHeight),r.frontPocket?(o.sidePanelHem=o.sidePanelHem.split(t.panelPocketTop)[0],o.pocket=(new e).move(t.panelPocketTop).line(t.cfPocketTop).line(t.cfPocketBottom).line(t.frontHemSidePanelSaved)):o.pocket=(new e).move(t.frontHemSidePanelSaved).hide(),o.seam=(new e).move(t.frontHemSidePanelSaved).curve(t.frontHemSidePanelCp2,t.hem,t.hem).line(t.armhole).join(o.frontSidePanelArmhole).curve(t.frontArmholeYoke,t.frontYokeSidePanelCP1,t.frontYokeSidePanel).join(o.sidePanelHem).join(o.pocket).close().attr("class","fabric"),t.sidePanelLeft=o.sidePanelHem.edge("left")}else t.panelPocketTop=t.frontHemSidePanelSaved.shiftFractionTowards(t.frontYokeSidePanel,r.pocketHeight),t.cfPocketBottom=t.cfHem.copy(),t.cfPocketTop=t.cfPocketBottom.shiftFractionTowards(t.cfYoke,r.pocketHeight),r.frontPocket?o.pocket=(new e).move(t.panelPocketTop).line(t.cfPocketTop).line(t.cfPocketBottom).line(t.frontHemSidePanelSaved).hide():o.pocket=(new e).move(t.panelPocketTop).line(t.frontHemSidePanelSaved).hide(),o.seam=(new e).move(t.panelPocketTop).join(o.pocket).line(r.waistAdjustment?t.hem:t.hemOriginal).line(t.armhole).join(o.frontSidePanelArmhole).curve(t.frontArmholeYoke,t.frontYokeSidePanelCP1,t.frontYokeSidePanel).line(t.panelPocketTop).close().attr("class","fabric");return c&&(o.sa=o.seam.offset(c).attr("class","fabric sa")),s.cutlist.addCut({cut:2,from:"fabric",onFold:!1}),t.title=t.frontYokeSidePanel.shiftFractionTowards(t.hem,.3),n("title",{nr:6,title:"frontSidePanel",at:t.title,rotation:90,scale:.75}),t.fsGrainFrom=t.frontYokeSidePanel.shift(315,.5*t.frontYokePanel.dist(t.step1frontArmholeYoke)),t.fsGrainTo=t.fsGrainFrom.copy(),t.fsGrainTo.y=t.frontHemPanel.y-(t.fsGrainFrom.
1y-t.frontYokeSidePanel.y),n("grainline",{from:t.fsGrainFrom,to:t.fsGrainTo}),t.frontPanelSnippet=t.frontHemSidePanelSaved.copy(),i.frontPanel=new a("notch",t.frontPanelSnippet),c&&(t.pocketSnip=t.pocketTopRight.shiftFractionTowards(t.frontYokeSidePanel,.5).shift(270,.5*c),i.pocketSnip=new a("notch",t.pocketSnip)),p&&(o.pocketTopStitch=(new e).move(t.pocketPanelRight).line(t.pocketBottomRight).line(t.pocketTopRight).attr("class","lining dashed").attr("data-text","topStitchLine").attr("data-text-class","lining center")),on(d,[["h","frontYokeSidePanel","frontArmholeYoke","frontYokeSidePanel",-15],["h","frontArmholeYoke","armhole","frontYokeSidePanel",-15],["h","frontHemSidePanelSaved","frontYokeSidePanel","frontYokeSidePanel",-15],["v","frontHemSidePanelSaved","frontYokeSidePanel","frontHemSidePanelSaved",-15],["v","armhole","frontArmholeYoke","armhole",15],["v","frontArmholeYoke","frontYokeSidePanel","armhole",15]]),r.waistAdjustment?(on(d,[["h","frontHemSidePanelSaved","hem","frontHemSidePanelSaved",15],["h","hem","armhole","frontHemSidePanelSaved",15],["v","hem","armhole","armhole",15],["v","frontHemSidePanelSaved","hem","armhole",15]]),s.set("hemLength",t.frontHemSidePanelSaved.dist(t.hem)+t.frontHemSidePanelSaved.dist(t.frontHem)+s.get("hemBackLength"))):(on(d,[["h","frontHemSidePanelSaved","hemOriginal","frontHemSidePanelSaved",15],["v","hemOriginal","armhole","armhole",15]]),s.set("hemLength",t.hemOriginal.dist(t.frontHem)+s.get("hemBackLength"))),r.frontPocket&&(p&&(t.frontPocketTopSnippet=t.panelPocketTop.copy(),t.frontPocketBottomSnippet=t.panelPocketTop.shiftFractionTowards(t.frontHemSidePanelSaved,r.frontPocketOpening),i.frontPocketTop=new a("notch",t.frontPocketTopSnippet),i.frontPocketBottom=new a("notch",t.frontPocketBottomSnippet),on(d,[["l","frontPocketTopSnippet","frontPocketBottomSnippet","frontPocketTopSnippet",15],["l","frontPocketBottomSnippet","frontHemSidePanelSaved","frontPocketTopSnippet",15]])),on(d,[["h","frontHemSidePanelSaved","panelPocketTop","panelPocketTop",15],["l","cfPocketTop","panelPocketTop","cfPocketTop",15],["l","cfPocketBottom","frontHemSidePanelSaved","frontHemSidePanelSaved",15],["l","cfPocketBottom","cfPocketTop","cfPocketTop",15],["l","frontHemSidePanelSaved","panelPocketTop","frontHemSidePanelSaved",0]])),f&&on(d,[["h","sidePanelLeft","frontYokeSidePanel","frontYokeSidePanel",-15],["v","frontHemSidePanelSaved","frontYokeSidePanel","sidePanelLeft",-15],["v","frontHemSidePanelSaved","sidePanelLeft","sidePanelLeft",-30]]),d}},fn={name:"devon.frontYoke",from:rn,hide:{self:!1,from:!0,inherited:!0},options:{},draft:({points:t,Path:e,paths:o,macro:a,store:i,options:n,Snippet:s,snippets:r,sa:l,complete:c,part:p})=>{a("rmcutonfold");for(const d in o)-1===["frontArmholeComplete","frontCollar"].indexOf(d)&&delete o[d];return o.frontYokeSeam=(new e).move(t.frontYoke).line(t.frontArmholeYoke).attr("class","fabric"),o.frontYokeArmhole=o.frontArmholeComplete.split(t.frontArmholeYoke)[1].hide(),o.seam=(new e).move(t.frontArmholeYoke).join(o.frontYokeArmhole).line(t.s3CollarSplit).join(o.frontCollar).line(t.frontNeck).line(t.frontYoke).join(o.frontYokeSeam).close().attr("class","fabric"),l&&(o.sa=o.seam.offset(l).attr("class","fabric sa")),i.cutlist.addCut({cut:2,from:"fabric",onFold:!1}),r.button1=new s("button",t.button1),c&&(o.stitchLine=(new e).move(t.facingYoke).curve(t.facingYokeCp1,t.facingCollarCp2,t.facingCollar).attr("class","lining dashed").attr("data-text","topStitchLine").attr("data-text-class","lining center"),on(p,[["h","frontNeck","button1","button1",0]])),t.frontEndOfCollar=o.frontCollar.reverse().shiftAlong(i.get("collarLength")*n.collarLengthRatio),r.frontEndOfCollar=new s("notch",t.frontEndOfCollar),t.title=t.s3CollarSplit.shiftFractionTowards(t.frontArmholeYoke,.4).shiftFractionTowards(t.frontYoke,.45),a("title",{nr:7,title:"frontYoke",at:t.title}),t.fyGrainFrom=t.s3CollarSplit.shift(330,.35*t.s3CollarSplit.dist(t.s3ArmholeSplit)),t.fyGrainTo=t.fyGrainFrom.copy(),t.fyGrainTo.y=t.frontYoke.y-1.5*(t.fyGrainFrom.y-t.s3CollarSplit.y),a("grainline",{from:t.fyGrainFrom,to:t.fyGrainTo}),on(p,[["h","frontNeck","s3CollarSplit","s3CollarSplit",-15],["h","s3CollarSplit","s3ArmholeSplit","s3CollarSplit",-15],["h","frontYoke","step1frontArmholeYoke","frontYoke",15],["h","frontYoke","frontEndOfCollar","frontNeck",-15],["h","step1frontArmholeYoke","s3ArmholeSplit","frontYoke",15],["v","frontNeck","s3CollarSplit","frontNeck",-15],["v","frontYoke","frontNeck","frontNeck",-15]]),p}},un={name:"devon.pocket",from:rn,hide:{self:!1,from:!0,inherited:!0},options:{},draft:({Point:t,points:e,Path:o,paths:a,macro:i,options:n,sa:s,store:r,part:l})=>{for(const c in a)delete a[c];for(const c in e)null==c.match("pocket")&&delete e[c];return a.seam=(new o).move(e.pocketTopLeft).line(e.pocketBottomLeft).line(e.pocketBottomMiddle).line(e.pocketBottomRight).line(e.pocketTopRight).line(e.pocketTopLeft).close().attr("class","fabric"),s&&(a.sa=a.seam.offset(s).attr("class","fabric sa")),r.cutlist.addCut({cut:2,from:"fabric",onFold:!1}),e.title=e.pocketTopLeft.shiftFractionTowards(e.pocketBottomMiddle,.3),i("title",{nr:10,title:"pocket",at:e.title,scale:.6}),e.pGrainTo=e.pocketBottomMiddle.copy(),e.pGrainTo.y=e.pocketBottomLeft.y,e.pGrainFrom=e.pGrainTo.copy(),e.pGrainFrom.
1y=e.pocketTopLeft.y-(e.pocketBottomLeft.y-e.pocketBottomMiddle.y),i("grainline",{from:e.pGrainFrom,to:e.pGrainTo}),on(l,[["h","pocketTopLeft","pocketTopRight","pocketTopLeft",-15],["h","pocketBottomLeft","pocketBottomRight","pocketBottomMiddle",15],["h","pocketTopLeft","pocketBottomLeft","pocketBottomMiddle",15],["h","pocketBottomRight","pocketTopRight","pocketBottomMiddle",15],["v","pocketBottomLeft","pocketTopLeft","pocketTopLeft",-15],["v","pocketBottomMiddle","pocketTopRight","pocketTopRight",15]]),l}},gn={name:"devon.pocketflap",from:un,hide:{self:!1,from:!1,inherited:!0},options:{pocketflapHeightRatio:6.5/12,pocketflapSideHeightRatio:3.5/12,pocketflapMagnifier:1.01},draft:({points:t,Path:e,paths:o,macro:a,options:i,store:n,sa:s,part:r})=>{const l=n.get("pocketWidth");return t.pocketflapTopLeft=t.pocketTopRight.shiftFractionTowards(t.pocketTopLeft,i.pocketflapMagnifier),t.pocketflapTopRight=t.pocketTopLeft.shiftFractionTowards(t.pocketTopRight,i.pocketflapMagnifier),t.pocketflapBottomLeft=t.pocketflapTopLeft.shift(270,l*i.pocketflapSideHeightRatio),t.pocketflapBottomRight=t.pocketflapTopRight.shift(270,l*i.pocketflapSideHeightRatio),t.pocketflapBottomMiddle=t.pocketflapTopLeft.shiftFractionTowards(t.pocketflapTopRight,.5).shift(270,l*i.pocketflapHeightRatio*i.pocketflapMagnifier),o.seam=(new e).move(t.pocketflapTopLeft).line(t.pocketflapBottomLeft).line(t.pocketflapBottomMiddle).line(t.pocketflapBottomRight).line(t.pocketflapTopRight).line(t.pocketflapTopLeft).close().attr("class","fabric"),s&&(o.sa=o.seam.offset(s).attr("class","fabric sa")),a("rmgrainline"),n.cutlist.removeCut("fabric"),n.cutlist.addCut({cut:4,from:"fabric",onFold:!1}),t.title=t.pocketflapTopLeft.shiftFractionTowards(t.pocketflapBottomMiddle,.4),a("title",{nr:11,title:"pocketflap",at:t.title,scale:.5}),t.pfGrainTo=t.pocketflapBottomMiddle.copy(),t.pfGrainTo.y=t.pocketflapBottomMiddle.y-.3*(t.pocketflapBottomMiddle.y-t.pocketflapBottomLeft.y),t.pfGrainFrom=t.pfGrainTo.copy(),t.pfGrainFrom.y=t.pocketTopLeft.y-.3*(t.pocketflapBottomLeft.y-t.pocketflapBottomMiddle.y),a("grainline",{from:t.pfGrainFrom,to:t.pfGrainTo}),a("rmad"),on(r,[["h","pocketflapTopLeft","pocketflapTopRight","pocketflapTopLeft",-15],["v","pocketflapBottomLeft","pocketflapTopLeft","pocketflapTopLeft",-15],["v","pocketflapBottomMiddle","pocketflapTopRight","pocketflapTopRight",15]]),r}},bn={name:"devon.topSleeve",from:ln,after:en,draft:({macro:t,points:e,Path:o,paths:a,snippets:i,Snippet:n,sa:s,store:r,complete:l,part:c})=>(delete a.us,delete a.underSleeve,a.seam=a.topSleeve.clone().attr("class","fabric",!0),delete a.ts,delete a.topSleeve,s&&(a.sa=a.seam.offset(s).addClass("fabric sa")),r.cutlist.addCut({cut:2,from:"fabric"}),t("scalebox",{at:e.elbowCenter}),i.logo=new n("logo",e.elbowCenter.shift(90,50)),t("title",{at:e.armCenter.shiftFractionTowards(e.top,.5),nr:8,title:"topSleeve",rotation:90}),e.tsGrainFrom=e.usTip.copy(),e.tsGrainTo=e.tsGrainFrom.copy(),e.tsGrainTo.y=e.tsSlitRight.y,t("grainline",{from:e.tsGrainFrom,to:e.tsGrainTo}),l&&(a.topSleeveText=(new o).move(e.top).curve(e.topCpLeft,e.frontPitchPointCpTop,e.frontPitchPoint).curve(e.frontPitchPointCpBottom,e.tsLeftEdgeCpRight,e.tsLeftEdge).attr("class","hidden").attr("data-text","front").attr("data-text-class","
1note center"),e.s3=a.topSleeveText.shiftAlong(r.get("sss")),i.s3=new n("notch",e.s3)),on(c,[["h","tsLeftEdge","backPitchPoint","top",-30],["h","tsLeftEdge","elbowRight","tsCuffRight",60],["h","tsLeftEdge","top","top",-15],["h","tsLeftEdge","tsCuffLeft","tsCuffRight",30],["h","tsLeftEdge","tsCuffRight","tsCuffRight",45],["h","tsLeftEdge","tsElbowLeft","tsCuffRight",15],["h","tsLeftEdge","tsRightEdge","top",-45],["v","tsCuffLeft","tsLeftEdge","tsLeftEdge",-30],["v","tsCuffRight","tsLeftEdge","tsLeftEdge",-45],["v","tsElbowLeft","tsLeftEdge","tsLeftEdge",-15],["v","tsLeftEdge","top","tsLeftEdge",-15],["v","tsRightEdge","backPitchPoint","tsRightEdge",15],["l","tsCuffLeft","tsCuffRight","tsCuffRight",15],["l","tsElbowLeft","elbowRight","elbowRight",0],["l","tsLeftEdge","tsRightEdge","tsRightEdge",0]]),s&&on(c,[["l","tsSlit","tsSlitRight","tsSlitRight",-15],["l","tsCuffRight","tsSlitRight","tsSlitRight",-15]]),c)},wn={name:"devon.underSleeve",from:ln,draft:({macro:t,points:e,paths:o,snippets:a,Snippet:i,sa:n,store:s,part:r})=>(delete o.ts,delete o.topSleeve,o.seam=o.underSleeve.clone().attr("class","fabric",!0),delete o.us,delete o.underSleeve,e.anchor=e.usTip.clone(),n&&(o.sa=o.seam.offset(n).attr("class","fabric sa")),s.cutlist.addCut({cut:2,from:"fabric"}),a.logo=new i("logo",e.elbowCenter),t("title",{at:e.armCenter,nr:9,title:"underSleeve",rotation:90}),e.usGrainFrom=e.usTipCpBottom.copy(),e.usGrainTo=e.usGrainFrom.copy(),e.usGrainTo.y=e.usSlitRight.y,t("grainline",{from:e.usGrainFrom,to:e.usGrainTo}),on(r,[["h","usLeftEdge","backPitchPoint","usTip",-30],["h","usLeftEdge","elbowRight","usCuffRight",60],["h","usLeftEdge","usTip","usTip",-15],["h","usLeftEdge","usCuffLeft","usCuffRight",30],["h","usLeftEdge","usCuffRight","usCuffRight",45],["h","usLeftEdge","usElbowLeft","usCuffRight",15],["h","usLeftEdge","usRightEdge","usTip",-45],["v","usCuffLeft","usLeftEdge","usLeftEdge",-30],["v","usCuffRight","usLeftEdge","usLeftEdge",-45],["v","usElbowLeft","usLeftEdge","usLeftEdge",-15],["v","usLeftEdge","usTip","usLeftEdge",-15],["v","usRightEdge","backPitchPoint","usRightEdge",15],["l","usCuffLeft","usCuffRight","usCuffRight",15],["l","usElbowLeft","elbowRight","elbowRight",0],["l","usLeftEdge","usRightEdge","usRightEdge",0]]),n&&on(r,[["l","usSlit","usSlitRight","usSlitRight",-15],["l","usCuffRight","usSlitRight","usSlitRight",-15]]),r)};function kn(t,e,o,a,i,n,s){o[t+"CollarWaveTop"]=o[t+"CollarTopRight"].shift(270,i),o[t+"CollarWaveBottom"]=o[t+"CollarBottomLeft"].shift(90,i),o[t+"CollarWaveBottomBack"]=o[t+"CollarBottomRight"].shift(90,n*a),o[t+"CollarBackShoulder"]=o[t+"CollarBottomLeft"].shift(0,s);let r=o[t+"CollarBackShoulder"].dist(o[t+"CollarBottomRight"]);o[t+"CollarBottomWave"]=new e(o[t+"CollarBackShoulder"].x+r/2,o[t+"CollarBottomLeft"].y),o[t+"CollarBottomWaveCp1"]=o[t+"CollarBottomWave"].shift(0,.25*r),o[t+"CollarBottomWaveCp2"]=o[t+"CollarBottomWave"].shift(180,.25*r),o[t+"CollarWaveBottomCp1"]=new e(o[t+"CollarBackShoulder"].x,o[t+"CollarWaveBottom"].y),o[t+"CollarTopLeftCp2"]=new e(s,0),o[t+"CollarTopRight"]=o[t+"CollarWaveTop"].shift(0,.3*n)}const Cn={name:"devon.collar",from:rn,hide:{self:!1,from:!0,inherited:!0},options:{collarWidthRatio:87/254,underCollarWaveRatio:.1,upperCollarWaveRatio:.05,underCollarWaveBackRatio:.06,upperCollarWaveBackRatio:.1,upperUnderRatio:.02},draft:({Point:t,points:e,Path:o,paths:a,options:i,store:n,part:s})=>{for(const p in a)delete a[p];for(const p in e)delete e[p];const r=n.get("collarLength")*(1-i.collarLengthRatio),l=n.get("collarLengthBack"),c=r*i.collarWidthRatio;return n.set("collarUpperUnderRatio",i.upperUnderRatio+1),e.boxTopLeft=new t(0,0),e.boxTopRight=new t(r,0),e.boxBottomLeft=new t(0,c),e.boxBottomRight=new t(r,c),e.underCollarTopLeft=e.boxTopLeft.copy(),e.underCollarTopRight=e.boxTopRight.copy(),e.underCollarBottomLeft=e.boxBottomLeft.copy(),e.underCollarBottomRight=e.boxBottomRight.copy(),e.upperCollarTopLeft=e.boxTopLeft.copy(),e.upperCollarTopRight=e.boxTopRight.shiftFractionTowards(e.boxTopLeft,-1*i.upperUnderRatio),e.upperCollarBottomLeft=e.boxBottomLeft.shiftFractionTowards(e.boxTopLeft,-1*i.upperUnderRatio),e.upperCollarBottomRight=e.upperCollarBottomLeft.copy(),e.upperCollarBottomRight.x=e.upperCollarTopRight.x,a.underBox=(new o).move(e.underCollarTopLeft).line(e.underCollarBottomLeft).line(e.underCollarBottomRight).line(e.underCollarTopRight).line(e.underCollarTopLeft).close().attr("class","lining").hide(),a.upperBox=(new o).move(e.upperCollarTopLeft).line(e.upperCollarBottomLeft).line(e.upperCollarBottomRight).line(e.upperCollarTopRight).line(e.upperCollarTopLeft).close().attr("class","canvas").hide(),kn("under",t,e,i.underCollarWaveBackRatio,c*i.underCollarWaveRatio,c,l),kn("upper",t,e,i.upperCollarWaveBackRatio,c*i.upperCollarWaveRatio,c,l),s}},vn={name:"devon.underCollar",from:Cn,hide:{self:!1,from:!0,inherited:!0},options:{},draft:({points:t,Path:e,paths:o,macro:a,store:i,sa:n,snippets:s,Snippet:r,complete:l,part:c})=>(o.seamBase=(new e).move(t.underCollarWaveBottom).curve(t.underCollarWaveBottomCp1,t.underCollarBottomWaveCp2,t.underCollarBottomWave).curve(t.underCollarBottomWaveCp1,t.underCollarWaveBottomBack,t.underCollarWaveBottomBack).line(t.underCollarTopRight).curve(t.underCollarTopRight,t.underCollarTopLeftCp2,t.underCollarTopLeft).hide(),o.seam=(new e).move(t.underCollarWaveBottom).join(o.seamBase).line(t.underCollarTopLeft).close().attr("class","fabric"),n&&(o.sa=(new e).move(t.underCollarWaveBottom).join(o.seamBase.offset(n)).line(t.underCollarWaveBottom).attr("class","fabric sa")),a("cutonfold",{from:t.underCollarTopLeft,to:t.underCollarWaveBottom,grainline:!0}),i.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),t.title=t.underCollarTopLeft.shiftFractionTowards(t.underCollarBottomRight,.5),a("title",{nr:16,title:"underCollar",at:t.title,scale:.5}),on(c,[["h","underCollarTopLeft","underCollarTopRight","underCollarTopLeft",-15],["h","underCollarWaveBottom","underCollarWaveBottomBack","underCollarWaveBottomBack",15],["v","underCollarWaveBottom","underCollarTopLeft","underCollarTopLeft",-15]]),t.shoulderMarking=o.seamBase.shiftAlong(i.get("collarLengthBack")),s.shoulderMarking=new r("notch",t.shoulderMarking),t.facingMarking=o.seamBase.shiftAlong(i.get("facingLengthFromBack")),s.facingMarking=new r("bnotch",t.facingMarking),l&&on(c,[["h","underCollarBottomLeft","facingMarking","underCollarWaveBottomBack",25],["h","underCollarBottomLeft","shoulderMarking","underCollarWaveBottomBack",35]]),c)},yn={name:"devon.upperCollar",from:Cn,hide:{self:!1,from:!0,inherited:!0},options:{},draft:({points:t,Path:e,paths:o,macro:a,store:i,sa:n,snippets:s,Snippet:r,complete:l,part:c})=>(o.seamBase=(new e).move(t.upperCollarWaveBottom).curve(t.upperCollarWaveBottomCp1,t.upperCollarBottomWaveCp2,t.upperCollarBottomWave).curve(t.upperCollarBottomWaveCp1,t.upperCollarWaveBottomBack,t.upperCollarWaveBottomBack).line(t.upperCollarTopRight).curve(t.upperCollarTopRight,t.upperCollarTopLeftCp2,t.upperCollarTopLeft).hide(),o.seam=(new e).move(t.upperCollarWaveBottom).join(o.seamBase).line(t.upperCollarWaveBottom).close().attr("class","fabric"),n&&(o.sa=(new e).move(t.upperCollarWaveBottom).join(o.seamBase.offset(n)).line(t.upperCollarWaveBottom).attr("class","fabric sa")),t.title=t.upperCollarTopLeft.shiftFractionTowards(t.upperCollarBottomRight,.5),a("title",{nr:15,title:"upperCollar",at:t.title}),a("cutonfold",{from:t.upperCollarTopLeft,to:t.upperCollarWaveBottom,grainline:!0}),i.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),on(c,[["h","upperCollarTopLeft","upperCollarTopRight","upperCollarTopLeft",-15],["h","upperCollarWaveBottom","upperCollarWaveBottomBack","upperCollarWaveBottomBack",15],["v","upperCollarWaveBottom","upperCollarTopLeft","upperCollarTopLeft",-15]]),t.title=t.upperCollarTopLeft.shiftFractionTowards(t.upperCollarBottomRight,.5),a("title",{nr:15,title:"upperCollar",at:t.title,scale:.5}),t.shoulderMarking=o.seamBase.shiftAlong(i.get("collarLengthBack")*i.get("collarUpperUnderRatio")),s.shoulderMarking=new r("notch",t.shoulderMarking),t.facingMarking=o.seamBase.shiftAlong(i.get("facingLengthFromBack")*i.get("collarUpperUnderRatio")),s.facingMarking=new r("bnotch",t.facingMarking),l&&on(c,[["h","upperCollarBottomLeft","facingMarking","upperCollarWaveBottomBack",25],["h","upperCollarBottomLeft","shoulderMarking","upperCollarWaveBottomBack",35]]),c)},Tn={name:"devon.waistband",after:mn,hide:{self:!1,from:!0,inherited:!0},options:{},draft:({Point:t,points:e,Path:o,paths:a,Snippet:i,snippets:n,macro:s,sa:r,store:l,units:c,complete:p,expand:d,part:h})=>{const m=l.get("hemLength"),f=l.get("waistbandWidth"),u=.5*l.get("waistbandWidth");if(!d)return l.flag.note({msg:"devon:cutWaistband",replace:{width:c(2*m),length:c(2*f)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),l.flag.preset("expand"),h.hide();for(const g in a)delete a[g];for(const g in e)delete e[g];return e.midLeft=new t(0,0),e.midRight=new t(m,0),e.topLeft=new t(0,-1*f),e.topRight=new t(m,-1*f),e.bottomLeft=new t(0,f),e.bottomRight=new t(m,f),e.button5=new t(u,-.5*f),a.seamBase=(new o).move(e.topRight).line(e.topLeft).line(e.bottomLeft).line(e.bottomRight).hide(),a.seam=(new o).move(e.topRight).join(a.seamBase).line(e.topRight).close().attr("class","fabric"),r&&(a.sa=(new o).move(e.topRight).join(a.seamBase.offset(r)).line(e.bottomRight).attr("class","fabric sa")),s("cutonfold",{from:e.bottomRight,to:e.topRight,grainline:!1}),p&&(a.foldLine=(new o).move(e.midLeft).line(e.midRight).attr("class","note dashed").attr("data-text","foldLine").attr("data-text-class","
1note")),n.button5=new i("button",e.button5),l.cutlist.removeCut("fabric"),l.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),e.title=e.topLeft.shiftFractionTowards(e.bottomRight,.5),s("title",{nr:13,title:"waistband",at:e.title}),e.wbGrainFrom=e.topLeft.shift(335,.1*e.topLeft.dist(e.topRight)),e.wbGrainTo=e.wbGrainFrom.copy(),e.wbGrainTo.y=e.bottomLeft.y-(e.wbGrainFrom.y-e.topLeft.y),s("grainline",{from:e.wbGrainFrom,to:e.wbGrainTo}),on(h,[["h","topLeft","topRight","topLeft",-15],["v","bottomLeft","topLeft","topLeft",-15]]),h}},xn=new n.pT({data:Zi,parts:[tn,en,an,nn,sn,cn,pn,fn,mn,hn,dn,un,gn,ln,bn,wn,vn,yn,Tn]}),Bn=(0,n.D4)([u,_,Si,xi],{o:{drop:["armholeDartCurved","armholeDartCurvePoint","armholeDartCurveWidth","armholeDartPosition","backArmholeCurvature","backArmholePitchDepth","backArmholeSlant","backDartHeight","backHemSlope","bustSpanEase","dartPosition","dartPosition.armhole","dartPosition.shoulder","frontArmholeCurvature","frontArmholePitchDepth","frontShoulderWidth","fullChestEaseReduction","highBustWidth","shoulderDartCurvature","shoulderDartPosition","shoulderToShoulderEase","sleevecapBackFactorX","sleevecapBackFactorY","sleevecapFrontFactorX","sleevecapFrontFactorY","sleevecapQ1Offset","sleevecapQ1Spread1","sleevecapQ1Spread2","sleevecapQ2Offset","sleevecapQ2Spread1","sleevecapQ2Spread2","sleevecapQ3Offset","sleevecapQ3Spread1","sleevecapQ3Spread2","sleevecapQ4Offset","sleevecapQ4Spread1","sleevecapQ4Spread2","sleevecapTopFactorX","sleevecapTopFactorY","sleeveWidthGuarantee","upperDartLength","waistDartLength","waistdartposition","waistDartPosition","waistDartPosition","waistEase"]}}),Sn=JSON.parse('{"id":"diana","name":"Diana draped top","code":"Erica Alcusa S\xe1ez","description":"A FreeSewing pattern for a top with a draped neck","design":"Erica Alcusa S\xe1ez","difficulty":2,"tags":["tops"],"techniques":["curved-seam","flat-sleeve","hem"],"version":"4.6.0","pkg":"@freesewing/diana","collection":true}'),Ln={en:JSON.parse('{"t":"Diana draped top","d":"Diana is a top with a draped neckline.","p":{"back":"Back","front":"Front","sleeve":"Sleeve"},"s":{},"o":{"shoulderSeamLength":{"t":"Shoulder seam length","d":"Controls the length of the shoulder seam"},"drapeAngle":{"t":"Drape angle","d":"Controls the amount of drape"},"hipsEase":{"t":"Hips ease","d":"Controls the amount of ease at your hips"},"waistEase":{"t":"Waist ease","d":"Controls the amount of ease at your waist"}}}')};function Pn({measurements:t,sa:e,store:o,points:a,Path:i,paths:n,macro:s,options:r,Snippet:l,snippets:c,part:p}){const d=void 0!==a.cfHem;for(let m in n)delete n[m];a.waist.x=t.waist*(1+r.waistEase)/4,a.hips.x=t.hips*(1+r.hipsEase)/4,a.hem.x=a.hips.x,a.hipsCp2=a.hips.shift(90,t.waistToHips/3),a.waistCp1=a.waist.shift(-90,t.waistToHips/3),a.waistCp2=a.waist.shift(90,t.hpsToWaistBack/4);let h=["armholeCp2","armholeHollowCp1","armholeHollow","armholeHollowCp2","armholePitchCp1","armholePitch","armholePitchCp2","shoulderCp1","shoulder","neck"];if(d)for(let m of h)a[m]=a[m].rotate(-r.drapeAngle,a.armhole);return a.neck=a.neck.shiftFractionTowards(a.shoulder,1-r.shoulderSeamLength),a.neckCp2.y=1.2*a.shoulder.y,a.cbNeck.y=1.2*a.shoulder.y,a.neckCp2Front=a.neck.shiftTowards(a.shoulder,-a.shoulder.x/4),a.cfNeck.y=a.neckCp2Front.y+.7*(a.neckCp2Front.y-a.neck.y),a.cfNeckCp1=a.cfNeck.shift(0,a.shoulder.x/4),d?(a.cNeck=a.cfNeck,a.cHem=a.cfHem,a.neckCp2=a.neckCp2Front):(a.cNeck=a.cbNeck,a.cHem=a.cbHem,a.cfNeckCp1=a.cNeck),n.saBase=(new i).move(a.hem).line(a.hips).curve(a.hipsCp2,a.waistCp1,a.waist).curve_(a.waistCp2,a.armhole).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.armholePitchCp1,a.armholePitch).curve(a.armholePitchCp2,a.shoulderCp1,a.shoulder).line(a.neck).curve(a.neckCp2,a.cfNeckCp1,a.cNeck),n.hemBase=(new i).move(a.cHem).line(a.hem),n.saBase.hide(),n.hemBase.hide(),n.seam=n.hemBase.join(n.saBase).line(a.cHem),e&&(n.sa=n.hemBase.offset(3*e).join(n.saBase.offset(e)),n.sa.line(a.cNeck).move(a.cHem),n.sa.line(n.sa.start()),n.sa.attr("class","fabric sa")),o.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),c.shoulderSeamEndNotch=new l("notch",a.neck),d&&(c.armholePitchNotch=new l("notch",a.armholePitch)),s("rmcutonfold"),s("cutonfold",{from:a.cNeck,to:a.cHem,grainline:!0}),s("pd",{id:"lArmhole",path:(new i).move(a.armhole).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.armholePitchCp1,a.armholePitch).curve(a.armholePitchCp2,a.shoulderCp1,a.shoulder),d:e+15}),s("pd",{id:"lArmholePitchToShoulder",path:(new i).move(a.armholePitch).curve(a.armholePitchCp2,a.shoulderCp1,a.shoulder),d:-15}),s("vd",{id:"hHemToWaist",from:a.hips,to:a.waist,x:a.hips.x+e+15}),s("vd",{id:"hHemToArmhole",from:a.hips,to:a.armhole,x:a.hips.x+e+30}),s("vd",{id:"hHemToArmholePitch",from:a.hips,to:a.armholePitch,x:a.hips.x+e+45}),s("vd",{id:"hHemToShoulder",from:a.hips,to:a.shoulder,x:a.hips.x+e+60}),s("vd",{id:"hFull",from:a.hips,to:a.neck,x:a.hips.x+e+75}),s("ld",{id:"lShoulderSeam",from:a.neck,to:a.shoulder,d:e+15}),s("vd",{id:"hHemToCenterTop",from:a.cHem,to:a.cNeck,x:a.cHem.x-15}),s("hd",{id:"wHem",from:a.cHem,to:a.hem,y:a.cHem.y+3*e+15}),s("pd",{id:"lNeckOpening",path:(new i).move(a.cNeck).curve(a.cfNeckCp1,a.neckCp2,a.neck),d:-e-15}),p}const Rn={name:"diana.front",from:I,hide:n.V9.HIDE_TREE,measurements:["biceps","chest","hpsToWaistBack","hips","waist","waistToHips","neck","shoulderSlope","shoulderToShoulder","shoulderToWrist","wrist"],optionalMeasurements:["highBust"],options:{collarFactor:5,libraryFitSleeve:!0,brianFitCollar:!0,collarEase:0,backNeckCutout:.05,shoulderSlopeReduction:0,s3Collar:0,s3Armhole:0,drapeAngle:{deg:20,min:10,max:30,menu:"style"},acrossBackFactor:{pct:97,min:93,max:100,menu:"advanced"},cuffEase:{pct:20,min:0,max:30,...(0,n.Wx)("wrist"),menu:"fit"},lengthBonus:{pct:0,min:0,max:50,menu:"fit"},sleeveLengthBonus:{pct:0,min:-40,max:10,menu:"fit"},shoulderSeamLength:{pct:35,min:.1,max:60,menu:"style"},armholeDepthFactor:{pct:55,min:50,max:70,menu:"advanced"},armholeDepth:{pct:0,min:0,max:20,menu:"advanced"},frontArmholeDeeper:{pct:0,min:0,max:1.5,menu:"advanced"},shoulderEase:{pct:0,min:-2,max:6,...(0,n.Wx)("shoulderToShoulder"),menu:"fit"},waistEase:{pct:0,min:-10,max:20,...(0,n.Wx)("waist"),menu:"fit"},hipsEase:{pct:0,min:-10,max:20,...(0,n.Wx)("hips"),menu:"fit"},chestEase:{pct:0,min:-10,max:20,...(0,n.Wx)("chest"),menu:"fit"},bicepsEase:{pct:0,min:-5,max:50,...(0,n.Wx)("biceps"),menu:"fit"},sleevecapEase:{pct:0,min:0,max:10,menu:"advanced.sleevecap"},sleevecapTopFactorX:{pct:50,min:25,max:75,menu:"advanced.sleevecap"},sleevecapTopFactorY:{pct:100,min:35,max:165,menu:"advanced.sleevecap"},sleevecapBackFactorX:{pct:60,min:35,max:65,menu:"advanced.sleevecap"},sleevecapBackFactorY:{pct:33,min:30,max:65,menu:"advanced.sleevecap"},sleevecapFrontFactorX:{pct:55,min:35,max:65,menu:"advanced.sleevecap"},sleevecapFrontFactorY:{pct:33,min:30,max:65,menu:"advanced.sleevecap"},sleevecapQ1Offset:{pct:3,min:0,max:7,menu:"advanced.sleevecap"},sleevecapQ2Offset:{pct:5.5,min:0,max:7,menu:"advanced.sleevecap"},sleevecapQ3Offset:{pct:4.5,min:0,max:7,menu:"advanced.sleevecap"},sleevecapQ4Offset:{pct:1,min:0,max:7,menu:"advanced.sleevecap"},sleevecapQ1Spread1:{pct:6,min:4,max:20,menu:"advanced.sleevecap"},sleevecapQ1Spread2:{pct:15,min:4,max:20,menu:"advanced.sleevecap"},sleevecapQ2Spread1:{pct:15,min:4,max:20,menu:"advanced.sleevecap"},sleevecapQ2Spread2:{pct:10,min:4,max:20,menu:"advanced.sleevecap"},sleevecapQ3Spread1:{pct:10,min:4,max:20,menu:"advanced.sleevecap"},sleevecapQ3Spread2:{pct:8,min:4,max:20,menu:"advanced.sleevecap"},sleevecapQ4Spread1:{pct:7,min:4,max:20,menu:"advanced.sleevecap"},sleevecapQ4Spread2:{pct:7,min:4,max:20,menu:"advanced.sleevecap"},sleeveWidthGuarantee:{pct:90,min:25,max:100,menu:"advanced"},draftForHighBust:{bool:!1,menu:"fit"}},draft:Pn},Fn={name:"diana.back",from:N,hide:n.V9.HIDE_TREE,measurements:["biceps","chest","hpsToWaistBack","hips","waist","waistToHips","neck","shoulderSlope","shoulderToShoulder","shoulderToWrist","wrist"],optionalMeasurements:["highBust"],options:{collarFactor:5,libraryFitSleeve:!0,brianFitCollar:!0,collarEase:0,backNeckCutout:.05,shoulderSlopeReduction:0,s3Collar:0,s3Armhole:0,drapeAngle:{deg:20,min:10,max:30,menu:"style"},acrossBackFactor:{pct:97,min:93,max:100,menu:"advanced"},cuffEase:{pct:20,min:0,max:30,...(0,n.Wx)("wrist"),menu:"fit"},lengthBonus:{pct:0,min:0,max:50,menu:"fit"},sleeveLengthBonus:{pct:0,min:-40,max:10,menu:"fit"},shoulderSeamLength:{pct:35,min:.1,max:60,menu:"style"},armholeDepthFactor:{pct:55,min:50,max:70,menu:"advanced"},frontArmholeDeeper:{pct:0,min:0,max:1.5,menu:"advanced"},shoulderEase:{pct:0,min:-2,max:6,...(0,n.Wx)("shoulderToShoulder"),menu:"fit"},waistEase:{pct:0,min:-10,max:20,...(0,n.Wx)("waist"),menu:"fit"},hipsEase:{pct:0,min:-10,max:20,...(0,n.Wx)("hips"),menu:"fit"},chestEase:{pct:0,min:-10,max:20,...(0,n.Wx)("chest"),menu:"fit"},bicepsEase:{pct:0,min:-5,max:50,...(0,n.Wx)("biceps"),menu:"fit"},sleevecapEase:{pct:0,min:0,max:10,menu:"advanced.sleevecap"},sleevecapTopFactorX:{pct:50,min:25,max:75,menu:"advanced.sleevecap"},sleevecapTopFactorY:{pct:100,min:35,max:165,menu:"advanced.sleevecap"},sleevecapBackFactorX:{pct:60,min:35,max:65,menu:"advanced.sleevecap"},sleevecapBackFactorY:{pct:33,min:30,max:65,menu:"advanced.sleevecap"},sleevecapFrontFactorX:{pct:55,min:35,max:65,menu:"advanced.sleevecap"},sleevecapFrontFactorY:{pct:33,min:30,max:65,menu:"advanced.sleevecap"},sleevecapQ1Offset:{pct:3,min:0,max:7,menu:"advanced.sleevecap"},sleevecapQ2Offset:{pct:5.5,min:0,max:7,menu:"advanced.sleevecap"},sleevecapQ3Offset:{pct:4.5,min:0,max:7,menu:"advanced.sleevecap"},sleevecapQ4Offset:{pct:1,min:0,max:7,menu:"advanced.sleevecap"},sleevecapQ1Spread1:{pct:6,min:4,max:20,menu:"advanced.sleevecap"},sleevecapQ1Spread2:{pct:15,min:4,max:20,menu:"advanced.sleevecap"},sleevecapQ2Spread1:{pct:15,min:4,max:20,menu:"advanced.sleevecap"},sleevecapQ2Spread2:{pct:10,min:4,max:20,menu:"advanced.sleevecap"},sleevecapQ3Spread1:{pct:10,min:4,max:20,menu:"advanced.sleevecap"},sleevecapQ3Spread2:{pct:8,min:4,max:20,menu:"advanced.sleevecap"},sleevecapQ4Spread1:{pct:7,min:4,max:20,menu:"advanced.sleevecap"},sleevecapQ4Spread2:{pct:7,min:4,max:20,menu:"advanced.sleevecap"},sleeveWidthGuarantee:{pct:90,min:25,max:100,menu:"advanced"},draftForHighBust:{bool:!1,menu:"fit"}},draft:Pn};const En={name:"diana.sleeve",from:y,after:[Rn,Fn],hide:n.V9.HIDE_TREE,draft:function({sa:t,points:e,paths:o,Path:a,macro:i,store:n,part:s}){return o.seam=(new a).move(e.wristRight).line(e.bicepsRight).join(o.sleevecap).line(e.wristLeft).line(e.wristRight).close().addClass("fabric"),t&&(o.saBase=(new a).move(e.wristRight).line(e.bicepsRight).join(o.sleevecap).line(e.wristLeft),o.hemBase=(new a).move(e.wristLeft).line(e.wristRight),o.saBase.hide(),o.hemBase.hide(),o.sa=o.saBase.offset(t).join(o.hemBase.offset(3*t)),o.sa.line(o.sa.start()).close().addClass("fabric sa")),n.cutlist.setCut({cut:2,from:"fabric"}),i("grainline",{from:e.centerWrist,to:e.sleeveTop}),i("vd",{id:"hWristToSleevecapBottom",from:e.wristLeft,to:e.bicepsLeft,x:e.bicepsLeft.x-t-15}),i("vd",{id:"hFull",from:e.wristLeft,to:e.sleeveTip,x:e.bicepsLeft.x-t-30}),i("hd",{id:"wFull",from:e.bicepsLeft,to:e.bicepsRight,y:e.sleeveTip.y-t-30}),i("hd",{id:"wWrist",from:e.wristLeft,to:e.wristRight,y:e.wristLeft.y+3*t+15}),i("pd",{id:"lSleevecap",path:o.sleevecap.reverse(),d:-1*t-15}),i("rmhd","wCuff"),s}},Wn=new n.pT({data:Sn,parts:[Rn,Fn,En]}),Hn=(0,n.D4)([_,Ln]),An=JSON.parse('{"id":"florence","name":"Florence face mask","code":"Joost De Cock","description":"A FreeSewing pattern for a face mask","design":"Joost De Cock","difficulty":1,"tags":["accessories"],"techniques":["curved-seam"],"version":"4.6.0","pkg":"@freesewing/florence","collection":true}');const On={name:"florence.mask",measurements:["head"],options:{length:{pct:40,min:35,max:45,menu:"fit"},height:{pct:26,min:23,max:29,menu:"fit"},curve:{pct:12.5,min:10,max:15,menu:"fit"}},draft:function({points:t,Point:e,paths:o,Path:a,measurements:i,options:n,complete:s,sa:r,Snippet:l,snippets:c,macro:p,utils:d,store:h,part:m}){return t.topLeft=new e(0,0),t.bottomLeft=new e(0,i.head*n.height),t.topRight=new e(i.head*n.length/2,0),t.bottomRight=new e(t.topRight.x,t.bottomLeft.y),t.tipCenter=new e(t.topRight.x,t.bottomRight.y/4),t.topEdge=t.topLeft.shiftFractionTowards(t.bottomLeft,.2),t.bottom
1Edge=t.bottomLeft.shiftFractionTowards(t.topLeft,.18),t.topTip=t.topRight.shiftFractionTowards(t.topLeft,.1),t.bottomTip=t.bottomRight.shiftFractionTowards(t.bottomLeft,.4),t.tipCenterCp2=t.tipCenter.shiftFractionTowards(t.topRight,.55),t.tipCenterCp1=t.tipCenter.shiftFractionTowards(t.bottomRight,.5),t.topTipCp2=t.topEdge.shift(0,i.head*n.curve),t.topTipCp1=t.topTip.shiftTowards(t.topTipCp2,t.topTip.dist(t.tipCenterCp2)/2).rotate(90,t.topTip),t.tipCenterCp1=t.tipCenterCp1.rotate(-4,t.tipCenter),t.tipCenterCp2=t.tipCenterCp2.rotate(-4,t.tipCenter),t.bottomTipCp2=t.bottomTip.shiftFractionTowards(d.beamsIntersect(t.bottomTip,t.bottomTip.shift(15,30),t.tipCenter,t.tipCenterCp1),.75),o.seam=(new a).move(t.topEdge).line(t.bottomEdge).line(t.bottomTip).curve(t.bottomTipCp2,t.tipCenterCp1,t.tipCenter).curve(t.tipCenterCp2,t.topTipCp1,t.topTip).curve_(t.topTipCp2,t.topEdge).close().attr("class","fabric"),r&&(o.sa=o.seam.offset(r).attr("class","fabric sa")),s&&(t.ribbon1TopLeft=t.topEdge.shift(-90,2),t.ribbon1TopRight=t.ribbon1TopLeft.shift(0,10),t.ribbon1BottomRight=t.ribbon1TopRight.shift(-90,10),t.ribbon1BottomLeft=t.ribbon1TopLeft.shift(-90,10),t.ribbon2TopLeft=t.bottomEdge.shift(90,12),t.ribbon2TopRight=t.ribbon2TopLeft.shift(0,10),t.ribbon2BottomRight=t.ribbon2TopRight.shift(-90,10),t.ribbon2BottomLeft=t.ribbon2TopLeft.shift(-90,10),o.ribbon1=(new a).move(t.ribbon1TopLeft).line(t.ribbon1TopRight).line(t.ribbon1BottomRight).line(t.ribbon1BottomLeft).move(t.ribbon2TopLeft).line(t.ribbon2TopRight).line(t.ribbon2BottomRight).line(t.ribbon2BottomLeft).addClass("stroke-sm note dotted")),h.cutlist.addCut(),h.cutlist.setCut([{cut:2,from:"fabric"},{cut:2,from:"lining"}]),t.logo=new e(t.tipCenter.x/2,t.tipCenterCp1.y),c.logo=new l("logo",t.logo).attr("data-scale",.5),t.title=t.logo.shift(90,40),p("title",{at:t.title,nr:1,title:"mask",scale:.5}),p("miniscale",{at:t.logo.shift(-90,20)}),p("hd",{id:"wLeftToTipBottom",from:t.bottomEdge,to:t.bottomTip,y:t.bottomTip.y+r+15}),p("hd",{id:"wFull",from:t.bottomEdge,to:t.tipCenter,y:t.bottomTip.y+r+30}),p("hd",{id:"wLeftToTipTop",from:t.topEdge,to:t.topTip,y:t.topTip.y-r-15}),p("vd",{id:"hBottomToLeftBottom",from:t.bottomTip,to:t.bottomEdge,x:t.bottomEdge.x-r-15}),p("vd",{id:"hBottomToLeftTop",from:t.bottomTip,to:t.topEdge,x:t.bottomEdge.x-r-30}),p("vd",{id:"hFull",from:t.bottomTip,to:t.topTip,x:t.bottomEdge.x-r-45}),p("vd",{id:"hBottomToEdgeRight",from:t.bottomTip,to:t.tipCenter,x:t.tipCenter.x+r+15}),m}},Dn={en:JSON.parse('{"t":"Florence face mask","d":"Florence is a face mask.","p":{"mask":"Mask"},"s":{},"o":{"height":{"t":"Height","d":"Controls the height of the face mask"},"length":{"t":"Length","d":"Controls the length of the face mask"},"curve":{"t":"Curve","d":"Controls the curvature of the upper edge of the face mask"}}}')},Nn=new n.pT({data:An,parts:[On]}),In=JSON.parse('{"id":"florent","name":"Florent flat cap","code":["Quentin Felix","Joost De Cock"],"description":"A FreeSewing pattern for a flat cap","design":"Quentin Felix","difficulty":3,"tags":["accessories","hats"],"techniques":["curved-seam"],"version":"4.6.0","pkg":"@freesewing/florent","collection":true}'),Mn={en:JSON.parse('{"t":"Florent flat cap","d":"Florent is a flat cap, a rounded cap with a small stiff brim in front.","p":{"brimBottom":"Brim bottom","brimInterfacing":"Brim interfacing","brimTop":"Brim Top","side":"Side","top":"Top"},"s":{},"o":{"headEase":{"t":"Head ease","d":"The amount of ease around your head"}}}')};const _n={name:"florent.top",measurements:["head"],options:{topSide:.8,brim:0,headEase:{pct:2,min:0,max:5,...(0,n.Wx)("head"),menu:"fit"}},draft:function({sa:t,points:e,macro:o,Point:a,Path:i,paths:n,snippets:s,Snippet:r,store:l,part:c}){const p=(t,e)=>{const{points:o,options:a,Point:i,Path:n,measurements:s}=t.shorthand(),r=e*s.head*(1+a.headEase);o.midFront=new i(0,0),o.midFrontCp2=o.midFront.shift(-90,.074*r),o.midMid=o.midFront.shift(0,.34*r),o.midBack=new i(.654*r,.124*r),o.midSide=new i(.2525*r,.178*r),o.midSideCp1=o.midSide.shift(180,.185*r),o.midSideCp2=o.midSide.shift(0,.101*r),o.backHollow=new i(.488*r,.136*r),o.backHollowCp1=o.backHollow.shift(180,.033*r),o.backHollowCp2=o.backHollow.shift(0,.033*r),o.backEdge=new i(.576*r,.185*r);let l=o.backEdge.angle(o.midBack)+90;o.backSide=o.backEdge.shift(l,.025*r),o.backSideCp1=o.backSide.shift(l,.02*r),o.midMidCp1=o.midMid.shift(0,.1*r),o.midBackCp2=o.midBack.shift(l,.09*r),o.foldTop=new i(0,0),o.foldTopCp1=o.foldTop.shift(-90,.0433*r),o.foldBottom=o.foldTop.shift(0,.126*r),o.foldBottomCp2=o.foldBottom.shift(-90,.0866*r),o.tip=new i(.411*r,.207*r),o.tipCp1=o.tip.shift(-85,.1*r),o.tipCp2=o.tip.shift(177,.067*r),o.outerTop=new i(.328*r,.337*r),o.outerTopCp1=o.outerTop.shift(180,.05*r),o.outerTopCp2=o.outerTop.shift(0,.05*r),o.outerGuide=new i(.0867*r,.1913*r),o.outerGuideCp1=o.outerGuide.shift(135,.076*r),o.outerGuideCp2=o.outerGuide.shift(-45,.145*r),o.innerGuide=new i(.22*r,.172*r),o.innerGuideCp1=o.innerGuide.shift(-38,.052*r),o.innerGuideCp2=o.innerGuide.shift(142,.035*r);const c=2*o.backEdge.dist(o.midBack),p=2*(new n).move(o.tip).curve(o.tipCp2,o.innerGuideCp1,o.innerGuide).curve(o.innerGuideCp2,o.foldBottomCp2,o.foldBottom).length();return s.head*(1+a.headEase)-(c+p)},d=t=>{const{Path:o}=t.shorthand();return(new o).move(e.midFront).curve(e.midFrontCp2,e.midSideCp1,e.midSide).curve(e.midSideCp2,e.backHollowCp1,e.backHollow).curve(e.backHollowCp2,e.backSideCp1,e.backSide).line(e.backEdge).length()-(new o).move(e.foldTop).curve(e.foldTopCp1,e.outerGuideCp1,e.outerGuide).curve(e.outerGuideCp2,e.outerTopCp1,e.outerTop).curve(e.outerTopCp2,e.tipCp1,e.tip).length()};let h=1,m=1,f=p(c,h);for(;Math.abs(f)>1&&m<25;)m++,h=f>0?1e3/(1e3-f):1e3/(1e3+f),f=p(c,h);f=d(c),m=1;let u=["outerTop","outerTopCp1","outerTopCp2"],g=["outerGuide","outerGuideCp1","outerGuideCp2"];for(;Math.abs(f)>1&&m<25;){for(let t of u)e[t]=e[t].shift(-90,f/3);for(let t of g)e[t]=e[t].shift(-135,f/3);f=d(c),m++}return n.seam=(new i).move(e.midMid).line(e.midFront).curve(e.midFrontCp2,e.midSideCp1,e.midSide).curve(e.midSideCp2,e.backHollowCp1,e.backHollow).curve(e.backHollowCp2,e.backSideCp1,e.backSide).line(e.backEdge).line(e.midBack).curve(e.midBackCp2,e.midMidCp1,e.midMid).close().attr("class","fabric"),n.side=(new i).move(e.foldTop).curve(e.foldTopCp1,e.outerGuideCp1,e.outerGuide).curve(e.outerGuideCp2,e.outerTopCp1,e.outerTop).curve(e.outerTopCp2,e.tipCp1,e.tip).curve(e.tipCp2,e.innerGuideCp1,e.innerGuide).curve(e.innerGuideCp2,e.foldBottomCp2,e.foldBottom).addClass("fabric"),t&&(n.sa=n.seam.offset(t).addClass("fabric sa")),n.side.hide(),l.cutlist.setCut([{cut:2,from:"fabric"},{cut:2,from:"lining"}]),e.grainlineFrom=new a(e.midSideCp1.x,e.midBack.y),e.grainlineTo=e.midBack.clone(),o("grainline",{from:e.grainlineFrom,to:e.grainlineTo}),e.title=new a(e.midMid.x,e.midFrontCp2.y),o("title",{at:e.title,nr:1,title:"top"}),e.logo=new a(e.title.x/2,e.title.y),s.logo=new r("logo",e.logo).attr("data-scale",.75),o("miniscale",{at:new a(.75*e.title.x,e.title.y)}),o("sprinkle",{snippet:"notch",on:["midMid","backHollow","midSide"]}),l.set("topDistanceToFirstNotch",(new i).move(e.backEdge).line(e.backSide).curve(e.backSideCp1,e.backHollowCp2,e.backHollow).length()),l.set("topDistanceToSecondNotch",(new i).move(e.backHollow).curve(e.backHollowCp1,e.midSideCp2,e.midSide).length()+l.get("topDistanceToFirstNotch")),o("vd",{id:"hBottomToTop",from:e.midSide,to:e.foldTop,x:e.foldTop.x-t-15}),o("vd",{id:"hHollowToTop",from:e.backHollow,to:e.midMid,x:e.midMid.x-15}
1),o("vd",{id:"hTipToTop",from:e.midBack,to:e.midMid,x:e.midBack.x+t+15}),o("vd",{id:"hBottomTipToTop",from:e.backEdge,to:e.midMid,x:e.midBack.x+t+30}),o("hd",{id:"wFrontToBottom",from:e.foldTop,to:e.midSide,y:e.midSide.y+t+15}),o("hd",{id:"wFrontToHollow",from:e.foldTop,to:e.backHollow,y:e.midSide.y+t+30}),o("hd",{id:"wFrontToTipBack",from:e.foldTop,to:e.backEdge,y:e.midSide.y+t+45}),o("hd",{id:"wFull",from:e.foldTop,to:e.midBack,y:e.midSide.y+t+60}),c}};const jn={name:"florent.side",from:_n,draft:function({store:t,sa:e,points:o,macro:a,paths:i,Path:n,snippets:s,Snippet:r,part:l}){for(let c of Object.keys(i))"side"!==c&&delete i[c];i.seam=i.side.clone().line(o.foldTop).attr("class","fabric"),i.seam.unhide(),e&&(i.sa=(new n).move(o.foldTop).line(o.foldTop.shift(180,e)).join(i.side.offset(e)).line(o.foldBottom).addClass("fabric sa"));for(let c in s)delete s[c];return t.cutlist.setCut([{cut:1,from:"fabric",onFold:!0},{cut:1,from:"lining",onFold:!0}]),a("cutonfold",{from:o.foldBottom,to:o.foldTop,offset:15,grainline:!0}),o.title=o.innerGuide.shiftFractionTowards(o.outerGuide,.5),a("title",{at:o.title,nr:2,title:"side"}),o.logo=o.tipCp2.shiftFractionTowards(o.outerTopCp1,.5),s.logo=new r("logo",o.logo).attr("data-scale",.75),o.notch1=(new n).move(o.tip).curve(o.tipCp1,o.outerTopCp2,o.outerTop).shiftAlong(t.get("topDistanceToFirstNotch")),o.notch2=(new n).move(o.tip).curve(o.tipCp1,o.outerTopCp2,o.outerTop).curve(o.outerTopCp1,o.outerGuideCp2,o.outerGuide).shiftAlong(t.get("topDistanceToSecondNotch")),a("sprinkle",{snippet:"notch",on:["notch1","notch2"]}),a("vd",{id:"hFoldToTipRight",from:o.tip,to:o.foldBottom,x:o.tip.x+e+15}),a("vd",{id:"hFull",from:o.outerTop,to:o.foldBottom,x:o.tip.x+e+45}),a("hd",{id:"wAtFold",from:o.foldTop,to:o.foldBottom,y:o.foldTop.y-15}),a("hd",{id:"wLeftToBottom",from:o.foldTop,to:o.outerTop,y:o.outerTop.y+e+15}),a("hd",{id:"wFull",from:o.foldTop,to:o.tip,y:o.outerTop.y+e+45}),a("hd",{id:"notch2W",from:o.foldTop,to:o.notch2,y:o.outerTop.y+e}),a("vd",{id:"notch2H",from:o.foldTop,to:o.notch2,x:o.foldTop.x-e-15}),a("hd",{id:"notch1W",from:o.foldTop,to:o.notch1,y:o.outerTop.y+e+30}),a("vd",{id:"notch1H",from:o.notch1,to:o.foldBottom,x:o.tip.x+e+30}),l}};const Gn={name:"florent.brimBottom",measurements:["head"],options:{topSide:.8,brim:0,headEase:{pct:2,min:0,max:5,...(0,n.Wx)("head"),menu:"fit"}},draft:function({sa:t,store:e,points:o,options:a,macro:i,Point:n,paths:s,Path:r,measurements:l,part:c}){const p=1*l.head*(1+a.headEase);return o.tipRight=new n(.147*p,0),o.tipLeft=o.tipRight.flipX(),o.tipRightCp2=o.tipRight.shift(-115,.051*p),o.tipLeftCp1=o.tipRightCp2.flipX(),o.tipRightCp1=o.tipRight.shift(-75,.195*p),o.tipLeftCp2=o.tipRightCp1.flipX(),o.innerMid=new n(0,.13*p),o.outerMid=new n(0,.226*p),o.innerMidCp2=o.innerMid.shift(180,.13*p),o.innerMidCp1=o.innerMidCp2.flipX(),o.outerMidCp1=o.outerMid.shift(180,.066*p),o.outerMidCp2=o.outerMidCp1.flipX(),e.set("brimInnerLength",2*(new r).move(o.tipRight).curve(o.tipRightCp2,o.innerMidCp1,o.innerMid).length()),s.seam=(new r).move(o.tipLeft).curve(o.tipLeftCp2,o.outerMidCp1,o.outerMid).curve(o.outerMidCp2,o.tipRightCp1,o.tipRight).curve(o.tipRightCp2,o.innerMidCp1,o.innerMid).curve(o.innerMidCp2,o.tipLeftCp1,o.tipLeft).line(o.tipLeft).close().addClass("fabric"),t&&(s.sa=s.seam.offset(t).addClass("fabric sa")),e.cutlist.setCut({cut:1,from:"fabric"}),i("grainline",{from:o.outerMid,to:o.innerMid}),o.title=o.innerMid.shiftFractionTowards(o.outerMidCp2,.35),i("title",{at:o.title,nr:3,title:"brimBottom"}),i("sprinkle",{snippet:"notch",on:["innerMid","outerMid"]}),i("hd",{id:"wTipToTip",from:o.tipLeft,to:o.tipRight,y:o.tipLeft.y-t-15}),i("hd",{id:"wFull",from:s.seam.edge("left"),to:s.seam.edge("right"),y:o.tipLeft.y-t-30}),i("vd",{id:"hBrim",from:o.outerMid,to:o.innerMid,x:o.innerMid.x-15}),i("vd",{id:"hFull",from:o.outerMid,to:o.tipRight,x:o.tipRight.x+t+18}),c}};const Un={name:"florent.brimTop",from:Gn,draft:function({sa:t,points:e,macro:o,paths:a,Path:i,store:n,part:s}){a.hint=(new i).move(e.tipLeft).curve(e.tipLeftCp2,e.outerMidCp1,e.outerMid).curve(e.outerMidCp2,e.tipRightCp1,e.tipRight).attr("class","dashed stroke-sm"),a.rest=(new i).move(e.tipRight).curve(e.tipRightCp2,e.innerMidCp1,e.innerMid).curve(e.innerMidCp2,e.tipLeftCp1,e.tipLeft).line(a.seam.start()),a.seam=a.hint.offset(3).join(a.rest).close().addClass("fabric"),t&&(a.sa=a.hint.offset(t+3).join(a.rest.offset(t)).close().addClass("fabric sa")),n.cutlist.setCut({cut:1,from:"fabric"}),o("grainline",{from:e.outerMid,to:e.innerMid}),e.title=e.innerMid.shiftFractionTowards(e.outerMidCp2,.35),o("title",{at:e.title,nr:4,title:"brimTop"}),o("rmad");let r=a.seam.edge("bottom");return o("hd",{id:"wFull",from:a.seam.edge("left"),to:a.seam.edge("right"),y:e.tipLeft.y-t-15}),o("vd",{id:"hBrim",from:r,to:e.innerMid,x:e.innerMid.x-15}),o("vd",{id:"hFull",from:r,to:e.tipRight,x:e.tipRight.x+t+18}),s}};
1const Yn={name:"florent.brimInterfacing",from:Gn,draft:function({sa:t,complete:e,points:o,macro:a,paths:i,Path:n,store:s,part:r}){i.hint=i.seam.clone().attr("class","dashed stroke-sm"),i.outset=(new n).move(o.tipLeft).curve(o.tipLeftCp2,o.outerMidCp1,o.outerMid).curve(o.outerMidCp2,o.tipRightCp1,o.tipRight).attr("class","lining"),o.outsetStart=i.outset.shiftAlong(5),o.outsetEnd=i.outset.reverse().shiftAlong(5),i.outset=i.outset.split(o.outsetStart).pop().split(o.outsetEnd).shift(),i.inset=(new n).move(o.tipLeft).curve(o.tipLeftCp1,o.innerMidCp2,o.innerMid).curve(o.innerMidCp1,o.tipRightCp2,o.tipRight).attr("class","various"),o.insetStart=i.inset.shiftAlong(5),o.insetEnd=i.inset.reverse().shiftAlong(5),i.inset=i.inset.split(o.insetStart).pop().split(o.insetEnd).shift(),i.inset.hide(),i.outset.hide(),e&&(i.hint=i.seam.clone().attr("class","dashed stroke-sm")),i.seam=i.outset.clone().line(i.inset.end()).join(i.inset.reverse()).line(i.outset.start()).close().addClass("interfacing");for(let l of Object.keys(i))-1===["seam","inset","outset"].indexOf(l)&&delete i[l];return s.cutlist.setCut({cut:1,from:"rigidInterfacing"}),a("grainline",{from:o.outerMid,to:o.innerMid}),o.title=o.innerMid.shiftFractionTowards(o.outerMidCp2,.35),a("rmtitle"),a("title",{at:o.title,nr:5,title:"brimInterfacing"}),a("hd",{id:"wFull",from:i.seam.edge("left"),to:i.seam.edge("right"),y:o.tipLeft.y-t-15}),a("vd",{id:"hBrim",text:"BOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBs",from:i.outset.edge("bottom"),to:i.inset.edge("bottom"),x:o.innerMid.x-15}),a("vd",{id:"hFull",from:i.outset.edge("bottom"),to:i.inset.edge("topRight"),x:o.tipRight.x+t+18}),r}},$n=new n.pT({data:In,parts:[_n,jn,Gn,Un,Yn]}),zn={en:JSON.parse('{"t":"Gozer","d":"A FreeSewing pattern for a Halloween costume","p":{"ghost":"ghost"},"s":{"partialPart.t":"The main part is only partially shown.","partialPart.d":"The actual part is a circle with a radius of {{{ radius }}}."},"o":{}}')},Jn=JSON.parse('{"id":"gozer","name":"Gozer ghost costume","code":"Wouter Van Wageningen","description":"A FreeSewing pattern for a ghost costume","design":"Wouter Van Wageningen","difficulty":1,"tags":["costumes"],"techniques":["hem"],"version":"4.6.0","pkg":"@freesewing/gozer","collection":true}'),Kn={name:"gozer.ghost",measurements:["hpsToWaistBack","waistToFloor","head"],draft:({measurements:t,Point:e,points:o,Snippet:a,snippets:i,sa:n,macro:s,expand:r,store:l,units:c,part:p})=>{const d=t.head*(1/24),h=t.head/2.25,m=t.head*(1/12.7),f=t.hpsToWaistBack+t.waistToFloor+t.head/Math.PI,u=h+3*d;let g=f,b="fabric";return o.middle=new e(0,0),o.eyeLine=o.middle.shift(270,h),o.eyeLeft=o.eyeLine.shift(180,m),o.eyeRight=o.eyeLine.shift(0,m),o.left=new e(-1*g,0),o.right=new e(g,0),o.eyeLeft.addCircle(d),o.eyeRight.addCircle(d),r?l.flag.preset("expandIsOn"):(l.flag.note({msg:"gozer:partialPart",notes:[n?"flag:saIncluded":"flag:saExcluded","flag:partPartiallyShownByExpand"],replace:{radius:c(f+n)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),l.flag.preset("expandIsOff"),g=u,b="help note"),o.middle.addCircle(g,b),i.center=new a("notch",o.middle),i.eyeLeft=new a("notch",o.eyeLeft),i.eyeRight=new a("notch",o.eyeRight),r||(o.text=new e(-.25*g,-.5*g).addText("Outer circle is not the actual radius.\nThe actual radius is "+c(f+n)+".")),o.left=new e(-1*g,0),o.right=new e(g,0),o.title=o.middle.shift(10,.5*g),s("title",{nr:1,at:o.title,title:"Gozer",align:"center"}),o.logo=o.middle.shift(200,.6*g),i.logo=new a("logo",o.logo),n&&r&&(o.sa=new e(0,0).addCircle(g+n,b+" sa")),r&&s("hd",{from:o.left,to:o.right,id:"width",y:o.right.y}),s("hd",{from:o.eyeLeft,to:o.middle,id:"eyeh",y:o.eyeLeft.y}),s("vd",{from:o.eyeLeft,to:o.middle,id:"eyew",x:o.eyeLeft.x}),s("hd",{from:o.eyeRight.shift(180,d),to:o.eyeRight.shift(0,d),id:"eyewidth",y:o.eyeRight.y-1.25*d}),s("ld",{from:o.middle,to:o.eyeLeft,id:"eyeradius"}),p}},Vn=new n.pT({data:Jn,parts:[Kn]}),Xn=JSON.parse('{"id":"hi","name":"Hi the shark","code":"Wouter Van Wageningen","description":"A FreeSewing pattern for a shark plush toy","design":"Wouter Van Wageningen","difficulty":4,"tags":["accessories","toys"],"techniques":["curved-seam","dart"],"version":"4.6.0","pkg":"@freesewing/hi","collection":true}'),Qn={en:JSON.parse('{"t":"Hi the shark","d":"The world\'s friendliest shark","p":{"aboveMouth":"Above mouth piece","belly":"Belly","body":"Body","bottomOfFin":"Bottom of fin","lowerTeeth":"Lower teeth","mouth":"Mouth","tail":"Tail","topOfFin":"Top of fin","upperTeeth":"Upper teeth"},"s":{},"o":{"hungry":{"t":"Hungry","d":"Changes the belly shape to convey if Hi has just eaten"},"nosePointiness":{"t":"Nose pointiness","d":"Controls how pointy Hi\'s nose is"},"aggressive":{"t":"Aggressive","d":"Give Hi pointy teeth, or not"},"aggressiveNo":{"t":"Friendly","d":"Hi will have rounded teeth"},"aggressiveYes":{"t":"Aggressive","d":"Hi will have pointy teeth"},"size":{"t":"Size","d":"Sharks come in all sizes, and so does Hi"}}}')},qn=1e3,Zn={name:"hi.body",options:{length:qn,size:{pct:100,min:5,max:500,menu:"style",toAbs:(t,{options:e})=>e?.length?e.length*t:qn*t,fromAbs:(t,{options:e})=>e?.length?Math.round(1e4*t/e.length)/1e4:Math.round(1e4*t/qn)/1e4},nosePointiness:{pct:0,min:-5,max:10,menu:"style"},aggressive:{bool:!1,menu:"style"}}
1,draft:({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,complete:l,options:c,macro:p,utils:d,part:h})=>{const m=1*c.size;t.set("multiplier",m);const f=117.67274991262845*m,u=124.91298035032229*m,g=255.92397474640785*m,b=201.01260719168837*m,w=134.89080971660005*m,k=49.0386070356816*m,C=225.86340480918992*m,v=66.84760000179512*m,y=40.7278200374142*m,T=23.78799421977402*m,x=57.68530918700182*m,B=98.0662397820983*m,S=91.32736600274856*m,L=295.1097706682888*m,P=209.4263335058177*m,R=152.51537318250902*m,F=255.15294373571314*m,E=71.90453921693678*m,W=32.13103487929059*m,H=23.72518967258217*m,A=44.99353642469105*m,O=42.33568754608812*m,D=62.59332758369697*m,N=40.89285869195256*m,I=176.21501525125487*m,M=130.11389715553065*m,_=29.56689479806765*m,j=104.66860665930352*m,G=8.03497915367552*m,U=34.57808908832297*m,Y=89.11908088619404*m,$=25.54827831772624*m,z=41.24120086757895*m,J=158.23693200387828*m,K=4.87663090668135*m,V=25.76988630165065*m,X=4.13950105689086*m,Q=13.2750849338149*m,q=17.66659910678904*m,Z=17.66533107530116*m,tt=14.46914569005365*m,et=39.51915145850176*m,ot=35.66832366400192*m,at=48.53828530139895*m,it=77.2603605608982*m,nt=37.42741381661305*m,st=74.89746640634775*m,rt=101.16048880857042*m,lt=36.21092864039804*m,ct=63.69410844026312*m,pt=97.90988675818191*m,dt=62.08991689477443*m,ht=22.74982929606286*m,mt=16.57960183478481*m,ft=23.95674278778315*m,ut=24.49741270011998*m,gt=180.18315182058507*m,bt=2.3629811679317316*m,wt=41.01907104018812*m,kt=170.1382393,Ct=39.2280236;let vt=161.5263465;const yt=142.8538439,Tt=103.9416747;a.body01=new o(0,0),a.body02=a.body01.shift(kt,f),a.body03=a.body02.shift(Ct,u),a.body04=a.body03.shift(159.6914424,g),a.body05=a.body04.shift(147.5949161,b),a.body06=a.body05.shift(128.0581973,w),a.body07=a.body06.shift(253.6604388,k),a.body08=a.body07.shift(225.7462208,C),a.body09=a.body08.shift(157.5894683,v),a.body10=a.body09.shift(125.1280145,y),a.body11=a.body10.shift(242.0485099,T),a.body12=a.body11.shift(211.5926663,x),a.body13=a.body12.shift(171.354716,B),a.body14=a.body13.shift(245.2915054,S),a.body15=a.body14.shift(326.7578209,L),a.body16=a.body15.shift(359.0692249,P),a.body17=a.body16.shift(353.6138832,R),a.body18=a.body17.shift(2.546389668,F),a.body19=a.body18.shift(348.3450181,E),a.body01cp1=a.body01.shift(vt,W),a.body02cp1=a.body02.shift(31.95354992,A),a.body03cp1=a.body03.shift(yt,D),a.body04cp1=a.body04.shift(169.1071046,I),a.body05cp1=a.body05.shift(105.1596015,_),a.body06cp1=a.body06.shift(221.1852544,G),a.body07cp1=a.body07.shift(267.2041495,Y),a.body08cp1=a.body08.shift(177.4386949,z),a.body09cp1=a.body09.shift(119.4140746,K),a.body10cp1=a.body10.shift(219.0878163,X),a.body11cp1=a.body11.shift(251.2799387,q),a.body12cp1=a.body12.shift(175.0877187,tt),a.body13cp1=a.body13.shift(260.2392636,ot),a.body14cp1=a.body14.shift(320.929847,it),a.body15cp1=a.body15.shift(22.55298719,st),a.body16cp1=a.body16.shift(13.89041491,lt),a.body17cp1=a.body17.shift(11.04287338,pt),a.body18cp1=a.body18.shift(356.968813,ht),a.body19cp1=a.body19.shift(51.33608313,ft),a.body01cp2=a.body01.shift(255.6503959,H),a.body02cp2=a.body02.shift(10,O),a.body03cp2=a.body03.shift(225.3745028,N),a.body04cp2=a.body04.shift(350.7775897,M),a.body05cp2=a.body05.shift(288.5890112,j),a.body06cp2=a.body06.shift(344.141322,U),a.body07cp2=a.body07.shift(87.03164984,$),a.body08cp2=a.body08.shift(358.5040423,J),a.body09cp2=a.body09.shift(299.4139506,V),a.body10cp2=a.body10.shift(311.9955535,Q),a.body11cp2=a.body11.shift(71.28196954,Z),a.body12cp2=a.body12.shift(355.087783,et),a.body13cp2=a.body13.shift(351.4909474,at),a.body14cp2=a.body14.shift(56.95148863,nt),a.body15cp2=a.body15.shift(153.1212844,rt),a.body16cp2=a.body16.shift(141.0219905,ct),a.body17cp2=a.body17.shift(138.4852424,dt),a.body18cp2=a.body18.shift(178.1542839,mt),a.body19cp2=a.body19.shift(158.5586388,ut),a.body02=a.body01.shift(kt-1.7,f),a.body01cp2=a.body01.shift(a.body01.angle(a.body19)+(a.body19.angle(a.body01)-a.body19.angle(a.body19cp1)),H),vt=Math.min(a.body01.angle(a.body01cp2)+90*(-1+c.nosePointiness),a.body01.angle(a.body02)-5),a.body01cp1=a.body01.shift(vt,W),a.body03=a.body02.shift(Ct,f),a.body02cp1=a.body02.shift(a.body02.angle(a.body03)-(a.body02.angle(a.body02cp2)-a.body02.angle(a.body01)),O),a.body03cp2=a.body03.shift(a.body03.angle(a.body02)+(a.body01.angle(a.body02)-a.body01.angle(a.body01cp1)),W),a.body03cp1=a.body03.shift(yt+Math.max(-10,50*c.nosePointiness),D);let xt=(a.body13.angle(a.body13cp1)-a.body13.angle(a.body14)+(a.body14.angle(a.body13)-a.body14.angle(a.body14cp2)))/2;a.body14cp2=a.body14.shift(a.body14.angle(a.body13)-xt,ot),a.body13cp1=a.body13.shift(a.body13.angle(a.body14)+xt,ot),a.eyeBig=a.body01.shift(184.8499937,gt),a.eyeSmall=a.eyeBig.shift(151.2656912,bt*((c.aggressive?0:1)-.5));const Bt=.55191502449351,St=18.7757*m,Lt=11.6262*m;a.eyeBigT=a.eyeBig.shift(90,Lt),a.eyeBigB=a.eyeBig.shift(270,Lt).shift(0,c.aggressive?St/1.5:0),a.eyeBigR=a.eyeBig.shift(0,St).shift(270,c.aggressive?Lt/1.5:0),a.eyeBigL=a.eyeBig.shift(180,St),a.eyeBigTcp1=a.eyeBigT.shift(0,Lt*Bt),a.eyeBigTcp2=a.eyeBigT.shift(180,Lt*Bt),a.eyeBigBcp1=a.eyeBigB.shift(180,Lt*Bt),a.eyeBigBcp2=a.eyeBigB.shift(0,Lt*Bt),a.eyeBigRcp1=a.eyeBigR.shift(270,St/(c.aggressive?1.5:1)*Bt),a.eyeBigRcp2=a.eyeBigR.shift(90,St*Bt),a.eyeBigLcp1=a.eyeBigL.shift(90,St*Bt),a.eyeBigLcp2=a.eyeBigL.shift(270,St*Bt),l&&(n.eyeBig=(new i).move(a.eyeBigT).curve(a.eyeBigTcp2,a.eyeBigLcp1,a.eyeBigL).curve(a.eyeBigLcp2,a.eyeBigBcp1,a.eyeBigB).curve(a.eyeBigBcp2,a.eyeBigRcp1,a.eyeBigR).curve(a.eyeBigRcp2,a.eyeBigTcp1,a.eyeBigT));const Pt=1.87089*m*(c.aggressive?1.5:1),Rt=1.5368*m*(c.aggressive?1.5:1);a.eyeSmallT=a.eyeSmall.shift(270,Rt),a.eyeSmallB=a.eyeSmall.shift(90,Rt),a.eyeSmallR=a.eyeSmall.shift(0,Pt),a.eyeSmallL=a.eyeSmall.shift(180,Pt),a.eyeSmallTcp1=a.eyeSmallT.shift(0,Rt*Bt),a.eyeSmallTcp2=a.eyeSmallT.shift(180,Rt*Bt),a.eyeSmallBcp1=a.eyeSmallB.shift(180,Rt*Bt),a.eyeSmallBcp2=a.eyeSmallB.shift(0,Rt*Bt),a.eyeSmallRcp1=a.eyeSmallR.shift(270,Pt*Bt),a.eyeSmallRcp2=a.eyeSmallR.shift(90,Pt*Bt),a.eyeSmallLcp1=a.eyeSmallL.shift(90,Pt*Bt),a.eyeSmallLcp2=a.eyeSmallL.shift(270,Pt*Bt),l&&(n.eyeSmall=(new i).move(a.eyeSmallT).curve(a.eyeSmallTcp2,a.eyeSmallLcp1,a.eyeSmallL).curve(a.eyeSmallLcp2,a.eyeSmallBcp1,a.eyeSmallB).curve(a.eyeSmallBcp2,a.eyeSmallRcp1,a.eyeSmallR).curve(a.eyeSmallRcp2,a.eyeSmallTcp1,a.eyeSmallT)),n.allButDart=(new i).move(a.body03).curve(a.body03cp1,a.body04cp2,a.body04).curve(a.body04cp1,a.body05cp2,a.body05).curve(a.body05cp1,a.body06cp2,a.body06).curve(a.body06cp1,a.body07cp2,a.body07).curve(a.body07cp1,a.body08cp2,a.body08).curve(a.body08cp1,a.body09cp2,a.body09).
1curve(a.body09cp1,a.body10cp2,a.body10).curve(a.body10cp1,a.body11cp2,a.body11).curve(a.body11cp1,a.body12cp2,a.body12).curve(a.body12cp1,a.body13cp2,a.body13).curve(a.body13cp1,a.body14cp2,a.body14).curve(a.body14cp1,a.body15cp2,a.body15).curve(a.body15cp1,a.body16cp2,a.body16).curve(a.body16cp1,a.body17cp2,a.body17).curve(a.body17cp1,a.body18cp2,a.body18).curve(a.body18cp1,a.body19cp2,a.body19).curve(a.body19cp1,a.body01cp2,a.body01).hide(),n.seam=(new i).move(a.body01).curve(a.body01cp1,a.body02cp2,a.body02).curve(a.body02cp1,a.body03cp2,a.body03).join(n.allButDart).close();const Ft=(new i).move(a.body17).curve(a.body17cp1,a.body18cp2,a.body18);return a.gill1start=Ft.shiftFractionAlong(.018),a.gill2start=Ft.shiftFractionAlong(.098),a.gill3start=Ft.shiftFractionAlong(.178),a.gill4start=Ft.shiftFractionAlong(.258),a.gill5start=Ft.shiftFractionAlong(.338),a.gill1end=a.gill1start.shift(Tt,1*wt),a.gill2end=a.gill2start.shift(Tt,1.08*wt),a.gill3end=a.gill3start.shift(Tt,1.16*wt),a.gill4end=a.gill4start.shift(Tt,1.24*wt),a.gill5end=a.gill5start.shift(Tt,1.32*wt),l&&(n.gill1=(new i).move(a.gill1start).line(a.gill1end),n.gill2=(new i).move(a.gill2start).line(a.gill2end),n.gill3=(new i).move(a.gill3start).line(a.gill3end),n.gill4=(new i).move(a.gill4start).line(a.gill4end),n.gill5=(new i).move(a.gill5start).line(a.gill5end)),a.finCurve=d.beamsIntersect(a.body05,a.body05cp2,a.body04,a.body04cp1),t.set("tailWidth",a.body13.dist(a.body14)),t.set("tailCpAngle",a.body13.angle(a.body13cp1)-a.body13.angle(a.body14)),t.set("tailCpDist",ot),t.set("topOfFinOpening",a.body16.dist(a.body17)),t.set("topOfFinOpeningLength",(new i).move(a.body16).curve(a.body16cp1,a.body17cp2,a.body17).length()),t.set("faceTopLength",(new i).move(a.body17).curve(a.body17cp1,a.body18cp2,a.body18).curve(a.body18cp1,a.body19cp2,a.body19).length()),t.set("bellyLength",(new i).move(a.body17).curve(a.body17cp1,a.body18cp2,a.body18).curve(a.body18cp1,a.body19cp2,a.body19).length()),t.set("bellyTailLength",(new i).move(a.body15).curve(a.body15cp1,a.body16cp2,a.body16).length()),t.set("tolerance",m<1?1:100*m),a.grainlineFrom=a.body13.shiftFractionTowards(a.body03,.5),p("grainline",{from:a.grainlineFrom,to:a.body03}),t.cutlist.addCut({cut:2,material:"color1UpperBody"}),a.bodyTailSnippet=(new i).move(a.body13).curve(a.body13cp1,a.body14cp2,a.body14).shiftFractionAlong(.25),r.bodyTail=new s("bnotch",a.bodyTailSnippet),n.aboveMouth=(new i).move(a.body17).curve(a.body17cp1,a.body18cp2,a.body18).attr("data-text-class","text-xs"),p("banner",{path:n.aboveMouth,text:"aboveMouth",id:"aboveMouth",dy:0,spaces:0,repeat:1}),n.belly=(new i).move(a.body15).curve(a.body15cp1,a.body16cp2,a.body16).attr("data-text-class","text-xs"),p("banner",{path:n.belly,text:"belly",id:"belly",dy:0,spaces:10,repeat:3}),n.topOfFin=(new i).move(a.body16).curve(a.body16cp1,a.body17cp2,a.body17).attr("class","hidden").attr("data-text-class","text-xs"),p("banner",{path:n.topOfFin,text:"topOfFin",id:"topOfFin",dy:0,spaces:10,repeat:3}),n.tail=(new i).move(a.body13).curve(a.body13cp1,a.body14cp2,a.body14).attr("class","hidden").attr("data-text-class","text-xs"),p("banner",{path:n.tail,text:"tail",id:"tail",dy:0,spaces:14,repeat:3}),p("ld",{from:a.body13,to:a.body01,d:-5,id:"bodyLength",force:l}),a.titleAnchor=a.body04.shiftFractionTowards(a.body17,.4),a.logoAnchor=a.body06.shiftFractionTowards(a.body16,.6),a.gridAnchor=a.logoAnchor.clone(),a.scaleboxAnchor=m<.35?new o(a.body06.x-60-e,a.body11.y-35-e):a.titleAnchor.shiftFractionTowards(a.body14,.5),r.logo=new s("logo",a.logoAnchor).attr("data-scale",m>1?1:m),p("title",{at:a.titleAnchor,nr:1,title:"body",scale:m}),p("hd",{from:a.body14,to:a.body15,y:a.body19.y+e+10,id:"tailToBody"}),p("hd",{from:a.body15,to:a.body16,y:a.body19.y+e+10,id:"bodyWidth"}),p("hd",{from:a.body16,to:a.body17,y:a.body19.y+e+10,id:"finWidth"}),p("hd",{from:a.body17,to:a.body19,y:a.body19.y+e+10,id:"finToMiddle"}),p("hd",{from:a.body19,to:a.body01,y:a.body19.y+e+10,noStartMarker:!0,noEndMarker:!0,id:"middleToTip"}),p("hd",{from:a.gill1start,to:a.gill5start,y:a.body19.y+e+20,id:"gillWidth"}),p("hd",{from:a.eyeBig,to:a.body19,y:a.body19.y+e+20,id:"eyeToMiddle"}),p("hd",{from:a.eyeBigL,to:a.eyeBigR,y:a.eyeBigT.y-10,id:"eyeWidth",noStartMarker:!0,noEndMarker:!0}),p("hd",{from:a.body14,to:a.body13,y:a.body06.y-e-5,id:"tailWidth"}),p("hd",{from:a.body13,to:a.body10,y:a.body06.y-e-5,id:"tailTo1stFin"}),p("hd",{from:a.body10,to:a.body06,y:a.body06.y-e-5,id:"1stFinTo2ndFin"}),p("hd",{from:a.body06,to:a.finCurve,y:a.body06.y-e-5,id:"2ndFinToBody"}),p("hd",{from:a.finCurve,to:a.body03,y:a.body06.y-e-5,id:"2ndFinToTip"}),p("hd",{from:a.body03,to:a.body01,y:a.body06.y-e-5,id:"tipToMiddle",noStartMarker:!0,noEndMarker:!0}),p("hd",{from:a.body02,to:a.body03,y:a.body06.y-e+10,id:"topDartDepth"}),p("hd",{from:a.body02,to:a.body01,y:a.body06.y-e+20,id:"bottomDartDepth"}),p("vd",{from:a.body19,to:a.body14,x:a.body14.x-e-10,id:"heightTail"}),p("vd",{from:a.body15,to:a.body14,x:a.body14.x-e-20,id:"bodyToTail"}),p("vd",{from:a.body14,to:a.body13,x:a.body14.x-e-20,id:"tailHeight"}),p("vd",{from:a.body14,to:a.body10,x:a.body14.x-e-30,id:"tailTo1stFin"}),p("vd",{from:a.body14,to:a.body08,x:a.body14.x-e-10,id:"tailToBetweenFins"}),p("vd",{from:a.body10,to:a.body06,x:a.body14.x-e-30,id:"heightFinToFin"}),p("vd",{from:a.body01,to:a.body19,x:a.body01.x+e+10,id:"middleToDart"}),p("vd",{from:a.body02,to:a.body19,x:a.body01.x+e+20,id:"middleToBackOfDart"}),p("vd",{from:a.body03,to:a.body01,x:a.body01.x+e+10,id:"dartToDart"}),p("vd",{from:a.finCurve,to:a.body02,x:a.body01.x+e+20,id:"dartToFinCurve"}),p("vd",{from:a.body06,to:a.finCurve,x:a.body01.x+e+20,id:"finCurveToFin"}),m>.4&&p("vd",{from:a.gill5end,to:a.gill5start,x:a.gill5start.x+5,id:"gillHeight",noStartMarker:!0,noEndMarker:!0}),p("scalebox",{at:a.scaleboxAnchor}),e&&(n.sa=n.allButDart.close().offset(e).attr("class","fabric sa")),h}},ts={name:"hi.tail",after:Zn,draft:({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,macro:l,part:c})=>{const p=t.get("multiplier"),d=192.0129724628*p,h=115.38057785000036*p,m=230.05210782342334*p,f=95.12771141996424*
1p,u=156.52907796955816*p,g=33.33694275124821*p,b=20.1307852802616*p,w=26.418081118809575*p,k=41.577*p,C=41.575999999999965*p,v=18.83137554720844*p,y=18.830271479721173*p,T=38.59528397356339*p,x=126.7372982195849*p;return a.tail01=new o(0,0),a.tail02=a.tail01.shift(53.242955551234914,d),a.tail03=a.tail01.shift(106.95066736265407,h),a.tail04=a.tail01.shift(138.66344842617497,m),a.tail05=a.tail01.shift(173.38284569091573,f),a.tail01cp1=a.tail01.shift(40.69161792982998,u),a.tail01cp2=a.tail01.shift(150.8191939475001,g),a.tail02cp1=a.tail02.shift(129.66709301725697,b),a.tail02cp2=a.tail02.shift(303.9168409570558,w),a.tail03cp1=a.tail03.shift(180,k),a.tail03cp2=a.tail03.shift(-0,C),a.tail04cp1=a.tail04.shift(218.47354143777738,v),a.tail04cp2=a.tail04.shift(38.483984913053284,y),a.tail05cp1=a.tail05.shift(14.169822482118544,T),a.tail05cp2=a.tail05.shift(128.3396902984,x),a.tail05=a.tail01.shift(a.tail01.angle(a.tail05),t.get("tailWidth")),a.tail01cp2=a.tail01.shift(a.tail01.angle(a.tail05)-t.get("tailCpAngle"),t.get("tailCpDist")),a.tail05cp1=a.tail05.shift(a.tail05.angle(a.tail01)+t.get("tailCpAngle"),t.get("tailCpDist")),n.seam=(new i).move(a.tail01).curve(a.tail01cp1,a.tail02cp2,a.tail02).curve(a.tail02cp1,a.tail03cp2,a.tail03).curve(a.tail03cp1,a.tail04cp2,a.tail04).curve(a.tail04cp1,a.tail05cp2,a.tail05).curve(a.tail05cp1,a.tail01cp2,a.tail01).close(),t.cutlist.addCut({material:"color1UpperBody"}),a.tailSnippet=(new i).move(a.tail01).curve(a.tail01cp2,a.tail05cp1,a.tail05).shiftFractionAlong(.25),r.tail=new s("bnotch",a.tailSnippet),n.body=(new i).move(a.tail05).curve(a.tail05cp1,a.tail01cp2,a.tail01).attr("class","hidden").attr("data-text-class","text-xs"),a.titleAnchor=a.tail03.shiftFractionTowards(a.tail01,.4),a.logoAnchor=a.tail03.shiftFractionTowards(a.tail05,.5),a.gridAnchor=a.tail03.clone(),a.tailLeft=(new i).move(a.tail03).curve(a.tail03cp1,a.tail04cp2,a.tail04).curve(a.tail04cp1,a.tail05cp2,a.tail05).edge("left"),a.tailRight=(new i).move(a.tail01).curve(a.tail01cp1,a.tail02cp2,a.tail02).curve(a.tail02cp1,a.tail03cp2,a.tail03).edge("right"),a.tailTopLeft=(new i).move(a.tail03).curve(a.tail03cp1,a.tail04cp2,a.tail04).curve(a.tail04cp1,a.tail05cp2,a.tail05).edge("top"),a.tailTopRight=(new i).move(a.tail01).curve(a.tail01cp1,a.tail02cp2,a.tail02).curve(a.tail02cp1,a.tail03cp2,a.tail03).edge("top"),r.logo=new s("logo",a.logoAnchor).attr("data-scale",(p>1?1:p)/2),l("title",{at:a.titleAnchor,nr:3,title:"tail",scale:(p>1?1:p)/2}),l("banner",{path:n.body,text:"body",id:"body",dy:0,spaces:10,repeat:3}),l("hd",{from:a.tailLeft,to:a.tail05,y:a.tail01.y+e+10,id:"leftToBody"}),l("hd",{from:a.tail05,to:a.tail01,y:a.tail01.y+e+10,id:"bodyWidth"}),l("hd",{from:a.tail01,to:a.tailRight,y:a.tail01.y+e+10,id:"bodyToRight"}),l("hd",{from:a.tailLeft,to:a.tail03,y:a.tailTopRight.y-e-10,id:"leftToMid"}),l("hd",{from:a.tail03,to:a.tailRight,y:a.tailTopRight.y-e-10,id:"midToRight"}),l("vd",{from:a.tailTopLeft,to:a.tail03,x:a.tail03.x-20,id:"leftToMid"}),l("vd",{from:a.tail05,to:a.tailTopLeft,x:a.tailLeft.x-e-20,id:"heightLeft"}),l("vd",{from:a.tailTopRight,to:a.tail01,x:a.tailRight.x+e+20,id:"heightRight"}),l("vd",{from:a.tail03,to:a.tail01,x:a.tail01.x+20,id:"rightToMid"}),l("vd",{from:a.tail05,to:a.tail03,x:a.tail05.x-20,id:"leftToMid"}),e&&(n.sa=n.seam.offset(e).attr("class","fabric sa")),c}};function es(t,e,o,a,i){const{Path:s,points:r,Point:l,options:c}=i.shorthand(),p=new n.wA(...t),d=t[3],h=(new s).move(t[0]),m=(new s).move(t[0].flipX(d)),f=p.getLUT(e+2),u=(a-o)/e;for(const n in f){const t=o+u*(n-1),{x:e,y:a}=f[n];r[`leftTooth${n}`]=new l(e,a),r[`rightTooth${n}`]=r[`leftTooth${n}`].flipX(d);const i=p.normal(f[n].t);r[`leftTooth${n}Cp`]=new l(e-t*i.x,a-t*i.y),r[`rightTooth${n}Cp`]=r[`leftTooth${n}Cp`].flipX(d),n>0&&n%2==0&&(c.aggressive?(r[`leftTooth${n}Tip`]=r[`leftTooth${n-2}Cp`].shiftFractionTowards(r[`leftTooth${n}Cp`],.5),r[`rightTooth${n}Tip`]=r[`leftTooth${n}Tip`].flipX(d),h.curve(r[`leftTooth${n}Tip`],r[`leftTooth${n}Tip`],r[`leftTooth${n}`]),m.curve(r[`rightTooth${n}Tip`],r[`rightTooth${n}Tip`],r[`rightTooth${n}`])):(h.curve(r[`leftTooth${n-2}Cp`],r[`leftTooth${n}Cp`],r[`leftTooth${n}`]),m.curve(r[`rightTooth${n-2}
1Cp`],r[`rightTooth${n}Cp`],r[`rightTooth${n}`])))}return h.join(m.reverse())}const os={name:"hi.lowerTeeth",after:Zn,draft:({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,macro:l,part:c})=>{const p=t.get("multiplier"),d=75.74338717643937*p,h=47.74891452755759*p,m=27.774046078481962*p;if(a.lowerTeeth01=new o(0,0),a.lowerTeeth02=a.lowerTeeth01.shift(205.41423660609973,d),a.lowerTeeth01cp2=a.lowerTeeth01.shift(180,m),a.lowerTeeth02cp1=a.lowerTeeth02.shift(42.59332849750379,h),a.lowerTeeth02cp1=a.lowerTeeth02.shiftTowards(a.lowerTeeth02cp1,a.lowerTeeth01cp2.dist(a.lowerTeeth01)),a.lowerTeeth03=a.lowerTeeth02.flipX(),a.lowerTeeth01cp1=a.lowerTeeth01cp2.flipX(),a.lowerTeeth03cp2=a.lowerTeeth02cp1.flipX(),n.seam=(new i).move(a.lowerTeeth02).curve(a.lowerTeeth02cp1,a.lowerTeeth01cp2,a.lowerTeeth01).curve(a.lowerTeeth01cp1,a.lowerTeeth03cp2,a.lowerTeeth03),t.set("lowerTeethLength",n.seam.length()),n.teeth=es([a.lowerTeeth02,a.lowerTeeth02cp1,a.lowerTeeth01cp2,a.lowerTeeth01],10,8*p,16*p,c),t.cutlist.addCut({cut:1,material:"color4Teeth"}),r.lowerTeeth=new s("bnotch",a.lowerTeeth01),a.titleAnchor=a.lowerTeeth02.shiftFractionTowards(a.lowerTeeth03,.5),a.gridAnchor=a.titleAnchor.clone(),n.bbox=(new i).move(a.lowerTeeth02).move(new o(a.lowerTeeth03.x,1.75*a.lowerTeeth03.y)),l("title",{at:a.titleAnchor,nr:9,title:"lowerTeeth",scale:p/2}),l("hd",{from:a.lowerTeeth01,to:a.lowerTeeth03,y:a.lowerTeeth02.y+e+10,noStartMarker:!0,noEndMarker:!0,id:"right"}),l("hd",{from:a.lowerTeeth02,to:a.lowerTeeth01,y:a.lowerTeeth02.y+e+10,noStartMarker:!0,noEndMarker:!0,id:"left"}),l("vd",{from:a.lowerTeeth02,to:a.lowerTeeth01,x:a.lowerTeeth02.x-e-10,noStartMarker:!0,noEndMarker:!0,id:"height"}),l("vd",{from:a.lowerTeeth01,to:n.teeth.edge("top"),x:a.lowerTeeth02.x-e-10,noStartMarker:!0,noEndMarker:!0,id:"teethHeight"}),e){let t=n.seam.offset(e);n.sa=(new i).move(n.seam.start()).line(t.start()).join(t).line(n.seam.end()).attr("class","fabric sa")}return c}},as={name:"hi.upperTeeth",after:Zn,draft:({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,macro:l,part:c})=>{const p=t.get("multiplier"),d=131.305041182736*p,h=64.30113337316406*p,m=48.33100000000002*p;if(a.upperTeeth01=new o(0,0),a.upperTeeth02=a.upperTeeth01.shift(34.147056946748805,d),a.upperTeeth01cp2=a.upperTeeth01.shift(0,m),a.upperTeeth02cp1=a.upperTeeth02.shift(235.1335930733262,h),a.upperTeeth02cp1=a.upperTeeth02.shiftTowards(a.upperTeeth02cp1,a.upperTeeth01cp2.dist(a.upperTeeth01)),a.upperTeeth03=a.upperTeeth02.flipX(),a.upperTeeth01cp1=a.upperTeeth01cp2.flipX(),a.upperTeeth03cp2=a.upperTeeth02cp1.flipX(),n.seam=(new i).move(a.upperTeeth02).curve(a.upperTeeth02cp1,a.upperTeeth01cp2,a.upperTeeth01).curve(a.upperTeeth01cp1,a.upperTeeth03cp2,a.upperTeeth03),t.set("upperTeethLength",n.seam.length()),n.teeth=es([a.upperTeeth03,a.upperTeeth03cp2,a.upperTeeth01cp1,a.upperTeeth01],14,9*p,18*p,c),t.cutlist.addCut({cut:1,material:"color4Teeth"}),r.upperTeeth=new s("bnotch",a.upperTeeth01),a.titleAnchor=a.upperTeeth02.shiftFractionTowards(a.upperTeeth03,.5).shiftFractionTowards(a.upperTeeth01,.5),a.gridAnchor=a.upperTeeth01,l("title",{at:a.titleAnchor,nr:8,title:"upperTeeth",scale:p/2}),l("hd",{from:a.upperTeeth03,to:a.upperTeeth01,y:a.upperTeeth02.y-10,noStartMarker:!0,noEndMarker:!0,id:"left"}),l("hd",{from:a.upperTeeth01,to:a.upperTeeth02,y:a.upperTeeth02.y-10,noStartMarker:!0,noEndMarker:!0,id:"right"}),l("vd",{from:a.upperTeeth01,to:n.teeth.edge("top"),x:a.leftTooth0.x-e-10,noStartMarker:!0,noEndMarker:!0,id:"height"}),e){let t=n.seam.reverse().offset(e);n.sa=(new i).move(n.seam.end()).line(t.start()).join(t).line(n.seam.start()).attr("class","fabric sa")}return c}},is={name:"hi.mouth",after:[os,as],draft:({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,macro:l,part:c})=>{const p=t.get("multiplier"),d=141.93684055893488*p,h=42.496*p,m=38.6204*p,f=59.58739935676417*p,u=73.53520117766728*p,g=33.142*p;return a.mouth01=new o(0,0),a.mouth02=a.mouth01.shift(312.8254216093024,d),a.mouth03=a.mouth01.shift(270,h),a.mouth01cp1=a.mouth01.shift(0,m),a.mouth02cp1=a.mouth02.shift(128.0772
16051101747,f),a.mouth02cp2=a.mouth02.shift(95.21339058299296,u),a.mouth03cp2=a.mouth03.shift(0,g),a.mouth04=a.mouth02.flipX(),a.mouth01cp2=a.mouth01cp1.flipX(),a.mouth04cp2=a.mouth02cp1.flipX(),a.mouth04cp1=a.mouth02cp2.flipX(),a.mouth03cp1=a.mouth03cp2.flipX(),n.aboveMouth=(new i).move(a.mouth02).curve(a.mouth02cp2,a.mouth01cp1,a.mouth01).curve(a.mouth01cp2,a.mouth04cp1,a.mouth04).attr("data-text-class","text-xs"),n.belly=(new i).move(a.mouth04).curve(a.mouth04cp2,a.mouth03cp1,a.mouth03).curve(a.mouth03cp2,a.mouth02cp1,a.mouth02).attr("data-text-class","text-xs"),n.seam=(new i).move(a.mouth02).join(n.aboveMouth).join(n.belly).close(),t.set("mouthTopLength",(new i).move(a.mouth01).curve(a.mouth01cp1,a.mouth02cp2,a.mouth02).length()),t.set("mouthBottomLength",(new i).move(a.mouth03).curve(a.mouth03cp1,a.mouth04cp2,a.mouth04).length()),t.cutlist.addCut({cut:1,material:"color3Mouth"}),a.mouthUpperTeeth1=(new i).move(a.mouth01).curve(a.mouth01cp1,a.mouth02cp2,a.mouth02).shiftAlong(t.get("upperTeethLength")/2),a.mouthUpperTeeth2=(new i).move(a.mouth01).curve(a.mouth01cp2,a.mouth04cp1,a.mouth04).shiftAlong(t.get("upperTeethLength")/2),r.mouthUpperTeeth1=new s("bnotch",a.mouthUpperTeeth1),r.mouthUpperTeeth2=new s("bnotch",a.mouthUpperTeeth2),a.mouthlowerTeeth1=(new i).move(a.mouth03).curve(a.mouth03cp1,a.mouth04cp2,a.mouth04).shiftAlong(t.get("lowerTeethLength")/2),a.mouthlowerTeeth2=(new i).move(a.mouth03).curve(a.mouth03cp2,a.mouth02cp1,a.mouth02).shiftAlong(t.get("lowerTeethLength")/2),r.mouthlowerTeeth1=new s("bnotch",a.mouthlowerTeeth1),r.mouthlowerTeeth2=new s("bnotch",a.mouthlowerTeeth2),r.mouthMidTop=new s("bnotch",a.mouth01),r.mouthMidBottom=new s("bnotch",a.mouth03),l("banner",{path:n.aboveMouth,text:"aboveMouth",id:"aboveMouth",dy:0,spaces:4,repeat:6}),l("banner",{path:n.belly,text:"belly",id:"belly",dy:0,spaces:4,repeat:6}),a.titleAnchor=a.mouth01.shiftFractionTowards(a.mouth02,.33),a.logoAnchor=a.mouth01.shiftFractionTowards(a.mouth04,.3),a.gridAnchor=a.mouth03.clone(),r.logo=new s("logo",a.logoAnchor).attr("data-scale",(p>1?1:p)/2),l("title",{at:a.titleAnchor,nr:4,title:"mouth",scale:(p>1?1:p)/2}),l("hd",{from:a.mouth03,to:a.mouth02,y:a.mouth02.y+e+10,id:"right"}),l("hd",{from:a.mouth04,to:a.mouth03,y:a.mouth02.y+e+10,id:"left"}),l("vd",{from:a.mouth04,to:a.mouth03,x:a.mouth04.x-e-10,id:"heightInside"}),l("vd",{from:a.mouth03,to:a.mouth01,x:a.mouth04.x-e-10,id:"heightOutside"}),e&&(n.sa=n.seam.offset(e).attr("class","fabric sa")),c}},ns={name:"hi.aboveMouth",after:[Zn,is],draft:({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,macro:l,part:c})=>{const p=t.get("multiplier"),d=t.get("faceTopLength");let h=266.7238454769277*p;const m=28.348200101593726*p;let f=57.858419828059574*p;const u=62.927189989701574*p,g=169.53367533325053*p,b=172.36585117998288*p,w=66.94005927693816*p;let k=0,C=0;do{a.aboveMouth01=new o(0,0),a.aboveMouth02=a.aboveMouth01.shift(353.4089695458119,h),a.aboveMouth03=a.aboveMouth02.shift(233.13495309848912,m),a.aboveMouth04=a.aboveMouth01.shift(208.91023166349467,f),a.aboveMouth01cp1=a.aboveMouth01.shift(298.7196048714283,u),a.aboveMouth02cp2=a.aboveMouth02.shift(195.1209034747764,g),a.aboveMouth03cp1=a.aboveMouth03.shift(197.87876803095696,b),a.aboveMouth04cp2=a.aboveMouth04.shift(308.8121959753343,w),k=d-(new i).move(a.aboveMouth03).curve(a.aboveMouth03cp1,a.aboveMouth04cp2,a.aboveMouth04).length(),h+=k,f+=k,C++}while(Math.abs(k)>t.get("tolerance")&&C<100);n.aboveMouthAttachment=(new i).move(a.aboveMouth01).line(a.aboveMouth04).attr("data-text-class","text-xs"),n.bodyAttachment=(new i).move(a.aboveMouth04).curve(a.aboveMouth04cp2,a.aboveMouth03cp1,a.aboveMouth03).attr("data-text-class","text-xs"),n.finAttachment=(new i).move(a.aboveMouth03).line(a.aboveMouth02).attr("data-text-class","text-xs"),n.bellyAndMouthAttachment=(new i).move(a.aboveMouth02).curve(a.aboveMouth02cp2,a.aboveMouth01cp1,a.aboveMouth01),n.seam=(new i).move(a.aboveMouth01).join(n.aboveMouthAttachment).join(n.bodyAttachment).join(n.finAttachment).join(n.bellyAndMouthAttachment).close(),t.set("aboveMouthTopLength",
1n.bodyAttachment.length()),t.set("aboveMouthBottomLength",n.bellyAndMouthAttachment.length()),t.set("aboveMouthFinLength",a.aboveMouth02.dist(a.aboveMouth03)),t.cutlist.addCut({cut:2,material:"color2Belly"}),a.gridAnchor=a.aboveMouth04.clone(),a.aboveMouthSnippet=(new i).move(a.aboveMouth01).curve(a.aboveMouth01cp1,a.aboveMouth02cp2,a.aboveMouth02).shiftAlong(t.get("mouthTopLength")),r.mouth=new s("bnotch",a.aboveMouthSnippet),a.aboveMouthBottom=n.seam.edge("bottom"),a.aboveMouthTop=(new i).move(a.aboveMouth01).curve(a.aboveMouth01cp1,a.aboveMouth02cp2,a.aboveMouth02).edge("bottom"),a.titleAnchor=a.aboveMouth04.shiftFractionTowards(a.aboveMouth01cp1,.5),a.logoAnchor=a.aboveMouth01cp1.shiftFractionTowards(a.aboveMouth02cp2,.5),r.logo=new s("logo",a.logoAnchor).attr("data-scale",(p>1?1:p)/4),l("title",{at:a.titleAnchor,nr:5,title:"aboveMouth",scale:p/2});let v=n.bellyAndMouthAttachment.split(a.aboveMouthSnippet);return n.bellyAttachment=v[0].attr("data-text-class","text-xs"),n.mouthAttachment=v[1].attr("data-text-class","text-xs"),l("banner",{path:n.aboveMouthAttachment,text:"aboveMouth",id:"aboveMouth",dy:-0,spaces:0,repeat:1}),l("banner",{path:n.bodyAttachment,text:"body",id:"body",dy:0,spaces:10,repeat:7}),l("banner",{path:n.finAttachment,text:"+",id:"plus",dy:0,spaces:0,repeat:4}),l("banner",{path:n.bellyAttachment,text:"belly",id:"belly",dy:0,spaces:4,repeat:3}),l("banner",{path:n.mouthAttachment,text:"mouth",id:"mouth",dy:0,spaces:4,repeat:3}),l("hd",{from:a.aboveMouth04,to:a.aboveMouth01,y:a.aboveMouth01.y-e-10,id:"widthCorners"}),l("hd",{from:a.aboveMouth01,to:a.aboveMouth02,y:a.aboveMouth01.y-e-10,id:"cornerToMid"}),l("hd",{from:a.aboveMouthSnippet,to:a.aboveMouth02,y:a.aboveMouth01.y,id:"widthToSnippet"}),l("vd",{from:a.aboveMouth04,to:a.aboveMouth01,x:a.aboveMouth04.x-e-15}),l("vd",{from:a.aboveMouthBottom,to:a.aboveMouth04,x:a.aboveMouth04.x-e-15,id:"bottomToCornerLeft"}),l("vd",{from:a.aboveMouthBottom,to:a.aboveMouthTop,x:a.aboveMouth04.x-e,id:"minimalHeight"}),l("vd",{from:a.aboveMouth02,to:a.aboveMouth03,x:a.aboveMouth02.x+e+10,id:"heightCornersRight"}),l("vd",{from:a.aboveMouth03,to:a.aboveMouthBottom,x:a.aboveMouth02.x+e+10,id:"bottomToCornerRight"}),e&&(n.sa=n.seam.offset(e).attr("class","fabric sa")),c}},ss={name:"hi.belly",after:[Zn,ns],options:{hungry:{pct:50,min:0,max:100,menu:"style"}},draft:({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,options:l,macro:c,part:p})=>{const d=t.get("multiplier"),h=t.get("bellyTailLength"),m=224.8451041*d,f=108.1988389*d,u=216.7485605*d,g=129.2449198*d,b=231.4386252*d,w=65.65512143*d,k=38.20949996*d,C=37.73513423*d,v=118.6453123*d,y=54.50254779*d,T=40.6827883*d,x=52.08589469*d,B=62.46560129*d,S=48.20828587*d,L=68*d,P=65.42602302*d;a.belly10=new o(0,0),a.belly01=a.belly10.shift(163.4959859,g),a.belly02=a.belly01.shift(25.7020193,m),a.belly03=a.belly02.shift(2.2164353,f),a.belly04=a.belly03.shift(338.0869319,u),a.belly05=a.belly10.shift(0,b),a.belly01.y=a.belly01.y*(1.1-l.hungry/5),a.belly02.y=a.belly02.y*(1.1-l.hungry/5),a.belly03.y=a.belly03.y*(1.1-l.hungry/5),a.belly04.y=a.belly04.y*(1.1-l.hungry/5),a.belly01cp1=a.belly01.shift(60.117233,w),a.belly02cp1=a.belly02.shift(331.7898702,C),a.belly03cp1=a.belly03.shift(349.861397,y),a.belly04cp1=a.belly04.shift(204.8857575,x),a.belly05cp1=a.belly05.shift(8.1545383,S),a.belly01cp2=a.belly01.shift(327.4394109,k),a.belly02cp2=a.belly02.shift(182.9449647,v),a.belly03cp2=a.belly03.shift(200.1533738,T),a.belly04cp2=a.belly04.shift(145.9357065,B),a.belly05cp2=a.belly05.shift(5,L),a.belly10cp1=a.belly10.shift(175.9644604,P);const R=t.get("aboveMouthBottomLength")-t.get("mouthTopLength")+t.get("mouthBottomLength");let F=0,E=0;do{a.belly01.x-=F,a.belly01cp1.x-=F,a.belly01cp2.x-=F,E++,F=R-(new i).move(a.belly01).curve(a.belly01cp1,a.belly02cp2,a.belly02).length()}while(Math.abs(F)>t.get("tolerance")&&E<100);F=0,E=0;do{a.belly04.x+=F,a.belly04cp1.x+=F,a.belly04cp2.x+=F,a.belly05.x+=F,a.belly05cp2.x+=F,E++,F=h-(new i).move(a.belly03).curve(a.belly03cp1,a.belly04cp2,a.belly04).length()}while(Math.abs(F)>t.get("tolerance")&&E<100);a.belly05cp1=a.belly05cp2.flipY(),a.belly06=a.belly04.flipY(),a.belly06cp1=a.belly04cp2.flipY(),a.belly06cp2=a.belly04cp1.flipY(),a.belly07=a.belly03.flipY(),a.belly07cp1=a.belly03cp2.flipY(),a.belly07cp2=a.belly03cp1.flipY(),a.belly08=a.belly02.flipY(),a.belly08cp1=a.belly02cp2.flipY(),a.belly08cp2=a.belly02cp1.flipY(),a.belly09=a.belly01.flipY(),a.belly09cp1=a.belly01cp2.flipY(),a.belly09cp2=a.belly01cp1.flipY(),a.belly10cp2=a.belly10cp1.flipY(),n.body1=(new i).move(a.belly04).curve(a.belly04cp2,a.belly03cp1,a.belly03).attr("data-text-class","text-xs"),n.body2=(new i).move(a.belly07).curve(a.belly07cp2,a.belly06cp1,a.belly06).attr("data-text-class","text-xs"),n.finAttachmentBelly1=(new i).move(a.belly03).curve(a.belly03cp2,a.belly02cp1,a.belly02).attr("data-text-class","text-xs"),n.finAttachmentBelly2=(new i).move(a.belly08).curve(a.belly08cp2,a.belly07cp1,a.belly07).attr("data-text-class","text-xs"),n.mouthAttachment1=(new i).move(a.belly02).curve(a.belly02cp2,a.belly01cp1,a.belly01),n.mouthAttachment2=(new i).move(a.belly09).curve(a.belly09cp2,a.belly08cp1,a.belly08),n.top=(new i).move(a.belly04).join(n.body1).join(n.finAttachmentBelly1).join(n.mouthAttachment1).hide(),n.bottom=(new i).move(a.belly09).join(n.mouthAttachment2).join(n.finAttachmentBelly2).join(n.body2).hide(),n.seam=(new i).move(a.belly01).curve(a.belly01cp2,a.belly10cp1,a.belly10).curve(a.belly10cp2,a.belly09cp1,a.belly09).join(n.bottom).curve(a.belly06cp2,a.belly05cp1,a.belly05).curve(a.belly05cp2,a.belly04cp1,a.belly04).join(n.top).close().unhide(),t.set("bellyFinLength",(new i).move(a.belly02).curve(a.belly02cp1,a.belly03cp2,a.belly03).length()),a.grainlineFrom=new o(a.belly10.x,.7*a.belly02.y),a.grainlineTo=new o(a.belly05.x,.7*a.belly02.y),c("grainline",{from:a.grainlineFrom,to:a.grainlineTo}),t.cutlist.addCut({cut:1,material:"color2Belly"}),a.titleAnchor=a.belly05.shiftFractionTowards(a.belly10,.5),a.logoAnchor=a.belly10.shiftFractionTowards(a.titleAnchor,.5),a.gridAnchor=a.titleAnchor.clone(),r.logo=new s("logo",a.logoAnchor).attr("data-scale",d>
11?1:d),c("title",{at:a.titleAnchor,nr:2,title:"belly",scale:d}),a.bellyMouthSnippet1=n.mouthAttachment1.reverse().shiftAlong(t.get("mouthBottomLength")),a.bellyMouthSnippet2=n.mouthAttachment2.reverse().shiftAlong(t.get("mouthBottomLength")),r.mouth1=new s("bnotch",a.bellyMouthSnippet1),r.mouth2=new s("bnotch",a.bellyMouthSnippet2),c("banner",{path:n.finAttachmentBelly1,text:"-o-",id:"circles1",dy:0,spaces:3,repeat:7}),c("banner",{path:n.finAttachmentBelly2,text:"-o-",id:"circles2",dy:0,spaces:3,repeat:7});const W=n.mouthAttachment1.split(a.bellyMouthSnippet1),H=n.mouthAttachment2.split(a.bellyMouthSnippet2);return n.mouth1=W[1].attr("data-text-class","text-xs"),n.mouth2=H[0].attr("data-text-class","text-xs"),n.aboveMouth1=W[0].attr("data-text-class","text-xs"),n.aboveMouth2=H[1].attr("data-text-class","text-xs"),c("banner",{path:n.mouth1,text:"mouth",id:"mouth1",dy:0,spaces:3,repeat:3}),c("banner",{path:n.mouth2,text:"mouth",id:"mouth2",dy:0,spaces:3,repeat:3}),c("banner",{path:n.body1,text:"body",id:"body1",dy:0,spaces:3,repeat:3}),c("banner",{path:n.body2,text:"body",id:"body2",dy:0,spaces:3,repeat:3}),c("banner",{path:n.aboveMouth1,text:"aboveMouth",id:"aboveMouth1",dy:0,spaces:3,repeat:3}),c("banner",{path:n.aboveMouth2,text:"aboveMouth",id:"aboveMouth2",dy:0,spaces:3,repeat:3}),c("hd",{from:a.belly01,to:a.belly10,y:a.belly01.y,id:"depthLeftDart"}),c("hd",{from:a.belly05,to:a.belly04,y:a.belly04.y,id:"depthRightDart"}),c("hd",{from:a.belly10,to:a.belly05,y:(a.belly04.y+a.belly01.y)/2,id:"widthbetweenDarts"}),c("hd",{from:a.belly01,to:a.belly02,y:a.belly02.y-e-10,id:"leftToFin"}),c("hd",{from:a.belly02,to:a.belly03,y:a.belly02.y-e-10,id:"finWidth"}),c("hd",{from:a.belly03,to:a.belly04,y:a.belly02.y-e-10,id:"rightToFin"}),c("hd",{from:a.bellyMouthSnippet1,to:a.belly02,y:a.bellyMouthSnippet1.y,id:"finToSnippet"}),c("vd",{from:a.belly05,to:a.belly07,x:a.belly03.x,id:"rightFinToMiddle"}),c("vd",{from:a.belly08,to:a.belly10,x:a.belly02.x,id:"leftFinToMiddle"}),c("vd",{from:a.belly09,to:a.belly10,x:a.belly01.x-e-10,id:"heightLeftDart"}),c("vd",{from:a.belly09,to:a.belly08,x:a.belly01.x-e-10,id:"heightLeft"}),c("vd",{from:a.belly05,to:a.belly06,x:a.belly04.x+e+10,id:"heightRightDart"}),c("vd",{from:a.belly06,to:a.belly07,x:a.belly04.x+e+10,id:"heightRight"}),e&&(n.sa=n.bottom.join(n.top).close().offset(e).attr("class","fabric sa")),p}},rs={name:"hi.topOfFin",after:Zn,draft:({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,macro:l,part:c})=>{const p=t.get("multiplier");let d=t.get("topOfFinOpening");const h=t.get("topOfFinOpeningLength"),m=256.9537569065251*p,f=178.52481158058*p,u=27.240286624072077*p,g=25.871054481794893*p,b=12.154549189501026*p,w=39.024661651837555*p,k=76.08965682877273*p;let C=0,v=0;do{a.topOfFin01=new o(0,0),a.topOfFin02=a.topOfFin01.shift(325.46697637215823,m),a.topOfFin03=a.topOfFin01.shift(275.4353725228365,d),a.topOfFin01cp1=a.topOfFin01.shift(346.31732410079576,f),a.topOfFin01cp2=a.topOfFin01.shift(254.05347154462484,u),a.topOfFin02cp1=a.topOfFin02.shift(236.80010054081936,g),a.topOfFin02cp2=a.topOfFin02.shift(56.66685795767527,b),a.topOfFin03cp1=a.topOfFin03.shift(113.40393219481112,w),a.topOfFin03cp2=a.topOfFin03.shift(22.511206474810457,k),C=h-(new i).move(a.topOfFin03).curve(a.topOfFin03cp1,a.topOfFin01cp2,a.topOfFin01).length(),d+=C,v++}while(Math.abs(C)>t.get("tolerance")&&v<100);n.seam=(new i).move(a.topOfFin01).curve(a.topOfFin01cp2,a.topOfFin03cp1,a.topOfFin03).curve(a.topOfFin03cp2,a.topOfFin02cp1,a.topOfFin02).curve(a.topOfFin02cp2,a.topOfFin01cp1,a.topOfFin01).close(),t.set("topOfFinCircumference",(new i).move(a.topOfFin01).curve(a.topOfFin01cp1,a.topOfFin02cp2,a.topOfFin02).curve(a.topOfFin02cp1,a.topOfFin03cp2,a.topOfFin03).length()),t.cutlist.addCut({cut:2,material:"color1UpperBody"}),n.body=(new i).move(a.topOfFin01).curve(a.topOfFin01cp2,a.topOfFin03cp1,a.topOfFin03).attr("class","hidden").attr("data-text-class","text-xs"),l("banner",{path:n.body,text:"body",dy:0,spaces:10,repeat:3}),a.titleAnchor=a.topOfFin01.shiftFractionTowards(a.topOfFin02,.5).shiftFractionTowards(a.topOfFin03,.1),a.logoAnchor=a.titleAnchor.shiftFractionTowards(a.topOfFin03,.4),a.gridAnchor=a.titleAnchor.clone(),r.logo=new s("logo",a.logoAnchor).attr("data-scale",(p>1?1:p)/2),l("title",{at:a.titleAnchor,nr:7,title:"topOfFin",scale:(p>1?1:p)/2}),a.topOfFinLeft=n.seam.edge("left");const y=(new i).move(a.topOfFin02).curve(a.topOfFin02cp1,a.topOfFin03cp2,a.topOfFin03);a.topOfFinInsideTop=y.edge("top");const T=y.shiftFractionAlong(.5);return a.topOfFinInsideBottom=y.split(T)[0].edge("bottom"),a.topOfFinRight=n.seam.edge("right"),l("hd",{from:a.topOfFin01,to:a.topOfFinRight,y:a.topOfFin01.y-e-10,id:"topWidth"}),l("hd",{from:a.topOfFin03,to:a.topOfFinRight,y:a.topOfFin03.y+e+20,id:"bottomWidth"}),l("hd",{from:a.topOfFinLeft,to:a.topOfFinRight,y:a.topOfFin03.y+e+10,id:"width"}),l("vd",{from:a.topOfFin03,to:a.topOfFin01,x:a.topOfFinLeft.x-e-10,id:"leftHeight"}),l("vd",{from:a.topOfFin01,to:a.topOfFinInsideBottom,x:a.topOfFin02.x+e+10,id:"rightHeight"}),l("vd",{from:a.topOfFinInsideTop,to:a.topOfFin01,x:a.topOfFinLeft.x-e-20,id:"minHeight"}),e&&(n.sa=n.seam.offset(e).attr("class","fabric sa")),c}},ls={name:"hi.bottomOfFin",after:[Zn,ss,ns],draft:({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,macro:l,part:c})=>{const p=t.get("multiplier");let d=250.63638754690027*p;const h=119.34849371430543;let m=137.70322741678933*p;const f=175.11970494988498,u=133.21819413653674*p,g=51.94197687805115*p,b=95.20910872095476,w=158.66090918215986,k=29.25974733588791*p,C=31.28292571739416*p,v=208.55316756249104,y=28.113642612639804,T=53.31550082293142*
1p,x=177.65809391356197*p,B=9.79694130335566,S=80.81868300891519,L=t.get("aboveMouthFinLength")+t.get("bellyFinLength"),P=t.get("topFinCircumference");let R=0,F=0;do{a.bottomOfFin01=new o(0,0),a.bottomOfFin02=a.bottomOfFin01.shift(h,d),a.bottomOfFin03=a.bottomOfFin01.shift(f,m),a.bottomOfFin01cp1=a.bottomOfFin01.shift(b,u),a.bottomOfFin01cp2=a.bottomOfFin01.shift(w,g),a.bottomOfFin02cp1=a.bottomOfFin02.shift(v,k),a.bottomOfFin02cp2=a.bottomOfFin02.shift(y,C),a.bottomOfFin03cp1=a.bottomOfFin03.shift(B,T),a.bottomOfFin03cp2=a.bottomOfFin03.shift(S,x),R=L-(new i).move(a.bottomOfFin03).curve(a.bottomOfFin03cp1,a.bottomOfFin01cp2,a.bottomOfFin01).length(),m+=R,F++}while(Math.abs(R)>t.get("tolerance")&&F<100);R=0,F=0;do{a.bottomOfFin01=new o(0,0),a.bottomOfFin02=a.bottomOfFin01.shift(h,d),a.bottomOfFin03=a.bottomOfFin01.shift(f,m),a.bottomOfFin01cp1=a.bottomOfFin01.shift(b,u),a.bottomOfFin01cp2=a.bottomOfFin01.shift(w,g),a.bottomOfFin02cp1=a.bottomOfFin02.shift(v,k),a.bottomOfFin02cp2=a.bottomOfFin02.shift(y,C),a.bottomOfFin03cp1=a.bottomOfFin03.shift(B,T),a.bottomOfFin03cp2=a.bottomOfFin03.shift(S,x),R=P-(new i).move(a.bottomOfFin01).curve(a.bottomOfFin01cp1,a.bottomOfFin02cp2,a.bottomOfFin02).curve(a.bottomOfFin02cp1,a.bottomOfFin03cp2,a.bottomOfFin03).length(),d+=R,F++}while(Math.abs(R)>t.get("tolerance")&&F<100);n.seam=(new i).move(a.bottomOfFin01).curve(a.bottomOfFin01cp1,a.bottomOfFin02cp2,a.bottomOfFin02).curve(a.bottomOfFin02cp1,a.bottomOfFin03cp2,a.bottomOfFin03).curve(a.bottomOfFin03cp1,a.bottomOfFin01cp2,a.bottomOfFin01).close(),t.cutlist.addCut({cut:2,material:"color1UpperBody"});const E=(new i).move(a.bottomOfFin01).curve(a.bottomOfFin01cp2,a.bottomOfFin03cp1,a.bottomOfFin03);a.bottomOfFinSnippet=E.shiftAlong(t.get("aboveMouthFinLength")),r.bottomOfFin=new s("bnotch",a.bottomOfFinSnippet);const W=E.split(a.bottomOfFinSnippet);n.finAttachmentAboveMouth=W[0].reverse().attr("data-text-class","text-xs"),n.finAttachmentBelly=W[1].reverse().attr("data-text-class","text-xs"),l("banner",{path:n.finAttachmentAboveMouth,text:"+",dy:0,spaces:0,repeat:4,id:"plusses"}),l("banner",{path:n.finAttachmentBelly,text:"-o-",dy:0,spaces:4,repeat:7,id:"circles"}),a.titleAnchor=a.bottomOfFin02.shiftFractionTowards(a.bottomOfFin01,.4).shiftFractionTowards(a.bottomOfFin03,.1),a.logoAnchor=a.titleAnchor.shiftFractionTowards(a.bottomOfFin03,.4),a.gridAnchor=a.titleAnchor.clone(),r.logo=new s("logo",a.logoAnchor).attr("data-scale",(p>1?1:p)/2),l("title",{at:a.titleAnchor,nr:6,title:"bottomOfFin",scale:(p>1?1:p)/2}),a.bottomOfFinTop=n.seam.edge("top");let H=(new i).move(a.bottomOfFin03).curve(a.bottomOfFin03cp2,a.bottomOfFin02cp1,a.bottomOfFin02);const A=H.shiftFractionAlong(.8);return a.bottomOfFinInsideLeft=H.split(A)[0].edge("right"),H=(new i).move(a.bottomOfFin01).curve(a.bottomOfFin01cp2,a.bottomOfFin03cp1,a.bottomOfFin03),a.bottomOfFinInsideBottom=H.edge("top"),l("hd",{from:a.bottomOfFin03,to:a.bottomOfFin01,y:a.bottomOfFin01.y+e+20,id:"width"}),l("hd",{from:a.bottomOfFinTop,to:a.bottomOfFin01,y:a.bottomOfFinTop.y-e-10,id:"smallTop"}),l("hd",{from:a.bottomOfFinInsideLeft,to:a.bottomOfFin01,y:a.bottomOfFin03.y+e+20,id:"widthToSmallest"}),l("hd",{from:a.bottomOfFin03,to:a.bottomOfFinSnippet,y:a.bottomOfFin03.y+e+10,id:"widthToSnippet"}),l("vd",{from:a.bottomOfFin03,to:a.bottomOfFinTop,x:a.bottomOfFin03.x-e-10,id:"heightLeft"}),l("vd",{from:a.bottomOfFinTop,to:a.bottomOfFin01,x:a.bottomOfFin01.x+e+20,id:"heightRight"}),l("vd",{from:a.bottomOfFinTop,to:a.bottomOfFinInsideBottom,x:a.bottomOfFin01.x+e+10,id:"heightToSmallest"}),e&&(n.sa=n.seam.offset(e).attr("class","fabric sa")),c}},cs=new n.pT({data:Xn,parts:[Zn,ts,is,ns,ss,rs,ls,os,as]}),ps=JSON.parse('{"id":"holmes","name":"Holmes deerstalker hat","code":["Erica Alcusa S\xe1ez","bobgeorgethe3rd"],"description":"A FreeSewing pattern for a Sherlock Holmes hat","design":"Erica Alcusa S\xe1ez","difficulty":3,"tags":["accessories","hats"],"techniques":["curved-seam","lining"],"version":"4.6.0","pkg":"@freesewing/holmes","collection":true}'),ds={en:JSON.parse('{"t":"Holmes deerstalker hat","d":"For Sherlock Holmes cosplay or just a cute hat.","p":{"ear":"Ear","crown":"Crown","visor":"Visor"},"s":{},"o":{"headEase":{"t":"Head ease","d":"The amount of ease around your head."},"lengthRatio":{"t":"Length ratio","d":"Controls the length of the crown and ear flaps"},"gores":{"t":"Number of gores","d":"The number of gores used to construct the crown"},"visorAngle":{"t":"Visor angle","d":"The arc angle used to draft the inner curve of the visor"},"visorWidth":{"t":"Visor width","d":"Controls the width of the visor"},"earLength":{"t":"Ear flap length","d":"Controls the length of the ear flaps independently from the crown pieces"},"earWidth":{"t":"Ear flap width","d":"Controls the width of the ear flaps"},"buttonhole":{"t":"Buttonhole guide","d":"Adds a buttonhole to the ear flap to help you draft the buttonhole ear flap variant"},"buttonholeNo":{"t":"No buttonhole guide","d":"Do not place a buttonhole on the ear flap"},"buttonholeYes":{"t":"With buttonhole guide","d":"Do place a buttonhole on the ear flap"},"visorLength":{"t":"Visor length","d":"Controls the length of the visor"}}}')};var hs=o(86063);const ms={name:"holmes.crown",measurements:["head"],options:{headEase:{pct:3,min:0,max:9,snap:{metric:[6,13,19,25,32,38,44,50],imperial:[6.35,12.7,19.05,25.4,31.75,38.1,44.45,50.8]},...(0,n.Wx)("head"),menu:"fit"},lengthRatio:{pct:55,min:40,max:60,menu:"style"},gores:{count:6,min:4,max:20,menu:"style"}}
1,plugins:[hs.hk],draft:function({Point:t,points:e,Path:o,paths:a,measurements:i,options:n,macro:s,sa:r,absoluteOptions:l,store:c,part:p}){const d=i.head+l.headEase,h=d/2/Math.PI;return e.p0=new t(0,0),s("gore",{from:e.p0,radius:h,gores:n.gores,extraLength:(n.lengthRatio-.5)*d/2,prefix:"gore_"}),r&&(a.saCurve=(new o).move(e.gore_p1).curve(e.gore_Cp1,e.gore_Cp2,e.gore_p2).offset(r).hide(),e.sa1=new t(e.gore_p3.x-2*r,e.gore_p3.y-r),a.saBase=(new o).move(e.gore_p3).line(e.p0).offset(2*r).hide(),a.sa=(new o).move(e.gore_p1).line(e.gore_p1.shift(0,r)).line(a.saCurve.start()).join(a.saCurve).line(e.sa1).join(a.saBase).line(e.p0).attr("class","fabric sa")),c.cutlist.setCut([{cut:Number(n.gores),from:"fabric",onFold:!0},{cut:Number(n.gores),from:"lining",onFold:!0}]),s("cutonfold",{from:e.p0,to:e.gore_p1.shift(180,20),offset:-e.gore_p2.y/6,grainline:!0}),e.title=new t(e.gore_p1.x/10,e.gore_p2.y/1.8),s("title",{at:e.title,nr:1,title:"crown",scale:.5}),s("hd",{id:"wFull",from:e.p0,to:e.gore_p1,y:15-e.p0.x}),s("vd",{id:"hFull",from:e.p0,to:e.gore_p3,x:e.p0.x-15-2*r}),p}};const fs={name:"holmes.visor",measurements:["head"],options:{headEase:{pct:3,min:0,max:9,snap:{metric:[6,13,19,25,32,38,44,50],imperial:[6.35,12.7,19.05,25.4,31.75,38.1,44.45,50.8]},...(0,n.Wx)("head"),menu:"fit"},visorAngle:{deg:45,min:10,max:90,menu:"style"},visorWidth:{pct:5,min:1,max:17,snap:5,...(0,n.Wx)("head"),menu:"style"},visorLength:{pct:100,min:80,max:150,menu:"advanced"}},draft:function({Point:t,points:e,Path:o,paths:a,measurements:i,options:n,sa:s,macro:r,absoluteOptions:l,store:c,part:p}){const d=(i.head+l.headEase)/2/Math.PI,h=d/Math.sin(n.visorAngle*Math.PI/180),m=Math.PI/3*n.visorLength*d/h,f=4/3*h*(1-Math.cos(m/2))/Math.sin(m/2);return e.origin=new t(0,0),e.in1=new t(0,0),e.in2=e.in1.shift(90/Math.PI*m,2*h*Math.sin(m/2)),e.in1C=e.in1.shift(0,f),e.in2C=e.in2.shift(180+180/Math.PI*m,f),e.in1CFlipped=e.in1C.flipX(),e.in2Flipped=e.in2.flipX(),e.in2CFlipped=e.in2C.flipX(),e.ex1=e.in1.shift(-90,l.visorWidth),e.ex1C=e.ex1.shift(0,.5*e.in2.x),e.ex2C=e.in2.shift(-90,(e.ex1.y-e.in2.y)*(2/(1+Math.exp(-l.visorWidth/15))-1)),e.ex1CFlipped=e.ex1C.flipX(),e.ex2CFlipped=e.ex2C.flipX(),a.saInner=(new o).move(e.in2).curve(e.in2C,e.in1C,e.in1).curve(e.in1CFlipped,e.in2CFlipped,e.in2Flipped).hide(),a.saOuter=(new o).move(e.in2Flipped).curve(e.ex2CFlipped,e.ex1CFlipped,e.ex1).curve(e.ex1C,e.ex2C,e.in2).hide(),a.seam=a.saOuter.join(a.saInner).close(),s&&(e.sa1=new t(e.in2.x+s,a.saInner.offset(2*s).start().y),e.sa2=e.sa1.flipX(e.in1),a.sa=a.saOuter.offset(s).line(e.sa1).join(a.saInner.offset(2*s)).line(e.sa2).close().attr("class","fabric sa")),c.cutlist.setCut([{cut:4,from:"fabric"},{cut:4,from:"lining"}]),r("grainline",{from:e.in1,to:e.ex1}),r("title",{at:e.ex1.shift(45,20),nr:2,title:"visor",scale:.4}),r("hd",{id:"wFull",from:e.in2Flipped,to:e.in2,y:e.ex1.y+15+s}),r("vd",{id:"hBrim",from:e.ex1,to:e.in1,x:e.in2Flipped.x-15-s}),r("vd",{id:"hFull",from:e.ex1,to:e.in2Flipped,x:e.in2Flipped.x-30-s}),p}};const us={name:"holmes.ear",measurements:["head"],options:{headEase:{pct:3,min:0,max:9,snap:{metric:[6,13,19,25,32,38,44,50],imperial:[6.35,12.7,19.05,25.4,31.75,38.1,44.45,50.8]},...(0,n.Wx)("head"),menu:"fit"},lengthRatio:{pct:55,min:40,max:60,menu:"style"},earLength:{pct:100,min:80,max:150,menu:"style"},earWidth:{pct:100,min:80,max:150,menu:"style"},buttonhole:{bool:!1,menu:"style"}},draft:function({Point:t,points:e,Path:o,paths:a,measurements:i,options:n,sa:s,snippets:r,Snippet:l,macro:c,absoluteOptions:p,store:d,part:h}){const m=i.head+p.headEase,f=n.lengthRatio*m/2*n.earLength,u=m/12*n.earWidth;if(e.top=new t(0,0),e.bottom=new t(u,f),e.topC=e.top.shift(0,e.bottom.x),e.topCFlipped=e.topC.flipX(),e.bottomFlipped=e.bottom.flipX(),e.bottomC=e.bottom.shift(90,e.bottom.y-e.bottom.x),e.bottomCFlipped=e.bottomC.flipX(),a.saBase=(new o).move(e.bottom).curve(e.bottomC,e.topC,e.top).curve(e.topCFlipped,e.bottomCFlipped,e.bottomFlipped).hide(),a.hemBase=(new o).move(e.bottomFl
1ipped).line(e.bottom).hide(),a.seam=a.saBase.join(a.hemBase).close(),s&&(a.sa=a.saBase.offset(s).join(a.hemBase.offset(2*s)).close().attr("class","fabric sa")),d.cutlist.setCut({cut:4,from:"fabric"}),c("grainline",{from:e.top,to:new t(0,e.bottom.y)}),e.logo=new t(-.5*e.bottom.x,.75*e.bottom.y),r.logo=new l("logo",e.logo).attr("data-scale",.7),e.title=new t(.3*e.bottom.x,.75*e.bottom.y),c("title",{at:e.title,nr:3,title:"ear flap",scale:.5}),c("miniscale",{at:new t(0,.3*e.bottom.y)}),n.buttonhole){let o=n.lengthRatio*m/2;e.buttonhole=new t(e.top.x,e.bottom.y-o),r.buttonhole=new l("buttonhole-start",e.buttonhole).attr("data-scale",2)}return c("hd",{id:"wFull",from:e.bottomFlipped,to:e.bottom,y:e.bottom.y+15+2*s}),c("vd",{id:"hFull",from:e.bottomFlipped,to:e.top,x:e.bottomFlipped.x-15-s}),n.buttonhole&&c("vd",{id:"hToButton",from:e.buttonhole,to:e.bottom,x:e.bottom.x+15+s}),h}},gs=new n.pT({data:ps,parts:[ms,fs,us]}),bs=JSON.parse('{"id":"hortensia","name":"Hortensia handbag","code":"Wouter Van Wageningen","description":"A FreeSewing pattern for a handbag","design":["Stoffsuchti","Wouter Van Wageningen"],"difficulty":3,"tags":["accessories","bags"],"techniques":["curved-seam","precision","lining","zipper"],"version":"4.6.0","pkg":"@freesewing/hortensia","collection":true}'),ws={en:JSON.parse('{"t":"Hortensia handbag","d":"Hortensia is a handbag.","p":{"top":"Top","bottom":"Bottom","bottomPanel":"Bottom panel","frontPanel":"Front panel","sidePanel":"Side panel","sidePanelReinforcement":"Side panel reinforcement","strap":"Strap","zipperPanel":"Zipper panel"},"s":{"cutBottomPanel.t":"The bottom panel is not shown","cutBottomPanel.d":"The **Bottom panel** is a rectangular of {{{ width }}} wide and {{{ length }}} long.","cutFrontPanel.t":"The front panel is not shown","cutFrontPanel.d":"The **Front panel** is a rectangular of {{{ width }}} wide and {{{ length }}} long.","cutStrap.t":"The strap is not shown","cutStrap.d":"The **Strap** is a rectangular of {{{ width }}} wide and {{{ length }}} long.","cutStrapReducedSa.t":"The strap is not shown (and has reduced seam allowance)","cutStrapReducedSa.d":"The **Strap** is a rectangular of {{{ width }}} wide and {{{ length }}} long.","cutZipperPanel.t":"The zipper panel is not shown","cutZipperPanel.d":"The **Zipper panel** is a rectangular of {{{ width }}} wide and {{{ length }}} long.","strapLength":"Length of the handles","strapSaReduced.t":"The strap seam allowance is reduced","strapSaReduced.d":"Because of how narrow the strap is, we have reduced the seam allowance on it to be 80% of the strap width","handleWidth":"Width of the handles","zipperSize":"Standard zipper size"},"o":{"size":{"t":"Size","d":"Controls the overall size of the handbag"},"zipperSize":{"t":"Zipper size","d":"Which size of zipper to use"},"zipperSize.#3":{"t":"#3 zipper size","d":"#3 zippers have teeth that are 3mm wide"},"zipperSize.#4":{"t":"#4 zipper size","d":"#4 zippers have teeth that are 4mm wide."},"zipperSize.#4.5":{"t":"#4.5 zipper size","d":"#4.5 zippers have teeth that are 4.5mm wide."},"zipperSize.#5":{"t":"#5 zipper size","d":"#5 zippers have teeth that are 5mm wide."},"zipperSize.#6":{"t":"#6 zipper size","d":"#6 zippers have teeth that are 6mm wide."},"zipperSize.#8":{"t":"#8 zipper size","d":"#8 zippers have teeth that are 8mm wide."},"zipperSize.#10":{"t":"#10 zipper size","d":"#10 zippers have teeth that are 10mm wide."},"zipperSize.invisible":{"t":"Invisible zipper","d":"An invisible zipper is a zipper that can be inserted in such a way that the teeth do not show."},"strapLength":{"t":"Strap length","d":"Controls the length of the strap"},"handleWidth":{"t":"Handle width","d":"Controls the width of the handle"}}}')};function ks(t,e,o,a,i){const n=.551915024494,s=20*i;t.bottomLeft=e.shift(180,o/2).shift(270,a),t.bottomLeftU=t.bottomLeft.shift(90,s),t.bottomLeftUcp=t.bottomLeftU.shift(270,s*n),t.bottomLeftR=t.bottomLeft.shift(0,s),t.bottomLeftRcp=t.bottomLeftR.shift(180,s*n),t.bottomRight=e.shift(0,o/2).shift(270,a),t.bottomRightU=t.bottomRight.shift(90,s),t.bottomRightUcp=t.bottomRightU.shift(270,s*n),t.bottomRightL=t.bottomRight.shift(180,s),t.bottomRightLcp=t.bottomRightL.shift(0,s*n)}const Cs={name:"hortensia.sidePanel",options:{width:230,height:330,size:{pct:50,min:20,max:200,menu:"style",toAbs:(t,{options:e})=>e?.width?e.width*t:230*t,fromAbs:(t,{options:e})=>e?.width?Math.round(1e4*t/e.width)/1e4:Math.round(1e4*t/230)/1e4},zipperSize:{dflt:"#5",list:["#3","#4","#4.5","#5","#6","#8","#10","invisible"],menu:"style"}}
1,draft:({store:t,options:e,Point:o,Path:a,points:i,paths:n,Snippet:s,snippets:r,sa:l,macro:c,part:p})=>{const d=.551915024494,h=1.6180339887,m=new Map([["invisible",0],["#3",4.8],["#4",5.4],["#4.5",5.9],["#5",6.2],["#6",7],["#8",8],["#10",10.6]]),f=e.width*e.size,u=f/230,g=e.height*u,b=g*h,w=.44*g,k=50*u,C=30*u,v=60*u,y=g/h/h/h/h,T=m.get(e.zipperSize),x=y/h;t.set("width",f),t.set("depth",b),t.set("sizeRatio",u),t.set("sideLenght",w),t.set("shoulderCP",k),t.set("topCP",C),t.set("topRadius",v),t.set("sidePanelReinforcementHeight",y),t.set("zipperWidth",T),t.set("zipperPanelWidth",x),i.topCenter=new o(0,0),i.topCircleLeft=i.topCenter.shift(135,v),i.topCircleRight=i.topCenter.shift(45,v),i.topCircleLeftCPu=i.topCircleLeft.shift(45,v*d),i.topCircleRightCPu=i.topCircleRight.shift(135,v*d),i.topMiddle=i.topCenter.shift(90,v),i.topLeft=i.topMiddle.shift(180,f/2),i.topRight=i.topMiddle.shift(0,f/2),i.topMiddleCPL=i.topMiddle.shift(180,C),i.topMiddleCPR=i.topMiddle.shift(0,1.1*C),ks(i,i.topMiddle,f,g,u),i.shoulderLeft=i.bottomLeft.shift(90,w),i.shoulderLeftCP=i.shoulderLeft.shift(90,k),i.shoulderRight=i.bottomRight.shift(90,w),i.shoulderRightCP=i.shoulderRight.shift(90,k),i.topCircleLeftCPd=i.topCircleLeft.shift(225,C),i.topCircleRightCPd=i.topCircleRight.shift(315,C),i.bottomSeamLeft=i.bottomLeft.shift(90,y),i.bottomSeamRight=i.bottomRight.shift(90,y),i.bottomMiddle=i.bottomLeft.shift(0,f/2);let B=(new a).move(i.bottomLeftU).curve(i.bottomLeftUcp,i.bottomLeftRcp,i.bottomLeftR).line(i.bottomRightL).curve(i.bottomRightLcp,i.bottomRightUcp,i.bottomRightU).line(i.bottomRightU),S=(new a).move(i.bottomSeamLeft).join(B).line(i.bottomSeamRight),L=(new a).move(i.topCircleRight).curve(i.topCircleRightCPu,i.topCircleLeftCPu,i.topCircleLeft),P=L.length();i.topZipperRight=L.shiftAlong(P/2-T/2),i.topZipperLeft=L.shiftAlong(P/2+T/2),i.topZipperPanelRight=L.shiftAlong(P/2-x/2),i.topZipperPanelLeft=L.shiftAlong(P/2+x/2),t.set("bottomPanelLength",S.length());let R=(new a).move(i.bottomSeamRight).line(i.shoulderRight).curve(i.shoulderRightCP,i.topCircleRightCPd,i.topCircleRight).join(L).curve(i.topCircleLeftCPd,i.shoulderLeftCP,i.shoulderLeft).line(i.bottomSeamLeft),F=(R.length()-x)/2;return t.set("frontPanelLength",F),n.seam=(new a).move(i.bottomRightU).join(R).join(B).close().attr("class","fabric"),t.cutlist.addCut({cut:2,from:"fabric"}),t.cutlist.addCut({cut:2,material:"lining"}),e.size>.4&&(i.logo=i.topMiddle.shiftFractionTowards(i.bottomMiddle,.4),r.logo=new s("logo",i.logo)),i.title=i.topMiddle.shiftFractionTowards(i.bottomMiddle,.75).attr("data-text-class","center"),i.gridAnchor=i.topMiddle.shiftFractionTowards(i.bottomMiddle,.5),c("title",{at:i.title,nr:1,title:"sidePanel",align:"center"}),r.topNotch=new s("notch",i.topMiddle),r.zipperLeft=new s("notch",i.topZipperLeft),r.zipperRight=new s("notch",i.topZipperRight),r.zipperPanelLeft=new s("notch",i.topZipperPanelLeft),r.zipperPanelRight=new s("notch",i.topZipperPanelRight),r.bottomLeft=new s("notch",i.bottomSeamLeft),r.bottomRight=new s("notch",i.bottomSeamRight),r.bottomMiddle=new s("notch",i.bottomMiddle),l&&(n.sa=n.seam.offset(l).attr("class","fabric sa")),c("hd",{from:i.bottomLeftU,to:i.bottomRightU,y:i.bottomLeft.y+l+15,id:"width"}),c("hd",{from:i.topZipperPanelLeft,to:i.topZipperPanelRight,y:i.topZipperPanelRight.y+15,id:"zipperWidth"}),c("vd",{from:i.bottomRightL,to:i.topMiddle,x:i.topRight.x+l+15,id:"height"}),c("vd",{from:i.bottomRightL,to:i.shoulderRight,x:i.bottomRightL.x,id:"shoulderHeight"}),c("ld",{from:i.topCenter,to:i.topCircleLeft,noStartMarker:!0,id:"circleLeft"}),c("ld",{from:i.topCenter,to:i.topCircleRight,noStartMarker:!0,id:"circleRight"}),c("ld",{from:i.topCenter,to:i.topMiddle,noStartMarker:!0,id:"circleMiddle"}),p}},vs={name:"hortensia.frontPanel",after:Cs,options:{minHandleSpaceWidth:80,maxHandleSpaceWidth:250,pctHandleSpace:50,pctHandleVert:42,handleWidth:{pct:8.6,min:4,max:25,menu:"style"}},draft:({store:t,options:e,complete:o,Point:a,Path:i,points:n,paths:s,Snippet:r,snippets:l,sa:c,expand:p,units:d,macro:h,part:m})=>{const f=t.get("frontPanelLength"),u=t.get("depth");if(!p){const e=c?2*c:0;return t.flag.note({msg:"hortensia:cutFrontPanel",notes:[c?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{width:d(f+e),length:d(u+e)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),t.flag.preset("expandIsOff"),m.hide()}t.flag.preset("expandIsOn"),n.topLeft=new a(0,0),n.topRight=new a(f,0),n.bottomLeft=new a(0,u),n.bottomRight=new a(f,u),s.bottom=(new i).move(n.topLeft).line(n.bottomLeft),s.top=(new i).move(n.bottomRight).line(n.topRight),s.seam=s.bottom.line(n.bottomRight).join(s.top).line(n.topLeft).close().attr("class","fabric"),o&&(s.bottom.addText("bottom","center text-xs fill-note"),s.top.addText("top","center text-xs fill-note"));const g=e.width*e.handleWidth;let b=(u-2*g)*(e.pctHandleSpace/100);b>e.maxHandleSpaceWidth?b=e.maxHandleSpaceWidth:b<e.minHandleSpaceWidth&&(b=e.minHandleSpaceWidth,b<u
1-2*g&&(b=u-2*g));let w=f*(e.pctHandleVert/100);return w+2*g>f&&(w=f-2*g),n.attachPoint1TL=new a(w,0+u/2-b/2),n.attachPoint2TL=new a(w,u-u/2+b/2-g),n.attachPoint2TLtemp=new a(w,u-u/2+b/2),n.attachPoint1BR=new a(w+2*g,0+u/2-b/2+g),n.attachPoint2BR=new a(w+2*g,u-u/2+b/2),h("crossbox",{topLeft:n.attachPoint1TL,bottomRight:n.attachPoint1BR,text:"strapAttachment",id:"att1"}),h("crossbox",{topLeft:n.attachPoint2TL,bottomRight:n.attachPoint2BR,text:"strapAttachment",id:"att2"}),t.cutlist.setCut([{cut:2,from:"fabric"},{cut:2,from:"lining"}]),n.logo=n.topLeft.shiftFractionTowards(n.bottomRight,.5),l.logo=new r("logo",n.logo),n.title=n.logo.shift(-90,u/4).attr("data-text-class","center"),n.gridAnchor=n.logo.clone(),h("title",{at:n.title,nr:2,title:"frontPanel",align:"center"}),c&&(s.sa=s.seam.offset(c).attr("class","fabric sa")),h("hd",{from:n.bottomLeft,to:n.bottomRight,y:n.bottomLeft.y+c+15,id:"width"}),h("hd",{from:n.topLeft,to:n.attachPoint1TL,y:n.attachPoint1TL.y,id:"attachPoint1"}),h("hd",{from:n.topLeft,to:n.attachPoint2TLtemp,y:n.attachPoint2TLtemp.y,id:"attachPoint2"}),h("vd",{from:n.bottomRight,to:n.topRight,x:n.topRight.x+c+15,id:"height"}),h("vd",{from:n.topLeft,to:n.attachPoint1TL,x:n.attachPoint1TL.x,id:"attachPoint1"}),h("vd",{from:n.attachPoint2TLtemp,to:n.bottomLeft,x:n.attachPoint2TLtemp.x,id:"attachPoint2"}),m}},ys={name:"hortensia.bottomPanel",after:Cs,draft:({store:t,expand:e,units:o,options:a,Point:i,Path:n,points:s,paths:r,Snippet:l,snippets:c,sa:p,macro:d,part:h})=>{const m=t.get("bottomPanelLength"),f=t.get("depth");if(!e){const e=p?2*p:0;return t.flag.note({msg:"hortensia:cutBottomPanel",notes:[p?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{width:o(m+e),length:o(f+e)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),t.flag.preset("expandIsOff"),h.hide()}t.flag.preset("expandIsOn"),s.topLeft=new i(0,0),s.topRight=new i(m,0),s.bottomLeft=new i(0,f),s.bottomRight=new i(m,f),r.seam=(new n).move(s.topLeft).line(s.bottomLeft).line(s.bottomRight).line(s.topRight).line(s.topLeft).close().attr("class","fabric"),t.cutlist.addCut({cut:1,from:"fabric"}),t.cutlist.addCut({cut:1,material:"lining"}),s.logo=s.topLeft.shiftFractionTowards(s.bottomRight,.5),c.logo=new l("logo",s.logo),s.title=s.logo.shift(-90,f/4).attr("data-text-class","center"),s.gridAnchor=s.logo.clone(),d("title",{at:s.title,nr:3,title:"bottomPanel",align:"center"});const u=180*a.size;return u>50&&m>100&&(s.scaleBox=s.logo.shift(90,u),d("scalebox",{at:s.scaleBox})),p&&(r.sa=r.seam.offset(p).attr("class","fabric sa")),d("hd",{from:s.bottomLeft,to:s.bottomRight,y:s.bottomLeft.y+p+15,id:"width"}),d("vd",{from:s.bottomRight,to:s.topRight,x:s.topRight.x+p+15,id:"height"}),h}},Ts={name:"hortensia.zipperPanel",after:Cs,draft:({store:t,Point:e,Path:o,points:a,paths:i,sa:n,macro:s,expand:r,units:l,part:c})=>{const p=t.get("zipperWidth"),d=(t.get("zipperPanelWidth")-p)/2,h=t.get("depth");return r?(t.flag.preset("expandIsOn"),a.topLeft=new e(0,0),a.topRight=new e(d,0),a.bottomLeft=new e(0,h),a.bottomRight=new e(d,h),i.seam=(new o).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).line(a.topLeft).close().attr("class","fabric"),t.cutlist.addCut([{cut:2,from:"fabric"},{cut:2,from:"lining"}]),i.text=(new o).move(a.topLeft).line(a.bottomLeft).attr("data-text","ZipperPanel").attr("data-text-class","center text-xs"),n&&(i.sa=i.seam.offset(n).attr("class","fabric sa")),s("hd",{from:a.bottomLeft,to:a.bottomRight,y:a.bottomLeft.y+n+15,id:"width"}),s("vd",{from:a.bottomRight,to:a.topRight,x:a.topRight.x+n+15,id:"height"}),c):(t.flag.note({msg:"hortensia:cutZipperPanel",replace:{width:l(d),length:l(h)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),t.flag.preset("expandIsOff"),c.hide())}},xs={name:"hortensia.sidePanelReinforcement",after:Cs,draft:({store:t,Point:e,Path:o,points:a,paths:i,sa:n,macro:s,part:r})=>{const l=t.get("width"),c=t.get("sidePanelReinforcementHeight"),p=t.get("sizeRatio");return a.topMiddle=new e(0,0),a.topLeft=a.topMiddle.shift(180,l/2),a.topRight=a.topMiddle.shift(0,l/2),ks(a,a.topMiddle,l,c,p),i.seam=(new o).move(a.topMiddle).line(a.topLeft).line(a.bottomLeftU
1).curve(a.bottomLeftUcp,a.bottomLeftRcp,a.bottomLeftR).line(a.bottomRightL).curve(a.bottomRightLcp,a.bottomRightUcp,a.bottomRightU).line(a.topRight).line(a.topMiddle).close().attr("class","fabric"),t.cutlist.addCut({cut:2,from:"fabric"}),a.title=a.topLeft.shiftFractionTowards(a.bottomRight,.5).attr("data-text-class","center"),s("title",{at:a.title,nr:4,title:"sidePanelReinforcement",scale:.25,align:"center"}),a.gridAnchor=a.title.clone(),n&&(i.sa=i.seam.offset(n).attr("class","fabric sa")),s("hd",{from:a.bottomLeftU,to:a.bottomRightU,y:a.bottomLeft.y+n+15,id:"width"}),s("vd",{from:a.bottomRightL,to:a.topRight,x:a.topRight.x+n+15,id:"height"}),r}},Bs={name:"hortensia.strap",after:Cs,options:{strapLength:{pct:160,min:75,max:250,menu:"style"},handleWidth:{pct:8.6,min:4,max:25,menu:"style"}},draft:({store:t,options:e,Point:o,Path:a,points:i,paths:n,expand:s,units:r,sa:l,macro:c,part:p})=>{const d=t.get("width")*e.handleWidth,h=t.get("depth")*e.strapLength;let m=!1;if(l>.8*d&&(l=.8*d,m=!0,t.flag.warn({msg:"hortensia:strapSaReduced"})),!s){const e=l?2*l:0;return t.flag.note({msg:m?"hortensia:cutStrapReducedSa":"hortensia:cutStrap",notes:[l?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand",m?"hortensia:strapSaReduced.d":""],replace:{width:r(d+e),length:r(h+e)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),t.flag.preset("expandIsOff"),p.hide()}return t.flag.preset("expandIsOn"),i.topLeft=new o(-d,0),i.topMiddle=new o(0,0),i.topRight=new o(d,0),i.bottomLeft=new o(-d,h),i.bottomMiddle=new o(0,h),i.bottomRight=new o(d,h),n.seam=(new a).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).line(i.topLeft).close().attr("class","fabric"),n.fold=(new a).move(i.topMiddle).line(i.bottomMiddle).attr("data-text","FoldLine").attr("data-text-class","center text-xs").attr("class","lining dashed"),t.cutlist.addCut({cut:2,from:"fabric"}),i.title=i.topMiddle.shiftFractionTowards(i.bottomMiddle,.25),c("title",{at:i.title,nr:5,title:"strap",rotation:90,scale:.25,align:"center"}),l&&(n.sa=n.seam.offset(l).attr("class","fabric sa")),c("hd",{from:i.bottomLeft,to:i.bottomRight,y:i.bottomLeft.y+l+15,id:"width"}),c("vd",{from:i.bottomRight,to:i.topRight,x:i.topRight.x+l+15,id:"height"}),p}},Ss=new n.pT({data:bs,parts:[Cs,vs,ys,Ts,xs,Bs]}),Ls=JSON.parse('{"id":"huey","name":"Huey hoodie","code":"Joost De Cock","description":"A FreeSewing pattern for a zip-up hoodie","design":"Joost De Cock","difficulty":3,"tags":["tops"],"techniques":["curved-seam","pocket","zipper","ribbing","flat-sleeve"],"version":"4.6.0","pkg":"@freesewing/huey","collection":true}'),Ps={en:JSON.parse('{"t":"Huey hoodie","d":"Huey is a zip-up hoodie with optional front pockets.","p":{"back":"Back","cuff":"Cuff","front":"Front","hood":"Hood","pocket":"Pocket","sleeve":"Sleeve","waistband":"Waistband"},"s":{"cutPocket.t":"The pocket is not shown","cutPocket.d":"The **Pocket** (4) is not shown, but you can trace it from the Front part (1), which has the pocket outline on it (not including seam allowance).","cutCuff.t":"The cuff is not shown","cutCuff.d":"The **Cuff** (7) is a rectangular piece of ribbing fabric {{{ w }}} wide and {{{ l }}} long.","cutWaistband.t":"The waistband is not shown","cutWaistband.d":"The **Waistband** (6) is a rectangular piece of ribbing fabric {{{ w }}} wide and {{{ l }}} long.","zipperLength.t":"The maximum zipper length is {{ length }}","zipperLength.d":"You need a zipper with a maximum length of {{ length }}. A slightly shorter zipper will work too.","ribbingNo.t":"No ribbing","ribbingNo.d":"Do not include ribbing","ribbingYes.t":"Include ribbing","ribbingYes.d":"Include ribbing on sleeve and waistband"},"o":{"pocket":{"t":"Pocket","d":"Whether to include a front pocket or not"},"pocketHeight":{"t":"Pocket height","d":"Controls the height of the pocket"},"pocketOpening":{"t":"Pocket opening","d":"Controls the opening size of the pocket"},"hoodHeight":{"t":"Hood height","d":"Controls the height of the hood"},"hoodCutback":{"t":"Hood cutback","d":"Controls how far the hood opening is cut back"},"hoodClosure":{"t":"Hood closure","d":"Controls how much of the hood is part of the front closure"},"hoodDepth":{"t":"Hood depth","d":"Controls the depth of the hood"},"hoodAngle":{"t":"Hood angle","d":"Controls the angle at which the hood is attached"},"ribbing":{"t":"Ribbing","d":"Whether or not to include ribbing on the pattern."},"ribbingHeight":{"t":"Ribbing height","d":"Controls the height of the ribbing"},"ribbingStretch":{"t":"Ribbing stretch","d":"Use this to adapt the pattern to how stretchy the ribbing that you are using is."},"hipsEase":{"t":"Hips ease","d":"Controls the amount of ease at the hips"},"pocketWidth":{"t":"Pocket width","d":"Controls the width of the pocket"}}}')};function Rs(t,e){const{macro:o,Point:a,points:i,sa:n}=t.shorthand();"front"===e?(i.cHem=i.cfHem,i.cNeck=i.cfNeck):(i.cHem=i.cbHem,i.cNeck=i.cbNeck),o("hd",{id:"wHem",from:i.cHem,to:i.hem,y:i.cHem.y+3*n+15}),o("hd",{id:"wAtArmholePitch",from:new a(0,i.armholePitch.y),to:i.armholePitch}),o("hd",{id:"wCfToHps",from:i.cNeck,to:i.neck,y:i.neck.y-n-15}),o("hd",{id:"wCfToShoulder",from:i.cNeck,to:i.shoulder,y:i.neck.y-n-30}),o("hd",{id:"wFull",from:i.cNeck,to:i.armhole,y:i.neck.y-n-45}),o("ld",{id:"lShoulderSeam",from:i.neck,to:i.shoulder,d:-15}),o("vd",{id:"hHemToArmhole",from:i.hem,to:i.armhole,x:i.armhole.x+n+15}),o("vd",{id:"hArmholeToArmholePitch",from:i.armhole,to:i.armholePitch,x:i.armhole.x+n+15}),o("vd",{id:"hArmholePitchToShoulder",from:i.armholePitch,to:i.shoulder,x:i.armhole.x+n+15}
1),o("vd",{id:"hArmholeToShoulder",from:i.armhole,to:i.shoulder,x:i.armhole.x+n+30}),o("vd",{id:"hArmholeToHps",from:i.armhole,to:i.neck,x:i.armhole.x+n+45}),o("vd",{id:"hCfNeckToHps",from:i.cNeck,to:i.neck,x:i.cNeck.x-15}),o("vd",{id:"hHemToCfNeck",from:i.cHem,to:i.cNeck,x:i.cNeck.x-15}),o("vd",{id:"hFull",from:i.cHem,to:i.neck,x:i.cNeck.x-30})}function Fs(t,e){const{store:o,measurements:a,options:i,points:s,paths:r,Path:l,Point:c,expand:p,sa:d,macro:h,units:m}=t.shorthand();(void 0===o.get("ribbingHeight")||t.context.settings.sample)&&o.set("ribbingHeight",(a.hpsToWaistBack+a.waistToHips)*i.ribbingHeight);const f=o.get("ribbingHeight");if(!p){const a=d?2*d:0;return o.flag.note({msg:`huey:cut${(0,n.ZH)(t.name.split(".")[1])}`,notes:[d?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:m(2*f+a),l:m(e+a)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),o.flag.preset("expandIsOff"),t.hide()}o.flag.preset("expandIsOn"),s.topLeft=new c(0,0),s.topRight=new c(2*f,0),s.bottomLeft=new c(0,e),s.bottomRight=new c(s.topRight.x,e),r.seam=(new l).move(s.bottomRight).line(s.topRight).line(s.topLeft).line(s.bottomLeft).line(s.bottomRight).close().addClass("various"),d&&(r.sa=r.seam.offset(d).addClass("various sa")),s.title=new c(s.bottomRight.x/3,s.bottomRight.y/3),h("vd",{id:"hFull",from:s.bottomRight,to:s.topRight,x:s.topRight.x+d+15}),h("hd",{id:"wFull",from:s.topLeft,to:s.topRight,y:s.topRight.y-d-15})}const Es={name:"huey.back",from:N,hide:{from:!0},measurements:["hips"],options:{ribbing:{bool:!0,menu:"style"},ribbingHeight:{pct:10,min:5,max:15,menu:"style"},hipsEase:{pct:8,min:4,max:12,...(0,n.Wx)("hips"),menu:"fit"},lengthBonus:{pct:15,min:-4,max:60,menu:"style"}},draft:function({store:t,macro:e,Path:o,Point:a,points:i,paths:n,sa:s,options:r,measurements:l,part:c,complete:p}){for(let d in n)-1===["backArmhole","backCollar","chest","waist"].indexOf(d)&&delete n[d];if(r.ribbing){let e=r.ribbingHeight*(l.hpsToWaistBack+l.waistToHips);for(let t of["hem","cbHem"])i[t]=i[t].shift(90,e);t.set("ribbingHeight",e)}return i.hips.x=l.hips*(1+r.hipsEase)/4,i.hem.x=i.hips.x,i.hemCp2=new a(i.hi
1ps.x,Math.min(i.cbWaist.y,i.hem.y)),t.set("backNeckSeamLength",(new o).move(i.neck).curve_(i.neckCp2,i.cbNeck).length()),n.saBase=(new o).move(i.hem).curve_(i.hemCp2,i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.armholePitchCp1,i.armholePitch).join(n.backArmhole).line(i.s3CollarSplit).join(n.backCollar).attr("class","note stroke-xxl"),n.hemBase=(new o).move(i.cbHem).line(i.hem).attr("class","note stroke-xxl"),n.saBase.hide(),n.hemBase.hide(),n.seam=n.saBase.clone().line(i.cbHem).join(n.hemBase).close().attr("class","fabric"),s&&(n.sa=n.hemBase.offset(r.ribbing?s:3*s).join(n.saBase.offset(s)),n.sa.move(n.sa.end()).line(i.cbNeck).move(n.sa.start()).line(i.cbHem).attr("class","fabric sa")),p&&(e("banner",{id:"chestLine",classes:"center contrast help",path:n.chest,text:"huey:chestLine"}),e("banner",{id:"waistLine",classes:"center contrast help",path:n.waist,text:"huey:waistLine"})),t.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),e("cutonfold",{from:i.cbNeck,to:i.cbHem,grainline:!0}
1),e("scalebox",{at:new a(i.armholePitch.x/2,i.cbWaist.y)}),Rs(c,"back"),c}};const Ws={name:"huey.front",from:I,after:Es,hide:{from:!0},options:{pocket:{bool:!0,menu:"style"},pocketHeight:{pct:30,min:25,max:35,menu:"style"},pocketWidth:{pct:60,min:50,max:70,menu:"style"},pocketOpening:{pct:90,min:60,max:90,menu:"style"}},draft:function({utils:t,store:e,macro:o,Point:a,Path:i,points:n,paths:s,complete:r,sa:l,options:c,units:p,measurements:d,part:h}){for(let m in s)-1===["frontArmhole","frontCollar","chest","waist"].indexOf(m)&&delete s[m];if(c.ribbing)for(let m of["hem","cfHem"])n[m]=n[m].shift(90,e.get("ribbingHeight"));return n.hips.x=d.hips*(1+c.hipsEase)/4,n.hem.x=n.hips.x,n.hemCp2=new a(n.hips.x,Math.min(n.cfWaist.y,n.hem.y)),n.pocketCfTop=n.cfNeck.shiftFractionTowards(n.cfHem,1-c.pocketHeight),n.pocketTopRight=n.pocketCfTop.shift(0,n.hem.x*c.pocketWidth),n.pocketTip=new a(1.2*n.pocketTopRight.x,n.pocketTopRight.y+(n.hem.y-n.pocketTopRight.y)*c.pocketOpening),n.pocketHem=new a(n.pocketTopRight.x+n.pocketTopRight.dx(n.pocketTip)/2,n.hem.y),n.pocketTipCp2=t.beamsIntersect(n.pocketTopRight,n.pocketTopRight.shift(90,10),n.pocketTip,n.pocketHem.rotate(-90,n.pocketTip)),e.set("frontNeckSeamLength",(new i).move(n.neck).curve(n.neckCp2Front,n.cfNeckCp1,n.cfNeck).length()),s.saBase=(new i).move(n.hem).curve_(n.hemCp2,n.armhole).curve(n.armholeCp2,n.armholeHollowCp1,n.armholeHollow).curve(n.armholeHollowCp2,n.armholePitchCp1,n.armholePitch).join(s.frontArmhole).line(n.s3CollarSplit).join(s.frontCollar).line(n.cfHem).attr("class","note stroke-xxl"),s.hemBase=(new i).move(n.cfHem).line(n.hem).attr("class","note stroke-xxl"),s.saBase.hide(),s.hemBase.hide(),s.seam=s.saBase.clone().join(s.hemBase).close().attr("class","fabric"),r&&c.pocket&&(s.pocket=(new i).move(n.pocketHem).line(n.pocketTip).curve_(n.pocketTipCp2,n.pocketTopRight).line(n.pocketCfTop).attr("class","fabric dashed stroke-sm")),l&&(s.sa=s.hemBase.offset(c.ribbing?l:3*l).join(s.saBase.offset(l)),s.sa=s.sa.line(s.sa.start()).close().attr("class","fabric sa")),r&&(o("banner",{id:"chestLine",classes:"center contrast help",path:s.chest,text:"huey:chestLine"}),o("banner",{id:"waistLine",classes:"center contrast help",path:s.waist,text:"huey:waistLine"})),e.flag.note({msg:"huey:zipperLength",replace:{length:p(d.head*c.hoodClosure+n.cfNeck.dist(n.cfHem)+(c.ribbing?e.get("ribbingHeight"):0))}}),e.cutlist.setCut({cut:2,from:"fabric"}),o("rmtitle"),o("title",{at:n.title,nr:1,title:"front"}),Rs(h,"front"),h}};const Hs={name:"huey.sleeve",from:y,after:Es,draft:function({Point:t,Path:e,points:o,paths:a,store:i,options:n,sa:s,macro:r,part:l}){for(let p of Object.keys(a))"sleevecap"!==p&&delete a[p];if(n.ribbing)for(let p of["wristLeft","wristRight"])o[p]=o[p].shift(90,i.get("ribbingHeight"));a.saBase=(new e).move(o.wristRight).line(o.bicepsRight).join(a.sleevecap).line(o.wristLeft).attr("class","various stroke-xxl"),a.hemBase=(new e).move(o.wristLeft).line(o.wristRight).attr("class","various stroke-xxl"),a.saBase.hide(),a.hemBase.hide(),a.seam=a.saBase.join(a.hemBase).close().attr("class","fabric"),s&&(n.ribbing?a.sa=a.seam.offset(s):a.sa=a.saBase.clone().offset(s).join(a.hemBase.offset(3*s)).close(),a.sa.attr("class","fabric sa")),i.cutlist.setCut({cut:2,from:"fabric"}),r("grainline",{from:new t(0,o.wristLeft.y),to:new t(0,o.backPitch.y)});let c=s;return n.ribbing||(c=3*s),r("hd",{id:"wCuff",from:o.wristLeft,to:o.wristRight,y:o.wristLeft.y+c+15}),r("hd",{id:"wFull",from:o.bicepsLeft,to:o.bicepsRight,y:o.sleeveTip.y-s-15}),r("vd",{id:"hCuffToSleevecapStart",from:o.wristLeft,to:o.bicepsLeft,x:o.bicepsLeft.x-s-15}),r("vd",{id:"hFull",from:o.wristLeft,to:o.sleeveTip,x:o.bicepsLeft.x-s-30}),l},hide:n.V9.HIDE_TREE,options:{...y.options,libraryFitSleeve:!0}};const As={name:"huey.pocket",from:Ws,draft:function({macro:t,Path:e,points:o,paths:a,snippets:i,Snippet:n,sa:s,store:r,expand:l,options:c,part:p}){if(!c.pocket)return p;if(!l)return r.flag.note({msg:"huey:cutPocket",notes:"flag:partHiddenByExpand",suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),r.flag.preset("expandIsOff"),p.hide();r.flag.preset("expandIsOn");for(let d of Object.keys(a))delete a[d];for(let d of Object.keys(i))delete i[d];return a.seam=(new e).move(o.cfHem).line(o.pocketHem).line(o.pocketTip).curve_(o.pocketTipCp2,o.pocketTopRight).line(o.pocketCfTop).line(o.cfHem).close().attr("class","fabric"),s&&(a.sa=a.seam.offset(s).attr("class","fabric sa")),r.cutlist.setCut({cut:2,from:"fabric"}),o.logo=o.pocketCfTop.shiftFractionTowards(o.pocketHem,.3),i.logo=new n("logo",o.logo).scale(.666),o.title=o.pocketCfTop.shiftFractionTowards(o.pocketHem,.5),t("title",{at:o.title,nr:4,title:"pocket",align:"center"}),t("grainline",{from:o.cfHem.shift(45,20),to:o.pocketCfTop.shift(-45,20)}),t("hd",{id:"wAtWaist",from:o.cfHem,to:o.pocketHem,y:o.cfHem.y+s+15}),t("hd",{id:"WFull",from:o.cfHem,to:o.pocketTip,y:o.cfHem.y+s+30}),t("hd",{id:"wAtTop",from:o.pocketCfTop,to:o.pocketTopRight,y:o.pocketCfTop.y-s-15}),t("vd",{id:"hFull",from:o.cfHem,to:o.pocketCfTop,x:o.cfHem.x-s-15}),t("vd",{id:"hToTip",from:o.pocketHem,to:o.pocketTip,x:o.pocketTip.x+s+15}),p}};const Os={name:"huey.hood",after:[Ws,Es],measurements:["head"],options:{hoodHeight:{pct:59,min:55,max:65,menu:"style"},hoodCutback:{pct:10,min:5,max:15,menu:"style"},hoodClosure:{pct:13.5,min:10,max:15,menu:"style"},hoodDepth:{pct:8.5,min:5,max:12,menu:"style"},hoodAngle:{deg:5,min:2,max:8,menu:"style"}}
1,draft:function({store:t,macro:e,Point:o,Path:a,points:i,paths:n,snippets:s,Snippet:r,sa:l,options:c,measurements:p,part:d}){const h=t.get("frontNeckSeamLength")+t.get("backNeckSeamLength");return i.cfBottom=new o(0,0),i.cbBottom=i.cfBottom.shift(0,h).rotate(c.hoodAngle,i.cfBottom),i.cfHeightLeft=i.cfBottom.shift(90,p.head*c.hoodHeight),i.cfHeightRight=i.cfHeightLeft.shift(0,h),i.cfTop=i.cfBottom.shift(90,p.head*c.hoodClosure).rotate(c.hoodAngle,i.cfBottom),i.frontTop=i.cfHeightLeft.shift(0,p.head*c.hoodCutback),i.frontTopCp2=new o(i.frontTop.x,i.cfTop.y),i.backPitch=new o(i.cbBottom.x+p.head*c.hoodDepth,.6*i.cfHeightRight.y),i.backPitchCp1=i.backPitch.shift(-90,.1*p.head),i.backPitchCp2=i.backPitchCp1.flipY(i.backPitch),n.seam=(new a).move(i.cfBottom).line(i.cbBottom)._curve(i.backPitchCp1,i.backPitch).curve(i.backPitchCp2,i.cfHeightRight,i.frontTop).curve_(i.frontTopCp2,i.cfTop).line(i.cfBottom).close().attr("class","fabric"),l&&(n.sa=n.seam.offset(l).attr("class","fabric sa")),t.cutlist.setCut({cut:4,from:"fabric"}),i.logo=i.frontTop.shiftFractionTowards(i.cbBottom,.7),s.logo=new r("logo",i.logo),i.title=i.frontTop.shiftFractionTowards(i.cbBottom,.3),e("title",{at:i.title,nr:5,title:"hood"}),e("hd",{id:"wAtNeck",from:i.cfBottom,to:i.cbBottom,y:i.cfBottom.y+l+15}),e("hd",{id:"wNeckToHood",from:i.cbBottom,to:i.backPitch,y:i.cfBottom.y+l+15}),e("hd",{id:"wFull",from:i.cfTop,to:i.backPitch,y:i.cfBottom.y+l+30}),e("hd",{id:"wHoodTopToHoodBack",from:i.frontTop,to:i.backPitch,y:i.frontTop.y-l-15}),e("ld",{id:"lHoodRise",from:i.cfBottom,to:i.cfTop,d:-15}),e("ld",{id:"lAtNeck",from:i.cfBottom,to:i.cbBottom,d:15}),e("vd",{id:"hOpening",from:i.cfTop,to:i.frontTop,x:i.cfBottom.x-l-15}),e("vd",{id:"hFull",from:i.cfBottom,to:i.frontTop,x:i.cfBottom.x-l-30}),d}};const Ds={name:"huey.waistband",options:{ribbingStretch:{pct:15,min:0,max:30,menu:"fit"}},draft:function({points:t,measurements:e,options:o,macro:a,store:i,part:n}){return o.ribbing?(Fs(n,e.hips*(1+o.hipsEase)*(1-o.ribbingStretch)),i.cutlist.setCut({cut:1,from:"ribbing"}),a("title",{at:t.title,nr:6,title:"waistband"}),n):n.hide()}};const Ns={name:"huey.cuff",options:{ribbingStretch:{pct:15,min:0,max:30,menu:"fit"}},draft:function({points:t,measurements:e,options:o,macro:a,store:i,part:n}){return o.ribbing?(Fs(n,e.wrist*(1+o.cuffEase)*(1-o.ribbingStretch)),i.cutlist.setCut({cut:2,from:"ribbing"}),a("title",{at:t.title,nr:7,title:"cuff"}),n):n.hide()}},Is=new n.pT({data:Ls,parts:[Es,Ws,Hs,As,Os,Ds,Ns]}),Ms=(0,n.D4)([_,Ps]),_s=JSON.parse('{"id":"hugo","name":"Hugo hoodie","code":"Joost De Cock","description":"A FreeSewing pattern for a hooded jumper with raglan sleeves","design":"Joost De Cock","difficulty":3,"tags":["tops"],"techniques":["curved-seam","pocket","ribbing","raglan-sleeve"],"version":"4.6.0","pkg":"@freesewing/hugo","collection":true}'),js={en:JSON.parse('{"t":"Hugo hoodie","d":"Hugo is a hooded jumper with raglan sleeves.","p":{"back":"Back","cuff":"Cuff","front":"Front","hoodCenter":"Hood center","hoodSide":"Hood side","neckBinding":"Neck binding","pocket":"Pocket","pocketFacing":"Pocket facing","sleeve":"Sleeve","waistband":"Waistband"},"s":{"cutPocket.t":"The pocket is not shown","cutPocket.d":"The **Pocket** (4) is not shown, but you can trace it from the Front part (1), which has the pocket outline on it (not including seam allowance). The front part\'s cut-on-fold-and-grainline is also the pocket\'s cut-on-fold-and grainline.","cutCuff.t":"The cuff is not shown","cutCuff.d":"The **Cuff** (9) is a rectangular piece of ribbing fabric {{{ w }}} wide and {{{ l }}} long, with the grainline parallel to the width.","cutHoodCenter.t":"The hood center is not shown","cutHoodCenter.d":"The **Hood center** (7) is a rectangular piece of main fabric {{{ w }}} wide and {{{ l }}} long, with the grainline parallel to the width.","cutNeckBinding.t":"The neck binding is not shown","cutNeckBinding.d":"The **Neck Binding** (10) is a rectangular piece of main fabric {{{ w }}} wide and {{{ l }}} long, with the grainline parallel to the length.","cutWaistband.t":"The waistband is not shown","cutWaistband.d":"The **Waistband** (8) is a rectangular piece of ribbing fabric {{{ w }}} wide and {{{ l }}} long, with the grainline parallel to the width.","neckCircumference.t":"The neck opening is too small","neckCircumference.d":"The neck opening of {{{ opening }}} is smaller than the head circumference of {{{ head }}}.\\n\\nPlease check and adjust Collar Ease option setting as needed to ensure the neck opening is large enough to accommodate head circumference."},"o":{"ribbingHeight":{"t":"Ribbing height","d":"Controls the height of the ribbing"},"ribbingStretch":{"t":"Ribbing stretch","d":"Use this to adapt the pattern to how stretchy the ribbing that you are using is."},"pocketWidth":{"t":"Pocket width","d":"Determined the width of the pocket."},"hipsEase":{"t":"Hips ease","d":"The amount of ease at your hips."}}}')},Gs={pct:8,min:4,max:20,menu:"fit"},Us={pct:20,min:10,max:50,menu:"fit"},Ys={pct:5,min:0,max:10,menu:"fit"},$s={pct:10,min:4,max:20,menu:"style"};const zs={name:"hugo.front",from:I,hide:n.V9.HIDE_TREE,measurements:["hips","waistToHips"],options:{collarEase:{pct:15,min:0,max:40,menu:"fit"},armholeDepthFactor:.5,shoulderEase:0,shoulderSlopeReduction:0,frontArmholeDeeper:0,s3Collar:0,s3Armhole:0,chestEase:Gs,hipsEase:{pct:12,min:4,max:20,menu:"fit"},draftForHighBust:{bool:!1,menu:"fit"},lengthBonus:{pct:10,min:0,max:20,menu:"style"},ribbingHeight:$s,pocketWidth:{pct:50,min:35,max:65,menu:"style"}}
1,draft:function({utils:t,store:e,sa:o,Point:a,points:i,Path:n,paths:s,Snippet:r,snippets:l,options:c,measurements:p,complete:d,paperless:h,macro:m,part:f}){for(const w in s)["chest","waist"].includes(w)||delete s[w];delete l.armholePitchNotch,i.hem.x=p.hips*(1+c.hipsEase)/4,i.hemCp2=new a(i.hem.x,i.cfWaist.y),e.set("lengthBonus",c.lengthBonus*(p.hpsToWaistBack+p.waistToHips)),e.set("ribbing",(p.hpsToWaistBack+p.waistToHips)*c.ribbingHeight),i.cfRibbing=i.cfHem.shift(90,e.get("ribbing")),i.ribbing=i.hem.shift(90,e.get("ribbing"));const u=(new n).move(i.cfNeck).curve(i.cfNeckCp1,i.neckCp2,i.neck),g=2*u.length();e.set("back_neck_len",g),i.raglanTipFront=u.shiftFractionAlong(.8);const b=u.split(i.raglanTipFront);return i.pocketHem=i.cfRibbing.shiftFractionTowards(i.ribbing,c.pocketWidth),i.pocketCf=i.cfHem.shift(90,.33*p.hpsToWaistBack+e.get("ribbing")),i.pocketTop=new a(i.pocketHem.x,i.pocketCf.y),i.pocketTip=i.pocketHem.shift(90,i.pocketTop.dy(i.pocketHem)/3.5).rotate(-30,i.pocketHem),i.pocketTopCp=t.beamsIntersect(i.pocketTop,i.pocketHem,i.pocketTip,i.pocketHem.rotate(90,i.pocketTip)),s.saBase=(new n).move(i.cfRibbing).line(i.ribbing).curve_(i.hemCp2,i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).line(i.raglanTipFront).join(b[0].reverse()),s.saBase.hide(),s.seam=s.saBase.clone().unhide().close().attr("class","fabric"),s.pocket=(new n).move(i.pocketHem).line(i.pocketTip).curve(i.pocketTip,i.pocketTopCp,i.pocketTop).line(i.pocketCf).addClass("note help").setHidden(!d),e.set("shoulderLength",i.neck.dist(i.shoulder)),e.set("neckOpeningPartFront",b[1]),e.set("neckOpeningAnchorFront",i.neck),e.set("shoulderSlopeDeltaY",i.neck.dy(i.shoulder)),e.set("raglen",(new n).move(i.raglanTipFront).line(i.armholeHollow).curve(i.armholeHollowCp1,i.armholeCp2,i.armhole).length()),e.set("neckOpeningLenFront",u.length()),e.set("neckCutoutFront",i.cfNeck.y),o&&(s.sa=s.saBase.offset(o).line(i.cfNeck).attr("class","fabric sa"),s.sa.move(i.cfRibbing).line(s.sa.start())),d&&(m("banner",{id:"chestLine",classes:"center contrast help",path:s.chest,text:"hugo:chestLine"}),m("banner",{id:"waistLine",classes:"center contrast help",path:s.waist,text:"hugo:waistLine"})),e.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),m("cutonfold",{from:i.cfNeck,to:i.cfRibbing,grainline:!0}),i.title=new a(i.armhole.x/2,i.armhole.y),m("title",{at:i.title,nr:1,title:"front"}),e.set("notchFront",i.raglanTipFront.dist(i.armholeHollow)/2),i.sleeveNotch=i.raglanTipFront.shiftTowards(i.armholeHollow,e.get("notchFront")),l.sleeveNotch=new r("notch",i.sleeveNotch),e.set("frontRaglanTipToNotch",i.raglanTipFront.dist(i.sleeveNotch)),i.logo=i.title.shift(-90,70),l.logo=new r("logo",i.logo),h&&(m("vd",{id:"vFrontNeck",from:i.cfRibbing,to:i.cfNeck,x:i.cfNeck.x-15}),m("vd",{id:"vFrontAll",from:i.cfRibbing,to:i.raglanTipFront,x:i.cfNeck.x-30}),m("vd",{id:"vFrontSideSeam",from:i.ribbing,to:i.armhole,x:i.ribbing.x+15+o}),m("hd",{id:"hFrontNeckhole",from:i.cfNeck,to:i.raglanTipFront,y:i.raglanTipFront.y-15-o}),m("hd",{id:"hFrontArmhole",from:i.raglanTipFront,to:i.armhole,y:i.raglanTipFront.y-15-o}),m("hd",{id:"hFrontPocketWidth",from:i.cfRibbing,to:i.pocketTop,y:i.cfRibbing.y+15+o}),m("hd",{id:"hFrontPocketTip",from:i.cfRibbing,to:i.pocketTip,y:i.cfRibbing.y+30+o}),m("hd",{id:"hFrontWidthFull",from:i.cfRibbing,to:i.ribbing,y:i.cfRibbing.y+45+o}),m("vd",{id:"vFrontPocket",from:i.pocketHem,to:i.pocketTop,x:i.pocketTip.x+15})),f}};const Js={name:"hugo.back",from:N,hide:n.V9.HIDE_TREE,measurements:["hips"],after:zs,draft:function({store:t,measurements:e,options:o,sa:a,Point:i,points:n,Path:s,paths:r,Snippet:l,snippets:c,macro:p,part:d,complete:h}){for(const g in r)["chest","waist"].includes(g)||delete r[g];delete c.armholePitchNotch,n.hem.x=e.hips*(1+o.hipsEase)/4,n.hemCp2=new i(n.hem.x,n.cbWaist.y),n.cbRibbing=n.cbHem.shift(90,t.get("ribbing")),n.ribbing=n.hem.shift(90,t.get("ribbing"));const m=(new s).move(n.cbNeck).curve(n.cbNeck,n.neckCp2,n.neck),f=2*m.length();t.set("front_neck_len",f),n.raglanTipBack=m.shiftFractionAlong(.7);const u=m.split(n.raglanTipBack);return r.saBase=(new s).move(n.cbRibbing).line(n.ribbing).curve_(n.hemCp2,n.armhole).curve(n.armholeCp2,n.armholeHollowCp1,n.armholeHollow).line(n.raglanTipBack).join(u[0].reverse()),r.seam=r.saBase.clone().close().attr("class","fabric"),r.saBase.hide(),a&&(r.sa=r.saBase.offset(a).line(n.cbNeck).attr("class","fabric sa"),r.sa.move(n.cbRibbing).line(r.sa.start())),t.set("neckOpeningPartBack",u[1]),t.set("neckOpeningAnchorBack",n.neck),t.set("neckOpeningLenBack",m.length()),t.set("neckCutoutBack",n.cbNeck.y),h&&(p("banner",{id:"chestLine",classes:"center contrast help",path:r.chest,text:"hugo:chestLine"}),p("banner",{id:"waistLine",classes:"center contrast help",path:r.waist,text:"hugo:waistLine"})),t.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),p("cutonfold",{from:n.cbNeck,to:n.cbRibbing,grainline:!0}),n.title=new i(n.armhole.x/2,n.armhole.y),p("title",{at:n.title,nr:2,t
1itle:"back"}),t.set("notchBack",n.raglanTipBack.dist(n.armholeHollow)/2),n.sleeveNotch=n.raglanTipBack.shiftTowards(n.armholeHollow,t.get("notchBack")),c.sleeveNotch=new l("bnotch",n.sleeveNotch),t.set("backRaglanTipToNotch",n.raglanTipBack.dist(n.sleeveNotch)),n.logo=n.title.shift(-90,70),c.logo=new l("logo",n.logo),p("vd",{id:"hHemToCfNeck",from:n.cbRibbing,to:n.cbNeck,x:n.cbNeck.x-15}),p("vd",{id:"hFull",from:n.cbRibbing,to:n.raglanTipBack,x:n.cbNeck.x-30}),p("vd",{id:"hHemToRaglanStart",from:n.ribbing,to:n.armhole,x:n.ribbing.x+15+a}),p("hd",{id:"wNeckOpening",from:n.cbNeck,to:n.raglanTipBack,y:n.raglanTipBack.y-15-a}),p("hd",{id:"wRaglan",from:n.raglanTipBack,to:n.armhole,y:n.raglanTipBack.y-15-a}),p("hd",{id:"wHem",from:n.cbRibbing,to:n.ribbing,y:n.cbRibbing.y+15+a}),d}};const Ks={name:"hugo.sleeve",from:y,hide:n.V9.HIDE_TREE,after:[zs,Js],options:{cuffEase:Us,sleeveLengthBonus:{pct:2,min:0,max:10,menu:"style"},ribbingHeight:$s,sleevecapEase:0,sleevecapTopFactorX:.5,sleevecapTopFactorY:.45,sleevecapBackFactorX:.6,sleevecapBackFactorY:.33,sleevecapFrontFactorX:.55,sleevecapFrontFactorY:.33,sleevecapQ1Offset:.017,sleevecapQ2Offset:.035,sleevecapQ3Offset:.025,sleevecapQ4Offset:.01,sleevecapQ1Spread1:.1,sleevecapQ1Spread2:.15,sleevecapQ2Spread1:.15,sleevecapQ2Spread2:.1,sleevecapQ3Spread1:.1,sleevecapQ3Spread2:.08,sleevecapQ4Spread1:.07,sleevecapQ4Spread2:.063,sleeveWidthGuarantee:.9,libraryFitSleeve:!0},draft:function({utils:t,store:e,sa:o,Point:a,points:i,Path:n,paths:s,Snippet:r,snippets:l,options:c,measurements:p,macro:d,log:h,units:m,part:f}){i.raglanTop=new a(0,i.sleeveTip.y-e.get("shoulderLength"));let u=e.get("neckOpeningAnchorFront"),g=e.get("neckOpeningPartFront");g=g.translate(u.dx(i.raglanTop),u.dy(i.raglanTop));let b=g.ops[1].cp1,w=g.ops[1].cp2,k=g.ops[0].to,C=i.raglanTop.angle(w);i.raglanTopCp2=w.rotate(180-C,i.raglanTop),i.raglanTipFrontCp1=b.rotate(180-C,i.raglanTop),i.raglanTipFront=k.rotate(180-C,i.raglanTop),u=e.get("neckOpeningAnchorBack");let v=e.get("neckOpeningPartBack");v=v.translate(u.dx(i.raglanTop),u.dy(i.raglanTop)),b=v.ops[1].cp1,w=v.ops[1].cp2,k=v.ops[0].to,i.raglanTopCp1=w.flipX(),i.raglanTipBackCp2=b.flipX(),i.raglanTipBack=k.flipX(),C=i.raglanTop.angle(i.raglanTopCp1),i.raglanTopCp1=i.raglanTopCp1.rotate(360-C,i.raglanTop),i.raglanTipBackCp2=i.raglanTipBackCp2.rotate(360-C,i.raglanTop),i.raglanTipBack=i.raglanTipBack.rotate(360-C,i.raglanTop);let y=0,T=0;do{i.raglanMidFront=i.raglanTipFront.shiftFractionTowards(i.capQ4Base,.5),i.raglanMidBack=t.beamsIntersect(i.raglanTipBack,i.capQ1Base,i.raglanMidFront,i.raglanMidFront.shift(0,100)),i.raglanFrontCp1=i.raglanTipFront.shiftFractionTowards(i.capQ4Base,.25),i.raglanFrontCp2=i.raglanTipFront.shiftFractionTowards(i.capQ4Base,.75),i.raglanBackCp1=i.raglanTipBack.shiftFractionTowards(i.capQ1Base,.8),i.raglanBackCp2=i.raglanTipBack.shiftFractionTowards(i.capQ1Base,.3);let o=e.get("shoulderSlopeDeltaY"),a=i.raglanTipFront.angle(i.capQ4Base),s=i.raglanTipBack.angle(i.capQ1Base);i.slopeFront=i.raglanMidFront.shift(a+90,o/2),i.slopeBack=i.raglanMidBack.shift(s-90,o/2),i.slopeFrontCp1=i.raglanFrontCp1.shift(a+90,o/2),i.slopeFrontCp2=i.raglanFrontCp2.shift(a+90,o/2),i.slopeBackCp1=i.raglanBackCp1.shift(s-90,o/2),i.slopeBackCp2=i.raglanBackCp2.shift(s-90,o/2),i.capQ4BaseCp=t.beamsIntersect(i.slopeFrontCp2,i.capQ4Base,i.bicepsLeft,i.capQ4Cp2),i.capQ1BaseCp=t.beamsIntersect(i.slopeBackCp1,i.capQ1Base,i.bicepsRight,i.capQ1Cp2);let r=(new n).move(i.raglanTipBack).curve(i.raglanTipBackCp2,i.raglanTopCp1,i.raglanTop).curve(i.raglanTopCp2,i.raglanTipFrontCp1,i.raglanTipFront).curve(i.raglanTipFront,i.slopeFrontCp1,i.slopeFront).curve(i.slopeFrontCp2,i.capQ4Base,i.capQ4Base).length();y=e.get("raglen")-r;let l=["raglanTipFront","raglanTipFrontCp1","raglanTopCp2","raglanTop","raglanTopCp1","raglanTipBackCp2","raglanTipBack"];for(let t of l)i[t]=i[t].shift(90,y);let d=e.get("shoulderLength")+p.shoulderToWrist*(1+c.sleeveLengthBonus)-c.ribbingHeight,h=i.raglanTop.dist(i.centerWrist)-d,m=["wristLeft","centerWrist","wristRight"];for(let t of m)i[t]=i[t].shift(90,h);T++}while(Math.abs(y)>5&&T<10);s.seam=(new n).move(i.raglanTipBack).curve(i.raglanTipBackCp2,i.raglanTopCp1,i.raglanTop).curve(i.raglanTopCp2,i.raglanTipFrontCp1,i.raglanTipFront).curve(i.raglanTipFront,i.slopeFrontCp1,i.slopeFront).curve(i.slopeFrontCp2,i.capQ4Cp2,i.bicepsLeft).line(i.wristLeft).line(i.wristRight).line(i.bicepsRight).curve(i.capQ1Cp1,i.slopeBackCp1,i.slopeBack).curve(i.slopeBackCp2,i.raglanTipBack,i.raglanTipBack).close().attr("class","fabric"),o&&(s.sa=s.seam.offset(o).attr("class","fabric sa")),e.cutlist.setCut({cut:2,from:"fabric"}),d("grainline",{from:i.centerWrist,to:i.raglanTop}),d("title",{at:i.gridAnchor,nr:3,title:"sleeve"}),i.logo=i.gridAnchor.shift(-90,70),l.logo=new r("logo",i.logo),i.scalebox=i.logo.shift(-90,70),d("scalebox",{at:i.scalebox}),i.frontNotch=(new n).move(i.raglanTipFront).curve(i.raglanTipFront,i.slopeFrontCp1,i.slopeFront).curve(i.slopeFrontCp2,i.capQ4Cp2,i.bicepsLeft).shiftAlong(e.get("notchFront")),l.frontNotch=new r("notch",i.frontNotch),l.shoulderNot
1ch=new r("notch",i.raglanTop),i.backNotch=(new n).move(i.raglanTipBack).curve(i.raglanTipBack,i.slopeBackCp2,i.slopeBack).curve(i.slopeBackCp1,i.capQ1Cp1,i.bicepsRight).shiftAlong(e.get("notchBack")),l.backNotch=new r("bnotch",i.backNotch),d("rmad"),d("vd",{id:"hCuffToRaglan",from:i.wristLeft,to:i.bicepsLeft,x:i.bicepsLeft.x-15-o}),d("vd",{id:"hRaglanFront",from:i.bicepsLeft,to:i.raglanTipFront,x:i.bicepsLeft.x-15-o}),d("vd",{id:"hRaglanToTip",from:i.bicepsRight,to:i.raglanTop,x:i.bicepsRight.x+15+o}),d("vd",{id:"hRaglanBack",from:i.bicepsRight,to:i.raglanTipBack,x:i.bicepsRight.x+30+o}),d("hd",{id:"wRaglanTopFront",from:i.raglanTipFront,to:i.raglanTop,y:i.raglanTipBack.y-15-o}),d("hd",{id:"wRaglanTopBack",from:i.raglanTop,to:i.raglanTipBack,y:i.raglanTipBack.y-15-o}),d("hd",{id:"wSleeveFrontHalf",from:i.bicepsLeft,to:i.raglanTop,y:i.raglanTipBack.y-30-o}),d("hd",{id:"wFull",from:i.bicepsLeft,to:i.bicepsRight,y:i.raglanTipBack.y-45-o}),d("hd",{id:"wCuff",from:i.wristLeft,to:i.wristRight,y:i.wristLeft.y+15+o});const x=2*(new n).move(i.raglanTipBack).curve(i.raglanTipBackCp2,i.raglanTopCp1,i.raglanTop).curve(i.raglanTopCp2,i.raglanTipFrontCp1,i.raglanTipFront).length(),B=e.get("front_neck_len")+e.get("back_neck_len")+x,S=p.head-B,L=S/p.head;let P=" bigger than ";return S>0&&(P=" smaller than "),h.info(": "+m(B)+" neck opening is "+m(Math.abs(S))+P+" than "+m(p.head)+" head circumference, with Collar Ease set to "+(100*c.collarEase).toFixed(0)+"%."),L>.04&&e.flag.warn({msg:"hugo:neckCircumference",replace:{opening:m(B),head:m(p.head)}}),f}};const Vs={name:"hugo.pocket",from:zs,draft:function({utils:t,store:e,sa:o,points:a,Path:i,paths:n,complete:s,macro:r,expand:l,snippets:c,part:p}){for(const h in n)"pocket"!==h&&delete n[h];for(const h in c)delete c[h];n.seam=n.pocket.line(a.cfRibbing).line(a.pocketHem).close().attr("class","fabric",!0),n.seam.unhide(),n.saBase=(new i).move(a.cfRibbing).line(a.pocketHem).line(a.pocketTip)._curve(a.pocketTopCp,a.pocketTop).line(a.pocketCf).hide(),e.set("facingWidth",a.pocketHem.dist(a.pocketTip)/2);let d=(new i).move(a.pocketTip).curve(a.pocketTip,a.pocketTopCp,a.pocketTop).offset(-1*e.get("facingWidth"));return a._tmp=d.shiftAlong(2),a.facingEnd=t.beamsIntersect(a._tmp,d.start(),a.pocketHem,a.pocketTip),n.facing=(new i).move(a.facingEnd).line(d.start()).join(d).attr("class"," fabric help"),n.facing.hide(),l?(e.flag.preset("expandIsOn"),s&&n.facing.unhide().addClass("note dashed"),o&&(n.sa=n.saBase.offset(o).line(a.pocketCf).move(a.cfRibbing),n.sa.line(n.sa.start()).attr("class","fabric sa")),e.cutlist.setCut({cut:2,from:"fabric"}),r("cutonfold",{to:a.cfRibbing,from:a.pocketCf,grainline:!0,reverse:!0}),a.title=a.cfRibbing.shiftFractionTowards(a.pocketTop,.5),r("title",{at:a.title,nr:4,title:"pocket"}),r("hd",{id:"wAtWaist",from:a.cfRibbing,to:a.pocketHem,y:a.cfRibbing.y+15+o}),r("hd",{id:"wFull",from:a.cfRibbing,to:a.pocketTip,y:a.cfRibbing.y+30+o}),r("vd",{id:"hWaistToTip",from:a.pocketHem,to:a.pocketTip,x:a.pocketTip.x+15+o}),r("vd",{id:"hFull",from:a.pocketHem,to:a.pocketTop,x:a.cfRibbing.x-1
15-o}),p):(e.flag.note({msg:"hugo:cutPocket",notes:"flag:partHiddenByExpand",suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),e.flag.preset("expandIsOff"),p.hide())}};const Xs={name:"hugo.pocketFacing",from:Vs,draft:function({sa:t,points:e,Path:o,paths:a,macro:i,store:n,part:s}){for(const r in a)"facing"!==r&&delete a[r];return a.seam=a.facing.clone().unhide().line(e.pocketTop).curve(e.pocketTopCp,e.pocketTip,e.pocketTip).line(e.facingEnd).close().attr("class","fabric",!0),e.saStart=e.pocketTop.shift(180,n.get("facingWidth")),t&&(a.sa=(new o).move(e.saStart).line(e.pocketTop).curve(e.pocketTopCp,e.pocketTip,e.pocketTip).line(e.facingEnd).offset(-1*t).attr("class","fabric sa"),a.sa.line(e.facingEnd).move(e.saStart).line(a.sa.start())),n.cutlist.setCut({cut:2,from:"fabric"}),e.title=e.pocketTopCp.clone(),i("title",{at:e.title,nr:5,title:"pocketFacing",scale:.666,align:"center"}),i("hd",{id:"width",from:e.saStart,to:e.pocketTop,y:e.saStart.y-15-t}),s}};const Qs={name:"hugo.hoodSide",measurements:["head"],after:[zs,Js],draft:function({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,measurements:l,macro:c,part:p}){let d=t.get("neckOpeningLenFront")+t.get("neckOpeningLenBack"),h=l.head,m=t.get("neckCutoutFront")-t.get("neckCutoutBack");t.set("hoodCenterWidth",l.head/10);let f=t.get("hoodCenterWidth")/2;a.topLeft=new o(0,0),a.topRight=new o(d,0),a.neckRight=new o(d,(h-f)/2),a.neckLeft=new o(0,a.neckRight.y),a.frontLeft=a.neckLeft.shift(-90,m),a.frontEdge=a.neckRight.shift(-90,m),a.neckEdge=a.neckLeft.shift(0,f),a.neckEdgeCp2=new o(a.neckRight.x/2,a.neckEdge.y),a.frontEdgeCp1=new o(a.neckEdgeCp2.x,a.frontEdge.y),a.shoulderNotch=(new i).move(a.neckEdge).curve(a.neckEdgeCp2,a.frontEdgeCp1,a.frontEdge).shiftAlong(t.get("neckOpeningLenBack")-f),a.hoodTop=new o(a.shoulderNotch.x,a.topLeft.y),a.hoodTopCp2=a.hoodTop.shift(180,.7*a.neckEdge.y),a.hoodRim=new o(a.frontEdge.x,.2*a.neckRight.y),a.hoodTopCp1=a.hoodTop.shift(0,a.hoodTop.dx(a.hoodRim)/2),a.frontEdgeCp2=a.frontEdge.shift(90,f),a._tmp1=(new i).move(a.hoodRim).curve(a.hoodRim,a.hoodTopCp1,a.hoodTop).shiftAlong(2).rotate(90,a.hoodRim),a.hoodRimCp=a.hoodRim.shiftTowards(a._tmp1,a.neckRight.y/3),a.neckRoll=a.neckRight.shift(180,f),a._tmp2=(new i).move(a.neckRoll).curve(a.neckRoll,a.hoodRimCp,a.hoodRim).shiftAlong(2),a.neckRollCp2=a.neckRoll.shiftTowards(a._tmp2,f),a.neckRollCp1=a.neckRollCp2.rotate(180,a.neckRoll),n.seam=(new i).move(a.frontEdge).curve(a.frontEdgeCp2,a.neckRollCp1,a.neckRoll).curve(a.neckRollCp2,a.hoodRimCp,a.hoodRim).curve(a.hoodRim,a.hoodTopCp1,a.hoodTop).curve(a.hoodTopCp2,a.neckEdge,a.neckEdge).curve(a.neckEdgeCp2,a.frontEdgeCp1,a.frontEdge).close().attr("class","fabric"),e&&(n.sa=n.seam.reverse().offset(-1*e).attr("class","fabric sa")),t.set("hoodCenterLength",(new i).move(a.hoodRim).curve(a.hoodRim,a.hoodTopCp1,a.hoodTop).curve(a.hoodTopCp2,a.neckEdge,a.neckEdge).length()),t.cutlist.setCut({cut:4,from:"fabric"}),a.cfNotch=(new i).move(a.neckEdge).curve(a.neckEdgeCp2,a.frontEdgeCp1,a.frontEdge).shiftAlong(d-f),c("sprinkle",{snippet:"notch",on:["shoulderNotch","cfNotch"]}),a.title=new o(a.hoodTop.x,a.neckEdge.y/4),c("title",{at:a.title,nr:6,title:"hoodSide",align:"center"}),a.logo=new o(a.hoodTop.x,.666*a.neckEdge.y),r.logo=new s("logo",a.logo),c("grainline",{from:a.shoulderNotch,to:a.hoodTop});const u=(new i).move(a.neckEdge).curve(a.neckEdgeCp2,a.frontEdgeCp1,a.frontEdge).split(a.shoulderNotch),g=(new i).move(a.hoodRim).curve(a.hoodRim,a.hoodTopCp1,a.hoodTop).curve(a.hoodTopCp2,a.neckEdge,a.neckEdge).reverse(),b=(new i).move(a.neckRoll).curve(a.neckRollCp2,a.hoodRimCp,a.hoodRim);c("pd",{id:"lNeckToNotch",path:u[0],d:e+15}),c("pd",{id:"lNotchToNeck",path:u[1],d:e+15}),c("pd",{id:"lHood",path:g,d:-1*e-15}),c("hd",{id:"wAtNeck",from:a.neckEdge,to:a.frontEdge,y:a.frontEdge.y+e+30}),c("hd",{id:"wFull",from:g.edge("left"),to:a.frontEdge,y:a.frontEdge.y+e+45});const w=b.edge("left");return c("hd",{id:"wOpeningToTip",from:w,to:a.frontEdge,y:w.y}),c("vd",{id:"hTipToOpeningTip",from:a.frontEdge,to:a.hoodRim,x:a.hoodRim.x+e+15}),c("vd",{id:"hFull",from:a.frontEdge,to:a.hoodTop,x:a.hoodRim.x+e+30}),p}};const qs={name:"hugo.hoodCenter",after:Qs,draft:function({store:t,sa:e,Point:o,points:a,Path:i,paths:n,macro:s,expand:r,units:l,part:c}){const p=t.get("hoodCenterWidth"),d=t.get("hoodCenterLength");if(!r){const o=e?2*e:0;return t.flag.note({msg:"hugo:cutHoodCenter",notes:[e?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:l(p+o),l:l(d+o)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),t.flag.preset("expandIsOff"),c.hide()}return t.flag.preset("expandIsOn"),a.topLeft=new o(0,0),a.bottomLeft=new o(0,d),a.topRight=new o(p,0),a.bottomRight=new o(p,d),n.seam=(new i).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).close().attr("class","fabric"),e&&(n.sa=n.seam.offset(e).attr("class","fabric sa")),t.cutlist.setCut({cut:2,from:"fabric"}),a.title=a.bottomLeft.shiftFractionTowards(a.topRight,.5),s("title",{at:a.title,nr:7,title:"hoodCenter",align:"center"}),s("grainline",{from:a.topLeft.shift(-90,p/2),to:a.topRight.shift(-90,p/2)}),s("hd",{id:"width",from:a.bottomLeft,to:a.bottomRight,y:a.bottomRight.y+e+15}),s("vd",{id:"length",from:a.bottomRight,to:a.topRight,x:a.topRight.x+e+15}),c}};const Zs={name:"hugo.waistband",measurements:["waistToHips"],options:{chestEase:Gs,ribbingStretch:Ys,ribbingHeight:$s},draft:function({measurements:t,options:e,sa:o,Point:a,points:i,Path:n,paths:s,macro:r,units:l,expand:c,store:p,part:d}){const h=(t.hpsToWaistBack+t.waistToHips)*e.ribbingHeight*2,m=t.chest*(1+e.chestEase)*(1-e.ribbingStretch);if(!c){const t=o?2*o:0;return p.flag.note({msg:"hugo:cutWaistband",notes:[o?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:l(h+t),l:l(m+t)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),p.flag.preset("expandIsOff"),d.hide()}return p.flag.preset("expandIsOn"),i.topLeft=new a(0,0),i.bottomLeft=new a(0,m),i.topRight=new a(h,0),i.bottomRight=new a(h,m),s.seam=(new n).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).close().attr("class","various"),o&&(s.sa=s.seam.offset(o).attr("class","various s
1a")),p.cutlist.setCut({cut:1,from:"ribbing"}),i.title=i.bottomLeft.shiftFractionTowards(i.topRight,.5),r("title",{at:i.title,nr:8,title:"waistband",align:"center"}),r("grainline",{from:i.topLeft.shift(290,25),to:i.topRight.shift(250,25)}),r("hd",{id:"wFull",from:i.bottomLeft,to:i.bottomRight,y:i.bottomRight.y+o+15}),r("vd",{id:"hFull",from:i.bottomRight,to:i.topRight,x:i.topRight.x+o+15}),d}};const tr={name:"hugo.cuff",measurements:["waistToHips"],options:{cuffEase:Us,ribbingStretch:Ys},draft:function({measurements:t,options:e,sa:o,Point:a,points:i,Path:n,paths:s,macro:r,expand:l,store:c,units:p,part:d}){const h=(t.hpsToWaistBack+t.waistToHips)*e.ribbingHeight*2,m=t.wrist*(1+e.cuffEase)*(1-e.ribbingStretch);if(!l){const t=o?2*o:0;return c.flag.note({msg:"hugo:cutCuff",notes:[o?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:p(h+t),l:p(m+t)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),c.flag.preset("expandIsOff"),d.hide()}return c.flag.preset("expandIsOn"),i.topLeft=new a(0,0),i.bottomLeft=new a(0,h),i.topRight=new a(m,0),i.bottomRight=new a(m,h),s.seam=(new n).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).line(i.topLeft).close().attr("class","various"),o&&(s.sa=s.seam.offset(o).attr("class","various sa")),c.cutlist.setCut({cut:2,from:"ribbing"}),i.title=i.bottomLeft.shiftFractionTowards(i.topRight,.5),r("title",{at:i.title,nr:9,title:"cuff"}),r("grainline",{from:i.bottomLeft.shift(0,20),to:i.topLeft.shift(0,20)}),r("vd",{id:"hFull",from:i.bottomRight,to:i.topRight,x:i.topRight.x+o+15}),r("hd",{id:"wFull",from:i.bottomLeft,to:i.bottomRight,y:i.bottomRight.y+o+15}),d}};const er={name:"hugo.neckBinding",after:[zs,Js,qs],draft:function({store:t,sa:e,Point:o,points:a,Path:i,paths:n,macro:s,part:r,expand:l,units:c}){const p=2*t.get("neckOpeningLenFront")+2*t.get("neckOpeningLenBack")+t.get("hoodCenterWidth"),d=p/44.2;if(!l){const o=e?2*e:0;return t.flag.note({msg:"hugo:cutNeckBinding",notes:[e?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:c(d+o),l:c(p+o)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),t.flag.preset("expandIsOff"),r.hide()}return t.flag.preset("expandIsOn"),a.topLeft=new o(0,0),a.topRight=new o(p,0),a.bottomRight=new o(p,d),a.bottomLeft=new o(0,d),n.seam=(new i).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).line(a.topLeft).close().attr("class","fabric"),e&&(n.sa=n.seam.offset(e).attr("class","fabric sa")),t.cutlist.setCut({cut:1,from:"fabric"}),s("grainline",{from:a.topLeft.shiftFractionTowards(a.topRight,.15).shiftFractionTowards(a.bottomLeft,.6),to:a.topRight.shiftFractionTowards(a.topLeft,.15).shiftFractionTowards(a.bottomRight,.6)}),a.title=new o(p/2,3*d),s("title",{at:a.title,nr:10,title:"neckBinding",scale:.4}),s("hd",{id:"length",from:a.bottomLeft,to:a.bottomRight,y:a.bottomLeft.y+e+15}),s("vd",{id:"width",from:a.topRight,to:a.bottomRight,x:a.topRight.x+e+15}),r}},or=new n.pT({data:_s,parts:[Js,zs,Ks,Vs,Xs,Qs,qs,Zs,tr,er]}),ar=(0,n.D4)([_,js]),ir={en:JSON.parse('{"t":"Jaeger jacket","d":"Jaeger is a sport coat style jacket with two buttons and patch pockets.","p":{"backBase":"Back base","chestPocketBag":"Chest pocket bag","chestPocketWelt":"Chest pocket welt","collar":"Collar","collarStand":"Collar stand","frontBase":"Front base","frontFacing":"Front facing","frontLining":"Front lining","chestPiece":"Chest piece","innerPocketBag":"Inner pocket bag","innerPocketWelt":"Inner pocket welt","pocket":"Pocket","pocketLining":"Pocket lining","side":"Side","topSleeve":"Top sleeve","underCollar":"Under collar","underSleeve":"Under sleeve"},"s":{"cutFrontFacing.t":"The front facing is not shown","cutFrontFacing.d":"The **Front facing** (1a) is not shown, but you can trace it from the Front part (1), which has the facing/lining boundary on it (not including seam allowance).","cutFrontLining.t":"The front lining is not shown","cutFrontLining.d":"The **Front lining** (1b) is not shown, but you can trace it from the Front part (1), which has the facing/lining boundary on it (not including seam allowance).","cutChestPiece.t":"The chest piece is not shown","cutChestPiece.d":"The **Chest piece** (1c) is not shown, but you can trace it from the Front part (1), which has the chest piece boundary on it (not including seam allowance).","cutInnerPocketBag.t":"The inner pocket bag is not shown","cutInnerPocketBag.d":"The **Inner pocket bag** is a rectangular piece of lining {{{ width }}} wide and {{{ length }}} long.","cutInnerPocketWelt.t":"The inner pocket welt is not shown","cutInnerPocketWelt.d":"The **Inner pocket welt** is a rectangular piece of fabric {{{ width }}} wide and {{{ length }}} long.","foldAlongThisLine":"Fold along this line"},"o":{"centerBackDart":{"t":"Center back dart","d":"Dart at the center back of your neck to accommodate a rounded back"},"sleeveVentLength":{"t":"Sleeve vent length","d":"Length of the sleeve vent"},"sleeveVentWidth":{"t":"Sleeve vent width","d":"Width of the sleeve vent"},"chestShaping":{"t":"Chest shaping","d":"Amount of shaping to accommodate for the chest curve"},"frontDartPlacement":{"t":"Front dart placement","d":"Location of the front darts"},"frontOverlap":{"t":"Front overlap","d":"How far the fabric extends beyond the closing buttons"},"sideFrontPlacement":{"t":"Side/Front placement","d":"The location of the side/front boundary"},"chestPocketDepth":{"t":"Chest pocket depth","d":"The depth of the chest pocket"},"chestPocketWidth":{"t":"Chest pocket width","d":"The width of the chest pocket"},"chestPocketPlacement":{"t":"Chest pocket placement","d":"The location of the chest pocket"},"chestPocketAngle":{"t":"Chest pocket angle","d":"The angle under which the chest pocket is placed"},"chestPocketWeltSize":{"t":"Chest pocket welt size","d":"The size of the chest pocket welt"},"frontPocketPlacement":{"t":"Front pocket placement","d":"Location of the front pocket"},"frontPocketWidth":{"t":"Front pocket width","d":"The width of the front pocket"},"frontPocketDepth":{"t":"Front pocket depth","d":"The depth of the front pocket"},"frontPocketRadius":{"t":"Front pocket radius","d":"The radius by which the front pocket is rounded"},"innerPocketPlacement":{"t":"Inner pocket placement","d":"The location of the inner pocket"},"innerPocketWidth":{"t":"Inner pocket width","d":"The width of the inner pocket"},"innerPocketDepth":{"t":"Inner pocket depth","d":"The depth of the inner pocket"}
1,"innerPocketWeltHeight":{"t":"Inner pocket welt height","d":"The height of the inner pocket welt"},"pocketFoldover":{"t":"Pocket fold-over","d":"The amount by which the main fabric is folder over into the pocket"},"centerFrontHemDrop":{"t":"Center front hem drop","d":"The amount by which the hem is lowered towards the center front"},"backVent":{"t":"Back vent","d":"The amount of back vents"},"backVentLength":{"t":"Back vent length","d":"The length of the back vent(s)"},"buttonLength":{"t":"Button length","d":"The distance over which buttons are spread"},"frontCutawayAngle":{"t":"Front cutaway angle","d":"The angle under which the front is cut away towards the hem"},"frontCutawayStart":{"t":"Front cutaway start","d":"The location at which the front starts opening up towards the hem"},"frontCutawayEnd":{"t":"Front cutaway end","d":"Increasing this will make the front cutaway stay closer to the center front"},"collarSpread":{"t":"Collar spread","d":"The collar spread controls how the collar drapes over the shoulders"},"lapelStart":{"t":"Lapel start","d":"Location where the center front goes over into the lapels"},"lapelReduction":{"t":"Lapel reduction","d":"How much the tip of the lapels turns inwards"},"collarHeight":{"t":"Collar height","d":"Height of the collar"},"collarNotchDepth":{"t":"Collar notch depth","d":"Depth of the collar notch"},"collarNotchAngle":{"t":"Collar notch angle","d":"Angle of the collar notch"},"collarNotchReturn":{"t":"Collar notch return","d":"How much the collar returns from the notch, in comparison to the lapel"},"rollLineCollarHeight":{"t":"Roll-line collar height","d":"How much the roll-line hugs the neck"},"hemRadius":{"t":"Hem radius","d":"The amount by which the hem is rounded"},"hipsEase":{"t":"Hips ease","d":"Controls the amount of ease at your hips"},"waistEase":{"t":"Waist ease","d":"Controls the amount of ease at your waist"},"buttons":{"t":"Number of buttons","d":"Controls the amount of buttons"},"buttons.1":{"t":"One button","d":"Draft a pattern with only one single button"},"buttons.2":{"t":"Two buttons","d":"Draft a pattern with two buttons"},"buttons.3":{"t":"Three buttons","d":"Draft a pattern with three buttons"},"collarRoll":{"t":"Collar roll","d":"Controls the amount of roll in the collar; how much the topcollar is higher than the undercollar."}}}')},nr=JSON.parse('{"id":"jaeger","name":"Jaeger jacket","code":"Joost De Cock","description":"A FreeSewing pattern for a sport coat style jacket","design":"Joost De Cock","difficulty":5,"tags":["tops","coats"],"techniques":["hem","pocket","curved-seam","precision","set-sleeve","welt-pocket","lining","interfacing","button"],"version":"4.6.0","pkg":"@freesewing/jaeger","collection":true}'),sr=(t,e=!1)=>{let{points:o,Point:a,paths:i,Path:n}=t.shorthand();if(o.bsArmholeHollow=o.armholeHollow.clone(),o.bsArmholeHollowCp2=o.armholeHollowCp2.rotate(90,o.armholeHollow),o.bsWaist=new a(o.bsArmholeHollowCp2.x,o.waist.y),o.bsHips=new a(o.bsWaist.x,o.hips.y),o.bsHem=new a(o.bsWaist.x,o.hem.y),e){o.bsArmholeHollowCp1=o.armholeHollowCp1.clone(),o.bsArmholeCp2=o.armholeCp2.clone();for(let t of["bsArmholeHollow","bsArmholeHollowCp2","bsWaist","bsHips","bsHem","bsArmholeHollowCp1","bsArmholeCp2"])o[t]=o[t].flipX(o.armhole)}i.bs=(new n).move(o.bsHem).line(o.bsWaist)._curve(o.bsArmholeHollowCp2,o.bsArmholeHollow).attr("class","stroke-xl lining lashed"),e&&i.bs.curve(o.bsArmholeHollowCp1,o.bsArmholeCp2,o.armhole)},rr={pct:35,min:25,max:55,menu:"sleeves"},lr={pct:18,min:10,max:26,menu:"sleeves"},cr={pct:14,min:8,max:25,menu:"fit"},pr={pct:12,min:8,max:20,menu:"fit"},dr={count:1,min:0,max:2,menu:"style"},hr={pct:35,min:15,max:100,menu:"style"},mr={pct:6,min:5,max:9,menu:"collar"};const fr={name:"jaeger.backBase",measurements:["hips","waist"],from:N,hide:n.V9.HIDE_ALL,options:{centerBackDart:{pct:.5,min:0,max:1.5,menu:"fit"},hipsEase:pr,waistEase:cr,rollLineCollarHeight:mr,reduceWaistStandardFraction:.08,reduceWaistDartFraction:.05,reduceHipsStandardFraction:.1,lengthBonus:{pct:19,min:10,max:25,menu:"fit"}},draft:function({store:t,points:e,measurements:o,options:a,Point:i,paths:n,Path:s,part:r}){return(t=>{let{store:e,measurements:o,options:a}=t.shorthand();2*a.collarHeight<a.rollLineCollarHeight&&(a.rollLineCollarHeight=2*a.collarHeight),e.set("chest",o.chest*(1+a.chestEase)),e.set("waist",o.waist*(1+a.waistEase)),e.set("hips",o.hips*(1+a.hipsEase)),e.set("waistReduction",e.get("chest")-e.get("waist")),e.set("hipsReduction",e.get("chest")-e.get("hips"))})(r),e.cbChest=new i(0,e.armholePitchCp1.y),a.centerBackDart>0&&(e.cbChestCp1=e.cbChest.shiftFractionTowards(e.cbNeck,.5),e.cbNeck=e.cbNeck.shift(0,o.chest*a.centerBackDart)),e.cbChestCp2=e.cbChest.shift(-90,e.cbChest.dy(e.cbWaist)/3),e.cbWaist=e.cbWaist.shift(0,t.get("waistReduction")*a.reduceWaistStandardFraction),e.cbWaistCp1=e.cbWaist.shift(90,e.cbChest.dy(e.cbWaist)/3),e.cbHips=e.cbHips.shift(0,t.get("hipsReduction")*a.reduceHipsStandardFraction),e.cbHem=e.cbHem.shift(0,t.get("hipsReduction")*a.reduceHipsStandardFraction),e.cbWaistCp2=e.cbWaist.shift(-90,e.cbWaist.dy(e.cbHips)/3),e.cbHipsCp1=e.cbHips.shift(90,e.cbWaist.dy(e.cbHips)/3),sr(r),e.waist=e.bsWaist.shift(180,t.get("waistReduction")*a.reduceWaistStandardFraction),e.waistCp2=e.waist.shift(90,e.cbChest.dy(e.waist)/3),e.hips=e.bsHips.shift(180,t.get("hipsReduction")*a.reduceHipsStandardFraction),e.waistCp1=e.waist.shift(-90,e.waist.dy(e.hips)/3),e.hipsCp2=e.hips.shift(90,e.waist.dy(e.hips)/3),e.hem=new i(e.hips.x,e.hem.y),t.set("backCollarLength",(new s).move(e.cbNeck)._curve(e.neckCp2,e.neck).length()),n.cb=(new s).move(e.cbNeck),a.centerBackDart>0?n.cb._curve(e.cbChestCp1,e.cbChest):n.cb.line(e.cbChest),n.cb.curve(e.cbChestCp2,e.cbWaistCp1,e.cbWaist).curve(e.cbWaistCp2,e.cbHipsCp1,e.cbHips).line(e.cbHem).attr("class","stroke-xl lining"),n.bss=(new s).move(e.armholeHollow).curve(e.bsArmholeHollowCp2,e.waistCp2,e.waist).curve(e.waistCp1,e.hipsCp2,e.hips).line(e.hem).attr("class","stroke-xl lining"),r}};const ur={name:"jaeger.frontBase",measurements:["hips","waist"],from:I,hide:n.V9.HIDE_ALL,options:{hipsEase:pr,waistEase:cr,centerFrontHemDrop:{pct:2,min:0,max:4,menu:"style"},frontPocketPlacement:{pct:75,min:65,max:85,menu:"pockets"},frontPocketWidth:{pct:68,min:55,max:75,menu:"pockets"},frontPocketDepth:{pct:110,min:80,max:130,menu:"pockets"},frontPocketRadius:{pct:10,min:0,max:50,menu:"pockets"},frontDartPlacement:{pct:55,min:45,max:60,menu:"advanced"},sideFrontPlacement:{pct:85,min:80,max:90,menu:"advanced"},rollLineCollarHeight:mr,reduceWaistStandardFraction:.08,reduceWaistDartFraction:.05,reduceHipsStandardFraction:.1,s3Collar:0,s3Armhole:0},draft:function({store:t,points:e,utils:o,options:a,Point:i,paths:n,Path:s,part:r}){sr(r,!0),n.pathToSplit=(new s).move(e.armhole).curve(e.armholeCp2,e.armholeHollowCp1,e.armholeHollow).attr("class","lining stroke-xl"),e.split=n.pathToSplit.shiftFractionAlong(.5);let l=n.pathToSplit.split(e.split);n.split1=l.pop().attr("class","lining stroke-xxl"),n.split2=l.pop().attr("class","canvas stroke-xxl"),e.splitCp2=n.split1.ops[1].cp1,e.armholeHollowCp1=n.split1.ops[1].cp2,e.sideArmholeCp2=n.split2.ops[1].cp1,e.sideSplitCp1=n.split2.ops[1].cp2,e.fsArmhole=e.split.clone(),e.fsWaist=new i(e.waist.x*a.sideFrontPlacement,e.waist.y),e.fsWaistCp2=e.fsWaist.shift(90,e.split.dy(e.waist)/2),e.fsHips=new i(e.fsWaist.x,e.hips.y),e.fsHem=ne
1w i(e.fsWaist.x,e.hem.y),n.fs=(new s).move(e.fsHem).line(e.fsWaist).curve_(e.fsWaistCp2,e.fsArmhole).attr("class","stroke-xl lining lashed"),e.waist=e.fsWaist.shift(180,t.get("waistReduction")*a.reduceWaistStandardFraction),e.waistCp2=new i(e.waist.x,e.fsWaistCp2.y),e.hips=e.fsHips.shift(180,t.get("hipsReduction")*a.reduceHipsStandardFraction),e.waistCp1=e.waist.shift(-90,e.waist.dy(e.hips)/3),e.hipsCp2=e.hips.shift(90,e.waist.dy(e.hips)/3),e.hem=new i(e.hips.x,e.hem.y),e.sideHips=e.hips.flipX(e.fsWaist),e.sideHem=e.hem.flipX(e.fsWaist),e.sideWaist=e.waist.flipX(e.fsWaist),e.sideWaistCp1=e.waistCp1.flipX(e.fsWaist),e.sideWaistCp2=e.waistCp2.flipX(e.fsWaist),e.sideHipsCp2=e.hipsCp2.flipX(e.fsWaist);let c=(new s).move(e.hem).line(e.hips).curve(e.hipsCp2,e.waistCp1,e.waist).curve_(e.waistCp2,e.split).length(),p=(new s).move(e.sideHem).line(e.sideHips).curve(e.sideHipsCp2,e.sideWaistCp1,e.sideWaist).curve_(e.sideWaistCp2,e.split).length();e.sideArmhole=e.armhole.shift(90,c-p),e.sideArmholeCp2=e.sideArmholeCp2.shift(90,c-p),e.bsArmholeCp2=e.bsArmholeCp2.shift(90,c-p),e.bsWaist=e.bsWaist.shift(180,t.get("waistReduction")*a.reduceWaistStandardFraction),e.bsWaistCp2=new i(e.bsWaist.x,e.sideWaistCp2.y),e.bsWaistCp1=new i(e.bsWaist.x,e.sideWaistCp1.y),e.bsHips=e.bsHips.shift(180,t.get("hipsReduction")*a.reduceHipsStandardFraction),e.bsHipsCp2=new i(e.bsHips.x,e.sideHipsCp2.y),e.bsHem=new i(e.bsHips.x,e.sideHem.y),e.cfHem=e.cfHem.shift(-90,e.cfHem.y*a.centerFrontHemDrop),e.hemDropEnd=e.hem.shift(0,e.sideHem.dx(e.bsHem)),e.hem=o.beamsIntersect(e.cfHem,e.hemDropEnd,e.hips,e.hem),e.sideHem=e.hem.flipX(e.fsHem),e.dart=new i(e.waist.x*a.frontDartPlacement,e.waist.y),e.dartTop=e.dart.shift(90,e.armhole.dy(e.waist)/1.5),e.dartBottom=e.dart.shift(-90,e.waist.dy(e.hips)/1.5),e.dartRight=e.dart.shift(0,t.get("waistReduction")*a.reduceWaistDartFraction),e.dartLeft=e.dartRight.flipX(e.dart),e.dartRightCpTop=e.dartRight.shift(90,e.dartTop.dy(e.dart)/3),e.dartLeftCpTop=e.dartRightCpTop.flipX(e.dart),e.dartRightCpBottom=e.dartRight.shift(-90,e.dart.dy(e.dartBottom)/3),e.dartLeftCpBottom=e.dartRightCpBottom.flipX(e.dart),e.frontPocketAnchor=new i(e.hips.x*a.frontPocketPlacement,e.dartRightCpBottom.y);let d=e.hips.x*a.frontPocketWidth,h=d*a.frontPocketDepth;return e.frontPocketTopLeft=e.frontPocketAnchor.shift(180,d/2),e.frontPocketTopRight=e.frontPocketTopLeft.flipX(e.frontPocketAnchor),e.frontPocketBottomLeft=e.frontPocketTopLeft.shift(-90,h),e.frontPocketBottomRight=e.frontPocketBottomLeft.flipX(e.frontPocketAnchor),t.set("pocketWidth",d),t.set("pocketDepth",h),e.frontPocketTopEnd=o.curveIntersectsY(e.waist,e.waistCp1,e.hipsCp2,e.hips,e.frontPocketTopLeft.y),e.frontPocketBottomEnd=o.beamIntersectsY(e.hips,e.hem,e.frontPocketBottomLeft.y),n.dart=(new s).move(e.dartRight).curve_(e.dartRightCpTop,e.dartTop)._curve(e.dartLeftCpTop,e.dartLeft).curve_(e.dartLeftCpBottom,e.dartBottom)._curve(e.dartRightCpBottom,e.dartRight).close(),n.frontShaping=(new s).move(e.hem).line(e.hips).curve(e.hipsCp2,e.waistCp1,e.waist).curve_(e.waistCp2,e.split)._curve(e.sideWaistCp2,e.sideWaist).curve(e.sideWaistCp1,e.sideHipsCp2,e.sideHips).line(e.sideHem).attr("class","stroke-xxl various lashed"),n.sideShaping=(new s).move(e.bsHem).line(e.bsHips).curve(e.bsHipsCp2,e.bsWaistCp1,e.bsWaist).curve_(e.bsWaistCp2,e.bsArmholeHollow).attr("class","stroke-xl facing lashed"),r}};const gr={name:"jaeger.side",from:ur,after:fr,options:{backVent:dr,backVentLength:hr},draft:function({sa:t,snippets:e,Snippet:o,store:a,utils:i,points:n,measurements:s,options:r,macro:l,paths:c,Path:p,part:d}){if(2===Number(r.backVent)){let t=n.bsHips.y-n.bsWaistCp1.dy(n.bsHips)*r.backVentLength;n.ventStart=i.curveIntersectsY(n.bsHips,n.bsHipsCp2,n.bsWaistCp1,n.bsWaist,t),c.ventBase=(new p).move(n.bsWaist).curve(n.bsWaistCp1,n.bsHipsCp2,n.bsHips).split(n.ventStart).pop().line(n.bsHem),c.vent=c.ventBase.offset(s.neck/-10),n.ventSlopeStart=i.lineIntersectsCurve(c.vent.start(),c.vent.start().shift(170,s.neck/5),n.bsHips,n.bsHipsCp2,n.bsWaistCp1,n.bsWaist),n.ventHem=i.beamIntersectsX(n.sideHem,c.vent.end(),c.vent.end().flipX(n.bsHem).x).flipX(n.bsHem)}for(let h of Object.keys(c))"vent"!==h&&delete c[h];for(let h of Object.keys(e))delete e[h];return n.anchor=n.sideHem.clone(),c.hemBase=(new p).move(n.sideHem).line(n.bsHem),Number(2===r.backVent)?(c.hemBase.line(n.ventHem).line(c.vent.end()),c.saBase=c.vent.clone().reverse().line(n.ventSlopeStart).join((new p).move(n.bsHips).curve(n.bsHipsCp2,n.bsWaistCp1,n.bsWaist).split(n.ventSlopeStart).pop())):c.saBase=(new p).move(n.bsHem).line(n.bsHips).curve(n.bsHipsCp2,n.bsWaistCp1,n.bsWaist),c.saBase=c.saBase.curve_(n.bsWaistCp2,n.bsArmholeHollow).curve(n.bsArmholeHollowCp1,n.bsArmholeCp2,n.sideArmhole).curve(n.sideArmholeCp2,n.sideSplitCp1,n.fsArmhole)._curve(n.sideWaistCp2,n.sideWaist).curve(n.sideWaistCp1,n.sideHipsCp2,n.sideHips).line(n.sideHem),c.seam=c.saBase.clone().join(c.hemBase).close().attr("class","fabric"),t&&(c.sa=c.saBase.clone().offset(t).join(c.hemBase.offset(3*t)).close().attr("class","fabric sa")),a.cutlist.setCut([{cut:2,from:"fabric"},{cut:2,from:"lining"}]),n.logo=n.sideHips.shiftFractionTowards(n.bsHips,.5),e.logo=new o("logo",n.logo),e.sideNotchFront=new o("notch",n.sideWaist),e.sideNotchBack=new o("bnotch",n.bsWaist),n.title=n.sideWaistCp2.shiftFractionTowards(n.bsWaistCp2,.5),l("title",{at:n.title,nr:3,title:"side",align:"center"}),l("ld",{id:"wAtWaist",from:n.sideWaist,to:n.bsWaist}),l("hd",{id:"wAtHem",from:n.sideHem,to:n.bsHem,y:n.sideHem.y+3*t+15}),l("hd",{id:"wAtTop",from:n.fsArmhole,to:n.bsArmholeHollow,y:n.bsArmholeHollow.y-t-15}),l("vd",{id:"hBackHemToHips",from:n.bsHem,to:n.bsHips,x:n.bsHips.x+t+15}),l("vd",{id:"hBackHemToWaist",from:n.bsHem,to:n.bsWaist,x:n.bsHips.x+t+30}),l("vd",{id:"hBackHemToArmhole",from:n.bsHem,to:n.bsArmholeHollow,x:n.bsHips.x+t+45}),l("vd",{id:"hFull",from:n.sideHem,to:n.bsArmholeHollow,x:n.bsHips.x+t+60}),l("vd",{from:n.sideHem,id:"hFrontHemToWaist",to:n.sideWaist,x:n.sideHem.x-t-15}),l("vd",{id:"hFrontWaistToArmhole",from:n.sideWaist,to:n.fsArmhole,x:n.sideHem.x-t-15}),d}};const br={name:"jaeger.front",from:ur,after:fr,options:{frontOverlap:{pct:1.5,min:1,max:2,menu:"advanced"},innerPocketPlacement:{pct:52,min:42,max:62,menu:"pockets"},innerPocketWidth:{pct:50,min:45,max:65,menu:"pockets"},innerPocketDepth:{pct:110,min:75,max:140,menu:"pockets"}
1,innerPocketWeltHeight:{pct:3.5,min:2.5,max:5,menu:"pockets"},frontCutawayAngle:{deg:2.5,min:1,max:4,menu:"style"},frontCutawayStart:{pct:30,min:10,max:70,menu:"style"},frontCutawayEnd:{pct:40,min:10,max:40,menu:"style"},hemRadius:{pct:100,min:35,max:100,menu:"style"},chestPocketDepth:{pct:110,min:70,max:150,menu:"pockets"},chestPocketWidth:{pct:37,min:30,max:45,menu:"pockets"},chestPocketPlacement:{pct:52,min:40,max:60,menu:"pockets"},chestPocketAngle:{deg:2.5,min:0,max:7,menu:"pockets"},chestPocketWeltSize:{pct:17.5,min:10,max:25,menu:"pockets"},lapelStart:{pct:10,min:0,max:35,menu:"style"},collarHeight:{pct:9,min:7,max:10,menu:"collar"},collarNotchDepth:{pct:15,min:15,max:50,menu:"collar"},collarNotchAngle:{deg:45,min:30,max:60,menu:"collar"},collarNotchReturn:{pct:100,min:50,max:100,menu:"collar"},chestShaping:{pct:30,min:0,max:100,menu:"advanced"},buttons:{list:["1","2","3"],dflt:"2",menu:"style"},buttonLength:{pct:30,min:30,max:60,menu:"style"},chestShapingMax:5,lapelReduction:{pct:5,min:0,max:10,menu:"style"}},draft:function({sa:t,snippets:e,Snippet:o,utils:a,store:i,complete:n,points:s,measurements:r,options:l,macro:c,Point:p,paths:d,Path:h,part:m}){s.neckEdge=s.cfNeck.shift(180,r.chest*l.frontOverlap),s.hemEdge=new p(s.neckEdge.x,s.cfHem.y),s.chestPocketAnchor=new p(s.split.x*l.chestPocketPlacement,s.armholePitchCp1.y);let f=s.split.x*l.chestPocketWidth,u=f*l.chestPocketWeltSize;s.chestPocketTop=s.chestPocketAnchor.shift(90,u/2),s.chestPocketBottom=s.chestPocketAnchor.shift(-90,u/2),s.chestPocketTopLeft=s.chestPocketTop.shift(180+l.chestPocketAngle,f/2),s.chestPocketTopRight=s.chestPocketTopLeft.rotate(180,s.chestPocketTop),s.chestPocketBottomLeft=s.chestPocketBottom.shift(180+l.chestPocketAngle,f/2),s.chestPocketBottomRight=s.chestPocketBottomLeft.rotate(180,s.chestPocketBottom),i.set("chestPocketWidth",f),i.set("chestPocketWeltHeight",u),s.innerPocketAnchor=new p(s.hips.x*l.innerPocketPlacement,s.dartTop.y),f=s.hips.x*l.innerPocketWidth;const g=f*l.innerPocketWeltHeight;s.innerPocketTop=s.innerPocketAnchor.shift(90,g),s.innerPocketBottom=s.innerPocketAnchor.shift(-90,g),s.innerPocketLeft=s.innerPocketAnchor.shift(180,f/2),s.innerPocketRight=s.innerPocketLeft.flipX(s.innerPocketAnchor),s.innerPocketTopLeft=s.innerPocketLeft.shift(90,g),s.innerPocketTopRight=s.innerPocketTopLeft.flipX(s.innerPocketAnchor),s.innerPocketBottomLeft=s.innerPocketLeft.shift(-90,g),s.innerPocketBottomRight=s.innerPocketBottomLeft.flipX(s.innerPocketAnchor),i.set("innerPocketWeltHeight",g),i.set("innerPocketWidth",f),s.splitEdge=new p(s.neckEdge.x,s.split.y);const b=["splitEdge","neckEdge","cfNeck","cfNeckCp1","neckCp2Front","neck","shoulder","shoulderCp1","armholePitchCp2","armholePitch","armholePitchCp1","armholeHollowCp2","armholeHollow","armholeHollowCp1","splitCp2","frontNeckCpEdge"];for(let L of b)s[L]=s[L].rotate(l.chestShapingMax*l.chestShaping*-1,s.split);s.lapelBreakPoint=new p(s.hemEdge.x,s.dartTop.y*(1+l.lapelStart)),s.cutawayPoint=s.lapelBreakPoint.shift(-90,s.lapelBreakPoint.dy(s.hemEdge)*l.buttonLength);const w=r.neck*l.rollLineCollarHeight;s.shoulderRoll=s.shoulder.shiftOutwards(s.neck,w);const k=r.neck*l.collarHeight;s.shoulderRollCb=s.lapelBreakPoint.shiftOutwards(s.shoulderRoll,i.get("backCollarLength"));let C=s.shoulderRoll.angle(s.shoulderRollCb);s.collarCbHelp=s.shoulderRollCb.shift(C-90,w),s.collarCbBottom=s.collarCbHelp.shift(C-90,w),s.collarCbTop=s.collarCbHelp.shift(C+90,2*k-w),s.notchMax=a.beamsIntersect(s.lapelBreakPoint,s.shoulderRoll,s.neckEdge,s.frontNeckCpEdge),s.lapelTip=a.beamsIntersect(s.hemEdge,s.lapelBreakPoint,s.notchMax,s.cfNeckCp1),s.notchEdge=s.lapelTip.shiftFractionTowards(s.notchMax,l.lapelReduction),s.notch=s.cfNeck.shiftFractionTowards(s.notchMax,l.collarNotchDepth),s.notchTip=s.neckEdge.rotate(-1*l.collarNotchAngle,s.notch),s.notchTip=s.notch.shiftFractionTowards(s.notchTip,l.collarNotchReturn),s.notchTipCp=s.notchTip.shift(s.notch.angle(s.notchTip)-90,s.notchTip.dist(s.collarCbTop)/4),s.collarCbTopCp=s.collarCbTop.shift(s.collarCbBottom.angle(s.collarCbTop)+90,s.notchTip.dist(s.collarCbTop)/4),s.lapelStraightEnd=new p(s.lapelBreakPoint.x,s.splitEdge.y),s.lapelStraightEndCp1=s.lapelStraightEnd.shift(90,.7*s.neckEdge.dy(s.lapelStraightEnd)),C=s.notch.angle(s.neck),s._dir1=s.notch.shift(C/2,50),s._dir2=s.neck.shift(1.5*C+180,50),s.collarCorner=s.notch.shiftFractionTowards(s.notchMax,1.6);const v=a.linesIntersect(s.shoulderRoll,s.lapelBreakPoint,s.notch,s.collarCorner);if(!v)throw new Error("Roll line does not intersect with notch/collarCorner line");s.shoulderRoll=v,s.hemRoundTarget=new p(s.hem.x,s.cfHem.y),s.roundStart=s.cutawayPoint.shiftFractionTowards(s.hemEdge,l.frontCutawayStart).rotate(l.frontCutawayAngle,s.cutawayPoint),s.roun
1dEnd=s.hemDropEnd.shiftFractionTowards(s.cfHem,1-l.frontCutawayEnd),s.roundVia=a.beamsIntersect(s.cutawayPoint,s.roundStart,s.hemDropEnd,s.cfHem),s.roundCp1=s.roundStart.shiftFractionTowards(s.roundVia,l.hemRadius),s.roundCp2=s.roundEnd.shiftFractionTowards(s.roundVia,l.hemRadius);const y=s.cutawayPoint.dy(s.roundStart)/3;s.cutawayPointCp2=s.cutawayPoint.shift(-90,y),s.roundStartCp1=s.roundCp1.shiftOutwards(s.roundStart,y),s.facingTop=s.neck.shiftFractionTowards(s.shoulder,.2),s.facingBottom=(new h).move(s.roundStart).curve(s.roundCp1,s.roundCp2,s.roundEnd).line(s.hem).intersectsX(.7*s.dartLeft.x).pop(),s.ipfeAnchor=a.beamsIntersect(s.facingTop,s.facingBottom,s.innerPocketLeft,s.innerPocketRight);const T=5*s.innerPocketTopRight.dy(s.innerPocketBottomRight);s.ipfeTopRight=s.innerPocketRight.shift(90,T/2),s.ipfeBottomRight=s.ipfeTopRight.flipY(s.innerPocketRight),s.ipfeEdge=s.innerPocketRight.shift(0,T/2),s.ipfeViaTopRight=new p(s.ipfeEdge.x,s.ipfeTopRight.y),s.ipfeViaBottomRight=s.ipfeViaTopRight.flipY(s.innerPocketRight);const x={ipfeBottomRight:c("round",{id:"ipfeBottomRight",from:s.ipfeBottomRight,to:s.ipfeEdge,via:s.ipfeViaBottomRight,radius:T/2}),ipfeTopRight:c("round",{id:"ipfeTopRight",from:s.ipfeTopRight,to:s.ipfeEdge,via:s.ipfeViaTopRight,radius:T/2})};for(const L in x)for(const t of["start","cp1","cp2","end"])s[`${L}${a.capitalize(t)}`]=s[x[L].points[t]].copy();s.ipfeStart=a.beamIntersectsY(s.facingTop,s.facingBottom,s.innerPocketAnchor.y-T),s.ipfeEnd=a.beamIntersectsY(s.facingTop,s.facingBottom,s.innerPocketAnchor.y+T),s.ipfeStartEnd=new p(s.ipfeStart.x+T/2,s.innerPocketAnchor.y-T/2),s.ipfeStartVia=new p(s.ipfeStart.x,s.ipfeStartEnd.y),s.ipfeEndEnd=new p(s.ipfeEnd.x+T/2,s.innerPocketAnchor.y+T/2),s.ipfeEndVia=new p(s.ipfeEnd.x,s.ipfeEndEnd.y);const B={ipfeStart:c("round",{id:"ipfeStart",from:s.ipfeStart,to:s.ipfeStartEnd,via:s.ipfeStartVia,radius:T/2}),ipfeEnd:c("round",{id:"ipfeEnd",from:s.ipfeEnd,to:s.ipfeEndEnd,via:s.ipfeEndVia,radius:T/2})};for(const L in B)for(const t of["start","cp1","cp2","end"])s[`${L}${a.capitalize(t)}`]=s[B[L].points[t]].copy();C=s.facingTop.angle(s.facingBottom)+90,s.ipfeStartCp1=s.ipfeStartCp1.rotate(C,s.ipfeStart),s.ipfeEndCp1=s.ipfeEndCp1.rotate(C,s.ipfeEnd);for(let L of Object.keys(d))delete d[L];for(let L of Object.keys(e))delete e[L];d.saBase=(new h).move(s.hem).line(s.hips).curve(s.hipsCp2,s.waistCp1,s.waist).curve_(s.waistCp2,s.split).curve(s.splitCp2,s.armholeHollowCp1,s.armholeHollow).curve(s.armholeHollowCp2,s.armholePitchCp1,s.armholePitch).curve(s.armholePitchCp2,s.shoulderCp1,s.shoulder).line(s.neck).line(s.collarCorner).line(s.notch).line(s.notchEdge)._curve(s.lapelStraightEndCp1,s.lapelStraightEnd).line(s.cutawayPoint).curve(s.cutawayPointCp2,s.roundStartCp1,s.roundStart).curve(s.roundCp1,s.roun
1dCp2,s.roundEnd),d.saBase.hide(),d.hemBase=(new h).move(s.roundEnd).line(s.hem),d.hemBase.hide(),d.seam=d.saBase.clone().join(d.hemBase).attr("class","fabric"),d.dart=(new h).move(s.dartBottom)._curve(s.dartRightCpBottom,s.dartRight).curve_(s.dartRightCpTop,s.dartTop)._curve(s.dartLeftCpTop,s.dartLeft).curve_(s.dartLeftCpBottom,s.dartBottom).close().attr("class","fabric"),t&&(d.sa=d.saBase.offset(t).join(d.hemBase.offset(3*t)).close().attr("class","fabric sa")),n&&(d.flb=(new h).move(s.facingTop).line(s.ipfeStartStart).curve(s.ipfeStartCp1,s.ipfeStartCp2,s.ipfeStartEnd).line(s.ipfeTopRightStart).curve(s.ipfeTopRightCp1,s.ipfeTopRightCp2,s.ipfeTopRightEnd).curve(s.ipfeBottomRightCp2,s.ipfeBottomRightCp1,s.ipfeBottomRightStart).line(s.ipfeEndEnd).curve(s.ipfeEndCp2,s.ipfeEndCp1,s.ipfeEnd).line(s.facingBottom).attr("class","fabric"),c("banner",{id:"flbLining",path:d.flb.reverse(),text:"facingLiningBoundaryLiningSide",classes:"center text-xs fill-lining",dy:5,repeat:24}),c("banner",{id:"flbFacing",path:d.flb.reverse(),text:"facingLiningBoundaryFacingSide",classes:"center text-xs fill-fabric",repeat:24}),d.chestPocket=(new h).move(s.chestPocketTopRight).line(s.chestPocketTopLeft).line(s.chestPocketBottomLeft).line(s.chestPocketBottomRight).line(s.chestPocketTopRight).close().attr("class","fabric dashed"),d.innerPocket=(new h).move(s.innerPocketTopRight).line(s.innerPocketTopLeft).line(s.innerPocketBottomLeft).line(s.innerPocketBottomRight).line(s.innerPocketTopRight).move(s.innerPocketLeft).line(s.innerPocketRight).close().attr("class","fabric dashed"),d.breakLine=(new h).move(s.lapelBreakPoint).line(s.shoulderRoll).attr("class","fabric help"),d.frontPocket=(new h).move(s.frontPocketTopEnd).line(s.frontPocketTopLeft).line(s.frontPocketBottomLeft).line(s.frontPocketBottomEnd).attr("class","fabric dashed"),d.chestPiece=(new h).move(s.lapelBreakPoint).curve(s.cutawayPoint,s.waist,s.fsArmhole).attr("class","canvas help"),c("banner",{id:"chestPiece",path:d.chestPiece,text:"chestPiece",classes:"center text-xs fill-canvas",repeat:42})),i.cutlist.setCut({cut:2,from:"fabric"}),s.logo=new p(s.dartBottom.x,s.hips.y),e.logo=new o("logo",s.logo),c("sprinkle",{snippet:"notch",on:["neck","shoulder","armholePitch","chestPocketBottomLeft","chestPocketBottomRight","lapelBreakPoint","notchMax","notch","innerPocketLeft","innerPocketRight","frontPocketTopLeft","frontPocketBottomLeft","armholeHollow","waist"]}),s.button1=new p(s.cfWaist.x,s.lapelBreakPoint.y);let S=["button1"];l.buttons>1&&(s.button2=new p(s.cfWaist.x,s.cutawayPoint.y),S.push("button2"),3==l.buttons&&(s.button3=s.button1.shiftFractionTowards(s.button2,.5),S.push("button3")));for(let L of S)e[L]=new o("button",s[L]).attr("data-scale",2);return c("grainline",{from:s.cfHips,to:new p(s.cfArmhole.x,s.collarCorner.y)}),c("vd",{id:"hLapelTipToHps",from:s.notchEdge,to:s.neck,x:s.lapelBreakPoint.x-15-t}),c("vd",{id:"hLapelBreakToLapelTip",from:s.lapelBreakPoint,to:s.notchEdge,x:s.lapelBreakPoint.x-15-t}),c("vd",{id:"hBetweenButtons",from:s.cutawayPoint,to:s.lapelBreakPoint,x:s.lapelBreakPoint.x-15-t}),c("vd",{id:"hHemToLapelBreakPoint",from:s.facingBottom,to:s.cutawayPoint,x:s.lapelBreakPoint.x-15-t}),c("vd",{id:"hHemToLapelTip",from:s.facingBottom,to:s.notchEdge,x:s.lapelBreakPoint.x-30-t}),c("vd",{id:"hFull",from:s.facingBottom,to:s.neck,x:s.lapelBreakPoint.x-45-t}),c("hd",{id:"wLapelTipToRollLineTop",from:s.notchEdge,to:s.notchMax,y:s.notchEdge.y-15-t}),c("hd",{id:"hLapelTipToCollarNotch",from:s.notchEdge,to:s.collarCorner,y:s.notchEdge.y-30-t}),c("hd",{id:"wLapelTipToHps",from:s.notchEdge,to:s.neck,y:s.neck.y-15-t}),c("hd",{id:"hLapelStartToHps",from:s.lapelStraightEnd,to:s.neck,y:s.neck.y-30-t}),c("hd",{id:"wLapelStartToArmholePitch",from:s.lapelStraightEnd,to:s.armholePitch,y:s.neck.y-45-t}),c("hd",{id:"wLaperTipToShoulder",from:s.lapelStraightEnd,to:s.shoulder,y:s.neck.y-60-t}),c("hd",{id:"wFull",from:s.lapelStraightEnd,to:s.fsArmhole,y:s.neck.y-75-t}),c("ld",{id:"lShoulderSeam",from:s.neck,to:s.shoulder,d:-15}),c("ld",{id:"lCollarNotchToHps",from:s.collarCorner,to:s.neck,d:-15}),c("ld",{id:"wEdgeToButton",from:s.lapelBreakPoint,to:s.button1,d:-15}),c("hd",{id:"wEdgeToInnerPocket",from:s.lapelBreakPoint,to:s.innerPocketTopLeft,y:s.innerPocketTopLeft.y-35}),c("hd",{id:"wInnerPocket",from:s.innerPocketTopLeft,to:s.innerPocketTopRight,y:s.innerPocketTopLeft.y-35}),c("hd",{id:"wEdgeToFacingEdge",from:s.lapelBreakPoint,to:s.ipfeTopRightEnd,y:s.innerPocketTopLeft.y-50}),c("vd",{from:s.ipfeBottomRightStart,id:"hInnerPocketFacingHeight",to:s.ipfeTopRightStart,x:s.ipfeTopRightEnd.x+15}),c("vd",{id:"hInnerPocketWelt",from:s.innerPocketBottomRight,to:s.innerPocketTopRight,x:s.innerPocketTopRight.x-1
15}),c("hd",{id:"wEdgeToDartTip",from:s.lapelBreakPoint,to:s.dartTop,y:s.dartTop.y+15}),c("ld",{id:"wDart",from:s.dartLeft,to:s.dartRight}),c("vd",{id:"hDart",from:s.dartBottom,to:s.dartTop,x:s.dartRight.x+15}),c("hd",{id:"wEdgeToFlbBottom",from:s.lapelBreakPoint,to:s.facingBottom,y:s.facingBottom.y+15+t}),c("hd",{id:"EdgeToDart",from:s.lapelBreakPoint,to:s.roundEnd,y:s.facingBottom.y+15+3*t}),c("hd",{id:"wEdgeToHemWaist",from:s.lapelBreakPoint,to:s.hem,y:s.facingBottom.y+30+3*t}),c("vd",{id:"hHemToHip",from:s.hem,to:s.hips,x:s.hem.x+15+t}),c("vd",{id:"hHemToDartBottom",from:s.hem,to:s.dartBottom,x:s.hem.x+30+t}),c("vd",{id:"hHemToWaist",from:s.hem,to:s.waist,x:s.hem.x+45+t}),c("vd",{id:"hHemToInnerPocket",from:s.hem,to:s.innerPocketRight,x:s.hem.x+60+t}),c("vd",{id:"hHemToArmhole",from:s.hem,to:s.fsArmhole,x:s.hem.x+75+t}),c("vd",{id:"hArmholeToArmholePitch",from:s.fsArmhole,to:s.armholePitch,x:s.fsArmhole.x+15+t}),c("vd",{id:"hArmholeToShoulder",from:s.fsArmhole,to:s.shoulder,x:s.fsArmhole.x+30+t}),c("vd",{id:"hArmholeToHps",from:s.fsArmhole,to:s.neck,x:s.fsArmhole.x+45+t}),c("hd",{id:"wEdgeToPocket",from:s.cutawayPoint,to:s.frontPocketTopLeft,y:s.frontPocketTopLeft.y-15}),c("vd",{id:"hPocket",from:s.frontPocketBottomLeft,to:s.frontPocketTopLeft,x:s.frontPocketTopLeft.x-15}),c("vd",{id:"hArmholeToChestPocket",from:s.fsArmhole,to:s.chestPocketBottomLeft,x:s.chestPocketBottomLeft.x-15}),s.cfWaist=new p(s.button1.x,s.waist.y),c("ld",{from:s.cfWaist,to:s.dartLeft,id:"wButtonToDart"}),c("ld",{from:s.dartRight,to:s.waist,id:"wDartToSide"}),m}};const wr={name:"jaeger.back",from:fr,options:{backVent:dr,backVentLength:hr},draft:function({sa:t,snippets:e,Snippet:o,utils:a,store:i,points:n,measurements:s,options:r,macro:l,Point:c,paths:p,Path:d,part:h}){const m=n.cbHips.y-n.cbWaistCp2.dy(n.cbHips)*r.backVentLength;1===Number(r.backVent)?(n.ventStart=a.curveIntersectsY(n.cbHips,n.cbHipsCp1,n.cbWaistCp2,n.cbWaist,m),p.ventBase=(new d).move(n.cbWaist).curve(n.cbWaistCp2,n.cbHipsCp1,n.cbHips).split(n.ventStart).pop().line(n.cbHem),p.vent=p.ventBase.offset(s.neck/10),p.vent.hide(),n.ventSlopeStart=a.lineIntersectsCurve(p.vent.start(),p.vent.start().shift(10,s.neck/5),n.cbHips,n.cbHipsCp1,n.cbWaistCp2,n.cbWaist)):2===Number(r.backVent)&&(n.ventStart=a.curveIntersectsY(n.hips,n.hipsCp2,n.waistCp1,n.waist,m),p.ventBase=(new d).move(n.waist).curve(n.waistCp1,n.hipsCp2,n.hips).split(n.ventStart).pop().line(n.hem),p.vent=p.ventBase.offset(s.neck/-10),p.vent.hide(),n.ventSlopeStart=a.lineIntersectsCurve(p.vent.start(),p.vent.start().shift(170,s.neck/5),n.hips,n.hipsCp2,n.waistCp1,n.waist)),i.set("shoulderSlope",Math.abs(n.neck.angle(n.shoulder)-360));for(let f of Object.keys(p))"vent"!==f&&delete p[f];for(let f of Object.keys(e))delete e[f];return 2===Number(r.backVent)?(p.saBase=p.vent.clone().reverse().line(n.ventSlopeStart).join((new d).move(n.hips).curve(n.hipsCp2,n.waistCp1,n.waist).split(n.ventSlopeStart).pop()),p.saBase.unhide()):p.saBase=(new d).move(n.hem).line(n.hips).curve(n.hipsCp2,n.waistCp1,n.waist),p.saBase.curve(n.waistCp2,n.bsArmholeHollowCp2,n.bsArmholeHollow).curve(n.armholeHollowCp2,n.armholePitchCp1,n.armholePitch).curve(n.armholePitchCp2,n.shoulderCp1,n.shoulder).line(n.neck).curve_(n.neckCp2,n.cbNeck),r.centerBackDart>0?p.saBase=p.saBase._curve(n.cbChestCp1,n.cbChest):p.saBase=p.saBase.line(n.cbChest),p.saBase=p.saBase.curve(n.cbChestCp2,n.cbWaistCp1,n.cbWaist),1===Number(r.backVent)?p.saBase=p.saBase.join((new d).move(n.cbWaist).curve(n.cbWaistCp2,n.cbHipsCp1,n.cbHips).line(n.cbHem).split(n.ventSlopeStart).shift()).line(p.vent.start()).join(p.vent):p.saBase.curve(n.cbWaistCp2,n.cbHipsCp1,n.cbHips).line(n.cbHem),p.saBase.hide(),2===Number(r.backVent)?p.hemBase=(new d).move(n.cbHem).line(p.vent.end()):1===Number(r.backVent)?p.hemBase=(new d).move(p.vent.end()).line(n.hem):p.hemBase=(new d).move(n.cbHem).line(n.hem),p.hemBase.hide(),p.seam=p.saBase.join(p.hemBase).attr("class","fabric"),t&&(p.sa=p.saBase.offset(t).join(p.hemBase.offset(3*t)).close().attr("class","fabric sa")),n.logo=new c(n.title.x,n.armholeHollow.y),e.logo=new o("logo",n.logo),l("sprinkle",{snippet:"notch",on:["neck","shoulder","armholePitch","cbWaist","waist"]}),l("grainline",{from:new c(n.neck.x,n.hips.y),to:n.neck}),l("hd",{id:"wcBNecktoHps",from:n.cbNeck,to:n.neck,y:n.neck.y-15-t}),l("hd",{id:"wcBChesttoHps",from:n.cbChest,to:n.neck,y:n.neck.y-30-t}),l("hd",{id:"wCbChestToArmholePitch",from:n.cbChest,to:n.armholePitch,y:n.neck.y-45-t}
1),l("hd",{id:"wCbChestToShoulder",from:n.cbChest,to:n.shoulder,y:n.neck.y-60-t}),l("hd",{id:"wCbChestToArmhole",from:n.cbChest,to:n.bsArmholeHollow,y:n.neck.y-75-t}),l("vd",{id:"hArmholeToArmholePitch",from:n.bsArmholeHollow,to:n.armholePitch,x:n.bsArmholeHollow.x+t+15}),l("vd",{id:"hArmholeToShoulder",from:n.bsArmholeHollow,to:n.shoulder,x:n.bsArmholeHollow.x+t+30}),l("vd",{id:"hHemToHips",from:n.hem,to:n.hips,x:n.hem.x+t+15}),l("vd",{id:"hHemToWaist",from:n.hem,to:n.waist,x:n.hem.x+t+30}),l("vd",{id:"hHemToArmhole",from:n.hem,to:n.bsArmholeHollow,x:n.hem.x+t+45}),Number(r.backVent)>0&&(l("hd",{id:"wVent",from:p.vent.start(),to:n.ventSlopeStart,y:n.ventSlopeStart.y+25}),l("hd",{id:"wAtHem",from:p.vent.end(),to:n.hem,y:n.hem.y+3*t+15}),l("vd",{id:"hVentTip",from:p.vent.end(),to:p.vent.start(),x:p.vent.end().x-t-15}),l("vd",{id:"hVentFull",from:p.vent.end(),to:n.ventSlopeStart,x:p.vent.end().x-t-30}),l("vd",{id:"hHemToWaist2",from:p.vent.end(),to:n.cbWaist,x:p.vent.end().x-t-45}),l("vd",{id:"hHemToChest",from:p.vent.end(),to:n.cbChest,x:p.vent.end().x-t-60}),l("vd",{id:"hHemToCbNeck",from:p.vent.end(),to:n.cbNeck,x:p.vent.end().x-t-75}),l("vd",{id:"hFull",from:p.vent.end(),to:n.neck,x:p.vent.end().x-t-90})),l("ld",{id:"wAtWaist",from:n.cbWaist,to:n.waist}),l("ld",{id:"lShoulderSeam",from:n.neck,to:n.shoulder,d:-15}),h}};const kr={name:"jaeger.collarStand",from:br,after:wr,options:{collarSpread:{deg:13,min:5,max:35,menu:"collar"}},draft:function({sa:t,store:e,points:o,measurements:a,options:i,macro:n,snippets:s,paths:r,Path:l,part:c}
1){const p=["notch","notchTip","collarCorner","neck","shoulderRoll","shoulderRollCb","collarCbTop","collarCbHelp","collarCbBottom","lapelBreakPoint"];for(const h of Object.keys(o))-1===p.indexOf(h)&&delete o[h];for(const h of Object.keys(r))delete r[h];o.collarstandCbBottom=o.collarCorner.shiftOutwards(o.neck,1.1*e.get("backCollarLength")).rotate(e.get("shoulderSlope"),o.neck),o.collarstandCbBottom=(new l).move(o.collarCorner)._curve(o.neck,o.collarstandCbBottom).shiftAlong(e.get("backCollarLength")+o.collarCorner.dist(o.neck)),o.collarCbTopDirection=o.neck.rotate(-90,o.collarstandCbBottom),o.collarCbTop=o.collarstandCbBottom.shiftTowards(o.collarCbTopDirection,a.neck*i.collarHeight*2);let d=-1*o.collarstandCbBottom.angle(o.neck);for(const h of Object.keys(o))o[h]=o[h].rotate(d,o.neck);o.collarstandCbTop=o.collarstandCbBottom.shiftFractionTowards(o.collarCbTop,.3),o.collarstandCbTopCp=o.collarstandCbTop.shift(o.collarstandCbBottom.angle(o.neck),o.collarstandCbBottom.dist(o.neck)),o.notch=o.notch.rotate(i.collarSpread,o.collarCorner),o.notchTip=o.notchTip.rotate(i.collarSpread,o.collarCorner),o.shoulderRoll=o.shoulderRoll.rotate(i.collarSpread,o.collarCorner),o.collarstandTip=o.collarCorner.shiftFractionTowards(o.shoulderRoll,.6),o.collarCbTopCp=o.collarCbTop.shift(0,.6*o.collarCbTop.dx(o.notchTip)),o.leftCollarCorner=o.collarCorner.flipX(o.collarCbTop),o.leftCollarstandTip=o.collarstandTip.flipX(o.collarCbTop),o.leftNeck=o.neck.flipX(o.collarCbTop),o.leftCollarstandCbTopCp=o.collarstandCbTopCp.flipX(o.collarCbTop);for(const h of Object.keys(r))delete r[h];for(const h of Object.keys(s))delete s[h];return r.seam=(new l).move(o.collarCorner)._curve(o.neck,o.collarstandCbBottom).curve_(o.leftNeck,o.leftCollarCorner).line(o.leftCollarstandTip)._curve(o.leftCollarstandCbTopCp,o.collarstandCbTop).curve_(o.collarstandCbTopCp,o.collarstandTip).line(o.collarCorner).close().attr("class","fabric"),t&&(r.sa=r.seam.offset(t).attr("class","fabric sa")),e.cutlist.setCut({cut:1,from:"fabric"}),n("sprinkle",{snippet:"notch",on:["collarstandCbBottom","collarstandCbTop"]}),o.title=o.collarstandCbTop.shiftFractionTowards(o.collarCbBottom,.5),n("title",{at:o.title,nr:8,title:"collarstand"}),n("grainline",{from:o.collarstandCbTop,to:o.collarstandCbBottom}),n("hd",{id:"wAtTop",from:o.leftCollarCorner,to:o.collarCorner,y:o.collarstandCbBottom.y-t-15}),n("hd",{id:"wFull",from:o.leftCollarstandTip,to:o.collarstandTip,y:o.collarstandTip.y+t+15}),n("vd",{id:"hAtSide",from:o.collarstandTip,to:o.collarCorner,x:o.collarstandTip.x+t+15}),n("vd",{id:"hFull",from:o.collarstandTip,to:o.collarstandCbBottom,x:o.collarstandTip.x+t+30}),n("vd",{id:"hCenter",from:o.collarstandCbTop,to:o.collarstandCbBottom,x:o.collarstandCbTop.x+15}),c}};const Cr={name:"jaeger.collar",from:kr,options:{collarRoll:{pct:5,min:0,max:10,menu:"collar"}},draft:function({sa:t,snippets:e,points:o,options:a,macro:i,paths:n,Path:s,store:r,part:l}){r.set("collarRoll",o.collarstandCbTop.dist(o.collarCbTop)*a.collarRoll),o.collarCbTopRoll=o.collarCbTop.shift(-90,r.get("collarRoll")),o.collarCbTopCpRoll=o.collarCbTopCp.shift(-90,r.get("collarRoll")),o.notchTipRoll=o.notch.shiftOutwards(o.notchTip,r.get("collarRoll"));
1let c=["collarstandCbTopCp","collarstandTip","notch","notchTip","collarCbTopCp","notchTipRoll","collarCbTopCpRoll"];for(let p of c)o[p+"Left"]=o[p].flipX(o.collarCbTop);for(let p of Object.keys(n))delete n[p];for(let p of Object.keys(e))delete e[p];return n.seam=(new s).move(o.collarstandCbTop).curve_(o.collarstandCbTopCpLeft,o.collarstandTipLeft).line(o.notchLeft).line(o.notchTipRollLeft)._curve(o.collarCbTopCpRollLeft,o.collarCbTopRoll).curve_(o.collarCbTopCpRoll,o.notchTipRoll).line(o.notch).line(o.collarstandTip)._curve(o.collarstandCbTopCp,o.collarstandCbTop).close().attr("class","fabric"),n.roll=(new s).move(o.notchTip)._curve(o.collarCbTopCp,o.collarCbTop).curve_(o.collarCbTopCpLeft,o.notchTipLeft).attr("class","stroke-sm dashed"),t&&(n.sa=n.seam.offset(t).attr("class","fabric sa")),r.cutlist.setCut({cut:1,from:"fabric"}),i("sprinkle",{snippet:"notch",on:["collarstandCbTop","notchTip","notchTipLeft"]}),o.title=o.collarstandCbTopCp.shiftFractionTowards(o.collarCbTopCpRoll,.5),i("title",{at:o.title,nr:7,title:"collar"}),i("grainline",{from:o.collarCbTopRoll,to:o.collarstandCbTop}),i("hd",{id:"wAtTop",from:o.collarstandTipLeft,to:o.collarstandTip,y:o.collarstandCbTop.y-t-15}),i("hd",{id:"Full",from:o.notchLeft,to:o.notch,y:o.collarstandCbTop.y-t-30}),i("hd",{id:"wAtBottom",from:o.notchTipRollLeft,to:o.notchTipRoll,y:o.notchTipRoll.y+t+15}),i("hd",{from:o.notchTipLeft,to:o.notchTip,y:o.notchTipRoll.y+t+30}),i("vd",{id:"hAtCenter",from:o.collarCbTopRoll,to:o.collarstandCbTop,x:o.collarCbTopRoll.x+15}),i("ld",{id:"lTopSide",from:o.notch,to:o.collarstandTip,d:-1*t-15}),i("ld",{id:"lBottomSideNarrow",from:o.notchTip,to:o.notch,d:-15-t}),i("ld",{id:"lBottomSideFull",from:o.notchTipRoll,to:o.notch,d:-30-t}),i("vd",{id:"hFull",from:o.notchTipRoll,to:o.collarstandCbTop,x:o.notch.x+t+40}),l}};const vr={name:"jaeger.underCollar",from:Cr,draft:function({sa:t,snippets:e,points:o,macro:a,store:i,paths:n,Path:s,part:r}){for(let l of Object.keys(n))delete n[l];for(let l of Object.keys(e))delete e[l];return n.seam=(new s).move(o.collarCorner)._curve(o.neck,o.collarstandCbBottom).curve_(o.leftNeck,o.leftCollarCorner).line(o.notchLeft).line(o.notchTipRollLeft)._curve(o.collarCbTopCpRollLeft,o.collarCbTopRoll).curve_(o.collarCbTopCpRoll,o.notchTipRoll).line(o.notch).line(o.collarCorner).close().attr("class","various"),t&&(n.partialSa1=(new s).move(o.leftCollarCorner).line(o.notchLeft).line(o.notchTipRollLeft).offset(t).hide(),n.partialSa2=(new s).move(o.notchTipRoll).line(o.notch).line(o.collarCorner).offset(t).hide(),n.sa1=(new s).move(o.leftCollarCorner).join(n.partialSa1).line(o.notchTipRollLeft).attr("class","various sa"),n.sa2=(new s).move(o.notchTipRoll).join(n.partialSa2).line(o.collarCorner).attr("class","various sa")),i.cutlist.setCut([{cut:1,from:"specialty"},{cut:1,from:"canvas"}]),o.title=o.collarCbTopCp.shiftFractionTowards(o.collarstandCbTopCp,.4).shiftFractionTowards(o.collarstandCbTop,.5),a("rmtitle"),a("title",{at:o.title,nr:6,title:"undercollar",scale:.6}),a("rmad"),a("hd",{id:"wAtTop",from:o.leftCollarCorner,to:o.collarCorner,y:o.collarstandCbBottom.y-10}),a("hd",{id:"wFull",from:o.notchLeft,to:o.notch,y:o.collarstandCbBottom.y-25}),a("hd",{id:"wAtBottom",from:o.notchTipRollLeft,to:o.notchTipRoll,y:o.notchTipRoll.y+15}),a("vd",{id:"hAtCb",to:o.collarstandCbBottom,from:o.collarCbTopRoll,x:o.collarCbTop.x-t-15}),a("ld",{id:"lTopSide",to:o.collarCorner,from:o.notch,d:-1*t-15}),a("ld",{id:"lBottomSide",from:o.notchTipRoll,to:o.notch,d:-15-t}),a("vd",{id:"hFull",from:o.notchTipRoll,to:o.collarstandCbBottom,x:o.notch.x+t+40}),r}};const yr={name:"jaeger.pocket",after:[ur,fr],options:{pocketFoldover:{pct:25,min:15,max:35,menu:"pockets"}},draft:function({sa:t,store:e,utils:o,complete:a,points:i,options:n,macro:s,Point:r,paths:l,Path:c,part:p}){const d=e.get("pocketWidth"),h=e.get("pocketDepth");if(i.topLeft=new r(0,0),i.topRight=new r(d,0),i.bottomLeft=new r(0,h),i.bottomRight=new r(d,h),i.edgeLeft=i.bottomLeft.shiftFractionTowards(i.topLeft,1+n.pocketFoldover),i.edgeRight=new r(i.topRight.x,i.edgeLeft.y),n.frontPocketRadius>
10){const t={left:s("round",{id:"left",from:i.topLeft,to:i.bottomRight,via:i.bottomLeft,radius:d*n.frontPocketRadius}),right:s("round",{id:"right",from:i.bottomLeft,to:i.topRight,via:i.bottomRight,radius:d*n.frontPocketRadius})};for(const e in t)for(const a of["start","cp1","cp2","end"])i[`${e}${o.capitalize(a)}`]=i[t[e].points[a]].copy()}n.frontPocketRadius>0?l.seam=(new c).move(i.edgeLeft).line(i.leftStart).curve(i.leftCp1,i.leftCp2,i.leftEnd).line(i.rightStart).curve(i.rightCp1,i.rightCp2,i.rightEnd).line(i.edgeRight).line(i.edgeLeft).close().attr("class","fabric"):l.seam=(new c).move(i.edgeLeft).line(i.bottomLeft).line(i.bottomRight).line(i.edgeRight).line(i.edgeLeft).close().attr("class","fabric"),a&&(l.fold=(new c).move(i.topLeft).line(i.topRight).addClass("fabric help").addText("foldAlongThisLine","center fill-note")),t&&(l.sa=l.seam.offset(t).attr("class","fabric sa")),e.cutlist.setCut({cut:2,from:"fabric"}),i.title=i.topLeft.shiftFractionTowards(i.bottomRight,.5),s("title",{at:i.title,nr:9,title:"pocket",align:"center"}),s("grainline",{from:i.bottomLeft.shift(0,10),to:i.edgeLeft.shift(0,10)}),s("hd",{id:"wFull",from:i.edgeLeft,to:i.edgeRight,y:i.edgeLeft.y-t-15});let m=i.bottomRight;return n.frontPocketRadius>0&&(m=i.rightStart),s("vd",{id:"hToFold",from:m,to:i.topRight,x:i.edgeRight.x+t+15}),s("vd",{id:"hFull",from:m,to:i.edgeRight,x:i.edgeRight.x+t+30}),p}};const Tr={name:"jaeger.pocketLining",from:yr,draft:function({sa:t,snippets:e,store:o,points:a,options:i,macro:n,paths:s,Path:r,part:l}){a.topLeft=a.edgeLeft.flipY(a.topLeft),a.topRight=a.edgeRight.flipY(a.topRight);for(let p of Object.keys(s))delete s[p];for(let p of Object.keys(e))delete e[p];i.frontPocketRadius>0?s.seam=(new r).move(a.topLeft).line(a.leftStart).curve(a.leftCp1,a.leftCp2,a.leftEnd).line(a.rightStart).curve(a.rightCp1,a.rightCp2,a.rightEnd).line(a.topRight).line(a.topLeft).close().attr("class","lining"):s.seam=(new r).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).line(a.topLeft).close().attr("class","lining"),t&&(s.sa=s.seam.offset(t).attr("class","lining sa")),o.cutlist.setCut({cut:2,from:"lining"}),a.title=a.topLeft.shiftFractionTowards(a.bottomRight,.5),n("rmtitle"),n("title",{at:a.title,nr:10,title:"pocketLining",align:"center"}),n("grainline",{from:a.bottomLeft.shift(0,10),to:a.topLeft.shift(0,10)}),n("hd",{id:"wFull",from:a.topLeft,to:a.topRight,y:a.topLeft.y-t-15});let c=a.bottomRight;return i.frontPocketRadius>0&&(c=a.rightStart),n("vd",{id:"hFull",from:c,to:a.topRight,x:a.topRight.x+t+15}),l}};const xr={name:"jaeger.chestPocketWelt",after:br,draft:function({sa:t,store:e,complete:o,points:a,options:i,macro:n,Point:s,paths:r,Path:l,part:c}){let p=e.get("chestPocketWidth"),d=e.get("chestPocketWeltHeight"),h=i.chestPocketAngle;return a.anchor=new s(0,0),a.top=a.anchor.shift(90-h,d/2),a.bottom=a.anchor.shift(-90-h,d/2),a.topLeft=a.top.shift(180,p/2),a.topRight=a.topLeft.rotate(180,a.top),a.bottomLeft=a.bottom.shift(180,p/2),a.bottomRight=a.bottomLeft.rotate(180,a.bottom),a.foldLeft=a.bottomLeft.flipY(a.topLeft),a.foldRight=a.bottomRight.flipY(a.topLeft),r.seam=(new l).move(a.foldLeft).line(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).line(a.foldRight).line(a.foldLeft).close().attr("class","fabric"),o&&(r.fold=(new l).move(a.topLeft).line(a.topRight).attr("class","stroke-sm dashed")),t&&(r.sa=r.seam.offset(t).attr("class","fabric sa")),e.cutlist.setCut({cut:2,from:"fabric"}),n("title",{at:a.top,nr:11,title:"chestPocketWelt",scale:.666}),n("grainline",{from:a.bottomLeft.shift(0,10),to:a.bottomLeft.shiftFractionTowards(a.topLeft,2).shift(0,10)}),n("hd",{id:"wNarrow",from:a.topLeft,to:a.foldRight,y:a.foldLeft.y-t-15}),n("hd",{id:"wFull",from:a.foldLeft,to:a.foldRight,y:a.foldLeft.y-t-30}),n("vd",{id:"hFull",from:a.bottomRight,to:a.foldRight,x:a.bottomRight.x+t+15}),c}};const Br={name:"jaeger.chestPocketBag",after:br,draft:function({sa:t,store:e,complete:o,points:a,options:i,macro:n,Point:s,paths:r,Path:l,part:c}){const p=e.get("chestPocketWidth"),d=e.get("chestPocketWeltHeight"),h=p*i.chestPocketDepth,m=i.chestPocketAngle;return a.topLeft=new s(0,0),a.topRight=a.topLeft.shift(m,p),a.foldLeft=a.topLeft.shift(-90,h),a.foldRight=new s(a.topRight.x,a.foldLeft.y),a.bottomLeft=a.topLeft.shift(-90,2*h+d),a.bottomRight=a.bottomLeft.shift(-1*m,p),r.seam=(new l).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).line(a.topLeft).close().attr("class","lining"),o&&(r.fold=(new l).move(a.foldLeft).line(a.foldRight).addClass("stroke-sm dashed lining").addText("foldAlongThisLine","center fill-note")),t&&(r.sa=r.seam.offset(t).attr("class","lining sa")),e.cutlist.setCut({cut:2,from:"lining"}),a.title=a.topLeft.shiftFractionTowards(a.foldRight,.5),n("title",{at:a.title,nr:12,title:"chestPocketBag",align:"center",scale:.666}),n("grainline",{from:a.bottomLeft.shift(0,10),to:a.topLeft.shift(0,10)}),n("hd",{id:"wFull",from:a.topLeft,to:a.topRight,y:a.topRight.y-t-15}),n("vd",{id:"hToFold",from:a.bottomRight,to:a.foldRight,x:a.topRight.x+t+15}),n("vd",{id:"hFromFold",from:a.foldRight,to:a.topRight,x:a.topRight.x+t+15}),n("vd",{from:a.bottomRight,id:"hFull",to:a.topRight,x:a.topRight.x+t+30}),n("vd",{id:"hToFoldSmall",from:a.bottomLeft,to:a.foldLeft,x:a.topLeft.x-t-15}),n("vd",{id:"hFromFoldSmall",from:a.foldLeft,to:a.topLeft,x:a.topLeft.x-t-15}),c}};const Sr={name:"jaeger.topsleeve",from:B,hide:n.V9.HIDE_TREE,options:{sleeveVentLength:rr,sleeveVentWidth:lr},draft:function({sa:t,store:e,utils:o,points:a,measurements:i,options:n,macro:s,paths:r,Path:l,part:c}){let p=i.wrist*(1+n.cuffEase)*n.sleeveVentWidth;a.ventFoldRight=a.tsWristLeft.shiftOutwards(a.tsWristRight,p),a.ventHelper=a.tsWristRight.shiftFractionTowards(a.elbowRight,n.sleeveVentLength),a.ventSlopeEnd=a.ventHelper.shiftTowards(a.tsWristRight,p).rotate(90,a.ventHelper),a.ventSlopeStart=o.beamsIntersect(a.tsWristRight,a.elbowRight,a.ventSlopeEnd,a.ventHelper.rotate(-15,a.ventSlopeEnd));let d=t?3*t:30;a.hemHelperLeft=a.tsWristLeft.shiftTowards(a.tsWristRight,d).rotate(90,a.tsWristLeft),a.hemHelperRight=a.tsWristRight.shiftTowards(a.tsWristLeft,d).rotate(-90,a.tsWristRight),a.hemLeftIntersection=o.beamsIntersect(a.hemHelperLeft,a.hemHelperRight,a.tsWristLeft,a.tsElbowLeft),a.hemRightIntersection=o.beamsIntersect(a.hemHelperLeft,a.hemHelperRight,a.tsWristRight,a.elbowRight),a.hemVentIntersection=o.beamsIntersect(a.hemHelperLeft,a.hemHelperRight,a.ventFoldRight,a.ventSlopeEnd),a.hemLeft=a.hemLeftIntersection.rotate(-2*a.tsWristLeft.angle(a.hemLeftIntersection),a.tsWristLeft),a.hemRight=a.hemRightIntersection.rotate(-2*a.tsWristRight.angle(a.hemRightIntersection),a.tsWristRight),a.ventRight=a.hemVentIntersection.rotate(-2*a.ventFoldRight.angle(a.hemVentIntersection),a.ventFoldRight);for(let h of Object.keys(r))delete r[h];return r.seam=(new l).move(a.ventFoldRight).line(a.ventSlopeEnd).line(a.ventSlopeStart).line(a.elbowRight).curve(a.elbowRightCpTop,a.tsRightEdgeCpBottom,a.tsRightEdge).curve_(a.tsRightEdgeCpTop,a.backPitchPoint)._curve(a.topCpRight,a.top).curve(a.topCpLeft,a.frontPitchPointCpTop,a.frontPitchPoint).curve(a.frontPitchPointCpBottom,a.tsLeftEdgeCpRight,a.tsLeftEdge)._curve(a.tsElbowLeftCpTop,a.tsElbowLeft).line(a.tsWristLeft).line(a.hemLeft).line(a.ventRight).line(a.ventFoldRight).close().attr("class","fabric"),r.ventHint=(new l).move(a.ventSlopeStart).line(a.tsWristRight).attr("class","stroke-sm help"),r.hem=(new l).move(a.tsWristLeft).line(a.ventFoldRight).attr("class","fabric lashed"),t&&(r.sa=r.seam.offset(t).attr("class","fabric sa")),e.cutlist.setCut([{cut:2,from:"fabric"},{cut:2,from:"lining"}]),s("scalebox",{at:a.elbowCenter}),s("sprinkle",{snippet:"notch",on:["top","tsElbowLeft","elbowRight"]}),a.title=a.tsLeftEdge.shiftFractionTowards(a.tsRightEdge,.5),s("title",{at:a.title,nr:4,title:"topsleeve"}),s("grainline",{from:a.boxBottom,to:a.top}),s("ld",{id:"lWrist",from:a.tsWristLeft,to:a.tsWristRight,d:15}),s("ld",{id:"lWristPlusVent",from:a.tsWristLeft,to:a.ventFoldRight,d:30}),s("ld",{id:"lFoldoverWristPlusVent",from:a.hemLeft,to:a.ventRight,d:-15-t}),s("ld",{id:"hFoldoverCuff",from:a.hemLeft,to:a.tsWristLeft,d:15+t}),s("ld",{id:"lVent",from:a.tsWristRight,to:a.ventSlopeStart,d:15}),s("ld",{id:"lVentShort",from:a.ventFoldRight,to:a.ventSlopeEnd,d:15}),s("ld",{id:"wVent",from:a.tsWristRight,to:a.ventFoldRight,d:-15}),s("vd",{id:"hFull",from:a.ventRight,to:a.top,x:a.ventSlopeEnd.x+t
1+15}),s("vd",{id:"hInnerWristToElbow",from:a.tsWristLeft,to:a.tsElbowLeft,x:a.tsLeftEdge.x-t-15}),s("vd",{id:"hInnerWristToSleevecap",from:a.tsWristLeft,to:a.tsLeftEdge,x:a.tsLeftEdge.x-t-30}),s("vd",{id:"hSleevecap",from:a.tsLeftEdge,to:a.top,x:a.tsLeftEdge.x-t-30}),s("vd",{id:"hInnerWristToSleevecapTop",from:a.tsWristLeft,to:a.top,x:a.tsLeftEdge.x-t-45}),s("ld",{id:"wSleevecap",from:a.tsLeftEdge,to:a.tsRightEdge}),s("ld",{id:"wAtElbow",from:a.tsElbowLeft,to:a.elbowRight}),s("hd",{id:"wSleevecapLeft",from:a.tsLeftEdge,to:a.top,y:a.top.y-t-15}),s("hd",{id:"wSleevecap",from:a.tsLeftEdge,to:a.backPitchPoint,y:a.top.y-t-30}),s("hd",{id:"wFull",from:a.tsLeftEdge,to:a.tsRightEdge,y:a.top.y-t-45}),c},after:I};const Lr={name:"jaeger.undersleeve",from:S,options:{sleeveVentLength:rr,sleeveVentWidth:lr},hide:n.V9.HIDE_TREE,draft:function({sa:t,utils:e,points:o,store:a,measurements:i,options:n,macro:s,paths:r,Path:l,part:c}){let p=i.wrist*(1+n.cuffEase)*n.sleeveVentWidth;o.ventFoldRight=o.usWristLeft.shiftOutwards(o.usWristRight,p),o.ventHelper=o.usWristRight.shiftFractionTowards(o.elbowRight,n.sleeveVentLength),o.ventSlopeEnd=o.ventHelper.shiftTowards(o.usWristRight,p).rotate(90,o.ventHelper),o.ventSlopeStart=e.beamsIntersect(o.usWristRight,o.elbowRight,o.ventSlopeEnd,o.ventHelper.rotate(-15,o.ventSlopeEnd));let d=t?3*t:30;o.hemHelperLeft=o.usWristLeft.shiftTowards(o.usWristRight,d).rotate(90,o.usWristLeft),o.hemHelperRight=o.usWristRight.shiftTowards(o.usWristLeft,d).rotate(-90,o.usWristRight),o.hemLeftIntersection=e.beamsIntersect(o.hemHelperLeft,o.hemHelperRight,o.usWristLeft,o.usElbowLeft),o.hemRightIntersection=e.beamsIntersect(o.hemHelperLeft,o.hemHelperRight,o.usWristRight,o.elbowRight),o.hemVentIntersection=e.beamsIntersect(o.hemHelperLeft,o.hemHelperRight,o.ventFoldRight,o.ventSlopeEnd),o.hemLeft=o.hemLeftIntersection.rotate(-2*o.usWristLeft.angle(o.hemLeftIntersection),o.usWristLeft),o.hemRight=o.hemRightIntersection.rotate(-2*o.usWristRight.angle(o.hemRightIntersection),o.usWristRight),o.ventRight=o.hemVentIntersection.rotate(-2*o.ventFoldRight.angle(o.hemVentIntersection),o.ventFoldRight);for(let h of Object.keys(r))delete r[h];return r.seam=(new l).move(o.ventFoldRight).line(o.ventSlopeEnd).line(o.ventSlopeStart).line(o.elbowRight).curve(o.elbowRightCpTop,o.usRightEdgeCpBottom,o.usRightEdge).curve_(o.usRightEdgeCpTop,o.usTip).curve(o.usTipCpBottom,o.usLeftEdgeCpRight,o.usLeftEdgeRight).line(o.usLeftEdge)._curve(o.usElbowLeftCpTop,o.usElbowLeft).line(o.usWristLeft).line(o.hemLeft).line(o.ventRight).line(o.ventFoldRight).close().attr("class","fabric"),r.ventHint=(new l).move(o.ventSlopeStart).line(o.usWristRight).attr("class","stroke-sm help"),r.hem=(new l).move(o.usWristLeft).line(o.ventFoldRight).attr("class","fabric lashed"),t&&(r.sa=r.seam.offset(t).attr("class","fabric sa")),a.cutlist.setCut([{cut:2,from:"fabric"},{cut:2,from:"lining"}]),s("sprinkle",{snippet:"notch",on:["top","usElbowLeft","elbowRight"]}),o.title=o.tsLeftEdge.shiftFractionTowards(o.tsRightEdge,.5),s("title",{at:o.title,nr:5,title:"undersleeve"}),s("grainline",{from:o.boxBottom,to:o.armCenter}),s("ld",{id:"lAtWrist",from:o.usWristLeft,to:o.usWristRight,d:15}),s("ld",{id:"lAtWristPlusVent",from:o.usWristLeft,to:o.ventFoldRight,d:30}),s("ld",{id:"lFoldoverCuff",from:o.hemLeft,to:o.ventRight,d:-15-t}),s("ld",{id:"hFoldoverCuff",from:o.hemLeft,to:o.usWristLeft,d:15+t}),s("ld",{id:"lVent",from:o.usWristRight,to:o.ventSlopeStart,d:15}),s("ld",{id:"lVentShort",from:o.ventFoldRight,to:o.ventSlopeEnd,d:15}),s("ld",{id:"wVent",from:o.usWristRight,to:o.ventFoldRight,d:-15}),s("vd",{id:"hWristToElbow",from:o.usWristLeft,to:o.usElbowLeft,x:o.usLeftEdge.x-t-15}),s("vd",{id:"hFrontWristToArmhole",from:o.usWristLeft,to:o.usLeftEdge,x:o.usLeftEdge.x-t-30}),s("vd",{id:"hArmhole",from:o.usLeftEdge,to:o.usTip,x:o.usLeftEdge.x-t-30}),s("vd",{id:"hWristToSleeveTip",from:o.usWristLeft,to:o.usTip,x:o.usLeftEdge.x-t-45}),s("ld",{id:"wAtElbow",from:o.usElbowLeft,to:o.elbowRight}),s("hd",{id:"wArmhole",from:o.usLeftEdge,to:o.usTip,y:o.usTip.y-t-15}),s("hd",{id:"wFull",from:o.usLeftEdge,to:o.elbowRight,y:o.usTip.y-t-30}),c},after:I};const Pr={name:"jaeger.innerPocketBag",after:br,draft:function({sa:t,store:e,complete:o,points:a,options:i,expand:n,units:s,macro:r,Point:l,paths:c,Path:p,part:d}
1){const h=e.get("innerPocketWidth"),m=e.get("innerPocketWeltHeight"),f=h*i.innerPocketDepth;if(!n){const o=t?2*t:0;return e.flag.note({msg:"jaeger:cutInnerPocketBag",notes:[t?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{width:s(h+o),length:s(f+o)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),e.flag.preset("expandIsOff"),d.hide()}return e.flag.preset("expandIsOn"),a.topLeft=new l(0,0),a.topRight=new l(h,0),a.foldLeft=new l(0,f),a.foldRight=new l(h,f),a.bottomLeft=new l(0,2*f+2*m),a.bottomRight=new l(h,2*f+2*m),c.seam=(new p).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).line(a.topLeft).close().attr("class","lining"),o&&(c.fold=(new p).move(a.foldLeft).line(a.foldRight).addClass("stroke-sm lining dashed").addText("foldAlongThisLine","center fill-note")),t&&(c.sa=c.seam.offset(t).attr("class","lining sa")),e.cutlist.setCut({cut:2,from:"lining"}),a.title=a.topLeft.shiftFractionTowards(a.foldRight,.5),r("title",{at:a.title,nr:14,title:"innerPocketBag",align:"center"}),r("grainline",{from:a.bottomLeft.shift(0,10),to:a.topLeft.shift(0,10)}),r("hd",{id:"wFull",from:a.topLeft,to:a.topRight,y:a.topRight.y-t-15}),r("vd",{id:"hToFold",from:a.bottomRight,to:a.foldRight,x:a.topRight.x+t+15}),r("vd",{id:"hFromFold",from:a.foldRight,to:a.topRight,x:a.topRight.x+t+15}),r("vd",{id:"hFull",from:a.bottomRight,to:a.topRight,x:a.topRight.x+t+30}),d}};const Rr={name:"jaeger.innerPocketWelt",after:br,draft:function({sa:t,store:e,complete:o,expand:a,units:i,points:n,macro:s,Point:r,paths:l,Path:c,part:p}){const d=e.get("innerPocketWidth"),h=e.get("innerPocketWeltHeight");if(!a){const o=t?2*t:0;return e.flag.note({msg:"jaeger:cutInnerPocketWelt",notes:[t?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{width:i(d+o),length:i(h+o)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),e.flag.preset("expandIsOff"),p.hide()}return e.flag.preset("expandIsOn"),n.topLeft=new r(0,0),n.topRight=new r(d,0),n.foldLeft=new r(0,h),n.foldRight=new r(d,h),n.bottomLeft=new r(0,2*h),n.bottomRight=new r(d,2*h),l.seam=(new c).move(n.topLeft).line(n.bottomLeft).line(n.bottomRight).line(n.topRight).line(n.topLeft).close().attr("class","fabric"),o&&(l.fold=(new c).move(n.foldLeft).line(n.foldRight).addClass("stroke-sm dashed")),t&&(l.sa=l.seam.offset(t).attr("class","fabric sa")),e.cutlist.setCut({cut:2,from:"fabric"}),n.title=n.topLeft.shiftFractionTowards(n.bottomRight,.5),s("rmtitle"),s("title",{at:n.title,nr:13,title:"innerPocketWelt",scale:.666,align:"center"}),s("hd",{from:n.topLeft,to:n.topRight,y:n.topRight.y-t-15}),s("vd",{from:n.bottomRight,to:n.topRight,x:n.topRight.x+t+15}),p}};const Fr={name:"jaeger.chestPiece",from:br,draft:function({sa:t,snippets:e,Snippet:o,store:a,points:i,macro:n,expand:s,Point:r,paths:l,Path:c,part:p}){if(!s)return a.flag.note({msg:"jaeger:cutChestPiece",notes:"flag:partHiddenByExpand",suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),a.flag.preset("expandIsOff"),p.hide();a.flag.preset("expandIsOn");for(const d in l)delete l[d];for(const d in e)delete e[d];return l.seam=(new c).move(i.split).curve(i.splitCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.armholePitchCp1,i.armholePitch).curve(i.armholePitchCp2,i.shoulderCp1,i.shoulder).line(i.neck).line(i.collarCorner).line(i.shoulderRoll).line(i.lapelBreakPoint).curve(i.cutawayPoint,i.waist,i.fsArmhole).close().addClass("canvas"),t&&(l.sa=l.seam.offset(t).attr("class","fabric sa")),a.cutlist.setCut({cut:2,from:"canvas"}),e.logo=new o("logo",i.innerPocketBottomRight),n("grainline",{from:new r(i.collarCorner.x,i.lapelBreakPoint.y),to:i.collarCorner}),n("rmtitle"),n("title",{at:i.title,nr:"1c",title:"chestPiece"}),p}};const Er={name:"jaeger.frontFacing",from:br,draft:function({sa:t,snippets:e,Snippet:o,store:a,points:i,expand:n,macro:s,Point:r,paths:l,Path:c,part:p}){if(!n)return a.flag.note({msg:"jaeger:cutFrontFacing",notes:"flag:partHiddenByExpand",suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),a.flag.preset("expandIsOff"),p.hide();a.flag.preset("expandIsOn");for(const h in l)delete l[h];for(const h in e)delete e[h];const d=(new c).move(i.ipfeStartStart).curve(i.ipfeStartCp1,i.ipfeStartCp2,i.ipfeStartEnd).line(i.ipfeTopRightStart).curve(i.ipfeTopRightCp1,i.ipfeTopRightCp2,i.ipfeTopRightEnd).curve(i.ipfeBottomRightCp2,i.ipfeBottomRightCp1,i.ipfeBottomRightStart).line(i.ipfeEndEnd).curve(i.ipfeEndCp2,i.ipfeEndCp1,i.ipfeEnd);return l.seam=(new c).move(i.facingTop).line(i.neck).line(i.collarCorner).line(i.notch).line(i.notchEdge)._curve(i.lapelStraightEndCp1,i.lapelStraightEnd).line(i.cutawayPoint).curve(i.cutawayPointCp2,i.roundStartCp1,i.roun
1dStart).join((new c).move(i.roundStart).curve(i.roundCp1,i.roundCp2,i.roundEnd).split(i.facingBottom)[0]).line(i.ipfeEnd).join(d.reverse()).line(i.facingTop).addClass("fabric"),t&&(l.sa=l.seam.offset(t).attr("class","fabric sa")),a.cutlist.setCut({cut:2,from:"fabric"}),i.logo=new r(i.cfNeckCp1.x,i.lapelBreakPoint.y),e.logo=new o("logo",i.logo),i.title=new r(i.cfNeckCp1.x,i.lapelStraightEnd.y),s("title",{at:i.title,nr:"1a",title:"frontFacing",align:"center"}),s("grainline",{from:i.cfHips,to:new r(i.cfArmhole.x,i.collarCorner.y)}),p}};const Wr={name:"jaeger.frontLining",from:br,draft:function({sa:t,snippets:e,Snippet:o,store:a,points:i,expand:n,macro:s,Point:r,paths:l,Path:c,part:p}){if(!n)return a.flag.note({msg:"jaeger:cutFrontLining",notes:"flag:partHiddenByExpand",suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),a.flag.preset("expandIsOff"),p.hide();a.flag.preset("expandIsOn");for(const d in l)delete l[d];for(const d in e)delete e[d];return l.seam=(new c).move(i.roundStart).curve(i.roundCp1,i.roundCp2,i.roundEnd).split(i.facingBottom)[1].line(i.hem).line(i.hips).curve(i.hipsCp2,i.waistCp1,i.waist).curve_(i.waistCp2,i.split).curve(i.splitCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.armholePitchCp1,i.armholePitch).curve(i.armholePitchCp2,i.shoulderCp1,i.shoulder).line(i.facingTop).line(i.facingBottom).close().addClass("lining"),t&&(l.sa=l.seam.offset(t).attr("class","fabric sa")),a.cutlist.setCut({cut:2,from:"lining"}),i.logo=new r(i.chestPocketBottomRight.x,i.lapelBreakPoint.y),e.logo=new o("logo",i.logo),i.title=new r(i.chestPocketBottom.x,i.lapelStraightEnd.y),s("title",{at:i.title,nr:"1b",title:"frontLining"}),s("grainline",{from:new r(i.facingTop.x,i.hem.y),to:i.facingTop}),p}},Hr=new n.pT({data:nr,parts:[fr,ur,Er,Wr,Fr,gr,kr,Cr,vr,yr,Tr,xr,Br,Sr,Lr,Pr,Rr]}),Ar=(0,n.D4)([St,ir]),Or=JSON.parse('{"id":"jane","name":"Jane 1790s shift","code":"SeaZeeZee","description":"A FreeSewing pattern for a 1790s shift","design":"SeaZeeZee","difficulty":2,"tags":["tops","historical","underwear"],"techniques":["hem"],"version":"4.6.0","pkg":"@freesewing/jane","collection":true}'),Dr={name:"jane.sleeve",measurements:["biceps","shoulderToElbow"],options:{bicepsEase:{pct:18,min:18,max:51,...(0,n.Wx)("biceps"),menu:"fit"},sleeveLength:{pct:80,min:60,max:100,menu:"style"}},draft:function({options:t,Point:e,Path:o,Snippet:a,points:i,paths:n,snippets:s,sa:r,paperless:l,macro:c,measurements:p,part:d,store:h}){const m=p.biceps*(1+t.bicepsEase),f=p.shoulderToElbow*t.sleeveLength;return i.sleeveLeft=new e(0,0),i.sleeveRight=new e(f,0),i.sleeveBottomLeft=new e(0,m),i.sleeveBottomRight=new e(f,m),n.sleeve=(new o).move(i.sleeveRight).line(i.sleeveLeft).line(i.sleeveBottomLeft).line(i.sleeveBottomRight).line(i.sleeveRight).addClass("fabric").close(),h.cutlist.setCut({cut:2,from:"fabric",identical:"true"}),i.title=i.sleeveLeft.shift(300,f/2),c("title",{at:i.title,nr:2,title:"sleeve"}),i.notch=new e(0,m/2).addText("shoulder","center"),i.text1=new e(f/2,10).addText("seam","center"),i.text2=new e(f/2,m).addText("seam","center"),i.text3=i.sleeveRight.shiftTowards(i.sleeveBottomRight,m/2).addText("hem","center"),s.notch=new a("notch",i.notch),r&&(n.sa=n.sleeve.offset(r).setClass("fabric sa").close()),l&&(c("vd",{id:"sleeveLength",from:i.sleeveLeft,to:i.sleeveBottomLeft,x:i.sleeveLeft.x+r+30}),c("hd",{id:"sleeveWidth",from:i.sleeveLeft,to:i.sleeveRight,y:i.sleeveLeft.y+r+30})),d}},Nr={en:JSON.parse('{"t":"Jane 1790\'s shift","d":"A FreeSewing pattern for a 1790s shift","p":{"body":"Body","sleeve":"Sleeve","gusset":"Gusset"},"s":{},"o":{"bodyEase":{"t":"Body Ease","d":"Controls ease in the width of the body"},"neckDepthFront":{"t":"Neckline Depth Front","d":"Controls depth of the front neckline"},"neckDepthBack":{"t":"Neckline Depth Back","d":"Controls depth of the back neckline"},"neckWidth":{"t":"Neckline Width","d":"Controls the width of the neckline"},"shiftLength":{"t":"Shift Length","d":"Controls the length of the shift"},"gussetSize":{"t":"Gusset Size","d":"Controls the size of the gusset"},"bicepsEase":{"t":"Biceps Ease","d":"Controls the ease in the sleeve"},"sleeveLength":{"t":"Sleeve Length","d":"Controls the additional length added to the sleeve"}}}')},Ir=new n.pT({data:Or,parts:[{name:"jane.body",measurements:["chest","hips","hpsToWaistBack","waistToKnee","shoulderToShoulder","neck","hpsToBust","waistToFloor"],options:{bodyEase:{pct:21,min:21,max:50,menu:"fit"},neckDepthFront:{pct:31,min:25,max:50,menu:"style"},neckDepthBack:{pct:18,min:15,max:50,menu:"style"},neckWidth:{pct:71,min:65,max:85,menu:"style"},shiftLength:{pct:2,min:0,max:20,menu:"style"}}
1,draft:function({options:t,Point:e,Path:o,points:a,paths:i,Snippet:n,snippets:s,sa:r,paperless:l,macro:c,measurements:p,part:d,store:h}){const m=(p.waistToKnee+p.hpsToWaistBack)*(1+t.shiftLength),f=(p.chest>p.hips?p.chest/2:p.hips/2)*(1+t.bodyEase),u=m>p.waistToFloor+p.hpsToWaistBack?p.waistToFloor+p.hpsToWaistBack:m;a.topLeft=new e(0,0),a.topRight=new e(f,0),a.bottomLeft=new e(0,u),a.bottomRight=new e(f,u),a.gorestartLeft=a.bottomLeft.shiftTowards(a.topLeft,u/2),a.gorestartRight=a.bottomRight.shiftTowards(a.topRight,u/2),a.middle=a.topLeft.shiftTowards(a.topRight,f/2),a.leftShoulder=a.middle.shiftTowards(a.topLeft,p.shoulderToShoulder/2),a.rightShoulder=a.middle.shiftTowards(a.topRight,p.shoulderToShoulder/2),i.body=(new o).move(a.topRight).line(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).addClass("fabric").close(),i.leftGore=(new o).move(a.leftShoulder).line(a.gorestartLeft).addClass("fabric dashed").close(),i.rightGore=(new o).move(a.rightShoulder).line(a.gorestartRight).addClass("fabric dashed").close();const g=p.neck*t.neckWidth;return a.neckLeft=a.middle.shiftTowards(a.leftShoulder,g/2),a.neckRight=a.middle.shiftTowards(a.rightShoulder,g/2),a.middleHem=a.bottomLeft.shiftTowards(a.bottomRight,f/2),a.neckFront=a.middle.shiftTowards(a.middleHem,p.hpsToBust*t.neckDepthFront).addText("Front Neckline","center"),a.neckCp1=a.neckRight.shift(90,.8*a.neckFront.dy(a.neckRight)),a.neckCp2=a.neckFront.shift(180,.8*a.neckFront.dy(a.neckRight)),a.neckCp3=a.neckLeft.shift(90,.8*a.neckFront.dy(a.neckLeft)),a.neckCp4=a.neckFront.shift(0,.8*a.neckFront.dy(a.neckLeft)),i.neckLineFront=(new o).move(a.neckRight).curve(a.neckCp1,a.neckCp2,a.neckFront).curve(a.neckCp4,a.neckCp3,a.neckLeft).addClass("fabric"),a.neckBack=a.middle.shiftTowards(a.neckFront,p.hpsToBust*t.neckDepthBack).addText("Back Neckline","center"),a.neckBackCp1=a.neckBack.shift(0,.8*a.neckFront.dy(a.neckLeft)),a.neckBackCp2=a.neckBack.shift(180,.8*a.neckFront.dy(a.neckRight)),a.neckBackCp3=a.neckLeft.shift(90,.8*a.neckBack.dy(a.neckLeft)),a.neckBackCp4=a.neckRight.shift(90,.8*a.neckBack.dy(a.neckRight)),i.necklineBack=(new o).move(a.neckRight).curve(a.neckBackCp4,a.neckBackCp2,a.neckBack).curve(a.neckBackCp1,a.neckBackCp3,a.neckLeft).addClass("fabric"),a.topTopLeft=a.topLeft.shift(90,20),a.topTopRight=a.topRight.shift(90,20),i.extraBoundary=(new o).move(a.topLeft).move(a.topRight).move(a.topTopRight).move(a.topTopLeft).move(a.topLeft).addClass("fabric hidden").close(),a.logo=a.middle.shiftTowards(a.middleHem,u/4),s.logo=new n("logo",a.logo),h.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),a.title=a.logo.shiftTowards(a.middle,u/12),c("title",{at:a.title,nr:1,title:"body"}),r&&(i.sa=i.body.offset(r).setClass("fabric sa")),c("cutonfold",{from:a.topLeft,to:a.topRight,grainline:!1}),a.grainlineFrom=a.leftShoulder,a.grainlineTo=new e(a.grainlineFrom.x,a.bottomLeft.y),c("grainline",{from:a.grainlineFrom,to:a.grainlineTo}),l&&(c("hd",{id:"bodyWidth",from:a.topLeft,to:a.topRight,y:a.topLeft.y+r+10}),c("vd",{id:"bodyLength",from:a.topLeft,to:a.bottomLeft,x:a.topLeft.y+r+30}),c("vd",{id:"goreLength",from:a.topLeft,to:a.gorestartLeft,x:a.topLeft.y+r+40}),c("hd",{id:"goreWidth",from:a.rightShoulder,to:a.topRight,y:a.rightShoulder.y+r+20}),c("vd",{id:"backNeckDepth",from:a.middle,to:a.neckBack,x:a.middle.x+r+15}),c("vd",{id:"frontNeckDepth",from:a.middle,to:a.neckFront,x:a.middle.x+r+35}),c("hd",{id:"neckWidth",from:a.neckLeft,to:a.middle,y:a.leftShoulder.y+r+30})),d}},Dr,{name:"jane.gusset",measurements:["biceps","shoulderToElbow"],options:{gussetSize:{pct:41,min:41,max:50,menu:"fit"}},draft:function({options:t,Point:e,Path:o,points:a,paths:i,sa:n,paperless:s,macro:r,measurements:l,part:c,store:p}){const d=l.biceps*t.gussetSize;return a.gussetLeft=new e(0,0),a.gussetRight=new e(d,0),a.gussetBottomLeft=new e(0,d),a.gussetBottomRight=new e(d,d),i.gusset=(new o).move(a.gussetRight).line(a.gussetLeft).line(a.gussetBottomLeft).line(a.gussetBottomRight).line(a.gussetRight).addClass("fabric").close(),p.cutlist.setCut({cut:2,from:"fabric",identical:"true"}),a.title=a.gussetLeft.shift(300,d/2),r("title",{at:a.title,nr:3,title:"sleeveGusset"}),n&&(i.sa=i.gusset.offset(n).setClass("fabric sa")),s&&(r("hd",{id:"gussetWidth",from:a.gussetLeft,to:a.gussetRight,x:a.gussetLeft.x+n+30}),r("vd",{id:"gussetLength",from:a.gussetLeft,to:a.gussetBottomLeft,x:a.gussetLeft.x+n+30})),c}}]}),Mr=JSON.parse('{"id":"jett","code":"Candle","design":"Candle","description":"A FreeSewing pattern for a bomber or letterman jacket","name":"Jett Jacket","difficulty":4,"collection":true,"tags":["coats","tops"],"techniques":["button","ribbing","
1welt-pocket","lining","set-sleeve","snap"],"version":"4.6.0","pkg":"@freesewing/jett"}'),_r={en:JSON.parse('{"t":"Jett jacket","d":"A FreeSewing pattern for a bomber or letterman jacket","p":{"back":"Back","front":"Front","base":"Base","sleevecap":"Sleevecap","sleeve":"Sleeve","collar_ribbing":"Collar ribbing","cuff":"Cuff","yoke":"Yoke","pocket_welt":"Pocket welt","pocket_bag_front":"Front pocket bag","waistband":"Waistband","waistband_ends":"Waistband extension"},"s":{"bustWarning.t":"The bust dart won\'t be generated","bustWarning.d":"Chest is smaller than high bust. If these measurements are accurate, you don\'t need a bust dart.","waistWarning.t":"The bust dart won\'t be generated","waistWarning.d":"HPS to waist front is smaller than HPS to waist back.\\nDid you take the HPS to waist front measurement down over the bust?"},"o":{"hipsEase":{"t":"Hips ease","d":"The amount of ease at your hips"},"ribbingHeight":{"t":"Ribbing height","d":"Controls the height of the ribbing"},"ribbingStretch":{"t":"Ribbing stretch","d":"Use this to adapt the pattern to how stretchy the ribbing that you are using is."},"bustDart":{"t":"Bust dart (EXPERIMENTAL)","d":"Draft the pattern with a full bust adjustment and a bust dart. This only takes effect if Draft for High Bust is true.\\nThis option isn\'t guaranteed to preserve the armhole or side seam lengths. Proceed with caution."},"bustDartNo":{"t":"No","d":"Don\'t use a bust dart"},"bustDartYes":{"t":"Yes","d":"Use a bust dart"},"fullBustEase":{"t":"Full bust ease","d":"Allows you to independently control the ease in the bust adjustment without affecting the armscye"},"bustDartHeight":{"t":"Bust dart height","d":"Where to place the bust dart on the side seam. Only used if the code can\'t automatically find an intersection on the side seam"},"sideCutAngle":{"t":"Side cut angle","d":"Tweaks the angle of the dart for the full bust adjustment"},"dartLegsTruing":{"t":"Dart legs truing","d":"This option tweaks the side seam to keep the bust dart legs the same length."},"dartLegsTruingYes":{"t":"Yes","d":"Adjust the dart leg lengths"},"dartLegsTruingNo":{"t":"No","d":"Don\'t adjust the dart leg lengths"},"bustDartOffset":{"t":"Bust dart offset","d":"How close to the bust apex to start the bust dart"},"pocketCornerOffset":{"t":"Pocket corner offset","d":"How close to the corner do you want the pocket to start"},"ribbing":{"t":"Ribbing","d":"Whether to generate a waistband and cuffs made of stretchy ribbing"},"ribbingYes":{"t":"Yes","d":"Use ribbing for waistband and cuffs"},"ribbingNo":{"t":"No","d":"Do not use ribbing for waistband and cuffs"},"ribbingEndsPercentage":{"t":"Waistband extension percentage","d":"How wide to make the button placket extension at the ends of the waistband"}
1,"neckShiftForward":{"t":"Neck shift forward","d":"Cut the neck lower in the front than Brian\'s default neckline, by this percentage of the neck measurement"},"yokesplit":{"t":"Yoke height","d":"How tall to make the yoke"},"ribbedCollarWidth":{"t":"Ribbed collar width","d":"How wide to make the ribbed collar"},"ribbedCollarCurve":{"t":"Ribbed collar curve","d":"How far the ends of the ribbed collar curve"},"closureCount":{"t":"Closure count","d":"How many buttons or snaps to use. The last one goes on the waistband extension"},"yoke":{"t":"Yoke","d":"Whether to draft the back panel with a yoke across the shoulders. The yoke does no extra shaping right now, so this doesn\'t affect the fit."},"waistEase":{"t":"Waist ease","d":"The amount of ease at the waist"},"yokeYes":{"t":"Yes","d":"Include a yoke"},"yokeNo":{"t":"No","d":"Do not include a yoke"},"placketwidth":{"t":"Placket width","d":"How wide to make the button placket, as a percentage of the chest measurement"},"useBellyAdjustment":{"t":"Use full belly adjustment","d":"This widens the front piece to account for a waist wider than the hip measurement. To use this, make sure to take the waist measurement at the fullest part of your belly"},"useBellyAdjustmentYes":{"t":"Yes","d":"Include belly adjustment"},"useBellyAdjustmentNo":{"t":"No","d":"Do not include belly adjustment"},"bellyAdjustmentX":{"t":"FIXME","d":"FIXME -- Check with Gawain_CCBR"},"armCutAngle":{"t":"Armhole cut angle","d":"This applies only to the rotation-based implementation. Tweak this if the armhole looks wrong."},"frontWeltPockets":{"t":"Front welt pockets","d":"Determines whether to draft the pattern with diagonal welt pockets on the front"},"frontWeltPocketsYes":{"t":"Yes","d":"Draft with pockets"},"frontWeltPocketsNo":{"t":"No","d":"Draft without pockets"},"pocketBottomX":{"t":"Pocket bottom X","d":"Horizontal position of the bottom of the pocket"},"pocketBottomY":{"t":"Pocket bottom Y","d":"Vertical position of the bottom of the pocket"},"pocketTopX":{"t":"Pocket top X","d":"Horizontal position of the top of the pocket"},"pocketTopY":{"t":"Pocket top Y","d":"Vertical position of the top of the pocket"},"pocketWeltWidth":{"t":"Pocket welt width","d":"How wide to make the pocket welt piece"}}}')};const jr={name:"jett.front",from:I,measurements:["chest","highBust","hips","waistToHips","hpsToWaistBack","hpsToWaistFront","bustSpan","hpsToBust","waist"],hide:n.V9.HIDE_TREE,options:{hipsEase:{pct:8,min:0,max:50,menu:"fit"},chestEase:{pct:15,min:0,max:50,menu:"fit"},placketwidth:{pct:3,min:0,max:10,menu:"style.placket"},neckShiftForward:{pct:0,min:0,max:40,menu:"style"},collarEase:{pct:2,min:0,max:50,menu:"fit"},draftForHighBust:{bool:!1,menu:"fit.bust"},bustDart:{bool:!1,menu:"fit.bust"},bustDartOffset:{pct:25,min:5,max:90,menu:"fit.bust"},bustDartHeight:{pct:20,min:5,max:95,menu:"fit.bust.advanced"},fullBustEase:{pct:10,min:0,max:50,menu:"fit.bust"},armCutAngle:{pct:100,min:75,max:125,menu:"fit.bust.advanced"},sideCutAngle:{pct:100,min:80,max:120,menu:"fit.bust.advanced"},dartLegsTruing:{bool:!0,menu:"fit.bust.advanced"},ribbing:{bool:!0,menu:"construction"},ribbingHeight:{pct:10,min:5,max:15,menu:"style"},frontWeltPockets:{bool:!0,menu:"style.pocket"},pocketBottomX:{pct:70,min:40,max:95,menu:"style.pocket"},pocketTopX:{pct:60,min:40,max:95,menu:"style.pocket"},pocketBottomY:{pct:7,min:0,max:20,menu:"style.pocket"},pocketTopY:{pct:30,min:20,max:50,menu:"style.pocket"},pocketWeltWidth:{pct:7,min:0,max:20,menu:"style.pocket"},closureCount:{count:7,min:3,max:12,menu:"style.placket"},waistEase:{pct:10,min:0,max:50,menu:"fit.belly"},bellyAdjustmentX:{pct:40,min:5,max:95,menu:"fit.belly"},useBellyAdjustment:{bool:!1,menu:"fit.belly"}},draft:function({options:t,Point:e,Path:o,points:a,paths:i,Snippet:n,snippets:s,sa:r,macro:l,part:c,measurements:p,store:d,log:h,utils:m}){if(d.set("Test","test"),l("rmCutOnFold","cutonfold"),a.hem.x=p.hips*(1+t.hipsEase)/4,t.ribbing){const e=t.ribbingHeight*(p.hpsToWaistBack+p.waistToHips);for(let t of["hem","cfHem"])a[t]=a[t].shift(90,e);d.set("ribbingHeight",e)}else d.set("ribbingHeight",0);a.cfNeck=a.cfNeck.shift(-90,p.neck*t.neckShiftForward),a.cfNeckCp1=a.cfNeckCp1.shift(-90,p.neck*t.neckShiftForward),a.frontNeckCpEdge=a.frontNeckCpEdge.shift(-90,p.neck*t.neckShiftForward),a.neckCp2Front=a.neckCp2Front.shift(-90,p.neck*t.neckShiftForward),t.s3Collar<.1&&t.s3Collar>-.1?(a.s3CollarSplit=a.hps,i.frontCollar=(new o).move(a.hps).curve(a.neckCp2Front,a.cfNeckCp1,a.cfNeck).hide()):t.s3Collar>0?(a.s3CollarSplit=m.curveIntersectsY(a.hps,a.neckCp2Front,a.cfNeckCp1,a.cfNeck,d.get("s3CollarMaxFront")*t.s3Collar),i.frontCollar=(new o).move(a.hps).curve(a.neckCp2Front,a.cfNeckCp1,a.cfNeck).split(a.s3CollarSplit)[1].hide()):t.s3Collar<0&&(a.s3CollarSplit=m.curveIntersectsY(a.mirroredCbNeck,a.mirroredCbNeck,a.mirroredNeckCp2,a.hps,d.get("s3CollarMaxBack")*t.s3Collar),i.frontCollar=(new o).move(a.hps).curve_(a.mirroredNeckCp2,a.mirroredCbNeck).split(a.s3CollarSplit)[0].reverse().join((new o).move(a.hps).curve(a.neckCp2Front,a.cfNeckCp1,a.cfNeck)).hide());let f=p.chest*(1+t.chestEase)*t.placketwidth;d.set("placketWidth",f),a.innerPlacketTop=a.cfNeck.shift(0,f/2),a.innerPlacketBottom=a.cfHem.shift(0,f/2),a.centerPlacketTop=a.cfNeck.shift(180,f/2),a.centerPlacketBottom=a.cfHem.shift(180,f/2),a.outerPlacketTop=a.cfNeck.shift(180,1.5*f),a.outerPlacketBottom=a.cfHem.shift(180,1.5*f),i.sideSeam=(new o).move(a.armhole).line(a.hem).hide();let u=i.sideSeam.length(),g=0;if(a.waist.y<a.hem.y?(a.waist=a.waist.shift(0,.2*p.hips),i.waist=(new o).move(a.cfWaist).line(a.waist),a.waist=i.waist.intersects(i.sideSeam)[0],i.waist=(new o).move(a.cfWaist).line(a.waist).setClass("lining").hide()):(a.waist=a.hem,i.waist=(new o).move(a.cfHem).line(a.hem).setClass("lining").hide()),g=a.waist.x,h.info("pre-adjustment waist X: "+g),h.info("pre-adjustment side seam: "+u),t.bustDart&&t.draftForHighBust){a.bustpoint=new e(p.bustSpan/2,p.hpsToBust);let r=a.hem.angle(a.armhole);s.bustpoint=new n("notch",a.bustpoint),i.sideSeam=(new o).move(a.armhole).line(a.hem),a.FBA_
1cut_A_end=a.bustpoint.shift(r-90*t.sideCutAngle,p.bust/4),i.FBA_cut_A=(new o).move(a.bustpoint).line(a.FBA_cut_A_end).setClass("sa lining").hide(),0==i.sideSeam.intersects(i.FBA_cut_A).length?a.sideSeamIntercept=i.sideSeam.shiftFractionAlong(t.bustDartHeight):a.sideSeamIntercept=i.sideSeam.intersects(i.FBA_cut_A)[0],a.FBA_cut_B_end=a.bustpoint.shift(-90,1.1*(p.hpsToWaistFront+p.waistToHips-p.hpsToBust)*(1+t.lengthBonus)),i.FBA_cut_B=(new o).move(a.bustpoint).line(a.FBA_cut_B_end).setClass("sa lining").hide(),a.bottomHemIntercept=i.FBA_cut_B.intersectsY(a.hem.y)[0];const l=a.bustpoint.angle(a.armholeHollow.shiftFractionTowards(a.frontArmholePitch,.5))*t.armCutAngle;a.FBA_cut_C_end=a.bustpoint.shift(l,p.hpsToBust),i.FBA_cut_C=(new o).move(a.bustpoint).line(a.FBA_cut_C_end).setClass("sa lining").hide(),a.armholeIntercept=i.FBA_cut_C.intersects(i.seam)[0],a.bustPointRotated=new e(a.bustpoint.x,a.bustpoint.y);let c=["bottomHemIntercept","hem","sideSeamIntercept","FBA_cut_A_end","armhole","armholeCp2","_tmp1","_tmp2","_tmp3","armholeHollowCp1","armholeHollow","bustPointRotated"],d=p.bust*(1+t.fullBustEase)-p.highBust*(1+t.chestEase),m=0;for(;a.bustpoint.dx(a.bustPointRotated)<d;){for(let t of c)a[t]=a[t].rotate(1,a.armholeIntercept);m+=1}h.info("Angle moved: "+m),i.armCutRotated=(new o).move(a.armholeIntercept).line(a.bustPointRotated).setClass("sa lining").hide(),a.hem=a.hem.rotate(-m,a.bustPointRotated),a.sideSeamInterceptOld=a.sideSeamIntercept,a.sideSeamIntercept=a.sideSeamIntercept.rotate(-m,a.bustPointRotated);let f=["outerPlacketBottom","centerPlacketBottom","cfHem","innerPlacketBottom"];for(let t of f)a[t]=new e(a[t].x,a.hem.y);if(a.dartTopEdge=a.sideSeamInterceptOld,a.dartBottomEdge=a.sideSeamIntercept,a.dartPoint=a.bustpoint.shiftFractionTowards(a.sideSeamIntercept.shiftFractionTowards(a.sideSeamInterceptOld,.5),t.bustDartOffset),t.dartLegsTruing){const t=a.armhole.dist(a.dartTopEdge)/a.hem.dist(a.dartBottomEdge);h.info("side seam ratio is "+t);let e=a.dartPoint.dist(a.dartBottomEdge),o=a.dartPoint.dist(a.dartTopEdge),i=0;for(h.info("Dart bottom length "+e+", dart top length "+o);e>o&&i<30;)h.info("Bust dart bottom leg is longer by "+(e-o)),a.dartTopEdge=a.dartTopEdge.rotate(1-t,a.armhole),a.dartBottomEdge=a.dartBottomEdge.rotate(t,a.hem),o=a.dartPoint.dist(a.dartTopEdge),e=a.dartPoint.dist(a.dartBottomEdge),i+=1;h.info("Dart bottom length "+e+", dart top length "+o)}i.bustDart=(new o).move(a.dartTopEdge).line(a.dartPoint).line(a.dartBottomEdge),i.sideSeam=(new o).move(a.hem).line(a.dartBottomEdge).line(a.dartTopEdge).line(a.armhole).hide()}else h.info("No bust adjustment"),i.sideSeam=(new o).move(a.hem).line(a.armhole).hide();if(t.useBellyAdjustment){h.info("Full belly adjustment is enabled");let e=(p.waist*(1+t.waistEase)-2*g)/2,r=a.waist.y;a.sideSeamIntercept?a.rotatePoint=a.sideSeamIntercept:a.rotatePoint=a.armhole;let l=a.rotatePoint.angle(a.hem);a.sideSeamExtension=a.hem.shift(l,.1*a.hem.y),s.extension_button=new n("button",a.sideSeamExtension),i.sideTarget=(new o).move(a.rotatePoint).line(a.sideSeamExtension).hide(),a.waistIntersect=i.sideTarget.intersectsY(r)[0],h.info("Waist front target is "+e+", waist front current is "+a.waistIntersect.x+". starting rotation");let c=0;for(a.bellyEdge=a.cfHem.shiftFractionTowards(a.hem,t.bellyAdjustmentX);e>a.waistIntersect.x&&c<30;)h.info("Rotation loop "+c),a.hem=a.hem.rotate(1,a.rotatePoint),a.sideSeamExtension=a.sideSeamExtension.rotate(1,a.rotatePoint),a.bellyEdge=a.bellyEdge.rotate(1,a.rotatePoint),c++,i.sideTarget=(new o).move(a.rotatePoint).line(a.sideSeamExtension).hide(),a.waistIntersect=i.sideTarget.intersectsY(r)[0];h.info("Waist front target is "+e+", waist front current is "+a.waistIntersect.x+", angle "+c),a.outerPlacketBottom.y=a.bellyEdge.y,a.cfHem.y=a.bellyEdge.y,t.bustDart?i.sideSeam=(new o).move(a.hem).line(a.dartBottomEdge).line(a.dartTopEdge).line(a.armhole).hide():i.sideSeam=(new o).move(a.hem).line(a.armhole).hide()}i.innerPlacketLine=(new o).move(a.innerPlacketTop).line(a.innerPlacketBottom).setClass("sa"),i.centerPlacketLine=(new o).move(a.centerPlacketTop).line(a.centerPlacketBottom).setClass("sa").setClass("lining"),i.edgePlacketLine=(new o).move(a.outerPlacketTop).line(a.outerPlacketBottom).setClass("sa"),i.centerLine=(new o).move(a.cfNeck).line(a.cfHem).setClass("sa").hide();let b=t.closureCount;b--;let w=[];a.topButton=a.cfNeck.shiftTowards(a.cfHem,f/2),s.top_button=new n("button",a.topButton);for(let C=1;C<b;C++)w.push(a.topButton.shiftFractionTowards(a.cfHem,C/b));for(let C in w)s[C+"_button"]=new n("button",w[C]);if(i.saBase=(new o).move(a.outerPlacketBottom),t.useBellyAdjustment&&(i.saBase=i.saBase.line(a.bellyEdge)),i.saBase=i.saBase.line(a.hem).join(i.sideSeam).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow),t.bustDart&&t.draftForHighBust?i.saBase=i.saBase.line(a.armholeIntercept):i.saBase=i.saBase.curve(a.armholeHollowCp2,a.armholePitchCp1,a.armholePitch),i.saBase=i.saBase.join(i.frontArmhole).line(a.s3CollarSplit).join(i.frontCollar).line(a.outerPlacketTop).line(a.outerPlacketBottom).close(),r&&(i.sa=i.saBase.offset(r).setClass("fabric sa"),i.sa.line(i.sa.start())),i.seam=i.saBase,t.frontWeltPockets){a.pocketBottom=a.cfHem.shiftFractionTowards(a.hem,t.pocketBottomX),a.pocketBottom.y=a.pocketBottom.shiftFractionTowards(a.hps,t.pocketBottomY).y,a.pocketTop=a.cfHem.shiftFractionTowards(a.hem,t.pocketTopX),a.pocketTop.y=a.pocketTop.shiftFractionTowards(a.hps,t.pocketTopY).y;let e=-(a.pocketBottom.y-a.pocketTop.y)/(a.pocketBottom.x-a.pocketTop.x),n=180*Math.atan(e)/3.14159;i.pocketLine=(new o).move(a.pocketTop).line(a.pocketBottom).hide();let s=t.pocketWeltWidth*p.hips/10;d.set("pocketLength",i.pocketLine.length()),h.info("Pocket length is "+i.pocketLine.length()),d.set("pocketWidth",2*s),a.pocketTopInner=a.pocketTop.shift(n-90,s),a.pocketTopOuter=a.pocketTop.shift(n+90,s),a.pocketBottomInner=a.pocketBottom.shift(n-90,s),a.pocketBottomOuter=a.pocketBottom.shift(n+90,s),i.pocketOutline=(new o).move(a.pocketTopInner).line(a.pocketTopOuter).line(a.pocketBottomOuter).line(a.pocketBottomInner).close().setClass("sa"),h.info("Pocket angle is "+n)}d.set("frontWaistLength",a.cfHem.dist(a.hem)),l("rmtitle"),d.cutlist.addCut({cut:!1}),d.cutlist.addCut({cut:2,from:"fabric",identical:!1}),d.cutlist.addCut({cut:2,from:"lining",identical:!1}),a.title=a.outerPlacketTop.shiftFractionTowards(a.hem,.5),a.title.y=a.title.shiftFractionTowards(a.hem,.5).y,l("title",{at:a.title,nr:1,title:"front"}),l("rmVd","hTotal"),l("rmVd","hHemToArmholePitch"),l("rmVd","hHemToShoulder"),l("rmVd","hHemToArmhole"),l("rmVd","hHemToWaist"),l("rmVd","hHemToNeckOpeningBottom");const k=a.armhole.x>a.hem.x?a.armhole.x:a.hem.x;return l("hd",{id:"wHem",from:a.cfHem,to:a.hem,y:a.cfHem.y+r+15}),l("hd",{id:"wChest",from:a.cfHem,to:a.armhole,y:a.armhole.y}),l("hd",{id:"wArmhole",from:a.cfHem,to:a.frontArmholePitch,y:a.frontArmholePitch.y}),l("hd",{id:"wPlacket",from:a.outerPlacketTop,to:a.cfNeck,y:a.cfNeck.y-r-15}),l("hd",{id:"wGreen",from:a.outerPlacketTop,to:a.centerPlacketTop,y:a.cfNeck.y+15}),l("hd",{id:"wGreenOffset",from:a.centerPlacketTop,to:a.innerPlacketTop,y:a.cfNeck.y+15}),l("hd",{id:"wGreenBottom",from:a.outerPlacketTop,to:a.centerPlacketTop,y:a.cfHem.y-15}),l("vd",{id:"hNeck",from:a.cfNeck,to:a.s3CollarSplit,x:a.cfNeck.x}),l("vd",{id:"hTotal",from:a.cfHem,to:a.s3CollarSplit,x:k+r+30}),l("vd",{id:"hHemToWaist",from:a.hem,to:a.armhole,x:k+r+15}),t.bustDart&&0!=t.draftForHighBust?(l("ld",{id:"sideSeamTop",from:a.armhole,to:a.dartTopEdge,d:-10}),l("ld",{id:"sideSeamBottom",from:a.dartBottomEdge,to:a.hem,d:-10}),l("vd",{id:"bustDartHeight",from:a.hem,to:a.sideSeamIntercept,x:a.sideSeamIntercept.x-30}),l("vd",{id:"dartPointHeight",from:a.dartPoint,to:a.armhole,x:a.dartPoint.x}),l("hd",{id:"bustDartWidth",from:a.cfHem,to:a.sideSeamIntercept,y:a.sideSeamIntercept.y}),l("hd",{id:"bustPointWidth",from:a.cfHem,to:a.dartPoint,y:a.dartPoint.y}),l("ld",{id:"bustDartEdges",from:a.dartTopEdge,to:a.dartBottomEdge})):l("ld",{id:"sideSeam",from:a.armhole,to:a.hem,d:-10}),l("vd",{id:"hChestToArmHollow",from:a.armhole,to:a.backArmholePitch,x:a.armhole.x+r+15}),l("vd",{id:"hArmHollowToShoulder",from:a.backArmholePitch,to:a.s3ArmholeSplit,x:a.armhole.x+r+15}),l("vd",{id:"hShoulderSlope",from:a.s3ArmholeSplit,to:a.s3CollarSplit,x:a.s3ArmholeSplit.x+r+15}),l("pd",{id:"lArmhole",path:(new o).move(a.armhole).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.armholePitchCp1,a.armholePitch).reverse(),d:r+15}),t.frontWeltPockets&&(l("ld",{id:"pocketLength",from:a.pocketTopOuter,to:a.pocketBottomOuter}),l("ld",{id:"pocketWidth",to:a.pocketTopOuter.shiftFractionTowards(a.pocketBottomOuter,.5),from:a.pocketTopInner.shiftFractionTowards(a.pocketBottomInner,.5)}),l("vd",{id:"pocketBottomHeight",to:a.cfHem,from:a.pocketBottom,x:a.pocketBottom.x}),l("hd",{id:"pocketBottomX",from:a.cfHem,to:a.pocketBottom,y:a.pocketBottom.y}),l("vd",{id:"pocketTopHeight",to:a.cfHem,from:a.pocketTop,x:a.pocketTop.x-15}),l("hd",{id:"pocketTopX",from:a.cfHem,to:a.pocketTop,y:a.pocketTop.y})),c}};const Gr={name:"jett.back",from:N,after:jr,hide:n.V9.HIDE_TREE,measurements:["hips"],options:{chestEase:{pct:10,min:-15,max:50,menu:"fit"},hipsEase:{pct:10,min:-15,max:50,menu:"fit"},yoke:{bool:!0,menu:"construction"},yokesplit:{pct:30,min:5,max:80,menu:"style"}}
1,draft:function({options:t,Point:e,Path:o,points:a,paths:i,Snippet:n,snippets:s,sa:r,macro:l,part:c,measurements:p,store:d,log:h}){if(t.ribbing){let t=d.get("ribbingHeight");for(let e of["cbHips","hem","cbHem"])a[e]=a[e].shift(90,t)}return a.hem.x=p.hips*(1+t.hipsEase)/4,t.yoke?(a.armholesplit=i.backArmhole.shiftFractionAlong(t.yokesplit),a.centertop=new e(0,a.armholesplit.y),delete i.saBase,i.saBase=(new o).move(a.cbHem).line(a.hem).line(a.armhole).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.armholePitchCp1,a.armholePitch).line(a.armholesplit).line(a.centertop).hide(),i.seam=(new o).move(a.centertop).line(a.cbHips).join(i.saBase).setClass("fabric").unhide(),r&&(i.sa=i.saBase.offset(r).setClass("fabric sa").move(a.cbHips),i.sa.line(i.sa.start())),l("cutonfold",{from:a.centertop,to:a.cbHem,grainline:!0}),l("rmHd","lShoulder"),l("rmHd","wCFrontToHps"),l("rmLd","lShoulder"),l("rmVd","hTotal"),l("rmVd","hHemToNeckOpeningBottom"),l("rmVd","hHemToShoulder"),l("rmVd","hHemToArmholePitch"),l("rmVd","hHemToArmhole"),l("rmHd","wHem"),l("rmVd","hHemToWaist"),l("rmPd","lShoulderToArmholePitch"),l("rmPd","lArmhole"),delete i.waist,l("hd",{id:"wHem",from:a.cbHem,to:a.hem,y:a.hem.y+r+15}),l("hd",{id:"wTop",from:a.centertop,to:a.armholesplit,y:a.centertop.y-r-15}),l("hd",{id:"wChest",from:a.centertop,to:a.armhole,y:a.armhole.y}),l("hd",{id:"armholeHoriz",from:a.armholesplit,to:a.armhole,y:a.centertop.y}),l("vd",{id:"hHemToWaist",from:a.cbHem,to:a.cbWaist,x:a.cbHips.x-15}),l("vd",{id:"hWaistToChest",from:a.cbWaist,to:a.cbArmhole,x:a.cbHips.x-15}),l("vd",{id:"hChestToTop",from:a.cbArmhole,to:a.centertop,x:a.cbHips.x-15}),l("vd",{id:"hTotal",from:a.cbHem,to:a.centertop,x:a.cbHips.x-30}),a.title=a.centertop.shiftFractionTowards(a.hem,.5)):(l("vd",{id:"hTotal",from:a.s3CollarSplit,to:a.hem,x:a.cbHem.x-30}),l("vd",{id:"hHemToNeckOpeningBottom",from:a.cbNeck,to:a.hem,x:a.cbHem.x-15}),l("vd",{id:"hHemToWaist",from:a.cbHem,to:a.cbWaist,x:a.cbHem.x+30}),l("vd",{id:"hHemToArmhole",from:a.hem,to:a.armhole,x:a.armhole.x+15}),l("vd",{id:"hHemToArmholePitch",from:a.hem,to:a.armholePitch,x:a.armhole.x+30}),l("vd",{id:"hHemToShoulder",from:a.hem,to:a.s3ArmholeSplit,x:a.armhole.x+45}),l("hd",{id:"wHem",from:a.cbHem,to:a.hem,y:a.hem.y+r+15}),l("hd",{id:"wArmhole",from:a.cbHem,to:a.armhole,y:a.armhole.y}),l("hd",{id:"wArmholeHollow",from:a.cbHem,to:a.backArmholePitch,y:a.backArmholePitch.y}),l("cutonfold",{from:a.cbNeck,to:a.cbHem,grainline:!0}),delete i.waist,a.title=a.cbNeck.shiftFractionTowards(a.hem,.5),i.saBase=(new o).move(a.cbHem).line(a.hem).line(a.armhole).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.armholePitchCp1,a.armholePitch).join(i.backArmhole).line(a.s3CollarSplit).join(i.backCollar).hide(),i.seam=(new o).move(a.cbNeck).line(a.cbHips).join(i.saBase).setClass("fabric")),l("rmtitle"),d.cutlist.addCut({cut:!1}),d.cutlist.addCut({cut:!1,from:"lining"}),d.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),d.cutlist.addCut({cut:1,from:"lining",onFold:!0}),l("ld",{id:"sideSeamLength",from:a.armhole,to:a.hem,d:-15-r}),l("title",{at:a.title,nr:2,title:"back"}),c}};const Ur={name:"jett.yoke",from:N,after:Gr,hide:n.V9.HIDE_TREE,options:{},draft:function({options:t,Point:e,Path:o,points:a,paths:i,Snippet:n,snippets:s,sa:r,macro:l,part:c,store:p}){if(!t.yoke)return c.hide();a.armholesplit=i.backArmhole.shiftFractionAlong(t.yokesplit),a.centerbottom=new e(0,a.armholesplit.y),delete i.saBase,delete i.waist,delete i.chest,delete s.logo,l("rmbanner","chestLine"),l("rmbanner","waistLine");let d=a.frontArmholePitchCp1.y;for(const h in a)a[h].y>d&&delete a[h];return i.saBase=(new o).move(a.centerbottom).line(a.armholesplit).join(i.backArmhole).line(a.s3CollarSplit).join(i.backCollar).trim().hide(),i.seam=(new o).move(a.cbNeck).line(a.centerbottom).join(i.saBase).setClass("fabric"),r&&(i.sa=(new o).move(a.centerbottom).line(a.armholesplit).join(i.saBase).offset(r).setClass("fabric sa"),i.sa.line(i.sa.start())),p.cutlist.addCut({cut:!1}),l("cutonfold",{from:a.cbNeck,to:a.centerbottom,grainline:!0}),p.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),l("rmHd","lShoulder"),l("rmHd","wCFrontToHps"),l("rmLd","lShoulder"),l("rmVd","hTotal"),l("rmVd","hHemToNeckOpeningBottom"),l("rmVd","hHemToShoulder"),l("rmVd","hHemToArmholePitch"),l("rmVd","hHemToArmhole"),l("rmHd","wHem"),l("rmVd","hHemToWaist"),l("rmPd","lShoulderToArmholePitch"),l("rmPd","lArmhole"),delete s.armholePitchNotch,l("hd",{id:"wHem",from:a.centerbottom,to:a.armholesplit,y:a.centerbottom.y+r+15}),l("hd",{id:"wTop",from:a.centerbottom,to:a.s3ArmholeSplit,y:a.s3CollarSplit.y-r-30}),l("hd",{id:"wCollar",from:a.centerbottom,to:a.s3CollarSplit,y:a.s3CollarSplit.y-r-15}),l("hd",{id:"wShoulder",from:a.s3CollarSplit,to:a.s3ArmholeSplit,y:a.s3CollarSplit.y-r-15}),l("vd",{id:"hInner",from:a.centerbottom,to:a.cbShoulder,x:a.centerbottom.x-r-15}),l("vd",{id:"hCollar",from:a.cbShoulder,to:a.cbHps,x:a.centerbottom.x-r-15}),l("vd",{id:"hTotal",from:a.centerbottom,to:a.cbHps,x:a.centerbottom.x-r-30}),a.title=a.cbShoulder.shiftFractionTowards(a.armholesplit,.5),a.title=a.title.shift(180,a.s3ArmholeSplit.x/4),l("title",{at:a.title,nr:4,title:"yoke",scale:.7}),c}};const Yr={name:"jett.sleeve",from:y,after:jr,hide:n.V9.HIDE_TREE,options:{cuffEase:{pct:60,min:-8,max:100,menu:"fit"},libraryFitSleeve:!0},draft:function({options:t,Point:e,Path:o,points:a,paths:i,Snippet:n,snippets:s,sa:r,macro:l,part:c,measurements:p,store:d}){if(t.ribbing){let t=d.get("ribbingHeight");for(let e of["wristLeft","centerWrist","wristRight"])a[e]=a[e].shift(90,t);i.seam=(new o).move(a.bicepsLeft).move(a.wristLeft).move(a.wristRight).line(a.bicepsRight).join(i.sleevecap).close().setClass("fabric"),r&&(i.sa=i.seam.offset(r).setClass("fabric sa"))}return l("rmHd","wCuff"),l("rmVd","hCuffToArmhole"),l("rmVd","hFull"),l("rmGrainline","grainline"),l("vd",{id:"hTotal",from:a.sleeveTop,to:a.centerWrist,x:a.bicepsLeft.x-r-30}),l("vd",{id:"hSleeve",from:a.bicepsLeft,to:a.centerWrist,x:a.bicepsLeft.x-r-15}),l("vd",{id:"hSleeveCap",from:a.sleeveTop,to:a.bicepsLeft,x:a.bicepsLeft.x-r-15}),l("hd",{id:"wWrist",from:a.wristLeft,to:a.wristRight,y:a.centerWrist.y+r+15}),l("grainline",{from:a.sleeveTop,to:a.centerWrist}),l("rmtitle"),d.cutlist.addCut({cut:!1}),d.cutlist.addCut({cut:!1,from:"lining"}),d.cutlist.addCut({cut:2,from:"fabric",identical:!1}),d.cutlist.addCut({cut:2,from:"lining",identical:!1}),l("title",{at:a.title,nr:3,title:"sleeve"}),c}};function $r(t,e){const{store:o,measurements:a,options:i,points:s,paths:r,Path:l,Point:c,expand:p,sa:d,macro:h,units:m}=t.shorthand();(void 0===o.get("ribbingHeight")||t.context.settings.sample)&&o.set("ribbingHeight",(a.hpsToWaistBack+a.waistToHips)*i.ribbingHeight);const f=o.get("ribbingHeight");if(!p){const a=d?2*d:0;return o.flag.note({msg:`huey:cut${(0,n.ZH)(t.name.split(".")[1])}`,notes:[d?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:m(2*f+a),l:m(e+a)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),o.flag.preset("expandIsOff"),t.hide()}o.flag.preset("expandIsOn"),s.topLeft=new c(0,0),s.topRight=new c(2*f,0),s.bottomLeft=new c(0,e),s.bottomRight=new c(s.topRight.x,e),r.seam=(new l).move(s.bottomRight).line(s.topRight).line(s.topLeft).line(s.bottomLeft).line(s.bottomRight).close().addClass("various"),d&&(r.sa=r.seam.offset(d).addClass("various s
1a")),s.title=new c(s.bottomRight.x/3,s.bottomRight.y/3),h("vd",{id:"hFull",from:s.bottomRight,to:s.topRight,x:s.topRight.x+d+15}),h("hd",{id:"wFull",from:s.topLeft,to:s.topRight,y:s.topRight.y-d-15})}const zr={name:"jett.cuff",options:{ribbingStretch:{pct:15,min:0,max:30,menu:"construction"}},draft:function({points:t,measurements:e,options:o,macro:a,store:i,part:n}){return o.ribbing?($r(n,e.wrist*(1+o.cuffEase)*(1-o.ribbingStretch)),i.cutlist.setCut({cut:2,from:"ribbing",identical:!0}),a("rmTitle","title_notes"),a("title",{at:t.title,nr:6,title:"cuff"}),n):n.hide()}};const Jr={name:"jett.waistband",after:jr,cuff:zr,options:{ribbingEndsPercentage:{pct:5,min:0,max:20,menu:"construction"}},draft:function({points:t,measurements:e,options:o,macro:a,store:i,part:n}){return o.ribbing?($r(n,((1+o.hipsEase)*e.hips/2+2*i.get("frontWaistLength"))*(1-o.ribbingStretch)*(1-o.ribbingEndsPercentage)),i.cutlist.setCut({cut:1,from:"ribbing"}),a("title",{at:t.title,nr:7,title:"waistband"}),n):n.hide()}};const Kr={name:"jett.waistband_ends",after:jr,options:{ribbingEndsPercentage:{pct:5,min:0,max:20,menu:"style"}},draft:function({options:t,Point:e,Path:o,points:a,paths:i,Snippet:n,snippets:s,sa:r,macro:l,part:c,measurements:p,store:d}){if(!t.ribbing)return c.hide();let h=2*d.get("ribbingHeight"),m=p.hips*(1+t.hipsEase)*t.ribbingEndsPercentage;a.topLeft=new e(0,0),a.topRight=new e(m,0),a.bottomRight=new e(m,h),a.bottomLeft=new e(0,h),a.centerLeft=new e(0,h/2),a.centerRight=new e(m,h/2),i.seam=(new o).move(a.topLeft).line(a.topRight).line(a.bottomRight).line(a.bottomLeft).line(a.topLeft).reverse(),r&&(i.sa=i.seam.offset(r).setClass("fabric sa"),i.sa.line(i.sa.start())),i.foldMark=(new o).move(a.centerLeft).line(a.centerRight).setClass("fabric sa"),d.cutlist.setCut({cut:2,from:"fabric"}),a.title=a.topLeft.shiftFractionTowards(a.bottomRight,.5),a.title=a.title.shift(180,m/4),l("title",{at:a.title,nr:8,title:"waistband_ends",scale:.6}),l("hd",{id:"wTotal",from:a.topLeft,to:a.topRight,y:a.bottomLeft.y+r+15}),l("vd",{id:"hTotal",from:a.topLeft,to:a.bottomLeft,x:a.bottomLeft.x-r-15});let f=d.get("placketWidth");return a.buttonPoint=new e(f/2,3*h/4),s.bottom_button=new n("button",a.buttonPoint),c}};const Vr={name:"jett.pocket_welt",after:jr,options:{},draft:function({options:t,Point:e,Path:o,points:a,paths:i,Snippet:n,snippets:s,sa:r,macro:l,part:c,measurements:p,store:d,log:h}){if(!t.frontWeltPockets)return c.hide(),c;h.info("Pocket length is "+d.get("pocketLength"));const m=d.get("pocketLength"),f=2*d.get("pocketWidth");return a.topLeft=new e(0,0),a.topRight=new e(m,0),a.bottomRight=new e(m,f),a.bottomLeft=new e(0,f),i.seam=(new o).move(a.topLeft).line(a.topRight).line(a.bottomRight).line(a.bottomLeft).line(a.topLeft).reverse(),r&&(i.sa=i.seam.offset(r).setClass("fabric sa"),i.sa.line(i.sa.start())),d.cutlist.setCut({cut:2,from:"fabric"}),a.title=a.topLeft.shiftFractionTowards(a.bottomRight,.5),l("title",{at:a.title,nr:10,title:"pocket_welt",scale:.3}),l("hd",{id:"wTotal",from:a.topLeft,to:a.topRight,y:a.bottomLeft.y+r+15}),l("vd",{id:"hTotal",from:a.topLeft,to:a.bottomLeft,x:a.bottomLeft.x-r-15}),c}};const Xr={name:"jett.collar_ribbing",measurements:["neck"],options:{collarEase:{pct:2,min:-10,max:50,menu:"fit"},ribbedCollarWidth:{pct:20,min:1,max:80,menu:"style.collar"},ribbedCollarCurve:{pct:40,min:0,max:50,menu:"style.collar"}},draft:function({options:t,Point:e,Path:o,points:a,paths:i,Snippet:n,snippets:s,sa:r,macro:l,part:c,log:p,measurements:d,store:h}){let m=d.neck*(1+t.collarEase),f=m*t.ribbedCollarWidth;return a.centerTop=new e(0,0),a.centerBottom=new e(0,f),a.outerCenter=new e(m/2,f/2),a.outerControlTop=new e(m/2,f/4),a.outerControlBottom=new e(m/2,3*f/4),a.halfTop=new e(t.ribbedCollarCurve*m*.5,0),a.halfControlTop=new e(t.ribbedCollarCurve*m,0),a.halfBottom=new e(t.ribbedCollarCurve*m*.5,f),a.halfControlBottom=new e(t.ribbedCollarCurve*m,f),i.saBase=(new o).move(a.centerTop).line(a.halfTop).curve(a.halfControlTop,a.outerControlTop,a.outerCenter).curve(a.outerControlBottom,a.halfControlBottom,a.halfBottom).line(a.centerBottom).reverse().hide(),i.seam=i.saBase.unhide().close(),r&&(i.sa=i.saBase.offset(r).setClass("fabric sa"),i.sa.line(i.sa.start())),l("hd",{id:"wTotal",from:a.centerTop,to:a.outerCenter,y:a.centerTop.y-r-30}),l("hd",{id:"wCurve",from:a.centerTop,to:a.halfTop,y:a.centerTop.y-r-15}),l("vd",{id:"hTotal",from:a.centerTop,to:a.centerBottom,x:a.centerTop.x-r-15}),l("cutonfold",{from:a.centerTop,to:a.centerBottom,grainline:!0}),h.cutlist.setCut({cut:1,from:"ribbing",onFold:"true"}),a.title=a.centerTop.shiftFractionTowards(a.halfBottom,.5),l("title",{at:a.title,nr:5,title:"collar_ribbing",scale:.6}),c}};const Qr={name:"jett.pocket_bag_front",after:jr,options:{pocketCornerOffset:{pct:2,min:0,max:4,menu:"advanced"}},draft:function({options:t,Point:e,Path:o,points:a,paths:i,Snippet:n,snippets:s,sa:r,macro:l,part:c,measurements:p,store:d,log:h}
1){if(!t.frontWeltPockets)return c.hide(),c;let m=p.hips*(1+t.hipsEase)/4,f=p.hpsToWaistBack+p.waistToHips-d.get("ribbingHeight"),u=p.chest*(1+t.chestEase)*t.placketwidth/2;a.pocketBottom=new e(m*t.pocketBottomX,-1*f*t.pocketBottomY),a.pocketTop=new e(m*t.pocketTopX,-1*f*t.pocketTopY);let g=-(a.pocketBottom.y-a.pocketTop.y)/(a.pocketBottom.x-a.pocketTop.x),b=180*Math.atan(g)/3.14159,w=t.pocketWeltWidth*p.hips/10;a.pocketTopInner=a.pocketTop.shift(b-90,w),a.pocketTopOuter=a.pocketTop.shift(b+90,w),a.pocketBottomInner=a.pocketBottom.shift(b-90,w),a.pocketBottomOuter=a.pocketBottom.shift(b+90,w);let k=w+p.hips*t.pocketCornerOffset;return a.bagTopLeft=new e(-u,a.pocketTop.y-k),a.bagBottomLeft=new e(-u,0),a.bagBottomRight=new e(a.pocketBottom.x+k,0),a.bagTopCorner=new e(a.pocketTop.x+k,a.pocketTop.y-k),a.bagBottomCorner=new e(a.pocketBottom.x+k,a.pocketBottom.y-k),i.saBase=(new o).move(a.bagTopLeft).line(a.bagTopCorner).line(a.bagBottomCorner).line(a.bagBottomRight).line(a.bagBottomLeft).reverse().close(),r&&(i.sa=i.saBase.offset(r).setClass("fabric sa"),i.sa.line(i.sa.start())),i.pocketOutline=(new o).move(a.pocketTopInner).line(a.pocketTopOuter).line(a.pocketBottomOuter).line(a.pocketBottomInner).close().setClass("sa"),a.placketMarkTop=a.bagTopLeft.shift(0,2*u),a.placketMarkBottom=a.bagBottomLeft.shift(0,2*u),i.placketMark=(new o).move(a.placketMarkTop).line(a.placketMarkBottom).setClass("sa"),d.cutlist.addCut({cut:2,from:"fabric",identical:!1}),d.cutlist.addCut({cut:2,from:"lining",identical:!1}),a.title=a.bagBottomLeft.shiftFractionTowards(a.bagTopCorner,.4),l("title",{at:a.title,nr:9,title:"pocket_bag_front"}),l("vd",{id:"hTotal",from:a.bagTopLeft,to:a.bagBottomLeft,x:a.bagTopLeft.x-15}),l("hd",{id:"wBottom",from:a.bagBottomLeft,to:a.bagBottomRight,y:a.bagBottomLeft.y+r+15}),l("hd",{id:"wTop",from:a.bagTopLeft,to:a.bagTopCorner,y:a.bagTopLeft.y-r-15}),l("vd",{id:"hLower",from:a.bagBottomCorner,to:a.bagBottomRight,x:a.bagBottomRight.x+r+15}),l("hd",{id:"placketMark",from:a.bagTopLeft,to:a.placketMarkTop,y:a.bagTopLeft.y+15}),l("ld",{id:"pocketDiagonal",to:a.bagTopCorner,from:a.pocketTopOuter}),l("ld",{id:"pocketLength",to:a.pocketBottomOuter,from:a.pocketTopOuter}),l("ld",{id:"pocketWidth",from:a.pocketTopInner,to:a.pocketTopOuter}),c}},qr=(0,n.D4)([_,_r]),Zr=new n.pT({data:Mr,parts:[jr,Gr,Ur,Yr,Jr,Kr,Vr,Xr,Qr,zr]}),tl={en:JSON.parse('{"t":"Lily Leggings","d":"A FreeSewing pattern for basic leggings","p":{"back":"Back","front":"Front","waistband":"Waistband"},"s":{"adjustEase.t":"Adjust ease settings to match fabric stretch","adjustEase.d":"Knee, seat and waist ease should be set to fabric stretch * -1/10; click the button to adjust all three.","adjustEase":"adjust ease"},"o":{"lengthReduction":{"t":"Length reduction","d":"Controls how much the leggings are shortened with respect to ankle length"},"fabricStretch":{"t":"Fabric stretch","d":"How much the fabric can stretch horizontally; this is used to calculate ease"},"fitGuides":{"t":"Show measurement guides","d":"Show measurement guides for horizontal measures"},"waistEase":{"t":"Waist ease","d":"Controls the amount of ease at your waist"},"seatEase":{"t":"Seat ease","d":"Controls the amount of ease at your seat"},"kneeEase":{"t":"Knee ease","d":"Controls the amount of ease at the knee"},"waistHeight":{"t":"Waist height","d":"Controls the height of the waist, 100% = waist height, 0% = hip height"},"crotchDrop":{"t":"Crotch drop","d":"Lowers the crotch for a more relaxed fit"},"crossSeamCurveStart":{"t":"Start of the cross seam curve","d":"Controls how far into the cross seam we start to curve"},"crossSeamCurveBend":{"t":"Cross seam bend","d":"Controls the curvature of the cross seam"},"crossSeamCurveAngle":{"t":"Cross seam angle","d":"Controls the angle of the cross seam"},"crotchSeamCurveStart":{"t":"Start of the crotch seam curve","d":"Controls how far into the crotch seam we start to curve"},"crotchSeamCurveBend":{"t":"Crotch seam bend","d":"Controls the curvature of the crotch seam"},"crotchSeamCurveAngle":{"t":"Crotch seam angle","d":"Controls the angle of the crotch seam"},"grainlinePosition":{"t":"Grainline position","d":"Controls the horizontal position of the leg relative to the seat"},"waistbandWidth":{"t":"Waistband width","d":"The width of the waistband"},"waistAngle":{"t":"Waistband angle","d":"Change the angle of the waistband when viewed from the side"},"useWaistAngleFor":{"t":"Use waistband angle for","d":"Apply the waistband angle to the front, back or both"},"useWaistAngleFor.both":{"t":"Both","d":"Apply the waistband angle to the front and back"},"useWaistAngleFor.backOnly":{"t":"Back","d":"Apply the waistband angle only to the back"},"useWaistAngleFor.frontOnly":{"t":"Front","d":"Apply the waistband angle only to the front"}}}')},el=JSON.parse('{"id":"lily","name":"Lily leggings","code":["Anna Puk","Joost De Cock"],"description":"A FreeSewing pattern for basic leggings","de
1sign":"Anna Puk","difficulty":2,"tags":["bottoms"],"techniques":["elastic","curved-seam","hem"],"version":"4.6.0","pkg":"@freesewing/lily","collection":true}');const ol={name:"lily.back",from:Fo,measurements:["ankle","heel"],options:{fitGuides:{bool:!1,menu:"advanced"},fitKnee:!0,legBalance:.5,waistBalance:.5,crotchDrop:{pct:0,min:0,max:15,menu:"advanced"},waistHeight:{...Fo.options.waistHeight,pct:50},fabricStretch:{pct:40,min:0,max:50,menu:"fit"},waistEase:{pct:-4,min:-20,max:0,...(0,n.Wx)("waist"),menu:"fit"},seatEase:{pct:-4,min:-20,max:0,...(0,n.Wx)("seat"),menu:"fit"},kneeEase:{pct:-4,min:-20,max:0,...(0,n.Wx)("knee"),menu:"fit"},lengthBonus:0,lengthReduction:{pct:0,min:0,max:100,toAbs:(t,{measurements:e})=>e.waistToFloor*t,menu:"style"},waistbandWidth:{...Fo.options.waistbandWidth,menu:"style"}},hide:"HIDE_TREE",draft:function({points:t,Point:e,paths:o,Path:a,measurements:i,options:n,complete:s,paperless:r,store:l,macro:c,utils:p,snippets:d,Snippet:h,sa:m,absoluteOptions:f,part:u,log:g,units:b}){const w=-n.fabricStretch/10,k=.005;(Math.abs(n.waistEase-w)>k||Math.abs(n.seatEase-w)>k||Math.abs(n.kneeEase-w)>k)&&l.flag.note({msg:"lily:adjustEase",replace:{stretch:b(n.fabricStretch),ease:w},suggest:{text:"adjustEase",icon:"options",update:{settings:["options",{...n,waistEase:w,seatEase:w,kneeEase:w}]}}});const C=()=>(new a).move(t.fork).curve(t.forkCp2,t.kneeInCp1,t.kneeIn).curve(t.kneeInCp2,t.floorInCp2,t.floorIn),v=()=>{const e=t.styleWaistOutLily||t.waistOut;return t.waistOut.x>t.seatOut.x?(new a).move(t.floorOut).curve(t.floorOutCp2,t.kneeOutCp1,t.kneeOut).curve(t.kneeOutCp2,t.seatOut,e):(new a).move(t.floorOut).curve(t.floorOutCp2,t.kneeOutCp1,t.kneeOut).curve(t.kneeOutCp2,t.seatOutCp1,t.seatOut).curve_(t.seatOutCp2,e)},y=()=>(new a).move(t.waistIn).line(t.crossSeamCurveStart).curve(t.crossSeamCurveCp1,t.crossSeamCurveCp2,t.fork).length()-i.crossSeamBack,T=()=>{t.crossSeamCurveStart=t.waistIn.shiftFractionTowards(t.cbSeat,n.crossSeamCurveStart),t.crossSeamCurveMax=p.beamsIntersect(t.waistIn,t.cbSeat,t.fork,t.fork.shift(0,1)),t.crossSeamCurveCp1=t.crossSeamCurveStart.shiftFractionTowards(t.crossSeamCurveMax,n.crossSeamCurveBend),t.crossSeamCurveCp2=t.fork.shiftFractionTowards(t.crossSeamCurveMax,n.crossSeamCurveBend).rotate(n.crossSeamCurveAngle,t.fork)},x=i.ankle*(1+n.fabricStretch)>i.heel?(1-n.fabricStretch/10)*(i.ankle/4):i.heel/4/(1+n.fabricStretch);if(t.floorOut=t.floor.shift(0,x),t.floorIn=t.floorOut.flipX(t.floor),l.set("halfAnkle",x),t.floorInCp2=t.floorIn.shift(90,t.knee.dy(t.floor)/3),t.kneeInCp2=t.kneeIn.shift(90,-t.knee.dy(t.floor)/3),t.floorOutCp2=t.floorOut.shift(90,t.knee.dy(t.floor)/3),t.kneeOutCp1=t.kneeOut.shift(90,-t.knee.dy(t.floor)/3),T(),n.fitCrossSeam&&n.fitCrossSeamBack){let e=y(),o=0;do{o++;for(const o of["waistIn","waistOut"])t[o]=t[o].rotate(e/15,t.seatOut);t.fork=t.fork.shift(0,e/5),t.forkCp2=t.crossSeamCurveCp2.rotate(-90,t.fork),T(),e=y()}while(Math.abs(e)>1&&o<15)}l.set("inseamBack",C().length()),l.set("outseamBack",v().length()),l.set("waistbandWidth",f.waistbandWidth),n.waistHeight<1||f.waistbandWidth>0?(t.styleWaistOutLily=v().reverse().shiftAlong(i.waistToHips*(1-n.waistHeight)+f.waistbandWidth),t.styleWaistInLily=p.beamsIntersect(t.styleWaistOutLily,t.styleWaistOutLily.shift(t.waistOut.angle(t.waistIn),10),t.waistIn,t.crossSeamCurveStart)):(t.styleWaistInLily=t.waistIn.clone(),t.styleWaistOutLily=t.waistOut.clone()),t.seatOutCp2.y=t.seatOut.y-t.styleWaistOutLily.dy(t.seatOut)/2,l.set("backWaist",t.styleWaistInLily.dist(t.styleWaistOutLily)),o.seam=(()=>{const e=t.styleWaistInLily||t.waistIn;return C().line(t.floorOut).join(v()).line(e).line(t.crossSeamCurveStart).curve(t.crossSeamCurveCp1,t.crossSeamCurveCp2,t.fork).close()})().attr("class","fabric");let B=1;if(n.lengthReduction>0){let e=(1-n.lengthReduction)*i.waistToFloor;const s=t.waistX.dy(t.fork);let r,c;s>=.99*e&&(g.warn("length reduction capped; cutting off at fork"),e=1.01*s),.999<e/i.waistToKnee&&e/i.waistToKnee<1.001&&(e=1.001*i.waistToKnee),t.bottom=t.waistX.shift(270,e),e<i.waistToKnee?(B=0,t.waistOut.x>
1t.seatOut.x?(r=t.styleWaistOutLily,c=t.seatOut):(r=t.seatOut,c=t.seatOutCp1),t.bottomOut=p.beamIntersectsCurve(t.bottom.shift(0,999),t.bottom.shift(180,999),t.kneeOut,t.kneeOutCp2,c,r),t.bottomIn=p.beamIntersectsCurve(t.bottom.shift(0,999),t.bottom.shift(180,999),t.kneeIn,t.kneeInCp1,t.forkCp2,t.fork)):(t.bottomOut=p.beamIntersectsCurve(t.bottom.shift(0,999),t.bottom.shift(180,999),t.kneeOut,t.kneeOutCp1,t.floorOutCp2,t.floorOut),t.bottomIn=p.beamIntersectsCurve(t.bottom.shift(0,999),t.bottom.shift(180,999),t.kneeIn,t.kneeInCp2,t.floorInCp2,t.floorIn)),o.bottom=(new a).move(t.bottomIn).line(t.bottomOut);const d=o.seam.split(t.bottomIn);o.upperInseam=d[0];const h=d[1].split(t.bottomOut);o.upperOutseam=h[1],o.seam=o.upperInseam.join(o.bottom).join(o.upperOutseam),l.set("requestedLength",e)}else t.bottom=t.floor,t.bottomIn=t.floorIn,t.bottomOut=t.floorOut,o.bottom=(new a).move(t.bottomIn).line(t.bottomOut),o.upperInseam=C(),o.upperOutseam=v().join((new a).move(t.styleWaistOutLily).line(t.styleWaistInLily).line(t.crossSeamCurveStart).curve(t.crossSeamCurveCp1,t.crossSeamCurveCp2,t.fork)),o.bottom.hide(),o.upperInseam.hide(),o.upperOutseam.hide();return t.grainlineTop.y=t.styleWaistOutLily.y,t.grainlineBottom.y=t.bottom.y,c("grainline",{from:t.grainlineTop,to:t.grainlineBottom}),t.logoAnchor=new e(t.crossSeamCurveStart.x/2,t.fork.y),d.logo=new h("logo",t.logoAnchor),t.scalebox=t.logoAnchor.shiftFractionTowards(t.styleWaistOutLily.shiftFractionTowards(t.styleWaistInLily,.5),.5),c("scalebox",{at:t.scalebox}),t.titleAnchor=t.logoAnchor.shift(-90,60),c("title",{nr:1,title:"back",at:t.titleAnchor}),n.fitGuides&&(t.waistMid=t.waistOut.shiftFractionTowards(t.waistIn,.5),t.seatMid=t.waistMid.shiftTowards(t.waistIn,i.waistToSeat).rotate(90,t.waistMid),t.seatInTarget=t.seatOut.shiftOutwards(t.seatMid,i.seat/4),t.seatOutTarget=t.seatMid.shiftTowards(t.seatOut,i.seat/4),t.hipsInTarget=t.waistIn.shiftTowards(t.waistOut,i.waistToHips).rotate(-90,t.waistIn),t.hipsOutTarget=t.waistOut.shiftTowards(t.waistIn,i.waistToHips).rotate(90,t.waistOut),t.hipsIn=p.beamsIntersect(t.hipsOutTarget,t.hipsInTarget,t.waistIn,t.crossSeamCurveStart),t.crossSeamCurveStartMid=p.beamsIntersect(t.crossSeamCurveStart,t.crossSeamCurveStart.shift(t.waistIn.angle(t.waistOut),1),t.waistMid,t.seatMid),t.seatMid.y>t.crossSeamCurveStartMid.y?t.seatIn=p.lineIntersectsCurve(t.seatMid,t.seatInTarget,t.crossSeamCurveStart,t.crossSeamCurveCp1,t.crossSeamCurveCp2,t.fork):t.seatIn=p.beamsIntersect(t.seatMid,t.seatInTarget,t.waistIn,t.crossSeamCurveStart),t.waistOut.x>t.seatOut.x?(t.hipsOut=p.lineIntersectsCurve(t.hipsIn,t.hipsIn.rotate(180,t.hipsOutTarget),t.kneeOut,t.kneeOutCp2,t.seatOut,t.waistOut),t.seatOutNotch=p.lineIntersectsCurve(t.seatMid,t.seatOutTarget,t.kneeOut,t.kneeOutCp2,t.seatOut,t.waistOut)):(t.hipsOut=p.lineIntersectsCurve(t.hipsIn,t.hipsIn.rotate(180,t.hipsOutTarget),t.seatOut,t.seatOutCp2,t.waistOut,t.waistOut),t.seatOutNotch=t.seatOut),t.kneeOutNotch=t.kneeOut,t.kneeInNotch=t.kneeIn,c("sprinkle",{snippet:"notch",on:["seatOutNotch"]}),B&&c("sprinkle",{snippet:"notch",on:["kneeInNotch","kneeOutNotch"]}),c("sprinkle",{snippet:"bnotch",on:["crossSeamCurveStart","seatIn"]}),s&&(o.seatline=(new a).move(t.seatIn).line(t.seatOutNotch).addClass("fabric help").addText("Seat Line","center"),i.waistToHips*(1-n.waistHeight)+f.waistbandWidth<i.waistToHips&&(d.hipsIn=new h("bnotch",t.hipsIn),d.hipsOut=new h("notch",t.hipsOut),o.hipline=(new a).move(t.hipsIn).line(t.hipsOut).addClass("fabric help").addText("Hip Line","center")))),m&&(o.saBase=o.upperOutseam.join(o.upperInseam).hide(),o.hemBase=o.bottom.hide(),o.sa=o.hemBase.offset(3*m).join(o.saBase.offset(m)).close().addClass("fabric sa")),r&&(o.hint=(new a).move(t.crossSeamCurveStart).line(t.crossSeamCurveMax).line(t.fork).addClass("note lashed"),c("hd",{id:"wHem",from:t.bottomIn,to:t.bottomOut,y:t.bottomIn.y-30}),c("hd",{id:"wHemLeft",from:t.bottomIn,to:t.bottom,y:t.bottomIn.y-15}),c("hd",{id:"wHemRight",from:t.bottom,to:t.bottomOut,y:t.bottomIn.y-15}),c("vd",{id:"hHemToSideWaist",from:t.bottomOut,to:t.styleWaistOutLily,x:(t.seatOut.x>t.styleWaistOutLily.x?t.seatOut.x:t.styleWaistOutLily.x)+m+15}),c("vd",{id:"hHemToFork",from:t.bottomIn,to:t.fork,x:t.fork.x-m-15}),c("vd",{id:"hForkToCbWaist",from:t.fork,to:t.styleWaistInLily,x:t.fork.x-m-15}),c("vd",{id:"hFull",from:t.bottomIn,to:t.styleWaistInLily,x:t.fork.x-m-30}),c("vd",{id:"hStartCrotchCurveToCbWaist",from:t.crossSeamCurveStart,to:t.styleWaistInLily,x:t.crossSeamCurveStart.x-m-15}),c("hd",{id:"wCbWaistToPleat",from:t.styleWaistInLily,to:t.grainlineTop,y:t.styleWaistInLily.y-m-15}),c("hd",{id:"wStartCrotchCurveToPleat",from:t.crossSeamCurveStart,to:t.grainlineTop,y:t.styleWaistInLily.y-m-30}),c("hd",{id:"wForkProjectionToPleat",from:t.crossSeamCurveMax,to:t.grainlineTop,y:t.styleWaistInLily.y-m-45}),c("hd",{id:"wForkToPleat",from:t.fork,to:t.grainlineTop,y:t.styleWaistInLily.y-m-60}),c("hd",{id:"wPleatToSideWaist",from:t.grainlineTop,to:t.styleWaistOutLily,y:t.styleWaistInLily.y-m-15}),t.seatOut.x>t.styleWaistOutLily.x&&c("hd",{id:"wPleatToSideWaistAlt",from:t.grainlineTop,to:t.seatOut,y:t.styleWaistInLily.y-m-30})),u}};const al={name:"lily.front",from:Eo,after:ol,hide:"HIDE_TREE",draft:function({points:t,Point:e,paths:o,Path:a,measurements:i,options:n,complete:s,paperless:r,store:l,macro:c,utils:p,snippets:d,Snippet:h,sa:m,absoluteOptions:f,log:u,part:g}){const b=()=>(new a).move(t.floorIn).curve(t.floorInCp2,t.kneeInCp1,t.kneeIn).curve(t.kneeInCp2,t.forkCp1,t.fork),w=()=>{const e=t.styleWaistOutLily||t.waistOut;return t.waistOut.x<t.seatOut.x?(new a).move(e).curve(t.seatOut,t.kneeOutCp1,t.kneeOut).curve(t.kneeOutCp2,t.floorOutCp2,t.floorOut):(new a).move(e)._curve(t.seatOutCp1,t.seatOut).curve(t.seatOutCp2,t.kneeOutCp1,t.kneeOut).curve(t.kneeOutCp2,t.floorOutCp2,t.floorOut)},k=()=>(new a).move(t.waistIn).line(t.crotchSeamCurveStart).curve(t.crotchSeamCurveCp2,t.crotchSeamCurveCp1,t.fork).length()-i.crossSeamFront,C=()=>{t.crotchSeamCurveStart=t.waistIn.shiftFractionTowards(t.cfSeat,n.crotchSeamCurveStart),t.crotchSeamCurveMax=p.beamsIntersect(t.waistIn,t.cfSeat,t.fork,t.fork.shift(0,666)),t.crotchSeamCurveCp1=t.fork.shiftFractionTowards(t.crotchSeamCurveMax,n.crotchSeamCurveBend).rotate(-1*n.crotchSeamCurveAngle,t.fork),t.crotchSeamCurveCp2=t.crotchSeamCurveStart.shiftFractionTowards(t.crotchSeamCurveMax,n.crotchSeamCurveBend),t.forkCp1=t.crotchSeamCurveCp1.rotate(90,t.fork)},v=()=>b().length()-l.get("inseamBack"),y=()=>w().length()-l.get("outseamBack"),T=()=>{const t=v(),e=y();return Math.abs(t)>Math.abs(e)?e:t},x=e=>{const o="out"===e,a=["cfSeat","crotchSeamCurveCp1","crotchSeamCurveCp2","crotchSeamCurveStart","waistIn","cfWaist","waistOut"];a.push(o?"seatOut":"fork");const i=o?y:v;let n=0,s=i();do{for(const e of a)t[e]=t[e].rotate(s/10*(o?1:-1),t[o?"fork":"seatOut"]);n++,s=i()}while(Math.abs(s)>1&&n<20)},B=()=>x("out"),S=()=>x("in");if(t.floorOut=t.floor.shift(180,l.get("halfAnkle")),t.floorIn=t.floorOut.flipX(t.floor),t.floorInCp2=t.floorIn.shift(90,t.knee.dy(t.floor)/3),t.kneeInCp1=t.kneeIn.shift(90,-t.knee.dy(t.floor)/3),t.floorOutCp2=t.floorOut.shift(90,t.knee.dy(t.floor)/3),t.kneeOutCp2=t.kneeOut.shift(90,-t.knee.dy(t.floor)/3),C(),n.fitCrossSeam&&n.fitCrossSeamFront){let e=k(),o=0;do{o++;for(const o of["waistIn","waistOut","cfWaist"])t[o]=t[o].rotate(e/-15,t.seatOut);t.fork=t.fork.shift(180,e/5),C(),e=k()}while(Math.abs(e)>1&&o<15)}
1(v()<0&&y()<0||v()>0&&y()>0)&&(()=>{const e=["kneeInCp1","kneeInCp2","kneeOutCp1","kneeOutCp2","kneeIn","kneeOut","knee","floorInCp2","floorIn","floorOutCp2","floorOut","floor","grainlineBottom"];let o=T(),a=0;do{a++;for(const a of e)t[a]=t[a].shift(90,o);o=T()}while(Math.abs(o)>1&&a<10)})(),B(),S(),B(),S(),n.waistHeight<1||f.waistbandWidth>0?(t.styleWaistOutLily=w().shiftAlong(i.waistToHips*(1-n.waistHeight)+f.waistbandWidth),t.styleWaistInLily=p.beamsIntersect(t.styleWaistOutLily,t.styleWaistOutLily.shift(t.waistOut.angle(t.waistIn),10),t.waistIn,t.crotchSeamCurveStart)):(t.styleWaistInLily=t.waistIn.clone(),t.styleWaistOutLily=t.waistOut.clone()),l.set("frontWaist",t.styleWaistInLily.dist(t.styleWaistOutLily)),t.crotchSeamCurveStart.y<t.styleWaistInLily.y&&(t.crotchSeamCurveStart=t.styleWaistInLily.clone()),o.seam=(()=>{const e=t.styleWaistInLily||t.waistIn,o=t.styleWaistOutLily||t.waistOut;return w().line(t.floorIn).join(b()).curve(t.crotchSeamCurveCp1,t.crotchSeamCurveCp2,t.crotchSeamCurveStart).line(e).line(o).close()})().attr("class","fabric");let L=1;if(n.lengthReduction>0){let e,i,n=l.get("requestedLength"),s=t.waistX.dy(t.fork),r=t.waistX.dy(t.knee);s>n&&(n=1.01*s),.999<n/r&&n/r<1.001&&(n=1.001*r),t.bottom=t.waistX.shift(270,n),n<r?(L=0,t.waistOut.x<t.seatOut.x?(e=t.styleWaistOutLily,i=t.seatOut):(e=t.seatOut,i=t.seatOutCp2),t.bottomOut=p.lineIntersectsCurve(t.bottom.shift(0,999),t.bottom.shift(180,999),t.kneeOut,t.kneeOutCp1,i,e),t.bottomIn=p.lineIntersectsCurve(t.bottom.shift(0,999),t.bottom.shift(180,999),t.kneeIn,t.kneeInCp2,t.forkCp1,t.fork)):(t.bottomOut=p.lineIntersectsCurve(t.bottom.shift(0,999),t.bottom.shift(180,999),t.kneeOut,t.kneeOutCp2,t.floorOutCp2,t.floorOut),t.bottomIn=p.lineIntersectsCurve(t.bottom.shift(0,999),t.bottom.shift(180,999),t.kneeIn,t.kneeInCp1,t.floorInCp2,t.floorIn)),o.bottom=(new a).move(t.bottomOut).line(t.bottomIn);const c=o.seam.split(t.bottomOut);o.upperOutseam=c[0];const d=c[1].split(t.bottomIn);o.upperInseam=d[1],o.seam=o.upperOutseam.join(o.bottom).join(o.upperInseam)}else t.bottom=t.floor,t.bottomIn=t.floorIn,t.bottomOut=t.floorOut,o.bottom=(new a).move(t.bottomOut).line(t.bottomIn),o.upperInseam=b().curve(t.crotchSeamCurveCp1,t.crotchSeamCurveCp2,t.crotchSeamCurveStart).line(t.styleWaistInLily).line(t.styleWaistOutLily),o.upperOutseam=w(),o.bottom.hide(),o.upperInseam.hide(),o.upperOutseam.hide();return s&&(t.grainlineTop.y=t.styleWaistInLily.y,t.grainlineBottom.y=t.bottom.y,c("grainline",{from:t.grainlineTop,to:t.grainlineBottom}),t.logoAnchor=new e(t.crotchSeamCurveStart.x/2,t.fork.y),d.logo=new h("logo",t.logoAnchor),t.titleAnchor=t.logoAnchor.shift(-90,60),c("title",{nr:2,title:"front",at:t.titleAnchor}),n.fitGuides&&(t.waistMid=t.waistOut.shiftFractionTowards(t.waistIn,.5),t.seatMid=t.waistMid.shiftTowards(t.waistOut,i.waistToSeat).rotate(90,t.waistMid),t.seatInTarget=t.seatOut.shiftOutwards(t.seatMid,i.seat/4),t.seatOutTarget=t.seatMid.shiftTowards(t.seatOut,i.seat/4),t.hipsInTarget=t.waistIn.shiftTowards(t.waistOut,i.waistToHips).rotate(90,t.waistIn),t.hipsOutTarget=t.waistOut.shiftTowards(t.waistIn,i.waistToHips).rotate(-90,t.waistOut),t.hipsIn=p.beamsIntersect(t.hipsOutTarget,t.hipsInTarget,t.waistIn,t.crotchSeamCurveStart),t.crotchSeamCurveStartMid=p.beamsIntersect(t.crotchSeamCurveStart,t.crotchSeamCurveStart.shift(t.waistIn.angle(t.waistOut),1),t.waistMid,t.seatMid),t.seatInTemp=p.beamsIntersect(t.seatMid,t.seatInTarget,t.crotchSeamCurveStart,t.waistIn),t.seatInTemp.y<=t.crotchSeamCurveStartMid.y?t.seatIn=t.seatInTemp.clone():t.seatInTemp.y>t.fork.y?(u.warn("seat estimated to be below crotch; this is probably not accurate"),t.seatIn=t.fork.clone()):t.seatIn=p.beamIntersectsCurve(t.seatMid,t.seatInTarget,t.crotchSeamCurveStart,t.crotchSeamCurveCp2,t.crotchSeamCurveCp1,t.fork),t.waistOut.x<t.seatOut.x?(t.hipsOut=p.lineIntersectsCurve(t.hipsIn,t.hipsIn.rotate(180,t.hipsOutTarget),t.waistOut,t.seatOut,t.kneeOutCp1,t.kneeOut),t.seatOutNotch=p.lineIntersectsCurve(t.seatMid,t.seatOutTarget,t.waistOut,t.seatOut,t.kneeOutCp1,t.kneeOut)):(t.hipsOut=p.lineIntersectsCurve(t.hipsIn,t.hipsIn.rotate(180,t.hipsOutTarget),t.waistOut,t.waistOut,t.seatOutCp1,t.seatOut),t.seatOutNotch=t.seatOut),t.kneeOutNotch=t.kneeOut,t.kneeInNotch=t.kneeIn,c("sprinkle",{snippet:"notch",on:["crotchSeamCurveStart","seatIn","seatOutNotch"]}),L&&c("sprinkle",{snippet:"notch",on:["kneeInNotch","kneeOutNotch"]}),o.seatline=(new a).move(t.seatOutNotch).line(t.seatIn).addClass("fabric help").addText("Seat Line","center"),i.waistToHips*(1-n.waistHeight)+f.waistbandWidth<i.waistToHips&&(c("sprinkle",{snippet:"notch",on:["hipsIn","hipsOut"]}
1),o.hipline=(new a).move(t.hipsOut).line(t.hipsIn).addClass("fabric help").addText("Hip Line","center"))),m&&(o.saBase=o.upperInseam.join(o.upperOutseam).hide(),o.hemBase=o.bottom.hide(),o.sa=o.hemBase.offset(3*m).join(o.saBase.offset(m)).close().addClass("fabric sa")),r&&(o.hint=(new a).move(t.crotchSeamCurveStart).line(t.crotchSeamCurveMax).line(t.fork).addClass("note lashed"),c("hd",{id:"wHemLeftToPleat",from:t.bottomOut,to:t.bottom,y:t.bottomIn.y-15}),c("hd",{id:"wHemRightToPleat",from:t.bottom,to:t.bottomIn,y:t.bottomIn.y-15}),c("hd",{id:"wHem",from:t.bottomOut,to:t.bottomIn,y:t.bottomIn.y-30}),c("vd",{id:"hHemToFork",from:t.bottomOut,to:t.fork,x:t.fork.x+m+15}),c("vd",{id:"hForkToCfWaist",from:t.fork,to:t.styleWaistInLily,x:t.fork.x+m+15}),c("vd",{id:"hHemToSideWaist",from:t.bottomIn,to:t.styleWaistOutLily,x:(t.seatOut.x<t.styleWaistOutLily.x?t.seatOut.x:t.styleWaistOutLily.x)-m-15}),c("vd",{id:"hStartCrotchCurveToCfWaist",from:t.crotchSeamCurveStart,to:t.styleWaistInLily,x:t.crotchSeamCurveStart.x+m+15}),c("hd",{id:"wSideWaistToPleat",from:t.seatOut,to:t.grainlineTop,y:t.styleWaistInLily.y-m-15}),t.styleWaistOutLily.x<t.seatOut.x&&c("hd",{id:"wSideWaistToPleatAlt",from:t.styleWaistOutLily,to:t.grainlineTop,y:t.styleWaistInLily.y-m-30}),c("hd",{id:"wPleatToCfWaist",from:t.grainlineTop,to:t.styleWaistInLily,y:t.styleWaistInLily.y-m-15}),c("hd",{id:"wPleatToStartCrotchCurve",from:t.grainlineTop,to:t.crotchSeamCurveStart,y:t.styleWaistInLily.y-m-30}),c("hd",{id:"wPleatToCrotchProjection",from:t.grainlineTop,to:t.crotchSeamCurveMax,y:t.styleWaistInLily.y-m-45}),c("hd",{id:"wPleatToFork",from:t.grainlineTop,to:t.fork,y:t.styleWaistInLily.y-m-60}))),g}},il=JSON.parse('{"id":"paco","name":"Paco pants","code":"Joost De Cock","description":"A FreeSewing pattern for summer pants","design":"Joost De Cock","difficulty":3,"tags":["bottoms","trousers"],"techniques":["elastic","curved-seam","pocket","welt-pocket","hem"],"version":"4.6.0","pkg":"@freesewing/paco","collection":true}'),nl={en:JSON.parse('{"t":"Paco pants","d":"Paco are casual yet stylish summer pants.","p":{"back":"Back","backPocketBag":"Back pocket bag","backPocketWelt":"Back pocket welt","backPocketWeltInterfacing":"Back pocket welt interfacing","cuff":"Cuff","front":"Front","frontPocketBag":"Front pocket bag","waistband":"Waistband"},"s":{"cutCuff.t":"The cuff is not shown","cutCuff.d":"The **Cuff** (4) is a rectangular piece of lining {{{ w }}} wide and {{{ l }}} long.","cutWaistband.t":"The waistband is not shown","cutWaistband.d":"The **Waistband** (3) is a rectangular piece of lining {{{ w }}} wide and {{{ l }}} long.","cutBackPocketBag.t":"The back pocket bag is not shown","cutBackPocketBag.d":"The **Back pocket bag** (6) is a rectangular piece of lining {{{ w }}} wide and {{{ l }}} long.","cutBackPocketWelt.t":"The back pocket welt is not shown","cutBackPocketWelt.d":"The **Back pocket welt** (7) is a rectangular piece of lining {{{ w }}} wide and {{{ l }}} long.","cutBackPocketWeltInterfacing.t":"The back pocket welt interfacing is not shown","cutBackPocketWeltInterfacing.d":"The **Back pocket welt interfacing** (8) is a rectangular piece of fusible interfacing {{{ w }}} wide and {{{ l }}} long."},"o":{"heelEase":{"t":"Heel ease","d":"The amount of ease at your heel (when stepping into the leg)"},"frontPockets":{"t":"Front pockets","d":"Whether or not to add front pockets on the side seam"},"frontPocketsNo":{"t":"Do not include front pockets","d":"Draft a pattern without front pockets"},"frontPocketsYes":{"t":"Include front pockets","d":"Draft a pattern with front pockets"},"frontPocketFlapSize":{"t":"Front pocket flap size","d":"This option controls the front pocket flap size"},"backPockets":{"t":"Back pockets","d":"Whether or not to add welt pockets to the back"},"backPocketsNo":{"t":"Do not include back pockets","d":"Draft a pattern without back pockets"},"backPocketsYes":{"t":"Include back pockets","d":"Draft a pattern with back pockets"},"elasticatedCuff":{"t":"Elasticated cuff","d":"Whether you want to include an elasticated cuff at the legs, or prefer a classic hemmed finish"},"elasticatedCuffNo":{"t":"No elasticated cuffs","d":"Draft a pattern without elasticated cuffs"},"elasticatedCuffYes":{"t":"With elasticated cuffs","d":"Draft a pattern with a elasticated cuffs"},"ankleElastic":{"t":"Ankle/Hem elastic width","d":"Width of the (optional) elastic at the ankle/hem"}}}')};const sl={name:"paco.back",from:Fo,hide:n.V9.HIDE_TREE,measurements:["heel"],options:{titanPaperless:!1,fitCrossSeam:!0,fitCrossSeamFront:!0,fitCrossSeamBack:!0,fitGuides:!1,kneeEase:.06,fitKnee:!1,frontPocketHeelRatio:.4,backPocketWaistRatio:.4,backPocketHeightRatio:.4,backPocketWidthRatio:.37,waistbandHeight:0,waistEase:{pct:2,min:0,max:10,...(0,n.Wx)("waist"),menu:"fit"},seatEase:{pct:5,min:0,max:15,...(0,n.Wx)("seat"),menu:"fit"},waistHeight:{pct:5,min:0,max:100,menu:"style"},lengthBonus:{pct:0,min:-15,max:10,menu:"style"},crotchDrop:{pct:2,min:0,max:10,menu:"style"},elasticatedCuff:{bool:!0,menu:"style"},waistbandWidth:{pct:3,min:1,max:6,snap:Ro.HJ,...(0,n.Wx)("waistToFloor"),menu:"elastic"},ankleElastic:{pct:5,min:1,max:13,snap:Ro.HJ,...(0,n.Wx)("waistToFloor"),menu:"elastic"},heelEase:{pct:5,min:0,max:50,...(0,n.Wx)("heel"),menu:"elastic"},frontPockets:{bool:!0,menu:"pockets"},backPockets:{bool:!1,menu:"pockets"},frontPocketFlapSize:{pct:3,min:2,max:4,snap:Ro.Hw,...(0,n.Wx)("waist"),menu:(t,e)=>!!e?.frontPockets&&"pockets"},legBalance:{pct:57.5,min:52.5,max:62.5,menu:"advanced"},crossSeamCurveStart:{pct:85,min:60,max:100,menu:"advanced"},crossSeamCurveBend:{pct:65,min:45,max:85,menu:"advanced"},crossSeamCurveAngle:{deg:12,min:0,max:20,menu:"advanced"},crotchSeamCurveStart:{pct:80,min:60,max:95,menu:"advanced"},crotchSeamCurveBend:{pct:80,min:45,max:100,menu:"advanced"},crotchSeamCurveAngle:{deg:25,min:0,max:35,menu:"advanced"},waistBalance:{pct:60,min:30,max:90,menu:"advanced"},grainlinePosition:{pct:45,min:30,max:60,menu:"advanced"}},draft:function({store:t,sa:e,points:o,Path:a,paths:i,options:n,measurements:s,complete:r,macro:l,absoluteOptions:c,part:p}){const d=()=>(new a).move(o.fork).curve(o.forkCp2,o.kneeInCp1,o.floorIn),h=(t=!1)=>{let e=o.styleWaistOut||o.waistOut,i=(new a).move(o.floorOut).curve(o.kneeOutCp2,o.seatOut,e);if(!n.frontPockets||t)return i;{let t=i.split(o.pocketFlapBottomIn);return t[0].join((new a).move(o.pocketFlapBottomIn).line(o.pocketFlapBottomOut).line(o.pocketFlapTopOut).line(o.pocketFlapTopIn)).join(t[1].split(o.pocketFlapTopIn).pop())}};let m=s.heel*(1+n.heelEase)*n.legBalance/2;if(o.floorOut=o.floor.shift(0,m),o.floorIn=o.floor.shift(180,m),o.kneeOut=o.knee.shift(0,m),o.kneeOutCp2=o.kneeOut,o.kneeIn=o.knee.shift(180,m),o.kneeInCp1=o.kneeIn,t.set("ankleElastic",c.ankleElastic),n.elasticatedCuff)for(const g of["floor","floorIn","floorOut"])o[g]=o[g].shift(90,t.get("ankleElastic"));let f=s.seat*n.legBalance/2-o.styleWaistIn.dist(o.styleWaistOut),u=o.styleWaistInNoAngle.angle(o.styleWaistOut);
1if(o.styleWaistOut=o.styleWaistOut.shift(u,f),o.seatOut=o.seatOut.shift(u,f),t.set("waistbandWidth",c.waistbandWidth),o.styleWaistOut=h(!0).end(),n.frontPockets){let t=h(!0).reverse();o.pocketFlapTopIn=t.shiftAlong(c.frontPocketFlapSize),o.pocketFlapBottomIn=t.shiftAlong(c.frontPocketFlapSize+s.heel*n.frontPocketHeelRatio),o.pocketFlapTopOut=o.pocketFlapTopIn.shiftTowards(o.pocketFlapBottomIn,c.frontPocketFlapSize).rotate(90,o.pocketFlapTopIn),o.pocketFlapBottomOut=o.pocketFlapBottomIn.shiftTowards(o.pocketFlapTopIn,c.frontPocketFlapSize).rotate(-90,o.pocketFlapBottomIn),o.pocketFlapBottomOut=o.pocketFlapTopOut.shiftOutwards(o.pocketFlapBottomOut,c.frontPocketFlapSize)}if(n.backPockets){const t=()=>o.styleWaistOut.dist(o.styleWaistIn)*n.backPocketWidthRatio;let e=o.styleWaistOut.angle(o.styleWaistIn);o.pocketWaistCenter=o.styleWaistIn.shiftFractionTowards(o.styleWaistOut,n.backPocketWaistRatio),o.pocketCenter=o.pocketWaistCenter.shift(e+90,o.styleWaistIn.dist(o.crossSeamCurveStart)*n.backPocketHeightRatio),o.pocketLeft=o.pocketCenter.shift(e,t()/2),o.pocketRight=o.pocketLeft.rotate(180,o.pocketCenter),o.pocketBagWaistLeft=o.pocketWaistCenter.shift(e,t()/1.5),o.pocketBagWaistRight=o.pocketBagWaistLeft.rotate(180,o.pocketWaistCenter),o.pocketBagBottomCenter=o.pocketCenter.shift(e+90,1.5*t()),o.pocketBagBottomLeft=o.pocketBagBottomCenter.shift(e,t()/1.5),o.pocketBagBottomRight=o.pocketBagBottomLeft.rotate(180,o.pocketBagBottomCenter)}if(i.seam=(()=>
1{let t=o.styleWaistIn||o.waistIn;return d().line(o.floorOut).join(h()).line(t).line(o.crossSeamCurveStart).curve(o.crossSeamCurveCp1,o.crossSeamCurveCp2,o.fork).close()})(),t.set("pacoInseamBack",d().length()),t.set("pacoOutseamBack",h(!0).length()),t.set("backWaist",o.styleWaistIn.dist(o.styleWaistOut)),t.set("backAnkle",o.floorIn.dist(o.floorOut)),e){const t=o.styleWaistIn||o.waistIn,s=n.elasticatedCuff?e:4*e;i.sa=d().offset(e).line(o.floorIn.shift(180,e).shift(-90,s)).line(o.floorOut.shift(0,e).shift(-90,s)).join(h().offset(e).trim()).join((new a).move(o.styleWaistOut).line(t).line(o.crossSeamCurveStart).curve(o.crossSeamCurveCp1,o.crossSeamCurveCp2,o.fork).offset(e)).close().attr("class","fabric sa")}return r&&(i.hint=(new a).move(o.crossSeamCurveStart).line(o.crossSeamCurveMax).line(o.fork).attr("class","note lashed"),n.backPockets&&(i.pocket=(new a).move(o.pocketLeft).line(o.pocketRight).attr("class","fabric lashed"),i.pocketBag=(new a).move(o.pocketBagWaistLeft).line(o.pocketBagBottomLeft).line(o.pocketBagBottomRight).line(o.pocketBagWaistRight).attr("class","lining lashed"))),t.cutlist.setCut({cut:2,from:"fabric"}),n.backPockets&&l("sprinkle",{snippet:"bnotch",on:["pocketLeft","pocketRight","pocketBagWaistLeft","pocketBagWaistRight"]}),l("hd",{id:"wHem",from:o.floorIn,to:o.floorOut,y:o.floorIn.y-30}),l("hd",{id:"wHemLeft",from:o.floorIn,to:o.floor,y:o.floorIn.y-15}),l("hd",{id:"wHemRight",from:o.floor,to:o.floorOut,y:o.floorIn.y-15}),l("vd",{id:"hHemToWaistSide",from:o.floorOut,to:o.styleWaistOut,x:(o.seatOut.x>o.styleWaistOut.x?o.seatOut.x:o.styleWaistOut.x)+e+30}),l("vd",{id:"hHemToFork",from:o.floorIn,to:o.fork,x:o.fork.x-e-15}),l("vd",{id:"hForkToCbWaist",from:o.fork,to:o.styleWaistIn,x:o.fork.x-e-15}),l("vd",{id:"hFull",from:o.floorIn,to:o.styleWaistIn,x:o.fork.x-e-30}),l("vd",{id:"hCurveStartToCbWaist",from:o.crossSeamCurveStart,to:o.styleWaistIn,x:o.crossSeamCurveStart.x-e-15}),l("hd",{id:"wCbWaistToPleat",from:o.styleWaistIn,to:o.grainlineTop,y:o.styleWaistIn.y-e-15}),l("hd",{id:"wCurveStartToPleat",from:o.crossSeamCurveStart,to:o.grainlineTop,y:o.styleWaistIn.y-e-30}),l("hd",{id:"wCrossSeamProjectionPointToPleat",from:o.crossSeamCurveMax,to:o.grainlineTop,y:o.styleWaistIn.y-e-45}),l("hd",{id:"wForkToPleat",from:o.fork,to:o.grainlineTop,y:o.styleWaistIn.y-e-60}),l("hd",{id:"wPleatToWaistSide",from:o.grainlineTop,to:o.styleWaistOut,y:o.styleWaistIn.y-e-15}),o.seatOut.x>o.styleWaistOut.x&&l("hd",{id:"wToSeatOut",from:o.grainlineTop,to:o.seatOut,y:o.styleWaistIn.y-e-30}),n.frontPockets&&(l("ld",{id:"lPocketTopToWaist",from:o.styleWaistOut,to:o.pocketFlapTopIn,d:-15}),l("ld",{id:"lPocketOpening",from:o.pocketFlapTopIn,to:o.pocketFlapBottomIn,d:-15}),l("ld",{id:"lPocketFacing",from:o.pocketFlapTopIn,to:o.pocketFlapTopOut,d:-15})),n.backPockets&&(l("ld",{id:"lCbToPocket",from:o.styleWaistIn,to:o.pocketBagWaistLeft,d:-15-e}),l("ld",{id:"lCbToPocketCenter",from:o.styleWaistIn,to:o.pocketWaistCenter,d:-30-e}),l("ld",{id:"lWeltToWaist",from:o.pocketCenter,to:o.pocketWaistCenter,d:-15}),l("ld",{id:"lWaistToPocketBottom",from:o.pocketBagBottomRight,to:o.pocketBagWaistRight,d:-15})),p}};const rl={name:"paco.front",from:Eo,hide:n.V9.HIDE_TREE,after:sl,draft:function({utils:t,store:e,sa:o,Point:a,points:i,Path:n,paths:s,options:r,measurements:l,complete:c,macro:p,absoluteOptions:d,part:h}){const m=()=>(new n).move(i.floorIn).curve(i.kneeInCp2,i.forkCp1,i.fork),f=(t=!1)=>{let e=i.styleWaistOut||i.waistOut,o=(new n).move(e).curve(i.seatOut,i.kneeOutCp1,i.floorOut);if(!r.frontPockets||t)return o;{let t=o.split(i.pocketFlapTopIn);return t[0].join((new n).move(i.pocketFlapTopIn).line(i.pocketFlapTopOut).line(i.pocketFlapBottomOut).line(i.pocketFlapBottomIn)).join(t[1].split(i.pocketFlapBottomIn)[1])}};let u=l.heel*(1+r.heelEase)*(1-r.legBalance)/2;if(i.floorOut=i.floor.shift(180,u),i.floorIn=i.floor.shift(0,u),i.kneeOut=i.knee.shift(180,u),i.kneeOutCp1=i.kneeOut,i.kneeIn=i.knee.shift(0,u),i.kneeInCp2=i.kneeIn,r.elasticatedCuff)for(const k of["floor","floorIn","floorOut"])i[k]=i[k].shift(90,r.ankleElastic);let g=l.seat*(1-r.legBalance)/2-i.styleWaistIn.dist(i.styleWaistOut),b=i.styleWaistInNoAngle.angle(i.styleWaistOut);i.styleWaistOut=i.styleWaistOut.shift(b,g),i.seatOut=i.seatOut.shift(b,g),i.styleWaistOut=f(!0).start();let w=m().length()-e.get("pacoInseamBack");if(i.floor=i.floor.shift(90,w),i.floorIn=i.floorIn.shift(90,w),i.floorOut=i.floorOut.shift(90,w),i.styleWaistOut=i.floorOut.shiftOutwards(i.styleWaistOut,-1*(f(!0).length()-e.get("pacoOutseamBack"))),r.frontPockets){let e=f(!0);i.pocketFlapTopIn=e.shiftAlong(d.frontPocketFlapSize),i.pocketFlapBottomIn=e.shiftAlong(d.frontPocketFlapSize+l.heel*r.frontPocketHeelRatio),i.pocketFlapTopOut=i.pocketFlapTopIn.shiftTowards(i.pocketFlapBottomIn,d.frontPocketFlapSize).rotate(-90,i.pocketFlapTopIn),i.pocketFlapBottomOut=i.pocketFlapBottomIn.shiftTowards(i.pocketFlapTopIn,d.frontPocketFlapSize).rotate(90,i.pocketFlapBottomIn),i.pocketFlapBottomOut=i.pocketFlapTopOut.shiftOutwards(i.pocketFlapBottomOut,d.frontPocketFlapSize),i.flapTopLeft=i.pocketFlapTopOut.shiftTowards(i.pocketFlapTopIn,2*d.frontPocketFlapSize),i.flapBottomLeft=i.pocketFlapBottomOut.translate(i.pocketFlapTopOut.dx(i.flapTopLeft),i.pocketFlapTopOut.dy(i.flapTopLeft)),i.topLeft=t.beam
1sIntersect(i.flapBottomLeft,i.flapTopLeft,i.styleWaistOut,i.styleWaistIn),i.topRight=i.topLeft.shiftFractionTowards(i.styleWaistIn,.6),i.bottomRight=i.topRight.shift(i.flapTopLeft.angle(i.flapBottomLeft),1.75*i.flapTopLeft.dist(i.flapBottomLeft)).rotate(5,i.topRight),i.bottom=new a(i.flapBottomLeft.x+i.flapBottomLeft.dx(i.bottomRight)/2,i.bottomRight.y),i.bottomCp1=new a(i.flapBottomLeft.x,i.bottom.y),i.bottomCp2=t.beamIntersectsY(i.topRight,i.bottomRight,i.bottom.y)}if(e.set("frontWaist",i.styleWaistIn.dist(i.styleWaistOut)),e.set("frontAnkle",i.floorIn.dist(i.floorOut)),s.seam=(()=>{let t=i.styleWaistIn||i.waistIn,e=i.styleWaistOut||i.waistOut;return f().line(i.floorIn).join(m()).curve(i.crotchSeamCurveCp1,i.crotchSeamCurveCp2,i.crotchSeamCurveStart).line(t).line(e).close()})(),o){const t=i.styleWaistIn||i.waistIn,e=i.styleWaistOut||i.waistOut,a=r.elasticatedCuff?o:4*o;s.sa=f().offset(o).line(i.floorOut.shift(180,o).shift(-90,a)).line(i.floorIn.shift(0,o).shift(-90,a)).join(m().offset(o)).join((new n).move(i.fork).curve(i.crotchSeamCurveCp1,i.crotchSeamCurveCp2,i.crotchSeamCurveStart).line(t).line(e).offset(o).trim()).close().attr("class","fabric sa")}return c&&(s.hint=(new n).move(i.crotchSeamCurveStart).line(i.crotchSeamCurveMax).line(i.fork).attr("class","note lashed"),r.frontPockets&&(s.pocket=(new n).move(i.topLeft).line(i.flapBottomLeft)._curve(i.bottomCp1,i.bottom).line(i.bottomRight).line(i.topRight).line(i.topLeft).close().attr("class","lining help"),s.pocketFlap=(new n).move(i.pocketFlapTopIn).line(i.flapTopLeft).move(i.pocketFlapBottomIn).line(i.flapBottomLeft).attr("class","fabric lashed"),p("sprinkle",{snippet:"notch",on:["flapTopLeft","flapBottomLeft","topLeft","topRight"]}))),e.cutlist.setCut({cut:2,from:"fabric"}),p("rmad"),p("hd",{id:"wHemLeft",from:i.floorOut,to:i.floor,y:i.floorIn.y-15}),p("hd",{id:"wHemRight",from:i.floor,to:i.floorIn,y:i.floorIn.y-15}),p("hd",{id:"wHem",from:i.floorOut,to:i.floorIn,y:i.floorIn.y-30}),p("vd",{id:"hHemToFork",from:i.floorOut,to:i.fork,x:i.fork.x+o+15}),p("vd",{id:"hForkToCfWaist",from:i.fork,to:i.styleWaistIn,x:i.fork.x+o+15}),p("vd",{id:"hHemToSideWaist",from:i.floorIn,to:i.styleWaistOut,x:(i.seatOut.x<i.styleWaistOut.x?i.seatOut.x:i.styleWaistOut.x)-o-30}),p("hd",{id:"wSideWaistToPleat",from:i.styleWaistOut,to:i.grainlineTop,y:i.styleWaistIn.y-o-30}),i.styleWaistOut.x<i.seatOut.x&&p("hd",{id:"wWaistOut",from:i.styleWaistOut,to:i.grainlineTop,y:i.styleWaistIn.y-o-30}),p("hd",{id:"wPleatToCfWaist",from:i.grainlineTop,to:i.styleWaistIn,y:i.styleWaistIn.y-o-30}),p("hd",{id:"wPleatToCrotchCurveProjection",from:i.grainlineTop,to:i.crotchSeamCurveMax,y:i.styleWaistIn.y-o-45}),p("hd",{from:i.grainlineTop,id:"wPleatToFork",to:i.fork,y:i.styleWaistIn.y-o-60}),r.frontPockets&&(p("ld",{id:"hWaistToPocketStart",from:i.pocketFlapTopIn,to:i.styleWaistOut,d:-15}),p("ld",{id:"hPocket",from:i.pocketFlapTopIn,to:i.pocketFlapBottomIn,d:-15}),p("ld",{id:"wPocketTab",from:i.pocketFlapTopOut,to:i.pocketFlapTopIn,d:15}),p("ld",{id:"wSideToStartPocketBag",from:i.styleWaistOut||i.waistOut,to:i.topLeft,d:10+o}),p("ld",{id:"wPocketBagAtWaist",from:i.topLeft,to:i.topRight,d:10+o})),h}};const ll={name:"paco.cuff",after:rl,draft:function({store:t,sa:e,Point:o,points:a,Path:i,paths:n,options:s,complete:r,expand:l,units:c,macro:p,part:d}){if(!s.elasticatedCuff)return d.hide();const h=t.get("frontAnkle")+t.get("backAnkle"),m=1.05*t.get("ankleElastic");if(!l){const o=e?2*e:0;return t.flag.note({msg:"paco:cutCuff",notes:[e?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:c(2*m+2*o),l:c(h+o)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),t.flag.preset("expandIsOff"),d.hide()}return t.flag.preset("expandIsOn"),a.topLeft=new o(0,0),a.topMid=new o(m,0),a.topRight=new o(2*m,0),a.bottomLeft=new o(0,h),a.bottomMid=new o(m,h),a.bottomRight=new o(2*m,h),n.seam=(new i).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).line(a.topLeft).close().attr("class","fabric"),r&&(n.fold=(new i).move(a.topMid).line(a.bottomMid).attr("class","help")),e&&(n.sa=(new i).move(a.topLeft.shift(180,2*e)).line(a.bottomLeft.shift(180,2*e)).line(a.bottomRight).line(a.topRight).line(a.topLeft.shift(180,2*e)).close().offset(e).attr("class","fabric sa")),t.cutlist.setCut({cut:2,from:"fabric"}),a.title=a.topLeft.shiftFractionTowards(a.bottomRight,.5),p("title",{at:a.title,nr:4,title:"cuff",align:"center"}),p("grainline",{from:a.topMid.shift(0,15),to:a.bottomMid.shift(0,15)}),p("vd",{id:"hfull",from:a.bottomRight,to:a.topRight,x:a.topRight.x+15+e}),p("hd",{id:"wfull",from:a.bottomLeft,to:a.bottomRight,y:a.bottomRight.y+15+e}),d}};const cl={name:"paco.frontPocketBag",from:rl,draft:function({sa:t,points:e,Path:o,paths:a,store:i,snippets:n,options:s,macro:r,part:l}){if(!s.frontPockets)return l.hide();for(const d in a)delete a[d];for(const d in n)delete n[d];const c=["topLeft","flapTopLeft","flapBottomLeft","bottomCp1","bottom","bottomRight"],p=-90-e.topRight.angle(e.bottomRight);for(const d in e)-1!==c.indexOf(d)&&(e[d]=e[d].rotate(p,e.topRight));return a.pocket=(new o).move(e.topLeft).line(e.flapBottomLeft)._curve(e.bottomCp1,e.bottom).line(e.bottomRight).line(e.topRight).line(e.topLeft).close().attr("class","lining"),t&&(a.sa=(new o).move(e.topRight).line(e.topLeft).line(e.flapBottomLeft)._curve(e.bottomCp1,e.bottom).line(e.bottomRight).offset(t),a.sa=(new o).move(e.topRight).join(a.sa).line(e.bottomRight).attr("class","lining sa")),i.cutlist.setCut({cut:2,from:"lining"}),e.title=e.topLeft.shiftFractionTowards(e.bottomRight,.5),r("title",{at:e.title,nr:5,title:"pocketBag"}),r("cutonfold",{from:e.bottomRight,to:e.topRight,grainline:!0}),r("sprinkle",{snippet:"notch",on:["flapTopLeft","flapBottomLeft"]}),r("hd",{id:"wFull",from:e.flapBottomLeft,to:e.bottomRight,y:e.bottomRight.y+15+t}),r("hd",{id:"wAtWaist",from:e.topLeft,to:e.topRight,y:e.topLeft.y-15-t}),r("vd",{id:"hAtFold",from:e.bottomRight,to:e.topRight,x:e.topRight.x+15+t}),r("vd",{id:"hFull",from:e.bottomRight,to:e.topLeft,x:e.topRight.x+30+t}),r("ld",{id:"lWaistToOpening",from:e.flapTopLeft,to:e.topLeft,d:15+t}),r("ld",{id:"lOpening",from:e.flapBottomLeft,to:e.flapTopLeft,d:15+t}),l}};
1const pl={name:"paco.backPocketBag",from:sl,draft:function({sa:t,points:e,Path:o,paths:a,snippets:i,store:n,options:s,complete:r,expand:l,units:c,macro:p,part:d}){for(const f in a)delete a[f];for(const f in i)delete i[f];if(p("rmscalebox"),p("rmtitle"),!s.backPockets)return d.hide();if(!l){const o=t?2*t:0;return n.flag.note({msg:"paco:cutBackPocketBag",notes:[t?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:c(e.pocketBagWaistLeft.dist(e.pocketBagWaistRight)+o),l:c(2*e.pocketBagWaistLeft.dist(e.pocketBagBottomLeft)+o)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),n.flag.preset("expandIsOff"),d.hide()}n.flag.preset("expandIsOn");const h=["pocketBagWaistLeft","pocketBagWaistRight","pocketBagBottomLeft","pocketBagBottomRight","pocketLeft","pocketRight"],m=-1*e.pocketLeft.angle(e.pocketRight);for(const f in e)-1!==h.indexOf(f)&&(e[f]=e[f].rotate(m,e.pocketBagWaistLeft));return a.seam=(new o).move(e.pocketBagWaistLeft).line(e.pocketBagBottomLeft).line(e.pocketBagBottomRight).line(e.pocketBagWaistRight).line(e.pocketBagWaistLeft).close().attr("class","lining"),r&&(a.cut=(new o).move(e.pocketLeft).line(e.pocketRight).attr("class","lining lashed")),t&&(a.sa=(new o).move(e.pocketBagBottomRight).line(e.pocketBagWaistRight).line(e.pocketBagWaistLeft).line(e.pocketBagBottomLeft).offset(t),a.sa=(new o).move(e.pocketBagBottomRight).join(a.sa).line(e.pocketBagBottomLeft).attr("class","lining sa")),n.cutlist.setCut({cut:2,from:"lining",onFold:!0}),e.title=e.pocketBagWaistLeft.shiftFractionTowards(e.pocketBagBottomRight,.5),p("title",{at:e.title,nr:6,title:"backPocketBag",align:"center"}),p("cutonfold",{to:e.pocketBagBottomRight,from:e.pocketBagBottomLeft}),p("grainline",{from:e.pocketBagBottomLeft.shift(0,15),to:e.pocketBagWaistLeft.shift(0,15)}),p("sprinkle",{snippet:"bnotch",on:["pocketLeft","pocketRight","pocketBagWaistLeft","pocketBagWaistRight"]}),p("hd",{id:"wFull",from:e.pocketBagBottomLeft,to:e.pocketBagBottomRight,y:e.pocketBagBottomLeft.y+15+t}),p("hd",{id:"wCut",from:e.pocketLeft,to:e.pocketRight,y:e.pocketLeft.y+15+t}),p("vd",{id:"hTopToCut",from:e.pocketRight,to:e.pocketBagWaistRight,x:e.pocketBagBottomRight.x+15+t}),p("vd",{id:"hFull",from:e.pocketBagBottomRight,to:e.pocketBagWaistRight,x:e.pocketBagBottomRight.x+30+t}),d}};const dl={name:"paco.backPocketWelt",from:pl,options:{weltFactor:.15},draft:function({sa:t,Point:e,points:o,Path:a,paths:i,snippets:n,options:s,expand:r,store:l,units:c,macro:p,part:d}){for(const f in i)delete i[f];for(const f in n)delete n[f];if(p("rmscalebox"),p("rmtitle"),!s.backPockets)return d.hide();const h=o.pocketBagWaistLeft.dist(o.pocketBagWaistRight),m=o.pocketLeft.dist(o.pocketRight)*s.weltFactor;if(o.topLeft=new e(o.pocketBagWaistLeft.x,o.pocketLeft.y),o.topRight=new e(o.pocketBagWaistRight.x,o.topLeft.y),o.bottomLeft=o.topLeft.shift(-90,2*m),o.bottomRight=o.topRight.shift(-90,2*m),!r){const e=t?2*t:0;return l.flag.note({msg:"paco:cutBackPocketWelt",notes:[t?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:c(m+e),l:c(h+e)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),l.flag.preset("expandIsOff"),d.hide()}return l.flag.preset("expandIsOn"),i.seam=(new a).move(o.topLeft).line(o.bottomLeft).line(o.bottomRight).line(o.topRight).line(o.topLeft).close().attr("class","fabric"),t&&(i.sa=i.seam.offset(t).attr("class","fabric sa")),l.cutlist.setCut({cut:2,from:"fabric"}),o.title=o.topLeft.shiftFractionTowards(o.bottomRight,.4),p("title",{at:o.title,nr:7,title:"backPocketWelt",align:"center",scale:.666}),p("grainline",{from:o.topLeft.shift(0,15),to:o.bottomLeft.shift(0,15)}),p("sprinkle",{snippet:"bnotch",on:["pocketLeft","pocketRight","pocketBagWaistLeft","pocketBagWaistRight"]}),p("hd",{id:"wFull",from:o.bottomLeft,to:o.bottomRight,y:o.bottomLeft.y+15+t}),p("hd",{id:"wBetweenNotches",from:o.pocketLeft,to:o.pocketRight,y:o.topLeft.y-15-t}),p("vd",{id:"hFull",from:o.bottomRight,to:o.topLeft,x:o.topRight.x+15+t}),d}};const hl={name:"paco.backPocketWeltInterfacing",from:dl,draft:function({points:t,Path:e,paths:o,snippets:a,options:i,expand:n,store:s,units:r,macro:l,part:c}){for(const p in o)delete o[p];for(const p in a)delete a[p];return l("rmscalebox"),l("rmtitle"),i.backPockets?n?(s.flag.preset("expandIsOn"),o.seam=(new e).move(t.topLeft).line(t.bottomLeft).line(t.bottomRight).line(t.topRight).line(t.topLeft).close().attr("class","interfacing"),s.cutlist.setCut({cut:2,from:"interfacing"}),t.title=t.topLeft.shiftFractionTowards(t.bottomRight,.5),l("title",{at:t.title,nr:8,title:"pocketWeltInterfacing",align:"center",scale:.666}),l("sprinkle",{snippet:"bnotch",on:["pocketLeft","pocketRight","pocketBagWaistLeft","pocketBagWaistRight"]}),l("hd",{id:"wFull",from:t.bottomLeft,to:t.bottomRight,y:t.bottomLeft.y+1
15}),l("hd",{id:"wBetweenNotches",from:t.pocketLeft,to:t.pocketRight,y:t.topLeft.y-15}),l("vd",{id:"hFull",from:t.bottomRight,to:t.topRight,x:t.topRight.x+15}),c):(s.flag.note({msg:"paco:cutBackPocketWeltInterfacing",notes:["flag:saUnused","flag:partHiddenByExpand"],replace:{w:r(t.topLeft.dist(t.bottomLeft)),l:r(t.topLeft.dist(t.topRight))},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),s.flag.preset("expandIsOff"),c.hide()):c.hide()}};const ml={name:"paco.waistband",after:rl,draft:function({store:t,sa:e,Point:o,points:a,Path:i,paths:n,complete:s,expand:r,macro:l,units:c,part:p}){const d=2*(t.get("frontWaist")+t.get("backWaist")),h=t.get("waistbandWidth");if(!r){const o=e?2*e:0;return t.flag.note({msg:"paco:cutWaistband",notes:[e?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:c(2*h+2*o),l:c(d+o)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),t.flag.preset("expandIsOff"),p.hide()}return t.flag.preset("expandIsOn"),a.topLeft=new o(0,0),a.topMid=new o(h,0),a.topRight=new o(2*h,0),a.bottomLeft=new o(0,d),a.bottomMid=new o(h,d),a.bottomRight=new o(2*h,d),a.eyeletTop=new o(1.5*h,d/2-h/2),a.eyeletBottom=new o(1.5*h,d/2+h/2),n.seam=(new i).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).line(a.topLeft).close().addClass("fabric"),s&&(n.fold=(new i).move(a.topMid).line(a.bottomMid).attr("class","help")),e&&(n.sa=(new i).move(a.topLeft.shift(180,2*e)).line(a.bottomLeft.shift(180,2*e)).line(a.bottomRight).line(a.topRight).line(a.topLeft.shift(180,2*e)).close().offset(e).setClass("fabric sa")),t.cutlist.setCut({cut:1,from:"fabric"}),a.title=a.topLeft.shiftFractionTowards(a.bottomRight,.4),l("title",{at:a.title,nr:3,title:"waistband"}),l("grainline",{from:a.topLeft.shift(0,15),to:a.bottomLeft.shift(0,15)}),l("sprinkle",{snippet:"eyelet",on:["eyeletTop","eyeletBottom"]}),l("hd",{id:"wFull",from:a.topLeft,to:a.topRight,y:a.bottomRight.y+e+15}),l("hd",{id:"wEyeletTop",from:a.eyeletTop,to:a.topRight,y:a.topLeft.y-e-15}),l("vd",{id:"hEyeletTop",from:a.eyeletTop,to:a.topRight,x:a.topRight.x+e+15}),l("vd",{from:a.bottomRight,to:a.topRight,x:a.topLeft.x-15-3*e}),p}},fl=new n.pT({data:il,parts:[sl,rl,ll,cl,pl,dl,hl,ml]}),ul=(0,n.D4)([Po,nl]),gl={name:"lily.waistband",after:[ol,al],hide:"HIDE_TREE",draft:t=>{const{snippets:e,part:o}=t;ml.draft(t);for(let a in e)delete e[a];return o}},bl=new n.pT({data:el,parts:[al,ol,gl]}),wl=JSON.parse('{"id":"lucy","name":"Lucy tie-on pocket","code":"SeaZeeZee","description":"A FreeSewing pattern for a historical tie-on pocket","design":"SeaZeeZee","difficulty":2,"tags":["accessories","historical","bags"],"techniques":["curved-seam"],"version":"4.6.0","pkg":"@freesewing/lucy","collection":true}'),kl={en:JSON.parse('{"t":"Lucy tie-on pocket","d":"Lucy is a historical pocket that you can tie around your waist.","p":{"pocket":"Pocket"},"s":{},"o":{"width":{"t":"Width","d":"Width of the pocket"},"length":{"t":"Length","d":"Length (depth) of the pocket"},"edge":{"t":"Taper","d":"Controls how much the pocket opening tapers inwards"}}}')};const Cl={name:"lucy.pocket",options:{width:{pct:50,min:30,max:100,menu:"style"},length:{pct:50,min:30,max:100,menu:"style"},edge:{pct:25,min:20,max:50,menu:"style"}},draft:function({options:t,Point:e,Path:o,points:a,paths:i,Snippet:n,snippets:s,complete:r,sa:l,macro:c,store:p,part:d}){const h=800*t.length,m=500*t.width,f=t.edge;return a.topLeft=new e(0,0),a.topRight=new e(m,0),a.bottomLeft=new e(0,h),a.bottomRight=new e(m,h),a.center=new e(m/2,0),a.middle=a.center.shift(270,.525*h),a.centerRight=a.center.shift(0,m*f),a.centerLeft=a.center.shift(180,m*f),a.taperRight=new e(m,.4375*h),a.taperLeft=new e(0,.4375*h),a.leftCp1=a.bottomLeft.shiftFractionTowards(a.taperLeft,2/7),a.leftCp2=a.bottomLeft.shiftFractionTowards(a.bottomRight,.2),a.rightCp1=a.bottomRight.shiftFractionTowards(a.taperRight,2/7),a.rightCp2=a.bottomRight.shiftFractionTowards(a.bottomLeft,.2),i.seam=(new o).move(a.centerLeft).line(a.taperLeft).line(a.leftCp1).curve_(a.bottomLeft,a.leftCp2).line(a.rightCp2).curve_(a.bottomRight,a.rightCp1).line(a.taperRight).line(a.centerRight).line(a.centerLeft).close(),l&&(i.sa=i.seam.offset(l).attr("class","fabric sa")),r&&(i.slit=(new o).move(a.center).line(a.middle).addClass("fabric dashed")),p.cutlist.setCut({cut:2,from:"fabric"}),a.title=new e(a.middle.x,a.middle.y/2),c("title",{at:a.title,nr:1,title:"pocket",align:"center"}),a.logo=a.title.shift(-90,90),s.logo=new n("logo",a.logo),a.scalebox=a.middle.shift(270,m/5),c("scalebox",{at:a.scalebox}),c("hd",{id:"wFull",from:a.leftCp1,to:a.rightCp1,y:a.bottomLeft.y+l+30}),c("vd",{id:"hCut",to:a.center,from:a.middle,x:a.topRight.x+l+15}),c("vd",{id:"hFull",from:a.rightCp2,to:a.centerRight,x:a.topRight.x+l+30}),c("vd",{id:"hRound",from:a.rightCp2,to:new e(a.rightCp2.x,a.right
1Cp1.y),x:a.topRight.x+l+15}),c("hd",{id:"wAtTop",from:a.centerLeft,to:a.centerRight,y:a.topLeft.y-l-15}),c("hd",{id:"wRound",from:new e(a.rightCp2.x,a.rightCp1.y),to:a.rightCp1,y:a.bottomLeft.y+l+15}),d}},vl=new n.pT({data:wl,parts:[Cl]}),yl={en:JSON.parse('{"t":"Lumina leggings","d":"A FreeSewing pattern for a pair of leggings","p":{"shape":"Shape","leg":"Leg","panel":"Side panel","pocket":"Pocket","waistband":"Waistband"},"s":{"couldNotLowerWaist.t":"Could not lower the waist","cantFitTheWaistPoint.t":"Cannot fit the waist point","couldNoFitWaistband.t":"Could not fit the waistband","couldNotCreatePocket.t":"Could not create the pocket","dimensions.d":"Dimensions","dimensions.t":"Waistband will be {{{ waistbandlength }}} long total.\\nThe length of the garment along the side will be {{{ length }}}."},"o":{"ease":{"t":"Ease","d":"This controls the amount of ease. Since this is a pattern for leggings that is normally made of stretch fabric, the ease is negative, meaning the fabric is stretched around the body."},"length":{"t":"Leg length","d":"The length of the legs. Look in the Messages from the designer for the exact length."},"waistlowering":{"t":"Waist lowering","d":"Lowering of the waist. This is a percentage of the Waist-To-Hips measurement."},"waistband":{"t":"Waistband","d":"Add a separate waistband to the design."},"waistbandYes":{"t":"With a Waistband","d":"Add a separate waistband."},"waistbandNo":{"t":"Without a Waistband","d":"Do not add a separate waistband."},"lowerwaistbandback":{"t":"Waistband Lowering","d":"Lower the waistband in the back."},"lowerwaistbandbackYes":{"t":"Lower the Waistband","d":"Lower the waistband in the back, creating a \'V\' shape."},"lowerwaistbandbackNo":{"t":"Straight waistband","d":"Do not lower the waistband in the back."},"waistbandsize":{"t":"Waistband size","d":"Size (height) of the waistband. This is a percentage of the Waist-To-Hips measurement."},"waistreduction":{"t":"Waist circumference reduction","d":"The amount by which the waist should be reduced. This is a percentage of the waist circumference. Only available when the waistband option is selected. Look in the Messages from the designer for the exact size."},"pocket":{"t":"Pocket","d":"Add pockets"},"pocketYes":{"t":"Add pockets","d":"Add pockets in the side panel"},"pocketNo":{"t":"No pockets","d":"Pockets are not added"},"pocketdepth":{"t":"Pocket depth","d":"Depth (height) of the pocket. This is a percentage of the Waist-To-Seat measurement."},"fixedsidepanel":{"t":"Fixed-width side panel","d":"Fixed-width, or shaped side panel"},"fixedsidepanelYes":{"t":"Fixed side panel","d":"Create a fixed-width side panel"},"fixedsidepanelNo":{"t":"Shaped side panel","d":"Create a shaped side panel, consisting of a percentage of the leg circumference"},"sidepanel":{"t":"Side Panel size","d":"Size (width) of the side panel. This is a percentage of the waist circumference."},"smoothing":{"t":"Smoothing","d":"This setting controls the amount of smoothing that is done to create the side seams (and overall shape of the leggings)."}}}')},Tl=JSON.parse('{"id":"lumina","name":"Lumina leggings","code":"Wouter Van Wageningen","description":"A FreeSewing pattern for leggings","design":"Wouter Van Wageningen","difficulty":3,"tags":["bottoms","trousers"],"techniques":["stretch","curved-seam","elastic"],"version":"4.6.0","pkg":"@freesewing/lumina","collection":true}'),xl={en:JSON.parse('{"t":"Lumira leggings","d":"A FreeSewing pattern for a pair of leggings","p":{"shape":"Shape","leg":"Leg","gusset":"Gusset","waistband":"Waistband"},"s":{"bulgeToLarge":"The value for the bulge is too large, and this cannot be made to fit. It is adjusted accordingly.","couldNotFitCircle":"Could not make the circle fit","couldNotFitFrontOutside":"Could not make the front outside to fit","couldNotFitFrontGussetPath":"Could not make the front gusset path to fit","couldNotCreateWaistCircle":"Could not create the waist curve","couldNotCreateWaistBack":"Could not create the waist back","couldNotReduceWaist":"Could not reduce the waist"},"o":{"waistband":{"t":"Waistband","d":"Add a separate waistband to the design"},"waistbandYes":{"t":"With a Waistband","d":"Add a separate waistband"},"waistbandNo":{"t":"Without a Waistband","d":"Do not add a separate waistband"},"backgusset":{"t":"Back Gusset","d":"Add a circular gusset in the back"},"backgussetYes":{"t":"Add a back gusset","d":"Back gusset with option to butt lift added"},"backgussetNo":{"t":"No circular back gusset","d":"Simple center gusset"},"cyclingchamois":{"t":"Cycling Chamois","d":"Allow for a chamois to be added. This sets some of the percentages, and automatically enables certain features"},"cyclingchamoisYes":{"t":"Add Cycling Chamois","d":"Support for a chamois has been added"},"cyclingchamoisNo":{"t":"No Cycling Chamois","d":"All settings can be individually set"},"frontbulge":{"t":"Front bulge","d":"Add a bulge in the front"},"frontbulgeYes":{"t":"Add a front bulge","d":"Add a bulge in the front"},"frontbulgeNo":{"t":"No front bulge","d":"Simple seam in the front"},"ease":{"t":"Ease","d":"This controls the amount of ease. Since this is a pattern for legg
1ings that is normally made of stretch fabric, the ease is negative, meaning the fabric is stretched around the body."},"leglength":{"t":"Leg length","d":"The length of the legs. A percentage of the inseam measurement."},"waistlowering":{"t":"Waist lowering","d":"Lowering of the waist. This is a percentage of the Waist-To-Hips measurement."},"gussetwidth":{"t":"Gusset width","d":"Width of the gusset. This is a percentage of the front cross seam."},"backgussetwidth":{"t":"Back Gusset width","d":"The width of the gusset in the back. This is a percentage of the hips circumference."},"frontgussetlength":{"t":"Front gusset length","d":"This configures how far the gusset should extend in the front. This is a percentage of the front cross seam."},"waistbandsize":{"t":"Waistband size","d":"Size (height) of the waistband. This is a percentage of the Waist-To-Hips measurement."},"waistreduction":{"t":"Waist circumference reduction","d":"The amount by which the waist should be reduced. This is a percentage of the waist circumference. Only available when the waistband option is selected."},"buttlift":{"t":"Butt lift","d":"This setting controls the shape of the back gusset, thereby creating more or less support to lift the buttocks"},"frontbulgesize":{"t":"Front bulge size","d":"The size of the front bulge. This is a percentage of the front cross seam. (Take it easy, you need less than you think, big boy)"}}}')},Bl=JSON.parse('{"id":"lumira","name":"Lumira leggings","code":"Wouter Van Wageningen","description":"A FreeSewing pattern for leggings","design":"Wouter Van Wageningen","difficulty":3,"tags":["bottoms","trousers"],"techniques":["stretch","curved-seam","elastic"],"version":"4.6.0","pkg":"@freesewing/lumira","collection":true}'),Sl=(t,e,o=100,a=100)=>(new t).move(e.shiftAlong(1).shiftOutwards(e.start(),o)).line(e.start()).join(e).line(e.shiftAlong(e.length()-1).shiftOutwards(e.end(),a)),Ll=(t,e,o,a)=>{let i;i=void 0===t?e.angle(o)+180:void 0===o?e.angle(t):Math.abs(e.angle(t)-e.angle(o))/2;let n=void 0!==o?e.shift(e.angle(o)-i+90,e.dist(o)/a):null,s=void 0!==t?e.shift(e.angle(t)+i-90,e.dist(t)/a):null;return void 0!==t&&e.sitsRoughlyOn(t)?{cp1:t.clone(),cp2:s}:void 0!==o&&e.sitsRoughlyOn(o)?{cp1:n,cp2:o.clone()}:{cp1:n,cp2:s}},Pl=(t,e,o)=>{for(let a=0;a<o.length;a++){let i=Ll(t[o[a-1]],t[o[a]],t[o[a+1]],e);i.cp1&&(t[o[a]+"Cp1"]=i.cp1),i.cp2&&(t[o[a]+"Cp2"]=i.cp2)}},Rl=(t,e,o,a,i,n,s)=>{const r=Sl(e,t[i],100,0),l=r.shiftAlong(s+100);if(l.sitsRoughlyOn(o[i+"Waist"]))return;o[i+n]=l;const c=r.split(o[i+n]);2==c.length?t[i]=c[1].hide():a.info("lumira:couldNotreduceWaist")},Fl=(t,e,o,a,i,n,s)=>{t[i+"GussetCp"]=t[i+"Gusset"].shiftFractionTowards(t.centerUpperLeg,.1);const r="front"==i?t[i+"GussetJoin"].x:t[i+"Gusset"].x,l="front"==i?t[i+"Gusset"].x:t[i+"GussetJoin"].x;t[i+"GussetCp"].x<r&&(t[i+"GussetCp"].x=t[i+"GussetJoin"].x),t[i+"GussetCp"].x>l&&(t[i+"GussetCp"].x=t[i+"Gusset"].x);const c=(new o).move(t[i+"GussetJoin"])._curve(t[i+"GussetCp"],t[i+"Gusset"]).hide().shiftAlong(1),p=(new o).move(t[i+"Waist"])._curve(t[i+"UpperLegCp2"],t[i+"UpperLeg"]).hide().shiftAlong(1),d="front"==i?t[i+"GussetJoin"].angle(c):p.angle(t[i+"GussetJoin"]),h="front"==i?p.angle(t[i+"GussetJoin"]):t[i+"GussetJoin"].angle(c);t[i+"GussetJoinCp"]=d>h?t[i+"GussetJoin"].shift(p.angle(t[i+"GussetJoin"]),s-n):t[i+"GussetJoin"].clone(),e[i+"Gusset"]=(new o).move(t[i+"GussetJoin"]).curve(t[i+"GussetJoinCp"],t[i+"GussetCp"],t[i+"Gusset"]).hide();const m=e[i].reverse().shiftAlong(Math.min(s,e[i].length())-1),f=e[i].shiftAlong(1),u=Math.abs(t[i+"GussetJoin"].angle(f)-m.angle(t[i+"GussetJoin"]));a.set(i+"GussetAngle",2*u);const g=e[i].split(t[i+"GussetJoin"]);void 0!==g[0].ops?e[i+"Top"]=g[0].hide():e[i+"Top"]=e[i].clone(),e[i]=e[i+"Top"].clone().join(e[i+"Gusset"]).hide()},El={name:"lumira.shape",measurements:["waist","waistBack","hips","seat","seatBack","upperLeg","knee","ankle","heel","inseam","crossSeam","crossSeamFront","waistToFloor","waistToKnee","waistToUpperLeg","waistToSeat","waistToHips"],options:{gussetcompensation:1.03,waistband:{bool:!0,menu:"style"},backgusset:{bool:!1,menu:"style"},cyclingchamois:{bool:!1,menu:"style"},frontbulge:{bool:!1,menu:(t,e)=>!e?.cyclingchamois&&"style"},ease:{pct:-8,min:-30,max:0,menu:"fit"},leglength:{pct:100,min:10,max:100,...(0,n.Wx)("inseam"),menu:"style"},waistlowering:{pct:35,min:-10,max:60,...(0,n.Wx)("waistToHips"),menu:"style"},gussetwidth:{pct:16,min:5,max:30,...(0,n.Wx)("crossSeamFront"),menu:(t,e)=>!e?.cyclingchamois&&"style"},backgussetwidth:{pct:50,min:20,max:75,...(0,n.Wx)("hips"),menu:(t,e)=>!!e?.backgusset&&"fit"},frontgussetlength:{pct:12.5,min:0,max:30,...(0,n.Wx)("crossSeamFront"),menu:(t,e)=>!e?.frontbulge&&"style"},waistbandsize:{pct:90,min:0,max:150,...(0,n.Wx)("waistToHips"),menu:(t,e)=>!!e?.waistband&&"style"},waistreduction:{pct:4,min:0,max:10,...(0,n.Wx)("waist"),menu:(t,e)=>!!e?.waistband&&"style"}},draft:({measurements:t,store:e,Point:o,points:a,Path:i,paths:n,options:s,utils:r,log:l,part:c})=>{const p=!!s.cyclingchamois||s.backgusset,d=t.waistToHips*s.waistlowering,h=s.waistband?t.waist*s.waistreduction:0,m=s.waistband?t.waistToHips*(s.waistlowering+s.waistbandsize>(p?.9:1.5)?(p?.9:1.5)-s.waistlowering:s.waistbandsize):0,f=t.crossSeamFront*(s.
1cyclingchamois?.075:.5*s.gussetwidth),u=2.34*s.backgussetwidth,g=t.crossSeamFront*s.frontgussetlength,b=!!s.cyclingchamois||s.frontbulge,w=t.crossSeamFront*s.frontgussetlength;e.set("waistLowering",d),e.set("waistReduction",h),e.set("waistbandSize",m),e.set("gussetWidth",f),e.set("frontGussetLength",g),e.set("backGussetLength",w);const k=t.seatBack/t.seatFront,C=t.crossSeamBack/t.crossSeamFront,v=t.waistToFloor-t.inseam,y=1+s.ease,T=t.inseam*s.leglength;a.centerWaist=new o(0,0),a.centerFloor=new o(0,t.waistToFloor),a.centerAnkle=new o(0,t.waistToFloor-t.heel/Math.PI),a.centerKnee=new o(0,t.waistToKnee),a.centerUpperLeg=new o(0,t.waistToUpperLeg),a.centerInseam=new o(0,v),a.centerHips=new o(0,t.waistToHips),a.centerSeat=new o(0,t.waistToSeat),a.frontAnkle=a.centerAnkle.shift(0,t.ankle/2*y),a.backAnkle=a.centerAnkle.shift(180,t.ankle/2*y),a.frontKnee=a.centerKnee.shift(0,t.knee/2*y),a.backKnee=a.centerKnee.shift(180,t.knee/2*y),a.frontUpperLeg=a.centerUpperLeg.shift(0,t.upperLeg/2*y),a.backUpperLeg=a.centerUpperLeg.shift(180,t.upperLeg/2*y);const x=r.rad2deg(Math.asin(t.waistToUpperLeg*k*(C-1)/t.waistBack*.5*y)),B=r.rad2deg(Math.asin(t.waistToUpperLeg*k*(C-1)/t.waistFront*.5*y));if(a.backWaist=a.centerWaist.shift(180-x,.5*t.waistBack*y),a.frontWaist=a.centerWaist.shift(360-B,.5*t.waistFront*y),a.backHips=a.centerHips.shift(180-x,.25*t.hips*y),a.frontHips=a.centerHips.shift(360-B,.25*t.hips*y),a.backSeat=a.centerSeat.shift(180-x,.5*t.seatBack*y),a.frontSeat=a.centerSeat.shift(360-B,.5*t.seatFront*y),Pl(a,3.5,["frontWaist","frontSeat","frontUpperLeg"]),Pl(a,3.5,["backWaist","backSeat","backUpperLeg"]),a.frontUpperLegCp2=a.frontUpperLeg.shiftFractionTowards(a.centerUpperLeg,.5),a.frontUpperLegCp2Temp=a.frontUpperLeg.shiftFractionTowards(a.centerUpperLeg,.5),a.backUpperLegCp2=a.backUpperLeg.shiftFractionTowards(a.centerUpperLeg,.4),n.center=(new i).move(a.centerWaist).line(a.centerAnkle).hide(),n.front=(new i).move(a.frontWaist)._curve(a.frontUpperLegCp2,a.frontUpperLeg).hide(),n.back=(new i).move(a.backWaist)._curve(a.backUpperLegCp2,a.backUpperLeg).hide(),["center","front","back"].forEach((t=>{Rl(n,i,a,l,t,"Waist",d)})),a.frontHips=n.front.shiftAlong(t.waistToHips-d),a.backHips=n.back.shiftAlong(t.waistToHips-d),n.frontTop=n.front.split(a.frontHips)[0].hide(),n.backTop=n.back.split(a.backHips)[0].hide(),["center","front","back"].forEach((t=>{a[t+"Waistband"]=a[t+"Waist"].clone(),Rl(n,i,a,l,t,"Waistband",m)})),a.backWaistbandTemp=a.backWaistband,!p&&s.waistband&&Rl(n,i,a,l,"back","Waistband",.1*t.crossSeamBack),a.backWaistband,a.centerWaistbandCp=a.frontWaistband.shiftFractionTowards(a.centerWaistband,1.2),a.backWaistbandCp2=a.backWaistband.shiftFractionTowards(a.centerWaistbandCp,.7),a.frontWaistbandCp=n.frontTop.shiftAlong(Math.min(m/2,.95*n.frontTop.length())),a.frontWaist=a.frontWaist.shiftTowards(a.centerWaist,h/4),n.frontTop=(new i).move(a.frontWaist)._curve(a.frontWaistbandCp,a.frontWaistband).hide(),a.backWaistbandCp1=n.backTop.shiftAlong(Math.min(m/2,.95*n.backTop.length())),a.backWaist=a.backWaist.shiftTowards(a.centerWaist,h/4),n.backTop=(new i).move(a.backWaist)._curve(a.backWaistbandCp1,a.backWaistband).hide(),a.frontGusset=n.front.offset(f).intersects(Sl(i,(new i).move(a.frontUpperLeg).line(a.frontKnee)))[0],a.backGusset=n.back.offset(-1*f).intersects(Sl(i,(new i).move(a.backUpperLeg).line(a.backKnee)))[0],a.frontGussetJoin=n.front.reverse().shiftAlong(Math.min(g,n.front.length())),a.backGussetJoin=n.back.reverse().shiftAlong(Math.min(w,n.back.length())),b){n.front=Sl(i,n.front.offset(f)).hide();const t=(new i).move(a.frontWaistband).line(a.centerWaistband);a.frontWaistband=n.front.intersects(t)[0],!1===a.frontWaistband.sitsRoughlyOn(n.front.start())&&(n.frontTemp=Sl(i,n.front).hide(),a.frontWaistband=n.frontTemp.intersects(t)[0],n.front=n.frontTemp.split(a.frontWaistband)[1].hide(),n.front=n.front.split(a.frontWaistband)[1].hide());const e=(new i).move(a.frontUpperLeg).line(a.frontKnee);a.frontGusset=n.front.intersects(e)[0],0==a.frontGusset.sitsRoughlyOn(n.front.end())&&(n.front=n.front.split(a.frontGusset)[0].hide())}else Fl(a,n,i,e,"front",f,g);if(p){n.backTempGusset=n.back.offset(-1*f).hide();const s=n.back.shiftFractionAlong(.99),r=a.backHips.angle(s)+90;a.backUpperLegToHips=new o(a.backHips.x,a.backUpperLeg.y),a.backCircleMiddle=a.backHips.shiftFractionTowards(a.backUpperLegToHips,.5),a.backCircleHipsCp1=a.backHips.shift(r,.25*t.hips*.5*y*u),a.backCircleUpperLegCp1=a.backUpperLegToHips.shift(0,.25*t.upperLeg*y*u),n.backTempCircle=(new i).move(a.backHips).curve(a.backCircleHipsCp1,a.backCircleUpperLegCp1,a.backUpperLeg).hide(),a.backCircleGusset=n.backTempCircle.intersects(n.backTempGusset)[1];const l=n.backTempGusset.split(a.backCircleGusset);void 0!==l[1].ops?n.backGusset=l[1].hide():n.backGusset=n.backTempGusset.clone().hide(),n.backCircle=n.backTempCircle.split(a.backCircleGusset)[0].hide(),n.backGusset=n.backGusset.split(a.backGusset)[0].hide(),n.back=(new i).move(a.backWaistband).line(a.backHips).join(n.backCircle).join(n.backGusset).hide(),n.backTop=(new i).move(a.backWaistband).line(a.backHips).hide(),e.set("backGussetLength",n.backGusset.length()),e.set("backCircleLength",n.backCircle.length())}else Fl(a,n,i,e,"back",f,w);e.set("frontLength",n.front.length()),["front","back"].forEach((t=>{Pl(a,3.5,[t+"UpperLeg",t+"Knee",t+"Ankle"])})),n.frontLeg=(new i).move(a.frontGusset)._curve(a.frontKneeCp2,a.frontKnee).curve_(a.frontKneeCp1,a.frontAnkle).hide(),n.backLeg=(new i).move(a.backGusset)._curve(a.backKneeCp2,a.backKnee).curve_(a.backKneeCp1,a.backAnkle).hide(),a.centerBottom=a.centerInseam.shift(270,T),a.centerBottom.y>a.centerAnkle.y&&(a.centerBottom.y=a.centerAnkle.y);const S=(new i).move(a.centerBottom.shift(180,t.seat)).line(a.centerBottom.shift(0,t.seat)),L=Sl(i,n.frontLeg),P=Sl(i,n.backLeg);a.frontBottom=L.intersects(S)[0],a.backBottom=P.intersects(S)[0],a.backBottom.name="backBottom";const R=n.frontLeg.split(a.frontBottom);!1===a.frontBottom.sitsRoughlyOn(a.frontAnkle)&&void 0!==R[0].ops&&(n.frontLeg=R[0].hide());const F=n.backLeg.split(a.backBottom);return!1===a.backBottom.sitsRoughlyOn(a.backAnkle)&&void 0!==F[0].ops&&(n.backLeg=F[0].hide()),n.waist=(new i).move(a.frontWaistband).line(a.centerWaistband).curve(a.centerWaistbandCp,a.backWaistbandCp2,a.backWaistband).hide(),n.ankle=(new i).move(a.backAnkle).line(a.centerAnkle).line(a.frontAnkle).hide(),n.bottom=(new i).move(a.backBottom).line(a.frontBottom).hide(),e.set("waistLength",n.waist.length()),e.set("waistLengthFront",a.frontWaistband.dist(a.centerWaistband)),e.set("waistLengthBack",e.get("waistLength")-e.get("waistLengthFront")),c.hide()}},Wl={name:"lumira.leg",from:El,draft:({store:t,sa:e,points:o,Path:a,paths:i,Snippet:n,snippets:s,options:r,macro:l,part:c})=>{const p=!!r.cyclingchamois||r.backgusset;if(i.backAnnotated=i.backTop.clone().addClass("hidden").unhide(),r.frontbulge||r.cyclingchamois?s.front=new n("notch",i.front.shiftFractionAlong(.5)):(i.frontAnnotated=i.frontTop.clone().addClass("hidden").unhide().reverse(),l("banner",{path:i.frontAnnotated,text:"-",id:"front"}
1)),l("banner",{path:i.backAnnotated,text:"+",id:"back"}),i.front=(new a).move(o.frontWaistband).join(i.front).join(i.frontLeg).hide(),i.back=(new a).move(o.backWaistband).join(i.back).join(i.backLeg).hide(),i.seam=(new a).move(o.backWaistband).join(i.back).join(i.bottom).join(i.front.reverse()).join(i.waist).close(),e&&(i.sa=i.seam.offset(e).attr("class","fabric sa")),l("grainline",{from:o.centerWaistband,to:o.centerBottom}),t.cutlist.addCut({cut:2,from:"fabric"}),o.gridAnchor=o.centerWaistband.clone(),o.logo=o.centerUpperLeg.shiftFractionTowards(o.frontWaistband,.6),s.logo=new n("logo",o.logo),o.title=o.centerKnee.shiftFractionTowards(o.frontWaistband,.5),l("title",{at:o.title,nr:1,title:"leg",align:"center"}),o.scalebox=o.centerSeat.shiftFractionTowards(o.frontWaistband,.5).shiftFractionTowards(o.title,.5),l("scalebox",{at:o.scalebox}),s.circle6=new n("notch",o.frontGusset),s.circle7=new n("notch",o.backGusset),p){s.circle1=new n("notch",i.backCircle.shiftFractionAlong(.25)),s.circle2=new n("notch",i.backCircle.shiftFractionAlong(.5)),s.circle3=new n("notch",i.backCircle.shiftFractionAlong(.75)),s.circle4=new n("notch",o.backHips),s.circle5=new n("notch",o.backCircleGusset);const t=i.backCircle.edge("right");l("hd",{id:"backCircleGusset",from:o.backCircleGusset,to:o.centerUpperLeg,y:o.backCircleGusset.y}),l("hd",{id:"backCircle",from:t,to:o.centerUpperLeg,y:t.y}),l("vd",{id:"backCircle",from:t,to:o.backHips,x:o.backHips.x-e-15}),l("vd",{id:"backHips",from:o.backHips,to:o.backWaistband,x:o.backHips.x-e-15,noStartMarker:!0,noEndMarker:!0})}else l("hd",{id:"backCircleGusset",from:o.backGussetJoin,to:o.centerUpperLeg,y:o.backGussetJoin.y});return l("hd",{id:"frontBottom",from:o.centerBottom,to:o.frontBottom,y:o.centerBottom.y+e+15}),l("hd",{id:"backBottom",from:o.backBottom,to:o.centerBottom,y:o.centerBottom.y+e+15}),l("hd",{id:"frontGusset",from:o.centerBottom,to:o.frontGusset,y:o.centerBottom.y+e+25}),l("hd",{id:"backGusset",from:o.backGusset,to:o.centerBottom,y:o.centerBottom.y+e+25}),l("hd",{id:"frontWaistband",from:o.gridAnchor,to:o.frontWaistband,y:o.backWaistband.y-e-15}),l("hd",{id:"backWaistband",from:o.backWaistband,to:o.gridAnchor,y:o.backWaistband.y-e-15}),l("vd",{id:"frontGusset",from:o.frontBottom,to:o.frontGusset,x:o.frontGusset.x+e+15}),l("vd",{id:"frontWaistband",from:o.frontGusset,to:o.frontWaistband,x:o.frontGusset.x+e+15}),l("vd",{id:"backGusset",from:o.backBottom,to:o.backGusset,x:o.backGusset.x-e-15}),l("vd",{id:"backWaistband",from:o.backGusset,to:o.backWaistband,x:o.backGusset.x-e-15}),r.frontbulge||r.cyclingchamois||(l("hd",{id:"frontGussetJoin",from:o.centerUpperLeg,to:o.frontGussetJoin,y:o.frontGussetJoin.y}),l("vd",{id:"frontGussetJoin",from:o.frontGussetJoin,to:o.frontWaistband,x:o.frontGussetJoin.x+e+15}),l("vd",{id:"frontGussetJoinToTop",from:o.frontGussetJoin,to:o.centerWaistband,x:o.frontGussetJoin.x+e+25})),c}},Hl=(t,e,o,a,i)=>{const n=.5*t.get(i+"GussetAngle")*("front"==i?1:-1),s=t.get(i+"GussetLength");e[i+"Center"]=e.centerCenter.shift("front"==i?270:90,s),e[i+"CenterCp"]=e[i+"Center"].shift(("front"==i?90:270)-n,s/3),e[i+"OutsideCenterCp"]=e.outsideCenter.shift("front"==i?270:90,s/3),o[i]=(new a).move(e[i+"Center"]).curve(e[i+"CenterCp"],e[i+"OutsideCenterCp"],e.outsideCenter).hide()},Al={name:"lumira.gusset",from:El,options:{backinserttopcp:.3,backinserttopcpangle:0,backinsertgussetcp:.2,frontbulgelift:1.75,frontbulgeforwardpercentage:.125,frontbulgemiddleshift:.65,buttlift:{pct:30,min:0,max:60,menu:(t,e)=>!e?.cyclingchamois&&(!!e?.backgusset&&"fit")},frontbulgesize:{pct:2.5,min:0,max:10,...(0,n.Wx)("crossSeamFront"),menu:(t,e)=>1==e?.frontbulge&&0==e?.cyclingchamois&&"style"}},draft:({measurements:t,store:e,sa:o,Point:a,points:i,Path:s,paths:r,Snippet:l,snippets:c,options:p,macro:d,utils:h,log:m,units:f,part:u})=>{const g=e.get("waistLowering"),b=e.get("waistbandSize"),w=e.get("gussetWidth"),k=e.get("backGussetLength"),C=e.get("frontGussetLength"),v=1+p.ease,y=!!p.cyclingchamois||p.frontbulge,T=!!p.cyclingchamois||p.backgusset;p.frontbulgesize>.9*p.gussetwidth&&(p.frontbulgesize=.9*p.gussetwidth,e.flag.note({msg:"lumira:bulgeToLarge",replace:{width:f(1),length:f(1)}}));const x=(p.cyclingchamois?.0125:p.frontbulgesize>.9*p.gussetwidth?.9*p.gussetwidth:p.frontbulgesize)*t.crossSeamFront,B=p.cyclingchamois?0:90*p.buttlift;if(i.centerCenter=new a(0,0),i.outsideCenter=i.centerCenter.shift(0,w),T){const o=e.get("backCircleLength");i.outsideBackCircleStart=i.outsideCenter.shift(90,k),i.centerBackCircleEnd=i.outsideBackCircleStart.shift(90,t.crossSeamBack-t.waistToHips-g-k).shift(180,w),i.centerBackCircleStart=new a(0,i.outsideBackCircleStart.y),i.backInsertCenterSeat=i.centerBackCircleEnd.shift(270,t.waistToSeat-g),i.centerBackCircleEndC
1p1=i.centerBackCircleEnd.shift(p.backinserttopcpangle,.25*t.hips*v*p.backinserttopcp),i.outsideBackCircleStartCp1=i.outsideBackCircleStart.shift(B,.25*t.upperLeg*v*p.backinsertgussetcp);let n=0,d=0;do{i.centerBackCircleEndCp1=i.centerBackCircleEndCp1.shift(p.backinserttopcpangle,n*(p.backinserttopcp/p.backinsertgussetcp)),i.outsideBackCircleStartCp1=i.outsideBackCircleStartCp1.shift(B,n*(p.backinsertgussetcp/p.backinserttopcp)),r.backInsertCircle=(new s).move(i.centerBackCircleEnd).curve(i.centerBackCircleEndCp1,i.outsideBackCircleStartCp1,i.outsideBackCircleStart).hide(),n=o-r.backInsertCircle.length()}while(d++<50&&(n>1||n<-1));d>=50&&m.info("lumira:couldNotFitCircle");const h=(new s).move(i.centerBackCircleEnd).curve(i.centerBackCircleEndCp1,i.outsideBackCircleStartCp1,i.outsideBackCircleStart);r.back=(new s).move(i.centerBackCircleEnd).join(h).line(i.outsideCenter).hide(),i.title=h.shiftFractionAlong(.75).shiftFractionTowards(i.centerBackCircleEnd,.5),c.circle4=new l("notch",i.outsideBackCircleStart),c.circle3=new l("notch",h.shiftFractionAlong(.25)),c.circle2=new l("notch",h.shiftFractionAlong(.5)),c.circle1=new l("notch",h.shiftFractionAlong(.75)),c.circle0=new l("notch",i.centerBackCircleEnd),i.backCenter=i.centerBackCircleEnd.clone()}else Hl(e,i,r,s,"back"),i.title=i.centerCenter.shiftFractionTowards(i.outsideCenter,.5);if(y){const o=t.crossSeamFront*p.frontbulgeforwardpercentage,a=e.get("frontLength");let d=h.rad2deg(Math.asin(.5*x/w))*(.6+p.gussetwidth);d>90&&(e.flag.note({msg:"lumira:bulgeToLarge",replace:{width:f(1),length:f(1)}}),d=90),i.frontOutsideSplit=i.outsideCenter.shift(270,o),i.frontCenterSplit=i.frontOutsideSplit.shift(180,w),i.frontOutside=i.frontOutsideSplit.shift(270+d,a);const u=.75*n.Qr;i.frontOutsideSplitCp1=i.frontOutsideSplit.shift(270,u*a);let v=0,y=0;do{i.frontOutside=i.frontOutside.shiftTowards(i.frontOutsideSplit,v),i.frontOutsideCp=i.frontOutside.shift(90+2*d,u*a),r.frontOutside=(new s).move(i.frontOutside).curve(i.frontOutsideCp,i.frontOutsideSplitCp1,i.frontOutsideSplit).hide(),v=r.frontOutside.length()-a}while(y++<100&&(v>1||v<-1));y>=100&&m.info("lumira:couldNotFitFrontOutside"),i.frontOutsideHips=r.frontOutside.shiftAlong(t.waistToHips-g-b);const T=i.frontOutside.angle(i.frontOutsideHips)-90;i.frontoutsideCenter=i.frontOutside.shift(180+T,w),i.frontCenterHips=i.frontOutsideHips.shift(180+T,w),i.outsideBackCircleStart=i.outsideCenter.shift(90,k);const B=C;i.centerCenterCp=i.centerCenter.shift(270,1*B),i.frontCenterSplitCp=i.frontCenterSplit.shift(270,1*B),i.frontCenterHipsCp=i.frontCenterHips.shift(T+90,.5*B),i.frontCenterMiddle=i.frontCenterHipsCp.shiftFractionTowards(i.frontCenterSplitCp,p.frontbulgemiddleshift),v=0,y=0;do{i.frontCenterMiddle=i.frontCenterMiddle.shift(T,v),i.frontCenterMiddleCp1=i.frontCenterMiddle.shift(90+.5*T,.2*B),i.frontCenterMiddleCp2=i.frontCenterMiddle.shift(270+.5*T,.5*B),i.frontCenterMiddle.x<0&&(i.frontCenterMiddle.x=0,i.frontCenterMiddleCp1.x=0,i.frontCenterMiddleCp2.x=0),i.frontCenterMiddleCp1.x<0&&(i.frontCenterMiddleCp1.x=0);v=(new s).move(i.frontoutsideCenter).line(i.frontCenterHips).curve(i.frontCenterHipsCp,i.frontCenterMiddleCp2,i.frontCenterMiddle).curve(i.frontCenterMiddleCp1,i.frontCenterSplitCp,i.frontCenterSplit).length()-(a+x)}while(y++<50&&(v>1||v<-1));y>=50&&m.info("lumira:couldNotFitFrontGussetPath"),r.frontBulge=(new s).move(i.frontCenterSplit).curve(i.frontCenterSplitCp,i.frontCenterMiddleCp1,i.frontCenterMiddle).curve(i.frontCenterMiddleCp2,i.frontCenterHipsCp,i.frontCenterHips).hide(),r.front=(new s).move(i.frontCenterSplit).join(r.frontBulge).line(i.frontoutsideCenter).join(r.frontOutside).line(i.outsideCenter).hide(),i.frontCenter=i.frontCenterSplit.clone(),c.frontCenter=new l("notch",i.frontCenter)}else Hl(e,i,r,s,"front");if(r.seamSA=(new s).move(i.frontCenter).join(r.front).join(r.back.reverse()).hide(),r.seam=(new s).move(i.backCenter).line(i.frontCenter).join(r.seamSA).close(),o){if(y){const t=r.seamSA.offset(o);r.saOffset=t.split(t.intersectsX(0)[0])[1].hide()}else r.saOffset=r.seamSA.offset(o).hide();r.sa=T?(new s).move(i.frontCenter).line(i.frontCenter.shift(270,o)).move(r.saOffset.start()).join(r.saOffset).line(i.centerBackCircleEnd.shift(90,o)).line(i.centerBackCircleEnd).attr("class","fabric sa"):(new s).move(i.frontCenter).line(i.frontCenter.shift(270,o)).move(r.saOffset.start()).join(r.saOffset).line(i.backCenter.shift(90,o)).line(i.backCenter).attr("class","fabric sa")}
1if(d("title",{at:i.title,nr:2,title:"lumira:gusset",align:"center",scale:T?1:.25}),c.middle=new l("notch",i.outsideCenter),e.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),d("cutonfold",T?{from:i.centerBackCircleEnd,to:i.centerCenter}:{from:i.backCenter,to:i.frontCenter}),d("vd",{id:"insertBottom",from:i.outsideCenter,to:i.frontCenter,x:i.outsideCenter.x+o+15}),d("hd",{id:"insertBottom",from:i.frontCenter,to:i.outsideCenter,y:i.frontCenter.y+o+15}),T){d("vd",{id:"insertOutsideGusset",from:i.outsideBackCircleStart,to:i.frontCenter,x:i.outsideCenter.x+o+25});const t=r.seam.edge("right");d("vd",{id:"rightGusset",from:t,to:i.frontCenter,x:t.x+o+15}),d("vd",{id:"rightGusset",from:t,to:i.frontCenter,x:t.x+o+15}),d("vd",{id:"top",from:i.centerBackCircleEnd,to:i.frontCenter,x:t.x+o+25}),d("hd",{id:"right",from:i.frontCenter,to:t,y:i.frontCenter.y+o+25})}else d("vd",{id:"insertTop",from:i.outsideCenter,to:i.backCenter,x:i.outsideCenter.x+o+15});return y&&(d("vd",{id:"bulgeLength",from:i.frontCenter,to:i.frontoutsideCenter,x:i.frontOutside.x+o+25}),d("hd",{id:"bulgeWidth",from:i.frontCenter,to:i.frontOutside,y:i.frontOutside.y+o+25}),d("ld",{id:"width",from:i.frontoutsideCenter,to:i.frontOutside,d:15})),u}},Ol={name:"lumira.waistband",from:El,draft:({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,options:l,measurements:c,macro:p,log:d,part:h})=>{if(!1===l.waistband)return h.hide();const m=!!l.cyclingchamois||l.backgusset,f=t.get("waistLength"),u=t.get("waistbandSize"),g=l.frontbulge||l.cyclingchamois?t.get("gussetWidth"):0,b=a.backWaist.dist(a.frontWaist),w=f+g,k=.35;a.topFront=new o(Math.min(b,w)/2,0),a.topBack=new o(Math.min(b,w)/2*-1,0);let C=a.frontWaist.angle(a.backWaist)-a.backWaistband.angle(a.backWaist)-90+(90-(a.frontWaist.angle(a.backWaist)-n.frontTop.end().angle(a.frontWaist)))/2,v=0,y=0;do{a.topFront=a.topFront.shift(180,y/2.5),a.topBack=a.topBack.shift(0,y/1.5),a.topFrontCp=a.topFront.shift(180+C,a.topBack.dist(a.topFront)*k),a.topBackCp=a.topBack.shift(0-C,a.topBack.dist(a.topFront)*k),n.top=(new i).move(a.topFront).curve(a.topFrontCp,a.topBackCp,a.topBack),y=n.top.length()-b}
1while(v++<100&&(y<-1||y>1));v>=100&&d.info("lumira:couldNotCreateWaistCircle"),a.bottomFront=a.topFront.shift(270+C,u),a.bottomBack=a.topBack.shift(270-C,u),v=0,y=0;do{a.bottomFront=a.bottomFront.shift(180,y/2.5),a.bottomBack=a.bottomBack.shift(0,y/1.5),a.bottomFrontCp=a.bottomFront.shift(180+C,a.bottomBack.dist(a.bottomFront)*k),a.bottomBackCp=a.bottomBack.shift(0-C,a.bottomBack.dist(a.bottomFront)*k),n.bottom=(new i).move(a.bottomFront).curve(a.bottomFrontCp,a.bottomBackCp,a.bottomBack).hide(),y=n.bottom.length()-w}while(v++<100&&(y<-1||y>1));v>=100&&d.info("lumira:couldNotCreateWaistCircle"),a.bottomCenter=n.bottom.shiftAlong(t.get("waistLengthFront")),a.bottomCenterCp=n.bottom.shiftAlong(1.1*t.get("waistLengthFront")),n.bottomFront=n.bottom.split(a.bottomCenter)[0],a.bottomBackTT=a.topBack.shift(270-C,u+(m?0:.1*c.crossSeamBack)),a.bottomBack=a.topBack.shift(270-C,u+(m?0:.1*c.crossSeamBack)),v=0,y=0;do{a.bottomBack=a.bottomBack.shift(0,y),a.bottomBackCp=a.bottomBack.shiftFractionTowards(a.bottomCenterCp,.7),n.bottomBack=(new i).move(a.bottomCenter).curve(a.bottomCenterCp,a.bottomBackCp,a.bottomBack),y=n.bottomFront.length()+n.bottomBack.length()-w}while(v++<100&&(y<-1||y>1));if(v>=100&&d.info("lumira:couldNotCreateWaistBack"),n.seamSA=(new i).move(a.topFront).join(n.top).line(a.bottomBack).join(n.bottomBack.reverse()).join(n.bottomFront.reverse()).hide(),n.seam=(new i).move(a.topFront).join(n.seamSA).line(a.topFront).close().attr("class","fabric"),e){const t=n.seamSA.offset(e);n.sa=(new i).move(a.topFront).line(t.start()).join(t).line(a.bottomFront).attr("class","fabric sa")}a.title=a.bottomFront.shiftFractionTowards(a.topBack,.5),p("title",{at:a.title,nr:3,title:"waistband",align:"center",scale:.3}),p("cutonfold",{from:a.bottomFront,to:a.topFront}),t.cutlist.addCut({cut:2,from:"fabric",onFold:!0}),g>0&&(r.gusset=new s("notch",n.bottom.shiftAlong(g)));let T=n.top.edge("top");T.y==a.topFront.y&&(T=n.top.edge("bottom"));let x=n.bottom.edge("bottom");return x.y==a.bottomFront.y&&(x=n.bottom.edge("top")),p("hd",{id:"top",from:a.topBack,to:a.topFront,y:Math.min(a.topFront.y,T.y)-e-15}),p("hd",{id:"bottom",from:a.bottomBack,to:a.bottomFront,y:Math.max(a.bottomFront.y,x.y)+e+15}),p("vd",{id:"top",from:a.bottomBack,to:T,x:T.x-15}),p("vd",{id:"bottom",from:a.topFront,to:x,x:T.x+15}),p("ld",{id:"back",from:a.topBack,to:a.bottomBack,d:15}),h}},Dl=new n.pT({data:Bl,parts:[El,Al,Wl,Ol]}),Nl=(t,e,o,a,i)=>{let n;for(t[a]=(new e).move(o[i[0]])._curve(o[i[1]+"Cp2"],o[i[1]]),n=2;n<i.length-1;n++)t[a].curve(o[i[n-1]+"Cp1"],o[i[n]+"Cp2"],o[i[n]]);return t[a].curve_(o[i[n-1]+"Cp1"],o[i[n]]),t[a]},Il=(t,e,o,a,i,n,s)=>{const r=Sl(e,t[n],100,0),l=r.shiftAlong(i+100);if(l.sitsRoughlyOn(o[n+s]))return;o[n+s]=l;const c=r.split(o[n+s]);2!=c.length&&a.info("lumina:couldNotLowerWaist"),t[n]=c[1].hide()},Ml=(t,e,o,a,i,n,s)=>{const r=a.middleCrossSeam.shiftFractionTowards(a.middleKnee,t.crotchToKnee),l=90+(s?t.crossSeamAngle*(e.waistBack/e.waist):-1*t.crossSeamAngle*(1-e.waistBack/e.waist)),c=s?e.crossSeamFront:e.crossSeam-e.crossSeamFront;let p=r.shift(l,e.waistToKnee);const d=a.middleCrossSeam.shiftFractionTowards(i.beamIntersectsY(r,p,a.middleCrossSeam.y),t.crotchPointsCP);let h=p.shiftFractionTowards(a.middleKnee,t.waistToKneeCP);const m=.75*e.waistToKnee;let f=0,u=0,g=999,b={};do{p=r.shift(l,m+1.03*f),h=p.shiftFractionTowards(a.middleKnee,t.waistToKneeCP);f=c-(new o).move(a.middleCrossSeam).curve(d,h,p).length(),Math.abs(f)<g&&(b={waist:p.copy(),waistCp:h.copy()},g=Math.abs(f))}while(++u<100&&(f>1||f<-1));u>=100&&(g>5?n.error("lumina:cantFitTheWaistPoint"):(p=b.waist,h=b.waistCp)),s?(a.frontWaist=p.clone(),a.frontWaistband=p.clone(),a.frontWaistCp=h.clone(),a.frontCrossSeamCp=d.clone()):(a.backWaist=p.clone(),a.backWaistband=p.clone(),a.backWaistCp=h.clone(),a.backCrossSeamCp=d.clone())},_l=({measurements:t,points:e,utils:o,prefix:a,postfix:i,names:n,ratio:s,ratioFixed:r,ease:l,waistReduction:c,distanceCompensation:p,fixedSidePanel:d})=>{let h,m=0;for(let f=0;f<n.length;f++){let u=0,g=0;"Waist"!=n[f]&&(u=t["waistTo"+n[f]]),"Waist"!=n[m]&&(g=t["waistTo"+n[m]]);let b,w=g-u;switch(n[f]){case"UpperLeg":{h=t.upperLeg;const i=o.beamIntersectsCurve(e[a+n[f]],e[a+n[f]].shift("front"==a?180:0,100*r),e.middleCrossSeam,e[a+"CrossSeamCp"],e[a+"WaistCp"],e[a+"Waist"]);!1!==i&&(i.constructor===Array?h+=i[0].dist(e[a+n[f]]):h+=i.dist(e[a+n[f]]));break}case"Waist":h=("front"==a?t.waist-t.waistBack:t.waistBack)-.5*c;break;case"Seat":h="front"==a?t.seat-t.seatBack:t.seatBack,w*=p;break;default:h=t[n[f].toLowerCase()],l>1&&("Ankle"==n[f]||"Knee"==n[f])&&(h*=1.2)}h/=2,h*=l;const k=h*s,C=0==s?h:d>0&&k<h-d?h-d:k;if(0==f)e[a+i+n[f]]=e[a+n[f]].shift("front"==a?180:0,C);else{let t=0;do{b=o.circlesIntersect(e[a+n[f]],C*(1+.02*t),e[a+i+n[m]],w),!1!==b&&(e[a+i+n[f]]=b["front"==a?0:1])}while(t++<100&&(0==b||isNaN(b["front"==a?0:1].x)));t>=100?e[a+i+n[f]]=e[a+i+n[m]].clone():m=f}}},jl={name:"lumina.shape",measurements:["waist","waistBack","hips","
1seat","seatBack","inseam","waistToSeat","waistToUpperLeg","waistToKnee","waistToHips","waistToFloor","knee","ankle","crossSeam","crossSeamFront","heel","upperLeg"],options:{waistband:{bool:!0,menu:"style"},lowerwaistbandback:{bool:!0,menu:(t,e)=>!!e?.waistband&&"style"},ease:{pct:-8,min:-25,max:10,menu:"fit"},length:{pct:35,min:10,max:100,menu:"style"},waistbandsize:{pct:50,min:0,max:150,...(0,n.Wx)("waistToHips"),menu:(t,e)=>!!e?.waistband&&"style"},waistlowering:{pct:35,min:-10,max:60,...(0,n.Wx)("waistToHips"),menu:"style"},waistreduction:{pct:4,min:0,max:10,...(0,n.Wx)("waist"),menu:(t,e)=>!!e?.waistband&&"fit"},sidepanel:{pct:25,min:10,max:40,menu:"style"},smoothing:{pct:85,min:50,max:100,menu:"advanced"},fixedsidepanel:{bool:!1,menu:"style"},crossSeamAngle:35,crotchToKnee:.4,waistToKneeCP:.4,kneeToWaistLength:400,crotchPointsCP:2},draft:({measurements:t,options:e,Point:o,Path:a,points:i,paths:n,utils:s,store:r,units:l,log:c,part:p})=>{const d=t.inseam>t.waistToFloor-t.waistToUpperLeg?t.waistToFloor-t.waistToUpperLeg:t.inseam,h=t.waistToFloor-d,m=t.waistToHips*e.waistlowering,f=e.waistband?t.waist*e.waistreduction:0,u=e.waistband?t.waistToHips*(e.waistlowering+e.waistbandsize>1.5?1.5-e.waistlowering:e.waistbandsize):0,g=1-e.sidepanel,b=e.ease+1,w=t.waistToFloor-t.heel/Math.PI;r.set("waistbandSize",u),r.set("waistLowering",m),t.waistToAnkle=t.waistToFloor-t.heel/Math.PI;const k=(t.waist-t.waistBack)*b/2*g,C=(t.waist-t.waistBack-f)*b/2*e.sidepanel;i.middleWaist=new o(0,0),i.middleHips=i.middleWaist.shift(270,t.waistToHips),i.middleSeat=i.middleWaist.shift(270,t.waistToSeat),i.frontCrossSeam=i.backCrossSeam=i.middleCrossSeam=i.middleWaist.shift(270,h),i.frontUpperLeg=i.backUpperLeg=i.middleUpperLeg=i.middleWaist.shift(270,t.waistToUpperLeg),i.frontKnee=i.backKnee=i.middleKnee=i.middleWaist.shift(270,t.waistToKnee),i.frontAnkle=i.backAnkle=i.middleAnkle=i.middleWaist.shift(270,w),i.frontFloor=i.backFloor=i.middleFloor=i.middleWaist.shift(270,t.waistToFloor),Ml(e,t,a,i,s,c,!0),Ml(e,t,a,i,s,c,!1);const v=(new a).move(i.frontWaist).curve(i.frontWaistCp,i.frontCrossSeamCp,i.middleCrossSeam),y=(new a).move(i.backWaist).curve(i.backWaistCp,i.backCrossSeamCp,i.middleCrossSeam);i.frontSeat=v.shiftAlong(t.waistToSeat*(t.crossSeamFront/t.waistToUpperLeg)*.8),i.frontHips=v.shiftAlong(t.waistToHips*(t.crossSeamFront/t.waistToUpperLeg)),i.backSeat=y.shiftAlong(t.waistToSeat*(t.waistToSeat/t.waistToUpperLeg)),i.backHips=y.shiftAlong(t.waistToHips*(t.waistToSeat/t.waistToUpperLeg)),["front","back"].forEach((e=>{_l({measurements:t,points:i,utils:s,prefix:e,postfix:"Side",names:["Ankle","Knee","UpperLeg","Seat","Waist"],ratio:0,ratioFixed:.1,ease:b,waistReduction:f,distanceCompensation:1,fixedSidePanel:0}),i[e+"SideWaistband"]=i[e+"SideWaist"].clone()})),i.middleWaistband=i.middleWaist.clone(),["front","back"].forEach((o=>{_l({measurements:t,points:i,utils:s,prefix:o,postfix:"Split",names:["Ankle","Knee","UpperLeg","Seat","Waist"],ratio:g,ratioFixed:k,ease:b,waistReduction:f,distanceCompensation:(i.frontAnkle.dist(i.frontCrossSeam)+v.length())/(t.waistToFloor-t.heel/Math.PI),fixedSidePanel:e.fixedsidepanel?C:0}),i[o+"SplitWaistband"]=i[o+"SplitWaist"].clone()})),i.backHipsCp1=i.backWaistCp.clone(),i.backWaistCp=i.backWaist.shift(i.backWaist.angle(i.backSplitWaist)-90,i.backWaist.dist(i.backHips)/3),i.backHipsCp2=i.backSeat.shiftOutwards(i.backHips,i.backWaist.dist(i.backHips)/4),i.frontHipsCp1=i.frontWaistCp.clone(),i.frontWaistCp=i.frontWaist.shift(i.frontWaist.angle(i.frontSplitWaist)+90,i.frontWaist.dist(i.frontHips)/3),i.frontHipsCp2=i.frontSeat.shiftOutwards(i.frontHips,i.frontWaist.dist(i.frontHips)/4),n.front=(new a).move(i.frontWaist).curve(i.frontWaistCp,i.frontHipsCp2,i.frontHips).curve(i.frontHipsCp1,i.frontCrossSeamCp,i.middleCrossSeam),n.back=(new a).move(i.backWaist).curve(i.backWaistCp,i.backHipsCp2,i.backHips).curve(i.backHipsCp1,i.backCrossSeamCp,i.middleCrossSeam),["front","back"].forEach((t=>{["Side","Split"].forEach((o=>{((t,e,o,a,i)=>{let n;for(let s=0;s<a.length-2;s++)if(n=!1,n="front"==e?t[e+o+a[s]].angle(t[e+o+a[s+1]])>t[e+o+a[s]].angle(t[e+o+a[s+2]]):t[e+o+a[s]].angle(t[e+o+a[s+1]])<t[e+o+a[s]].angle(t[e+o+a[s+2]]),n){const n=t[e+o+a[s]].angle(t[e+o+a[s+2]])-t[e+o+a[s]].angle(t[e+o+a[s+1]]);t[e+o+a[s+1]]=t[e+o+a[s]].shift(t[e+o+a[s]].angle(t[e+o+a[s+1]])+i*n,t[e+o+a[s]].dist(t[e+o+a[s+1]]))}})(i,t,o,["Ankle","Knee","UpperLeg","Seat","Waist"],e.smoothing)}))})),n.middle=(new a).move(i.middleWaist).line(i.middleFloor).setHidden(),["front","back"].forEach((t=>{["Side","Split"].forEach((e=>{Pl(i,3,[t+e+"Waist",t+e+"Seat",t+e+"UpperLeg",t+e+"Knee",t+e+"Ankle"])}))})),["front","back"].forEach((t=>{["Side","Split"].forEach((e=>{Nl(n,a,i,t+e,[t+e+"Waist",t+e+"Seat",t+e+"UpperLeg",t+e+"Knee",t+e+"Ankle"])}))})),["front","back"].forEach((t=>{["Waist","Waistband","Seat","UpperLeg","Knee","Ankle"].forEach((e=>{i[t+"Panel"+e]=i["middle"+e].shift("front"==t?0:180,i[t+"Side"+e].dist(i[t+"Split"+e]))}))})),["front","back"].forEach((t=>{Pl(i,3,[t+"PanelWaist",t+"PanelSeat",t+"PanelUpperLeg",t+"PanelKnee",t+"PanelAnkle"])})),["front","back"].forEach((t=>{Nl(n,a,i,t+"Panel",[t+"PanelWaist",t+"PanelSeat",t+"PanelUpperLeg",t+"PanelKnee",t+"PanelAnkle"])}));const T=n.frontSplit.length();for(;Math.abs(T-n.frontPanel.length())>1;)["front","back"].forEach((t=>{const e=n[t+"Split"].length()/n[t+"Panel"].length(),o=["Waist","Seat","UpperLeg","Knee","Ankle"];for(let a=0;a<o.length-1;a++)i[t+"Panel"+o[a]]=i[t+"Panel"+o[a+1]].shiftFractionTowards(i[t+"Panel"+o[a]],e)})),["front","back"].forEach((t=>{Pl(i,3,[t+"PanelWaist",t+"PanelSeat",t+"PanelUpperLeg",t+"PanelKnee",t+"PanelAnkle"])})),["front","back"].forEach((t=>{Nl(n,a,i,t+"Panel",[t+"PanelWaist",t+"PanelSeat",t+"PanelUpperLeg",t+"PanelKnee",t+"PanelAnkle"])}));if(e.length<1){const o=(1-e.length)*(d-(t.waistToFloor-w));["front","back"].forEach((t=>{["Side","Split","Panel"].forEach((e=>{i[t+e+"Hem"]=n[t+e].reverse().shiftAlong(o),n[t+e]=n[t+e].split(i[t+e+"Hem"])[0]}))}))}else["front","back"].forEach((t=>{["Side","Split","Panel"].forEach((e=>{i[t+e+"Hem"]=i[t+e+"Ankle"]}))}));return Il(n,a,i,c,m,"middle","Waist"),["front","back"].forEach((t=>{["Side","Split","Panel"].forEach((e=>{Il(n,a,i,c,m,t+e,"Waist")})),Il(n,a,i,c,m,t,"Waist")})),["front","back"].forEach((t=>{["Side","Split","Panel"].forEach((e=>{Il(n,a,i,c,u,t+e,"Waistband")})),Il(n,a,i,c,u,t,"Waistband")})),r.set("waistLength",i.backWaist.dist(i.backSideWaist)+i.frontWaist.dist(i.frontSideWaist)),["front","back"].forEach((t=>{const e=i[t+"Waistband"].dist(i[t+"SplitWaistband"]),o="front"==t?90:-90;let s=n[t].shiftAlong(1).angle(i[t+"Waistband"]);i[t+"WaistbandCp"]=i[t+"Waistband"].shift(s+o,.35*e),s=n[t+"Split"].shiftAlong(1).angle(i[t+"SplitWaistband"]),i[t+"SplitWaistbandCp"]=i[t+"SplitWaistband"].shift(s+-1*o,.35*e),n[t+"Waistband"]=(new a).move(i[t+"Waistband"]).curve(i[t+"WaistbandCp"],i[t+"SplitWaistbandCp"],i[t+"SplitWaistband"]).hide()}
1)),r.set("waistbandLength",n.backWaistband.length()+n.frontWaistband.length()+i.frontPanelWaistband.dist(i.backPanelWaistband)),e.waistband&&e.lowerwaistbandback&&(Il(n,a,i,c,.5*(m+u),"back","Waistband"),n.backWaistband=(new a).move(i.backWaistband)._curve(i.backSplitWaistbandCp,i.backSplitWaistband).hide()),r.set("waistbandBackLength",n.backWaistband.length()),r.set("waistbandFrontLength",n.frontWaistband.length()),r.set("waistbandPanelLength",i.frontPanelWaistband.dist(i.backPanelWaistband)),r.flag.note({msg:"lumina:dimensions",replace:{waistbandlength:l(2*(r.get("waistbandBackLength")+r.get("waistbandFrontLength")+r.get("waistbandPanelLength"))),length:l(r.get("waistbandSize")+i.frontPanelWaistband.dist(i.frontPanelHem))}}),p.hide()}},Gl={name:"lumina.panel",from:jl,draft:({sa:t,Point:e,points:o,Path:a,paths:i,Snippet:n,snippets:s,macro:r,store:l,part:c})=>{i.panelWaistband=(new a).move(o.frontPanelWaistband).line(o.backPanelWaistband).setText("top","note center").setClass("hidden"),i.panelHem=(new a).move(o.backPanelHem).line(o.frontPanelHem).setText("bottom","note center").setClass("hidden"),i.frontPanel.reverse().setText("front","note center").setClass("hidden"),i.backPanel=i.backPanel.unhide().setText("back","note center").setClass("hidden"),i.seam=(new a).move(o.backPanelHem).join(i.backPanel.reverse()).join(i.panelWaistband.reverse()).join(i.frontPanel).join(i.panelHem.reverse()).reverse().close().addClass("fabric"),t&&(i.sa=i.seam.offset(t).attr("class","fabric sa")),s.front1=new n("notch",i.frontPanel.shiftFractionAlong(.2)),s.front2=new n("notch",i.frontPanel.shiftFractionAlong(.4)),s.front3=new n("notch",i.frontPanel.shiftFractionAlong(.6)),s.front4=new n("notch",i.frontPanel.shiftFractionAlong(.8)),s.back1=new n("notch",i.backPanel.shiftFractionAlong(.25)),s.back2=new n("notch",i.backPanel.shiftFractionAlong(.5)),s.back3=new n("notch",i.backPanel.shiftFractionAlong(.75)),l.cutlist.addCut({cut:2,from:"fabric"}),o.gridAnchor=o.middleSeat.clone(),o.title=o.middleSeat.clone(),r("title",{at:o.title,nr:2,title:"panel",align:"center"});const p=o.frontPanelWaistband.shiftFractionTowards(o.backPanelWaistband,.5),d=new e(p.x,o.frontPanelHem.y),h=i.backPanel.edge("left"),m=i.frontPanel.edge("right");return r("hd",{id:"topFront",from:p,to:o.frontPanelWaistband,y:p.y-t-15}),r("hd",{id:"topBack",from:o.backPanelWaistband,to:p,y:p.y-t-15}),r("hd",{id:"middleFront",from:d,to:m,y:d.y+t+25}),r("hd",{id:"middleBack",from:h,to:d,y:d.y+t+25}),r("hd",{id:"bottomFront",from:d,to:o.frontPanelHem,y:d.y+t+15}),r("hd",{id:"bottomBack",from:o.backPanelHem,to:d,y:d.y+t+15}),r("vd",{id:"front",from:o.frontPanelWaistband,to:o.frontPanelHem,x:m.x+t+15}),r("vd",{id:"back",from:o.backPanelWaistband,to:o.backPanelHem,x:h.x-t-15}),c}},Ul={name:"lumina.leg",from:jl,draft:({sa:t,points:e,Path:o,paths:a,Snippet:i,snippets:n,macro:s,store:r,complete:l,part:c})=>{a.front=a.front.reverse().unhide().addText("front","note center").setClass("hidden"),a.frontSplit.unhide().addText("front","note center").setClass("hidden"),a.back.unhide().addText("back","note center").setClass("hidden"),a.backSplit=a.backSplit.reverse().unhide().addText("back","note center").setClass("hidden"),a.seam=(new o).move(e.frontSplitHem).join(a.backSplit).join(a.backWaistband.reverse()).join(a.back).join(a.front).join(a.frontWaistband).join(a.frontSplit).close().addClass("fabric"),t&&(a.sa=a.seam.offset(t).attr("class","fabric sa")),r.cutlist.addCut({cut:2,from:"fabric"}),e.gridAnchor=e.middleUpperLeg.clone(),e.logo=e.middleUpperLeg.shiftFractionTowards(e.frontSplitUpperLeg,.5),n.logo=new i("logo",e.logo),e.title=e.middleUpperLeg.shiftFractionTowards(e.backSplitUpperLeg,.6),s("title",{at:e.title,nr:1,title:"leg",align:"center"}),e.scalebox=e.middleUpperLeg.shift(270,50),s("scalebox",{at:e.scalebox}),n.middle=new i("notch",e.frontUpperLeg),n.front0=new i("notch",a.front.shiftFractionAlong(.5)),n.front1=new i("notch",a.frontSplit.shiftFractionAlong(.2)),n.front2=new i("notch",a.frontSplit.shiftFractionAlong(.4)),n.front3=new i("notch",a.frontSplit.shiftFractionAlong(.6)),n.front4=new i("notch",a.frontSplit.shiftFractionAlong(.8)),n.back0=new i("notch",a.back.shiftFractionAlong(.5)),n.back1=new i("notch",a.backSplit.shiftFractionAlong(.25)),n.back2=new i("notch",a.backSplit.shiftFractionAlong(.5)),n.back3=new i("notch",a.backSplit.shiftFractionAlong(.75)),l&&(a.frontWaistband=a.frontWaistband.unhide().addText("waistband","note center"),a.backWaistband=a.backWaistband.unhide().reverse().addText("waistband","note center"));
1const p=e.frontSplitHem.shiftFractionTowards(e.backSplitHem,.5);p.x=0;const d=a.seam.edge("top");d.x=0;const h=a.seam.edge("right"),m=a.seam.edge("left");return e.frontSplitWaistband.sitsRoughlyOn(m)||s("hd",{id:"middleToFront",from:m,to:e.middleUpperLeg,y:d.y-t-35}),e.backSplitWaistband.sitsRoughlyOn(h)||s("hd",{id:"middleToBack",from:e.middleUpperLeg,to:h,y:d.y-t-35}),s("hd",{id:"middleToFrontSplitWaistband",from:e.frontSplitWaistband,to:e.middleUpperLeg,y:d.y-t-25}),s("hd",{id:"middleToBackSplitWaistband",from:e.middleUpperLeg,to:e.backSplitWaistband,y:d.y-t-25}),s("hd",{id:"middleToFrontWaistband",from:e.frontWaistband,to:e.middleUpperLeg,y:d.y-t-15}),s("hd",{id:"middleToBackWaistband",from:e.middleUpperLeg,to:e.backWaistband,y:d.y-t-15}),s("hd",{id:"bottomFront",from:e.frontSplitHem,to:p,y:p.y+t+15}),s("hd",{id:"bottomBack",from:p,to:e.backSplitHem,y:p.y+t+15}),s("vd",{id:"middle",from:e.middleUpperLeg,to:p,x:0}),s("vd",{id:"front",from:e.frontWaistband,to:e.middleUpperLeg,x:-15}),s("vd",{id:"back",from:e.backWaistband,to:e.middleUpperLeg,x:15}),s("vd",{id:"frontSplit",from:e.frontSplitWaistband,to:e.frontSplitHem,x:m.x-t-15}),s("vd",{id:"backSplit",from:e.backSplitWaistband,to:e.backSplitHem,x:h.x+t+15}),c}},Yl={name:"lumina.pocket",after:Gl,from:jl,options:{pocket:{bool:!0,menu:"style"},pocketdepth:{pct:90,min:20,max:120,...(0,n.Wx)("waistToSeat"),menu:(t,e)=>!!e?.pocket&&"style"}},draft:({measurements:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,options:l,macro:c,store:p,log:d,part:h})=>{if(!l.pocket)return h.hide();const m=t.waistToSeat*l.pocketdepth;n.pocketWaistband=(new i).move(a.frontPanelWaistband).line(a.backPanelWaistband).addText("top","note center").setClass("hidden"),a.frontPocketHem=n.frontPanel.shiftAlong(m),a.backPocketHem=n.backPanel.shiftAlong(m),n.pocketHem=(new i).move(a.backPocketHem).line(a.frontPocketHem).addText("bottom","note center").setClass("hidden");const f=n.frontPanel.split(a.frontPocketHem);if(!f)return d.info("lumina:couldNotCreatePocket"),h.hide();n.frontPocket=f[0].reverse().unhide().addText("front","note center").setClass("hidden");const u=n.backPanel.split(a.backPocketHem);if(!u)return d.info("lumina:couldNotCreatePocket"),h.hide();n.backPocket=u[0].unhide().addText("back","note center").setClass("hidden"),n.seam=(new i).move(a.frontPocketHem).join(n.pocketHem.reverse()).join(n.backPocket.reverse()).join(n.pocketWaistband.reverse()).join(n.frontPocket.reverse()).close().reverse().addClass("fabric"),e&&(n.sa=n.seam.offset(e).attr("class","fabric sa"));for(var g=1;g<4;g++)n.frontPanel.length()*(.2*g)<m&&(r["front"+g]=new s("notch",n.frontPanel.shiftFractionAlong(.2*g))),n.backPanel.length()*(.25*g)<m&&(r["back"+g]=new s("notch",n.backPanel.shiftFractionAlong(.25*g)));p.cutlist.addCut({cut:2,from:"fabric"}),a.gridAnchor=a.middleSeat.clone(),a.title=a.frontPocketHem.shiftFractionTowards(a.backPanelWaistband,.5),c("title",{at:a.title,nr:4,title:"pocket",align:"center"});const b=a.frontPanelWaistband.shiftFractionTowards(a.backPanelWaistband,.5),w=new o(b.x,a.frontPocketHem.y),k=n.backPocket.edge("left"),C=n.frontPocket.edge("right");return c("hd",{id:"topFront",from:b,to:a.frontPanelWaistband,y:b.y-e-15}),c("hd",{id:"topBack",from:a.backPanelWaistband,to:b,y:b.y-e-15}),c("hd",{id:"bottomFront",from:w,to:C,y:w.y+e+15}),c("hd",{id:"bottomBack",from:k,to:w,y:w.y+e+15}),c("vd",{id:"front",from:a.frontPanelWaistband,to:a.frontPocketHem,x:a.frontPocketHem.x+e+15}),c("vd",{id:"back",from:a.backPanelWaistband,to:a.backPocketHem,x:a.backPocketHem.x-e-15}),h}},$l={name:"lumina.waistband",after:jl,draft:({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,options:l,macro:c,log:p,utils:d,part:h})=>{if(!1===l.waistband)return h.hide();const m=t.get("waistLength"),f=t.get("waistbandFrontLength"),u=t.get("waistbandPanelLength"),g=t.get("waistbandLength"),b=t.get("waistbandSize"),w=t.get("waistLowering");if(b<=0)return h.hide();a.origin=new o(0,0);const k=Math.asin(.5*Math.abs(g-m)/b),C=.5*m/Math.sin(k),v=m<g?270:90;let y=d.rad2deg(k);if(isNaN(y))return p.info("lumina:couldNoFitWaistband"),t.flag.note({msg:"lumina:couldNoFitWaistband"}),h.hide();let T,x,B=0,S=0;do{y+=.025*B,T=360/y,x=4/3*Math.tan(Math.PI/(2*T))*C,a.waistFront=a.origin.shift(v+y,C),a.waistBack=a.origin.shift(v-y,C),a.waistFrontCP=a.waistFront.shift(v-90+y,x),a.waistBackCP=a.waistBack.shift(v+90-y,x),n.waist=(new i).move(a.waistBack).curve(a.waistBackCP,a.waistFrontCP,a.waistFront),B=m-n.waist.length()}while(S++<100&&(B<-.5||B>.5));if(S>=100)return p.info("lumina:couldNoFitWaistband"),h.hide();a.waistbandFront=a.waistFront.shift(270+y,b),a.waistbandBack=a.waistBack.shift(270-y,b),x=4/3*Math.tan(Math.PI/(2*T))*(C+b*(m<g?1:-1)),a.waistbandFrontCP=a.waistbandFront.shift(v-90+y,x),a.waistbandBackCP=a.waistbandBack.shift(v+90-y,x),n.waistband=(new i).move(a.waistbandBack).curve(a.waistbandBackCP,a.waistbandFrontCP,a.waistbandFront),B=g-n.waistband.length();const L=n.waistband.reverse();a.snippetPanelBack=L.shiftAlong(f+u),r.panelBack=new s("notch",a.snippetPanelBack),a.snippetPanelFront=L.shiftAlong(f),r.panelFront=new s("notch",a.snippetPanelFront),l.lowerwaistbandback&&(n.waistband=L.split(a.snippetPanelBack)[0],a.waistbandBackPanel=a.snippetPanelBack.copy(),a.waistbandBackPanelCP=a.snippetPanelFront.shiftFractionTowards(a.waistbandBackPanel,1.4),a.waistbandBack=a.waistBack.shiftOutwards(a.waistbandBack,.5*(w+b)),n.waistband=(new i).move(a.waistbandBack)._curve(a.waistbandBackPanelCP,a.waistbandBackPanel).join(n.waistband.reverse())),a.anch
1or=a.waistFront,n.front=(new i).move(a.waistbandFront).line(a.waistFront).setText("front","note center").setClass("hidden"),n.back=(new i).move(a.waistBack).line(a.waistbandBack).setText("back","note center").setClass("hidden");let P=n.waist.edge("top");P.y==a.waistBack.y&&(P=n.waist.edge("bottom"));let R=n.waistband.shiftFractionAlong(.5);if(R.y==a.waistbandFront.y&&(R=n.waistband.edge("top")),c("cutonfold",{from:a.waistbandFront,to:a.waistFront}),t.cutlist.addCut({cut:2,from:"fabric",onFold:!0}),a.title=a.snippetPanelFront.shiftFractionTowards(a.snippetPanelBack,.5),a.title.y=P.y+20,c("title",{at:a.title,nr:3,title:"waistband",align:"center",scale:.35}),n.seamSA=(new i).move(a.waistFront).join(n.waist.reverse()).line(a.waistbandBack).join(n.waistband).hide(),n.seam=(new i).move(a.waistbandFront).line(a.waistFront).join(n.seamSA).addClass("fabric"),e){const t=n.seamSA.offset(e);n.sa=(new i).move(a.waistFront).line(t.start()).join(t).line(a.waistbandFront).attr("class","fabric sa")}return c("hd",{id:"top",from:a.waistBack,to:a.waistFront,y:Math.min(a.waistFront.y,P.y)-e-15}),c("hd",{id:"bottom",from:a.waistbandBack,to:a.waistbandFront,y:Math.max(a.waistbandFront.y,Math.max(R.y,a.waistbandBack.y))+e+15}),c("vd",{id:"top",from:a.waistBack,to:P,x:P.x-15,noStartMarker:!0,noEndMarker:!0}),c("vd",{id:"bottom",from:a.waistFront,to:R,x:P.x+15}),c("ld",{id:"front",from:a.waistFront,to:a.waistbandFront,d:15}),c("ld",{id:"back",from:a.waistBack,to:a.waistbandBack,d:-15}),h}},zl=new n.pT({data:Tl,parts:[jl,Gl,Ul,$l,Yl]}),Jl=JSON.parse('{"id":"lunetius","name":"Lunetius lacerna","code":"Rika Tamaike","description":"A FreeSewing pattern for a lacerna, a historical Roman cloak","design":"Rika Tamaike","difficulty":1,"tags":["tops","coats","historical"],"techniques":["hem"],"version":"4.6.0","pkg":"@freesewing/lunetius","collection":true}'),Kl={en:JSON.parse('{"t":"Lunetius Lacerna","d":"Lunetius is a lacerna, a historical Roman cloak","p":{"lacerna":"Lacerna"},"s":{},"o":{"lengthRatio":{"t":"Length ratio","d":"Controls the length of the garment"},"widthRatio":{"t":"Width ratio","d":"Controls the width of the garment"}
1,"length":{"t":"Length","d":"Choose from the different length styles"},"length.toHips":{"t":"To the hips","d":"Draft a lacerna that ends at the hips"},"length.toUpperLeg":{"t":"To the upper leg","d":"Draft a lacerna that ends at the upper leg or thigh"},"length.toKnee":{"t":"To the knee","d":"Draft a lacerna that ends at the knee"},"length.toBelowKnee":{"t":"Below the knee","d":"Draft a lacerna ends below the knee"},"length.toFloor":{"t":"To the floor","d":"Draft a full-length lacerna down to the floor"}}}')};const Vl={name:"lunetius.lacerna",measurements:["waistToKnee","waistToUpperLeg","waistToFloor","hpsToWaistBack","neck","shoulderToShoulder","shoulderToElbow","waistToHips"],options:{lengthRatio:{pct:105,min:60,max:130,menu:"style"},widthRatio:{pct:100,min:50,max:130,menu:"style"},length:{list:["toKnee","toBelowKnee","toHips","toUpperLeg","toFloor"],dflt:"toBelowKnee",menu:"style"}},draft:function({Point:t,points:e,Path:o,paths:a,measurements:i,options:n,macro:s,snippets:r,Snippet:l,sa:c,store:p,utils:d,part:h}){return p.set("length",(i.hpsToWaistBack+("toBelowKnee"===n.length?1.3*i.waistToKnee:i[`waist${d.capitalize(n.length)}`]))*n.lengthRatio),p.set("width",(.6*i.shoulderToShoulder+1.8*i.shoulderToElbow)*n.widthRatio),e.top=new t(0,0),e.bottom=new t(0,p.get("length")),e.topLeft=e.top.shift(180,p.get("width")),e.bottomLeft=e.topLeft.shift(-90,e.top.dy(e.bottom)),e.middleLeft=e.topLeft.shift(-90,i.hpsToWaistBack+i.waistToHips),e.middleLeft.y>e.bottomLeft.y&&(e.middleLeft.y=e.bottomLeft.y),e.topShoulder=e.top.shift(180,p.get("width")-1.2*i.shoulderToElbow),e.bottomShoulder=e.topShoulder.shift(-90,e.top.dy(e.bottom)),e.bottomShoulderCp1=e.middleLeft.shift(-90,e.middleLeft.dy(e.bottom)/2),e.bottomShoulderCp2=e.bottomLeft.shiftFractionTowards(e.bottomShoulder,.5),a.fold=(new o).move(e.bottom).line(e.top).hide(),a.hem=(new o).move(e.topLeft).line(e.middleLeft).curve(e.bottomShoulderCp1,e.bottomShoulderCp2,e.bottomShoulder).line(e.bottom).hide(),a.saBase=(new o).move(e.top).line(e.topLeft).hide(),a.seam=a.saBase.join(a.hem).join(a.fold).attr("class","fabric"),c&&(a.sa=a.saBase.offset(c).join(a.hem.offset(1.5*c)).close().addClass("fabric sa")),p.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),r.shoulder=new l("notch",e.topShoulder),s("cutonfold",{from:e.bottom,to:e.top,grainline:!0}),e.logo=e.top.shift(45,e.bottom.dy(e.top)/3),r.logo=new l("logo",e.logo),e.title=e.logo.shift(90,e.bottom.dy(e.top)/4),s("title",{at:e.title,nr:1,title:"Lacerna",align:"center"}),e.scalebox=e.title.shift(90,e.bottom.dy(e.top)/5),s("scalebox",{at:e.scalebox}),s("hd",{id:"wFull",from:e.topLeft,to:e.top,y:e.top.y-c-15}),s("vd",{id:"hFull",from:e.bottom,to:e.top,x:e.top.x+15}),s("hd",{id:"wToNeck",from:e.topLeft,to:e.topShoulder,y:e.top.y-c-15}),s("hd",{id:"wNeck",from:e.topShoulder,to:e.top,y:e.top.y-c-15}),s("hd",{id:"wToRoundStart",from:e.bottomShoulder,to:e.bottom,y:e.bottom.y+c+15}),s("hd",{id:"wRound",from:e.bottomLeft,to:e.bottomShoulder,y:e.bottom.y+c+15}),s("vd",{id:"hFromRound",from:e.middleLeft,to:e.topLeft,x:e.topLeft.x-c-15}),["toHips","toUpperLeg"].includes(n.length)||s("ld",{id:"lRoundDiag",from:e.middleLeft,to:e.bottomShoulder,d:0}),s("vd",{id:"hRound",from:e.bottomLeft,to:e.middleLeft,x:e.bottomLeft.x-10}),h}},Xl=new n.pT({data:Jl,parts:[Vl]}),Ql=JSON.parse('{"id":"octoplushy","name":"Octoplushy the octopus","code":"Wouter Van Wageningen","description":"A FreeSewing pattern for an octopus plushy toy","design":"Wouter Van Wageningen","difficulty":4,"tags":["accessories","toys"],"techniques":["curved-seam","precision"],"version":"4.6.0","pkg":"@freesewing/octoplushy","collection":true}'),ql={en:JSON.parse('{"t":"Octoplushy the octopus","d":"A multi-armed companion for next-level hugs","p":{"armSection1":"Arm section 1","armSection2":"Arm section 2","eye1":"Eye 1","eye2":"Eye 2","eye3":"Eye 3","headSection1":"Head section 1","headSection2":"Head section 2"},"s":{"eye":"Eye","mouth":"Mouth","stitchLine":"Stitch line","foldLine":"Fold lines","octopusEye.t":"The octopus eye is not shown","octopusEye.d":"The **Octopus eye** is a circular piece of fabric with a diameter of {{{ width }}}.","octopusPupil.t":"The octopus pupil is not shown","octopusPupil.d":"The **Octopus pupil** is a circular piece of fabric with a diameter of {{{ width }}}.","octopusEyebrow.t":"The octopus eyebrow is not shown","octopusEyebrow.d":"The **Octopus eyebrow** is a rectangular piece of fabric {{{ width }}} wide and {{{ length }}} long.","squidEye.t":"The squid eye is not shown","squidEye.d":"The **Squid eye** is a circular piece of fabric with a diameter of {{{ width }}}.","squidPupil.t":"The squid pupil is not shown","squidPupil.d":"The **Squid pupil** is a circular piece of fabric with a diameter of {{{ width }}}.","squidEyebrow.t":"The squid eyebrow is not shown","squidEyebrow.d":"The **Squid eyebrow** is a rectangular piece of fabric {{{ width }}} wide and {{{ length }}} long."},"o":{"size":{"t":"Size","d":"Controls the overall size (value shown is the size of the head)"},"type":{"t":"Type","d":"Allows you to choose one of the variants of this design"},"type.octoplushy":{"t":"Octoplushy","d":"Draft the octoplushy variant"},"type.octopus":{"t":"Octopus","d":"Draft the octopus variant"},"type.squid":{"t":"Squid","d":"Draft the squid variant"},"armWidth":{"t":"Arm width","d":"Controls the width of the arms"},"armLength":{"t":"Arm length","d":"Controls the length of the arms"},"neckWidth":{"t":"Neck width","d":"Determines the width at the neck"},"armTaper":{"t":"Arm tapering","d":"Controls the amount by which the arms taper"},"bottomTopArmRatio":{"t":"Bottom/Top arm ratio","d":"Changes the ratio between the fabric on the top of the arms versus that on the bottom of the arms"},"bottomArmReduction":{"t":"Bottom arm reduction","d":"This changes how long the bottom fabric of the arms is compared to the top fabric. It makes the arms more curly"},"bottomArmReductionPlushy":{"t":"Bottom arm reduction (plushy)","d":"This changes how long the bottom fabric of the arms is compared to the top fabric. It makes the arms more curly"}}}')};function Zl(t,{options:e,Point:o,Path:a,points:i,paths:n,Snippet:s,snippets:r,sa:l,macro:c,utils:p,store:d,complete:h,part:m}){if(t>("squid"==e.type?1:0))return m.hide(),m;const f=.55191502449351,u=e.sizeConstant*e.size,g=e.sizeConstant*e.size*.5,b="squid"==e.type?10:8,w=2*u/b,k=w*e.neckWidth,C=u*e.armWidth*e.bottomTopArmRatio*Math.PI,v=C*e.bottomTopArmRatio;let y=2*u/Math.PI*e.armLength;"octopus"==e.type&&(y*=2),"squid"==e.type&&(y*=1.8,1==t&&(y*=1.2)),i.topLeft=new o(-1*u,-1*g),i.topRight=new o(u,-1*g),i.bottomLeft=new o(-1*u,g),i.bottomRight=new o(u,g),i.left=new o(-1*u,0),i.right=new o(u,0),i.sectionTop=new o(0,-1*g),i.sectionBottom=new o(0,g),i.sectionLeft=new o(-1*w/2,0);const T=i.sectionLeft.shiftFractionTowards(i.sectionTop,.5),x=T.angle(i.sectionTop),B=T.shift(x-90,1e3);i.circleCenter=p.beamIntersectsY(T,B,0);const S=i.circleCenter.dist(i.sectionTop);i.sectionLeftCp2=i.sectionLeft.shift(90,S*f),i.sectionLeftCp1=i.sectionLeft.shift(270,S*f),i.circleTop=i.circleCenter.shift(90,S),i.sectionTopCp1=i.circleTop.shift(180,S*f),i.circleBottom=i.circleCenter.shift(270,S),i.sectionBottomCp2=i.circleBottom.shift(180,S*f),n.circle=(new a).move(i.circleTop).curve(i.sectionTopCp1,i.sectionLeftCp2,i.sectionLeft).curve(i.sectionLeftCp1,i.sectionBottomCp2,i.circleBottom).unhide();let L=0,P=0,R=4;do{i.lowerLeft=i.bottomLeft.shift(90,g/R),i.lowerRight=i.bottomRight.clone(),i.sectionBottomLeft=p.curveIntersectsY(i.sectionLeft,i.sectionLeftCp1,i.sectionBottomCp2,i.circleBottom,i.lowerLeft.y);const t=2*(i.sectionTop.x-i.sectionBottomLeft.x);P=k-t,R*=t/k,L++}while((P<-1||P>1)&&L<100);n.circle=(new a).move(i.circleTop).curve(i.sectionTopCp1,i.sectionLeftCp2,i.sectionLeft).curve(i.sectionLeftCp1,i.sectionBottomCp2,i.circleBottom).hide(),i.sectionBottomLeft=p.curveIntersectsY(i.sectionLeft,i.sectionLeftCp1,i.sectionBottomCp2,i.circleBottom,i.lowerLeft.y);const F=n.circle.split(i.sectionTop)[1].split(i.sectionBottomLeft)[0];if(i.sectionTop=F.ops[0].to.clone(),i.sectionTopCp1=F.ops[1].cp1.clone(),i.sectionLeftCp2=F.ops[1].cp2.clone(),i.sectionLeft=F.ops[1].to.clone(),i.sectionLeftCp1=F.ops[2].cp1.clone(),i.sectionBottomLeftCp2=F.ops[2].cp2.clone(),i.sectionBottomLeft=F.ops[2].to.clone(),i.sectionBottomLeftCp1=i.sectionBottomLeft.shiftFractionTowards(i.sectionBottomLeftCp2,-.5),i.skirtTopMiddle=i.sectionBottomLeft.shift(0,k/2).shift(270,k/3),i.skirtBottomLeft2=i.skirtTopMiddle.shift(270-360/b/2,u*e.armWidth*e.bottomTopArmRatio/2/Math.sin(p.deg2rad(360/b/2))),i.skirtBottomLeft3=ne
1w o(i.sectionTop.x-v/2,i.skirtBottomLeft2.y),"octoplushy"==e.type&&(i.skirtBottomLeft3=i.skirtBottomLeft3.shift(270,(i.skirtTopMiddle.y-i.skirtBottomLeft3.y)/2)),i.skirtBottomLeft=i.skirtBottomLeft3.clone(),i.armTopLeft=p.beamIntersectsX(i.skirtBottomLeft,i.skirtBottomLeft.shift(300,100),i.sectionTop.x-v/2),i.armTopLeftCp2=i.armTopLeft.shift(90,i.skirtBottomLeft.dist(i.armTopLeft)/2),i.armTopLeftCp1=i.armTopLeft.shift(270,y/10),i.armBottom=i.armTopLeft.shift(270,y+v/4).shift(0,v/2),i.armBottomLeft=i.armBottom.shift(90,v/2*(1-e.armTaper)).shift(180,v/2*(1-e.armTaper)),i.armBottomLeftCp2=i.armBottomLeft.shift(90,y/10),i.armBottomLeftCp1=i.armBottomLeft.shift(270,v/2*(1-e.armTaper)*f),i.armBottomCp2=i.armBottom.shift(180,v/2*(1-e.armTaper)*f),"octopus"==e.type){const t=.7,e=i.sectionBottom.dist(i.sectionTop);i.sectionTop=i.sectionTop.shift(90,e*t),i.sectionTopCp1=i.sectionTopCp1.shift(90,e*t),i.sectionLeft=i.sectionLeft.shift(90,e*t/1.1),i.sectionLeftCp1=i.sectionLeftCp1.shift(90,e*t/1.1),i.sectionLeftCp2=i.sectionLeftCp2.shift(90,e*t/1.1);const o=(new a).move(i.skirtBottomLeft).curve(i.skirtBottomLeft,i.sectionBottomLeftCp1,i.sectionBottomLeft);i.skirtBottomLeft=i.skirtBottomLeft.shift(o.shiftAlong(.1).angle(i.skirtBottomLeft),C),i.armTopLeft=i.armTopLeft.shift(270,1.6*C),i.armTopLeftCp1=i.armTopLeft.shift(270,C/2),i.armTopLeftCp2=i.armTopLeft.shift(90,C/2)}if("squid"==e.type){i.skirtBottomLeft=i.armTopLeft.clone(),i.armTopLeftCp2=i.armTopLeft.clone();let e=i.sectionBottom.dist(i.sectionTop);if(i.sectionTop=i.sectionTop.shift(90,e),i.sectionTopCp1=i.sectionTopCp1.shift(90,e),i.sectionLeft=i.sectionLeft.shift(90,e/3),i.sectionLeftCp1=i.sectionLeftCp1.shift(90,e/3),i.sectionLeftCp2=i.sectionLeftCp2.shift(90,e/3),i.tentacleLeft=p.beamIntersectsX(i.armBottomLeft,i.armBottomLeft.shift(250,100),-1.2*v),i.tentacleLeftCp2=i.tentacleLeft.shift(90,i.armBottomLeft.dist(i.tentacleLeft)/3),i.tentacleLeftCp1=i.tentacleLeft.shift(270,i.armBottomLeft.dist(i.tentacleLeft)/3),1==t){i.armBottomLeftCp1=i.armBottomLeft.shift(270,v*f),i.armBottom=i.armBottom.flipY(i.tentacleLeft),i.armBottomCp2=i.armBottomCp2.flipY(i.tentacleLeft);const t=(new a).move(i.sectionLeft).curve(i.sectionLeftCp2,i.sectionTopCp1,i.sectionTop);i.finSection=t.shiftFractionAlong(.45);const e=t.split(i.finSection);i.sectionLeftCp2=e[0].ops[1].cp1.clone(),i.finSectionCp1=e[0].ops[1].cp2.clone(),i.finFold=i.finSection.rotate(-20,i.sectionTop),i.finSeam=i.finSection.rotate(-40,i.sectionTop);const o=i.sectionTop.angle(i.finFold),n=i.sectionTop.angle(e[1].ops[1].cp1)-o,s=i.sectionTop.angle(e[1].ops[1].cp2)-o;i.finSeamCp2=i.sectionTop.shift(o-n,i.sectionTop.dist(e[1].ops[1].cp1)),i.finTopCp1=i.sectionTop.shift(o-s,i.sectionTop.dist(e[1].ops[1].cp2))}i.sectionMidLeft=i.sectionBottomLeft.shift(90,e/3),i.sectionMidLeftCp2=i.sectionMidLeft.shift(i.sectionBottomLeft.angle(i.sectionBottomLeftCp2),i.sectionBottomLeft.dist(i.sectionBottomLeftCp2)),i.sectionMidLeftCp1=i.sectionMidLeftCp2.flipY(i.sectionMidLeft)}i.sectionTopCp2=i.sectionTopCp1.flipX(i.sectionTop),i.sectionRightCp1=i.sectionLeftCp2.flipX(i.sectionTop),i.sectionRight=i.sectionLeft.flipX(i.sectionTop),i.sectionRightCp2=i.sectionLeftCp1.flipX(i.sectionTop),i.sectionBottomRightCp1=i.sectionBottomLeftCp2.flipX(i.sectionTop),i.sectionBottomRight=i.sectionBottomLeft.flipX(i.sectionTop),i.sectionBottomRightCp2=i.sectionBottomLeftCp1.flipX(i.sectionTop),i.skirtBottomRight=i.skirtBottomLeft.flipX(i.sectionTop),i.armTopRightCp1=i.armTopLeftCp2.flipX(i.sectionTop),i.armTopRight=i.armTopLeft.flipX(i.sectionTop),i.armTopRightCp2=i.armTopLeftCp1.flipX(i.sectionTop),i.armBottomRightCp1=i.armBottomLeftCp2.flipX(i.sectionTop),i.armBottomRight=i.armBottomLeft.flipX(i.sectionTop),i.armBottomRightCp2=i.armBottomLeftCp1.flipX(i.sectionTop),i.armBottomCp1=i.armBottomCp2.flipX(i.sectionTop),"squid"==e.type&&(i.sectionMidRightCp1=i.sectionMidLeftCp2.flipX(i.sectionTop),i.sectionMidRight=i.sectionMidLeft.flipX(i.sectionTop),i.sectionMidRightCp2=i.sectionMidLeftCp1.flipX(i.sectionTop),i.tentacleRight=i.tentacleLeft.flipX(i.sectionTop),i.tentacleRightCp1=i.tentacleLeftCp2.flipX(i.sectionTop),i.tentacleRightCp2=i.tentacleLeftCp1.flipX(i.sectionTop)),0==t&&(d.set("sectionWidth",w),d.set("armSkirtWidth",i.skirtBottomLeft.dist(i.skirtBottomRight)),d.set("armSkirtRadius",i.skirtBottomLeft.y-i.skirtTopMiddle.y),d.set("armSkirtToTopAngle",i.skirtBottomLeft.angle(i.armTopLeft))),n.armBottom=(new a).move(i.armBottomLeft).curve(i.armBottomLeftCp1,i.armBottomCp2,i.armBottom).curve(i.armBottomCp1,i.armBottomRightCp2,i.armBottomRight).hide(),"squid"==e.type?(n.sectionLeft=(new a).move(i.sectionTop).curve(i.sectionTopCp1,i.sectionLeftCp2,i.sectionLeft).curve(i.sectionLeftCp1,i.sectionMidLeftCp2,i.sectionMidLeft).curve(i.sectionMidLeftCp1,i.sectionBottomLeftCp2,i.sectionBottomLeft).hide(),n.sectionRight=(new a).move(i.sectionBottomRight).curve(i.sectionBottomRightCp1,i.sectionMidRightCp2,i.sectionMidRight).curve(i.sectionMidRightCp1,i.sectionRightCp2,i.sectionRight).hide(),n.skirtLeft=(new a).move(i.sectionBottomLeft).curve(i.sectionBottomLeftCp1,i.armTopLeftCp2,i.armTopLeft).hide(),n.skirtRight=(new a).move(i.armTopRight).curve(i.armTopRightCp1,i.sectionBottomRightCp2,i.sectionBottomRight).hide(),1==t&&(n.sectionLeft=(new a).move(i.sectionTop).curve(i.finTopCp1,i.finSeamCp2,i.finSeam).line(i.finFold).line(i.finSection).curve(i.finSectionCp1,i.sectionLeftCp2,i.sectionLeft).curve(i.sectionLeftCp1,i.sectionMidLeftCp2,i.sectionMidLeft).curve(i.sectionMidLeftCp1,i.sectionBottomLeftCp2,i.sectionBottomLeft).hide(),n.armBottom=(new a).move(i.armBottomLeft).curve(i.armBottomLeftCp1,i.tentacleLeftCp2,i.tentacleLeft).curve(i.tentacleLeftCp1,i.armBottomCp2,i.armBottom).curve(i.armBottomCp1,i.tentacleRightCp2,i.tentacleRight).curve(i.tentacleRightCp1,i.armBottomRightCp2,i.armBottomRight).hide())):(n.sectionLeft=(new a).move(i.sectionTop).curve(i.sectionTopCp1,i.sectionLeftCp2,i.sectionLeft).curve(i.sectionLeftCp1,i.sectionBottomLeftCp2,i.sectionBottomLeft).hide(),n.sectionRight=(new a).move(i.sectionBottomRight).curve(i.sectionBottomRightCp1,i.sectionRightCp2,i.sectionRight).hide(),i.skirtBottomLeft.sitsRoughlyOn(i.armTopLeft)?(n.skirtLeft=(new a).move(i.sectionBottomLeft).curve(i.sectionBottomLeftCp1,i.skirtBottomLeft,i.skirtBottomLeft).hide(),n.skirtRight=(new a).move(i.armTopRight).curve(i.skirtBottomRight,i.sectionBottomRightCp2,i.sectionBottomRight).hide()):(n.skirtLeft=(new a).move(i.sectionBottomLeft).curve(i.sectionBottomLeftCp1,i.skirtBottomLeft,i.skirtBottomLeft).curve(i.skirtBottomLeft,i.armTopLeftCp2,i.armTopLeft).hide(),n.skirtRight=(new a).move(i.armTopRight).curve(i.armTopRightCp1,i.skirtBottomRight,i.skirtBottomRight).curve(i.skirtBottomRight,i.sectionBottomRightCp2,i.sectionBottomRight).hide())),n.section=(new a).move(i.sectionTop).join(n.sectionLeft).join(n.skirtLeft).curve(i.armTopLeftCp1,i.armBottomLeftCp2,i.armBottomLeft).join(n.armBottom).curve(i.armBottomRightCp1,i.armTopRightCp2,i.armTopRight).join(n.skirtRight).join(n.sectionRight).curve(i.sectionRightCp1,i.sectionTopCp2,i.sectionTop).close().attr("class","fabric"),i.logo=i.sectionTop.shiftFractionTowards(i.sectionBottom,"octoplushy"==e.type?.3:.5),r.logo=new s("logo",i.logo).attr("data-scale",.4),i.gridAnchor=i.skirtTopMiddle.clone(),1==t?d.cutlist.addCut({cut:2,from:"fabric",identical:!0}):d.cutlist.addCut({cut:8,from:"fabric",identical:!0}),i.titleAnchor=i.sectionBottom.shiftFractionTowards(i.sectionTop,"octoplushy"==e.type?.3:.4).shift(180,.2*w),c("title",{at:i.titleAnchor,nr:1+3*t,title:"head"+(0==t?"":" (a)"),rotation:90,scale:"octoplushy"==e.type?.35:.5}),"octoplushy"==e.type&&(i.eyeLeft=n.sectionLeft.shiftFractionAlong(.465),i.eyeRight=i.eyeLeft.flipX(i.sectionTop),h&&(i.eyeLeft.addText("octoplushy:eye","center"),i.eyeRight.addText("octoplushy:eye","center")),r.eyeLeft=new s("button",i.eyeLeft),r.eyeRight=new s("button",i.eyeRight),i.mouthMiddle=i.sectionBottom.shiftFractionTowards(i.sectionTop,.45),i.mouthLeft=i.mouthMiddle.shift(180,w/4),i.mouthRight=i.mouthMiddle.shift(0,w/4),i.mouthBottom=i.mouthMiddle.shift(270,w/4),i.mouthLeftCp1=i.mouthLeft.shift(270,w/4*f),i.mouthRightCp2=i.mouthRight.shift(270,w/4*f),i.mouthBottomCp2=i.mouthBottom.shift(180,w/4*f),i.mouthBottomCp1=i.mouthBottom.shift(0,w/4*f),n.mouth=(new a).move(i.mouthLeft).curve(i.mouthLeftCp1,i.mouthBottomCp2,i.mouthBottom).curve(i.mouthBottomCp1,i.mouthRightCp2,i.mouthRight).attr("class","stroke-lg"),h&&n.mouth.addText("octoplushy:mouth","text-xs center")),"squid"==e.type&&1==t&&h&&(n.fold=(new a).move(i.sectionTop).line(i.finFold).addClass("hint dotted").addText("octoplushy:foldLine","center")),"octopus"==e.type&&(i.skirtArmLeft=p.curveIntersectsX(i.sectionBottomLeft,i.sectionBottomLeftCp1,i.skirtBottomLeft,i.skirtBottomLeft,i.armTopLeft.x),i.skirtArmRight=i.skirtArmLeft.flipX(i.sectionTop),h&&(n.armLeftLine=(new a).move(i.skirtArmLeft).line(i.armTopLeft).addClass("class","hint dotted").addText("octoplushy:stitchLine","center"),n.armRightLine=(new a).move(i.armTopRight).line(i.skirtArmRight).addClass("class","hint dotted").addText("octoplushy:stitchLine","center"))),h&&(i.sectionTop.addText("A","center"),i.armTopLeft.addText("B","center"),i.armTopRight.addText("B","center")),r.left=new s("notch",i.sectionLeft),r.right=new s("notch",i.sectionRight),r.bottomLeft=new s("notch",i.sectionBottomLeft),r.bottomRight=new s("notch",i.sectionBottomRight);for(var E=0;E<4;E++)r[`armLeft${E}`]=new s("notch",i.armTopLeft.shiftFractionTowards(i.armBottomLeft,E/4)),r[`armRight${E}`]=new s("notch",i.armTopRight.shiftFractionTowards(i.armBottomRight,E/4));return l&&(n.sa=n.section.offset(l).attr("class","fabric sa")),c("hd",{from:i.sectionLeft,to:i.sectionRight,y:i.sectionTop.y-l,id:"headWidth"}),c("hd",{from:i.armTopLeft,to:i.armTopRight,y:i.armTopRight.y,id:"topArmWidth"}),c("hd",{from:i.armBottomLeft,to:i.armBottomRight,y:i.armBottom.y+l+10,id:"bottomArmWidth"}),c("vd",{from:i.sectionTop,to:i.sectionRight,x:i.skirtBottomRight.x+l+10,id:"headMidHeight"}),c("vd",{from:i.sectionTop,to:i.sectionBottomRight,x:i.skirtBottomRight.x+l+20,id:"topToNeckHeight"}),c("vd",{from:i.sectionTop,to:i.skirtBottomRight,x:i.skirtBottomRight.x+l+30,id:"topToArmHeight"}),c("vd",{from:i.sectionTop,to:i.armBottom,x:i.skirtBottomRight.x+l+40,id:"totalHeight"}),"octopus"==e.type&&(c("hd",{from:i.skirtBottomLeft,to:i.skirtBottomRight,y:i.skirtBottomRight.y,id:"skirtWidth"}),c("vd",{from:i.skirtBottomRight,to:i.armTopRight,x:i.skirtBottomRight.x+l+30,id:"skirtHeight"})),"squid"==e.type&&(c("vd",{from:i.armTopLeft,to:i.sectionBottomLeft,x:i.armTopLeft.x-l-10,id:"neckToArm"}),c("vd",{from:i.sectionBottomLeft,to:i.sectionMidLeft,x:i.armTopLeft.x-l-10,id:"sectionHeight"}),1==t&&(c("hd",{from:i.tentacleLeft,to:i.tentacleRight,y:i.tentacleRight.y,id:"tentacleWidth"}),c("hd",{from:i.finSeam,to:i.sectionTop,y:i.sectionTop.y,id:"finWidth"}),c("hd",{from:i.finSeam,to:i.finSection,y:i.finSection.y,id:"finToHead"}),c("hd",{from:i.finFold,to:i.finSection,y:i.finFold.y,id:"foldToHead"}),c("vd",{from:i.armBottom,to:i.tentacleLeft,x:i.tentacleLeft.x-l-10,id:"tentacleHeight"}),c("vd",{from:i.finSeam,to:i.sectionTop,x:i.finSeam.x-l,id:"finHeight"}),c("vd",{from:i.finFold,to:i.sectionTop,x:i.finSeam.x-l-10,id:"finFoldHeight"}),c("vd",{from:i.finSection,to:i.sectionTop,x:i.finSeam.x-l-20,id:"finToHeadHeight"}))),m}const tc={sizeConstant:200,size:{pct:100,min:5,max:500,menu:"style",toAbs:(t,e,o)=>o.sizeConstant*t*2/Math.PI*("octopus"===o.type?1.7:"squid"===o.type?2:1)},type:{dflt:"octoplushy",list:["octoplushy","octopus","squid"],menu:"style"},armWidth:{pct:15,min:10,max:30,menu:"style"},armLength:{pct:200,min:100,max:500,menu:"style",toAbs:(t,e,o)=>o.sizeConstant*o.size*2/Math.PI*t*("octopus"===o.type?2:"squid"===o.type?1.8:1)},neckWidth:{pct:25,min:25,max:45,menu:"style"},armTaper:{pct:25,min:0,max:50,menu:"style"},bottomTopArmRatio:{pct:57,min:25,max:75,menu:"style"},bottomArmReduction:{pct:90,min:75,max:125,menu:(t,e)=>"octoplushy"!==e?.type&&"style"},bottomArmReductionPlushy:{pct:80,min:75,max:125,menu:(t,e)=>"octoplushy"===e?.type&&"style"}},ec={name:"octoplushy.headSection1",options:tc,draft:t=>Zl(0,t)},oc={name:"octoplushy.headSection2",options:tc,draft:t=>Zl(1,t)};function ac(t,{options:e,Point:o,Path:a,points:i,paths:n,Snippet:s,snippets:r,sa:l,macro:c,utils:p,store:d,complete:h,part:m}){if(t>("squid"==e.type?1:0))return m.hide(),m;const f=.55191502449351,u=e.sizeConstant*e.size,g="squid"==e.type?10:8,b=2*u/g,w=u*e.armWidth*(1-e.bottomTopArmRatio)*Math.PI,k=w*(1-e.bottomTopArmRatio);let C=2*u/Math.PI*e.armLength;switch(e.type){case"octopus":C*=2,C*=1-(1-e.bottomArmReduction)/2;break;case"squid":C*=1.8,1==t&&(C*=1.2);break;case"octoplushy":C*=e.bottomArmReductionPlushy}i.armMiddle=new o(0,0),i.skirtLeft2=i.armMiddle.shift(270-360/g/2,u*e.armWidth*e.bottomTopArmRatio/2/Math.sin(p.deg2rad(360/g/2))),"octoplushy"==e.type&&(i.skirtLeft2=i.skirtLeft2.shift(90,i.skirtLeft2.y-i.armMiddle.y-d.get("armSkirtRadius"))),"squid"==e.type&&(i.skirtLeft2=i.skirtLeft2.shift(90,(i.skirtLeft2.y-i.armMiddle.y)/2)),i.armMiddleCp1=i.armMiddle.shiftFractionTowards(i.skirtLeft2,f),i.skirtLeft3=ne
1w o(-1*k/2,i.skirtLeft2.y),i.skirtLeft=i.skirtLeft3.clone();const v=i.skirtLeft.shift(d.get("armSkirtToTopAngle"),10);if(Math.round(1e3*v.x)<=Math.round(k/-2*1e3)?i.armTopLeft=i.skirtLeft.clone():i.armTopLeft=p.beamIntersectsX(i.skirtLeft,i.skirtLeft.shift(d.get("armSkirtToTopAngle"),10),k/-2),i.armTopLeftCp2=i.armTopLeft.shift(90,(i.armTopLeft.y-i.skirtLeft.y)*f),i.armTopLeftCp1=i.armTopLeft.shift(270,C/10),i.armBottomLeft=i.armTopLeft.shift(270,C).shift(0,k/4),i.armBottom=i.armTopLeft.shift(270,C+k/4).shift(0,k/2),i.armBottomLeft=i.armBottom.shift(90,k/2*(1-e.armTaper)).shift(180,k/2*(1-e.armTaper)),i.armBottomLeftCp2=i.armBottomLeft.shift(90,C/10),i.armBottomLeftCp1=i.armBottomLeft.shift(270,k/2*(1-e.armTaper)*f),i.armBottomCp2=i.armBottom.shift(180,k/2*(1-e.armTaper)*f),"octopus"==e.type){const t=(new a).move(i.armTopLeft).curve(i.armTopLeftCp2,i.armMiddleCp1,i.armMiddle);i.skirtLeft=i.armTopLeft.shift(t.shiftAlong(.1).angle(i.armTopLeft),w),i.armTopLeft=i.armTopLeft.shift(270,1.6*w),i.armTopLeftCp1=i.armTopLeft.shift(270,w/2),i.armTopLeftCp2=i.armTopLeft.shift(90,w/2)}"squid"==e.type&&(i.tentacleLeft=p.beamIntersectsX(i.armBottomLeft,i.armBottomLeft.shift(250,100),-1.2*k),i.tentacleLeftCp2=i.tentacleLeft.shift(90,i.armBottomLeft.dist(i.tentacleLeft)/3),i.tentacleLeftCp1=i.tentacleLeft.shift(270,i.armBottomLeft.dist(i.tentacleLeft)/3),1==t&&(i.armBottomLeftCp1=i.armBottomLeft.shift(270,k*f),i.armBottom=i.armBottom.flipY(i.tentacleLeft),i.armBottomCp2=i.armBottomCp2.flipY(i.tentacleLeft))),i.armMiddleCp2=i.armMiddleCp1.flipX(i.armMiddle),i.skirtRight=i.skirtLeft.flipX(i.armMiddle),i.armTopRight=i.armTopLeft.flipX(i.armMiddle),i.armTopRightCp1=i.armTopLeftCp2.flipX(i.armMiddle),i.armTopRightCp2=i.armTopLeftCp1.flipX(i.armMiddle),i.armBottomRight=i.armBottomLeft.flipX(i.armMiddle),i.armBottomRightCp1=i.armBottomLeftCp2.flipX(i.armMiddle),i.armBottomRightCp2=i.armBottomLeftCp1.flipX(i.armMiddle),i.armBottom=i.armBottom.flipX(i.armMiddle),i.armBottomCp1=i.armBottomCp2.flipX(i.armMiddle),"squid"==e.type&&(i.tentacleRight=i.tentacleLeft.flipX(i.sectionTop),i.tentacleRightCp1=i.tentacleLeftCp2.flipX(i.sectionTop),i.tentacleRightCp2=i.tentacleLeftCp1.flipX(i.sectionTop)),n.armBottom=(new a).move(i.armBottomLeft).curve(i.armBottomLeftCp1,i.armBottomCp2,i.armBottom).curve(i.armBottomCp1,i.armBottomRightCp2,i.armBottomRight).hide(),"squid"==e.type&&1==t&&(n.armBottom=(new a).move(i.armBottomLeft).curve(i.armBottomLeftCp1,i.tentacleLeftCp2,i.tentacleLeft).curve(i.tentacleLeftCp1,i.armBottomCp2,i.armBottom).curve(i.armBottomCp1,i.tentacleRightCp2,i.tentacleRight).curve(i.tentacleRightCp1,i.armBottomRightCp2,i.armBottomRight).hide()),i.skirtLeft.sitsRoughlyOn(i.armTopLeft)?n.topLeft=(new a).move(i.armMiddle).curve(i.armMiddleCp1,i.skirtLeft,i.skirtLeft):n.topLeft=(new a).move(i.armMiddle).curve(i.armMiddleCp1,i.skirtLeft,i.skirtLeft).curve(i.skirtLeft,i.armTopLeftCp2,i.armTopLeft),i.skirtRight.sitsRoughlyOn(i.armTopRight)?n.topRight=(new a).move(i.armTopRight).curve(i.skirtRight,i.armMiddleCp2,i.armMiddle):n.topRight=(new a).move(i.armTopRight).curve(i.armTopRightCp1,i.skirtRight,i.skirtRight).curve(i.skirtRight,i.armMiddleCp2,i.armMiddle),n.section=(new a).move(i.armMiddle).join(n.topLeft).curve(i.armTopLeftCp1,i.armBottomLeftCp2,i.armBottomLeft).join(n.armBottom).curve(i.armBottomRightCp1,i.armTopRightCp2,i.armTopRight).join(n.topRight).close(),i.logo=i.armMiddle.shiftFractionTowards(i.armBottom,.08),r.logo=new s("logo",i.logo).attr("data-scale",.4),i.gridAnchor=i.logo.clone(),h&&(i.armMiddle.addText("C","center"),i.armTopLeft.addText("D","center"),i.armTopRight.addText("D","center")),i.titleAnchor=i.armMiddle.shiftFractionTowards(i.armBottom,.2).shift(180,.1*b),c("title",{at:i.titleAnchor,nr:2+3*t,title:"arm"+(0==t?"":" (a)"),rotation:90,scale:.3}),1==t?d.cutlist.addCut({cut:2,from:"undersideFabric",identical:!0}):d.cutlist.addCut({cut:8,from:"undersideFabric",identical:!0});for(var y=0;y<4;y++)r[`armLeft${y}`]=new s("notch",i.armTopLeft.shiftFractionTowards(i.armBottomLeft,y/4)),r[`armRight${y}`]=new s("notch",i.armTopRight.shiftFractionTowards(i.armBottomRight,y/4));return"octopus"==e.type&&(i.skirtArmLeft=p.curveIntersectsX(i.skirtLeft,i.skirtLeft,i.armMiddleCp1,i.armMiddle,i.armTopLeft.x),i.skirtArmRight=i.skirtArmLeft.flipX(i.sectionTop),h&&(n.armLeftLine=(new a).move(i.skirtArmLeft).line(i.armTopLeft).addClass("hint dotted").addText("octoplushy:stitchLine","center"),n.armRightLine=(new a).move(i.armTopRight).line(i.skirtArmRight).addClass("hint dotted").addText("octoplushy:stitchLine","center"))),l&&(n.sa=n.section.offset(l).attr("class","fabric sa")),c("hd",{from:i.armTopLeft,to:i.armTopRight,y:i.armMiddle.y-l,id:"topWidth"}),c("hd",{from:i.armBottomLeft,to:i.armBottomRight,y:i.armBottom.y+l+10,id:"bottomWidth"}),c("vd",{from:i.armBottom,to:i.armMiddle,x:i.skirtLeft.x-l-20,id:"height"}),"octopus"==e.type?(c("hd",{from:i.skirtLeft,to:i.skirtRight,y:i.skirtRight.y,id:"skirtWidth"}),c("vd",{from:i.skirtLeft,to:i.armMiddle,x:i.skirtLeft.x-l-10,id:"skirtHeight"}),c("vd",{from:i.armTopLeft,to:i.skirtLeft,x:i.skirtLeft.x-l-10,id:"skirtToArm"})):c("vd",{from:i.armTopLeft,to:i.armMiddle,x:i.skirtLeft.x-l-10,id:"topToArm"}),"squid"==e.type&&1==t&&(c("hd",{from:i.tentacleLeft,to:i.tentacleRight,y:i.tentacleRight.y,id:"tentacleWidth"}),c("vd",{from:i.armBottom,to:i.tentacleLeft,x:i.tentacleLeft.x-l-10,id:"tentacleHeight"})),m}const ic={name:"octoplushy.armSection1",after:ec,draft:t=>ac(0,t)},nc={name:"octoplushy.armSection2",after:[oc,ec],draft:t=>ac(1,t)};function sc(t,{options:e,Point:o,Path:a,points:i,paths:n,Snippet:s,snippets:r,sa:l,macro:c,expand:p,units:d,store:h,part:m}){if("octoplushy"==e.type)return m;if(t>("squid"==e.type?1:2))return m.hide();const f=.55191502449351,u=h.get("sectionWidth")/1.5*(1===t?.65:1),g=.375*u,b=(u+2*g)*Math.PI;if(!p){const o=l?2*l:0,a=("squid"==e.type?"squid":"octopus")+(2==t?"Eyebrow":1==t?"Pupil":"Eye");return h.flag.note({msg:a,notes:[l?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{width:d(b+o),length:d(2*g+o)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),h.flag.preset("expandIsOff"),m.hide()}return h.flag.preset("expandIsOn"),t<2?(i.top=new o(0,u/2*-1),i.left=new o(u/2*-1,0),i.bottom=new o(0,u/2),i.right=new o(u/2,0),i.topCp1=i.top.shift(180,u/2*f),i.topCp2=i.top.shift(0,u/2*f),i.leftCp1=i.left.shift(270,u/2*f),i.leftCp2=i.left.shift(90,u/2*f),i.bottomCp1=i.bottom.shift(0,u/2*f),i.bottomCp2=i.bottom.shift(180,u/2*f),i.rightCp1=i.right.shift(90,u/2*f),i.rightCp2=i.right.shift(270,u/2*f),n.eye=(new a).move(i.top).curve(i.topCp1,i.leftCp2,i.left).curve(i.leftCp1,i.bottomCp2,i.bottom).curve(i.bottomCp1,i.rightCp2,i.right).curve(i.right
1Cp1,i.topCp2,i.top).close().attr("class","fabric"),i.logo=i.top.shiftFractionTowards(i.bottom,.3),i.titleAnchor=i.bottom.shiftFractionTowards(i.top,.25).shift(180,u/10)):(i.tl=new o(0,0),i.tr=i.tl.shift(0,b),i.bl=i.tl.shift(270,2*g),i.br=i.bl.shift(0,b),n.eye=(new a).move(i.tl).line(i.bl).line(i.br).line(i.tr).line(i.tl).close().attr("class","fabric"),i.logo=i.tl.shiftFractionTowards(i.bl,.5).shiftFractionTowards(i.br,.3),i.titleAnchor=i.tr.shiftFractionTowards(i.br,.5).shiftFractionTowards(i.bl,.3)),i.gridAnchor=i.logo.clone(),r.logo=new s("logo",i.logo).attr("data-scale",.35),c("title",{at:i.titleAnchor,nr:3+3*t,title:2==t?"eyebrow":1==t?"pupil":"eye",scale:.25}),h.cutlist.addCut({cut:2,from:2==t?"fabric":1==t?"pupilFabric":"eyeFabric"}),l&&(n.sa=n.eye.offset(Math.min(l,6)).attr("class","fabric sa")),t<2?c("hd",{from:i.left,to:i.right,y:i.top.y-l,id:"width"}):(c("hd",{from:i.tl,to:i.tr,y:i.tl.y-l,id:"width"}),c("vd",{from:i.bl,to:i.tl,x:i.tl.x-l,id:"height"})),m}const rc={name:"octoplushy.eye1",after:ec,draft:t=>sc(0,t)},lc={name:"octoplushy.eye2",after:ec,draft:t=>sc(1,t)},cc={name:"octoplushy.eye3",after:ec,draft:t=>sc(2,t)},pc=new n.pT({data:Ql,parts:[ec,oc,ic,nc,rc,lc,cc]}),dc=JSON.parse('{"id":"onyx","name":"Onyx one-piece","code":"Thrunic","description":"A FreeSewing pattern for one-piece garments","design":"Thrunic","difficulty":4,"tags":["swimwear","pajamas","onePiece"],"techniques":["hem","curved-seam","stretch","lining","zipper","ribbing"],"version":"4.6.0","pkg":"@freesewing/onyx","collection":true}'),hc={en:JSON.parse('{"t":"Onyx one-piece","d":"Onyx is a versatile one-piece garment with several forms.","p":{"base":"Base","back":"Back","front":"Front","neckband":"Neckband","raglanSleeve":"Sleeve","zipperGuard":"Zipper guard","crotchGusset":"Crotch gusset","hood":"Hood back","hoodFront":"Hood front","skirt":"Skirt","sleeveRibbing":"Sleeve ribbing","legRibbing":"Leg ribbing"},"s":{"foldLine":"Fold Line","cutOneSkirt":"Cut one rectangle of fabric\\nfor the skirt, with dimensions:","cutTwoSleeveRibbing":"Cut two rectangles of ribbing\\nfor the wrists, with dimensions:","cutTwoLegRibbing":"Cut two rectangles of ribbing\\nfor the legs, with dimensions:","cutOneCrotchGusset":"Cut one rectangle of main fabric\\nfor the crotch gusset, with dimensions:","cutOneZipperGuard":"Cut one rectangle of main fabric\\nfor the zipper guard, with dimensions:","cutNeckband":"Cut one rectangle of\\nribbing or main fabric\\nfor the neckband, with dimensions:","frontOnFoldZipper.t":"Front Zipper / Front on Fold","frontOnFoldZipper.d":"You have selected to place a front zipper, which is not compatible with cutting the front on the fold. When using a front zipper, it is recommended to cut the front as two separate pieces so that you have the seam allowance available to attach the zipper.","backOnFoldZipper.t":"Back Zipper / Back on Fold","backOnFoldZipper.d":"You have selected to place a back zipper, which is not compatible with cutting the back on the fold. When using a back zipper, it is recommended to cut the back as two separate pieces so that you have the seam allowance available to attach the zipper."},"o":{"neckbandLength":{"t":"Neckband length","d":"Controls how long the neckband is, as a percentage of the circumference of the neckline."},"neckbandWidth":{"t":"Neckband width","d":"Controls how wide the finished neckband will be."},"hoodHem":{"t":"Hood hem","d":"Sets the hem allowance along the front of the hood, as a multiple of the seam allowance."},"sleeveRibbing":{"t":"Sleeve Ribbing","d":"Choose whether to make ribbed knit cuffs for the sleeves or to use a hem."},"sleeveRibbingNo":{"t":"Hem","d":"Finish the sleeves with a hem."},"sleeveRibbingYes":{"t":"Ribbing","d":"Finish the sleeves with a piece of ribbing."},"sleeveRibbingLength":{"t":"Sleeve Ribbing Length","d":"Controls how long the ribbing around the sleeve is, as a percentage of the sleeve circumference."},"sleeveRibbingWidth":{"t":"Sleeve Ribbing Width","d":"Controls how wide the ribbing around the sleeve is."},"sleeveHem":{"t":"Sleeve hem","d":"Sets the hem allowance of the hem along the end of the sleeves, as a multiple of the seam allowance."}
1,"legRibbing":{"t":"Leg Ribbing","d":"Choose whether to make ribbed knit cuffs for the legs or to use a hem."},"legRibbingNo":{"t":"Hem","d":"Finish the legs with a hem."},"legRibbingYes":{"t":"Ribbing","d":"Finish the legs with a piece of ribbing."},"legRibbingLength":{"t":"Leg Ribbing Length","d":"Controls how long the ribbing around the leg is, as a percentage of the leg circumference."},"legRibbingWidth":{"t":"Leg Ribbing Width","d":"Controls how wide the ribbing around the leg is."},"legHem":{"t":"Leg hem","d":"Sets the hem allowance of the hem along the bottom of the legs, as a multiple of the seam allowance."},"backOnFold":{"t":"Back on fold","d":"Enable this option to make the back out of a single piece, or disable to make it out of two mirrored pieces joined by a seam. It is recommended to disable this if placing a back zipper, and enable it otherwise."},"backOnFoldNo":{"t":"Cut separate","d":"Cut two separate mirrored back pieces"},"backOnFoldYes":{"t":"Cut on fold","d":"Cut the back as a single piece, on the fold"},"frontOnFold":{"t":"Front on fold","d":"Enable this option to make the front out of a single piece, or disable to make it out of two mirrored pieces joined by a seam. It is recommended to disable this if placing a front zipper, and enable it otherwise."},"frontOnFoldNo":{"t":"Cut separate","d":"Cut two separate mirrored front pieces"},"frontOnFoldYes":{"t":"Cut on fold","d":"Cut the back as a single piece, on the fold"},"zipperLength":{"t":"Zipper length","d":"The length of the zipper, as a percentage of the vertical trunk. It is recommended that you match this length (shown below in cm/in) to the length of the actual zipper, measured from lower stop to upper stop."},"zipperGuardWidth":{"t":"Zipper guard width","d":"How wide to make the zipper guard."},"neckGuardLength":{"t":"Neck guard length","d":"How far to have the zipper guard extend past the top of the zipper."},"skirtHem":{"t":"Skirt hem","d":"Sets the hem allowance of the hem along the bottom of the skirt, as a multiple of the seam allowance."},"skirtWaistband":{"t":"Skirt waistband","d":"Sets the width of the waistband along the top of the skirt, as a multiple of the seam allowance."},"hoodHeight":{"t":"Hood height","d":"Controls how tall the hood will be."},"hoodDepth":{"t":"Hood depth","d":"Controls how much room will be in the hood around the back of the head."},"centerSeamEase":{"t":"Center seam ease","d":"Controls how long the center seam will be, and thus how low the crotch fork of the garment will be."},"outseamEase":{"t":"Outseam ease","d":"Controls how far down the garment the waist, hips, seat, and upper leg points on the outseam will be."},"chestEase":{"t":"Chest ease","d":"Controls how wide the garment will be around the chest."},"waistEase":{"t":"Waist ease","d":"Controls how wide the garment will be around the chest."},"hipsEase":{"t":"Hips ease","d":"Controls how wide the garment will be at the bottom hem. This option is only used if the straight sides option is disabled."},"seatEase":{"t":"Seat ease","d":"Controls how wide the seat is."},"armpitEase":{"t":"Armpit ease","d":"Gives more room in the armpit by shifting the sleeve down the body."},"crotchGussetWidth":{"t":"Crotch gusset width","d":"Controls how wide the crotch gusset will be. Adjust so that the front and back pieces look smooth and clean around the crotch fork and upper legs. Deeper thighs and abdomens require a larger value, while wider ones require a smaller value."},"upperLegEase":{"t":"Upper leg ease","d":"Controls how wide the garment will be around the upper legs."},"legHemEase":{"t":"Leg hem ease","d":"Controls how wide the bottom of the legs will be."},"neckBalance":{"t":"Neck position","d":"Controls where the neck hole is placed on the garment."},"neckEase":{"t":"Neck ease","d":"Controls how large the neck hole is."},"sleeveEase":{"t":"Sleeve ease","d":"Affects how wide the sleeve is at the armhole on all garments, and has some affect on the width at the hem of short sleeved garments."},"wristEase":{"t":"Wrist ease","d":"Affects how wide the end of the sleeve is on sleeves that extend past the biceps. The effect is greater on longer sleeves."},"zipperPosition":{"t":"Zipper Position","d":"Select where to place the zipper."},"zipperPosition.front":{"t":"Front","d":"Place the zipper on the front."},"zipperPosition.back":{"t":"Back","d":"Place the zipper on the back."},"zipperPosition.none":{"t":"None","d":"Do not use a zipper."}
1,"neckStyle":{"t":"Neck style","d":"Select whether you want to add a hood to the garment, or finish the neck with a neckband."},"neckStyle.neckband":{"t":"Neckband","d":"Finish the neck with a neckband."},"neckStyle.hood":{"t":"Hood","d":"Generate a hood for the garment."},"sleeveLength":{"t":"Sleeve length","d":"Controls how long the sleeves of the garment will be."},"legLength":{"t":"Leg length","d":"Controls how long the legs of the garment will be."},"hoodFrontPieceSize":{"t":"Hood front piece size","d":"Controls if a front piece will be used, and how wide the front piece of the hood will be."},"hoodFrontBonus":{"t":"Hood front bonus","d":"Controls how far forward the hood comes over the forehead."},"hoodFrontDip":{"t":"Hood Front dip","d":"Controls far down the front of the hood drops over the forehead."},"skirt":{"t":"Skirt","d":"Select whether or not you want to add a simple gathered skirt around the waist of the garment."},"skirtNo":{"t":"Nothing","d":"A skirt will not be generated."},"skirtYes":{"t":"Skirt","d":"A skirt will be generated."},"skirtLength":{"t":"Skirt length","d":"Controls the length of the skirt, as a percentage of the waist to upper leg measurement."},"skirtWidth":{"t":"Skirt width","d":"Controls the width of the skirt at the bottom, as a percentage of the waist measurement."},"legTaperPosition":{"t":"Leg taper position","d":"Controls how the lower legs are laid out on the pattern."},"raglanScoopLength":{"t":"Raglan scoop length","d":"Controls how far out from the armhole the raglan seam starts to scoop."},"raglanScoopMagnitude":{"t":"Raglan scoop depth","d":"Controls how much extra material to place under the armpits."}}}')};const mc={name:"onyx.base",plugins:[A],draft:function({utils:t,Path:e,Point:o,paths:a,points:i,measurements:n,options:s,absoluteOptions:r,part:l,store:c,sa:p,macro:d,snippets:h,Snippet:m,scale:f}){const u=n.biceps*s.armholeTweakFactor*(1+s.sleeveEase)/Math.PI,g=(n.hpsToWaistBack+n.hpsToWaistFront)/2+n.waistToArmpit*s.outseamEase,b=g+n.waistToHips*(1+s.outseamEase),w=g+n.waistToSeat*(1+s.outseamEase),k=g+n.waistToUpperLeg*(1+s.outseamEase),C=n.waistToArmpit*(1+s.outseamEase),v=(n.hpsToWaistFront+n.hpsToWaistBack+n.crossSeam)*(1+s.centerSeamEase);c.set("verticalTrunk",v);const y=.22*n.upperLeg*s.crotchGussetWidth;c.set("crotchGussetWidth",y);const T=y/4,x=T,B=k+s.legLength*n.inseam,S=g-C+u*s.armpitEase;let L=n.chest*(1+s.chestEase);L-=s.raglanScoopMagnitude*S*4;const P=n.neck*(1+s.neckEase)/(2*Math.PI),R=n.upperLeg*(1+s.upperLegEase),F=n.seat*(1+s.seatEase),E=n.hips*(1+s.hipsEase),W=n.waist*(1+s.waistEase),H=Math.min(1,s.legLength/.91);let A=(1+s.legHemEase)*(H*n.ankle+(1-H)*n.upperLeg);c.set("legWidth",A),A-=y,c.set("neckRadius",P),i.raglanCenter=new o(0,0),i.neckCenter=i.raglanCenter.shift(270,s.neckBalance*P),i.armpitCorner=new o(L/4,S).translate(0,Math.max(0,n.biceps*s.armholeTweakFactor*s.sleeveEase/(2*Math.PI))),i.neckShoulderCorner=t.beamIntersectsCircle(i.neckCenter,P,i.raglanCenter,i.armpitCorner)[1],i.cfNeck=i.neckCenter.shift(270,P),i.cfCrotch=new o(0,(v-y)/2),i.crotchEnd=new o(T,i.cfCrotch.y+x),i.upperLeg=new o(R/2-y/4,k);const O=(i.upperLeg.x-i.crotchEnd.x-A/2)*(1-s.legTaperPosition);i.inseamHem=new o(i.upperLeg.x-A/2-O,B),i.outseamHem=new o(i.upperLeg.x-O,B),i.seat=new o(F/4,w),i.hips=new o(E/4,b),i.waist=new o(W/4,g);const D=i.neckShoulderCorner.angle(i.armpitCorner);c.set("raglanAngle",D);const N=i.raglanCenter.dist(i.armpitCorner);c.set("raglanLength",N),i.armpitCornerScooped=i.armpitCorner.shift(D+90,s.raglanScoopMagnitude*N),i.cfCrotchCp2=i.cfCrotch.shift(0,T/2),i.crotchEndCp1=i.crotchEnd.shift(i.inseamHem.angle(i.crotchEnd),x/2);const I=i.outseamHem.angle(i.seat);
1i.upperLegCp1=i.upperLeg.shift(I+180,i.upperLeg.dist(i.seat)/3),i.upperLegCp2=i.upperLeg.shift(I,i.upperLeg.dist(i.seat)/3);const M=i.upperLeg.angle(i.hips);i.seatCp1=i.seat.shift(M+180,i.seat.dist(i.upperLeg)/3),i.seatCp2=i.seat.shift(M,i.seat.dist(i.hips)/3);const _=i.seat.angle(i.waist);i.hipsCp1=i.hips.shift(_+180,i.hips.dist(i.seat)/3),i.hipsCp2=i.hips.shift(_,i.hips.dist(i.waist)/3);const j=i.hips.angle(i.armpitCornerScooped);i.waistCp1=i.waist.shift(j+180,i.waist.dist(i.hips)/3),i.waistCp2=i.waist.shift(j,i.waist.dist(i.armpitCornerScooped)/3);const G=2*i.cfNeck.angle(i.neckShoulderCorner),U=t.deg2rad(G)*P;i.neckCp1=i.neckShoulderCorner.shift(G+180,U/3),i.neckCp2=i.cfNeck.shift(0,U/3);const Y=D-(G+180);c.set("frontNecklineToRaglanAngle",Y),i.armpitScoopCp1=i.armpitCorner.shift(D+180,1/3*s.raglanScoopLength*N),i.armpitScoopCp2=i.armpitCorner.shift(D+180,2/3*s.raglanScoopLength*N),i.armpitScoopEnd=i.armpitCorner.shift(D+180,s.raglanScoopLength*N),a.saBase=(new e).move(i.outseamHem)._curve(i.upperLegCp1,i.upperLeg).curve(i.upperLegCp2,i.seatCp1,i.seat).curve(i.seatCp2,i.hipsCp1,i.hips).curve(i.hipsCp2,i.waistCp1,i.waist).curve(i.waistCp2,i.armpitCornerScooped,i.armpitCornerScooped).curve(i.armpitScoopCp1,i.armpitScoopCp2,i.armpitScoopEnd).line(i.neckShoulderCorner).curve(i.neckCp1,i.neckCp2,i.cfNeck),s.frontOnFold?(a.saBase.hide(),a.foldBase=(new e).move(i.cfNeck).line(i.cfCrotch).hide(),a.inseamBase=(new e).move(i.cfCrotch).curve(i.cfCrotchCp2,i.crotchEndCp1,i.crotchEnd).line(i.inseamHem).hide()):a.saBase.line(i.cfCrotch).curve(i.cfCrotchCp2,i.crotchEndCp1,i.crotchEnd).line(i.inseamHem).hide(),a.hemBase=(new e).move(i.inseamHem).line(i.outseamHem).hide();const $=2*(new e).move(i.cfCrotch).curve(i.cfCrotchCp2,i.crotchEndCp1,i.crotchEnd).line(i.inseamHem).hide().length();return c.set("crotchGussetLength",$),s.frontOnFold?a.seam=a.saBase.join(a.foldBase).join(a.inseamBase).join(a.hemBase).close().addClass("fabric"):a.seam=a.saBase.join(a.hemBase).close().addClass("fabric"),d("hd",{id:"wCrotch",from:i.cfCrotch,to:i.inseamHem,y:i.outseamHem.y+(p+15)}),d("hd",{id:"wLegHem",from:i.inseamHem,to:i.outseamHem,y:i.outseamHem.y+(p+15)}),d("hd",{id:"wCenterToOutseam",from:i.cfCrotch,to:i.outseamHem,y:i.outseamHem.y+(p+30)}),d("hd",{id:"wTotalWidth",from:i.cfCrotch,to:a.seam.edge("right"),y:i.outseamHem.y+(p+45)}),d("vd",{id:"hInseam",from:i.cfCrotch,to:i.inseamHem,x:0-(p+15)}),d("vd",{id:"hOutseam",from:i.outseamHem,to:i.armpitCornerScooped,x:Math.max(i.outseamHem.x,i.armpitCornerScooped.x)+(p+15)}),d("vd",{id:"hArmpitScoop",from:i.armpitCornerScooped,to:i.armpitScoopEnd,x:i.armpitCornerScooped.x+(p+30)}),d("hd",{id:"wArmpitScoop",from:i.armpitScoopEnd,to:i.armpitCornerScooped,y:0-(p+0)}),i.title=new o(i.armpitCorner.x/4,(i.cfCrotch.y+i.armpitCornerScooped.y/2)/2),d("title",{at:i.title,nr:5,title:"base"}),i.logo=i.title.translate(32*f,-40*f),h.logo=new m("logo",i.logo),p&&(a.sa=(new e).move(i.inseamHem.shift(270,s.legRibbing?p:r.legHem)).join(a.hemBase.offset(s.legRibbing?p:r.legHem)).join(a.saBase.offset(p)).addClass("fabric sa"),s.frontOnFold?(a.sa.line(i.cfNeck),a.sa2=(new e).move(i.cfCrotch).join(a.inseamBase.offset(p)).line(i.inseamHem.shift(270,s.legRibbing?p:r.legHem)).addClass("fabric sa")):a.sa.close()),l},hide:{self:!0},measurements:["biceps","neck","chest","waist","hips","seat","waistToHips","hpsToWaistBack","hpsToWaistFront","waistToSeat","crossSeam","waistToArmpit","inseam","upperLeg","waistToUpperLeg","ankle"],options:{neckStyle:{dflt:"neckband",list:["neckband","hood"],menu:"style"},skirt:{bool:!1,menu:"style"},sleeveRibbing:{bool:!1,menu:"construction"},legRibbing:{bool:!1,menu:"construction"},zipperPosition:{dflt:"front",list:["front","back","none"],menu:"construction"},neckEase:{pct:50,min:-30,max:150,menu:"fit"},chestEase:{pct:0,min:-40,max:50,menu:"fit"},waistEase:{pct:0,min:-40,max:50,menu:"fit"},hipsEase:{pct:0,min:-40,max:50,menu:"fit"},seatEase:{pct:0,min:-40,max:50,menu:"fit"},upperLegEase:{pct:0,min:-40,max:50,menu:"fit"},legHemEase:{pct:0,min:-40,max:100,menu:"fit"},centerSeamEase:{pct:0,min:-20,max:50,menu:"fit"},outseamEase:{pct:0,min:-20,max:5,menu:"fit"},armpitEase:{pct:15,min:-20,max:50,menu:"fit"},legLength:{pct:20,min:0,max:120,menu:"style"},neckBalance:{pct:40,min:0,max:80,menu:"fit"},raglanScoopLength:{pct:20,min:0,max:50,menu:"advanced"},raglanScoopMagnitude:{pct:6,min:0,max:20,menu:"advanced"},legHem:{pct:200,min:0,max:800,toAbs:(t,e,o)=>e.sa?e.sa*o.legHem:0,menu:(t,e)=>!e.legRibbing&&"construction"},crotchGussetWidth:{pct:100,min:75,max:133,menu:"fit"},legTaperPosition:{pct:50,min:0,max:100,menu:"advanced"},frontOnFold:{bool:!1,menu:"construction"},backOnFold:{bool:!0,menu:"construction"},zipperLength:{pct:20,min:0,max:50,toAbs:(t,e)=>(e.measurements.hpsToWaistFront+e.measurements.hpsToWaistBack+e.measurements.crossSeam)*t,menu:"construction"}
1,sleeveEase:{pct:0,min:-30,max:50,menu:"fit"},armholeTweakFactor:1.1,skirtWidth:{pct:160,min:100,max:250,menu:(t,e)=>!!e.skirt&&"style"},skirtLength:{pct:100,min:20,max:500,menu:(t,e)=>!!e.skirt&&"style"},skirtWaistband:{pct:200,min:0,max:800,toAbs:(t,e,o)=>e.sa?e.sa*o.skirtWaistband:0,menu:(t,e)=>!!e.skirt&&"construction"},skirtHem:{pct:200,min:0,max:800,toAbs:(t,e,o)=>e.sa?e.sa*o.skirtHem:0,menu:(t,e)=>!!e.skirt&&"construction"},sleeveRibbingWidth:{pct:20,min:0,max:100,snap:{metric:5,imperial:6.35},toAbs:(t,e,o)=>200*o.sleeveRibbingWidth,menu:(t,e)=>!!e.sleeveRibbing&&"construction"},sleeveRibbingLength:{pct:75,min:50,max:100,menu:(t,e)=>!!e.sleeveRibbing&&"construction"},legRibbingWidth:{pct:20,min:0,max:100,snap:{metric:5,imperial:6.35},toAbs:(t,e,o)=>200*o.legRibbingWidth,menu:(t,e)=>!!e.legRibbing&&"construction"},legRibbingLength:{pct:75,min:50,max:100,menu:(t,e)=>!!e.legRibbing&&"construction"},neckbandLength:{pct:80,min:50,max:100,menu:(t,e)=>"neckband"==e.neckStyle&&"construction"},neckbandWidth:{pct:20,min:0,max:100,snap:{metric:5,imperial:6.35},toAbs:(t,e,o)=>200*o.neckbandWidth,menu:(t,e)=>"neckband"==e.neckStyle&&"construction"},zipperGuardWidth:{pct:50,min:0,max:100,snap:{metric:5,imperial:6.35},toAbs:(t,e,o)=>100*o.zipperGuardWidth,menu:"construction"},neckGuardLength:{pct:2,min:0,max:5,toAbs:(t,e,o)=>(e.measurements.hpsToWaistFront+e.measurements.hpsToWaistBack+e.measurements.crossSeam)*o.neckGuardLength,menu:(t,e)=>"neckband"==e.neckStyle&&"construction"},zipperGuardTapeCoverMaterial:.75},optionalMeasurements:["highBust"]};const fc={name:"onyx.front",draft:function({utils:t,Path:e,Point:o,paths:a,points:i,measurements:n,options:s,absoluteOptions:r,part:l,store:c,complete:p,sa:d,expand:h,units:m,macro:f,snippets:u,Snippet:g,scale:b}){const w=c.get("neckRadius");i.neckShoulderCorner=t.beamIntersectsCircle(i.neckCenter,w,i.raglanCenter,i.armpitCorner)[1];const k=i.raglanCenter.dist(i.neckShoulderCorner);c.set("frontNeckRadius",k),i.cfNeck=i.neckCenter.shift(270,w);const C=2*i.cfNeck.angle(i.neckShoulderCorner),v=t.deg2rad(C)*w;i.neckCp1=i.neckShoulderCorner.shift(C+180,v/3),i.neckCp2=i.cfNeck.shift(0,v/3);const y=c.get("raglanAngle")-(C+180);if(c.set("frontNecklineToRaglanAngle",y),c.set("neckLengthFront",(new e).move(i.neckShoulderCorner).curve(i.neckCp1,i.neckCp2,i.cfNeck).length()),f("vd",{id:"hCenterSeam",from:i.cfNeck,to:i.cfCrotch,x:-(d+15)}),f("vd",{id:"hNeck",from:i.neckShoulderCorner,to:i.cfNeck,x:-(d+15),noStartMarker:!0,noEndMarker:!0}),f("vd",{id:"hTotal",from:i.neckShoulderCorner,to:i.inseamHem,x:-(d+30)}),f("vd",{id:"hRaglanSeam",from:i.armpitCornerScooped,to:i.neckShoulderCorner,x:i.armpitCornerScooped.x+(d+15)}),f("hd",{id:"wRaglanSeamStraightPortion",from:i.neckShoulderCorner,to:i.armpitScoopEnd,y:0-(d+0)}),f("hd",{id:"wRaglanSeam",from:i.neckShoulderCorner,to:i.armpitCornerScooped,y:0-(d+15)}),f("hd",{id:"wNeck",from:i.cfNeck,to:i.neckShoulderCorner,y:0-(d+15),noStartMarker:!0,noEndMarker:!0}),f("hd",{id:"wCenterToArmpit",from:i.cfNeck,to:i.armpitCornerScooped,y:0-(d+30)}),i.cutonfoldFrom=i.cfNeck.shift(0,i.armpitCornerScooped.x/8),i.cutonfoldTo=i.cfCrotch.shift(0,i.armpitCornerScooped.x/8),s.frontOnFold?(i.cutonfoldFrom.x=0,i.cutonfoldTo.x=0,f("cutonfold",{from:i.cutonfoldFrom,to:i.cutonfoldTo,grainline:!0}),c.cutlist.addCut({cut:1,from:"fabric"})):(f("grainline",{from:i.cutonfoldFrom,to:i.cutonfoldTo}),c.cutlist.addCut({cut:2,from:"fabric"})),p&&"front"===s.zipperPosition){const t=c.get("verticalTrunk")*s.zipperLength;t>0&&(i.zipperUpperLeft=i.cfNeck.shift(180,Math.max(d,5)),i.zipperLowerLeft=i.zipperUpperLeft.shift(270,t),i.zipperLowerRight=i.zipperLowerLeft.shift(0,2*Math.max(d,5)),i.zipperUpperRight=i.zipperLowerRight.shift(90,t),a.zipper=(new e).move(i.zipperUpperLeft).line(i.zipperLowerLeft).line(i.zipperLowerRight).line(i.zipperUpperRight).close().setText("onyx:zipper").addClass("various dashed"))}if(u.armpitScoopEnd=new g("notch",i.armpitScoopEnd),i.title=new o(i.armpitCorner.x/4,i.armpitCornerScooped.y+50*b),f("title",{at:i.title,nr:1,title:"onyx:front"}),i.logo=i.title.translate(32*b,-40*b),u.logo=new g("logo",i.logo),p&&!h){i.skirtInstructions=i.title.translate(0,35*b-30),s.skirt&&(i.skirtInstructions=i.skirtInstructions.translate(0,50).attr("data-text","onyx:cutOneSkirt").attr("data-text",":\n").attr("data-text",`${m(2*d+n.waist*Math.max(s.waistEase,s.skirtWidth))} x ${m(n.waistToUpperLeg*s.skirtLength+r.skirtHem+r.skirtWaistband)}`)),i.legRibbingInstructions=i.skirtInstructions,s.legRibbing&&(i.legRibbingInstructions=i.legRibbingInstructions.translate(0,50).attr("data-text","onyx:cutTwoLegRibbing").attr("data-text",":\n").attr("data-text",`${m(2*d+c.get("legWidth")*s.legRibbingLength)} x ${m(2*(d+r.legRibbingWidth))}
1`)),i.crotchGussetInstructions=i.legRibbingInstructions,i.crotchGussetInstructions=i.crotchGussetInstructions.translate(0,50).attr("data-text","onyx:cutOneCrotchGusset").attr("data-text",":\n").attr("data-text",`${m(2*d+c.get("crotchGussetWidth"))} x ${m((s.legRibbing?2*d:2*r.legHem)+c.get("crotchGussetLength"))}`),i.zipperGuardInstructions=i.crotchGussetInstructions;const t=r.zipperGuardWidth,e="neckband"==s.neckStyle?c.get("verticalTrunk")*s.neckGuardLength:s.zipperGuardTapeCoverMaterial*t,o=r.zipperLength+e+t*s.zipperGuardTapeCoverMaterial;i.zipperGuardInstructions=i.zipperGuardInstructions.translate(0,50).attr("data-text","onyx:cutOneZipperGuard").attr("data-text",":\n").attr("data-text",`${m(2*(d+t))} x ${m(2*d+o)}`)}return"front"===s.zipperPosition&&s.frontOnFold&&c.flag.note({msg:"onyx:frontOnFoldZipper"}),l},from:mc};const uc={name:"onyx.back",draft:function({utils:t,Path:e,Point:o,paths:a,points:i,options:n,absoluteOptions:s,part:r,store:l,complete:c,sa:p,macro:d,snippets:h,Snippet:m}){const f=l.get("neckRadius");i.neckCenter=i.raglanCenter.shift(270,-n.neckBalance*f),i.neckShoulderCorner=t.beamIntersectsCircle(i.neckCenter,f,i.raglanCenter,i.armpitCorner)[1];const u=i.raglanCenter.dist(i.neckShoulderCorner);l.set("backNeckRadius",u),i.cfNeck=i.neckCenter.shift(270,f);const g=2*i.cfNeck.angle(i.neckShoulderCorner),b=t.deg2rad(g)*f;i.neckCp1=i.neckShoulderCorner.shift(g+180,b/3),i.neckCp2=i.cfNeck.shift(0,b/3);const w=l.get("raglanAngle")-(g+180);if(l.set("backNecklineToRaglanAngle",w),a.saBase=(new e).move(i.outseamHem).curve(i.outseamHem,i.upperLegCp1,i.upperLeg).curve(i.upperLegCp2,i.seatCp1,i.seat).curve(i.seatCp2,i.hipsCp1,i.hips).curve(i.hipsCp2,i.waistCp1,i.waist).curve(i.waistCp2,i.armpitCornerScooped,i.armpitCornerScooped).curve(i.armpitScoopCp1,i.armpitScoopCp2,i.armpitScoopEnd).line(i.neckShoulderCorner).curve(i.neckCp1,i.neckCp2,i.cfNeck),n.backOnFold?(a.saBase.hide(),a.foldBase=(new e).move(i.cfNeck).line(i.cfCrotch).hide(),a.inseamBase=(new e).move(i.cfCrotch).curve(i.cfCrotchCp2,i.crotchEndCp1,i.crotchEnd).line(i.inseamHem).hide()):a.saBase.line(i.cfCrotch).curve(i.cfCrotchCp2,i.crotchEndCp1,i.crotchEnd).line(i.inseamHem).hide(),a.hemBase=(new e).move(i.inseamHem).line(i.outseamHem).hide(),n.backOnFold?a.seam=a.saBase.join(a.foldBase).join(a.inseamBase).join(a.hemBase).close().addClass("fabric"):a.seam=a.saBase.join(a.hemBase).close().addClass("fabric"),d("vd",{id:"hCenterSeam",from:i.cfNeck,to:i.cfCrotch,x:-(p+15)}),d("vd",{id:"hNeck",from:i.neckShoulderCorner,to:i.cfNeck,x:-(p+15),noStartMarker:!0,noEndMarker:!0}),d("vd",{id:"hTotal",from:i.neckShoulderCorner,to:i.inseamHem,x:-(p+30)}),d("vd",{id:"hRaglanSeam",from:i.armpitCornerScooped,to:i.neckShoulderCorner,x:i.armpitCornerScooped.x+(p+15)}),d("hd",{id:"wRaglanSeamStraightPortion",from:i.neckShoulderCorner,to:i.armpitScoopEnd,y:0-(p+0)}),d("hd",{id:"wRaglanSeam",from:i.neckShoulderCorner,to:i.armpitCornerScooped,y:0-(p+15)}),d("hd",{id:"wNeck",from:i.cfNeck,to:i.neckShoulderCorner,y:0-(p+15),noStartMarker:!0,noEndMarker:!0}),d("hd",{id:"wCenterToArmpit",from:i.cfNeck,to:i.armpitCornerScooped,y:0-(p+30)}),i.cutonfoldFrom=i.cfNeck.shift(0,i.armpitCornerScooped.x/8),i.cutonfoldTo=i.cfCrotch.shift(0,i.armpitCornerScooped.x/8),n.backOnFold?(i.cutonfoldFrom.x=0,i.cutonfoldTo.x=0,d("cutonfold",{from:i.cutonfoldFrom,to:i.cutonfoldTo,grainline:!0}),l.cutlist.addCut({cut:1,from:"fabric"})):(d("grainline",{from:i.cutonfoldFrom,to:i.cutonfoldTo}),l.cutlist.addCut({cut:2,from:"fabric"})),c&&"back"===n.zipperPosition){const t=l.get("verticalTrunk")*n.zipperLength;t>0&&(i.zipperUpperLeft=i.cfNeck.shift(180,Math.max(p,5)),i.zipperLowerLeft=i.zipperUpperLeft.shift(270,t),i.zipperLowerRight=i.zipperLowerLeft.shift(0,2*Math.max(p,5)),i.zipperUpperRight=i.zipperLowerRight.shift(90,t),a.zipper=(new e).move(i.zipperUpperLeft).line(i.zipperLowerLeft).line(i.zipperLowerRight).line(i.zipperUpperRight).close().setText("onyx:zipper").addClass("various dashed"))}h.armpitScoopEnd=new m("bnotch",i.armpitScoopEnd),i.title=new o(i.armpitCorner.x/4,(i.cfCrotch.y+i.armpitCornerScooped.y/2)/2),d("title",{at:i.title,nr:2,t
1itle:"onyx:back"}),p&&(a.sa=(new e).move(i.inseamHem.shift(270,n.legRibbing?p:s.legHem)).join(a.hemBase.offset(n.legRibbing?p:s.legHem)).join(a.saBase.offset(p)).attr("class","fabric sa"),n.backOnFold?(a.sa.line(i.cfNeck),a.sa2=(new e).move(i.cfCrotch).join(a.inseamBase.offset(p)).line(i.inseamHem.shift(270,n.legRibbing?p:s.legHem)).addClass("fabric sa")):a.sa.close()),"back"===n.zipperPosition&&n.backOnFold&&l.flag.note({msg:"onyx:backOnFoldZipper"});const k=(new e).move(i.neckShoulderCorner).curve(i.neckCp1,i.neckCp2,i.cfNeck);return l.set("neckLengthBack",k.length()),r},from:mc};const gc={name:"onyx.raglanSleeve",after:[fc,uc],draft:function({utils:t,Path:e,Point:o,paths:a,points:i,measurements:n,options:s,absoluteOptions:r,part:l,store:c,sa:p,complete:d,expand:h,macro:m,snippets:f,Snippet:u,scale:g,units:b}){const w=s.armholeTweakFactor-s.raglanScoopMagnitude,k=s.bicepsPosition,C=c.get("neckRadius"),v=n.biceps*(1+s.sleeveEase),y=n.wrist*(1+s.wristEase);i.raglanCenter=new o(0,0),i.neckCenter=i.raglanCenter.shift(180,s.neckBalance*C);const T=c.get("raglanLength"),x=s.raglanScoopMagnitude*T,B=s.raglanScoopLength*T,S=v/2*w,L=function(t,e){return Math.sqrt(t*t-e*e)}(T,S),P=s.sleeveLength*n.shoulderToWrist;let R;if(s.sleeveLength<k){R=((w-1)*(1-s.sleeveLength/k)+1)*v}else{const t=Math.min((s.sleeveLength-k)/(1-k),1);R=v*(1-t)+y*t}c.set("sleeveWidth",R),R/=2;const F=L+P;i.frontArmhole=new o(-S,L),i.backArmhole=new o(S,L);const E=i.raglanCenter.angle(i.frontArmhole),W=i.raglanCenter.angle(i.backArmhole);if(i.frontSleeve=new o(-R,F),i.backSleeve=new o(R,F),s.sleeveLength<k){const t=1-s.sleeveLength/k;i.frontSleeve=i.frontSleeve.shift(E-90,t*x),i.backSleeve=i.backSleeve.shift(W+90,t*x)}i.frontNeck=i.raglanCenter.shiftTowards(i.frontArmhole,c.get("frontNeckRadius")),i.backNeck=i.raglanCenter.shiftTowards(i.backArmhole,c.get("backNeckRadius"));const H=i.neckCenter.angle(i.frontNeck),A=i.neckCenter.angle(i.backNeck),O=t.deg2rad(A-H)*C,D=E+(180-c.get("frontNecklineToRaglanAngle")),N=W-(180-c.get("backNecklineToRaglanAngle"));return i.neckCp1=i.backNeck.shift(N,O*(1/3)),i.neckCp2=i.frontNeck.shift(D,O*(1/3)),i.frontArmholeScooped=i.frontArmhole.shift(E-90,x),i.frontArmholeScoopCp1=i.frontArmhole.shift(E+180,1/3*B),i.frontArmholeScoopCp2=i.frontArmhole.shift(E+180,2/3*B),i.frontArmholeScoopEnd=i.frontArmhole.shift(E+180,B),i.backArmholeScooped=i.backArmhole.shift(W+90,x),i.backArmholeScoopCp1=i.backArmhole.shift(W+180,1/3*B),i.backArmholeScoopCp2=i.backArmhole.shift(W+180,2/3*B),i.backArmholeScoopEnd=i.backArmhole.shift(W+180,B),a.saBase=(new e).move(i.backSleeve).line(i.backArmholeScooped).curve(i.backArmholeScoopCp1,i.backArmholeScoopCp2,i.backArmholeScoopEnd).line(i.backNeck).curve(i.neckCp1,i.neckCp2,i.frontNeck).line(i.frontArmholeScoopEnd).curve(i.frontArmholeScoopCp2,i.frontArmholeScoopCp1,i.frontArmholeScooped).line(i.frontSleeve).hide(),a.hemBase=(new e).move(i.frontSleeve).line(i.backSleeve).hide(),a.seam=a.saBase.join(a.hemBase).close().addClass("fabric"),c.set("neckLengthSide",(new e).move(i.backNeck).curve(i.neckCp1,i.neckCp2,i.frontNeck).length()),m("vd",{id:"hFrontRaglanSleeveStraightPortion",from:i.frontNeck,to:i.frontArmholeScoopEnd,x:i.frontArmholeScooped.x-(p+15)}),m("vd",{id:"hFrontRaglanSleeveCurvedPortion",from:i.frontArmholeScoopEnd,to:i.frontArmholeScooped,x:i.frontArmholeScooped.x-(p+15)}),m("vd",{id:"hFrontRaglanSleeve",from:i.frontNeck,to:i.frontArmholeScooped,x:i.frontArmholeScooped.x-(p+30)}),m("vd",{id:"hFrontSleeve",from:i.frontArmholeScooped,to:i.frontSleeve,x:i.frontArmholeScooped.x-(p+15)}),m("vd",{id:"hFrontTotal",from:i.frontNeck,to:i.frontSleeve,x:i.frontArmholeScooped.x-(p+45)}),m("vd",{id:"hBackRaglanSleeveStraightPortion",from:i.backNeck,to:i.backArmholeScoopEnd,x:i.backArmholeScooped.x+(p+15)}),m("vd",{id:"hBackRaglanSleeveCurvedPortion",from:i.backArmholeScoopEnd,to:i.backArmholeScooped,x:i.backArmholeScooped.x+(p+15)}),m("vd",{id:"hBackRaglanSleeve",from:i.backNeck,to:i.backArmholeScooped,x:i.backArmholeScooped.x+(p+30)}),m("vd",{id:"hBackSleeve",from:i.backArmholeScooped,to:i.backSleeve,x:i.backArmholeScooped.x+(p+15)}),m("vd",{id:"hBackTotal",from:i.backNeck,to:i.backSleeve,x:i.backArmholeScooped.x+(p+45)}),m("hd",{id:"wFrontSleeve",from:i.frontArmholeScooped,to:i.frontSleeve,y:i.frontSleeve.y+(p+15),noStartMarker:!0,noEndMarker:!0}),m("hd",{id:"wSleeveHem",from:i.frontSleeve,to:i.backSleeve,y:i.frontSleeve.y+(p+15)}),m("hd",{id:"wBackSleeve",from:i.backSleeve,to:i.backArmholeScooped,y:i.backSleeve.y+(p+15),noStartMarker:!0,noEndMarker:!0}),m("hd",{id:"wWidthAtArmpit",from:i.frontArmholeScooped,to:i.backArmholeScooped,y:i.frontSleeve.y+(p+30)}),m("hd",{id:"wWidthAtArmpit2",from:i.frontArmholeScooped,to:i.backArmholeScooped,y:Math.min(i.frontNeck.y,i.backNeck.y)-(p+45)}),m("hd",{id:"wFrontRaglanSleeveCurvedPortion",from:i.frontArmholeScooped,to:i.frontArmholeScoopEnd,y:Math.min(i.frontNeck.y,i.backNeck.y)-(p+15)}),m("hd",{id:"wFrontRaglanSleeveStraightPortion",from:i.frontArmholeScoopEnd,to:i.frontNeck,y:Math.min(i.frontNeck.y,i.backNeck.y)-(p+15)}),m("hd",{id:"wNeck",from:i.frontNeck,to:i.backNeck,y:Math.min(i.frontNeck.y,i.backNeck.y)-(p+15)}),m("hd",{id:"wBackRaglanSleeveStraightPortion",from:i.backNeck,to:i.backArmholeScoopEnd,y:Math.min(i.frontNeck.y,i.backNeck.y)-(p+15)}),m("hd",{id:"wBackRaglanSleeveCurvedPortion",from:i.backArmholeScoopEnd,to:i.backArmholeScooped,y:Math.min(i.frontNeck.y,i.backNeck.y)-(p+15)}),m("hd",{id:"wBackRaglanSleeve",from:i.backNeck,to:i.backArmholeScooped,y:Math.min(i.frontNeck.y,i.backNeck.y)-(p+30)}),m("hd",{id:"wFrontRaglanSleeve",from:i.frontArmholeScooped,to:i.frontNeck,y:Math.min(i.frontNeck.y,i.backNeck.y)-(p+30)}),i.grainlineBottom=i.backSleeve.shiftFractionTowards(i.frontSleeve,.5),i.grainlineTop=i.raglanCenter.shift(270,C),m("grainline",{from:i.grainlineTop,to:i.grainlineBottom}),c.cutlist.addCut({cut:2,from:"fabric"}),f.frontArmholeScoopEnd=new u("notch",i.frontArmholeScoopEnd),f.backArmholeScoopEnd=new u("bnotch",i.backArmholeScoopEnd),i.title=new o(0,i.backSleeve.y/3),m("title",{at:i.title,nr:3,title:"onyx:raglanSleeve"}),i.logo=i.title.translate(-20*g,70*g),f.logo=new u("logo",i.logo),i.scalebox=new o(i.frontArmholeScooped.x/2,i.frontArmholeScooped.y+20*g),m("scalebox",{at:i.scalebox}),d&&!h&&(i.sleeveRibbingInstructions=i.title.translate(5,35*g-30),s.sleeveRibbing&&(i.sleeveRibbingInstructions=i.sleeveRibbingInstructions.translate(0,50).attr("data-text","onyx:cutTwoSleeveRibbing").attr("data-text",":\n").attr("data-text",`${b(2*p+c.get("sleeveWidth")*s.sleeveRibbingLength)} x ${b(2*(p+r.sleeveRibbingWidth))}`)),i.neckbandInstructions=i.sleeveRibbingInstructions,"neckband"===s.neckStyle&&(i.neckbandInstructions=i.neckbandInstructions.translate(0,50).attr("data-text","onyx:cutNeckband").attr("data-text",":\n").attr("data-text",`${b(2*(p+(c.get("neckLengthFront")+c.get("neckLengthBack")+c.get("neckLengthSide"))*s.neckbandLength))} x ${b(2*(p+r.neckbandWidth))}`))),p&&(a.sa=a.saBase.offset(p).join(a.hemBase.offset(s.sleeveRibbing?p:r.sleeveHem)).close().addClass("fabric sa")),l},measurements:["wrist","shoulderToWrist"],options:{bicepsPosition:.2,wristEase:{pct:0,min:-30,max:
150,menu:"fit"},sleeveLength:{pct:20,min:0,max:125,menu:"style"},sleeveHem:{pct:200,min:0,max:800,toAbs:(t,e,o)=>e.sa*o.sleeveHem,menu:(t,e)=>!e.sleeveRibbing&&"construction"}}};const bc={name:"onyx.neckband",draft:function({Path:t,Point:e,paths:o,points:a,options:i,absoluteOptions:n,part:s,store:r,complete:l,expand:c,sa:p,macro:d}){if(!c||"neckband"!==i.neckStyle)return s.hide();const h=(r.get("neckLengthFront")+r.get("neckLengthBack")+r.get("neckLengthSide"))*i.neckbandLength,m=2*n.neckbandWidth;return a.topLeftCorner=new e(0,0),a.bottomLeftCorner=new e(0,m),a.bottomRightCorner=new e(h,m),a.topRightCorner=new e(h,0),a.leftCenter=new e(0,m/2),a.rightCenter=new e(h,m/2),o.saBase=(new t).move(a.bottomLeftCorner).line(a.bottomRightCorner).line(a.topRightCorner).line(a.topLeftCorner).addClass("fabric").hide(),o.foldBase=(new t).move(a.topLeftCorner).line(a.bottomLeftCorner).hide(),l&&(o.foldLine=(new t).move(a.leftCenter).line(a.rightCenter).addClass("various dashed").addText("onyx:foldLine","center")),o.seam=o.saBase.join(o.foldBase).close().addClass("fabric"),d("vd",{id:"vdNeckBand",from:a.topLeftCorner,to:a.bottomLeftCorner,x:-(p+15)}),d("hd",{id:"hdNeckBand",from:a.topLeftCorner,to:a.topRightCorner,y:-(p+15)}),a.cutonfoldFrom=a.topLeftCorner,a.cutonfoldTo=a.bottomLeftCorner,d("cutonfold",{from:a.cutonfoldFrom,to:a.cutonfoldTo,grainline:!0}),r.cutlist.addCut({cut:1,from:"fabric"}),a.title=new e(h/4,m/2),d("title",{at:a.title,nr:4,title:"onyx:neckband"}),p&&(o.sa=(new t).move(a.bottomLeftCorner).line(a.bottomLeftCorner.translate(0,p)).line(a.bottomRightCorner.translate(p,p)).line(a.topRightCorner.translate(p,-p)).line(a.topLeftCorner.translate(0,-p)).line(a.topLeftCorner).addClass("fabric sa")),s},after:[gc]};const wc={name:"onyx.zipperGuard",plugins:[],draft:function({Path:t,Point:e,paths:o,points:a,options:i,absoluteOptions:n,expand:s,part:r,store:l,sa:c,macro:p}){if(!s||"none"===i.zipperPosition)return r.hide();const d=n.zipperGuardWidth,h="neckband"==i.neckStyle?l.get("verticalTrunk")*i.neckGuardLength:i.zipperGuardTapeCoverMaterial*d,m=n.zipperLength+h+d*i.zipperGuardTapeCoverMaterial;return a.topLeftCorner=new e(0,0),a.bottomLeftCorner=new e(0,m),a.bottomRightCorner=new e(d,m),a.topRightCorner=new e(d,0),o.saBase=(new t).move(a.bottomLeftCorner).line(a.bottomRightCorner).line(a.topRightCorner).line(a.topLeftCorner).addClass("fabric").hide(),o.foldBase=(new t).move(a.topLeftCorner).line(a.bottomLeftCorner).hide(),o.seam=o.saBase.join(o.foldBase).close().addClass("fabric"),p("vd",{id:"hZipperGuard",from:a.topLeftCorner,to:a.bottomLeftCorner,x:-(c+15)}),p("hd",{id:"wZipperGuard",from:a.topLeftCorner,to:a.topRightCorner,y:-(c+15)}),a.cutonfoldFrom=a.topLeftCorner,a.cutonfoldTo=a.bottomLeftCorner,p("cutonfold",{from:a.cutonfoldFrom,to:a.cutonfoldTo,grainline:!0}),l.cutlist.addCut({cut:1,from:"fabric"}),a.title=new e(d/2,m/2),p("title",{at:a.title,nr:6,title:"onyx:zipperGuard"}),c&&(o.sa=(new t).move(a.bottomLeftCorner).line(a.bottomLeftCorner.translate(0,c)).line(a.bottomRightCorner.translate(c,c)).line(a.topRightCorner.translate(c,-c)).line(a.topLeftCorner.translate(0,-c)).line(a.topLeftCorner).addClass("fabric sa")),r},after:[mc]};const kc={name:"onyx.crotchGusset",draft:function({Path:t,Point:e,paths:o,points:a,options:i,absoluteOptions:n,part:s,store:r,sa:l,expand:c,macro:p,snippets:d,Snippet:h,scale:m}){if(!c)return s.hide();const f=r.get("crotchGussetLength"),u=r.get("crotchGussetWidth");return a.topLeftCorner=new e(0,0),a.bottomLeftCorner=new e(0,u),a.bottomRightCorner=new e(f/2,u),a.topRightCorner=new e(f/2,0),o.saBase1=(new t).move(a.bottomLeftCorner).line(a.bottomRightCorner).addClass("fabric").hide(),o.hemBase=(new t).move(a.bottomRightCorner).line(a.topRightCorner).addClass("fabric").hide(),o.saBase2=(new t).move(a.topRightCorner).line(a.topLeftCorner).addClass("fabric").hide(),o.foldBase=(new t).move(a.topLeftCorner).line(a.bottomLeftCorner).hide(),o.seam=o.saBase1.join(o.hemBase).join(o.saBase2).join(o.foldBase).close().addClass("fabric"),p("vd",{id:"hCrotchGusset",from:a.topLeftCorner,to:a.bottomLeftCorner,x:-(l+15)}),p("hd",{id:"wCrotchGusset",from:a.topLeftCorner,to:a.topRightCorner,y:-(l+15)}),a.cutonfoldFrom=a.topLeftCorner,a.cutonfoldTo=a.bottomLeftCorner,p("cutonfold",{from:a.cutonfoldFrom,to:a.cutonfoldTo,grainline:!1}),a.grainlineFrom=a.topLeftCorner.shiftFractionTowards(a.bottomLeftCorner,.95),a.grainlineTo=a.topRightCorner.shiftFractionTowards(a.bottomRightCorner,.95),p("grainline",{from:a.grainlineFrom,to:a.grainlineTo}),r.cutlist.addCut({cut:1,from:"fabric"}),a.title=new e(f/4,u/2),p("title",{at:a.title,nr:5,title:"onyx:crotchGusset"}),a.logo=a.title.translate(-50*m,40*m),d.logo=new h("logo",a.logo),l&&(o.sa=(new t).move(a.bottomLeftCorner).line(a.bottomLeftCorner.translate(0,l)).line(a.bottomRightCorner.translate(i.legRibbing?l:n.legHem,l)).line(a.topRightCorner.translate(i.legRibbing?l:n.legHem,-l)).line(a.topLeftCorner.translate(0,-l)).line(a.topLeftCorner).addClass("fabric sa")),s},after:[fc,uc]};const Cc={name:"onyx.hood",draft:function({Path:t,Point:e,paths:o,points:a,measurements:i,options:s,absoluteOptions:r,part:l,store:c,sa:p,macro:d,snippets:h,Snippet:m,scale:f}){if("hood"!==s.neckStyle)return l.hide();const u=c.get("neckLengthFront")+c.get("neckLengthBack")+c.get("neckLengthSide"),g=c.get("neckRadius")*s.neckBalance,b=.4*i.head*s.hoodHeight,w=.6*i.head*s.hoodHeight,k=(.6-s.hoodFrontDip)*i.head*s.hoodHeight,C=2*s.hoodFrontPieceSize-1,v=C*Math.PI/2;let y=u;for(let n=0;n<10;n++){a.frontNeck=new e(-y/2,g),a.backNeck=new e(y/2,-g),a.frontNeckCp2=new e(-y/6,g),a.backNeckCp1=new e(y/6,-g);const o=u/(new t).move(a.frontNeck).curve(a.frontNeckCp2,a.backNeckCp1,a.backNeck).length();if(y*=o,Math.abs(o-1)<1e-5)break}return a.frontNeck=new e(y/2*C,-g*Math.sin(v)),a.backNeck=new e(y/2,-g),a.backHead=new e(i.head/4*s.hoodDepth,-b),a.centerTop=new e(0,-w),a.frontTop=new e(y/2*C,C*C*(w-k)-w),s.hoodFrontPieceSize<.001&&(a.frontTop.x-=i.head*s.hoodFrontBonus),a.frontNeckCp2=a.frontNeck.translate(y*(1-s.hoodFrontPieceSize)/3,g*(1-s.hoodFrontPieceSize)/3*Math.PI*-Math.cos(v)),a.backNeckCp1=a.backNeck.translate(-y*(1-s.hoodFrontPieceSize)/3,0),a.backNeckCp2=new e(y/2,2*-g/3+1*-b/3),a.backHeadCp1=new e(i.head/4*s.hoodDepth,(1*-g+2*-b)/3),a.backHeadCp2=new e(i.head/4*s.hoodDepth,a.backHead.y*(1-n.Qr)+a.centerTop.y*n.Qr),a.centerTopCp1=new e(i.head/4*n.Qr*s.hoodDepth,-w),a.centerTopCp2=new e(2*a.centerTop.x/3+2*a.frontTop.x/5,a.centerTop.y),a.frontTopCp1=new e(1*a.centerTop.x/6+5*a.frontTop.x/6,1*a.centerTop.y/3+2*a.frontTop.y/3),o.saBase=(new t).move(a.frontNeck).curve(a.frontNeckCp2,a.backNeckCp1,a.backNeck).curve(a.backNeckCp2,a.backHeadCp1,a.backHead).curve(a.backHeadCp2,a.centerTopCp1,a.centerTop).curve(a.centerTopCp2,a.frontTopCp1,a.frontTop).addClass("fabric").hide(),o.hemBase=(new t).move(a.frontTop).line(a.frontNeck).hide(),o.seam=o.saBase.join(o.hemBase).close().attr("class","fabric"),d("vd",{id:"hBackToTop",from:a.backHead,to:a.centerTop,x:a.backHead.x+(p+15)}),d("vd",{id:"hNeckToBack",from:a.backNeck,to:a.backHead,x:a.backHead.x+(p+15)}),d("vd",{id:"hNeck",from:a.frontNeck,to:a.backNeck,x:a.backHead.x+(p+15)}),d("vd",{id:"hBackNeckToTop",from:a.backNeck,to:a.centerTop,x:a.backHead.x+(p+30)}),d("vd",{id:"hTotalHeight",from:a.frontNeck,to:a.centerTop,x:a.backHead.x+(p+45)}),d("vd",{id:"hFront",from:a.frontNeck,to:a.frontTop,x:a.frontTop.x-(p+15)}),d("hd",{id:"wTopToBack",from:a.centerTop,to:a.backHead,y:a.centerTop.y-(p+15)}),d("hd",{id:"wFrontToTop",from:a.frontTop,to:a.centerTop,y:a.centerTop.y-(p+15)}),d("hd",{id:"wFrontToBack",from:a.frontTop,to:a.backHead,y:a.centerTop.y-(p+30)}),d("hd",{id:"wNeck",from:a.frontNeck,to:a.backNeck,y:a.frontNeck.y+(p+15)}),d("pd",{id:"lNeck",path:(new t).move(a.frontNeck).curve(a.frontNeckCp2,a.backNeckCp1,a.backNeck),d:15}),a.grainlineBottom=new e(0,-.03*i.head).shift(0,.03*u),a.grainlineTop=a.centerTop.shift(270,.03*i.head).shift(0,.03*u),d("grainline",{from:a.grainlineTop,to:a.grainlineBottom}),c.cutlist.addCut({cut:2,from:"fabric"}),a.title=new e(u/6,.3*-i.head),d("title",{at:a.title,nr:7,title:"onyx:hood"}),a.logo=a.title.translate(20*f,-70*f),h.logo=new m("logo",a.logo),p&&(o.sa=o.saBase.offset(p).join(o.hemBase.offset(s.hoodFrontPieceSize>0?p:r.hoodHem)).close().addClass("fabric sa")),s.hoodFrontPieceSize>0&&(c.set("hoodFrontPieceBackTop",a.frontTop),c.set("hoodFrontPieceFrontTop",new e(-y/2,-k)),c.set("hoodFrontPieceFrontBottom",new e(-y/2,g)),c.set("hoodFrontPieceBackBottom",a.frontNeck),c.set("hoodFrontPieceCurve",(g+(w-k))*s.hoodFrontPieceSize*s.hoodFrontPieceSize*4/3),c.set("hoodFrontPieceNeckLength",u*s.hoodFrontPieceSize)),l},after:[gc],measurements:["head"],options:{hoodDepth:{pct:100,min:70,max:180,menu:(t,e)=>"hood"==e.neckStyle&&"fit"},hoodHeight:{pct:100,min:70,max:140,menu:(t,e)=>"hood"==e.neckStyle&&"fit"},hoodFrontDip:{pct:8,min:0,max:20,menu:(t,e)=>"hood"==e.neckStyle&&"style"},hoodHem:{pct:200,min:0,max:800,toAbs:(t,e,o)=>e.sa*o.hoodHem,menu:(t,e)=>"hood"==e.neckStyle&&"construction"},hoodFrontBonus:{pct:0,min:-8,max:10,menu:(t,e)=>"hood"==e.neckStyle&&"style"},hoodFrontPieceSize:{pct:50,min:0,max:50,menu:(t,e)=>"hood"==e.neckStyle&&"style"}}};const vc={name:"onyx.hoodFront",draft:function({Path:t,Point:e,paths:o,points:a,measurements:i,options:n,absoluteOptions:s,part:r,
1store:l,sa:c,macro:p,snippets:d,Snippet:h,scale:m}){if("hood"!==n.neckStyle||n.hoodFrontPieceSize<.001)return r.hide();const f=l.get("hoodFrontPieceCurve"),u=l.get("hoodFrontPieceNeckLength");a.hoodFrontPieceBackTop=l.get("hoodFrontPieceBackTop"),a.hoodFrontPieceFrontTop=l.get("hoodFrontPieceFrontTop"),a.hoodFrontPieceFrontBottom=l.get("hoodFrontPieceFrontBottom"),a.hoodFrontPieceBackBottom=l.get("hoodFrontPieceBackBottom");let g=u;for(let b=0;b<10;b++){a.backTop=new e(a.hoodFrontPieceBackTop.x,0),a.frontTop=a.backTop.translate(-g,0),a.backBottom=new e(a.hoodFrontPieceBackBottom.x,a.hoodFrontPieceBackBottom.y-a.hoodFrontPieceBackTop.y),a.frontBottom=a.backBottom.translate(-g,0),a.frontBottom.y=a.hoodFrontPieceFrontBottom.y-a.hoodFrontPieceFrontTop.y,a.frontBottomCp2=new e(2*a.frontBottom.x/3+1*a.backBottom.x/3,2*a.frontBottom.y/3+1*a.backBottom.y/3+f),a.backBottomCp1=new e(1*a.frontBottom.x/3+2*a.backBottom.x/3,1*a.frontBottom.y/3+2*a.backBottom.y/3+f);const o=u/(new t).move(a.frontBottom).curve(a.frontBottomCp2,a.backBottomCp1,a.backBottom).length();if(g*=o,Math.abs(o-1)<1e-5)break}return a.backTop=new e(a.hoodFrontPieceBackTop.x,0),a.frontTop=new e(a.hoodFrontPieceFrontTop.x-i.head*n.hoodFrontBonus,0),a.frontTop.x=Math.min(a.frontTop.x,a.backTop.x),a.frontBottom=new e(a.hoodFrontPieceFrontBottom.x,a.hoodFrontPieceFrontBottom.y-a.hoodFrontPieceFrontTop.y),a.backBottom=new e(a.hoodFrontPieceBackBottom.x,a.hoodFrontPieceBackBottom.y-a.hoodFrontPieceBackTop.y),a.frontTopCp2=a.frontTop.translate(0,1*(a.frontBottom.y-a.frontTop.y)/3),a.frontBottomCp1=a.frontBottom.translate(0,1*(a.frontTop.y-a.frontBottom.y)/3),a.frontBottomCp2=ne
1w e(2*a.frontBottom.x/3+1*a.backBottom.x/3,2*a.frontBottom.y/3+1*a.backBottom.y/3+f),a.backBottomCp1=new e(1*a.frontBottom.x/3+2*a.backBottom.x/3,1*a.frontBottom.y/3+2*a.backBottom.y/3+f),o.saBase=(new t).move(a.frontBottom).curve(a.frontBottomCp2,a.backBottomCp1,a.backBottom).line(a.backTop).addClass("fabric").hide(),o.saHem=(new t).move(a.frontTop).curve(a.frontTopCp2,a.frontBottomCp1,a.frontBottom).addClass("fabric").hide(),o.foldBase=(new t).move(a.backTop).line(a.frontTop).hide(),o.seam=o.saBase.join(o.foldBase).join(o.saHem).attr("class","fabric"),p("vd",{id:"hFrontHeight",from:a.frontTop,to:a.frontBottom,x:a.frontTop.x-(c+15)}),p("vd",{id:"hTotalHeight",from:a.frontTop,to:o.saBase.edge("bottom"),x:a.frontTop.x-(c+30)}),p("vd",{id:"hBackHeight",from:a.backTop,to:a.backBottom,x:a.backTop.x+(c+15)}),p("hd",{id:"wTopWidth",from:a.frontTop,to:a.backTop,y:a.frontTop.y-(c+15)}),p("pd",{id:"lNeck",path:(new t).move(a.frontBottom).curve(a.frontBottomCp2,a.backBottomCp1,a.backBottom),d:15}),a.cutonfoldFrom=a.frontTop,a.cutonfoldTo=a.backTop,p("cutonfold",{from:a.cutonfoldTo,to:a.cutonfoldFrom,grainline:!1,reverse:!0}),a.grainlineFrom=a.backTop.shiftFractionTowards(a.frontTop,.05),a.grainlineTo=new e(a.grainlineFrom.x,a.backBottom.y),p("grainline",{from:a.grainlineFrom,to:a.grainlineTo}),l.cutlist.addCut({cut:1,from:"fabric"}),a.title=new e(7*a.frontBottom.x/8,a.frontBottom.y/2),p("title",{at:a.title,nr:8,title:"onyx:hoodFront"}),a.logo=a.title.translate(40*m,-40*m),d.logo=new h("logo",a.logo),c&&(o.sa=o.saHem.offset(s.hoodHem).join(o.saBase.offset(c)).line(a.frontTop.translate(-s.hoodHem,0)).addClass("fabric sa")),r},after:[Cc]};const yc={name:"onyx.skirt",draft:function({Path:t,Point:e,paths:o,points:a,measurements:i,options:n,absoluteOptions:s,part:r,store:l,sa:c,expand:p,macro:d,snippets:h,Snippet:m,scale:f}){if(!n.skirt||!p)return r.hide();const u=i.waist*Math.max(n.waistEase,n.skirtWidth),g=i.waistToUpperLeg*n.skirtLength;return a.topLeftCorner=new e(0,0),a.bottomLeftCorner=new e(0,g),a.bottomRightCorner=new e(u/2,g),a.topRightCorner=new e(u/2,0),o.hemBase=(new t).move(a.bottomLeftCorner).line(a.bottomRightCorner).addClass("fabric").hide(!0),o.saBase=(new t).move(a.bottomRightCorner).line(a.topRightCorner).addClass("fabric").hide(),o.waistBase=(new t).move(a.topRightCorner).line(a.topLeftCorner).addClass("fabric").hide(),o.foldBase=(new t).move(a.topLeftCorner).line(a.bottomLeftCorner).hide(),o.seam=o.hemBase.join(o.saBase).join(o.waistBase).join(o.foldBase).close().addClass("fabric"),d("vd",{id:"hSkirt",from:a.topLeftCorner,to:a.bottomLeftCorner,x:-(c+15)}),d("hd",{id:"wSkirt",from:a.topLeftCorner,to:a.topRightCorner,y:-(c+15)}),a.cutonfoldFrom=a.topLeftCorner,a.cutonfoldTo=a.bottomLeftCorner,d("cutonfold",{from:a.cutonfoldFrom,to:a.cutonfoldTo,grainline:!0}),l.cutlist.addCut({cut:1,from:"fabric"}),a.title=new e(u/4,g/2),d("title",{at:a.title,nr:9,title:"onyx:skirt"}),a.logo=a.title.shift(180,50*f),h.logo=new m("logo",a.logo),c&&(o.sa=(new t).move(a.bottomLeftCorner).line(a.bottomLeftCorner.translate(0,s.skirtHem)).line(a.bottomRightCorner.translate(c,s.skirtHem)).line(a.topRightCorner.translate(c,-s.skirtWaistband)).line(a.topLeftCorner.translate(0,-s.skirtWaistband)).line(a.topLeftCorner).addClass("fabric sa")),r},measurements:["waist"]};const Tc={name:"onyx.sleeveRibbing",draft:function({Path:t,Point:e,paths:o,points:a,options:i,absoluteOptions:n,part:s,store:r,complete:l,expand:c,sa:p,macro:d}){if(!c||!i.sleeveRibbing)return s.hide();const h=r.get("sleeveWidth")*i.sleeveRibbingLength,m=2*n.sleeveRibbingWidth;return a.topLeftCorner=new e(0,0),a.bottomLeftCorner=new e(0,m),a.bottomRightCorner=new e(h/2,m),a.topRightCorner=new e(h/2,0),a.leftCenter=new e(0,m/2),a.rightCenter=new e(h/2,m/2),o.saBase=(new t).move(a.bottomLeftCorner).line(a.bottomRightCorner).line(a.topRightCorner).line(a.topLeftCorner).addClass("fabric").hide(),o.foldBase=(new t).move(a.topLeftCorner).line(a.bottomLeftCorner).hide(),l&&(o.foldLine=(new t).move(a.leftCenter).line(a.rightCenter).addClass("various dashed").addText("onyx:foldLine","center")),o.seam=o.saBase.join(o.foldBase).close().addClass("fabric"),d("vd",{id:"vdSleeveRibbing",from:a.topLeftCorner,to:a.bottomLeftCorner,x:-(p+15)}),d("hd",{id:"hdSleeveRibbing",from:a.topLeftCorner,to:a.topRightCorner,y:-(p+15)}),a.cutonfoldFrom=a.topLeftCorner,a.cutonfoldTo=a.bottomLeftCorner,d("cutonfold",{from:a.cutonfoldFrom,to:a.cutonfoldTo,grainline:!0}),r.cutlist.addCut({cut:2,from:"ribbing"}),a.title=new e(h/4,m/2),d("title",{at:a.title,nr:10,title:"onyx:sleeveRibbing"}),p&&(o.sa=(new t).move(a.bottomLeftCorner).line(a.bottomLeftCorner.translate(0,p)).line(a.bottomRightCorner.translate(p,p)).line(a.topRightCorner.translate(p,-p)).line(a.topLeftCorner.translate(0,-p)).line(a.topLeftCorner).addClass("fabric sa")),s},after:gc};const xc={name:"onyx.legRibbing",draft:function({Path:t,Point:e,paths:o,points:a,options:i,absoluteOptions:n,part:s,store:r,complete:l,expand:c,sa:p,macro:d}
1){if(!c||!i.legRibbing)return s.hide();const h=r.get("legWidth")*i.legRibbingLength,m=2*n.legRibbingWidth;return a.topLeftCorner=new e(0,0),a.bottomLeftCorner=new e(0,m),a.bottomRightCorner=new e(h/2,m),a.topRightCorner=new e(h/2,0),a.leftCenter=new e(0,m/2),a.rightCenter=new e(h/2,m/2),o.saBase=(new t).move(a.bottomLeftCorner).line(a.bottomRightCorner).line(a.topRightCorner).line(a.topLeftCorner).addClass("fabric").hide(),o.foldBase=(new t).move(a.topLeftCorner).line(a.bottomLeftCorner).hide(),l&&(o.foldLine=(new t).move(a.leftCenter).line(a.rightCenter).addClass("various dashed").addText("onyx:foldLine","center")),o.seam=o.saBase.join(o.foldBase).close().addClass("fabric"),d("vd",{id:"vdLegRibbing",from:a.topLeftCorner,to:a.bottomLeftCorner,x:-(p+15)}),d("hd",{id:"hdLegRibbing",from:a.topLeftCorner,to:a.topRightCorner,y:-(p+15)}),a.cutonfoldFrom=a.topLeftCorner,a.cutonfoldTo=a.bottomLeftCorner,d("cutonfold",{from:a.cutonfoldFrom,to:a.cutonfoldTo,grainline:!0}),r.cutlist.addCut({cut:2,from:"ribbing"}),a.title=new e(h/4,m/2),d("title",{at:a.title,nr:11,title:"onyx:legRibbing"}),p&&(o.sa=(new t).move(a.bottomLeftCorner).line(a.bottomLeftCorner.translate(0,p)).line(a.bottomRightCorner.translate(p,p)).line(a.topRightCorner.translate(p,-p)).line(a.topLeftCorner.translate(0,-p)).line(a.topLeftCorner).attr("class","fabric sa")),s},after:[mc]},Bc=new n.pT({data:dc,parts:[fc,uc,gc,bc,wc,kc,Cc,vc,yc,Tc,xc]}),Sc={en:JSON.parse('{"t":"Opal Overalls","d":"A FreeSewing design for overalls","p":{"back":"Back","front":"Front","bib":"Bib","pocketSlash":"Slash pocket","pocketBack":"Back pocket","pocketBib":"Bib pocket","pocketSlashShield":"Pocket shield","pocketCarpenter":"Carpenter pocket","pocketCarpenterExtra":"2nd Carpenter pocket","hammerLoop":"Hammer loop","waistband":"Waistband","bibPlacket":"Bib placket"},"s":{"crossSeamFrontTooSmall.t":"The **front** cannot be drafted.","crossSeamFrontTooSmall.d":"The **cross seam front**, of length {{{length}}}, is too short to be drafted onto a body with a seat located {{{depth}}} below the waist and a crotch fork extending {{{girth}}} horizontally beyond the waist. Please check your measurements and options, especially *cross seam front*, *waist to seat*, and *crotch ease*.","fold":"Fold","grainlineEitherWay":"Grainline goes either way"},"o":{"hemAllowance":{"t":"Hem allowance","d":"Sets how wide the hems around the front and back bibs and the straps are, as a percent of the seam allowance."},"legHemAllowance":{"t":"Leg hem allowance","d":"Sets how wide the hems around the legs are, as a percent of the seam allowance."},"waistEase":{"t":"Waist ease","d":"Controls how wide the garment will be around the waist."},"waistBalance":{"t":"Waist balance","d":"Controls how much of the waist is part of the front piece and how much is part of the back piece."},"seatEase":{"t":"Seat ease","d":"Controls how wide the garment will be around the seat."},"seatBalance":{"t":"Seat balance","d":"Controls how much of the seat is part of the front piece and how much is part of the back piece."},"thighShape":{"t":"Thigh shape","d":"Controls how elongated the thighs of the garment are. Higher values are used for deeper but narrower thighs."},"legHemEase":{"t":"Leg hem ease","d":"Controls how much ease there is at the bottom of the legs."},"legLength":{"t":"Leg length","d":"Controls how long the legs of the garment will be."},"crossSeamCurveStart":{"t":"Cross seam curve start","d":"Controls where the cross seam starts curving on the back."},"crossSeamCurveBend":{"t":"Cross seam curve bend","d":"Controls how deeply scooped the cross seam is."},"crossSeamCurveAngle":{"t":"Cross seam curve angle","d":"Controls at what angle the cross seam reaches the crotch fork."},"crotchSeamCurveStart":{"t":"Crotch seam curve start","d":"Controls where the crotch seam starts curving on the front."},"crotchSeamCurveBend":{"t":"Crotch seam curve bend","d":"Controls how deeply scooped the crotch seam is."},"crotchSeamCurveAngle":{"t":"Crotch seam curve angle","d":"Controls at what angle the crotch seam reaches the crotch fork."},"crotchForkBalance":{"t":"Crotch fork balance","d":"Controls how far back/forward the crotch fork is placed."},"crotchEase":{"t":"Crotch ease","d":"Controls horizontal ease at the crotch fork."},"crotchDrop":{"t":"Crotch drop","d":"Controls vertical ease at the crotch fork."},"legBalance":{"t":"Leg balance","d":"Positive values move more of the fabric to the back piece, negative values to the front piece."},"waistPosition":{"t":"Waist position","d":"Controls where the waistband is on the front of the overalls. 0 is at the natural waist and -100 is at the seat."},"outseamHeight":{"t":"Outseam height","d":"Controls how far up past the waist the outseam extends, and thus how far up the front and back bibs separate."},"waistbandWidth":{"t":"Waistband width","d":"Controls how wide the front waistband is."},"waistbandLayers":{"t":"Waistband layers","d":"Sets how many layers the front waistband is folded into."},"pocketSlash":{"t":"Slash pocket","d":"Toggles whether or not to include slash (front) pockets in the pattern."},"pocketSlashOpeningWidth":{"t":"Slash pocket opening width","d":"Controls how wide the openings of the slash pockets are."},"pocketSlashOpeningHeight":{"t":"Slash pocket opening height","d":"Controls how high the openings of the slash pockets are."},"pocketSlashOpeningCurve":{"t":"Slash pocket curve","d":"Controls the shape of the openings the slash pockets. 0 is a straight opening, while larger values are more deeply curved."},"pocketSlashWidth":{"t":"Slash pocket width","d":"Controls how wide the slash pocket bags are."},"pocketSlashHeight":{"t":"Slash pocket height","d":"Controls how deep the slash pocket bags are."},"pocketSlashShieldOverlap":{"t":"Slash pocket shield overlap","d":"Controls how far the pocket shield extends past the opening of the slash pockets."},"bibWaistDrop":{"t":"Waist drop","d":"Places extra fabric in the center of the waist, to help the garment better wrap around the belly."},"bibHeight":{"t":"Bib height","d":"Controls how tall the front bib is."},"bibWidth":{"t":"Bib width","d":"Controls how wide the top of the front bib is."},"bibPocketOnFold":{"t":"Bib pocket on fold","d":"Toggles whether to draft the bib pocket pattern on-the-fold, or as a full pattern piece."},"bibPocketOnFoldNo":{"t":"Full piece","d":"Draft the bib pocket as a full pattern piece."},"bibPocketOnFoldYes":{"t":"On-the-fold","d":"Draft the bib pocket on-the-fold."},"bibPlacketWidth":{"t":"Bib placket width","d":"Controls how wide to make the placket at the top of the front bib."},"bibPlacketLayers":{"t":"Bib placket layers","d":"Sets how many layers of fabric are used for the placket at the top of the front bib."},"pocketBib":{"t":"Bib pocket","d":"Toggles whether to include a bib pocket in the pattern."},"pocketBibVerticalPosition":{"t":"Bib pocket vertical position","d":"Controls where the bib pocket is located on the bib vertically."}
1,"pocketBibStyle":{"t":"Bib pocket style","d":"Choose among the available types/styles of bib pockets."},"pocketBibWidth":{"t":"Bib pocket width","d":"Controls how wide the top of the bib pocket is."},"pocketBibHeight":{"t":"Bib pocket height","d":"Controls how tall the bib pocket is."},"pocketBibFeatureWidth":{"t":"Bib pocket feature width","d":"The exact effect of this option varies based on the selected bib pocket style."},"pocketBibFeatureHeight":{"t":"Bib pocket feature height","d":"The exact effect of this option varies based on the selected bib pocket style."},"pocketBibFeatureCurve":{"t":"Bib pocket feature curve","d":"The exact effect of this option varies based on the selected bib pocket style."},"backBibBaseAngle":{"t":"Back bib base angle","d":"Controls the angle at which the back bib rises from side seam."},"backBibBaseCurve":{"t":"Back bib base curve","d":"Controls how strongly curved the back bib is as it rises from the side seam."},"backBibHexagonVerticalPosition":{"t":"Back bib hexagon vertical position","d":"Controls how far up the hexagon formed by the straps crossing is."},"backBibHexagonHeight":{"t":"Back bib hexagon height","d":"Controls how tall the hexagon formed by the straps crossing is."},"backBibHexagonWidth":{"t":"Back bib hexagon width","d":"Controls how wide the hexagon formed by the straps crossing is."},"backBibHexagonSideHeight":{"t":"Back bib hexagon side height","d":"Controls how tall the left and right sides of the hexagon formed by the straps crossing are."},"strapLength":{"t":"Strap length","d":"Controls how long the straps are."},"strapWidth":{"t":"Strap width","d":"Controls how wide the straps are."},"strapPosition":{"t":"Strap position","d":"Controls where the straps are positioned with respect to the hexagon."},"strapTaperCurve":{"t":"Strap taper curve","d":"Controls how strongly curved the taper of the straps is."},"strapTaperPosition":{"t":"Strap taper position","d":"Controls how long the tapered portion of the straps is."},"pocketBack":{"t":"Back pocket","d":"Toggles whether to include back pockets in the pattern."},"pocketBackPositionX":{"t":"Back pocket horizontal position","d":"Controls where the back pockets are horizontally."},"pocketBackPositionY":{"t":"Back pocket vertical position","d":"Controls where the back pockets are vertically."},"pocketBackWidth":{"t":"Back pocket width","d":"Controls how wide the back pockets are."},"pocketBackHeight":{"t":"Back pocket height","d":"Controls how tall the back pockets are."},"pocketBackCornerWidth":{"t":"Back pocket corner width","d":"Controls how wide the bottom-left and bottom-right corners of the back pocket are."},"pocketBackCornerHeight":{"t":"Back pocket corner height","d":"Controls how tall the bottom-left and bottom-right corners of the back pocket are."},"pocketCarpenter":{"t":"Carpenter pocket","d":"Toggles whether to include a carpenter pocket under the right back pocket."},"pocketCarpenterHeight":{"t":"Carpenter pocket height","d":"Controls how tall the carpenter pocket is."},"pocketCarpenterAnchorX":{"t":"Carpenter pocket anchor horizontal position","d":"Controls where the carpenter pocket is anchored under the back pocket horizontally."},"pocketCarpenterAnchorY":{"t":"Carpenter pocket anchor vertical position","d":"Controls where the carpenter pocket is anchored under the back pocket vertically."},"pocketCarpenterAnchorWidth":{"t":"Carpenter pocket anchor width","d":"Controls how wide the section of the carpenter pocket anchored under the back pocket is."},"pocketCarpenterOpeningHeight":{"t":"Carpenter pocket opening height","d":"Controls how tall the opening to the carpenter pocket is."},"pocketCarpenterExtra":{"t":"Carpenter pocket extra","d":"Toggles whether to include a second pocket over the bottom portion of the carpenter pocket."},"pocketCarpenterExtraHeight":{"t":"Carpenter pocket extra height","d":"Controls how tall to make the second carpenter pocket."},"hammerLoop":{"t":"Hammer loop","d":"Toggles whether to include a hammer loop under the left back pocket."},"hammerLoopWidth":{"t":"Hammer loop width","d":"How wide to make the hammer loop."},"hammerLoopCornerX":{"t":"Hammer loop corner horizontal position","d":"Controls where the hammer loop curves towards. Used for calculating its length."},"hammerLoopCornerY":{"t":"Hammer loop corner vertical position","d":"Controls where the hammer loop curves towards. Used for calculating its length."},"hammerLoopCurve":{"t":"Hammer loop curve","d":"Controls how deeply the hammer loop is curved. Used for calculating its length."},"hammerLoopOutseam":{"t":"Hammer loop outseam","d":"Controls how far down the outseam the hammer loop is inserted. Used for calculating its length."},"hammerLoopFirstFold":{"t":"Hammer loop first fold","d":"Controls how wide the first fold of the hammer loop is."},"hammerLoopSecondFold":{"t":"Hammer loop second fold","d":"Controls how wide the second fold of the hammer loop is."}}}')},Lc=JSON.parse('{"id":"opal","name":"Opal overalls","code":"Thrunic","description":"A FreeSewing pattern for overalls","design":"Thrunic","difficulty":3,"tags":["overalls","onePiece"],"techniques":["flat-felled-seam","hem","curved-seam","button","pocket"],"version":"4.6.0","pkg":"@freesewing/opal","collection":true}');const Pc={name:"opal.front",measurements:["waist","waistBack","seat","seatBack","waistToSeat","upperLeg","hpsToWaistFront","hpsToWaistBack","waistToUpperLeg","waistToArmpit","waistToFloor","inseam","ankle"],options:{hemAllowance:{pct:150,min:0,max:400,toAbs:(t,e,o)=>e.sa?e.sa:0*o.hemAllowance,menu:"construction"},legHemAllowance:{pct:150,min:0,max:1600,toAbs:(t,e,o)=>e.sa*o.legHemAllowance,menu:"construction"},waistEase:{pct:15,min:-30,max:100,menu:"fit"},waistBalance:{pct:0,min:-15,max:15,menu:"fit"},seatEase:{pct:10,min:-30,max:100,menu:"fit"},seatBalance:{pct:0,min:-15,max:15,menu:"fit"},thighShape:{pct:122,min:116,max:135,menu:"advanced"},legHemEase:{pct:20,min:-30,max:200,menu:"fit"},legLength:{pct:30,min:10,max:120,menu:"style"},crossSeamCurveStart:{pct:85,min:60,max:100,menu:"advanced"},crossSeamCurveBend:{pct:65,min:45,max:85,menu:"advanced"},crossSeamCurveAngle:{deg:12,min:0,max:45,menu:"advanced"},crotchSeamCurveStart:{pct:80,min:60,max:95,menu:"advanced"},crotchSeamCurveBend:{pct:80,min:45,max:100,menu:"advanced"},crotchSeamCurveAngle:{deg:25,min:0,max:45,menu:"advanced"},crotchForkBalance:{pct:10,min:-20,max:40,menu:"fit"},crotchEase:{pct:10,min:-30,max:100,menu:"fit"},crotchDrop:{pct:5,min:-10,max:80,menu:"fit"},legBalance:{pct:0,min:-30,max:30,menu:"fit"},waistPosition:{pct:0,min:-50,max:50,menu:"style"},anklePosition:.91,outseamHeight:{pct:5,min:0,max:20,menu:"style"},waistbandWidth:{pct:10,min:0,max:20,toAbs:(t,e,o)=>e.measurements.waist/4*o.waistbandWidth,menu:"construction"},waistbandLayers:{count:3,min:0,max:8,menu:"construction"},pocketSlash:{bool:!0,menu:"style"},pocketSlashOpeningWidth:{pct:30,min:4,max:60,menu:(t,e)=>!!e.pocketSlash&&"style"},pocketSlashOpeningHeight:{pct:60,min:4,max:100,menu:(t,e)=>!!e.pocketSlash&&"style"},pocketSlashOpeningCurve:{pct:0,min:0,max:100,menu:(t,e)=>!!e.pocketSlash&&"style"},pocketSlashWidth:{pct:70,min:20,max:100,menu:(t,e)=>!!e.pocketSlash&&"style"},pocketSlashHeight:{pct:90,min:20,max:200,menu:(t,e)=>!!e.pocketSlash&&"style"},pocketSlashShieldOverlap:{pct:30,min:0,max:60,menu:(t,e)=>!!e.pocketSlash&&"style"}},draft:function({measurements:t,options:e,absoluteOptions:o,Point:a,Path:i,points:n,paths:s,Snippet:r,snippets:l,sa:c,complete:p,macro:d,part:h,store:m,utils:f,scale:u}){n.cfWaist=new a(-t.waistFrontArc*(1+e.waistEase)*(1-e.waistBalance),0),n.cfSeat=new a(-t.seatFrontArc*(1+e.seatEase)*(1-e.seatBalance),t.waistToSeat),n.crossSeamCurveStart=n.cfWaist.shiftFractionTowards(n.cfSeat,e.crotchSeamCurveStart),n.fork=new a(-t.upperLeg/2*e.thighShape*(1+e.crotchEase-e.crotchForkBalance),t.waistToUpperLeg*(1+e.crotchDrop)),n.crossSeamCurveMax=f.beamsIntersect(n.cfWaist,n.cfSeat,n.fork,n.fork.shift(0,1337)),n.crossSeamCurveCp1=n.crossSeamCurveStart.shiftFractionTowards(n.crossSeamCurveMax,e.crotchSeamCurveBend),n.crossSeamCurveCp2=n.fork.shiftFractionTowards(n.crossSeamCurveMax,e.crotchSeamCurveBend).rotate(e.crotchSeamCurveAngle,n.fork),m.set("forkYCoordinate",n.fork.y);const g=(t.waistToFloor-n.fork.y)*e.legLength,b=Math.min(1,e.legLength/e.anklePosition),w=t.upperLeg*(1-b)+t.ankle*b;n.inseamHem=new a(-(1+e.legHemEase)*w/2*(1-e.legBalance),n.fork.y+g),n.outseamHem=new a(0,n.fork.y+g),n.waist=new a(0,0),n.cfWaist=n.cfWaist.shiftFractionTowards(n.cfSeat,-e.waistPosition),n.waist.y=n.cfWaist.y;const k=n.waist.dist(n.cfWaist);return n.slashTop=n.waist.shiftTowards(n.cfWaist,k*e.pocketSlashOpeningWidth),n.slashSide=n.waist.shiftTowards(n.outseamHem,k
1*e.pocketSlashOpeningHeight),n.slashOutlineTopOutside=n.waist,n.slashOutlineTopInside=n.waist.shiftTowards(n.cfWaist,k*e.pocketSlashWidth),n.slashOutlineBottomOutside=n.waist.shiftTowards(n.outseamHem,k*e.pocketSlashHeight),n.slashOutlineBottomInside=new a(n.slashOutlineTopInside.x,n.slashOutlineBottomOutside.y),n.forkCp2=n.crossSeamCurveCp2.rotate(-90,n.fork),n.inseamHemCp1=n.inseamHem.shiftFractionTowards(n.forkCp2,2/3),n.slashMax=new a(n.slashTop.x,n.slashSide.y),n.slashSideCp2=n.slashSide.shiftFractionTowards(n.slashMax,e.pocketSlashOpeningCurve),n.slashTopCp1=n.slashTop.shiftFractionTowards(n.slashMax,e.pocketSlashOpeningCurve),m.set("waistYCoordinate",n.cfWaist.y),m.set("cfWaist",n.cfWaist),m.set("waist",n.waist),m.set("waistDist",k),e.pocketSlash&&(s.slashPocketOutline=(new i).move(n.slashOutlineTopOutside).line(n.slashOutlineTopInside).line(n.slashOutlineBottomInside).line(n.slashOutlineBottomOutside).line(n.slashOutlineTopOutside).close().addClass("lining dashed")),e.pocketSlash?s.seam=(new i).move(n.outseamHem).line(n.slashSide).curve(n.slashSideCp2,n.slashTopCp1,n.slashTop).line(n.cfWaist).line(n.crossSeamCurveStart).curve(n.crossSeamCurveCp1,n.crossSeamCurveCp2,n.fork).curve(n.forkCp2,n.inseamHemCp1,n.inseamHem).addClass("fabric"):s.seam=(new i).move(n.outseamHem).line(n.waist).line(n.cfWaist).line(n.crossSeamCurveStart).curve(n.crossSeamCurveCp1,n.crossSeamCurveCp2,n.fork).curve(n.forkCp2,n.inseamHemCp1,n.inseamHem).addClass("fabric"),s.hem=(new i).move(n.inseamHem).line(n.outseamHem).addClass("fabric"),c&&(n.inseamHemAllowance=n.inseamHem.translate(-c,o.legHemAllowance),n.outseamHemAllowance=n.outseamHem.translate(c,o.legHemAllowance),s.sa=s.seam.offset(c).line(n.inseamHemAllowance).line(n.outseamHemAllowance).close().addClass("fabric sa")),p&&(s.hint=(new i).move(n.crossSeamCurveStart).line(n.crossSeamCurveMax).line(n.fork).addClass("note help")),e.pocketSlash&&d("hd",{id:"wWaistSlash",from:n.cfWaist,to:n.slashTop,y:n.waist.y-(c+15)}),e.pocketSlash&&d("hd",{id:"wWaistExSlash",from:n.slashTop,to:n.waist,y:n.waist.y-(c+15)}),d("hd",{id:"wWaistTotal",from:n.cfWaist,to:n.waist,y:n.waist.y-(c+30)}),d("hd",{id:"wWaistToCrossSeamCurveStart",from:n.crossSeamCurveStart,to:n.cfWaist,y:n.waist.y-(c+15),noStartMarker:!0,noEndMarker:!0}),d("hd",{id:"wCrossSeamCurveStartToCrossCurveSeamMax",from:n.crossSeamCurveMax,to:n.crossSeamCurveStart,y:n.waist.y-(c+15),noStartMarker:!0,noEndMarker:!0}),d("hd",{id:"wCrossSeamCurveMaxToFork",from:n.fork,to:n.crossSeamCurveMax,y:n.waist.y-(c+15),noStartMarker:!0,noEndMarker:!0}),d("hd",{id:"wCrossSeamCurveStartToFork",from:n.fork,to:n.crossSeamCurveStart,y:n.waist.y-(c+30)}),d("hd",{id:"wWidthAtFork",from:n.fork,to:n.waist,y:n.waist.y-(c+45)}),d("hd",{id:"wHem",from:n.inseamHem,to:n.outseamHem,y:n.outseamHem.y+(c+15)}),d("hd",{id:"wForkToHem",from:n.fork,to:n.inseamHem,y:n.inseamHem.y+(c+15)}),e.pocketSlash&&d("vd",{id:"vSlashOpening",from:n.waist,to:n.slashSide,x:n.waist.x+(c+15)}),e.pocketSlash&&d("vd",{id:"vOutseam",from:n.slashSide,to:n.outseamHem,x:n.waist.x+(c+15)}),d("vd",{id:"vTotal",from:n.waist,to:n.outseamHem,x:n.waist.x+(c+30)}),d("vd",{id:"vLegHemAllowance",from:n.outseamHem,to:c?n.outseamHemAllowance:n.outseamHem,x:n.waist.x+(c+15),noStartMarker:!0,noEndMarker:!0}),d("vd",{id:"vWaistToCrossSeamCurveStart",from:n.cfWaist,to:n.crossSeamCurveStart,x:n.fork.x-(c+15)}),d("vd",{id:"vCrossSeamCurveStartToFork",from:n.crossSeamCurveStart,to:n.fork,x:n.fork.x-(c+15)}),d("vd",{id:"vWaistToFork",from:n.cfWaist,to:n.fork,x:n.fork.x-(c+30)}),d("vd",{id:"vForkToHem",from:n.fork,to:n.inseamHem,x:n.fork.x-(c+30)}),n.grainlineTop=n.slashSide.translate(.05*-k,0),n.grainlineBottom=new a(n.grainlineTop.x,n.outseamHem.y),d("grainline",{from:n.grainlineTop,to:n.grainlineBottom}),m.cutlist.addCut({cut:2,from:"fabric"}),n.title=n.cfWaist.shiftFractionTowards(n.outseamHem,.5),d("title",{at:n.title,nr:1,title:"opal:front"}),n.logo=n.title.translate(20*-u,35*u),l.logo=new r("logo",n.logo),n.scalebox=n.title.translate(0,100*-u),d("scalebox",{at:n.scalebox}),h}};const Rc={name:"opal.bib",draft:function({measurements:t,options:e,absoluteOptions:o,Point:a,Path:i,points:n,paths:s,Snippet:r,snippets:l,sa:c,macro:p,part:d,store:h,scale:m,utils:f}){const u=t.hpsToWaistFront+t.hpsToWaistBack;return n.cfWaist=h.get("cfWaist").copy().translate(0,t.waistFront*e.bibWaistDrop),n.outseamWaist=h.get("waist"),n.cfWaistCp2=n.cfWaist.translate(1*n.cfWaist.dist(n.outseamWaist)/3,0),n.outseamTopCp1=n.cfWaist.translate(1*n.cfWaist.dist(n.outseamWaist)/2,0).shiftFractionTowards(n.outseamWaist,1/3),s.waist
1Curve=(new i).move(n.cfWaist).curve(n.cfWaistCp2,n.outseamTopCp1,n.outseamWaist).hide(),n.outseamWaist=n.outseamWaist.translate(n.cfWaist.dx(n.outseamWaist)-s.waistCurve.length(),0),n.cfWaistCp2=n.cfWaist.translate(1*n.cfWaist.dist(n.outseamWaist)/3,0),n.outseamTopCp1=n.cfWaist.translate(1*n.cfWaist.dist(n.outseamWaist)/2,0).shiftFractionTowards(n.outseamWaist,1/3),s.waistCurve=(new i).move(n.outseamWaist.flipX(n.cfWaist)).curve(n.outseamTopCp1.flipX(n.cfWaist),n.cfWaistCp2.flipX(n.cfWaist),n.cfWaist).curve(n.cfWaistCp2,n.outseamTopCp1,n.outseamWaist).hide(),n.outseamTop=n.outseamWaist.translate(0,-u*e.outseamHeight),n.topSide=new a(n.cfWaist.x*(1-e.bibWidth),-t.hpsToWaistFront*e.bibHeight),n.cfTop=new a(n.cfWaist.x,-t.hpsToWaistFront*e.bibHeight),h.set("bibFrontHeight",-n.cfTop.y),n.cfMax=n.cfWaist.translate(0,1*-n.cfWaist.dist(n.cfTop)/2),n.cfTopCp2=n.cfTop.shiftFractionTowards(n.cfMax,2/3),n.cfWaistCp1=n.cfWaist.shiftFractionTowards(n.cfMax,2/3),n.placketCenterBottom=n.cfTop.translate(0,o.bibPlacketWidth),n.placketSideBottom=f.beamIntersectsY(n.topSide,n.outseamTop,n.placketCenterBottom.y),e.bibPlacketLayers>0&&(s.placket=(new i).move(n.placketSideBottom.flipX(n.placketCenterBottom)).line(n.placketSideBottom),s.placket.setClass("fabric dashed"),s.placket.addText("opal:bibPlacket","center"),h.set("bibPlacketLengthTop",2*n.cfTop.dist(n.topSide)),h.set("bibPlacketLengthBottom",2*n.placketCenterBottom.dist(n.placketSideBottom))),n.pocketCenterTop=n.cfWaist.shiftFractionTowards(n.cfTop,e.pocketBibVerticalPosition+e.pocketBibHeight/2),n.pocketCenterBottom=n.pocketCenterTop.translate(0,n.cfWaist.dist(n.cfTop)*e.pocketBibHeight),n.pocketSideTop=n.pocketCenterTop.translate(n.cfWaist.dx(n.outseamWaist)*e.pocketBibWidth,0),n.pocketSideBottom=n.pocketCenterBottom.translate(n.cfWaist.dx(n.outseamWaist)*e.pocketBibWidth,0),n.pocketFeatureSide=n.pocketCenterBottom.translate(n.cfWaist.dx(n.outseamWaist)*e.pocketBibFeatureWidth,n.cfWaist.dy(n.cfTop)*e.pocketBibFeatureHeight),"hexagon"!==e.pocketBibStyle&&"curvedBottom"!==e.pocketBibStyle||(n.pocketMax=n.pocketSideBottom.copy(),n.pocketFeatureSide=n.pocketCenterBottom.translate(n.cfWaist.dx(n.outseamWaist)*e.pocketBibWidth,n.cfWaist.dy(n.cfTop)*e.pocketBibFeatureHeight),n.pocketSideBottom=n.pocketCenterBottom.translate(n.cfWaist.dx(n.pocketSideTop)*e.pocketBibFeatureWidth,0),n.pocketSideBottomCp2=n.pocketSideBottom.shiftFractionTowards(n.pocketMax,e.pocketBibFeatureCurve),n.pocketFeatureSideCp1=n.pocketFeatureSide.shiftFractionTowards(n.pocketMax,e.pocketBibFeatureCurve)),s.seam=(new i).move(n.outseamTop.flipX(n.cfWaist)).line(n.outseamWaist.flipX(n.cfWaist)).curve(n.outseamTopCp1.flipX(n.cfWaist),n.cfWaistCp2.flipX(n.cfWaist),n.cfWaist).curve(n.cfWaistCp2,n.outseamTopCp1,n.outseamWaist).line(n.outseamTop),s.hem=(new i).move(n.outseamTop).line(n.topSide).line(n.topSide.flipX(n.cfTop)).line(n.outseamTop.flipX(n.cfWaist)).addClass("fabric"),e.pocketBib&&(s.bibPocketHem=(new i).move(n.pocketSideTop).line(e.bibPocketOnFold?n.pocketCenterTop:n.pocketSideTop.flipX(n.pocketCenterTop)).addClass("fabric dashed"),"pentagon"===e.pocketBibStyle&&e.bibPocketOnFold&&(s.bibPocketSeam=(new i).move(n.pocketCenterTop).line(n.pocketCenterBottom).line(n.pocketFeatureSide).line(n.pocketSideTop).addClass("fabric dashed")),"pentagon"!==e.pocketBibStyle||e.bibPocketOnFold||(s.bibPocketSeam=(new i).move(n.pocketSideTop.flipX(n.pocketCenterTop)).line(n.pocketFeatureSide.flipX(n.pocketCenterTop)).line(n.pocketCenterBottom).line(n.pocketFeatureSide).line(n.pocketSideTop).addClass("fabric dashed")),"hexagon"===e.pocketBibStyle&&e.bibPocketOnFold&&(s.bibPocketSeam=(new i).move(n.pocketCenterTop).line(n.pocketCenterBottom).line(n.pocketSideBottom).line(n.pocketFeatureSide).line(n.pocketSideTop).addClass("fabric dashed")),"hexagon"!==e.pocketBibStyle||e.bibPocketOnFold||(s.bibPocketSeam=(new i).move(n.pocketSideTop.flipX(n.pocketCenterTop)).line(n.pocketFeatureSide.flipX(n.pocketCenterTop)).line(n.pocketSideBottom.flipX(n.pocketCenterTop)).line(n.pocketSideBottom).line(n.pocketFeatureSide).line(n.pocketSideTop).addClass("fabric dashed")),"curvedBottom"===e.pocketBibStyle&&e.bibPocketOnFold&&(s.bibPocketSeam=(new i).move(n.pocketCenterTop).line(n.pocketCenterBottom).line(n.pocketSideBottom).curve(n.pocketSideBottomCp2,n.pocketFeatureSideCp1,n.pocketFeatureSide).line(n.pocketSideTop).addClass("fabric dashed")),"curvedBottom"!==e.pocketBibStyle||e.bibPocketOnFold||(s.bibPocketSeam=(new i).move(n.pocketSideTop.flipX(n.pocketCenterTop)).line(n.pocketFeatureSide.flipX(n.pocketCenterTop)).curve(n.pocketFeatureSideCp1.flipX(n.pocketCenterTop),n.pocketSideBottomCp2.flipX(n.pocketCenterTop),n.pocketSideBottom.flipX(n.pocketCenterTop)).line(n.pocketSideBottom).curve(n.pocketSideBottomCp2,n.pocketFeatureSideCp1,n.pocketFeatureSide).line(n.pocketSideTop).addClass("fabric dashed")),"rectangle"===e.pocketBibStyle&&e.bibPocketOnFold&&(s.bibPocketSeam=(new i).move(n.pocketCenterTop).line(n.pocketCenterBottom).line(n.pocketSideBottom).line(n.pocketSideTop).addClass("fabric dashed")),"rectangle"!==e.pocketBibStyle||e.bibPocketOnFold||(s.bibPocketSeam=(new i).move(n.pocketSideTop.flipX(n.pocketCenterTop)).line(n.pocketSideBottom.flipX(n.pocketCenterTop)).line(n.pocketSideBottom).line(n.pocketSideTop).addClass("fabric dashed")),h.set("bibPocketCenter",n.pocketCenterTop.shiftFractionTowards(n.pocketCenterBottom,.5))),n.bibPocketText=n.pocketCenterTop.shiftFractionTowards(n.pocketCenterBottom,1/16).addText("opal:pocketBib","center"),c&&(s.sa=s.seam.offset(c).join(s.hem.offset(o.hemAllowance)).close().addClass("fabric sa")),p("pd",{id:"pWaistCurve",path:s.waistCurve}),p("hd",{id:"wBibTrapezoidalPart",from:n.topSide,to:n.outseamTop,y:n.cfTop.y-(o.hemAllowance+15)}),p("vd",{id:"hOutseam",from:n.outseamTop,to:n.outseamWaist,x:n.outseamWaist.x+(c+15)}),p("vd",{id:"hBibTrapezoidalPart",from:n.topSide,to:n.outseamTop,x:n.outseamWaist.x+(c+15)}),p("vd",{id:"hOutside",from:n.topSide,to:n.outseamWaist,x:n.outseamWaist.x+(c+30)}),p("vd",{id:"hCurve",from:n.outseamWaist,to:n.cfWaist,x:n.outseamWaist.x+(c+15),noStartMarker:!0,noEndMarker:!0}),p("vd",{id:"hTotal",from:n.topSide,to:n.cfWaist,x:n.outseamWaist.x+(c+45)}),p("hd",{id:"wTop",from:n.topSide.flipX(n.cfTop),to:n.topSide,y:n.topSide.y-(o.hemAllowance+15)}),p("hd",{id:"wTotal",from:n.outseamTop.flipX(n.cfTop),to:n.outseamTop,y:n.cfTop.y-(o.hemAllowance+30)}),n.grainlineTop=n.cfTop,n.grainlineBottom=n.cfWaist,p("grainline",{from:n.grainlineTop,to:n.grainlineBottom}),h.cutlist.addCut({cut:1,from:"fabric"}),n.title=n.cfTop.shiftFractionTowards(n.cfWaist,.5).translate(20*m,15*m),p("title",{at:n.title,nr:3,title:"opal:bib"}),n.logo=n.title.translate(35*-m,35*m),l.logo=new r("logo",n.logo),d},options:{bibWaistDrop:{pct:5,min:0,max:15,menu:"fit"},bibHeight:{pct:70,min:20,max:90,menu:"style"},bibWidth:{pct:50,min:20,max:100,menu:"style"},bibPocketOnFold:{bool:!1,menu:(t,e)=>!!e.pocketBib&&"construction"},bibPlacketWidth:{pct:15,min:0,max:30,toAbs:(t,e,o)=>e.measurements.waist/4*o.bibPlacketWidth,menu:"construction"},bibPlacketLayers:{count:3,min:0,max:8,menu:"construction"},pocketBib:{bool:!0,menu:"style"},pocketBibVerticalPosition:{pct:50,min:20,max:80,menu:(t,e)=>!!e.pocketBib&&"style"},pocketBibStyle:{dflt:"pentagon",list:["pentagon","hexagon","curvedBottom","rectangle"],menu:(t,e)=>!!e.pocketBib&&"style"},pocketBibWidth:{pct:40,min:20,max:80,menu:(t,e)=>!!e.pocketBib&&"style"},pocketBibHeight:{pct:60,min:20,max:80,menu:(t,e)=>!!e.pocketBib&&"style"},pocketBibFeatureWidth:{pct:50,min:0,max:80,menu:(t,e)=>!!e.pocketBib&&"style"},pocketBibFeatureHeight:{pct:5,min:0,max:20,menu:(t,e)=>!!e.pocketBib&&"style"},pocketBibFeatureCurve:{pct:50,min:0,max:100,menu:(t,e)=>!!e.pocketBib&&"style"}},after:Pc};
1const Fc={name:"opal.back",after:Rc,draft:function({measurements:t,options:e,absoluteOptions:o,Point:a,Path:i,points:n,paths:s,Snippet:r,snippets:l,sa:c,complete:p,macro:d,part:h,store:m,utils:f,scale:u}){const g=t.hpsToWaistFront+t.hpsToWaistBack;n.cfWaist=new a(-t.waistBackArc*(1+e.waistEase)*(1+e.waistBalance),0),n.cfSeat=new a(-t.seatBackArc*(1+e.seatEase)*(1+e.seatBalance),t.waistToSeat),n.crossSeamCurveStart=n.cfWaist.shiftFractionTowards(n.cfSeat,e.crossSeamCurveStart),n.fork=new a(-t.upperLeg/2*e.thighShape*(1+e.crotchEase+e.crotchForkBalance),t.waistToUpperLeg*(1+e.crotchDrop)),n.crossSeamCurveMax=f.beamsIntersect(n.cfWaist,n.cfSeat,n.fork,n.fork.shift(0,1337)),n.crossSeamCurveCp1=n.crossSeamCurveStart.shiftFractionTowards(n.crossSeamCurveMax,e.crossSeamCurveBend),n.crossSeamCurveCp2=n.fork.shiftFractionTowards(n.crossSeamCurveMax,e.crossSeamCurveBend).rotate(e.crossSeamCurveAngle,n.fork);const b=(t.waistToFloor-n.fork.y)*e.legLength,w=Math.min(1,e.legLength/e.anklePosition),k=t.upperLeg*(1-w)+t.ankle*w;n.inseamHem=new a(-(1+e.legHemEase)*k/2*(1+e.legBalance),n.fork.y+b),n.outseamHem=new a(0,n.fork.y+b),n.waist=new a(0,0),n.cfWaist.y=m.get("waistYCoordinate"),n.waist.y=n.cfWaist.y-g*e.outseamHeight;const C=1/n.crossSeamCurveStart.slope(n.cfWaist);n.bibHexagonBottom=new a(0,-t.hpsToWaistBack*(e.backBibHexagonVerticalPosition-.5*e.backBibHexagonHeight)),n.bibHexagonBottom.x=n.cfWaist.x+.5*n.bibHexagonBottom.y*C,n.bibHexagonCenter=n.bibHexagonBottom.translate(0,+t.hpsToWaistBack*(-.5*e.backBibHexagonHeight)),n.bibHexagonLowerInside=n.bibHexagonCenter.translate(t.waist/4*e.backBibHexagonWidth,t.hpsToWaistBack*(.5*e.backBibHexagonSideHeight)),n.bibHexagonUpperInside=n.bibHexagonCenter.translate(t.waist/4*e.backBibHexagonWidth,t.hpsToWaistBack*(-.5*e.backBibHexagonSideHeight)),n.bibHexagonTop=n.bibHexagonCenter.translate(0,+t.hpsToWaistBack*(-.5*e.backBibHexagonHeight)),n.bibHexagonLowerOutside=n.bibHexagonCenter.translate(-t.waist/4*e.backBibHexagonWidth,t.hpsToWaistBack*(.5*e.backBibHexagonSideHeight)),n.bibHexagonUpperOutside=n.bibHexagonCenter.translate(-t.waist/4*e.backBibHexagonWidth,t.hpsToWaistBack*(-.5*e.backBibHexagonSideHeight));const v=(g-m.get("bibFrontHeight")+n.bibHexagonTop.y)*e.strapLength,y=e.strapWidth*g;n.strapTaperOutside=new a(n.bibHexagonUpperOutside.x+t.waistBack*e.strapPosition,n.bibHexagonTop.y-e.strapTaperPosition*v),n.strapTaperInside=n.strapTaperOutside.translate(y,0),n.strapEndOutside=n.strapTaperOutside.translate(0,-v*(1-e.strapTaperPosition)),n.strapEndInside=n.strapEndOutside.translate(y,0),n.forkCp2=n.crossSeamCurveCp2.rotate(-90,n.fork),n.inseamHemCp1=n.inseamHem.shiftFractionTowards(n.forkCp2,2/3),n.bibCurveMax=f.beamsIntersect(n.waist,n.waist.shift(180-e.backBibBaseAngle,9001),n.bibHexagonLowerInside,n.bibHexagonUpperInside),n.bibCurveMax.y<n.bibHexagonLowerInside.y&&(n.bibCurveMax.y=n.bibHexagonLowerInside.y),n.waistCp2=n.waist.shiftFractionTowards(n.bibCurveMax,e.backBibBaseCurve),n.bibHexagonLowerInsideCp1=n.bibHexagonLowerInside.shiftFractionTowards(n.bibCurveMax,e.backBibBaseCurve),n.strapTaperCurveMax=f.beamIntersectsX(n.bibHexagonUpperInside,n.bibHexagonTop,n.strapEndInside.x),n.strapTaperInside.y>n.strapTaperCurveMax.y&&(n.strapTaperInside.y=n.strapTaperCurveMax.y,n.strapTaperOutside.y=n.strapTaperCurveMax.y),n.bibHexagonTopCp2=n.bibHexagonTop.shiftFractionTowards(n.strapTaperCurveMax,e.strapTaperCurve),n.strapTaperInsideCp1=n.strapTaperInside.shiftFractionTowards(n.strapTaperCurveMax,e.strapTaperCurve),n.strapTaperOutsideCp2=n.strapTaperOutside.translate(0,1*n.strapTaperOutside.dy(n.bibHexagonUpperOutside)/2),n.bibHexagonUpperOutsideCp1=n.bibHexagonUpperOutside.translate(0,1*n.bibHexagonUpperOutside.dy(n.strapTaperOutside)/6),n.cfBackMax=f.beamsIntersect(n.bibHexagonBottom,n.bibHexagonTop,n.cfWaist,n.crossSeamCurveStart),n.bibHexagonBottomCp2=n.bibHexagonBottom.shiftFractionTowards(n.cfBackMax,2/3),n.cfWaistCp1=n.cfWaist.shiftFractionTowards(n.cfBackMax,2/3);const T=-n.cfWaist.x;n.backPocket=new a(-T*e.pocketBackPositionX,T*e.pocketBackPositionY).addText("opal:pocketBack","center"),n.backPocketFrontTop=n.backPocket.translate(T*e.pocketBackWidth/2,-T*e.pocketBackHeight/2),n.backPocketBackTop=n.backPocketFrontTop.translate(-T*e.pocketBackWidth,0),n.backPocketFrontBottom=n.backPocketFrontTop.translate(0,T*e.pocketBackHeight),n.backPocketBackBottom=new a(n.backPocketBackTop.x,n.backPocketFrontBottom.y),n.backPocketBackBottomP1=n.backPocketBackBottom.shiftFractionTowards(n.backPocketBackTop,e.pocketBackCornerHeight),n.backPocketBackBottomP2=n.backPocketBackBottom.shiftFractionTowards(n.backPocketFrontBottom,e.pocketBackCornerWidth/2),n.backPocketFrontBottomP1=n.backPocketFrontBottom.shiftFractionTowards(n.backPocketBackBottom,e.pocketBackCornerWidth/2),n.backPocketFrontBottomP2=n.backPocketFrontBottom.shiftFractionTowards(n.backPocketFrontTop,e.pocketBackCornerHeight),n.carpe
1nterPocketTopBack=n.backPocketFrontBottom.translate(T*-e.pocketCarpenterAnchorX,T*-e.pocketCarpenterAnchorY),n.carpenterPocketTopFront=n.carpenterPocketTopBack.translate(T*e.pocketCarpenterAnchorWidth,0),n.carpenterPocketOutseamTop=new a(0,n.carpenterPocketTopBack.y+T*e.pocketCarpenterOpeningHeight),n.carpenterPocketOutseamBottom=new a(0,n.carpenterPocketTopBack.y+T*e.pocketCarpenterHeight),n.carpenterPocketBottomBack=new a(n.carpenterPocketTopBack.x,n.carpenterPocketOutseamBottom.y),n.carpenterPocketExtraOutseamTop=n.carpenterPocketOutseamBottom.translate(0,T*-e.pocketCarpenterExtraHeight),n.carpenterPocketExtraBackTop=new a(n.carpenterPocketBottomBack.x,n.carpenterPocketExtraOutseamTop.y),n.carpenterPocketLabel=n.carpenterPocketTopBack.shiftFractionTowards(n.carpenterPocketOutseamBottom,.4).addText("opal:pocketCarpenter","center"),n.carpenterPocketExtraLabel=n.carpenterPocketBottomBack.shiftFractionTowards(n.carpenterPocketExtraOutseamTop,.5).addText("opal:pocketCarpenterExtra","center"),m.set("carpenterPocketLabel",n.carpenterPocketLabel),m.set("carpenterPocketExtraLabel",n.carpenterPocketExtraLabel),n.hammerLoopTop=n.backPocketFrontBottomP1.shiftFractionTowards(n.backPocketFrontBottomP2,.5),n.hammerLoopMax=n.hammerLoopTop.translate(T*e.hammerLoopCornerX,T*e.hammerLoopCornerY),n.hammerLoopOutseam=new a(0,n.hammerLoopTop.y+T*e.hammerLoopOutseam),n.hammerLoopCp1=n.hammerLoopTop.shiftFractionTowards(n.hammerLoopMax,e.hammerLoopCurve),n.hammerLoopCp2=n.hammerLoopOutseam.shiftFractionTowards(n.hammerLoopMax,e.hammerLoopCurve);const x=T*e.hammerLoopWidth;return s.centerSeam=(new i).move(n.bibHexagonBottom).curve(n.bibHexagonBottomCp2,n.cfWaistCp1,n.cfWaist).line(n.crossSeamCurveStart).curve(n.crossSeamCurveCp1,n.crossSeamCurveCp2,n.fork).curve(n.forkCp2,n.inseamHemCp1,n.inseamHem).addClass("fabric"),s.outseam=(new i).move(n.outseamHem).line(n.waist).addClass("fabric"),s.legHem=(new i).move(n.inseamHem).line(n.outseamHem).addClass("fabric"),s.hem=(new i).move(n.waist).curve(n.waistCp2,n.bibHexagonLowerInsideCp1,n.bibHexagonLowerInside).line(n.bibHexagonUpperInside).line(n.bibHexagonTop).curve(n.bibHexagonTopCp2,n.strapTaperInsideCp1,n.strapTaperInside).line(n.strapEndInside).line(n.strapEndOutside).line(n.strapTaperOutside).curve(n.strapTaperOutsideCp2,n.bibHexagonUpperOutsideCp1,n.bibHexagonUpperOutside).line(n.bibHexagonLowerOutside).line(n.bibHexagonBottom).addClass("fabric"),e.pocketBack&&(s.pocketBackHem=(new i).move(n.backPocketFrontTop).line(n.backPocketBackTop).addClass("fabric dashed"),s.pocketBackSeam=(new i).move(n.backPocketBackTop).line(n.backPocketBackBottomP1).line(n.backPocketBackBottomP2).line(n.backPocketFrontBottomP1).line(n.backPocketFrontBottomP2).line(n.backPocketFrontTop).addClass("fabric dashed")),e.pocketCarpenter&&(s.pocketCarpenterHem=(new i).move(n.carpenterPocketOutseamTop).line(n.carpenterPocketTopFront).addClass("fabric dashed"),s.pocketCarpenterSeam=(new i).move(n.carpenterPocketTopFront).line(n.carpenterPocketTopBack).line(n.carpenterPocketBottomBack).line(n.carpenterPocketOutseamBottom).line(n.carpenterPocketOutseamTop).addClass("fabric dashed")),e.pocketCarpenterExtra&&(s.pocketCarpenterExtraHem=(new i).move(n.carpenterPocketExtraOutseamTop).line(n.carpenterPocketExtraBackTop).addClass("fabric dashed"),s.pocketCarpenterExtraSeam=(new i).move(n.carpenterPocketExtraBackTop).line(n.carpenterPocketBottomBack).line(n.carpenterPocketOutseamBottom).line(n.carpenterPocketExtraOutseamTop).addClass("fabric dashed")),e.hammerLoop&&(s.hammerLoopCenter=(new i).move(n.hammerLoopTop).curve(n.hammerLoopCp1,n.hammerLoopCp2,n.hammerLoopOutseam).addClass("various dotted").addText("opal:hammerLoop","center"),s.hammerLoopLeft=s.hammerLoopCenter.offset(x/2).addClass("fabric dashed"),s.hammerLoopRight=s.hammerLoopCenter.offset(-x/2).addClass("fabric dashed"),m.set("hammerLoopLength",s.hammerLoopCenter.length()),m.set("hammerLoopWidth",x)),c&&(n.inseamHemAllowance=n.inseamHem.translate(-c,o.legHemAllowance),n.outseamHemAllowance=n.outseamHem.translate(c,o.legHemAllowance),s.sa=s.outseam.offset(c).join(s.hem.offset(o.hemAllowance).join(s.centerSeam.offset(c))).line(n.inseamHemAllowance).line(n.outseamHemAllowance).close().addClass("fabric sa")),p&&(s.hint=(new i).move(n.crossSeamCurveStart).line(n.crossSeamCurveMax).line(n.fork).addClass("note help")),s.bibLowerHexagonHint=(new i).move(n.bibHexagonBottom).line(n.bibHexagonLowerInside).addClass("note help"),s.bibUpperHexagonHint=(new i).move(n.bibHexagonTop).line(n.bibHexagonUpperOutside).addClass("note help"),d("hd",{id:"wWaist",from:n.cfWaist,to:n.waist,y:n.cfWaist.y}),d("hd",{id:"wWaistToCrossSeamCurveStart",from:n.crossSeamCurveStart,to:n.cfWaist,y:n.cfWaist.y-(c+15),noStartMarker:!0,noEndMarker:!0}),d("hd",{id:"wCrossSeamCurveStartToCrossCurveSeamMax",from:n.crossSeamCurveMax,to:n.crossSeamCurveStart,y:n.cfWaist.y-(c+15),noStartMarker:!0,noEndMarker:!0}),d("hd",{id:"wCrossSeamCurveMaxToFork",from:n.fork,to:n.crossSeamCurveMax,y:n.cfWaist.y-(c+15),noStartMarker:!0,noEndMarker:!0}),d("hd",{id:"wCrossSeamCurveStartToFork",from:n.fork,to:n.crossSeamCurveStart,y:n.cfWaist.y-(c+30)}),d("hd",{id:"wWidthAtFork",from:n.fork,to:n.waist,y:n.outseamHem.y+(c+30)}),d("hd",{id:"wHem",from:n.inseamHem,to:n.outseamHem,y:n.outseamHem.y+(c+15)}),d("hd",{id:"wForkToHem",from:n.fork,to:n.inseamHem,y:n.inseamHem.y+(c+15)}),d("hd",{id:"wStrapWidth",from:n.strapEndOutside,to:n.strapEndInside,y:n.strapEndOutside.y-(o.hemAllowance+15)}),d("hd",{id:"wStrapInsideToHexagonTop",from:n.strapEndInside,to:n.bibHexagonTop,y:n.strapEndOutside.y-(o.hemAllowance+15)}),d("hd",{id:"wStrapOutsideToHexagonTop",from:n.strapEndOutside,to:n.bibHexagonTop,y:n.strapEndOutside.y-(o.hemAllowance+30)}),d("hd",{id:"wHexagonWidth",from:n.bibHexagonLowerOutside,to:n.bibHexagonLowerInside,y:n.bibHexagonLowerOutside.y}),d("hd",{id:"wWidthHexagonBottomToOutseam",from:n.bibHexagonBottom,to:n.waist,y:n.bibHexagonBottom.y}),d("hd",{id:"wBackBibCurve",from:n.bibHexagonLowerInside,to:n.waist,y:n.bibHexagonLowerInside.y}),d("vd",{id:"vOutseam",from:n.waist,to:n.outseamHem,x:n.waist.x+(c+15)}),d("vd",{id:"vHexagonLowerSideToOutseamTop",from:n.bibHexagonLowerInside,to:n.waist,x:n.waist.x+0}),d("vd",{id:"vHexagonUpperSideToLowerSide",from:n.bibHexagonUpperInside,to:n.bibHexagonLowerInside,x:n.waist.x+0}),d("vd",{id:"vHexagonTopToUpperSide",from:n.bibHexagonTop,to:n.bibHexagonUpperInside,x:n.waist.x+0}),d("vd",{id:"vHexagonTopToOutseam",from:n.bibHexagonTop,to:n.waist,x:n.waist.x+15}),d("vd",{id:"vStrapInsideTaperedHeight",from:n.strapTaperInside,to:n.bibHexagonTop,x:n.waist.x+0}),d("vd",{id:"vStrapInsideStraightHeight",from:n.strapEndInside,to:n.strapTaperInside,x:n.waist.x+0}),d("vd",{id:"vStrapInsideHeight",from:n.strapEndInside,to:n.bibHexagonTop,x:n.waist.x+15}),d("vd",{id:"vLegHemAllowance",from:n.outseamHem,to:c?n.outseamHemAllowance:n.outseamHem,x:n.waist.x+(c+15),noStartMarker:!0,noEndMarker:!0}),d("vd",{id:"vWaistToCrossSeamCurveStart",from:n.cfWaist,to:n.crossSeamCurveStart,x:n.fork.x-(c+15)}),d("vd",{id:"vCrossSeamCurveStartToFork",from:n.crossSeamCurveStart,to:n.fork,x:n.fork.x-(c+15)}),d("vd",{id:"vHexagonBottomToFork",from:n.bibHexagonBottom,to:n.fork,x:n.fork.x-(c+30)}),d("vd",{id:"vForkToHem",from:n.fork,to:n.inseamHem,x:n.fork.x-(c+30)}),d("vd",{id:"vHexagonBottomToWaist",from:n.bibHexagonBottom,to:n.cfWaist,x:n.fork.x-(c+15)}),d("vd",{id:"vHexagonLowerSideToHexagonBottom",from:n.bibHexagonLowerOutside,to:n.bibHexagonBottom,x:n.fork.x-(c+15)}),d("vd",{id:"vHexagonUpperSideToHexagonLowerSide",from:n.bibHexagonUpperOutside,to:n.bibHexagonLowerOutside,x:n.fork.x-(c+15)}),d("vd",{id:"vHexagonTopToHexagonUpperSide",from:n.bibHexagonTop,to:n.bibHexagonUpperOutside,x:n.fork.x-(c+15)}),d("vd",{id:"vHexagonHeight",from:n.bibHexagonTop,to:n.bibHexagonBottom,x:n.fork.x-(c+30)}),d("vd",{id:"vStrapStraightHeight",from:n.strapEndOutside,to:n.strapTaperOutside,x:n.fork.x-(c+15)}),d("vd",{id:"vStrapTaperHeight",from:n.strapTaperOutside,to:n.bibHexagonTop,x:n.fork.x-(c+15)}),d("vd",{id:"vStrapHeight",from:n.strapEndOutside,to:n.bibHexagonTop,x:n.fork.x-(c+30)}),d("vd",{id:"vTotal",from:n.strapEndOutside,to:n.inseamHem,x:n.fork.x-(c+45)}),n.grainlineTop=n.waist.shiftFractionTowards(n.cfWaist,.05),n.grainlineBottom=new a(n.grainlineTop.x,n.outseamHem.y),d("grainline",{from:n.grainlineTop,to:n.grainlineBottom}),m.cutlist.addCut({cut:2,from:"fabric"}),n.title=n.cfWaist.shiftFractionTowards(n.outseamHem,.5).shiftFractionTowards(n.inseamHem,.5),d("title",{at:n.title,nr:2,t
1itle:"opal:back"}),n.logo=n.title.translate(-20*u,35*u),l.logo=new r("logo",n.logo),n.scalebox=n.title.translate(-10*u,-80*u),d("scalebox",{at:n.scalebox}),h},options:{backBibBaseAngle:{deg:25,min:0,max:85,menu:"style"},backBibBaseCurve:{pct:40,min:0,max:100,menu:"style"},backBibHexagonVerticalPosition:{pct:50,min:10,max:90,menu:"style"},backBibHexagonHeight:{pct:40,min:10,max:60,menu:"style"},backBibHexagonWidth:{pct:50,min:20,max:80,menu:"style"},backBibHexagonSideHeight:{pct:12,min:5,max:40,menu:"style"},strapLength:{pct:160,min:100,max:200,menu:"style"},strapWidth:{pct:4,min:2,max:10,toAbs:(t,e,o)=>o.strapWidth*(e.measurements.hpsToWaistFront+e.measurements.hpsToWaistBack),menu:"style"},strapPosition:{pct:0,min:-10,max:0,menu:"style"},strapTaperPosition:{pct:50,min:0,max:100,menu:"style"},strapTaperCurve:{pct:80,min:0,max:100,menu:"style"},pocketBack:{bool:!0,menu:"style"},pocketBackPositionX:{pct:60,min:20,max:100,menu:(t,e)=>!!e.pocketBack&&"style"},pocketBackPositionY:{pct:100,min:0,max:160,menu:(t,e)=>!!e.pocketBack&&"style"},pocketBackWidth:{pct:60,min:10,max:100,menu:(t,e)=>!!e.pocketBack&&"style"},pocketBackHeight:{pct:80,min:10,max:120,menu:(t,e)=>!!e.pocketBack&&"style"},pocketBackCornerWidth:{pct:50,min:0,max:100,menu:(t,e)=>!!e.pocketBack&&"style"},pocketBackCornerHeight:{pct:10,min:0,max:100,menu:(t,e)=>!!e.pocketBack&&"style"},pocketCarpenter:{bool:!0,menu:"style"},pocketCarpenterHeight:{pct:100,min:30,max:150,menu:(t,e)=>!!e.pocketCarpenter&&"style"},pocketCarpenterAnchorX:{pct:20,min:0,max:80,menu:(t,e)=>!!e.pocketCarpenter&&"style"},pocketCarpenterAnchorY:{pct:10,min:0,max:50,menu:(t,e)=>!!e.pocketCarpenter&&"style"},pocketCarpenterAnchorWidth:{pct:15,min:0,max:80,menu:(t,e)=>!!e.pocketCarpenter&&"style"},pocketCarpenterOpeningHeight:{pct:60,min:40,max:100,menu:(t,e)=>!!e.pocketCarpenter&&"style"},pocketCarpenterExtra:{bool:!0,menu:(t,e)=>!!e.pocketCarpenter&&"style"},pocketCarpenterExtraHeight:{pct:50,min:10,max:80,menu:(t,e)=>!(!e.pocketCarpenter||!e.pocketCarpenterExtra)&&"style"},hammerLoop:{bool:!0,menu:"style"},hammerLoopWidth:{pct:10,min:0,max:20,menu:"style"},hammerLoopCornerX:{pct:0,min:-50,max:50,menu:"style"},hammerLoopCornerY:{pct:20,min:0,max:100,menu:"style"},hammerLoopCurve:{pct:100,min:0,max:100,menu:"style"},hammerLoopOutseam:{pct:20,min:0,max:80,menu:"style"},hammerLoopFirstFold:{pct:90,min:0,max:100,menu:"style"},hammerLoopSecondFold:{pct:60,min:0,max:200,menu:"style"}}};const Ec={name:"opal.waistband",draft:function({options:t,absoluteOptions:e,Point:o,Path:a,points:i,paths:n,sa:s,macro:r,part:l,store:c,scale:p}){const d=c.get("waistDist");i.topRight=new o(d,-e.waistbandWidth*t.waistbandLayers/2),i.topLeft=i.topRight.flipX(),i.bottomRight=i.topRight.flipY(),i.bottomLeft=i.bottomRight.flipX();for(let h=1;h<t.waistbandLayers;h++)i[`fold${h}Left`]=i.topLeft.shiftFractionTowards(i.bottomLeft,h/t.waistbandLayers),i[`fold${h}Right`]=i.topRight.shiftFractionTowards(i.bottomRight,h/t.waistbandLayers),n[`fold${h}`]=(new a).move(i[`fold${h}Left`]).line(i[`fold${h}Right`]).setClass("fabric dashed").addText("opal:fold","center");return n.seam=(new a).move(i.topRight).line(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).close().setClass("fabric"),i.saTopRight=i.topRight.translate(s,0),i.saTopLeft=i.topLeft.translate(-s,0),i.saBottomRight=i.bottomRight.translate(s,0),i.saBottomLeft=i.bottomLeft.translate(-s,0),s&&(n.saRight=(new a).move(i.bottomRight).line(i.saBottomRight).line(i.saTopRight).line(i.topRight).addClass("sa fabric"),n.saLeft=(new a).move(i.bottomLeft).line(i.saBottomLeft).line(i.saTopLeft).line(i.topLeft).addClass("sa fabric")),r("hd",{id:"wWaistband",from:i.topLeft,to:i.topRight,y:i.topLeft.y-15}),r("vd",{id:"hWaistband",from:i.topLeft,to:i.bottomLeft,x:i.topLeft.x-(s+15)}),i.grainlineTop=i.topLeft.shiftFractionTowards(i.bottomRight,3/32),i.grainlineBottom=i.grainlineTop.flipY(),i.grainlineTop2=new o(15*i.topLeft.x/16,0),i.grainlineBottom2=new o(11*i.topLeft.x/16,0),i.grainText=new o(13*i.topLeft.x/16,1*i.topLeft.y/16).addText("opal:grainlineEitherWay","note center"),r("grainline",{from:i.grainlineTop,to:i.grainlineBottom,text:""}),r("grainline",{id:"grainline2",from:i.grainlineTop2,to:i.grainlineBottom2,text:""}),c.cutlist.addCut({cut:1,from:"fabric"}),i.title=new o(30*p,5*p),r("title",{at:i.title,nr:11,title:"opal:waistband",scale:.75}),l},after:Pc};
1const Wc={name:"opal.bibPlacket",draft:function({options:t,absoluteOptions:e,Point:o,Path:a,points:i,paths:n,macro:s,part:r,store:l,scale:c}){if(t.bibPlacketLayers<=0)return r.hide();const p=l.get("bibPlacketLengthTop")/2,d=l.get("bibPlacketLengthBottom")/2;i.topRight=new o(p,-e.bibPlacketWidth*t.bibPlacketLayers/2),i.topLeft=i.topRight.flipX(),i.bottomRight=i.topRight.flipY(),t.bibPlacketLayers%2&&(i.bottomRight.x=d),i.bottomLeft=i.bottomRight.flipX();for(let h=1;h<t.bibPlacketLayers;h++)i[`fold${h}Left`]=i.topLeft.shiftFractionTowards(i.bottomLeft,h/t.bibPlacketLayers),i[`fold${h}Left`].x=h%2?-d:-p,i[`fold${h}Right`]=i.topRight.shiftFractionTowards(i.bottomRight,h/t.bibPlacketLayers),i[`fold${h}Right`].x=h%2?d:p,n[`fold${h}`]=(new a).move(i[`fold${h}Left`]).line(i[`fold${h}Right`]).setClass("fabric dashed").addText("opal:fold","center");n.seam=(new a).move(i.topRight).line(i.topLeft);for(let h=1;h<t.bibPlacketLayers;h++)n.seam.line(i[`fold${h}Left`]);n.seam.line(i.bottomLeft).line(i.bottomRight);for(let h=t.bibPlacketLayers-1;h>0;h--)n.seam.line(i[`fold${h}Right`]);return n.seam.line(i.topRight).close().setClass("fabric"),1==t.bibPlacketLayers&&(i.fold1Left=i.bottomLeft,i.fold1Right=i.bottomRight),s("hd",{id:"wTop",from:i.topLeft,to:i.topRight,y:i.topLeft.y-15}),s("hd",{id:"wDifference",from:i.fold1Left,to:i.topLeft,y:i.topLeft.y-15,noStartMarker:!0,noEndMarker:!0}),s("hd",{id:"wBottom",from:i.fold1Left,to:i.fold1Right,y:i.topLeft.y-30}),s("vd",{id:"hSingleFold",from:i.topLeft,to:i.fold1Left,x:i.fold1Left.x-15}),s("vd",{id:"hAllFolds",from:i.topLeft,to:i.bottomLeft,x:i.fold1Left.x-30}),i.grainlineTop=i.bottomLeft.shiftFractionTowards(i.topRight,1/16),i.grainlineBottom=i.grainlineTop.flipX(),s("grainline",{from:i.grainlineTop,to:i.grainlineBottom}),l.cutlist.addCut({cut:1,from:"fabric"}),i.title=new o(30*c,15*c),s("title",{at:i.title,nr:12,title:"opal:bibPlacket",scale:.75}),r},after:Rc};const Hc={name:"opal.pocketSlash",draft:function({options:t,Point:e,Path:o,points:a,paths:i,Snippet:n,snippets:s,sa:r,macro:l,part:c,store:p,scale:d,utils:h}){if(!t.pocketSlash)return c.hide();const m=p.get("waistDist");a.centerTop=new e(0,0),a.centerBottom=new e(0,m*t.pocketSlashHeight),a.topRight=new e(m*t.pocketSlashWidth,0),a.topLeft=new e(-m*t.pocketSlashWidth,0),a.bottomLeft=new e(-m*t.pocketSlashWidth,m*t.pocketSlashHeight),a.bottomRight=new e(m*t.pocketSlashWidth,m*t.pocketSlashHeight),a.slashTop=a.topRight.translate(-m*t.pocketSlashOpeningWidth,0),a.slashSide=a.topRight.translate(0,m*t.pocketSlashOpeningHeight);const f=t.pocketSlashOpeningWidth,u=t.pocketSlashOpeningHeight,g=Math.hypot(f,u);return a.shieldTop=a.topLeft.translate(m*(t.pocketSlashOpeningWidth+f/g*t.pocketSlashShieldOverlap),0),a.shieldSide=a.topLeft.translate(0,m*(t.pocketSlashOpeningHeight+u/g*t.pocketSlashShieldOverlap)),a.shieldSide.y>a.bottomLeft.y?(a.shieldSideTrim=h.beamIntersectsY(a.shieldSide,a.shieldTop,a.bottomLeft.y),a.shieldSide=a.bottomLeft):a.shieldSideTrim=a.shieldSide,a.shieldTop.x>a.centerTop.x?(a.shieldTopTrim=h.beamIntersectsX(a.shieldSide,a.shieldTop,a.centerTop.x),a.shieldTop=a.centerTop):a.shieldTopTrim=a.shieldTop,a.slashMax=new e(a.slashTop.x,a.slashSide.y),a.slashSideCp2=a.slashSide.shiftFractionTowards(a.slashMax,t.pocketSlashOpeningCurve),a.slashTopCp1=a.slashTop.shiftFractionTowards(a.slashMax,t.pocketSlashOpeningCurve),a.shieldMax=new e(a.shieldTop.x,a.shieldSideTrim.y),a.shieldSideCp2=a.shieldSideTrim.shiftFractionTowards(a.shieldMax,t.pocketSlashOpeningCurve),a.shieldTopCp1=a.shieldTopTrim.shiftFractionTowards(a.shieldMax,t.pocketSlashOpeningCurve),i.seam=(new o).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.slashSide).curve(a.slashSideCp2,a.slashTopCp1,a.slashTop).line(a.topLeft).close().addClass("lining"),i.fold=(new o).move(a.centerTop).line(a.centerBottom).addText("opal:fold").addClass("various dashed"),i.shield=(new o).move(a.shieldTop).line(a.topLeft).line(a.shieldSide).line(a.shieldSideTrim).curve(a.shieldSideCp2,a.shieldTopCp1,a.shieldTopTrim).line(a.shieldTop).close().addClass("fabric dashed"),a.shieldText=a.shieldTop.shiftFractionTowards(a.shieldSide,.5).shiftFractionTowards(a.topLeft,3/4).addText("opal:pocketShield"),a.shieldCenter=a.shieldTop.shiftFractionTowards(a.shieldSide,.5).shiftFractionTowards(a.topLeft,.5),r&&(i.sa=i.seam.offset(r).addClass("sa lining"),a.saShieldTopRight=a.shieldTop.translate(0,-r),a.saShieldTopLeft=a.topLeft.translate(-r,-r),a.saShieldBottomLeft=a.shieldSide.translate(-r,a.bottomLeft.y===a.shieldSide.y?r:0),a.saShieldBottomRight=a.shieldSideTrim.translate(0,a.bottomLeft.y===a.shieldSide.y?r:0),i.saShield=(new o).move(a.shieldTop).line(a.saShieldTopRight).line(a.saShieldTopLeft).line(a.saShieldBottomLeft).line(a.saShieldBottomRight).line(a.shieldSideTrim).addClass("sa fabric").hide()),l("hd",{id:"wTopLeft",from:a.topLeft,to:a.centerTop,y:a.topLeft.y-(r+15)}),l("hd",{id:"wTop",from:a.topLeft,to:a.slashTop,y:a.topLeft.y-(r+30)}),l("hd",{id:"wSlash",from:a.slashTop,to:a.slashSide,y:a.topLeft.y-(r+15)}),l("hd",{id:"wBottom",from:a.bottomLeft,to:a.bottomRight,y:a.bottomLeft.y+(r+15)}),l("vd",{id:"hSlash",from:a.slashTop,to:a.slashSide,x:a.bottomRight.x+(r+15)}),l("vd",{id:"hSide",from:a.slashTop,to:a.bottomRight,x:a.bottomRight.x+(r+30)}),p.cutlist.addCut({cut:2,from:"lining"}),a.title=a.centerTop.shiftFractionTowards(a.centerBottom,.5).translate(10*d,25*d),l("title",{at:a.title,nr:5,title:"opal:pocketSlash"}),a.logo=a.title.translate(20*-d,35*d),s.logo=new n("logo",a.logo),c},after:Pc};const Ac={name:"opal.pocketSlashShield",draft:function({options:t,points:e,paths:o,snippets:a,sa:i,macro:n,part:s,store:r,scale:l}){if(!t.pocketSlash)return s.hide();n("rmad");const c=["shield","saShield"];for(const p in o)-1===c.indexOf(p)&&delete o[p];return i&&o.saShield.unhide(),o.shield.setClass("fabric"),e.shieldText.setText(null),delete a.logo,n("hd",{id:"wTop",from:e.topLeft,to:e.shieldTop,y:e.topLeft.y-(i+15)}),n("vd",{id:"hTop",from:e.topLeft,to:e.shieldSide,x:e.shieldSide.x-(i+15)}),e.shieldSide.x!=e.shieldSideTrim.x&&(n("hd",{id:"wBottomTrim",from:e.shieldSide,to:e.shieldSideTrim,y:e.shieldSide.y+(i+15),noStartMarker:e.shieldSideTrim.x-e.shieldSide.x<25*l,noEndMarker:e.shieldSideTrim.x-e.shieldSide.x<25*l}),n("hd",{id:"wDiagonal",from:e.shieldSideTrim,to:e.shieldTopTrim,y:e.shieldSide.y+(i+15)}
1)),e.shieldTop.y!=e.shieldTopTrim.y&&(n("vd",{id:"hSideTrim",from:e.shieldTop,to:e.shieldTopTrim,x:e.shieldTop.x+(i+15),noStartMarker:e.shieldTopTrim.y-e.shieldTop.y<25*l,noEndMarker:e.shieldTopTrim.y-e.shieldTop.y<25*l}),n("vd",{id:"hDiagonal",from:e.shieldTopTrim,to:e.shieldSideTrim,x:e.shieldTop.x+(i+15)})),e.title=e.shieldCenter.translate(-10*l,10*l),n("title",{at:e.title,nr:6,title:"opal:pocketShield",scale:.6}),r.cutlist.removeCut("lining"),r.cutlist.addCut({cut:2,from:"fabric"}),s},from:Hc};const Oc={name:"opal.pocketBib",draft:function({options:t,absoluteOptions:e,points:o,paths:a,Snippet:i,snippets:n,sa:s,macro:r,part:l,scale:c}){if(!t.pocketBib)return l.hide();r("rmad");const p=["bibPocketSeam","bibPocketHem","cf"];for(const d in a)-1===p.indexOf(d)&&delete a[d];return t.bibPocketOnFold&&delete a.cf,a.bibPocketSeam.unhide().setClass("fabric"),a.bibPocketHem.unhide().setClass("fabric"),delete o.bibPocketText,s&&(a.sa=a.bibPocketHem.offset(e.hemAllowance).join(a.bibPocketSeam.offset(s)).close().setClass("fabric sa")),r("hd",{id:"wTop",from:t.bibPocketOnFold?o.pocketCenterTop:o.pocketSideTop.flipX(o.pocketCenterTop),to:o.pocketSideTop,y:o.pocketCenterTop.y-(e.hemAllowance+15)}),"rectangle"!==t.pocketBibStyle&&("pentagon"!==t.pocketBibStyle&&r("hd",{id:"wBottomCenter",from:t.bibPocketOnFold?o.pocketCenterBottom:o.pocketSideBottom.flipX(o.pocketCenterTop),to:o.pocketSideBottom,y:o.pocketCenterBottom.y+(s+15)}),"pentagon"!==t.pocketBibStyle&&r("hd",{id:"wBottomSide",from:o.pocketSideBottom,to:o.pocketFeatureSide,y:o.pocketCenterBottom.y+(s+15)}),r("hd",{id:"wBottom",from:t.bibPocketOnFold?o.pocketCenterBottom:o.pocketFeatureSide.flipX(o.pocketCenterTop),to:o.pocketFeatureSide,y:o.pocketCenterBottom.y+(s+30)}),r("vd",{id:"hUpperSide",from:o.pocketSideTop,to:o.pocketFeatureSide,x:o.pocketFeatureSide.x+(s+15)}),r("vd",{id:"hLowerSide",from:o.pocketFeatureSide,to:o.pocketCenterBottom,x:o.pocketFeatureSide.x+(s+15),noStartMarker:!0,noEndMarker:!0})),r("vd",{id:"hTotalSide",from:o.pocketSideTop,to:o.pocketCenterBottom,x:"rectangle"===t.pocketBibStyle?o.pocketSideBottom.x+(s+15):o.pocketFeatureSide.x+(s+30)}),o.grainlineTop=o.pocketCenterTop,o.grainlineBottom=o.pocketCenterBottom,t.bibPocketOnFold?r("cutOnFold",{from:o.grainlineTop,to:o.grainlineBottom}):r("grainline",{from:o.grainlineTop,to:o.grainlineBottom}),o.title=o.pocketCenterTop.shiftFractionTowards(o.pocketCenterBottom,.5).translate(10*c,10*c),r("title",{at:o.title,nr:4,title:"opal:pocketBib"}),t.bibPocketOnFold?delete n.logo:n.logo=new i("logo",o.logo=o.title.translate(20*-c,35*c)),l},from:Rc};const Dc={name:"opal.pocketBack",draft:function({options:t,absoluteOptions:e,points:o,paths:a,Snippet:i,snippets:n,sa:s,macro:r,part:l,scale:c}){if(!t.pocketBack)return l.hide();r("rmad"),r("rmScalebox"),o.title=o.backPocket.copy().translate(10*c,10*c);const p=["pocketBackSeam","pocketBackHem"];for(const d in a)-1===p.indexOf(d)&&delete a[d];return a.pocketBackSeam.setClass("fabric"),a.pocketBackHem.setClass("fabric"),s&&(a.sa=a.pocketBackSeam.offset(s).join(a.pocketBackHem.offset(e.hemAllowance)).close().setClass("fabric sa")),r("hd",{id:"wTop",from:o.backPocketBackTop,to:o.backPocketFrontTop,y:o.backPocketBackTop.y-(e.hemAllowance+15)}),r("hd",{id:"wBottomCenter",from:o.backPocketBackBottomP2,to:o.backPocketFrontBottomP1,y:o.backPocketBackBottom.y+(s+15)}),r("hd",{id:"wBottomSide",from:o.backPocketFrontBottomP1,to:o.backPocketFrontBottomP2,y:o.backPocketBackBottom.y+(s+15)}),r("vd",{id:"hSideMain",from:o.backPocketFrontTop,to:o.backPocketFrontBottomP2,x:o.backPocketFrontTop.x+(s+15)}),r("vd",{id:"hSideDiagonal",from:o.backPocketFrontBottomP2,to:o.backPocketFrontBottomP1,x:o.backPocketFrontTop.x+(s+15),noStartMarker:!0,noEndMarker:!0}),r("vd",{id:"hSideTotal",from:o.backPocketFrontTop,to:o.backPocketFrontBottomP1,x:o.backPocketFrontTop.x+(s+30)}),o.grainlineTop=o.backPocketBackTop.shiftFractionTowards(o.backPocketFrontTop,.5),o.grainlineBottom=o.backPocketBackBottom.shiftFractionTowards(o.backPocketFrontBottom,.5),r("grainline",{from:o.grainlineTop,to:o.grainlineBottom}),r("title",{at:o.title,nr:7,title:"opal:pocketBack"}),o.logo=o.title.translate(20*-c,35*c),n.logo=new i("logo",o.logo),l},from:Fc};const Nc={name:"opal.pocketCarpenter",draft:function({options:t,absoluteOptions:e,points:o,paths:a,Snippet:i,snippets:n,sa:s,macro:r,part:l,store:c,scale:p}
1){if(!t.pocketCarpenter)return l.hide();r("rmad"),r("rmScalebox");const d=["pocketCarpenterSeam","pocketCarpenterHem"];for(const h in a)-1===d.indexOf(h)&&delete a[h];return delete n.logo,a.pocketCarpenterHem.setClass("fabric"),a.pocketCarpenterSeam.setClass("fabric"),s&&(a.sa=a.pocketCarpenterSeam.offset(s).join(a.pocketCarpenterHem.offset(e.hemAllowance)).close().setClass("fabric sa")),r("hd",{id:"wTop",from:o.carpenterPocketTopBack,to:o.carpenterPocketTopFront,y:o.carpenterPocketTopFront.y-(s+15)}),r("hd",{id:"wOpening",from:o.carpenterPocketTopFront,to:o.carpenterPocketOutseamTop,y:o.carpenterPocketTopFront.y-(s+15)}),r("hd",{id:"wTotal",from:o.carpenterPocketTopBack,to:o.carpenterPocketOutseamTop,y:o.carpenterPocketTopFront.y-(s+30)}),r("vd",{id:"hOpening",from:o.carpenterPocketTopFront,to:o.carpenterPocketOutseamTop,x:o.carpenterPocketOutseamTop.x+(s+15)}),r("vd",{id:"hSide",from:o.carpenterPocketOutseamTop,to:o.carpenterPocketOutseamBottom,x:o.carpenterPocketOutseamTop.x+(s+15)}),r("vd",{id:"hTotal",from:o.carpenterPocketTopFront,to:o.carpenterPocketOutseamBottom,x:o.carpenterPocketOutseamTop.x+(s+30)}),o.grainlineTop=o.carpenterPocketTopBack.translate(10*p,0),o.grainlineBottom=o.carpenterPocketBottomBack.translate(10*p,0),r("grainline",{from:o.grainlineTop,to:o.grainlineBottom}),c.cutlist.removeCut("fabric"),c.cutlist.addCut({cut:1,from:"fabric"}),o.title=o.carpenterPocketTopBack.shiftFractionTowards(o.carpenterPocketOutseamBottom,.5),r("title",{at:o.title,nr:8,title:"opal:pocketCarpenter",align:"center"}),o.logo=o.title.translate(20*p,120*p),n.logo=new i("logo",o.logo),l},from:Fc};const Ic={name:"opal.pocketCarpenterExtra",draft:function({options:t,absoluteOptions:e,points:o,paths:a,snippets:i,sa:n,macro:s,part:r,store:l,scale:c}){if(!t.pocketCarpenterExtra)return r.hide();s("rmad"),s("rmScalebox");const p=["pocketCarpenterExtraSeam","pocketCarpenterExtraHem"];for(const d in a)-1===p.indexOf(d)&&delete a[d];return delete i.logo,a.pocketCarpenterExtraHem.setClass("fabric"),a.pocketCarpenterExtraSeam.setClass("fabric"),n&&(a.sa=a.pocketCarpenterExtraSeam.offset(n).join(a.pocketCarpenterExtraHem.offset(e.hemAllowance)).close().setClass("fabric sa")),s("hd",{id:"wWidth",from:o.carpenterPocketExtraBackTop,to:o.carpenterPocketExtraOutseamTop,y:o.carpenterPocketExtraBackTop.y-(e.hemAllowance+15)}),s("vd",{id:"hHeight",from:o.carpenterPocketExtraOutseamTop,to:o.carpenterPocketOutseamBottom,x:o.carpenterPocketExtraOutseamTop.x+(n+15)}),o.grainlineTop=o.carpenterPocketExtraBackTop.translate(10*c,0),o.grainlineBottom=o.carpenterPocketBottomBack.translate(10*c,0),s("grainline",{from:o.grainlineTop,to:o.grainlineBottom}),l.cutlist.removeCut("fabric"),l.cutlist.addCut({cut:1,from:"fabric"}),o.title=o.carpenterPocketExtraBackTop.shiftFractionTowards(o.carpenterPocketOutseamBottom,.5),s("title",{at:o.title,nr:9,title:"opal:pocketCarpenterExtra",align:"center"}),o.logo=o.title.translate(-10*c,35*c),r},from:Fc};const Mc={name:"opal.hammerLoop",draft:function({options:t,Point:e,Path:o,points:a,paths:i,sa:n,macro:s,part:r,store:l,scale:c}){if(!t.hammerLoop)return r.hide();const p=l.get("hammerLoopLength")*t.hammerLoopLengthFactor,d=l.get("hammerLoopWidth");return a.topLeftInside=new e(-p/2,-d/2),a.bottomLeftInside=new e(-p/2,d/2),a.bottomRightInside=new e(p/2,d/2),a.topRightInside=new e(p/2,-d/2),a.bottomLeftFold1=a.bottomLeftInside.translate(0,d*t.hammerLoopFirstFold),a.bottomRightFold1=a.bottomRightInside.translate(0,d*t.hammerLoopFirstFold),a.topLeftFold1=a.topLeftInside.translate(0,-d*t.hammerLoopFirstFold),a.topRightFold1=a.topRightInside.translate(0,-d*t.hammerLoopFirstFold),a.topLeftFold2=a.topLeftFold1.translate(0,-d*t.hammerLoopSecondFold),a.topRightFold2=a.topRightFold1.translate(0,-d*t.hammerLoopSecondFold),a.saTopLeft=a.topLeftFold2.translate(-n,0),a.saBottomLeft=a.bottomLeftFold1.translate(-n,0),a.saTopRight=a.topRightFold2.translate(n,0),a.saBottomRight=a.bottomRightFold1.translate(n,0),i.hammerLoop=(new o).move(a.topLeftFold2).line(a.bottomLeftFold1).line(a.bottomRightFold1).line(a.topRightFold2).line(a.topLeftFold2).close().addClass("fabric"),i.bottomInside=(new o).move(a.bottomLeftInside).line(a.bottomRightInside).addClass("fabric dashed").addText("opal:fold","center"),i.topInside=(new o).move(a.topLeftInside).line(a.topRightInside).addClass("fabric dashed").addText("opal:fold","center"),i.topFold1=(new o).move(a.topLeftFold1).line(a.topRightFold1).addClass("fabric dashed").addText("opal:fold","center"),n&&(i.saLeft=(new o).move(a.topLeftFold2).line(a.saTopLeft).line(a.saBottomLeft).line(a.bottomLeftFold1).addClass("fabric sa"),i.saRight=(new o).move(a.topRightFold2).line(a.saTopRight).line(a.saBottomRight).line(a.bottomRightFold1).addClass("fabric sa")),s("hd",{id:"wWidth",from:a.topLeftFold2,to:a.topRightFold2,y:a.topLeftFold2.y-15}),s("vd",{id:"hBase",from:a.topRightInside,to:a.bottomRightInside,x:a.topRightFold2.x+(n+15),noStartMarker:!0,noEndMarker:!0}),s("vd",{id:"hFoldBottom",from:a.bottomRightInside,to:a.bottomRightFold1,x:a.topRightFold2.x+(n+15),noStartMarker:!0,noEndMarker:!0}),s("vd",{id:"hFoldTop1",from:a.topRightFold1,to:a.topRightInside,x:a.topRightFold2.x+(n+15),noStartMarker:!0,noEndMarker:!0}),s("vd",{id:"hFoldTop2",from:a.topRightFold2,to:a.topRightFold1,x:a.topRightFold2.x+(n+15),noStartMarker:!0,noEndMarker:!0}),s("vd",{id:"hTotal",from:a.topRightFold2,to:a.bottomRightFold1,x:a.topRightFold2.x+(n+30)}),a.title=a.topLeftFold2.shiftFractionTowards(a.bottomLeftFold1,.5).translate(5*c,0),s("title",{at:a.title,nr:10,title:"opal:hammerLoop",scale:.4}),r},after:Fc,options:{hammerLoopLengthFactor:1}},_c=new n.pT({data:Lc,parts:[Pc,Fc,Rc,Ec,Wc,Hc,Ac,Oc,Dc,Nc,Ic,Mc]}),jc=JSON.parse('{"id":"otis","name":"Otis romper","code":"Wouter Van Wageningen","de
1scription":"A FreeSewing pattern for a baby romper","design":"Wouter Van Wageningen","difficulty":2,"tags":[],"techniques":[],"version":"4.6.0","pkg":"@freesewing/otis","collection":true}'),Gc={en:JSON.parse('{"t":"Otis romper","d":"A FreeSewing pattern for a baby romper","p":{"back":"Back","front":"Front","shortsleeve":"Short sleeve","longsleeve":"Long sleeve","bindingNeckBack":"Neck back binding","bindingNeckFront":"Neck front binding","bindingLeg":"Leg binding"},"s":{"bindingNeckBack.t":"The Back Neck Binding is not shown","bindingNeckBack.d":"The **Back Neck Binding** is a rectangular piece of fabric {{{ width }}} wide and {{{ length }}} long.","bindingNeckFront.t":"The Front Neck Binding is not shown","bindingNeckFront.d":"The **Front Neck Binding** is a rectangular piece of fabric {{{ width }}} wide and {{{ length }}} long.","bindingLeg.t":"The Leg Binding is not shown","bindingLeg.d":"The **Leg Binding** is a rectangular piece of fabric {{{ width }}} wide and {{{ length }}} long."},"o":{"binding":{"t":"Binding","d":"Binding determines the size of the binding for the neck and leg openings."},"ease":{"t":"Ease","d":"The ease is a percentage of the waist measurement. Default is 14%"},"hem":{"t":"Hem","d":"Hem determines the size of the hem on the sleeves."},"sleeveType":{"t":"Sleeve Type","d":"Otis can be made with short or long sleeves."},"sleeveType.long":{"t":"Long Sleeve","d":"Long sleeves, to the wrist."},"sleeveType.short":{"t":"Short Sleeve","d":"Short sleeves, to the biceps."},"snapPlacket":{"t":"Snap Placket","d":"This option controls the depth of the placket that holds the snaps. "}}}')},Uc={name:"otis.back",measurements:["waist"],options:{ease:{pct:14,min:0,max:30,...(0,n.Wx)("waist"),menu:"fit"},snapPlacket:{pct:5,min:0,max:30,...(0,n.Wx)("waist"),menu:"advanced"}},draft:({options:t,Point:e,Path:o,points:a,paths:i,Snippet:n,snippets:s,sa:r,measurements:l,store:c,macro:p,part:d})=>{const h=l.waist/4,m=l.waist/510,f=t.ease;return c.set("waist",h),c.set("ease",f),c.set("sizeFactor",m),a.p0=new e(0,0),a.p0Cp1=a.p0.shift(180,66.91517912470589*(f+1)*m),a.p1=a.p0.shift(149.4969649618097,114.87166082661528*(f+1)*m),a.p1Cp1=a.p1.shift(278.9548159482757,137.90010759149453*(f+1)*m),a.p1Cp2=a.p1.shift(336.4763168951959,68.61447469210127*(f+1)*m),a.p2=a.p0.shift(218.49950238029894,163.05015542953512*(f+1)*m),a.p2Cp2=a.p2.shift(2.0575442111337274,29.562919686247152*(f+1)*m),a.p3=a.p0.shift(246.77020008250858,323.5264286434397*(f+1)*m),a.p3Cp1=a.p3.shift(335.4445026359432,31.324216272472654*(f+1)*m),a.p3Cp1=a.p3.shift(0,15*(f+1)*m),a.p4=a.p0.shift(258.29473769456416,373.7460389711983*(f+1)*m),a.p4Cp1=a.p4.shift(294.805946128575,27.347838639268335*(f+1)*m),a.p4Cp2=a.p4.shift(114.81188629380082,38.21149693481505*(f+1)*m),a.p5=a.p0.shift(266.33816548102595,416.91257944059936*(f+1)*m),a.p5Cp2=a.p5.shift(180,34.60436510741867*(f+1)*m),a.p6=a.p5.shift(270,l.waist*t.snapPlacket*2),a.p7=new e(0,a.p6.y),c.set("sideseam",a.p2.dist(a.p3)),i.armhole=(new o).move(a.p1).curve(a.p1Cp1,a.p2Cp2,a.p2).hide(),c.set("armhole",.85*i.armhole.length()),a.shoulder=i.armhole.shiftFractionAlong(.15),a.snapPlacketOut=a.p5.shift(270,l.waist*t.snapPlacket),a.snapPlacketIn=new e(0,a.snapPlacketOut.y),i.seamSA=(new o).move(a.p0).curve(a.p0Cp1,a.p1Cp2,a.p1).curve(a.p1Cp1,a.p2Cp2,a.p2).line(a.p3).curve(a.p3Cp1,a.p4Cp2,a.p4).curve(a.p4Cp1,a.p5Cp2,a.p5).line(a.p5).line(a.p6).line(a.p7).hide(),i.seam=i.seamSA.clone().line(a.p0).close().unhide(),p("cutonfold",{from:new e(0,a.p5.y),to:a.p0}),c.set("BackNeckOpening",2*(new o).move(a.p0).curve(a.p0Cp1,a.p1Cp2,a.p1).length()),c.set("BackLegOpening",(new o).move(a.p3).curve(a.p3Cp1,a.p4Cp2,a.p4).curve(a.p4Cp1,a.p5Cp2,a.p5).length()),c.set("SnapPlacketWidth",a.p6.dist(a.p7)),c.cutlist.addCut({material:"fabric",cut:1}),a.logo=a.p0.shiftFractionTowards(a.p3,.5),s.logo=new n("logo",a.logo),p("title",{at:a.logo.shift(-90,h/1.7).shift(-180,h/4),nr:1,title:"back"}),i.snapPlacket=(new o).move(a.snapPlacketOut).line(a.snapPlacketIn).addClass("dashed"),a.snap=a.p6.shiftFractionTowards(a.p7,.333).shift(90,l.waist*t.snapPlacket/2),s.snap=new n("snap-stud",a.snap),r&&(i.sa=i.seamSA.offset(r).close().trim().attr("class","fabric sa")),s.shoulder=new n("notch",a.shoulder),p("hd",{from:a.p1,to:a.p0,y:a.p1.y-r-15}),p("hd",{from:a.p6,to:a.p7,y:a.p7.y+r+15}),p("vd",{from:a.p1,to:a.p0,x:a.p0.x+15}),p("vd",{from:a.p2,to:a.p1,x:a.p2.x-r-15}),p("vd",{from:a.p3,to:a.p2,x:a.p2.x-r-15}),p("vd",{from:a.p5,to:a.p3,x:a.p3.x-r-15}),p("vd",{from:a.snapPlacketOut,to:a.p5,x:a.p5.x-r-15}),p("vd",{from:a.p6,to:a.snapPlacketOut,x:a.p5.x-r-15}),p("vd",{from:a.p0,to:a.p7,x:a.p7.x+15}),d}},Yc={name:"otis.front",after:Uc,draft:({options:t,Point:e,Path:o,points:a,paths:i,Snippet:n,snippets:s,sa:r,measurements:l,store:c,macro:p,part:d})=>{const h=c.get("waist"),m=c.get("ease"),f=c.get("sizeFactor"),u=c.get("armhole"),g=c.get("SnapPlacketWidth");let b;a.p0=new e(0,0),a.p0Cp1=a.p0.shift(180,69.64248775236683*(m+1)*f),a.p1=a.p0.shift(137.39365873630706,132.32581976385896*(m+1)*f),a.p1Cp1=a.p1.shift(275.68130162148066,95.6099938788659*(m+1)*f),a.p1Cp2=a.p1.shift(334.5320444890682,74.98871362703433*(m+1)*f),a.p2=a.p0.shift(208.92817996505278,145.1854377221146*(m+1)*f),a.p2Cp2=a.p2.shift(356.8730716127121,43.74056201237602*(m+1)*f),a.p3=a.p0.shift(244.49016929788834,295.05507494424813*(m+1)*f),a.p3Cp1=a.p3.shift(0,18.248785709538428*(m+1)*f),a.p4=a.p0.shift(265.3666986326574,309.97788995830655*(m+1)*f),a.p4.x=a.p0.x-g,a.p5=a.p4.shift(270,l.waist*t.snapPlacket*2),a.p6=new e(0,a.p5.y);let w=1;do{i.armhole=(new o).move(a.p1).curve(a.p1Cp1,a.p2Cp2,a.p2).hide();
1b=.85*i.armhole.length()-u,(b<-1||b>1)&&(a.p1=a.p0.shift(137.39365873630706,132.32581976385896*(m+1)*f+b)),w++}while((b<-1||b>1)&&w<100);return a.shoulder=i.armhole.shiftFractionAlong(.15),a.snapPlacketOut=a.p4.shift(270,l.waist*t.snapPlacket),a.snapPlacketIn=new e(0,a.snapPlacketOut.y),i.seamSA=(new o).move(a.p0).curve(a.p0Cp1,a.p1Cp2,a.p1).curve(a.p1Cp1,a.p2Cp2,a.p2).line(a.p3).curve(a.p3Cp1,a.p4,a.p4).line(a.p5).line(a.p6).hide(),i.seam=i.seamSA.clone().line(a.p0).close().unhide(),c.set("FrontNeckOpening",2*(new o).move(a.p0).curve(a.p0Cp1,a.p1Cp2,a.p1).length()),c.set("FrontLegOpening",(new o).move(a.p3).curve(a.p3Cp1,a.p4,a.p4).length()),p("cutonfold",{from:new e(0,a.p4.y),to:a.p0}),c.cutlist.addCut({material:"fabric",cut:1}),a.logo=a.p0.shiftFractionTowards(a.p3,.5),s.logo=new n("logo",a.logo),p("title",{at:a.logo.shift(-90,h/1.7).shift(-180,h/4),nr:2,title:"front"}),i.snapPlacket=(new o).move(a.snapPlacketOut).line(a.snapPlacketIn).addClass("dashed"),a.snap=a.p5.shiftFractionTowards(a.p6,.333).shift(90,l.waist*t.snapPlacket/2),s.snap=new n("snap-socket",a.snap),r&&(i.sa=i.seamSA.offset(r).close().trim().attr("class","fabric sa")),s.shoulder=new n("notch",a.shoulder),p("hd",{from:a.p1,to:a.p0,y:a.p1.y-r-15}),p("hd",{from:a.p5,to:a.p6,y:a.p6.y+r+15}),p("vd",{from:a.p1,to:a.p0,x:a.p0.x+15}),p("vd",{from:a.p2,to:a.p1,x:a.p2.x-r-15}),p("vd",{from:a.p3,to:a.p2,x:a.p2.x-r-15}),p("vd",{from:a.p4,to:a.p3,x:a.p3.x-r-15}),p("vd",{from:a.snapPlacketOut,to:a.p4,x:a.p4.x-r-15}),p("vd",{from:a.p5,to:a.snapPlacketOut,x:a.p5.x-r-15}),p("vd",{from:a.p0,to:a.p6,x:a.p6.x+15}),d}},$c={name:"otis.shortsleeve",after:Uc,options:{sleeveType:{dflt:"short",list:["short","long"],menu:"style"},hem:{pct:10,min:0,max:30,toAbs:(t,{options:e,measurements:o},a)=>t*o.waist*(e.ease+1)*(o.waist/510)*.127273,menu:"advanced"}},draft:({options:t,Point:e,Path:o,points:a,paths:i,Snippet:n,snippets:s,sa:r,store:l,macro:c,utils:p,part:d})=>{const h=t.hem,m=l.get("waist"),f=l.get("ease"),u=l.get("sizeFactor"),g=l.get("armhole");let b;l.set("hem",117*(f+1)*u*h),a.p0=new e(0,0),a.p0Cp2=a.p0.shift(0,84.746*(f+1)*u),a.p1=a.p0.shift(270,117*(f+1)*u),a.p2=a.p1.shift(0,121*(f+1)*u),a.p3=a.p0.shift(331.965149,145.468319*(f+1)*u),a.p3Cp1=a.p3.shift(180,69.454559985*(f+1)*u);let w=1;do{i.armhole=(new o).move(a.p3).curve(a.p3Cp1,a.p0Cp2,a.p0).hide(),b=g-i.armhole.length(),(b<-1||b>1)&&(a.p3=a.p0.shift(331.965149,145.468319*(f+1)*u+b)),w++}while((b<-1||b>1)&&w<100);return a.p1hm=a.p1.shift(90,117*(f+1)*u*h),a.p2hm=p.beamIntersectsY(a.p2,a.p3,a.p1hm.y),a.p1h=a.p1hm.flipY(a.p1),a.p2h=a.p2hm.flipY(a.p2),i.seamSA=(new o).move(a.p1h).line(a.p2h).line(a.p2).line(a.p3).curve(a.p3Cp1,a.p0Cp2,a.p0).hide(),i.seam=i.seamSA.clone().line(a.p1).line(a.p0).close().unhide(),c("cutonfold",{from:a.p0,to:a.p1}),l.cutlist.addCut({material:"fabric",cut:2}),a.logo=a.p0.shiftFractionTowards(a.p2,.5),s.logo=new n("logo",a.logo).attr("data-scale",.5),c("title",{at:a.logo.shift(-90,m/3).shift(-180,m/4),nr:4,title:"shortSleeve",scale:.5}),i.hem=(new o).move(a.p1).line(a.p2).addClass("dashed"),r&&(i.sa=i.seamSA.offset(r).close().attr("class","fabric sa")),c("hd",{from:a.p0,to:a.p3,y:a.p0.y-r-15}),c("hd",{from:a.p2,to:a.p3,y:a.p3.y-r-15}),c("hd",{from:a.p1h,to:a.p2h,y:a.p2h.y+r+15}),c("vd",{from:a.p1h,to:a.p0,x:a.p1h.x-r-15}),c("vd",{from:a.p0,to:a.p3,x:a.p3.x+r+15}),c("vd",{from:a.p3,to:a.p2,x:a.p3.x+r+15}),c("vd",{from:a.p2,to:a.p2h,x:a.p3.x+r+15}),"short"!=t.sleeveType&&d.hide(),d}},zc={name:"otis.longsleeve",from:$c,draft:({options:t,Path:e,points:o,paths:a,Snippet:i,snippets:n,sa:s,store:r,macro:l,utils:c,part:p})=>{const d=r.get("waist"),h=r.get("ease"),m=r.get("sizeFactor"),f=r.get("hem");for(const u in a)a[u].hide();return a.short=a.seam.clone().attr("class","note dashed"),o.p1=o.p0.shift(270,293.7625802105263*(h+1)*m),o.p2=o.p0.shift(284.345521471841,303.21713769055657*(h+1)*m),o.p2Cp1=o.p0.shift(290.01156103077165,229.3425471399697*(h+1)*m),o.p3Cp2=o.p0.shift(303.17727589125565,174.25165593501407*(h+1)*m),o.p1hm=o.p1.shift(90,f),o.p2hm=c.curveIntersectsY(o.p2,o.p2Cp1,o.p3Cp2,o.p3,o.p1hm.y),o.p1h=o.p1hm.flipY(o.p1),o.p2h=o.p2hm.flipY(o.p2),a.seamSA=(new e).move(o.p1h).line(o.p2h).line(o.p2).curve(o.p2Cp1,o.p3Cp2,o.p3).curve(o.p3Cp1,o.p0Cp2,o.p0).hide(),a.seam=a.seamSA.clone().line(o.p1).line(o.p0).close().unhide(),l("cutonfold",{from:o.p0,to:o.p1}),o.logo=o.p0.shiftFractionTowards(o.p2,.5),n.logo=new i("logo",o.logo),l("title",{at:o.logo.shift(-90,d/1.7).shift(-180,d/7),nr:3,title:"longSleeve",scale:.75}),a.hem=(new e).move(o.p1).line(o.p2).addClass("dashed"),s&&(a.sa=a.seamSA.offset(s).close().attr("class","fabric sa")),l("hd",{from:o.p0,to:o.p3,y:o.p0.y-s-15}),l("hd",{from:o.p2,to:o.p3,y:o.p3.y-s-15}),l("hd",{from:o.p1h,to:o.p2h,y:o.p2h.y+s+15}),l("vd",{from:o.p1h,to:o.p0,x:o.p1h.x-s-15}),l("vd",{from:o.p0,to:o.p3,x:o.p3.x+s+15}),l("vd",{from:o.p3,to:o.p2,x:o.p3.x+s+15}),l("vd",{from:o.p2,to:o.p2h,x:o.p3.x+s+15}),"long"!=t.sleeveType&&p.hide(),p}},Jc={name:"otis.bindingLeg",after:[Uc,Yc,$c],options:{binding:{pct:11,min:2,max:30,toAbs:(t,{options:e,measurements:o},a)=>t*o.waist*((void 0===e||void 0===e.ease?0:e.ease)+1)*o.waist/510/4,menu:"advanced"}},draft:({Point:t,Path:e,points:o,paths:a,options:i,Snippet:n,snippets:s,sa:r,store:l,macro:c,expand:p,units:d,part:h})=>{const m=l.get("BackLegOpening"),f=l.get("FrontLegOpening"),u=l.get("waist")*(l.get("ease")+1)*l.get("sizeFactor")*i.binding;if(l.set("binding",u),!p){const t="bindingLeg";return l.flag.note({msg:t,notes:[r?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{width:d(2*u),length:d(m+f)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),l.flag.preset("expandIsOff"),h.hide()}return l.flag.preset("expandIsOn"),o.p0=new t(0,0),o.p1=new t(0,m+f),o.p2=new t(2*u,m+f),o.p3=new t(2*u,0),a.seam=(new e).move(o.p0).line(o.p1).line(o.p2).line(o.p3).line(o.p0).close(),a.foldLine=(new e).move(o.p0.shiftFractionTowards(o.p3,.5)).line(o.p2.shiftFractionTowards(o.p1,.5)).addClass("dashed"),l.cutlist.addCut({material:"fabric",cut:2}),o.logo=o.p0.shiftFractionTowards(o.p2,.5),s.logo=new n("logo",o.logo).attr("data-scale",.25),s.middle=new n("notch",o.p2.shiftTowards(o.p3,f)),c("title",{at:o.logo.shift(-115,15),nr:7,title:"bindingLeg",scale:.2}),r&&(a.sa=a.seam.offset(r).close().attr("class","fabric sa")),c("hd",{from:o.p0,to:o.p3,y:o.p0.y-r-15}),c("vd",{from:o.p2,to:o.p3,x:o.p3.x+r+15}),h}},Kc={name:"otis.bindingNeckBack",after:[Jc],draft:({Point:t,Path:e,points:o,paths:a,Snippet:i,snippets:n,sa:s,store:r,macro:l,expand:c,units:p,part:d})=>{const h=r.get("BackNeckOpening"),m=r.get("binding");if(!c){const t="bindingNeckBack";return r.flag.note({msg:t,notes:[s?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{width:p(2*m),length:p(h)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),r.flag.preset("expandIsOff"),d.hide()}return r.flag.preset("expandIsOn"),o.p0=new t(0,0),o.p1=new t(0,h),o.p2=new t(2*m,h),o.p3=new t(2*m,0),a.seam=(new e).move(o.p0).line(o.p1).line(o.p2).line(o.p3).line(o.p0).close(),a.foldLine=(new e).move(o.p0.shiftFractionTowards(o.p3,.5)).line(o.p2.shiftFractionTowards(o.p1,.5)).addClass("dashed"),r.cutlist.addCut({material:"fabric",cut:1}),o.logo=o.p0.shiftFractionTowards(o.p2,.5),n.logo=new i("logo",o.logo).attr("data-scale",.25),n.middle=new i("notch",o.p2.shiftFractionTowards(o.p3,.5)),l("title",{at:o.logo.shift(-115,15),nr:5,title:"bindingNeckBack",
1scale:.2}),s&&(a.sa=a.seam.offset(s).close().attr("class","fabric sa")),l("hd",{from:o.p0,to:o.p3,y:o.p0.y-s-15}),l("vd",{from:o.p2,to:o.p3,x:o.p3.x+s+15}),d}},Vc={name:"otis.bindingNeckFront",after:[Jc],draft:({Point:t,Path:e,points:o,paths:a,Snippet:i,snippets:n,sa:s,store:r,macro:l,expand:c,units:p,part:d})=>{const h=r.get("FrontNeckOpening"),m=r.get("binding");if(!c){const t="bindingNeckFront";return r.flag.note({msg:t,notes:[s?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{width:p(2*m),length:p(h)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),r.flag.preset("expandIsOff"),d.hide()}return r.flag.preset("expandIsOn"),o.p0=new t(0,0),o.p1=new t(0,h),o.p2=new t(2*m,h),o.p3=new t(2*m,0),a.seam=(new e).move(o.p0).line(o.p1).line(o.p2).line(o.p3).line(o.p0).close(),a.foldLine=(new e).move(o.p0.shiftFractionTowards(o.p3,.5)).line(o.p2.shiftFractionTowards(o.p1,.5)).addClass("dashed"),r.cutlist.addCut({material:"fabric",cut:1}),o.logo=o.p0.shiftFractionTowards(o.p2,.5),n.logo=new i("logo",o.logo).attr("data-scale",.25),n.middle=new i("notch",o.p2.shiftFractionTowards(o.p3,.5)),l("title",{at:o.logo.shift(-115,15),nr:6,title:"bindingNeckFront",scale:.2}),s&&(a.sa=a.seam.offset(s).close().attr("class","fabric sa")),l("hd",{from:o.p0,to:o.p3,y:o.p0.y-s-15}),l("vd",{from:o.p2,to:o.p3,x:o.p3.x+s+15}),d}},Xc=new n.pT({data:jc,parts:[Uc,Yc,$c,zc,Kc,Vc,Jc]}),Qc=JSON.parse('{"id":"penelope","name":"Penelope pencil skirt","code":"Wouter Van Wageningen","description":"A FreeSewing pattern for a pencil skirt","design":"Wouter Van Wageningen","difficulty":3,"tags":["bottoms","skirts"],"techniques":["hem","curved-seam","precision","zipper"],"version":"4.6.0","pkg":"@freesewing/penelope","collection":true}'),qc={en:JSON.parse('{"t":"Penelope pencil skirt","d":"Penelope is a pencil skirt with or without a vent in the back.","p":{"back":"Back","front":"Front","waistband":"Waistband"},"s":{},"o":{"backDartDepthFactor":{"t":"Back dart depth factor","d":"How far down does the back dart go from the waistband. This is a factor of the Natural Waist To Seat measurement."},"backVent":{"t":"Back vent","d":"Add a vent in the back of the skirt."},"backVentNo":{"t":"No vent in the back","d":"This will be the challenging way to walk."},"backVentYes":{"t":"A vent in the back","d":"Making it easier to walk."},"backVentLength":{"t":"Back vent length","d":"Length of the Back Vent as a percentage of the skirt length."},"curvedDarts":{"t":"Curved darts","d":"Whether or not to used curved darts."},"curvedDartsNo":{"t":"Straight darts","d":"The darts will be straight, for the standard look."},"curvedDartsYes":{"t":"Curved darts","d":"The darts will be curved, making the shape in the back and front more round."},"dartToSideSeamFactor":{"t":"Dart to side seam factor","d":"Percentage of how much of the hip to waist reduction has to be taken in by the darts versus the side seam."},"frontDartDepthFactor":{"t":"Front dart depth factor","d":"How far down does the front dart go from the waistband. This is a factor of the Natural Waist To Seat measurement."},"hem":{"t":"Size of the hem","d":"The size of the hem. Measurement in absolute values."},"hemBonus":{"t":"Hem bonus","d":"This option will reduce the circumference of the skirt at the hem. Percentage of the Seat measurement."},"lengthBonus":{"t":"Length bonus","d":"This sets the length of the skirt. Percentage of the Natural Waist to Knee measurement."},"nrOfDarts":{"t":"Number of darts","d":"The number of darts used in the pattern. Maximum is 2. This option can be reduced by the pattern if the calculations create darts that are too small."},"seatEase":{"t":"Seat ease","d":"Amount of ease at the seat level."},"waistband":{"t":"Waistband","d":"Add a waistband to the pattern."},"waistbandNo":{"t":"No waistband","d":"Just the skirt, nothing else."},"waistbandYes":{"t":"Skirt with a waistband","d":"Add a waistband."},"waistbandOverlap":{"t":"Waistband overlap","d":"How much the waistband should overlap at the front."},"waistbandWidth":{"t":"Waistband width","d":"The width of the waistband."},"waistEase":{"t":"Waist ease","d":"Amount of ease at the waist level."},"zipperLocation":{"t":"Zipper location","d":"The location of the zipper."},"zipperLocation.backSeam":{"t":"Add the zipper to the back seam","d":"Good option with the back vent."},"zipperLocation.sideSeam":{"t":"Add the zipper to the side seam","d":"Allows you to cut the back on fold, removing the seam from the back."}}}')};function Zc(t,e,o,a){return(o*t.dartMinimumWidth+(Math.max(Math.min(e,o*t.dartMaximumDifference),o*t.dartMinimumDifference)-o*t.dartMinimumDifference)/4)/a*(.5+t.dartToSideSeamFactor)}function tp(t,e,o,a){return(o*t.dartMinimumWidth+(e-o*t.dartBackControl1-(e-o*t.dartBackControl1)/t.dartBackControl2)/t.dartBackControl3)/a*(.5+t.dartToSideSeamFactor)}function ep(t,e,o,a,i){const{options:n}=t.shorthand();if(a>e.length())return null;o<a/1.9&&(o=a/2.1),e.length()-o<a&&(o=e.length()-a/1.95);const s=e.shiftAlong(o),r=e.split(s);if(r[0].length()<a/2||r[1].length()<a/2)return null;const l=r[0].reverse().shiftAlong(a/2),c=r[1].shiftAlong(a/2),p=.0015,d=Math.min(r[0].length()*p,r[0].ops[1].to.dist(r[0].ops[1].cp2)),h=Math.min(r[1].length()*p,r[1].ops[0].to.dist(r[1].ops[1].cp1)),m=s.shift(l.angle(c)-90,i),f=l.shift(l.angle(m)-90,d),u=c.shift(c.angle(m)+90,h),g=(new t.Path).move(r[0].ops[0].to).curve(r[0].ops[1].cp1,f,l).hide(),b=(new t.Path).move(c).curve(u,r[1].ops[1].cp2,r[1].ops[1].to).hide();let w=null;
1if(n.curvedDarts)if(m.angle(l)-m.angle(c)<2*n.curvedDartControlAngle)w=(new t.Path).move(l).line(m).line(c).hide();else{const e=m.shiftFractionTowards(s,n.curvedDartBottomControlOffset).rotate(n.curvedDartControlAngle,m),o=m.shiftFractionTowards(s,n.curvedDartBottomControlOffset).rotate(360-n.curvedDartControlAngle,m),a=l.shiftFractionTowards(m,n.curvedDartTopControlOffset),i=c.shiftFractionTowards(m,n.curvedDartTopControlOffset);w=(new t.Path).move(l).curve(a,e,m).curve(o,i,c).hide()}else w=(new t.Path).move(l).line(m).line(c).hide();return{left:g,dart:w,right:b}}const op=["waist","seat","waistToHips","waistToSeat","waistToKnee"],ap=["waistBack","seatBack"],ip={dartMaximumDifference:.344,dartMinimumDifference:.2,dartMinimumWidth:.006888,dartSideMinimum:10,dartBackControl1:.114,dartBackControl2:5,dartBackControl3:4,curvePlacement:2.4,dart2offset:32,dart2factor:.8,hipCurveDividerDown:40,hipCurveDividerUp:3,sideSeamShiftPercentage:.006,backVentWidth:.1,paperlessOffset:15,curvedDartControlAngle:2,curvedDartTopControlOffset:.2,curvedDartBottomControlOffset:.4,curvedDarts:{bool:!0,menu:"style"},lengthBonus:{pct:0,min:-50,max:50,...(0,n.Wx)("waistToKnee"),menu:"style"},hemBonus:{pct:0,min:-35,max:0,...(0,n.Wx)("seat"),menu:"style"},hem:{pct:2,min:0,max:5,...(0,n.Wx)("waistToKnee"),menu:"style"},backVent:{bool:!0,menu:"style"},backVentLength:{pct:40,min:5,max:70,toAbs:(t,{measurements:e,options:o},a)=>t*(e.waistToKnee*(1+a.lengthBonus)),menu:(t,e)=>!1!==t?.options?.backVent&&"style"},zipperLocation:{dflt:"backSeam",list:["backSeam","sideSeam"],menu:"style"},nrOfDarts:{count:2,min:1,max:2,menu:"style"},seatEase:{pct:1,min:0,max:8,...(0,n.Wx)("seat"),menu:"fit"},waistEase:{pct:1,min:0,max:8,...(0,n.Wx)("waist"),menu:"fit"},backDartDepthFactor:{pct:50,min:35,max:70,...(0,n.Wx)("waistToSeat"),menu:"advanced"},frontDartDepthFactor:{pct:45,min:30,max:65,...(0,n.Wx)("waistToSeat"),menu:"advanced"},dartToSideSeamFactor:{pct:50,min:30,max:70,menu:"advanced"}};function np({sa:t,options:e,measurements:o,Point:a,Path:i,points:n,paths:s,store:r,macro:l,part:c,log:p},d){const h=o.waistToKnee*(1+e.lengthBonus);r.set("skirtLength",h),r.set("waistEase",o.waist*e.waistEase),r.set("seatEase",o.seat*e.seatEase),r.set("hem",o.waistToKnee*e.hem);const m=d?e.frontDartDepthFactor:e.backDartDepthFactor;let f=o.waist,u=o.seat>f?o.seat:f;!function(t,e,o,a,i,n){o+=a,i+=n;const s=Math.max(o-i,0);let r=e.nrOfDarts,l=Zc(e,s,i,r);l<=e.dartMinimumWidth*r&&r>1&&(r--,l=Zc(e,s,i,r)),s/4-l<e.dartSideMinimum&&(l=0);let c=tp(e,s,i,r);c<e.dartMinimumWidth*r&&r>1&&(r=1,l=Zc(e,s,i,r),c=tp(e,s,i,r)),t.set("frontDartSize",l),t.set("backDartSize",c),t.set("nrOfDarts",r)}(r,e,u,r.get("seatEase"),f,r.get("waistEase"));let g=r.get("nrOfDarts"),b=r.get("frontDartSize");0==d&&(b=r.get("backDartSize")),b<=0&&(g=0),r.set("nrOfDarts",g),r.set("dartSize",b),"seatBack"in o?u=2*(d?u-o.seatBack:o.seatBack):u*=1+(d?-1:1)*e.sideSeamShiftPercentage,"waistBack"in o?f=2*(d?f-o.waistBack:o.waistBack):f*=1+(d?-1:1)*e.sideSeamShiftPercentage,f>u&&(u=f),u+=r.get("seatEase"),f+=r.get("waistEase");const w=u/4;n.lWaist=new a(0,0),n.lLeg=new a(0,h),n.rWaistOriginal=new a(w,0),n.rLeg=new a(w+e.hemBonus*u/10,h),n.lSeat=new a(0,o.waistToSeat),n.rSeat=new a(w,o.waistToSeat),n.rWaistCPdown=new a(w,o.waistToSeat/3),n.rSeatCPup=new a(w,o.waistToSeat/3*2),n.rSeatCPdown=n.rSeat.shift(270,(o.waistToSeat-o.waistToHips)*Math.abs(e.hemBonus*u/10)/e.hipCurveDividerDown);let k=.99,C=.97,v=1,y=1,T=1,x=null,B=null,S=null,L=0,P=null,R=0,F=null,E=null;do{if(v<-1?k*=.98:v>1&&(k*=1.02),y<-1?C*=.97:y>1&&(C*=1.03),n.rWaistTemp1=n.lWaist.shift(0,f/4*k),n.rWaistTemp2=n.rWaistTemp1.shift(0,b*g),n.rWaist=n.rWaistTemp2.shift(90,.0615*o.waistToSeat*C),n.lWaistCP=n.lWaist.shift(0,u/12),n.rWaistCPleft=n.rWaist.shift(n.rWaist.angle(n.rWaistCPdown)-90,f/16),x=(new i).move(n.lWaist).curve(n.lWaistCP,n.rWaistCPleft,n.rWaist).hide(),g>0){if(F=ep(c,x,u/4/e.curvePlacement,b,o.waistToSeat*m),F){if(L=F.left.length(),n.dart1Start=F.dart.start(),n.dart1Middle=F.dart.ops[1].to,n.dart1End=F.dart.end(),g>1){let t=o.waist/35;t<b/1.8&&(t=b/1.8),E=ep(c,F.right,t,b,o.waistToSeat*m*e.dart2factor),E?(L+=E.left.length(),L+=E.right.length(),B=F.left.clone().join(F.dart).join(E.left).join(E.dart).join(E.right),S=F.left.clone().line(E.left.start()).join(E.left).line(E.right.start()).join(E.right),n.dart2Start=E.dart.start(),n.dart2Middle=E.dart.ops[1].to,n.dart2End=E.dart.end()):g--}1==g&&(L+=F.right.length(),B=F.left.clone().join(F.dart).join(F.right),S=F.left.clone().join(F.right))}else g--}0==g&&(L=x.length(),B=x,S=x.clone()),P=(new i).move(n.rLeg).curve(n.rLeg,n.rSeatCPdown,n.rSeat).curve(n.rSeatCPup,n.rWaistCPdown,n.rWaist),v=f/4-L,d?y=0:(R=P.length(),y=r.get("sideSeamLength")-R)}while((Math.abs(v)>1||Math.abs(y)>1)&&T++<100);if(s.waist1=x.translate(0,10).attr("class","lining dashed"),T>=100&&p.error("Too many iterations trying to make it fit!"),d&&(
1R=P.length(),r.set("sideSeamLength",R)),n.lHem=n.lLeg,n.rHem=n.rLeg,s.hem=(new i).move(n.lLeg).line(n.rLeg).attr("class","fabric stroke-sm").hide(),r.get("hem")>0){n.lHem=n.lLeg.shift(270,r.get("hem"));const t=n.rSeat.shift(270,2*(n.rLeg.y-n.rSeat.y)),e=t.shift(90,n.rSeatCPdown.y-n.rSeat.y),o=(new i).move(t).curve(e,n.rLeg,n.rLeg);n.rHem=o.intersectsY(n.lHem.y)[0];P=o.split(n.rHem)[1].join(P),s.hem.unhide()}s.leftSide=(new i).move(n.lWaist).line(n.lHem).hide(),s.bottom=(new i).move(n.lHem).line(n.rHem).hide(),s.sideSeam=P.hide(),s.waist=B.reverse().hide(),s.waistSA=S.reverse().hide(),n.titleAnchor=new a(o.waist/6,o.waistToSeat),n.logoAnchor=n.titleAnchor.shift(270,75),n.gridAnchor=n.logoAnchor.clone(),n.grainlineTop=n.lWaist.shift(0,50).shift(270,50),n.grainlineBottom=n.lLeg.shift(0,50).shift(90,50),l("hd",{from:n.lSeat,to:n.rSeat,y:n.rSeat.y,id:"seatWidth"}),l("vd",{from:n.lWaist,to:n.rWaist,x:n.rWaist.x+e.paperlessOffset+t,id:"sideWaistHeight",noStartMarker:!0,noEndMarker:!0}),l("vd",{from:n.lWaist,to:n.lLeg,x:n.lLeg.x+e.paperlessOffset+t,id:"heightToHem"}),r.get("hem")>0&&l("vd",{from:n.lLeg,to:n.lHem,x:n.lLeg.x+e.paperlessOffset+t,id:"heightHem",noStartMarker:!0,noEndMarker:!0}),r.get("nrOfDarts")>0?(l("hd",{from:n.lWaist,to:n.dart1Middle,y:n.dart1Middle.y,id:"dart1Middle"}),l("hd",{from:n.lWaist,to:n.dart1Start,y:n.dart1Start.y-e.paperlessOffset-t,id:"middleToDart1"}),l("hd",{from:n.dart1Start,to:n.dart1End,y:n.dart1End.y-e.paperlessOffset-t,id:"widthDart1",noStartMarker:!0,noEndMarker:!0}),r.get("nrOfDarts")>1?(l("hd",{from:n.lWaist,to:n.dart2Middle,y:n.dart2Middle.y,id:"middleToDart2"}),l("hd",{from:n.dart1End,to:n.dart2Start,y:n.dart2Start.y-e.paperlessOffset-t,id:"dart1toDart2",noStartMarker:!0,noEndMarker:!0}),l("hd",{from:n.dart2Start,to:n.dart2End,y:n.dart2End.y-e.paperlessOffset-t,id:"widthDart2",noStartMarker:!0,noEndMarker:!0}),l("hd",{from:n.dart2End,to:n.rWaist,y:n.rWaist.y-e.paperlessOffset-t,id:"dart2toSide"}),l("vd",{from:n.lWaist,to:n.dart2Middle,x:n.lWaist.x-e.paperlessOffset-t,id:"heightDart2"}),l("vd",{from:n.dart2Middle,to:n.dart1Middle,x:n.lWaist.x-e.paperlessOffset-t,id:"heightDart1toDart2",noStartMarker:!0,noEndMarker:!0}),l("vd",{from:n.dart1Middle,to:n.lSeat,x:n.lWaist.x-e.paperlessOffset-t,id:"dart1ToSeat"})):(l("vd",{from:n.lWaist,to:n.dart1Middle,x:n.lWaist.x-e.paperlessOffset-t,id:"heightDart1"}),l("hd",{from:n.dart1End,to:n.rWaist,y:n.rWaist.y-e.paperlessOffset-t,id:"dart1toSide"}),l("vd",{from:n.dart1Middle,to:n.lSeat,x:n.lWaist.x-e.paperlessOffset-t,id:"dart1toSeat"}))):(l("hd",{from:n.lWaist,to:n.rWaist,y:n.rWaist.y-e.paperlessOffset-t,id:"waistWidth"}),l("vd",{from:n.lWaist,to:n.lSeat,x:n.lWaist.x-e.paperlessOffset-t,id:"waistToSeat"}))}const sp={name:"penelope.back",measurements:op,optionalMeasurements:ap,options:ip,draft:t=>{const{options:e,measurements:o,Path:a,points:i,paths:n,Snippet:s,snippets:r,store:l,sa:c,macro:p,part:d}=t;if(np(t,!1),1==e.backVent){const t=Math.min(l.get("skirtLength")-o.waistToHips,e.backVentLength*l.get("skirtLength"));i.vLeg=i.rLeg.shiftFractionTowards(i.lLeg,1+e.backVentWidth),i.vHem=i.rHem.shiftFractionTowards(i.lHem,1+e.backVentWidth),i.vTop=i.vLeg.shift(90,t),i.lVent=i.vTop.shift(0,i.lLeg.dx(i.rLeg)*e.backVentWidth).shift(90,i.lLeg.dx(i.rLeg)*e.backVentWidth),n.vent=(new a).move(i.lVent).line(i.vTop).line(i.vLeg).line(i.vHem).hide(),n.leftSide=(new a).move(i.lWaist).line(i.lVent).join(n.vent).hide(),n.hem=n.hem.line(i.vLeg)}return n.seam=n.leftSide.clone().join(n.bottom).join(n.sideSeam).join(n.waist).attr("class","fabric"),p("grainline",{from:i.grainlineTop,to:i.grainlineBottom}),r.logo=new s("logo",i.logoAnchor),l.cutlist.addCut({cut:0==e.backVent&&"backSeam"!=e.zipperLocation?1:2,from:"fabric"}),0==e.backVent&&"backSeam"!=e.zipperLocation&&p("cutonfold",{from:i.lWaist,to:i.lLeg,id:"back"}),p("title",{nr:2,at:i.titleAnchor,title:"back"}),c&&(e.backVent||"backSeam"==e.zipperLocation?n.sa=n.leftSide.clone().join(n.bottom).join(n.sideSeam).join(n.waistSA).line(i.lWaist).close().offset(c).attr("class","fabric sa"):n.sa=(new a).move(i.lHem).join(n.bottom.join(n.sideSeam).join(n.waistSA).offset(c)).line(i.lWaist).attr("class","fabric sa")),e.backVent?(p("hd",{from:i.vTop,to:i.lVent,y:i.vTop.y,id:"ventWidth",noStartMarker:!0,noEndMarker:!0}),p("vd",{from:i.lSeat,to:i.lVent,x:i.lWaist.x-e.paperlessOffset-c,id:"seatToVent"}),p("vd",{from:i.lVent,to:i.vTop,x:i.lVent.x,id:"ventDiagonalHeight",noStartMarker:!0,noEndMarker:!0}),p("hd",{from:i.vLeg,to:i.rLeg,y:i.rHem.y+c+e.paperlessOffset,id:"legWidth"}),p("hd",{from:i.vHem,to:i.rHem,y:i.rHem.y+c+2*e.paperlessOffset,id:"hemWidth"})):(p("hd",{from:i.lLeg,to:i.rLeg,y:i.rHem.y+c+e.paperlessOffset,id:"legWidth"}),p("hd",{from:i.lHem,to:i.rHem,y:i.rHem.y+c+2*e.paperlessOffset,id:"hemWidth"})),d}},rp={name:"penelope.front",measurements:op,optionalMeasurements:ap,options:ip,draft:t=>{const{options:e,Path:o,points:a,paths:i,Snippet:n,snippets:s,sa:r,macro:l,store:c,part:p}=t;return np(t,!0),i.seam=i.leftSide.clone().join(i.bottom).join(i.sideSeam).join(i.waist).attr("class","fabric"),l("cutonfold",{from:a.lWaist,to:a.lLeg,id:"front"}),l("title",{nr:1,at:a.titleAnchor,title:"front"}),l("grainline",{from:a.grainlineTop,to:a.grainlineBottom}),a.scaleBox=a.logoAnchor.shift(270,100),l("scalebox",{at:a.scaleBox}),s.logo=new n("logo",a.logoAnchor),c.cutlist.addCut({cut:1,from:"fabric"}),r&&(i.sa=(new o).move(a.lHem).join(i.bottom.join(i.sideSeam).join(i.waistSA).offset(r)).line(a.lWaist).attr("class","fabric sa")),l("hd",{from:a.lLeg,to:a.rLeg,y:a.rHem.y+r+e.paperlessOffset,id:"legWidth"}),l("hd",{from:a.lHem,to:a.rHem,y:a.rHem.y+r+2*e.paperlessOffset,id:"hemWidth"}),p}},{waistEase:lp}=ip,cp={name:"penelope.waistband",measurements:["waist","waistToKnee"],options:{waistEase:lp,waistband:{bool:!0,menu:"style"},waistbandWidth:{pct:10,min:5,max:20,...(0,n.Wx)("waistToKnee"),menu:(t,e)=>!1!==t?.options?.waistband&&"style"},waistbandOverlap:{pct:3.5,min:0,max:10,...(0,n.Wx)("waist"),menu:(t,e)=>!1!==t?.options?.waistband&&"style"}},draft:({options:t,measurements:e,Point:o,Path:a,points:i,paths:n,Snippet:s,snippets:r,sa:l,macro:c,store:p,expand:d,units:h,part:m})=>
1{if(!t.waistband)return m.hide();let f=e.waist;f+=e.waist*t.waistEase;const u=t.waistbandWidth*e.waistToKnee,g=f/2+e.waist*t.waistbandOverlap;return p.set("waistbandWidth",u),d?(i.TL=new o(0,0),i.BL=new o(0,f/2+t.waistbandOverlap),i.TR=new o(u,0),i.BR=new o(u,f/2+t.waistbandOverlap),i.titleAnchor=new o(u/2,f/6),i.logoAnchor=new o(u/2,f/3),i.gridAnchor=i.logoAnchor.clone(),n.outline=(new a).move(i.TL).line(i.BL).line(i.BR).line(i.TR).line(i.TL).close().attr("class","fabric"),c("cutonfold",{from:i.TR,to:i.TL,grainline:!0,reverse:!0}),r.logo=new s("logo",i.logoAnchor),p.cutlist.addCut({cut:1,from:"fabric"}),c("title",{nr:3,at:i.titleAnchor,title:"waistband",rotation:90,scale:.75}),l&&(n.sa=(new a).move(i.TL).join((new a).move(i.TL).line(i.BL).line(i.BR).line(i.TR).offset(l)).line(i.TR).attr("class","fabric sa")),c("vd",{from:i.TL,to:i.BL,x:i.TL.x+t.paperlessOffset,id:"height"}),c("hd",{from:i.BL,to:i.BR,y:i.BR.y-t.paperlessOffset,id:"width"}),m):(p.flag.note({msg:"penelope:cutWaistband",replace:{width:h(g),length:h(u)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),p.flag.preset("expand"),m.hide())}},pp=new n.pT({data:Qc,parts:[sp,rp,cp]}),dp={en:JSON.parse('{"t":"Percy puffy pants","d":"Percy is a pair of puffy shorts or bloomers.","p":{"front":"Front","back":"Back","cuff":"Cuff","waist_back":"Waist Back","waist_front":"Waist Front","waist_side":"Waist Side","pocket":"Pocket","pocket_facing":"Pocket Facing"},"s":{"cutCuff.t":"The cuff is not shown","cutCuff.d":"The **Cuffs** are two strips of fabric {{{ width }}} wide and {{{ length }}} long.","cutPocketFacing.t":"The pocket facing is not shown","cutPocketFacing.d":"The **Pocket Facing** (8) is not shown, but you can trace it from the Pocket (7) piece. Cut off the corner along the outline left from the green lining boundary, but remember your seam allowance."},"o":{"cuffWidth":{"t":"Cuff Width","d":"How wide to make the leg cuffs."},"pocketDepth":{"t":"Pocket Depth","d":"How far below the waist the pockets should end. Measure from your waist to where your fingertips fall on your side."},"pocketOpeningDepth":{"t":"Pocket Opening Depth","d":"How deep the pocket openings should be. They can\'t be shallower than the necessary front opening."},"pocketBottomCurve":{"t":"Pocket Bottom Curve","d":"Adjusts the curve of the bottom of the pocket opening"},"pocketCurveControl":{"t":"Pocket Curve Control","d":"Adjust the curve of the bottom of the pocket bag"},"pocketFacingUnderlap":{"t":"Pocket Facing Underlap","d":"How far the pockets, pocket facings, and waist side pieces extend under the front panel"},"frontPleat":{"t":"Front Pleat","d":"Whether to generate a pleat on the front panel."},"frontPleatYes":{"t":"Yes","d":"Generate a pleat on the front panel."},"frontPleatNo":{"t":"No","d":"Don\'t generate a pleat on the front panel."},"spread":{"t":"Spread","d":"Whether to slash and spread the body panels."},"spreadYes":{"t":"Yes","d":"Slash and spread the body panels."},"spreadNo":{"t":"No","d":"Don\'t slash and spread the body panels."},"frontPleatPosition":{"t":"Front Pleat Position","d":"Where to generate a pleat on the front panel."},"frontPleatWidth":{"t":"Front Pleat Width","d":"How big of a pleat to generate on the front panel."},"frontPleatDisplayLength":{"t":"Front Pleat Preview Length","d":"How far to draw the pleat preview lines. This doesn\'t affect shaping at all."},"lengthInseam":{"t":"Length at Inseam","d":"How long the inseam of the shorts should be. 100% = floor length, 40-50% = knee length."},"frontPanelPercentage":{"t":"Front Panel Width","d":"What proportion of the front of the pants should be taken up by the front panel."},"hemRatio":{"t":"Hem Ratio","d":"How far the bottom hem should be flared, relative to the same height on a basic Titan. This is very approximate. The flare won\'t go past 90 degrees total."},"slashIterations":{"t":"Slash Iterations","d":"How many cuts to make to spread the body panels. Turn this up if it looks jagged."}}}')};const hp=(t,e)=>!(!e?.spread&&void 0!==e?.spread)&&"style.spread",mp=(t,e)=>!(!e?.frontPleat&&void 0!==e?.frontPleat)&&"style.pleat",fp={from:Eo,name:"percy.front",hide:{from:!0},measurements:["inseam"],options:{lengthBonus:0,lengthInseam:{pct:25,min:5,max:100,menu:"style",...(0,n.Wx)("inseam")},slashIterations:{count:8,min:1,max:24,menu:hp},hemRatio:{pct:250,min:100,max:400,menu:hp},spread:{bool:!0,menu:"style.spread"},frontPleat:{bool:!0,menu:"style.pleat"},frontPleatPosition:{pct:50,min:10,max:90,menu:mp},frontPleatWidth:{pct:6.4,min:0,max:10,menu:mp,...(0,n.Wx)("waist")},frontPleatDisplayLength:{pct:8,min:1,max:20,menu:mp,...(0,n.Wx)("waist")},waistHeight:{pct:75,min:0,max:100,menu:"style"},waistbandWidth:{pct:10,min:4,max:20,...(0,n.Wx)("waistToFloor"),menu:"style.panel"},frontPanelPercentage:{pct:50,min:33,max:75,menu:"style.panel"},pocketOpeningDepth:{pct:11,min:5,max:25,menu:"style.panel"},pocketFacingUnderlap:{pct:50,min:25,max:80,menu:"style.panel.advanced"},pocketBottomCurve:{pct:30,min:10,max:75,menu:"style.panel.advanced"},seatEase:{pct:7,min:2,max:12,menu:"fit"}},draft:function({points:t,Point:e,paths:o,Path:a,options:i,complete:n,measurements:s,store:r,macro:l,utils:c,snippets:p,Snippet:d,sa:h,log:m,part:f}){o.outseam=(()=>{let e=t.styleWaistOut||t.waistOut;return i.fitKnee?t.waistOut.x<t.seatOut.x?(new a).move(e).curve(t.seatOut,t.kneeOutCp1,t.kneeOut).line(t.floorOut):(new a).move(e).line(t.seatOut).curve(t.seatOutCp2,t.kneeOutCp1,t.kneeOut).line(t.floorOut):t.waistOut.x<t.seatOut.x?(new a).move(e).curve(t.seatOut,t.kneeOutCp1,t.floorOut):(new a).move(e).line(t.seatOut).curve(t.seatOutCp2,t.kneeOutCp1,t.floorOut)})().setClass("lining").hide(),o.inseam=(i.fitKnee?(new a).move(t.floorIn).line(t.kneeIn).curve(t.kneeInCp2,t.forkCp1,t.fork):(new a).move(t.floorIn).curve(t.kneeInCp2,t.forkCp1,t.fork)).setClass("lining").hide(),o.crotchseam=(new a).move(t.fork).curve(t.crotchSeamCurveCp1,t.crotchSeamCurveCp2,t.crotchSeamCurveStart).line(t.styleWaistIn),t.inseamShiftUpwards=o.inseam.shiftFractionAlong(1-i.lengthInseam);const u=o.inseam.length()*i.lengthInseam,g=o.outseam.length()-o.inseam.length();t.outseamShiftUpwards=o.outseam.shiftAlong(u+g),o.shortHem=(new a).move(t.inseamShiftUpwards).line(t.outseamShiftUpwards).reverse().setClass("various").hide();const b=o.shortHem.length();r.set("original_hem_front",b),o.shortInseam=o.inseam.split(t.inseamShiftUpwards)[1],o.shortOutseam=o.outseam.split(t.outseamShiftUpwards)[0],o.waist=(new a).move(t.styleWaistIn).line(t.styleWaistOut).setClass("lining");const w=["styleWaistIn","styleWaistInNoAngle","crotchSeamCurveStart","cfSeat","cfWaist","crotchSeamCurveCp2","crotchSeamCurveMax","crotchSeamCurveCp1","fork","forkCp1","inseamShiftUpwards","waistIn"];if(i.spread){t.hemcenter=t.outseamShiftUpwards.shiftFractionTowards(t.inseamShiftUpwards,.5),t.waistcenter=t.styleWaistOut.shiftFractionTowards(t.styleWaistIn,.5);
1const e=t.hemcenter.dist(t.waistcenter),n=50*(b*i.hemRatio-b)/e,s=Math.min(n,90)/i.slashIterations;let r=[],l=[];for(let o=1;o<=i.slashIterations;o++)t["slashPointsHem"+o]=t.outseamShiftUpwards.shiftFractionTowards(t.inseamShiftUpwards,o/(Number(i.slashIterations)+1)),r.push(t["slashPointsHem"+o]),t["slashPointsWaist"+o]=t.styleWaistOut.shiftFractionTowards(t.styleWaistIn,o/(Number(i.slashIterations)+1)),l.push(t["slashPointsWaist"+o]);let c=r.slice();for(let a=0;a<i.slashIterations;a++){for(let e=a;e<i.slashIterations;e++)l[e]=t["slashPointsWaist"+e]=l[e].rotate(s,l[a]);for(let e=a;e<i.slashIterations;e++)r[e]=t["slashPointsHem"+e]=r[e].rotate(s,l[a]);for(let e=a+1;e<i.slashIterations;e++)c[e]=t["slashPointsInner"+e]=c[e].rotate(s,l[a]);o.shortInseam=o.shortInseam.rotate(s,l[a]),o.hint&&(o.hint=o.hint.rotate(s,l[a]).setClass("note help")),o.crotchseam=o.crotchseam.rotate(s,l[a]);for(let e of w)t[e]=t[e].rotate(s,l[a])}o.waist=(new a).move(t.styleWaistOut);for(let t in l)o.waist=o.waist.line(l[t]);o.waist=o.waist.line(t.styleWaistIn).reverse().hide(),o.shortHem=(new a).move(t.outseamShiftUpwards).setClass("various");for(let t=0;t<i.slashIterations;t++)o.shortHem=o.shortHem.line(c[t]).line(r[t]);o.shortHem=o.shortHem.line(t.inseamShiftUpwards);for(const a in o)o[a]=o[a].rotate(n/-2,t.styleWaistOut);o.inseam.hide(),o.outseam.hide(),o.hint&&o.hint.setClass("note help");for(const o in t)t[o]=t[o].rotate(n/-2,t.styleWaistOut)}const k=s.waist*(1+i.waistEase);m.info("The circumference of the garment at the waist is "+k);const C=s.seat*(1+i.seatEase);m.info("The circumference of the garment at the seat is "+C);const v=C-k;m.info("The garment is "+v+" mm wider at the seat than at the waist");const y=v/s.waistToSeat;m.info("The garment gets wider by "+y+" for every mm down from the waist");const T=s.seat-k;m.info("The body measurement at the seat is "+s.seat),m.info("The seat is "+s.waistToSeat+" down from the body waist"),m.info("This pattern needs "+T+" extra in the garment waist to fit the seat through");const x=T/y;m.info("The garment is "+T+" mm wider than the waist at a point "+
1x+" down from the waist"),m.info("The waistband is "+i.waistbandWidth*s.waistToFloor+" wide"),m.info("The front center point is below the body's waist by "+(i.waistbandWidth*s.waistToFloor+(1-i.waistHeight)*s.waistToHips));const B=Math.max(x-(i.waistbandWidth*s.waistToFloor+(1-i.waistHeight)*s.waistToHips),.1*s.waistToSeat);r.set("openingDepth",B),m.info("The opening needs to go down the front piece by "+B),t.pocketInnerEdge=o.waist.shiftFractionAlong(i.frontPanelPercentage),m.info("Waist front panel width is "+o.waist.length()*i.frontPanelPercentage*2),r.set("frontPanelWidth",o.waist.length()*i.frontPanelPercentage*2),t.pocketFacingEdge=o.waist.shiftFractionAlong(i.frontPanelPercentage*i.pocketFacingUnderlap),r.set("side_panel_width",o.waist.length()*(1-i.frontPanelPercentage)+(1-i.pocketFacingUnderlap)*o.waist.length()*i.frontPanelPercentage),r.set("frontPanelOverlap",t.pocketInnerEdge.dist(t.pocketFacingEdge)),r.set("front_waist_width",o.waist.length());const S=Math.max(s.waist*i.pocketOpeningDepth,B);if(t.pocketBottomEdge=o.outseam.shiftAlong(S),t.pocketBottomEdgeCp1=t.pocketBottomEdge.shift(t.styleWaistOut.angle(t.outseamShiftUpwards)+90,o.waist.length()*(1-i.frontPanelPercentage)*i.pocketBottomCurve),t.pocketInnerEdgeCp2=t.pocketInnerEdge.shift(t.styleWaistOut.angle(t.styleWaistIn)-90,o.waist.length()/4),o.pocketCutout=(new a).move(t.pocketBottomEdge).curve(t.pocketBottomEdgeCp1,t.pocketInnerEdgeCp2,t.pocketInnerEdge).reverse(),B<0?m.info("This garment does not need a front opening deeper than the waistband."):t.openingDepthDisplay=o.pocketCutout.shiftAlong(B),o.trimmedOutseam=o.shortOutseam.split(t.pocketBottomEdge)[1],o.shortOutseam.hide(),o.trimmedWaist=o.waist.split(t.pocketInnerEdge)[0].setClass("lining").hide(),o.waist.hide(),i.frontPleat){const e=o.trimmedWaist.length()*i.frontPleatPosition,n=e/o.waist.length();t.topPleatPoint=o.trimmedWaist.shiftAlong(e),t.bottomPleatPoint=o.shortHem.shiftFractionAlong(1-n);let l=0;l=i.spread?(o.trimmedWaist.angleAt(t.topPleatPoint)+o.shortHem.angleAt(t.bottomPleatPoint))/2-90:(o.trimmedWaist.angleAt(t.topPleatPoint)+o.shortHem.reverse().angleAt(t.bottomPleatPoint))/2+180,l<190&&l>170&&(l-=180);const c=s.waist*i.frontPleatWidth;m.info("Pleat offset by "+c+" mm at "+l+" degrees"),t.pleatShiftByAngle=t.topPleatPoint.shift(l,c);const p=t.pleatShiftByAngle.x-t.topPleatPoint.x,d=t.pleatShiftByAngle.y-t.topPleatPoint.y;for(let o of w)t[o]=t[o].translate(p,d);o.shortInseam=o.shortInseam.translate(p,d),o.hint&&(o.hint=o.hint.translate(p,d).setClass("note help")),o.crotchseam=o.crotchseam.translate(p,d),r.set("centerToPleat",o.trimmedWaist.split(t.topPleatPoint)[0].length()),o.trimmedWaist=o.trimmedWaist.split(t.topPleatPoint)[0].translate(p,d).join(o.trimmedWaist.split(t.topPleatPoint)[1]),o.shortHem=o.shortHem.split(t.bottomPleatPoint)[0].join(o.shortHem.split(t.bottomPleatPoint)[1].translate(p,d));const h=i.frontPleatDisplayLength*s.waist;m.info("Pleat marking length is "+h),t.pleatInnerBottom=t.topPleatPoint.shift(l-90,h),t.pleatOuterBottom=t.pleatShiftByAngle.shift(l-90,h),t.pleatCenterBottom=t.pleatInnerBottom.shiftFractionTowards(t.pleatOuterBottom,.5),t.pleatCenterTop=t.topPleatPoint.shiftFractionTowards(t.pleatShiftByAngle,.5),o.pleatInner=(new a).move(t.topPleatPoint).line(t.pleatInnerBottom).setClass("sa"),o.pleatOuter=(new a).move(t.pleatShiftByAngle).line(t.pleatOuterBottom).setClass("sa"),o.pleatCenter=(new a).move(t.pleatCenterTop).line(t.pleatCenterBottom).setClass("sa")}o.seam=o.trimmedOutseam.join(o.shortHem).join(o.shortInseam).curve(t.crotchSeamCurveCp1,t.crotchSeamCurveCp2,t.crotchSeamCurveStart).join(o.trimmedWaist).join(o.pocketCutout).close(),h&&(o.saBase=o.seam,o.sa=o.saBase.offset(h).setClass("sa")),o.hemBase&&delete o.hemBase,t.titleAnchor=t.styleWaistIn.shiftFractionTowards(t.outseamShiftUpwards,.6),l("title",{nr:2,title:"front",at:t.titleAnchor}),l("rmVd","hHemToSideWaist"),l("rmVd","hHemToFork"),l("rmVd","hForkToCfWaist"),l("rmVd","hStartCrotchCurveToCfWaist"),l("rmHd","wHem"),l("rmHd","wHemLeftToPleat"),l("rmHd","wHemRightToPleat"),l("rmHd","wSideWaistToPleat"),l("rmHd","wPleatToCfWaist"),l("rmHd","wPleastToFork"),l("rmHd","wPleastToCrotchProjection"),l("rmHd","hForkToCfWaist"),l("rmHd","wPleastToStartCrotchCurve"),l("rmGrainline","grainline"),t.grainlineBottom=o.shortHem.shiftFractionAlong(.5),t.grainlineTop=new e(t.grainlineBottom.x,o.waist.shiftFractionAlong(.5).y),l("grainline",{from:t.grainlineTop,to:t.grainlineBottom}),t.hemLowestPoint=o.shortHem.shiftFractionAlong(.5);let L=0,P=o.shortHem.intersectsY(t.hemLowestPoint.y+1);for(;P.length>0&&L<s.waistToFloor;)m.info("Hem intersects "+P.length+" times at y "+t.hemLowestPoint.y),t.hemLowestPoint=P[0],L+=1,P=o.shortHem.intersectsY(t.hemLowestPoint.y+1);for(t.waistLowestPoint=o.trimmedWaist.shiftFractionAlong(.5),L=0,P=o.waist.intersectsY(t.waistLowestPoint.y+2);P.length>0&&L<s.waistToSeat;)m.info("Waist intersects "+P.length+" times at y "+t.waistLowestPoint.y),t.waistLowestPoint=P[0],L+=1,P=o.waist.intersectsY(t.waistLowestPoint.y+1);return l("pd",{id:"lengthHem",path:o.shortHem,d:-15}),l("hd",{id:"wHem",to:t.inseamShiftUpwards,from:t.outseamShiftUpwards,y:t.hemLowestPoint.y+30+h}),l("hd",{id:"wHemLeft",to:t.inseamShiftUpwards,from:t.hemLowestPoint,y:t.hemLowestPoint.y+15+h}),l("hd",{id:"wHemRight",to:t.hemLowestPoint,from:t.outseamShiftUpwards,y:t.hemLowestPoint.y+15+h}),l("vd",{id:"floorToOutseam",from:t.hemLowestPoint,to:t.outseamShiftUpwards,x:t.outseamShiftUpwards.x-15-h}),l("vd",{id:"floorToInseam",from:t.hemLowestPoint,to:t.inseamShiftUpwards,x:t.inseamShiftUpwards.x+15+h}
1),l("pd",{path:o.trimmedOutseam.reverse(),d:-15-h}),l("vd",{id:"vWaistToInseam",from:t.pocketBottomEdge,to:t.outseamShiftUpwards,x:t.outseamShiftUpwards.x-15-h}),l("hd",{id:"hWaistToInseam",to:t.pocketBottomEdge,from:t.outseamShiftUpwards,y:t.pocketBottomEdge.y}),l("vd",{id:"heightWaistOut",from:t.pocketBottomEdge,to:t.hemLowestPoint,x:t.pocketBottomEdge.x}),l("vd",{id:"heightPocketInner",from:t.pocketInnerEdge,to:t.hemLowestPoint,x:t.pocketInnerEdge.x}),l("vd",{id:"heightWaistIn",from:t.styleWaistIn,to:t.hemLowestPoint,x:t.styleWaistIn.x}),l("vd",{id:"heightWaistLowest",from:t.waistLowestPoint,to:t.hemLowestPoint,x:t.waistLowestPoint.x}),l("pd",{id:"lengthWaist",path:o.trimmedWaist.reverse(),d:-15-h}),l("hd",{id:"waistLowestLeft",from:t.pocketInnerEdge,to:t.waistLowestPoint,y:t.waistLowestPoint.y+15}),l("hd",{id:"waistLowestRight",from:t.waistLowestPoint,to:t.styleWaistIn,y:t.waistLowestPoint.y+15}),l("pd",{id:"lengthPocket",path:o.pocketCutout,d:-15-h}),l("vd",{id:"vPocket",to:t.pocketInnerEdge,from:t.pocketBottomEdge,x:t.pocketBottomEdge.x}),l("hd",{id:"hPocket",to:t.pocketInnerEdge,from:t.pocketBottomEdge,y:t.pocketInnerEdge.y}),l("vd",{id:"vInseam",from:t.inseamShiftUpwards,to:t.fork,x:t.inseamShiftUpwards.x+h+15}),l("hd",{id:"hInseam",to:t.inseamShiftUpwards,from:t.fork,y:t.fork.y-h-15}),l("pd",{id:"lengthInseam",path:o.shortInseam,d:-15-h}),l("pd",{id:"lengthCrossSeam",path:o.crotchseam.reverse(),d:-15-h}),l("hd",{id:"hCrossSeam",from:t.styleWaistIn,to:t.fork,y:t.styleWaistIn.y-h-15}),l("vd",{id:"vCrossSeam",to:t.styleWaistIn,from:t.fork,x:t.fork.x}),l("hd",{id:"hWaist",to:t.styleWaistIn,from:t.pocketInnerEdge,y:t.styleWaistIn.y-h-15}),i.frontPleat&&(l("ld",{id:"pleatWidth",from:t.topPleatPoint,to:t.pleatShiftByAngle,d:7}),l("ld",{id:"pleatFromCenter",from:t.pleatShiftByAngle,to:t.styleWaistIn,d:7})),f}};const up={from:Fo,name:"percy.back",hide:{from:!0},options:{},draft:function({points:t,Point:e,paths:o,Path:a,options:i,complete:n,measurements:s,store:r,macro:l,utils:c,snippets:p,Snippet:d,sa:h,log:m,part:f}){delete o.hint,o.outseam=(()=>{let e=t.styleWaistOut||t.waistOut;return i.fitKnee?t.waistOut.x>t.seatOut.x?(new a).move(t.floorOut).line(t.kneeOut).curve(t.kneeOutCp2,t.seatOut,e):(new a).move(t.floorOut).line(t.kneeOut).curve(t.kneeOutCp2,t.seatOutCp1,t.seatOut).curve_(t.seatOutCp2,e):t.waistOut.x>t.seatOut.x?(new a).move(t.floorOut).curve(t.kneeOutCp2,t.seatOut,e):(new a).move(t.floorOut).curve(t.kneeOutCp2,t.seatOutCp1,t.seatOut).curve_(t.seatOutCp2,e)})().setClass("lining").hide(),o.inseam=(i.fitKnee?(new a).move(t.fork).curve(t.forkCp2,t.kneeInCp1,t.kneeIn).line(t.floorIn):(new a).move(t.fork).curve(t.forkCp2,t.kneeInCp1,t.floorIn)).setClass("lining").hide(),t.inseamShiftUpwards=o.inseam.shiftFractionAlong(i.lengthInseam);const u=o.inseam.length()*(1-i.lengthInseam);t.outseamShiftUpwards=o.outseam.shiftAlong(u+0),o.shortHem=(new a).move(t.inseamShiftUpwards).line(t.outseamShiftUpwards);const g=o.shortHem.length();if(r.set("original_hem_back",g),o.newInseam=o.inseam.split(t.inseamShiftUpwards)[0],o.newOutseam=o.outseam.split(t.outseamShiftUpwards)[1],o.crossSeam=(new a).move(t.styleWaistIn).line(t.crossSeamCurveStart).curve(t.crossSeamCurveCp1,t.crossSeamCurveCp2,t.fork),o.waist=(new a).move(t.styleWaistIn).line(t.styleWaistOut),i.spread){const e=Math.floor(2*i.slashIterations);t.hemCenter=t.outseamShiftUpwards.shiftFractionTowards(t.inseamShiftUpwards,.5),t.waistcenter=t.styleWaistOut.shiftFractionTowards(t.styleWaistIn,.5),t.crossSeamCenter=o.crossSeam.shiftFractionAlong(.5),t.topCenter=t.waistcenter.shiftFractionTowards(t.crossSeamCenter,.5);const n=t.hemCenter.dist(t.topCenter),s=50*(g*i.hemRatio-g)/n,r=Math.min(s,90)/e;t.crossSeamDrop=o.shortHem.intersectsX(t.styleWaistInNoAngle.x)[0];const l=t.inseamShiftUpwards.dist(t.crossSeamDrop)/o.shortHem.length(),c=Math.floor(e*l),p=e-c;let d=[],h=[];for(let a=1;a<=c;a++)t["slashPointsWaist"+a]=o.crossSeam.reverse().shiftFractionAlong(a/c),h.push(t["slashPointsWaist"+a]);for(let a=c+1;a<=e;a++)t["slashPointsWaist"+a]=o.waist.shiftFractionAlong((a-c)/p),h.push(t["slashPointsWaist"+a]);for(let o=1;o<=e;o++)t["slashPointsHem"+o]=t.outseamShiftUpwards.shiftFractionTowards(t.inseamShiftUpwards,1-o/(e+1)),d.push(t["slashPointsHem"+o]);let f=d.slice();const u=["styleWaistOut","waistOut","seatOutCp1","seatOutCp2","seatOut","seatY","upperLegY","outseamShiftUpwards"];for(let a=0;a<e;a++){for(let o=a;o<e;o++)h[o]=t["slashPointsWaist"+o]=h[o].rotate(r,h[a]);a<c&&(t.styleWaistIn=t.styleWaistIn.rotate(r,h[a]),t.waistIn=t.waistIn.rotate(r,h[a]),t.styleWaistInNoAngle=t.styleWaistInNoAngle.rotate(r,h[a]));for(let o=a;o<e;o++)d[o]=t["slashPointsHem"+o]=d[o].rotate(r,h[a]);for(let o=a+1;o<e;o++)f[o]=t["slashPointsInner"+o]=f[o].rotate(r,h[a]);o.newOutseam=o.newOutseam.rotate(r,h[a]);for(let e of u)t[e]=t[e].rotate(r,h[a])}let b=h.slice(0,c),w=h.slice(c);m.info(b.length+" points in pointsCrossOnly"),o.crossSeam=o.crossSeam.reverse();for(let a=1;a<c;a++){t.crossSeamRotationPoint=o.crossSeam.shiftFractionAlong(a/c);let e=o.crossSeam.split(o.crossSeam.shiftFractionAlong(a/c));e[0]?o.crossSeam=e[0].join(e[1].rotate(r,t.crossSeamRotationPoint)):o.crossSeam=o.crossSeam.rotate(r,t.crossSeamRotationPoint)}o.crossSeam=o.crossSeam.reverse(),m.info(w.length+" points in pointsWaistOnly"),o.waist=(new a).move(t.styleWaistIn);for(let t=0;t<p;t++)o.waist=o.waist.line(w[t]);o.waist=o.waist.line(t.styleWaistOut),o.shortHem=(new a).move(t.inseamShiftUpwards);for(let t=0;t<e;t++)o.shortHem=o.shortHem.line(f[t]).line(d[t]);o.shortHem=o.shortHem.line(t.outseamShiftUpwards);const k=180-t.outseamShiftUpwards.angle(t.inseamShiftUpwards);for(const a in o)o[a]=o[a].rotate(k,t.styleWaistOut);o.inseam.hide(),o.outseam.hide(),o.hint&&o.hint.setClass("note help");for(const o in t)t[o]=t[o].rotate(k,t.styleWaistOut)}r.set("back_waist_width",o.waist.length()),p.backNotch=new d("bnotch",o.waist.shiftFractionAlong(.33)),o.seam=o.newInseam.join(o.shortHem).join(o.newOutseam).join(o.waist.reverse()).join(o.crossSeam).close().hide(),h&&(o.saBase=o.seam,o.sa=o.saBase.offset(h).setClass("sa")),o.hemBase&&delete o.hemBase,l("rmVd","hHemToSideWaist"),l("rmVd","hFull"),l("rmVd","hHemToFork"),l("rmHd","wHem"),l("rmHd","wHemLeft"),l("rmHd","wHemRight"),l("rmHd","wPleatToSideWaist"),l("rmHd","wPleatToSideWaistAlt"),l("rmHd","wForkToPleat"),l("rmHd","wForkProjectionToPleat"),l("rmHd","wStartCrotchCurveToPleat"),l("rmHd","wCbWaistToPleat"),l("rmVd","hStartCrotchCurveToCbWaist"),l("rmVd","hForkToCbWaist"),t.hemLowestPoint=o.shortHem.shiftFractionAlong(.5);let b=0,w=o.shortHem.intersectsY(t.hemLowestPoint.y+1);for(;w.length>0&&b<s.waistToSeat;)m.info("Hem intersects "+w.length+" times at y "+t.hemLowestPoint.y),t.hemLowestPoint=w[0],b+=1,w=o.shortHem.intersectsY(t.hemLowestPoint.y+1);for(t.waistLowestPoint=o.waist.shiftFractionAlong(.5),b=0,w=o.waist.intersectsY(t.waistLowestPoint.y+2);w.length>0&&b<s.waistToFloor;)m.info("Waist intersects "+w.length+" times at y "+t.waistLowestPoint.y),t.waistLowestPoint=w[0],b+=2,w=o.waist.intersectsY(t.waistLowestPoint.y+2);return l("pd",{id:"lengthHem",path:o.shortHem,d:-15}),l("hd",{id:"wHem",from:t.inseamShiftUpwards,to:t.outseamShiftUpwards,y:t.hemLowestPoint.y+30+h}),l("hd",{id:"wHemLeft",from:t.inseamShiftUpwards,to:t.hemLowestPoint,y:t.hemLowestPoint.y+15+h}),l("hd",{id:"wHemRight",from:t.hemLowestPoint,to:t.outseamShiftUpwards,y:t.hemLowestPoint.y+15+h}),l("vd",{id:"floorToOutseam",from:t.hemLowestPoint,to:t.outseamShiftUpwards,x:t.outseamShiftUpwards.x+15+h}),l("vd",{id:"floorToInseam",from:t.hemLowestPoint,to:t.inseamShiftUpwards,x:t.inseamShiftUpwards.x-15-h}
1),l("pd",{path:o.newOutseam.reverse(),d:-15-h}),l("vd",{id:"vWaistToInseam",from:t.styleWaistOut,to:t.outseamShiftUpwards,x:t.outseamShiftUpwards.x+15+h}),l("hd",{id:"hWaistToInseam",from:t.styleWaistOut,to:t.outseamShiftUpwards,y:t.styleWaistOut.y-15-h}),l("vd",{id:"heightWaistOut",from:t.styleWaistOut,to:t.hemLowestPoint,x:t.styleWaistOut.x}),l("vd",{id:"heightWaistIn",from:t.styleWaistIn,to:t.hemLowestPoint,x:t.styleWaistIn.x}),l("pd",{id:"lengthWaist",path:o.waist,d:-15-h}),l("hd",{id:"wWaist",to:t.styleWaistOut,from:t.styleWaistIn,y:t.styleWaistIn.y-15-h}),l("vd",{id:"vWaistLowestPoint",to:t.waistLowestPoint,from:t.hemLowestPoint,x:t.waistLowestPoint.x}),l("vd",{id:"vInseam",from:t.inseamShiftUpwards,to:t.fork,x:t.inseamShiftUpwards.x-h-15}),l("hd",{id:"hInseam",from:t.inseamShiftUpwards,to:t.fork,y:t.fork.y-h-15}),l("pd",{id:"lengthInseam",path:o.newInseam,d:-15-h}),l("pd",{id:"lengthCrossSeam",path:o.crossSeam.reverse(),d:-15-h}),l("hd",{id:"hCrossSeam",to:t.styleWaistIn,from:t.fork,y:t.styleWaistIn.y-h-15}),l("vd",{id:"vCrossSeam",to:t.styleWaistIn,from:t.fork,x:t.fork.x}),l("hd",{id:"hWaistToLowestLeft",from:t.styleWaistIn,to:t.waistLowestPoint,y:t.waistLowestPoint.y+15}),l("hd",{id:"hWaistToLowestRight",from:t.waistLowestPoint,to:t.styleWaistOut,y:t.waistLowestPoint.y+15}),t.logoAnchor=t.styleWaistOut.shiftFractionTowards(t.hemLowestPoint,.5),p.logo=new d("logo",t.logoAnchor),t.titleAnchor=t.fork.shiftFractionTowards(t.hemLowestPoint,.5),l("title",{nr:1,title:"back",at:t.titleAnchor}),l("rmGrainline","grainline"),t.grainlineBottom=o.shortHem.shiftFractionAlong(.5),t.grainlineTop=new e(t.grainlineBottom.x,o.waist.shiftFractionAlong(.5).y),l("grainline",{from:t.grainlineTop,to:t.grainlineBottom}),l("rmScaleBox"),f}};const gp={name:"percy.waist_front",measurements:[],after:[fp,up],options:{},draft:function({points:t,Point:e,paths:o,Path:a,options:i,complete:n,measurements:s,store:r,macro:l,utils:c,snippets:p,Snippet:d,sa:h,log:m,part:f}){const u=2*(r.get("back_waist_width")+r.get("front_waist_width")),g=s.seat*(1+i.seatEase),b=s.waist*(1+i.waistEase),w=s.waistFront*(1+i.waistEase),k=s.waistBack*(1+i.waistEase),C=(g-b)/s.waistToSeat,v=i.waistbandWidth*s.waistToFloor+(1-i.waistHeight)*s.waistToHips,y=(2*r.get("front_waist_width")-w)/v,T=(2*r.get("back_waist_width")-k)/v,x=b+C*s.waistToHips*(1-i.waistHeight),B=w+y*s.waistToHips*(1-i.waistHeight),S=k+T*s.waistToHips*(1-i.waistHeight);r.set("garmentTopCircumference",u),r.set("waistbandTopCircumference",x),r.set("waistbandTopFront",B),r.set("waistbandTopBack",S);const L=r.get("frontPanelWidth");m.info("Front panel length is "+L);const P=i.waistbandWidth*s.waistToFloor;r.set("waistbandWidth",P);const R=x/u,F=B/(2*r.get("front_waist_width")),E=S/(2*r.get("back_waist_width"));r.set("waistbandTopRatio",R),r.set("waistbandTopRatioFront",F),r.set("waistbandTopRatioBack",E);const W=P/(1-F);r.set("waistband_outer_radius",W);const H=W-P;r.set("waistband_inner_radius",H);const A=L/(6.28*W),O=360*A;if(m.info("front waistband is "+A+" of total circle, or "+O+" degrees"),t.circleCenter=new e(0,-H),t.topCenter=new e(0,0),t.bottomCenter=new e(0,W-H),l("grainline",{from:t.topCenter,to:t.bottomCenter}),o.seam=(new a).move(t.bottomCenter).circleSegment(O/2,t.circleCenter),t.bottomRight=o.seam.end(),t.topRight=t.bottomRight.shiftTowards(t.circleCenter,P),o.seam=o.seam.line(t.topRight).circleSegment(-O,t.circleCenter),t.topLeft=o.seam.end(),t.bottomLeft=t.topLeft.shiftTowards(t.circleCenter,-P),o.seam=o.seam.line(t.bottomLeft).circleSegment(O/2,t.circleCenter).close(),o.bottomCurve=(new a).move(t.bottomLeft).circleSegment(O,t.circleCenter).hide(),o.topCurve=(new a).move(t.topLeft).circleSegment(O,t.circleCenter).hide(),h&&(o.saBase=o.seam,o.sa=o.saBase.offset(h).setClass("sa")),i.frontPleat){const e=r.get("centerToPleat");t.pleatLeft=o.bottomCurve.shiftAlong(o.bottomCurve.length()/2+e),t.pleatRight=o.bottomCurve.shiftAlong(o.bottomCurve.length()/2-e),p.pleatLeftNotch=new d("notch",t.pleatLeft),p.pleatRightNotch=new d("notch",t.pleatRight)}let D=r.get("frontPanelOverlap")/2;return t.overlapBottomRight=o.bottomCurve.reverse().shiftAlong(D),t.overlapTopRight=o.topCurve.reverse().shiftAlong(D*R),o.overlapRight=(new a).move(t.overlapTopRight).line(t.overlapBottomRight).setClass("sa").hide(),t.overlapBottomLeft=o.bottomCurve.shiftAlong(D),t.overlapTopLeft=o.topCurve.shiftAlong(D*R),o.overlapLeft=(new a).move(t.overlapTopLeft).line(t.overlapBottomLeft).setClass("sa").hide(),D=Math.min(D,o.overlapRight.length()/3),p.buttonhole_0=new d("button
1hole-end",o.overlapRight.shiftAlong(D)).rotate(90),p.buttonhole_1=new d("buttonhole-end",o.overlapRight.reverse().shiftAlong(D)).rotate(90),p.buttonhole_2=new d("buttonhole-start",o.overlapLeft.shiftAlong(D)).rotate(90),p.buttonhole_3=new d("buttonhole-start",o.overlapLeft.reverse().shiftAlong(D)).rotate(90),h&&(o.saBase=o.seam,o.sa=o.saBase.offset(h).setClass("sa")),r.cutlist.addCut(),r.cutlist.addCut({cut:1,material:"interfacing"}),t.titleAnchor=t.topCenter.shiftFractionTowards(t.bottomLeft,.5),l("title",{nr:4,title:"waist_front",at:t.titleAnchor,scale:.8}),l("hd",{id:"topLength",from:t.topLeft,to:t.topRight,y:t.topRight.y}),l("hd",{id:"bottomLength",from:t.bottomLeft,to:t.bottomRight,y:t.bottomRight.y}),l("vd",{id:"height",from:t.topLeft.shiftFractionTowards(t.topRight,.5),to:t.bottomLeft.shiftFractionTowards(t.bottomRight,.5),x:t.bottomLeft.shiftFractionTowards(t.bottomRight,.5).x+h+15}),l("vd",{id:"topOffset",from:t.topLeft.shiftFractionTowards(t.topRight,.5),to:t.topCenter,x:t.bottomLeft.shiftFractionTowards(t.bottomRight,.5).x}),l("vd",{id:"bottomOffset",from:t.bottomCenter,to:t.bottomLeft.shiftFractionTowards(t.bottomRight,.5),x:t.bottomLeft.shiftFractionTowards(t.bottomRight,.5).x}),l("ld",{id:"diagonalLeft",from:t.bottomLeft,to:t.topLeft,d:-15}),l("ld",{id:"diagonalRight",to:t.bottomRight,from:t.topRight,d:-15}),l("hd",{id:"hLeft",to:t.bottomLeft,from:t.topLeft,y:t.topLeft.y}),l("vd",{id:"vLeft",to:t.bottomLeft,from:t.topLeft,x:t.bottomLeft.x}),l("hd",{id:"hRight",from:t.bottomRight,to:t.topRight,y:t.topRight.y}),l("vd",{id:"vRight",from:t.bottomRight,to:t.topRight,x:t.bottomRight.x}),l("pd",{id:"lengthBottom",path:o.bottomCurve,d:15+h}),l("pd",{id:"lengthTop",path:o.topCurve,d:15+h}),f}};const bp={name:"percy.waist_side",measurements:[],after:[fp,gp],options:{},draft:function({points:t,Point:e,paths:o,Path:a,options:i,complete:n,measurements:s,store:r,macro:l,utils:c,snippets:p,Snippet:d,sa:h,log:m,part:f}){const u=r.get("side_panel_width");m.info("Side panel length is "+u);const g=r.get("waistbandWidth"),b=r.get("waistbandTopRatioFront"),w=r.get("waistband_outer_radius"),k=r.get("waistband_inner_radius"),C=u/(6.28*w),v=360*C;m.info("side waistband is "+C+" of total circle, or "+v+" degrees"),t.circleCenter=new e(0,-k),t.topCenter=new e(0,0),t.bottomCenter=new e(0,w-k),o.centerLine=(new a).move(t.topCenter).line(t.bottomCenter).setClass("note help"),o.seam=(new a).move(t.bottomCenter).circleSegment(v/2,t.circleCenter),t.bottomRight=o.seam.end(),t.topRight=t.bottomRight.shiftTowards(t.circleCenter,g),o.seam=o.seam.line(t.topRight).circleSegment(-v,t.circleCenter),t.topLeft=o.seam.end(),t.bottomLeft=t.topLeft.shiftTowards(t.circleCenter,-g),o.seam=o.seam.line(t.bottomLeft).circleSegment(v/2,t.circleCenter).close(),o.bottomCurve=(new a).move(t.bottomLeft).circleSegment(v,t.circleCenter).hide(),o.topCurve=(new a).move(t.topLeft).circleSegment(v,t.circleCenter).hide(),h&&(o.saBase=o.seam,o.sa=o.saBase.offset(h).setClass("sa"));let y=r.get("frontPanelOverlap")/2;return t.overlapBottom=o.bottomCurve.reverse().shiftAlong(y),t.overlapTop=o.topCurve.reverse().shiftAlong(y*b),o.overlap=(new a).move(t.overlapTop).line(t.overlapBottom).setClass("sa").hide(),y=Math.min(y,o.overlap.length()/3),p.button_0=new d("button",o.overlap.shiftAlong(y)).rotate(90),p.button_1=new d("button",o.overlap.reverse().shiftAlong(y)).rotate(90),r.cutlist.addCut({cut:4}),r.cutlist.addCut({cut:2,material:"interfacing"}),t.titleAnchor=t.topCenter.shiftFractionTowards(t.bottomCenter,.5).shiftFractionTowards(t.bottomLeft,.4),l("title",{nr:5,title:"waist_side",at:t.titleAnchor,scale:.7}),t.grainlineBottom=t.bottomCenter,t.grainlineTop=t.topCenter,l("grainline",{from:t.grainlineTop,to:t.grainlineBottom}),l("hd",{id:"topLength",from:t.topLeft,to:t.topRight,y:t.topRight.y}),l("hd",{id:"bottomLength",from:t.bottomLeft,to:t.bottomRight,y:t.bottomRight.y}),l("vd",{id:"height",from:t.topLeft.shiftFractionTowards(t.topRight,.5),to:t.bottomLeft.shiftFractionTowards(t.bottomRight,.5),x:t.bottomLeft.shiftFractionTowards(t.bottomRight,.5).x+h+15}),l("vd",{id:"topOffset",from:t.topLeft.shiftFractionTowards(t.topRight,.5),to:t.grainlineTop,x:t.bottomLeft.shiftFractionTowards(t.bottomRight,.5).x}),l("vd",{id:"bottomOffset",from:t.grainlineBottom,to:t.bottomLeft.shiftFractionTowards(t.bottomRight,.5),x:t.bottomLeft.shiftFractionTowards(t.bottomRight,.5).x}),l("ld",{id:"diagonalLeft",from:t.bottomLeft,to:t.topLeft,d:-15}),l("ld",{id:"diagonalRight",to:t.bottomRight,from:t.topRight,d:-15}),l("hd",{id:"hLeft",to:t.bottomLeft,from:t.topLeft,y:t.topLeft.y}),l("vd",{id:"vLeft",to:t.bottomLeft,from:t.topLeft,x:t.bottomLeft.x}),l("hd",{id:"hRight",from:t.bottomRight,to:t.topRight,y:t.topRight.y}),l("vd",{id:"vRight",from:t.bottomRight,to:t.topRight,x:t.bottomRight.x}),l("pd",{id:"lengthBottom",path:o.bottomCurve,d:15+h}),l("pd",{id:"lengthTop",path:o.topCurve,d:15+h}),f}};const wp={name:"percy.waist_back",measurements:[],after:[up,gp],options:{},draft:function({points:t,Point:e,paths:o,Path:a,options:i,complete:n,measurements:s,store:r,macro:l,utils:c,snippets:p,Snippet:d,sa:h,log:m,part:f}){const u=2*r.get("back_waist_width");m.info("back panel length is "+u);const g=r.get("waistbandWidth"),b=g/(1-r.get("waistbandTopRatioBack")),w=b-g,k=u/(6.28*b),C=360*k;return m.info("back waistband is "+k+" of total circle, or "+C+" degrees"),t.circleCenter=new e(0,-w),t.topCenter=new e(0,0),t.bottomCenter=new e(0,b-w),o.centerLine=(new a).move(t.topCenter).line(t.bottomCenter).setClass("note help"),o.seam=(new a).move(t.bottomCenter).circleSegment(C/2,t.circleCenter),t.bottomRight=o.seam.end(),t.topRight=t.bottomRight.shiftTowards(t.circleCenter,g),o.seam=o.seam.line(t.topRight).circleSegment(-C,t.circleCenter),t.topLeft=o.seam.end(),t.bottomLeft=t.topLeft.shiftTowards(t.circleCenter,-g),o.seam=o.seam.line(t.bottomLeft).circleSegment(C/2,t.circleCenter).close(),o.bottomCurve=(new a).move(t.bottomLeft).circleSegment(C,t.circleCenter).hide(),o.topCurve=(new a).move(t.topLeft).circleSegment(C,t.circleCenter).hide(),h&&(o.saBase=o.seam,o.sa=o.saBase.offset(h).setClass("sa")),r.cutlist.addCut(),r.cutlist.addCut({cut:1,material:"interfacing"}),t.titleAnchor=t.topCenter.shiftFractionTowards(t.bottomCenter,.5).shiftFractionTowards(t.bottomLeft,.4),l("title",{nr:6,title:"waist_back",at:t.titleAnchor}),p.backNotch1=new d("bnotch",o.bottomCurve.shiftFractionAlong(.33)),p.backNotch2=new d("bnotch",o.bottomCurve.shiftFractionAlong(.67)),t.grainlineBottom=t.bottomCenter,t.grainlineTop=t.topCenter,l("grainline",{from:t.grainlineTop,to:t.grainlineBottom}),l("hd",{id:"topLength",from:t.topLeft,to:t.topRight,y:t.topRight.y}),l("hd",{id:"bottomLength",from:t.bottomLeft,to:t.bottomRight,y:t.bottomRight.y}),l("vd",{id:"height",from:t.topLeft.shiftFractionTowards(t.topRight,.5),to:t.bottomLeft.shiftFractionTowards(t.bottomRight,.5),x:t.bottomLeft.shiftFractionTowards(t.bottomRight,.5).x+h+15}),l("vd",{id:"topOffset",from:t.topLeft.shiftFractionTowards(t.topRight,.5),to:t.grainlineTop,x:t.bottomLeft.shiftFractionTowards(t.bottomRight,.5).x}),l("vd",{id:"bottomOffset",from:t.grainlineBottom,to:t.bottomLeft.shiftFractionTowards(t.bottomRight,.5),x:t.bottomLeft.shiftFractionTowards(t.bottomRight,.5).x}),l("ld",{id:"diagonalLeft",from:t.bottomLeft,to:t.topLeft,d:-15}),l("ld",{id:"diagonalRight",to:t.bottomRight,from:t.topRight,d:-15}),l("hd",{id:"hLeft",to:t.bottomLeft,from:t.topLeft,y:t.topLeft.y}),l("vd",{id:"vLeft",to:t.bottomLeft,from:t.topLeft,x:t.bottomLeft.x}),l("hd",{id:"hRight",from:t.bottomRight,to:t.topRight,y:t.topRight.y}),l("vd",{id:"vRight",from:t.bottomRight,to:t.topRight,x:t.bottomRight.x}),l("pd",{id:"lengthBottom",path:o.bottomCurve,d:15+h}),l("pd",{id:"lengthTop",path:o.topCurve,d:15+h}),f}};const kp={name:"percy.cuff",measurements:[],after:[fp,up],options:{cuffWidth:{pct:5,min:1,max:15,...(0,n.Wx)("waistToFloor"),menu:"style"}}
1,draft:function({points:t,Point:e,paths:o,Path:a,options:i,complete:n,expand:s,measurements:r,store:l,macro:c,utils:p,units:d,snippets:h,Snippet:m,sa:f,log:u,part:g}){const b=Number(l.get("original_hem_back"))+Number(l.get("original_hem_front"));u.info("Cuff length is "+b);const w=i.cuffWidth*r.waistToFloor*2;return s?(t.topLeft=new e(0,0),t.bottomLeft=new e(0,w),t.bottomRight=new e(b,w),t.topRight=new e(b,0),t.centerLeft=new e(0,w/2),t.centerRight=new e(b,w/2),o.foldHere=(new a).move(t.centerLeft).line(t.centerRight).setClass("note help"),o.seam=(new a).move(t.topLeft).line(t.bottomLeft).line(t.bottomRight).line(t.topRight).line(t.topLeft).close(),f&&(o.sa=o.seam.offset(f).setClass("sa")),l.cutlist.addCut({identical:!0}),t.titleAnchor=t.topLeft.shiftFractionTowards(t.bottomRight,.5),c("title",{nr:3,title:"cuff",at:t.titleAnchor}),c("hd",{id:"length",from:t.topLeft,to:t.topRight,y:t.topRight.y-15-f}),c("vd",{id:"width",from:t.topLeft,to:t.bottomLeft,x:t.topLeft.x-15-f}),g):(l.flag.note({msg:"percy:cutCuff",replace:{width:d(w),length:d(b)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),l.flag.preset("expand"),g.hide())}};const Cp={name:"percy.pocket",measurements:[],from:fp,options:{pocketDepth:{pct:60,max:80,min:20,menu:"style",...(0,n.Wx)("waistToKnee")},pocketCurveControl:{pct:50,max:80,min:10,menu:"style.panel.advanced"}},draft:function({points:t,Point:e,paths:o,Path:a,options:i,complete:n,measurements:s,store:r,macro:l,utils:c,snippets:p,Snippet:d,sa:h,log:m,part:f}){o.shortOutseam.unhide(),o.waist.unhide(),o.pocketCutout.setClass("note help");let u=s.waistToKnee*i.pocketDepth-i.waistbandWidth*s.waistToFloor-(1-i.waistHeight)*s.waistToHips;u=Math.min(u,o.shortOutseam.length()),t.pocketSideSeamIntercept=o.shortOutseam.shiftAlong(u),t.pocketInnerCorner=t.pocketFacingEdge.shift(o.waist.angleAt(t.pocketFacingEdge)+90,u),o.pocketWaistEdge=o.waist.split(t.pocketFacingEdge)[1],t.waistHalfway=o.pocketWaistEdge.shiftFractionAlong(.5);const g=o.pocketWaistEdge.angleAt(t.waistHalfway);t.pocketHalfwayBottom=t.waistHalfway.shift(g+90,u),t.pocketSideSeamInterceptHalfway=t.pocketHalfwayBottom,t.pocketSideSeamInterceptCp1=t.pocketSideSeamInterceptHalfway.shift(g+180,i.pocketCurveControl*u),t.pocketFacingEdgeHalfway=t.pocketFacingEdge.shiftFractionTowards(t.pocketInnerCorner,i.pocketCurveControl),t.pocketFacingEdgeCp2=t.pocketFacingEdgeHalfway.shiftFractionTowards(t.pocketInnerCorner,i.pocketCurveControl),o.pocketBottomEdge=(new a).move(t.pocketSideSeamIntercept).line(t.pocketSideSeamInterceptHalfway).curve(t.pocketSideSeamInterceptCp1,t.pocketFacingEdgeCp2,t.pocketFacingEdgeHalfway).line(t.pocketFacingEdge),delete o.seam,delete o.shortHem,delete o.shortInseam,delete o.hint,delete o.crotchseam,delete o.pleatInner,delete o.pleatOuter,delete o.pleatCenter,delete p.opening_notch,delete p.logo,delete p.waistLowestPoint,delete p.hemLowestPoint,l("rmGrainline","grainline"),l("rmHd","wHem"),l("rmHd","hWaist"),l("rmHd","hCrossSeam"),l("rmHd","hPocket"),l("rmHd","hWaistToInseam"),l("rmHd","wHemRight"),l("rmHd","wHemLeft"),l("rmHd","hInseam"),l("rmVd","vWaistToInseam"),l("rmVd","floorToOutseam"),l("rmVd","floorToInseam"),l("rmVd","vInseam"),l("rmVd","vCrossSeam"),l("rmVd","heightWaistIn"),l("rmVd","vCrossSeam"),l("rmVd","heightPocketInner"),l("rmVd","heightWaistOut"),l("rmVd","vPocket"),l("rmVd","heightWaistLowest"),l("rmPd","lengthInseam"),l("rmPd","lengthHem"),l("rmPd","pd"),l("rmPd","lengthCrossSeam"),l("rmPd","lengthWaist"),l("rmPd","lengthPocket"),i.frontPleat&&(l("rmLd","pleatWidth"),l("rmLd","pleatFromCenter")),l("rmHd","waistLowestRight"),l("rmHd","waistLowestLeft"),o.outseamTop=o.shortOutseam.split(t.pocketSideSeamIntercept)[0],delete o.shortOutseam,delete o.trimmedOutseam,delete o.trimmedWaist,delete o.waist,delete o.inseam,delete o.outseam,o.seam=o.pocketWaistEdge.join(o.outseamTop).join(o.pocketBottomEdge).close().hide(),h&&(o.saBase=o.seam,o.sa=o.saBase.offset(h).setClass("sa")),o.hemBase&&delete o.hemBase,t.grainlineBottom=t.pocketSideSeamIntercept.shiftFractionTowards(t.pocketInnerCorner,.5),t.grainlineTop=o.pocketWaistEdge.shiftFractionAlong(.5).shiftFractionTowards(t.grainlineBottom,.3);const b=t.grainlineTop.angle(t.grainlineBottom)+90;for(let C in t)t[C]=t[C].rotate(-b,t.grainlineTop);for(let C in o)o[C]=o[C].rotate(-b,t.grainlineTop);o.pocketCutout=o.pocketCutout.setClass("lining"),r.get("openingDepth")>0&&(t.openingNotch=o.pocketBottomEdge.reverse().shiftAlong(r.get("openingDepth")),p.openingNotch=new d("notch",t.openingNotch)),t.lowestPocketPoint=t.pocketSideSeamInterceptHalfway;let w=0,k=o.pocketBottomEdge.intersectsY(t.lowestPocketPoint.y+1);for(;k.length>0&&w<s.waistToKnee;)t.lowestPocketPoint=k[0],w+=1,k=o.pocketBottomEdge.intersectsY(t.lowestPocketPoint.y+1);for(t.lowestWaistPoint=t.waistHalfway,w=0,k=o.pocketWaistEdge.intersectsY(t.lowestWaistPoint.y+1);k.length>0&&w<s.waistToKnee;)t.lowestPocketPoint=k[0],w+=1,k=o.pocketBottomEdge.intersectsY(t.lowestPocketPoint.y+1);for(l("grainline",{from:t.grainlineTop,to:t.grainlineBottom}),t.titleAnchor=t.pocketBottomEdge.shiftFractionTowards(t.pocketSideSeamInterceptHalfway,.5),l("title",{nr:7,title:"pocket",at:t.titleAnchor}
1),l("pd",{id:"lengthOutseam",path:o.outseamTop.reverse(),d:-15-h}),l("pd",{id:"lengthWaist",path:o.pocketWaistEdge.reverse(),d:-15-h}),l("vd",{id:"vLeft",to:t.lowestPocketPoint,from:t.styleWaistOut,x:t.styleWaistOut.x}),l("vd",{id:"vRight",to:t.lowestPocketPoint,from:t.pocketFacingEdge,x:t.pocketFacingEdge.x}),l("vd",{id:"vWaistLowest",to:t.lowestPocketPoint,from:t.lowestWaistPoint,x:t.lowestWaistPoint.x}),l("hd",{id:"hSide",from:t.pocketSideSeamIntercept,to:t.styleWaistOut,y:t.styleWaistOut.y-h-15}),l("hd",{id:"hTop",from:t.styleWaistOut,to:t.pocketFacingEdge,y:t.styleWaistOut.y-h-15}),l("ld",{id:"lengthOpening",from:t.pocketFacingEdge,to:t.openingNotch,d:7}),t.rightmostPocketPoint=t.pocketSideSeamIntercept,w=0,k=o.pocketBottomEdge.intersectsX(t.rightmostPocketPoint.x+1);k.length>0&&w<s.waistToKnee;)t.rightmostPocketPoint=k[0],w+=1,k=o.pocketBottomEdge.intersectsX(t.rightmostPocketPoint.x+1);return l("hd",{id:"hBottom",from:t.pocketSideSeamIntercept,to:t.rightmostPocketPoint,y:t.lowestPocketPoint.y+h+30}),l("hd",{id:"hBottomLeft",to:t.lowestPocketPoint,from:t.pocketSideSeamIntercept,y:t.lowestPocketPoint.y+h+15}),l("hd",{id:"hBottomRight",from:t.lowestPocketPoint,to:t.rightmostPocketPoint,y:t.lowestPocketPoint.y+h+15}),l("vd",{id:"vBottomRight",from:t.lowestPocketPoint,to:t.pocketFacingEdge,x:t.rightmostPocketPoint.x+h+15}),l("vd",{id:"vBottomLeft",from:t.lowestPocketPoint,to:t.pocketSideSeamIntercept,x:t.pocketSideSeamIntercept.x-h-15}),f}};const vp={name:"percy.pocket_facing",measurements:[],from:Cp,options:{},draft:function({points:t,Point:e,paths:o,Path:a,options:i,complete:n,expand:s,measurements:r,store:l,macro:c,utils:p,snippets:d,Snippet:h,sa:m,log:f,part:u}){return s?(delete o.seam,o.trimmedOutseam=o.outseamTop.split(t.pocketBottomEdge)[1],delete o.outseamTop,o.trimmedWaist=o.pocketWaistEdge.split(t.pocketInnerEdge)[0],delete o.pocketWaistEdge,o.pocketCutout.setClass("fabric"),o.seam=o.pocketBottomEdge.join(o.trimmedWaist).join(o.pocketCutout).join(o.trimmedOutseam).close().hide(),m&&(o.saBase=o.seam,o.sa=o.saBase.offset(m).setClass("sa")),c("rmHd","hSide"),c("rmHd","hTop"),c("rmVd","vTop"),c("rmVd","vLeft"),c("rmPd","lengthWaist"),c("rmPd","lengthOutseam"),c("pd",{id:"lengthOutseam",path:o.trimmedOutseam.reverse(),d:-15-m}),c("pd",{id:"lengthWaist",path:o.trimmedWaist.reverse(),d:-15-m}),c("pd",{id:"lengthPocket",path:o.pocketCutout.reverse(),d:15+m}),c("vd",{id:"vOutseam",from:t.pocketSideSeamIntercept,to:t.pocketBottomEdge,x:t.pocketBottomEdge.x}),c("hd",{id:"hOutseam",from:t.pocketSideSeamIntercept,to:t.pocketBottomEdge,y:t.pocketBottomEdge.y-m-15}),c("vd",{id:"vPocket",from:t.pocketInnerEdge,to:t.pocketBottomEdge,x:t.pocketBottomEdge.x}),c("hd",{id:"hPocket",to:t.pocketInnerEdge,from:t.pocketBottomEdge,y:t.pocketInnerEdge.y}),c("title",{nr:8,title:"pocket_facing",at:t.titleAnchor}),u):(l.flag.note({msg:"percy:cutPocketFacing",suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),l.flag.preset("expand"),u.hide())}},yp=JSON.parse('{"id":"percy","code":"Gawain (Candle)","design":"Gawain (Candle)","description":"A FreeSewing pattern for fall-front puffy shorts","name":"Percy Puffy Pants","difficulty":3,"tags":["bottoms","trousers"],"techniques":["button","hem","interfacing","pocket","curved-seam"],"version":"4.6.0","collection":true,"pkg":"@freesewing/percy"}'),Tp=new n.pT({data:yp,parts:[fp,up,kp,gp,bp,wp,Cp,vp]}),xp=(0,n.D4)([Po,dp]),Bp={en:JSON.parse('{"t":"Sabrina","d":"A FreeSewing pattern that needs a description","p":{"base":"Base","front":"Front","side":"Side","back":"Back","waistband":"Waistband"},"s":{"cutWaistband.t":"The waistband is not shown","cutWaistband.d":"The **waistband** is a rectangular piece of main fabric {{{ w }}} wide and {{{ l }}} long.","badArmpitPosition.t":"Error determining armpit position","badArmpitPosition.d":"We could not construct the armhole. This draft might fail or result in a bad fit. Please verify your measurements, especially hps-to-waist-front and waist-to-armpit."},"o":{"length":{"t":"Length","d":"The length of the garment"},"neckHeightFront":{"t":"Neck depth front","d":"The depth of the neck hole at the front"},"neckHeightBack":{"t":"Neck depth back","d":"The depth of the neck hole at the back"},"armpitAdjustment":{"t":"Armpit adjustment","d":"Move the armpit up or down"},"strapPosition":{"t":"Strap position","d":"Move the straps towards your shoulders or neck"},"strapAngle":{"t":"Strap angle","d":"The angle of the straps on your shoulder line"},"strapWidth":{"t":"Strap width","d":"The width of the shoulder straps"},"backWidth":{"t":"Back width","d":"The width of narrow part on the back"},"bustPointFocus":{"t":"Bust point focus","d":"How much the virtual bust darts aim at the bust point"},"backDartAngle":{"t":"Back dart angle","d":"The angle of the virtual back dart"},"upperBackShape":{"t":"Upper back shape","d":"The upper curve of the C shape on the back"},"lowerBackShape":{"t":"Lower back shape","d":"The lower curve of the C shape on the back"},"strapCurveFront":{"t":"Strap curve front","d":"How straight the shoulder straps are on the front"},"strapCurveBack":{"t":"Strap curve back","d":"How straight the shoulder straps are on the back"},"elasticWidth":{"t":"Elastic width","d":"The width of the elastic band you use for the underbust band"},"verticalStretch":{"t":"Vertical stretch","d":"How much the fabric will stretch vertically, when worn"},"strapStretch":{"t":"Strap stretch","d":"How much the fabric will stretch along the straps, when worn"},"horizontalBustStretch":{"t":"Bust stretch","d":"How much the fabric will stretch along the bust line, when worn"},"horizontalBandStretch":{"t":"Elastic band stretch","d":"How much the fabric will stretch along the elastic band, when worn"},"splitOffsetFront":{"t":"Front split offset","d":"Shifts the front seam towards the side or the bust"},"splitOffsetBack":{"t":"Back split offset","d":"Shifts the back seam towards the side or the back"},"fullSa":{"t":"Full seam allowance","d":"Determines how the seam allowance is generated"},"fullSaNo":{"t":"Default","d":"No seam allowance in the armscyes and neck opening"},"fullSaYes":{"t":"Burrito method","d":"Seam allowance on the complete part outline"},"frontArmholeOpening":{"t":"Front armhole opening","d":"How wide the arm opening is at the front"},"useLegacyArmholePosition":{"t":"Use legacy armhole position","d":"Use the old calculation for the front armhole"}}
1}')},Sp=JSON.parse('{"id":"sabrina","name":"Sabrina sports top","code":"Jonathan Haas","description":"A FreeSewing pattern for sports tops","design":"Jonathan Haas","difficulty":2,"tags":["tops","underwear"],"techniques":["stretch","curved-seam","elastic"],"version":"4.6.0","pkg":"@freesewing/sabrina","collection":true}');const Lp={name:"sabrina.base",measurements:["neck","chest","bustFront","highBust","underbust","waist","hpsToBust","hpsToWaistFront","waistToArmpit","bustPointToUnderbust","shoulderSlope","shoulderToShoulder","bustSpan"],options:{length:{pct:15,min:0,max:100,menu:"fit"},neckWidthFront:.17,neckHeightFront:{pct:35,min:25,max:80,menu:"style"},neckHeightBack:{pct:17,min:10,max:25,menu:"style"},verticalStretch:{pct:11,min:0,max:30,menu:"fit"},strapStretch:{pct:20,min:0,max:50,menu:"fit"},horizontalBustStretch:{pct:20,min:0,max:40,menu:"fit"},horizontalBandStretch:{pct:20,min:0,max:40,menu:"fit"},armpitAdjustment:{pct:-1.5,min:-10,max:10,...(0,n.Wx)("waistToArmpit"),menu:"fit"},strapPosition:{pct:40,min:20,max:60,menu:"fit"},strapAngle:{deg:25,min:0,max:45,menu:"fit"},strapWidth:{pct:33,min:15,max:50,menu:"style"},fullSa:{bool:!1,menu:"style"},backWidth:{pct:18,min:5,max:40,toAbs:(t,{measurements:e})=>(e.chest-e.bustFront)*t,fromAbs:(t,{measurements:e})=>Math.round(1e4*t/(e.chest-e.bustFront))/1e4,menu:"style"},bustPointFocus:{pct:0,min:-50,max:100,menu:"fit"},backDartAngle:{deg:15,min:0,max:22,menu:"advanced"},upperBackShape:{pct:40,min:20,max:60,menu:"advanced"},lowerBackShape:{pct:40,min:20,max:80,menu:"advanced"},strapCurveFront:{pct:5,min:2,max:10,menu:"advanced"},strapCurveBack:.03,splitOffsetFront:{pct:30,min:15,max:40,menu:"advanced"},splitOffsetBack:{pct:28,min:15,max:40,menu:"advanced"},useLegacyArmholePosition:{bool:!1,menu:"advanced"},frontArmholeOpening:{pct:5,min:0,max:15,menu:(t,e)=>!e?.useLegacyArmholePosition&&"fit"}},draft:function({options:t,measurements:e,Point:o,Path:a,points:i,paths:n,utils:s,store:r,part:l}){const c=s.stretchToScale(t.horizontalBustStretch),p=s.stretchToScale(t.horizontalBandStretch),d=s.stretchToScale(t.verticalStretch),h=s.stretchToScale(t.strapStretch),m=e.bustSpan/2*c,f=(e.highBust-e.chest+e.bustFront)*c,u=e.bustFront*c,g=e.chest*c,b=g-u,w=(e.waist*t.length+e.underbust*(1-t.length))*p,k=e.neck*t.neckWidthFront;i.hps=new o(k,0),i.shoulder=s.beamIntersectsX(i.hps,i.hps.shift(-1*e.shoulderSlope,100),e.shoulderToShoulder/2);const C=g/2;i.hpsBack=new o(C-i.hps.x,0),i.shoulderBack=new o(C-i.shoulder.x,i.shoulder.y),i.cfNeckBase=new o(0,k*d),i.cfBust=new o(0,e.hpsToBust*d),i.cfUnderbust=i.cfBust.translate(0,e.bustPointToUnderbust*d),i.cfWaist=new o(0,e.hpsToWaistFront*d),i.bustPoint=new o(m,e.hpsToBust*d),i.cfBand=i.cfUnderbust.shiftFractionTowards(i.cfWaist,t.length),i.cfNeck=i.cfNeckBase.shiftFractionTowards(i.cfBand,t.neckHeightFront);const v=i.cfBust.dy(i.cfBand);i.cbBand=i.cfBand.translate(.5*g,0),i.sfBand=i.cfBand.translate(u*t.splitOffsetFront,0),i.sfChest=i.cfBust.translate(u/2,0),i.sfDart=i.sfBand.translate(0,-v).shiftFractionTowards(i.bustPoint,t.bustPointFocus),i.armpit=new o(.5*u,i.cfWaist.y-e.waistToArmpit*(1-t.armpitAdjustment)*d),i.defaultArmpit=new o(.5*u,i.cfWaist.y-e.waistToArmpit*d),i.cbNeck=new o(C,e.neck*t.neckHeightBack);const y=.1*b,T=b*t.backWidth;i.defaultArmpit.y+.2*y>i.bustPoint.y&&r.flag.error({msg:"sabrina:badArmpitPosition"});const x=t.strapPosition*(1-t.strapWidth)+t.strapWidth/2;i.strapFrontLeft=i.hps.shiftFractionTowards(i.shoulder,x-t.strapWidth/2),i.strapFrontRight=i.hps.shiftFractionTowards(i.shoulder,x+t.strapWidth/2),i.strapBackLeft=i.hpsBack.shiftFractionTowards(i.shoulderBack,x-t.strapWidth/2),i.strapBackRight=i.hpsBack.shiftFractionTowards(i.shoulderBack,x+t.strapWidth/2),i.strapFrontLeft=i.strapFrontLeft.shift(t.strapAngle-90-e.shoulderSlope,(1-h)*i.cfNeck.y),i.strapFrontRight=i.strapFrontRight.shift(t.strapAngle-90-e.shoulderSlope,(1-h)*i.cfNeck.y),i.strapBackLeft=i.strapBackLeft.shift(t.strapAngle-90+e.shoulderSlope,(1-h)*i.cbNeck.y),i.strapBackRight=i.strapBackRight.shift(t.strapAngle-90+e.shoulderSlope,(1-h)*i.cbNeck.y),i.strapFrontLeftCp=i.strapFrontLeft.shift(t.strapAngle-90-e.shoulderSlope,e.chest*t.stra
1pCurveFront),i.strapFrontRightCp=i.strapFrontRight.shift(t.strapAngle-90-e.shoulderSlope,e.chest*t.strapCurveFront),i.strapBackLeftCp=i.strapBackLeft.shift(t.strapAngle-90+e.shoulderSlope,e.chest*t.strapCurveBack),i.strapBackRightCp=i.strapBackRight.shift(t.strapAngle-90+e.shoulderSlope,e.chest*t.strapCurveBack),t.useLegacyArmholePosition?i.sfArmpit=i.armpit.shift(180,y):i.sfArmpit=new o(.5*e.shoulderToShoulder*(1-t.frontArmholeOpening)*c,i.armpit.y),i.armpitBottom=i.armpit.shift(270,y),i.sbBand=i.cfBand.translate(.5*g-b*t.splitOffsetBack,0),i.sbBust=i.cfBust.translate(.5*g-b*t.splitOffsetBack,0),i.sbDart=i.sbBand.translate(0,.8*-v),i.intersectTarget=s.beamIntersectsX(i.armpitBottom,i.armpitBottom.shift(10,10),i.sbBust.x);let B=s.linesIntersect(i.sbBust,i.defaultArmpit,i.armpitBottom,i.intersectTarget)||i.sbBust;i.sbArmpit=B.translate(y,0),i.sbArmpit.x>i.sbBust.x&&(i.sbArmpit.x=i.sbBust.x),i.cbCenter=new o(i.cbNeck.x,i.strapBackRight.y+.6*(i.sbArmpit.y-i.strapBackRight.y)),i.backCCenter=i.cbCenter.translate(-T/2,0),i.backCCenterCp1=i.backCCenter.translate(0,i.strapBackRight.dy(i.backCCenter)*-t.upperBackShape),i.backCCenterCp2=i.backCCenter.translate(0,i.strapBackRight.dy(i.backCCenter)*t.lowerBackShape),i.cfNeckCp=i.cfNeck.translate(k,0),i.cbNeckCp=i.cbNeck.translate(-k/2,0);const S=i.backCCenterCp2.angle(i.armpitBottom);i.sfArmpitCp1=i.sfArmpit.shift(-60,y),i.sfArmpitCp2=i.sfArmpit.shift(120,y),i.sbArmpitCp1=i.sbArmpit.shift(S,y),i.sbArmpitCp2=i.sbArmpit.shift(180+S,y/2),i.sfBandCp1=i.sfBand.shiftFractionTowards(i.cfBand,1/3),i.sfBandCp2=i.sfBand.shiftFractionTowards(i.sbBand,1/3),i.sbBandCp1=i.sbBand.shiftFractionTowards(i.sfBand,1/3),i.sbBandCp2=i.sbBand.shiftFractionTowards(i.cbBand,1/3);const L=Math.max(0,(g-w)/4),P=Math.max(0,(u-f)/2)+.01*g,R=.01*g;function F(t,e,o,a,n){const s=i[e];let r=Math.atan(n/2/t.dist(s))/Math.PI*180;i[e+"DartLeft"]=s.rotate(-r,t),i[e+"DartRight"]=s.rotate(r,t),i[o+"Dart"]=i[o].rotate(-r,t),i[a+"Dart"]=i[a].rotate(r,t)}function E(t){let e=0,a=0;return t.forEach((t=>{e+=t.x,a+=t.y})),new o(e/t.length,a/t.length)}function W(t,e,o,a=null,n=10){let s=n,r=0,l=!1,c=t.translate(r,0);for(let p=0;p<15;p++){const n=o(c).intersects(e);let p=n.length>0;if(p!==l&&(s*=1/3),p&&a&&(i[a]=E(n)),l=p,r+=p?-s:s,c=t.translate(r,0),Math.abs(s)<.1)break}return c}return F(i.sfDart,"sfBand","sfBandCp1","sfBandCp2",L),F(i.sbDart,"sbBand","sbBandCp1","sbBandCp2",L),F(i.sfDart,"sfArmpit","sfArmpitCp1","sfArmpitCp2",P),F(i.sbDart,"sbArmpit","sbArmpitCp2","sbArmpitCp1",R),L>0?(i.sfDartSide=W(i.sfDart,(new a).move(i.sfBandDartLeft).curve(i.sfDart,i.sfDart,i.sfArmpitDartRight),(t=>(new a).move(i.sfArmpitDartLeft).curve(t,t,i.sfBandDartRight)),"frontJoin",-.1*m),i.sbDartSide=W(i.sbDart,(new a).move(i.sbBandDartRight).curve(i.sbDart,i.sbDart,i.sbArmpitDartLeft),(t=>(new a).move(i.sbArmpitDartRight).curve(t,t,i.sbBandDartLeft)),"backJoin",.1*m)):(i.sfDartSide=i.sfDart,i.sbDartSide=i.sbDart,i.frontJoin=i.sfBand,i.backJoin=i.sbBand),i.strapBackLeft=i.strapBackLeft.rotate(-t.backDartAngle,i.cbCenter),i.strapBackLeftCp=i.strapBackLeftCp.rotate(-t.backDartAngle,i.cbCenter),i.strapBackRight=i.strapBackRight.rotate(-t.backDartAngle,i.cbCenter),i.strapBackRightCp=i.strapBackRightCp.rotate(-t.backDartAngle,i.cbCenter),i.cfBand=s.beamIntersectsX(i.sfBandCp1Dart,i.sfBandDartLeft,0).shiftFractionTowards(i.cfBand,.6),i.cbBand=s.beamIntersectsX(i.sbBandCp2Dart,i.sbBandDartRight,i.cbBand.x).shiftFractionTowards(i.cbBand,.6),n.frontSa=(new a).move(i.cfBand)._curve(i.sfBandCp1Dart,i.sfBandDartLeft).curve(i.sfDart,i.sfDart,i.sfArmpitDartRight).curve(i.sfArmpitCp2Dart,i.strapFrontRightCp,i.strapFrontRight).line(i.strapFrontLeft).curve(i.strapFrontLeftCp,i.cfNeckCp,i.cfNeck).hide(),n.front=n.frontSa.clone().unhide().close(),n.frontStrap=(new a).move(i.strapFrontRight).line(i.strapFrontLeft).hide(),n.frontSideJoin=(new a).move(i.sfBandDartLeft).curve(i.sfDart,i.sfDart,i.sfArmpitDartRight).hide(),n.frontBand=(new a).move(i.cfBand)._curve(i.sfBandCp1Dart,i.sfBandDartLeft).hide(),n.backSa=(new a).move(i.cbNeck).curve(i.cbNeckCp,i.strapBackLeftCp,i.strapBackLeft).line(i.strapBackRight).curve(i.strapBackRightCp,i.backCCenterCp1,i.backCCenter).curve(i.backCCenterCp2,i.sbArmpitCp2Dart,i.sbArmpitDartLeft).curve(i.sbDart,i.sbDart,i.sbBandDartRight).curve_(i.sbBandCp2Dart,i.cbBand).hide(),n.back=n.backSa.clone().unhide().close(),n.backBand=(new a).move(i.sbBandDartRight).curve_(i.sbBandCp2Dart,i.cbBand).hide(),n.backStrap=(new a).move(i.strapBackLeft).line(i.strapBackRight).hide(),n.backSideJoin=(new a).move(i.sbArmpitDartLeft).curve(i.sbDart,i.sbDart,i.sbBandDartRight).hide(),n.side=(new a).move(i.sfBandDartRight).curve(i.sfBandCp2Dart,i.sbBandCp1Dart,i.sbBandDartLeft).curve(i.sbDartSide,i.sbDartSide,i.sbArmpitDartRight).curve(i.sbArmpitCp1Dart,i.sfArmpitCp1Dart,i.sfArmpitDartLeft).curve(i.sfDartSide,i.sfDartSide,i.sfBandDartRight).close(),n.sideFrontJoin=(new a).move(i.sfArmpitDartLeft).curve(i.sfDartSide,i.sfDartSide,i.sfBandDartRight).hide(),n.sideBackJoin=(new a).move(i.sbBandDartLeft).curve(i.sbDartSide,i.sbDartSide,i.sbArmpitDartRight).hide(),n.sideBand=(new a).move(i.sfBandDartRight).curve(i.sfBandCp2Dart,i.sbBandCp1Dart,i.sbBandDartLeft).hide(),r.set("waistband",2*(n.frontBand.length()+n.sideBand.length()+n.backBand.length())),l}};var Pp=o(30175);const Rp={name:"sabrina.front",from:Lp,hide:{from:!0},plugins:[Pp.e2],draft:function({points:t,paths:e,Snippet:o,snippets:a,sa:i,macro:n,store:s,part:r,options:l}){return e.back.hide(),e.side.hide(),e.front.addClass("fabric"),t.titleAnchor=t.bustPoint.shiftFractionTowards(t.stra
1pFrontLeft,.3).shiftFractionTowards(t.cfNeckCp,.5),s.cutlist.setCut({cut:2,from:"fabric",onFold:!0}),n("title",{at:t.titleAnchor,nr:1,title:"front",scale:.5}),a.bustPoint=new o("notch",t.bustPoint),a.frontJoin=new o("notch",t.frontJoin),i&&(l.fullSa?e.sa=n("sa",{paths:["frontSa",null]}):e.sa=n("sa",{paths:["frontBand","frontSideJoin",null,"frontStrap",null]})),n("cutonfold",{from:t.cfNeck,to:t.cfBand,grainline:!0}),n("pd",{id:"frontBand",path:e.frontBand,d:i+15}),n("pd",{id:"frontSideJoin",path:e.frontSideJoin,d:i+15}),n("pd",{id:"frontStrap",path:e.frontStrap.reverse(),d:-i-15}),n("vd",{id:"frontFold",from:t.cfNeck,to:t.cfBand,x:-15}),n("vd",{id:"frontNeck",from:t.strapFrontLeft,to:t.cfNeck,x:-15}),n("vd",{id:"frontSide",from:t.strapFrontRight,to:t.sfArmpitDartRight,x:Math.max(t.strapFrontRight.x,t.sfArmpitDartRight.x)+15}),n("hd",{id:"frontNeck",from:t.cfNeck,to:t.strapFrontLeft,y:t.strapFrontLeft.y-15}),r}};const Fp={name:"sabrina.side",from:Lp,hide:{from:!0},plugins:[Pp.e2],draft:function({Point:t,points:e,paths:o,Snippet:a,snippets:i,sa:n,macro:s,store:r,part:l,options:c}){return o.back.hide(),o.front.hide(),o.side.addClass("fabric"),e.titleAnchor=e.armpitBottom.shiftFractionTowards(e.sfBand,.5),r.cutlist.setCut({cut:4,from:"fabric"}),i.frontJoin=new a("notch",e.frontJoin),i.backJoin=new a("bnotch",e.backJoin),s("title",{at:e.titleAnchor,nr:3,title:"side",scale:.5}),n&&(c.fullSa?o.sa=s("sa",{paths:["side"]}):o.sa=s("sa",{paths:["sideFrontJoin","sideBand","sideBackJoin",null]})),s("grainline",{from:e.armpitBottom,to:new t(e.armpitBottom.x,e.cfBand.y)}),s("pd",{id:"sideBand",path:o.sideBand,d:n+15}),s("pd",{id:"sideFrontJoin",path:o.sideFrontJoin,d:n+15}),s("pd",{id:"sideBackJoin",path:o.sideBackJoin,d:n+15}),l}};const Ep={name:"sabrina.back",from:Lp,hide:{from:!0},plugins:[Pp.e2],draft:function({points:t,paths:e,Snippet:o,snippets:a,sa:i,macro:n,store:s,part:r,options:l}){return e.front.hide(),e.side.hide(),e.back.addClass("fabric"),t.titleAnchor=t.cbBand.shiftFractionTowards(t.cbNeck,.8).shiftFractionTowards(t.sbBand,.8),a.backJoin=new o("bnotch",t.backJoin),s.cutlist.setCut({cut:2,from:"fabric",onFold:!0}),n("title",{at:t.titleAnchor,nr:2,title:"back",scale:.5}),i&&(l.fullSa?e.sa=n("sa",{paths:["backSa",null]}):e.sa=n("sa",{paths:["backSideJoin","backBand",null,"backStrap",null]})),n("cutonfold",{from:t.cbBand,to:t.cbNeck,grainline:!0}),n("pd",{id:"backBand",path:e.backBand,d:i+15}),n("pd",{id:"backSideJoin",path:e.backSideJoin,d:i+15}),n("pd",{id:"backStrap",path:e.backStrap.reverse(),d:-i-15}),n("vd",{id:"backFold",from:t.cbNeck,to:t.cbBand,x:t.cbBand.x+15}),n("vd",{id:"backNeck",from:t.strapBackLeft,to:t.cbNeck,x:t.cbBand.x+15}),n("vd",{id:"backSide",from:t.strapBackRight,to:t.sbArmpitDartRight,x:Math.min(t.strapBackRight.x,t.sbArmpitDartRight.x)-15}),n("hd",{id:"backNeck",from:t.strapBackLeft,to:t.cbNeck,y:t.stra
1pBackLeft.y-15}),r}};const Wp={name:"sabrina.waistband",measurements:["chest"],after:Lp,options:{elasticWidth:(0,n.U1)("chest",{pct:2,min:.5,max:5,menu:"construction",snap:Ro.HJ}),waistbandEase:.05},plugins:[Pp.e2],draft:function({absoluteOptions:t,options:e,Point:o,Path:a,points:i,paths:s,sa:r,macro:l,units:c,expand:p,complete:d,store:h,part:m,measurements:f}){const u=h.get("waistband")/2,g=t.elasticWidth*(1+e.waistbandEase);if(!p){const t=r?2*r:0;return h.flag.note({msg:`sabrina:cut${(0,n.ZH)(m.name.split(".")[1])}`,notes:[r?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:c(2*u+t),l:c(2*g+t)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),h.flag.preset("expandIsOff"),m.hide()}return h.flag.preset("expandIsOn"),i.topLeft=new o(0,0),i.topRight=new o(2*g,0),i.topFold=new o(g,0),i.bottomLeft=new o(0,u),i.bottomRight=new o(i.topRight.x,u),i.bottomFold=new o(i.topFold.x,u),s.seam=(new a).move(i.bottomRight).line(i.topRight).line(i.topLeft).line(i.bottomLeft).close().addClass("fabric"),d&&(s.fold=(new a).move(i.topFold).line(i.bottomFold).addClass("various help")),r&&(s.sa=l("sa",{paths:[(new a).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight),null]})),i.title=new o(.45*i.bottomRight.x,i.bottomRight.y/3),l("vd",{id:"hFull",from:i.bottomRight,to:i.topRight,x:i.topRight.x+r+15}),l("hd",{id:"wFull",from:i.topLeft,to:i.topRight,y:i.topRight.y-r-15}),h.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),l("title",{at:i.title,nr:4,scale:g/45,rotation:90,title:"waistband"}),l("cutonfold",{from:i.topRight,to:i.topLeft,grainline:!0,scale:.5}),m}},Hp=new n.pT({data:Sp,parts:[Lp,Rp,Fp,Ep,Wp]}),Ap=JSON.parse('{"id":"sandy","name":"Sandy circle skirt","code":["Erica Alcusa S\xe1ez","Joost De Cock"],"description":"A FreeSewing pattern for a circle skirt","design":"Erica Alcusa S\xe1ez","difficulty":3,"tags":["bottoms","skirts"],"techniques":["curved-seam","button","hem"],"version":"4.6.0","pkg":"@freesewing/sandy","collection":true}'),Op={en:JSON.parse('{"t":"Sandy circle skirt","d":"Sandy is an adaptable circle skirt pattern.","p":{"skirt":"Skirt","waistband":"Waistband"},"s":{"cutWaistband.t":"The waistband is not shown","cutWaistband.d":"The **Waistband** (2) is a rectangular piece of fabric {{{ w }}} wide and {{{ l }}} long."},"o":{"waistbandWidth":{"t":"Waistband width","d":"Controls the width of the waistband."},"waistbandPosition":{"t":"Waistband position","d":"Controls the position of the waistband."},"waistbandShape":{"t":"Waistband shape","d":"Whether you want a straight or shaped waistband."},"waistbandShape.straight":{"t":"Straight waistband","d":"Draft a pattern with a straight waistband"},"waistbandShape.curved":{"t":"Curved waistband","d":"Draft a pattern with a curved waistband"},"circleRatio":{"t":"Circle ratio","d":"The percentage of a circle you want the skirt to be."},"waistbandOverlap":{"t":"Waistband overlap","d":"The amount by which the waistband overlaps."},"gathering":{"t":"Gathering","d":"The percent by which the top of the skirt is longer than the bottom of the waistband."},"lengthBonus":{"t":"Length bonus","d":"Determines how long the skirt will be."},"seamlessFullCircle":{"t":"Seamless full circle","d":"Enables a seamless full circle skirt."},"seamlessFullCircleNo":{"t":"Draft less than a full circle skirt","d":"Drafts a pattern for the exact circle ratio you request"},"seamlessFullCircleYes":{"t":"Draft a pattern for a full circle skirt","d":"This allows you to cut the skirt on a double-fold"},"hemWidth":{"t":"Hem width","d":"Width of the hem"},"panels":{"t":"Panels","d":"Number of panels"}}}')};var Dp=o(66348);const Np={name:"sandy.skirt",measurements:["waist","waistToFloor","waistToHips","hips"],options:{minimumOverlap:15,seamlessFullCircle:{bool:!1,menu:"construction"},waistbandWidth:{pct:4,min:1,max:8,snap:Ro.HJ,...(0,n.Wx)("waistToFloor"),menu:"style"},waistbandPosition:{pct:50,min:0,max:100,menu:"fit"},lengthBonus:{pct:50,min:10,max:100,menu:"style"},circleRatio:{pct:50,min:20,max:100,menu:"style"},waistbandOverlap:{pct:3,min:0,max:15,menu:"style"},gathering:{pct:0,min:0,max:200,menu:"style"},hemWidth:{pct:2,min:1,max:10,menu:"construction"},waistbandShape:{list:["straight","curved"],dflt:"straight",menu:"fit"},panels:{count:1,min:1,max:8,menu:"construction"}},plugins:Dp.k_,draft:function({utils:t,store:e,sa:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,options:l,measurements:c,macro:p,absoluteOptions:d,part:h}){let m,f;
1if(e.set("topCircumference",l.waistbandPosition*c.hips+(1-l.waistbandPosition)*c.waist),"curved"===l.waistbandShape?e.set("bottomCircumference",e.get("topCircumference")+d.waistbandWidth*(c.hips-c.waist)/c.waistToHips):e.set("bottomCircumference",e.get("topCircumference")),e.set("waistbandOverlap",e.get("topCircumference")*l.waistbandOverlap),e.set("skirtCircumference",e.get("bottomCircumference")*(1+l.gathering)),e.set("fullLength",c.waistToFloor-c.waistToHips*l.waistbandPosition),l.seamlessFullCircle)f=90,m=e.get("skirtCircumference")/t.deg2rad(f)/4;else{const a=180*l.circleRatio;if(f=a/l.panels,m=e.get("skirtCircumference")/t.deg2rad(a)/2,f>90&&o){const e=t.rad2deg(Math.atan(m/o));f>90+e&&(f=90+e)}}const u=p("ringsector",{angle:f,insideRadius:m,outsideRadius:m+e.get("fullLength")*l.lengthBonus-d.waistbandWidth,rotate:!0}),g=u.paths.path;n.seam=n[g].clone().addClass("fabric"),n[g].hide();for(const[b,w]of Object.entries(u.points))a[b]=a[w].copy(),a[w+"Rotated"]&&(a[b+"Rotated"]=a[w+"Rotated"].copy());return a.gridAnchor=a.in2Flipped.clone(),o&&(n.hemBase=(new i).move(a.ex2Flipped).curve(a.ex2cFlipped,a.ex1cFlipped,a.ex1).curve(a.ex1c,a.ex2c,a.ex2).offset(e.get("fullLength")*l.lengthBonus*l.hemWidth),n.saBase=(new i).move(a.in2).curve(a.in2c,a.in1c,a.in1).curve(a.in1cFlipped,a.in2cFlipped,a.in2Flipped),l.seamlessFullCircle||(n.saBase=(new i).move(a.ex2).line(a.ex2).join(n.saBase)),n.saBase=n.saBase.offset(o),n.hemBase.hide(),n.saBase.hide(),l.seamlessFullCircle?n.sa=(new i).move(a.ex2Flipped).line(n.hemBase.start()).join(n.hemBase).line(a.ex2).move(a.in2).line(n.saBase.start()).join(n.saBase).line(a.in2Flipped).attr("class","fabric sa"):n.sa=(new i).move(a.ex2Flipped).line(n.hemBase.start()).join(n.hemBase).line(n.saBase.start()).join(n.saBase).line(a.in2Flipped).attr("class","fabric sa")),e.cutlist.setCut({cut:l.seamlessFullCircle?1:Number(l.panels),from:"fabric",onFold:!0,identical:!0}),p("cutonfold",{from:a.in2Flipped,to:a.ex2Flipped,grainline:!0}),l.seamlessFullCircle&&p("cutonfold",{from:a.ex2,to:a.in2,id:"double",reverse:!0}),a.logo=a.in2FlippedRotated.shiftFractionTowards(a.ex2FlippedRotated,l.seamlessFullCircle?.3:.1),r.logo=new s("logo",a.logo),a.title=a.in2FlippedRotated.shiftFractionTowards(a.ex2FlippedRotated,l.seamlessFullCircle?.5:.25),p("title",{at:a.title,nr:1,title:"skirt"}),a.scalebox=a.in2FlippedRotated.shiftFractionTowards(a.ex2FlippedRotated,l.seamlessFullCircle?.7:.45),p("scalebox",{at:a.scalebox}),p("sprinkle",{snippet:"notch",on:["in2","gridAnchor"]}),r.center=new s("bnotch",a.center),p("vd",{id:"hLeft",from:a.ex2Flipped,to:a.in2Flipped,x:a.ex2Flipped.x-o-15}),p("vd",{id:"hToOpeningLeft",from:a.in2Flipped,to:a.center,x:a.ex2Flipped.x-o-15}),p("vd",{id:"hFull",from:a.ex2Flipped,to:a.center,x:a.ex2Flipped.x-o-30}),90!==f&&(p("vd",{id:"hTopToOpeningRight",from:a.ex2,to:a.in2,x:f>90?a.in2.x-o-15:a.ex2.x+o+15}),p("vd",{id:"hOpeningRightToCenter",from:a.in2,to:a.center,x:f>90?a.in2.x-o-15:a.ex2.x+o+15}),p("vd",{id:"hHemRightToCenter",from:a.ex2,to:a.center,x:f>90?a.in2.x-o-30:a.ex2.x+o+30}),p("hd",{id:"wHemToOpeningRight",from:a.ex2,to:a.in2,y:f<90?a.center.y-o-15:a.ex2.y-o-15}),p("hd",{id:"wOpeningRightToCenter",from:a.center,to:a.in2,y:f<90?a.center.y-o-15:a.ex2.y-o-15}),p("hd",{id:"wHemToCenter",from:a.center,to:a.ex2,y:f<90?a.center.y-o-30:a.ex2.y-o-30})),h}};const Ip={name:"sandy.waistband",after:Np,draft:t=>"curved"===t.options.waistbandShape?function({utils:t,store:e,sa:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,options:l,macro:c,absoluteOptions:p,part:d}){const h=t.rad2deg(e.get("bottomCircumference")-e.get("topCircumference"))/p.waistbandWidth,m=e.get("topCircumference")/t.deg2rad(h),f=t.rad2deg(e.get("waistbandOverlap")/(m+p.waistbandWidth)),u=c("ringsector",{angle:h+f,insideRadius:m,outsideRadius:m+p.waistbandWidth}),g=u.paths.path;n.seam=n[g].clone().addClass("fabric"),n[g].hide();for(const[b,w]of Object.entries(u.points))a[b]=a[w].copy(),a[w+"Rotated"]&&(a[b+"Rotated"]=a[w+"Rotated"].copy());return o&&(n.sa=n.seam.offset(o).addClass("fabric sa")),e.cutlist.setCut({cut:1,from:"fabric"}),a.gridAnchor=a.in1.clone(),a.title=a.ex2Flipped.shiftFractionTowards(a.ex2,.5),c("title",{at:a.title,nr:2,t
1itle:"curvedWaistband",scale:.5}),c("grainline",{from:a.ex2Flipped,to:a.ex2}),e.get("waistbandOverlap")>=l.minimumOverlap&&(a.pivot=a.in2.shiftFractionTowards(a.ex2,.5),a.button=a.pivot.shiftTowards(a.ex2,e.get("waistbandOverlap")/2).rotate(-90,a.pivot),a.buttonhole=a.button.flipX(),r.button=new s("button",a.button),r.buttonhole=new s("buttonhole",a.buttonhole).rotate(a.in2.angle(a.ex2)),a.centerNotch=(new i).move(a.ex1Rotated).circleSegment(-(h+f),a.center).shiftAlong(e.get("waistbandOverlap")/2),a.buttonNotch=(new i).move(a.ex2Rotated).circleSegment(h+f,a.center).shiftAlong(e.get("waistbandOverlap")),c("sprinkle",{snippet:"notch",on:["centerNotch","buttonNotch","ex2Flipped"]})),c("hd",{id:"wTop",from:a.in2FlippedRotated,to:a.in2,y:a.in2.y-o-15}),c("hd",{from:a.ex2FlippedRotated,id:"wFull",to:a.ex2,y:a.in2.y-o-30}),c("vd",{id:"hFull",from:a.ex1,to:a.in2,x:a.in2.x+o+40}),c("ld",{id:"lWidth",from:a.ex2,to:a.in2,d:-1*o-15}),d}(t):function({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,units:l,macro:c,expand:p,absoluteOptions:d,part:h}){if(!p){const o=e?2*e:0;return t.flag.note({msg:"sandy:cutWaistband",notes:[e?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:l(2*d.waistbandWidth+o),l:l(t.get("topCircumference")+t.get("waistbandOverlap")+o)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),t.flag.preset("expandIsOff"),h.hide()}return t.flag.preset("expandIsOn"),a.center=new o(0,0),a.centerLeft=new o(t.get("topCircumference")/-2,0),a.centerRight=new o(t.get("topCircumference")/2+t.get("waistbandOverlap"),0),a.topRight=a.centerRight.shift(90,d.waistbandWidth),a.topLeft=a.centerLeft.shift(90,d.waistbandWidth),a.bottomRight=a.topRight.flipY(),a.bottomLeft=a.topLeft.flipY(),n.seam=(new i).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).line(a.topLeft).close().attr("class","fabric"),n.fold=(new i).move(a.centerRight).line(a.centerLeft).attr("class","fabric dashed"),e&&(n.sa=n.seam.offset(e).attr("class","fabric sa")),t.cutlist.setCut({cut:1,from:"fabric"}),a.title=a.center.shiftFractionTowards(a.centerRight,.5),c("title",{at:a.title,nr:2,title:"straightWaistband"}),a.grainlineFrom=a.centerLeft.shiftFractionTowards(a.topLeft,.5),a.grainlineTo=a.grainlineFrom.flipX(),c("grainline",{from:a.grainlineFrom,to:a.grainlineTo}),a.button=a.centerRight.shiftFractionTowards(a.bottomRight,.5).shift(180,t.get("waistbandOverlap")/2),a.buttonhole=a.centerLeft.shiftFractionTowards(a.bottomLeft,.5).shift(0,t.get("waistbandOverlap")/2),r.button=new s("button",a.button),r.buttonhole=new s("buttonhole",a.buttonhole),a.centerNotch=new o(-1*t.get("waistbandOverlap")/2,a.bottomLeft.y),a.buttonNotch=a.bottomRight.shift(180,t.get("waistbandOverlap")),c("sprinkle",{snippet:"notch",on:["centerNotch","buttonNotch","bottomLeft"]}),c("hd",{id:"wFull",from:a.bottomLeft,to:a.bottomRight,y:a.bottomLeft.y+e+15}),c("vd",{id:"hFull",from:a.bottomRight,to:a.topRight,x:a.topRight.x+e+15}),h}(t)},Mp=new n.pT({data:Ap,parts:[Np,Ip]}),_p=JSON.parse('{"id":"sarah","code":"Timur Duehr","design":"Timur Duehr","description":"A FreeSewing pattern for a basic skirt block pattern based on Aldrich","name":"Sarah skirt block","difficulty":2,"tags":["skirts","bottoms","blocks"],"techniques":["hem","curved-seam","block","dart"],"block":true,"version":"4.6.0","pkg":"@freesewing/sarah","collection":true}');function jp(){return{toAbs:(t,{measurements:e},o)=>t*(e.waist+o.waistDrop*(e.hips-e.waist)-e.seat),fromAbs:(t,{measurements:e},o)=>Math.round(1e4*t/(e.waist+o.waistDrop*(e.hips-e.waist)-e.seat))/1e4}}function Gp(){return{toAbs:(t,{measurements:e},o)=>t*(e.waistToSeat-o.waistDrop*e.waistToHips),fromAbs:(t,{measurements:e},o)=>Math.round(1e4*t/(e.waistToSeat-o.waistDrop*e.waistToHips))/1e4}}const Up={name:"sarah.base",draft:function({Path:t,Point:e,paths:o,points:a,measurements:i,options:s,part:r,store:l,sa:c,expand:p}){!s.showExpandNotification||s.centerFrontSeam&&s.centerBackSeam||(p?l.flag.preset("expandIsOn"):l.flag.preset("expandIsOff"));const d=i.waist-s.waistDrop*(i.hips-i.waist);l.set("sarah.waistline",d);const h=(1+s.extraWaistEase)*d;l.set("sarah.waistlineEased",h);const m=(1+s.extraSeatEase)*i.seat;l.set("sarah.seatEased",m);const f=i.seat-d;l.set("sarah.seatWaistDiff",f);const u=f*s.seatEase;l.set("sarah.seatEase",u);const g=s.waistEaseFront*f;l.set("sarah.waistEaseFront",g);const b=i.waistToSeat-s.waistDrop*i.waistToHips;
1l.set("sarah.waistToSeat",b);const w=g;l.set("sarah.frontDartWidth",w);const k=w/2,C=s.waistEaseBack*f;l.set("sarah.waistEaseBack",C);const v=s.waistRise*f;l.set("sarah.waistRise",v);const y=C/4,T=s.backOutsideDartLength*b;l.set("sarah.backOutsideDartLength",T);const x=s.backInsideDartLength*b;l.set("sarah.backInsideDartLength",x);const B=s.frontDartLength*b;l.set("sarah.frontDartLength",B);const S=s.length*(i.waistToFloor- -s.waistDrop*i.waistToHips);l.set("sarah.length",S);const L=s.sideSeamCurveOffset*f,P=s.hem*(c||10);l.set("sarah.hem",P);const R=h/4+C,F=h/4+g;a.cbTop=new e(0,0),a.cbSeat=a.cbTop.shift(270,b),a.cbBottom=a.cbTop.shift(270,S),a.sideBottom=a.cbBottom.shift(0,m/4+u),a.sideSeat=a.cbSeat.shift(0,m/4+u),a.sbWaist=new e(R,0),a.sbTop=a.sbWaist.shift(90,v),a.backInsideDartCenter=a.cbTop.shiftFractionTowards(a.sbTop,1/3),a.backInsideDartBottom=a.backInsideDartCenter.shift(a.backInsideDartCenter.angle(a.cbTop)+90,x),a.backOutsideDartCenter=a.cbTop.shiftFractionTowards(a.sbTop,2/3),a.backOutsideDartBottom=a.backOutsideDartCenter.shift(a.backOutsideDartCenter.angle(a.cbTop)+90,T),a.backInsideDartLeft=a.backInsideDartCenter.shiftTowards(a.cbTop,y),a.backInsideDartRight=a.backInsideDartCenter.shiftTowards(a.sbTop,y),a.backOutsideDartLeft=a.backOutsideDartCenter.shiftTowards(a.cbTop,y),a.backOutsideDartRight=a.backOutsideDartCenter.shiftTowards(a.sbTop,y);const E=a.cbTop.dist(a.backInsideDartLeft),W=a.backInsideDartRight.dist(a.backOutsideDartLeft),H=a.backOutsideDartRight.dist(a.sbTop);a.cbTopCp=a.cbTop.shiftTowards(a.sbWaist,.5*E*n.Qr),a.bidLCp=a.backInsideDartLeft.shift(a.backInsideDartLeft.angle(a.backInsideDartBottom)+-90,.5*E*n.Qr),a.bidRCp=a.backInsideDartRight.shift(a.backInsideDartRight.angle(a.backInsideDartBottom)+90,.5*W*n.Qr),a.bodLCp=a.backOutsideDartLeft.shift(a.backOutsideDartLeft.angle(a.backOutsideDartBottom)+-90,.5*W*n.Qr),a.bodRCp=a.backOutsideDartRight.shift(a.backOutsideDartRight.angle(a.backOutsideDartBottom)+90,.5*H*n.Qr),a.sbtCp=a.sbTop.shift(a.sbTop.angle(a.sideSeat)+-90,.5*H*n.Qr),a.ssh=a.sbTop.shiftFractionTowards(a.sideSeat,.5),a.sbTop.dist(a.ssh),a.sshCpC=a.ssh.shift(a.ssh.angle(a.sbTop)+270,L),a.sshTCp=a.sshCpC.shift(a.sshCpC.angle(a.ssh)+270,.5*a.sbTop.dist(a.ssh)*n.Qr),a.sshBCp=a.sshCpC.shift(a.sshCpC.angle(a.ssh)+90,.5*a.ssh.dist(a.sideSeat)*n.Qr),a.cfTop=a.cbTop.shift(0,i.seat/2+u),a.cfSeat=a.cfTop.shift(-90,b),a.cfBottom=a.cfTop.shift(-90,S),a.sfWaist=a.cfTop.shiftTowards(a.cbTop,F),a.sfTop=a.sfWaist.shift(90,v),a.frontDartCenter=a.sfTop.shiftFractionTowards(a.cfTop,1/3),a.frontDartBottom=a.frontDartCenter.shift(a.frontDartCenter.angle(a.cfTop)+-90,B),a.frontDartRight=a.frontDartCenter.shiftTowards(a.cfTop,k),a.frontDartLeft=a.frontDartCenter.shiftTowards(a.sfTop,k);const A=a.sfTop.dist(a.frontDartLeft),O=a.cfTop.dist(a.frontDartRight);return a.fdrCp=a.frontDartRight.shift(a.frontDartRight.angle(a.frontDartBottom)+90,.5*O*n.Qr),a.sftCp=a.sfTop.shift(a.sfTop.angle(a.sideSeat)+90,.5*A*n.Qr),a.fdlCp=a.frontDartLeft.shift(a.frontDartLeft.angle(a.frontDartBottom)+-90,.5*A*n.Qr),a.cftCp=a.cfTop.shiftTowards(a.sfWaist,.5*O*n.Qr),a.sfh=a.sideSeat.shiftFractionTowards(a.sfTop,.5),a.sfhCpC=a.sfh.shift(a.sfh.angle(a.sideSeat)+-90,L),a.sfhTCp=a.sfhCpC.shift(a.sfhCpC.angle(a.sfh)+90,.5*a.sfh.dist(a.sfTop)*n.Qr),a.sfhBCp=a.sfhCpC.shift(a.sfhCpC.angle(a.sfh)+-90,.5*a.sfh.dist(a.sideSeat)*n.Qr),r},hide:{self:!0},measurements:["waist","seat","waistToSeat","waistToFloor","hips","waistToHips"],options:{paperlessOffset:15,showExpandNotification:!0,centerFrontSeam:{bool:!1,menu:"style"},centerBackSeam:{bool:!1,menu:"style"},waistDrop:{pct:0,min:0,max:100,menu:"style"},seatEase:{pct:6.25,min:0,max:20,...jp(),menu:"advanced"},waistEaseFront:{pct:10,min:0,max:20,...jp(),menu:"advanced"},waistEaseBack:{pct:17,min:0,max:30,...jp(),menu:"advanced"},extraSeatEase:{pct:0,min:-20,max:20,...(0,n.Wx)("seat"),menu:"fit"},extraWaistEase:{pct:0,min:-20,max:20,toAbs:(t,{measurements:e},o)=>t*(e.waist+o.waistDrop*(e.hips-e.waist)),fromAbs:(t,{measurements:e},o)=>Math.round(1e4*t/(e.waist+o.waistDrop*(e.hips-e.waist)))/1e4,menu:"fit"},waistRise:{pct:6,min:0,max:10,...jp(),menu:"advanced"},sideSeamCurveOffset:{pct:2.5,min:0,max:5,...jp(),menu:"advanced"},backOutsideDartLength:{pct:63,min:50,max:75,...Gp(),menu:"advanced"},backInsideDartLength:{pct:68,min:50,max:75,...Gp(),menu:"advanced"},frontDartLength:{pct:58,min:40,max:80,...Gp(),menu:"advanced"},length:{pct:100,min:25,max:100,toAbs:(t,{measurements:e},o)=>t*(e.waistToFloor-o.waistDrop*e.waistToHips),fromAbs:(t,{measurements:e},o)=>Math.round(1e4*t/(e.waistToFloor-o.waistDrop*e.waistToHips))/1e4,menu:"style"},hem:{pct:300,min:100,max:900,fromAbs:function(t,e){return t/(e.sa?e.sa:10)},toAbs:function(t,e){return t*(e.sa?e.sa:10)},menu:t=>t?"style":null}}},Yp={name:"sarah.front",plugins:[Pp.e2],from:Up,draft:({points:t,Point:e,Path:o,paths:a,options:i,sa:n,macro:s,part:r,
1store:l,snippets:c,Snippet:p,complete:d,paperless:h,expand:m})=>{const f=i.paperlessOffset;if(a.sideFront=(new o).move(t.sfTop).curve(t.sfhTCp,t.sfhTCp,t.sfhCpC).curve(t.sfhBCp,t.sfhBCp,t.sideSeat).line(t.sideBottom),a.frontBottom=(new o).move(t.sideBottom).line(t.cfBottom),a.centerFront=(new o).move(t.cfBottom).line(t.cfTop).hide(),a.frontTopNoDart=(new o).move(t.cfTop).curve(t.cftCp,t.fdrCp,t.frontDartRight).noop("frontDart").curve(t.fdlCp,t.sftCp,t.sfTop),d?(a.frontTop=a.frontTopNoDart.insop("frontDart",(new o).move(t.frontDartRight).line(t.frontDartBottom).line(t.frontDartLeft)),a.helpers=(new o).move(t.frontDartRight).line(t.frontDartLeft).setClass("mark dashed"),a.frontTopNoDart.hide()):a.frontTop=a.frontTopNoDart.clone().insop("frontDart",(new o).move(t.frontDartRight).line(t.frontDartLeft)),m&&!i.centerFrontSeam?(s("mirror",{mirror:[a.centerFront.start(),a.centerFront.end()],clone:!0,paths:["frontTop","helpers","sideFront","frontTopNoDart","frontBottom"]}),a.frontTop=a.mirroredFrontTop.reverse().join(a.frontTop),a.mirroredSideFront=a.mirroredSideFront.reverse(),a.frontTopNoDart=a.mirroredFrontTopNoDart.reverse().join(a.frontTopNoDart).hide(),a.frontBottom=a.frontBottom.join(a.mirroredFrontBottom.reverse())):a.centerFront.unhide(),n){const t=l.get("sarah.hem");a.frontHem=s("hem",{class:"fabric",path2:m?"mirroredSideFront":"centerFront",path1:"sideFront",hemWidth:t,offset2:m?null:0}),a.frontSa=s("sa",{paths:["sideFront",{p:"frontHem",offset:0},m?"mirroredSideFront":null,"frontTopNoDart"]})}return i.centerFrontSeam?(t.gftop=t.cfTop.shift(0,-i.paperlessOffset),t.gfbottom=t.cfBottom.shift(0,-i.paperlessOffset),s("grainline",{from:t.gftop,to:t.gfbottom,grainline:!0}),l.cutlist.addCut({cut:2,onFold:!1})):(l.cutlist.addCut({cut:1,onFold:!m}),s(m?"grainline":"cutOnFold",{from:t.cfTop,to:t.cfBottom,grainline:!0,offset:-f})),s("vd",{id:"centerFront",from:t.cfTop,to:t.cfBottom,x:t.cfTop.x+f+n}
1),s("vd",{id:"waistRise",to:t.sfTop,from:t.sfWaist,x:t.sbTop.x+f+n}),s("ld",{id:"sf2frontDart",from:t.sfTop,to:t.frontDartLeft,d:n+f}),s("ld",{id:"frontDart2centerFront",from:t.frontDartRight,to:t.cfTop,d:n+f}),s("ld",{id:"frontDart",to:t.frontDartRight,from:t.frontDartLeft,d:n+2*f,noStartMarker:!0,noEndMarker:!0}),s("ld",{id:"frontDartLength",from:t.frontDartCenter,to:t.frontDartBottom,d:f}),s("hd",{id:"waist",from:t.cfTop,to:t.sfWaist,y:t.sfWaist.y+f}),s("hd",{id:"hem",to:t.cfBottom,from:t.sideBottom,y:t.sideBottom.y+f}),t.title=t.cfSeat.shiftFractionTowards(t.sideSeat,.5).shift(270,t.cfSeat.dist(t.cfBottom)/2),t.logo=t.title.shift(90,100),c.logo=new p("logo",t.logo),s("title",{at:t.title,nr:2,title:"front",align:"center",scale:.8}),!h&&d&&(t.miniscale=t.__macro_title_title_notes.shift(-90,i.paperlessOffset),s("miniscale",{at:t.miniscale})),r}},$p={name:"sarah.back",plugins:[Pp.e2],from:Up,draft:({points:t,Point:e,Path:o,paths:a,options:i,sa:n,macro:s,part:r,store:l,snippets:c,Snippet:p,complete:d,paperless:h,expand:m})=>{const f=i.paperlessOffset;if(a.centerBack=(new o).move(t.cbTop).line(t.cbBottom),a.backBottom=(new o).move(t.cbBottom).line(t.sideBottom),a.sideBack=(new o).move(t.sideBottom).line(t.sideSeat).curve(t.sshBCp,t.sshBCp,t.sshCpC).curve(t.sshTCp,t.sshTCp,t.sbTop),a.backTopNoDarts=(new o).move(t.sbTop).curve(t.sbtCp,t.bodRCp,t.backOutsideDartRight).noop("backOutsideDart").curve(t.bodLCp,t.bidRCp,t.backInsideDartRight).noop("backInsideDart").curve(t.bidLCp,t.cbTopCp,t.cbTop).hide(),d?(a.backTop=a.backTopNoDarts.insop("backOutsideDart",(new o).line(t.backOutsideDartBottom).line(t.backOutsideDartLeft)).insop("backInsideDart",(new o).line(t.backInsideDartBottom).line(t.backInsideDartLeft)).unhide(),a.helpers=(new o).move(t.backOutsideDartRight).line(t.backOutsideDartLeft).move(t.backInsideDartRight).line(t.backInsideDartLeft).setClass("mark dashed")):a.backTop=a.backTopNoDarts.insop("backOutsideDart",(new o).move(t.backOutsideDartRight).line(t.backOutsideDartLeft)).insop("backInsideDart",(new o).move(t.backInsideDartRight).line(t.backInsideDartLeft)).unhide(),m&&!i.centerBackSeam?(s("mirror",{mirror:[a.centerBack.start(),a.centerBack.end()],clone:!0,paths:["helpers","backBottom","backTop","sideBack","backTopNoDarts"]}),a.centerBack.hide(),a.backBottom=a.mirroredBackBottom.reverse().join(a.backBottom),a.backTop=a.backTop.join(a.mirroredBackTop.reverse()),a.backTopNoDarts=a.backTopNoDarts.join(a.mirroredBackTopNoDarts.reverse()).hide(),a.mirroredSideBack=a.mirroredSideBack.reverse()):a.backTop.unhide(),n){const t=l.get("sarah.hem");i.centerBackSeam?(a.backHem=s("hem",{class:"fabric",path1:"centerBack",path2:"sideBack",hemWidth:t}),a.backSa=s("sa",{paths:["centerBack",{p:"backHem",offset:0},"sideBack","backTopNoDarts"]})):(a.backHem=s("hem",{class:"fabric",path1:m?"mirroredSideBack":"centerBack",path2:"sideBack",hemWidth:t,offset1:m?null:0}),a.backSa=s("sa",{paths:[{p:"backHem",offset:0},"sideBack","backTopNoDarts",m?"mirroredSideBack":null]}))}return i.centerBackSeam?(l.cutlist.addCut({cut:2,onFold:!1}),t.gtop=t.cbTop.shift(0,i.paperlessOffset),t.gbottom=t.cbBottom.shift(0,i.paperlessOffset),s("grainline",{from:t.gtop,to:t.gbottom,grainline:!0})):(l.cutlist.addCut({cut:1,onFold:!m}),s(m?"grainline":"cutOnFold",{from:t.cbTop,to:t.cbBottom,grainline:!0})),s("vd",{id:"centerBack",from:t.cbTop,to:t.cbBottom,x:-f-n}),s("vd",{id:"waistRise",to:t.sbTop,from:t.sbWaist,x:t.sbTop.x+f+n}),s("ld",{id:"cb2insideDart",from:t.cbTop,to:t.backInsideDartLeft,d:n+f}),s("ld",{id:"insideDart2outsideDart",from:t.backInsideDartRight,to:t.backOutsideDartLeft,d:n+f}),s("ld",{id:"outsideDart2side",from:t.backOutsideDartRight,to:t.sbTop,d:n+f}),s("ld",{id:"insideDartLength",from:t.backInsideDartCenter,to:t.backInsideDartBottom,d:f}),s("ld",{id:"insideDart",to:t.backInsideDartRight,from:t.backInsideDartLeft,d:n+2*f,noStartMarker:!0,noEndMarker:!0}),s("ld",{id:"outsideDart",to:t.backOutsideDartRight,from:t.backOutsideDartLeft,d:n+2*f,noStartMarker:!0,noEndMarker:!0}),s("ld",{id:"outsideDartLength",from:t.backOutsideDartCenter,to:t.backOutsideDartBottom,d:f}),s("hd",{id:"waist",from:t.cbTop,to:t.sbWaist,y:t.sbWaist.y+f}),s("hd",{id:"hem",from:t.cbBottom,to:t.sideBottom,y:t.sideBottom.y+f}),t.title=t.cbSeat.shiftFractionTowards(t.sideSeat,.5).shift(270,t.cbSeat.dist(t.cbBottom)/2),t.logo=t.title.shift(90,100),c.logo=new p("logo",t.logo),s("title",{at:t.title,nr:1,title:"back",align:"center",scale:.8}),!h&&d&&(t.miniscale=t.__macro_title_title_notes.shift(-90,i.paperlessOffset),s("miniscale",{at:t.miniscale})),r}},zp={en:JSON.parse('{"t":"Sarah Skirt Block","d":"A FreeSewing pattern for a basic skirt block pattern based on Aldrich","p":{"back":"Back","front":"Front","base":"Base"},"s":{},"o":{"centerFrontSeam":{"t":"Center Front Seam","d":"Create seam in center front (e.g., for zipper)."},"centerFrontSeamYes":{"t":"Add Seam to Center Front","d":"Allows a zipper to be added to center front."},"centerFrontSeamNo":{"t":"No Seam in Center Front","d":"Creates a flat front panel."},"centerBackSeam":{"t":"Center Back Seam","d":"Disable for single center back piece."},"centerBackSeamYes":{"t":"Add Seam to Center Back","d":"Seam in center of back panel. (e.g., for zipper)"},"centerBackSeamNo":{"t":"Solid Back Piece","d":"Creates flat back panel."},"waistDrop":{"t":"Waist Drop","d":"Waistline drop from waist toward hips"},"seatEase":{"t":"Seat Ease","d":"Ease added to seat measurement"},"waistEaseFront":{"t":"Front Waist Ease","d":"Ease added to front waistline"},"waistEaseBack":{"t":"Back Waist Ease","d":"Ease added to back waistline."},"extraSeatEase":{"t":"Extra Seat Ease","d":"Ease added to seat measurement to account for fabric stretch and closure style."},"extraWaistEase":{"t":"Extra Waist Ease","d":"Ease added to waistline"},"waistRise":{"t":"Waist Rise","d":"Rise of waistline between front/back center and sides"},"sideSeamCurveOffset":{"t":"Side Seam Curve Offset","d":"Offset from line between side seat and front/back side top to 
1shape hip/seat curve"},"backOutsideDartLength":{"t":"Back Outside Dart Length","d":"Length of the outside darts on the back"},"backInsideDartLength":{"t":"Back Inside Dart Length","d":"Length of inside darts on back"},"frontDartLength":{"t":"Front Dart Length","d":"Length of darts on front"},"length":{"t":"Length","d":"Skirt length"},"hem":{"t":"Hem","d":"Hem width"}}}')},Jp=new n.pT({data:_p,parts:[Yp,$p]}),Kp=JSON.parse('{"id":"shelly","name":"Shelly swim shirt","code":"Thrunic","description":"A FreeSewing pattern for a raglan shirt, perfect for swim shirts","design":"Thrunic","difficulty":2,"tags":["tops","swimwear"],"techniques":["hem","stretch","curved-seam","raglan-sleeve"],"version":"4.6.0","pkg":"@freesewing/shelly","collection":true}'),Vp={en:JSON.parse('{"t":"Shelly swimshirt","d":"Shelly is a raglan shirt, perfect for swimshirts and rashguards","p":{"base":"Base","back":"Back","front":"Front","neckband":"Neckband","raglanSleeve":"Sleeve"},"s":{"foldLine":"Fold line"},"o":{"hemWidth":{"t":"Hem width","d":"Sets the hem allowance along the bottom of the body of the shirt, as a multiple of the seam allowance."},"sleeveHem":{"t":"Sleeve hem","d":"Sets the hem allowance of the hem along the end of the sleeves, as a multiple of the seam allowance."},"chestEase":{"t":"Chest ease","d":"Controls how wide the shirt will be at your chest."},"neckBalance":{"t":"Neck position","d":"Controls where the neck hole is placed on the shirt."},"neckEase":{"t":"Neck ease","d":"Controls how large the neck hole is."},"neckbandLength":{"t":"Neckband length","d":"Controls how long the neckband is, as a percentage of the circumference of the neckline."},"neckbandWidth":{"t":"Neckband width","d":"Controls how wide the finished neckband will be, as a percentage of the neckline circumference."},"sleeveEase":{"t":"Sleeve ease","d":"Affects how wide the sleeve is at the armhole on all shirts, and has some affect on the width at the hem of short sleeved shirts."},"wristEase":{"t":"Wrist ease","d":"Affects how wide the end of the sleeve is on sleeves that extend past the biceps. The effect is greater on longer sleeves."},"armpitEase":{"t":"Armpit ease","d":"Gives more room in the armpit by shifting the sleeve down the body."},"bodyLength":{"t":"Body length","d":"Controls how long the shirt is."},"sleeveLength":{"t":"Sleeve length","d":"Controls the how long the sleeves of your shirt will be."},"hipsEase":{"t":"Hips ease","d":"Controls how wide your shirt will be at the bottom hem. This option is only used if the straight sides option is disabled."},"raglanScoopLength":{"t":"Raglan scoop length","d":"Controls how far out from the armhole the raglan seam starts to scoop."},"raglanScoopMagnitude":{"t":"Raglan scoop depth","d":"Controls how much extra material to place under the armpits."},"sideShape":{"t":"Body shape","d":"Controls how the side seam is curved. This option is ignored if the straight sides option is enabled."},"straightSides":{"t":"Straight Sides","d":"Forms a tubular shirt, which is a shirt where the hips and chest are the same width and connected by a straight seam."}}}')};const Xp={name:"shelly.base",plugins:[A],draft:function({utils:t,Path:e,Point:o,paths:a,points:i,measurements:n,options:s,part:r,store:l,sa:c,macro:p,snippets:d,Snippet:h,scale:m}){const f=n.biceps*s.armholeTweakFactor*(1+s.sleeveEase)/Math.PI,u=s.straightSides?s.chestEase:s.hipsEase,g=n.hpsToWaistBack-n.waistToArmpit+f*s.armpitEase,b=(s.straightSides?Math.max(n.chest*(1+s.chestEase),n.hips*(1+u)):n.chest*(1+s.chestEase))-s.raglanScoopMagnitude*g*4,w=s.bodyLength*(n.hpsToWaistBack+n.waistToHips),k=n.neck*(1+s.neckEase)/(2*Math.PI),C=n.hips*(1+u);l.set("neckRadius",k),i.raglanCenter=new o(0,0),i.neckCenter=i.raglanCenter.shift(270,s.neckBalance*k),i.armpitCorner=new o(b/4,g).translate(0,Math.max(0,n.biceps*s.armholeTweakFactor*s.sleeveEase/(2*Math.PI))),i.neckShoulderCorner=t.beamIntersectsCircle(i.neckCenter,k,i.raglanCenter,i.armpitCorner)[1],i.cfHem=new o(0,w),i.sideHem=new o(C/4,w),i.cfNeck=i.neckCenter.shift(270,k);const v=i.neckShoulderCorner.angle(i.armpitCorner);l.set("raglanAngle",v);const y=i.raglanCenter.dist(i.armpitCorner);l.set("raglanLength",y);const T=2*i.cfNeck.angle(i.neckShoulderCorner),x=t.deg2rad(T)*k;i.neckCP1=i.neckShoulderCorner.shift(T+180,x/3),i.neckCP2=i.cfNeck.shift(0,x/3);const B=v-(T+180);l.set("frontNecklineToRaglanAngle",B),i.armpitCornerScooped=i.armpitCorner.shift(v+90,s.raglanScoopMagnitude*y),i.armpitScoopCp1=i.armpitCorner.shift(v+180,1/3*s.raglanScoopLength*y),i.armpitScoopCp2=i.armpitCorner.shift(v+180,2/3*s.raglanScoopLength*y),i.armpitScoopEnd=i.armpitCorner.shift(v+180,s.raglanScoopLength*y),s.straightSides&&(i.sideHem.x=Math.max(i.armpitCornerScooped.x,i.sideHem.x)),i.sideHem.y<i.armpitCornerScooped.y&&(i.sideHem.y=i.armpitCornerScooped.y,i.cfHem.y=i.armpitCornerScooped.y);const S=i.sideHem.angle(i.armpitCornerScooped),L=i.sideHem.dist(i.armpitCornerScooped);return i.sideCp1=i.sideHem.shift(S,1/3*L).shift(S-90,s.sideShape*L),i.sideCp2=i.armpitCornerScooped.shift(S+180,1/3*L).shift(S-90,s.sideShape*L),a.saBase=(new e).move(i.sideHem),s.straightSides?a.saBase.line(i.armpitCornerScooped):a.saBase.curve(i.sideCp1,i.sideCp2,i.armpitCornerScooped),a.saBase.curve(i.armpitScoopCp1,i.armpitScoopCp2,i.armpitScoopEnd).line(i.neckShoulderCorner).
1curve(i.neckCP1,i.neckCP2,i.cfNeck).hide(),a.foldBase=(new e).move(i.cfNeck).line(i.cfHem).hide(),a.hemBase=(new e).move(i.cfHem).line(i.sideHem).hide(),a.seam=a.saBase.join(a.foldBase).join(a.hemBase).close().addClass("fabric"),p("hd",{id:"wHem",from:i.cfHem,to:i.sideHem,y:i.sideHem.y+(c+15)}),p("vd",{id:"hSide",from:i.sideHem,to:i.armpitCornerScooped,x:Math.max(i.sideHem.x,i.armpitCornerScooped.x)+(15+c)}),p("vd",{id:"hArmpitScoop",from:i.armpitCornerScooped,to:i.armpitScoopEnd,x:i.armpitCornerScooped.x+(30+c)}),p("hd",{id:"wArmpitScoop",from:i.armpitScoopEnd,to:i.armpitCornerScooped,y:0-(c+0)}),i.cutonfoldFrom=i.cfNeck,i.cutonfoldTo=i.cfHem,p("cutonfold",{from:i.cutonfoldFrom,to:i.cutonfoldTo,grainline:!0}),i.title=new o(i.armpitCorner.x/2,(i.cfHem.y+i.armpitCornerScooped.y/2)/2),p("title",{at:i.title,nr:5,title:"base"}),i.logo=i.title.shift(-90,70*m),d.logo=new h("logo",i.logo),c&&(a.sa=(new e).move(i.cfHem).join(a.hemBase.offset(c*s.hemWidth)).join(a.saBase.offset(c)).line(i.cfNeck).addClass("fabric sa")),r},hide:{self:!0},measurements:["biceps","neck","chest","hips","waistToHips","hpsToWaistBack","waistToArmpit"],options:{neckEase:{pct:50,min:-30,max:150,menu:"fit"},chestEase:{pct:0,min:-40,max:50,menu:"fit"},straightSides:{bool:!0,menu:"advanced"},hipsEase:{pct:0,min:-30,max:75,menu:"advanced"},armpitEase:{pct:15,min:-20,max:50,menu:"fit"},bodyLength:{pct:120,min:20,max:300,menu:"style"},neckBalance:{pct:40,min:0,max:80,menu:"fit"},raglanScoopLength:{pct:20,min:0,max:50,menu:"advanced"},raglanScoopMagnitude:{pct:6,min:0,max:20,menu:"advanced"},hemWidth:{pct:200,min:0,max:800,menu:"construction"},sideShape:{pct:0,min:-20,max:20,menu:"advanced"},armholeTweakFactor:1.1,sleeveEase:{pct:0,min:-30,max:50,menu:"fit"}},optionalMeasurements:["highBust"]};const Qp={name:"shelly.front",draft:function({utils:t,Path:e,Point:o,points:a,part:i,store:n,sa:s,macro:r,snippets:l,Snippet:c}){const p=n.get("raglanAngle"),d=n.get("neckRadius");a.neckShoulderCorner=t.beamIntersectsCircle(a.neckCenter,d,a.raglanCenter,a.armpitCorner)[1];const h=a.raglanCenter.dist(a.neckShoulderCorner);n.set("frontNeckRadius",h),a.cfNeck=a.neckCenter.shift(270,d);const m=2*a.cfNeck.angle(a.neckShoulderCorner),f=t.deg2rad(m)*d;a.neckCP1=a.neckShoulderCorner.shift(m+180,f/3),a.neckCP2=a.cfNeck.shift(0,f/3);const u=p-(m+180);n.set("frontNecklineToRaglanAngle",u),r("vd",{id:"hCenterSeam",from:a.cfNeck,to:a.cfHem,x:-(15+s)}),r("vd",{id:"hNeck",from:a.neckShoulderCorner,to:a.cfNeck,x:-(15+s),noStartMarker:!0,noEndMarker:!0}),r("vd",{id:"hTotal",from:a.neckShoulderCorner,to:a.cfHem,x:-(30+s)}),r("vd",{id:"hRaglanSeam",from:a.armpitCornerScooped,to:a.neckShoulderCorner,x:a.armpitCornerScooped.x+(15+s)}),r("hd",{id:"wRaglanSeamStraightPortion",from:a.neckShoulderCorner,to:a.armpitScoopEnd,y:0-(s+0)}),r("hd",{id:"hArmpitScoop",from:a.neckShoulderCorner,to:a.armpitCornerScooped,y:0-(s+15)}),r("hd",{id:"wRaglanSeam",from:a.cfNeck,to:a.neckShoulderCorner,y:0-(s+15),noStartMarker:!0,noEndMarker:!0}),r("hd",{id:"wCenterToArmpit",from:a.cfNeck,to:a.armpitCornerScooped,y:0-(s+30)}),n.cutlist.addCut({cut:1,from:"fabric"}),l.armpitScoopEnd=new c("notch",a.armpitScoopEnd),a.title=new o(a.armpitCorner.x/2,(a.cfHem.y+a.armpitCornerScooped.y/2)/2),r("title",{at:a.title,nr:1,title:"front"});const g=(new e).move(a.neckShoulderCorner).curve(a.neckCP1,a.neckCP2,a.cfNeck);return n.set("neckLengthFront",g.length()),i},from:Xp};const qp={name:"shelly.back",draft:function({utils:t,Path:e,Point:o,paths:a,points:i,options:n,part:s,store:r,sa:l,macro:c,snippets:p,Snippet:d}){const h=r.get("raglanAngle"),m=r.get("neckRadius");i.neckCenter=i.raglanCenter.shift(270,-n.neckBalance*m),i.neckShoulderCorner=t.beamIntersectsCircle(i.neckCenter,m,i.raglanCenter,i.armpitCorner)[1];const f=i.raglanCenter.dist(i.neckShoulderCorner);r.set("backNeckRadius",f),i.cfNeck=i.neckCenter.shift(270,m);const u=2*i.cfNeck.angle(i.neckShoulderCorner),g=t.deg2rad(u)*m;i.neckCP1=i.neckShoulderCorner.shift(u+180,g/3),i.neckCP2=i.cfNeck.shift(0,g/3);const b=h-(u+180);r.set("backNecklineToRaglanAngle",b),a.saBase=(new e).move(i.sideHem),n.straightSides?a.saBase.line(i.armpitCornerScooped):a.saBase.curve(i.sideCp1,i.sideCp2,i.armpitCornerScooped),a.saBase.curve(i.armpitScoopCp1,i.armpitScoopCp2,i.armpitScoopEnd).line(i.neckShoulderCorner).
1curve(i.neckCP1,i.neckCP2,i.cfNeck).hide(),a.foldBase=(new e).move(i.cfNeck).line(i.cfHem).hide(),a.hemBase=(new e).move(i.cfHem).line(i.sideHem).hide(),a.seam=a.saBase.join(a.foldBase).join(a.hemBase).close().addClass("fabric"),c("vd",{id:"hCenterSeam",from:i.cfNeck,to:i.cfHem,x:-(15+l)}),c("vd",{id:"hNeck",from:i.neckShoulderCorner,to:i.cfNeck,x:-(15+l),noStartMarker:!0,noEndMarker:!0}),c("vd",{id:"hTotal",from:i.neckShoulderCorner,to:i.cfHem,x:-(30+l)}),c("vd",{id:"hRaglanSeam",from:i.armpitCornerScooped,to:i.neckShoulderCorner,x:i.armpitCornerScooped.x+(15+l)}),c("hd",{id:"wRaglanSeamStraightPortion",from:i.neckShoulderCorner,to:i.armpitScoopEnd,y:0-(l+0)}),c("hd",{id:"wRaglanSeam",from:i.neckShoulderCorner,to:i.armpitCornerScooped,y:0-(l+15)}),c("hd",{id:"wNeck",from:i.cfNeck,to:i.neckShoulderCorner,y:0-(l+15),noStartMarker:!0,noEndMarker:!0}),c("hd",{id:"wCenterToArmpit",from:i.cfNeck,to:i.armpitCornerScooped,y:0-(l+30)}),r.cutlist.addCut({cut:1,from:"fabric"}),p.armpitScoopEnd=new d("bnotch",i.armpitScoopEnd),i.title=new o(i.armpitCorner.x/2,(i.cfHem.y+i.armpitCornerScooped.y/2)/2),c("title",{at:i.title,nr:2,title:"back"}),l&&(a.sa=(new e).move(i.cfHem).join(a.hemBase.offset(l*n.hemWidth)).join(a.saBase.offset(l)).line(i.cfNeck).addClass("fabric sa"));const w=(new e).move(i.neckShoulderCorner).curve(i.neckCP1,i.neckCP2,i.cfNeck);return r.set("neckLengthBack",w.length()),s},from:Xp};const Zp={name:"shelly.raglanSleeve",after:[Qp,qp],draft:function({utils:t,Path:e,Point:o,paths:a,points:i,measurements:n,options:s,part:r,store:l,sa:c,macro:p,snippets:d,Snippet:h,scale:m}){const f=s.armholeTweakFactor-s.raglanScoopMagnitude,u=s.bicepsPosition,g=l.get("neckRadius"),b=n.biceps*(1+s.sleeveEase),w=n.wrist*(1+s.wristEase);i.raglanCenter=new o(0,0),i.neckCenter=i.raglanCenter.shift(180,s.neckBalance*g);const k=l.get("raglanLength"),C=s.raglanScoopMagnitude*k,v=s.raglanScoopLength*k,y=b/2*f,T=function(t,e){return Math.sqrt(t*t-e*e)}(k,y),x=s.sleeveLength*n.shoulderToWrist;let B;if(s.sleeveLength<u){B=((f-1)*(1-s.sleeveLength/u)+1)*b}else{const t=Math.min((s.sleeveLength-u)/(1-u),1);B=b*(1-t)+w*t}B/=2;const S=T+x;i.frontArmhole=new o(-y,T),i.backArmhole=new o(y,T);const L=i.raglanCenter.angle(i.frontArmhole),P=i.raglanCenter.angle(i.backArmhole);if(i.frontSleeve=new o(-B,S),i.backSleeve=new o(B,S),s.sleeveLength<u){const t=1-s.sleeveLength/u;i.frontSleeve=i.frontSleeve.shift(L-90,t*C),i.backSleeve=i.backSleeve.shift(P+90,t*C)}i.frontNeck=i.raglanCenter.shiftTowards(i.frontArmhole,l.get("frontNeckRadius")),i.backNeck=i.raglanCenter.shiftTowards(i.backArmhole,l.get("backNeckRadius"));const R=i.neckCenter.angle(i.frontNeck),F=i.neckCenter.angle(i.backNeck),E=t.deg2rad(F-R)*g,W=L+(180-l.get("frontNecklineToRaglanAngle")),H=P-(180-l.get("backNecklineToRaglanAngle"));i.neckCP1=i.backNeck.shift(H,E*(1/3)),i.neckCP2=i.frontNeck.shift(W,E*(1/3)),i.frontArmholeScooped=i.frontArmhole.shift(L-90,C),i.frontArmholeScoopCP1=i.frontArmhole.shift(L+180,1/3*v),i.frontArmholeScoopCP2=i.frontArmhole.shift(L+180,2/3*v),i.frontArmholeScoopEnd=i.frontArmhole.shift(L+180,v),i.backArmholeScooped=i.backArmhole.shift(P+90,C),i.backArmholeScoopCP1=i.backArmhole.shift(P+180,1/3*v),i.backArmholeScoopCP2=i.backArmhole.shift(P+180,2/3*v),i.backArmholeScoopEnd=i.backArmhole.shift(P+180,v),a.saBase=(new e).move(i.backSleeve).line(i.backArmholeScooped).curve(i.backArmholeScoopCP1,i.backArmholeScoopCP2,i.backArmholeScoopEnd).line(i.backNeck).curve(i.neckCP1,i.neckCP2,i.frontNeck).line(i.frontArmholeScoopEnd).curve(i.frontArmholeScoopCP2,i.frontArmholeScoopCP1,i.frontArmholeScooped).line(i.frontSleeve).hide(),a.hemBase=(new e).move(i.frontSleeve).line(i.backSleeve).hide(),a.seam=a.saBase.join(a.hemBase).close().addClass("fabric"),p("vd",{id:"hFrontRaglanSleeveStraightPortion",from:i.frontNeck,to:i.frontArmholeScoopEnd,x:i.frontArmholeScooped.x-(c+15)}),p("vd",{id:"hFrontRaglanSleeveCurvedPortion",from:i.frontArmholeScoopEnd,to:i.frontArmholeScooped,x:i.frontArmholeScooped.x-(c+15)}),p("vd",{id:"hFrontRaglanSleeve",from:i.frontNeck,to:i.frontArmholeScooped,x:i.frontArmholeScooped.x-(c+30)}),p("vd",{id:"hFrontSleeve",from:i.frontArmholeScooped,to:i.frontSleeve,x:i.frontArmholeScooped.x-(c+15)}),p("vd",{id:"hFrontTotal",from:i.frontNeck,to:i.frontSleeve,x:i.frontArmholeScooped.x-(c+45)}),p("vd",{id:"hBackRaglanSleeveStraightPortion",from:i.backNeck,to:i.backArmholeScoopEnd,x:i.backArmholeScooped.x+(c+15)}),p("vd",{id:"hBackRaglanSleeveCurvedPortion",from:i.backArmholeScoopEnd,to:i.backArmholeScooped,x:i.backArmholeScooped.x+(c+15)}),p("vd",{id:"hBackRaglanSleeve",from:i.backNeck,to:i.backArmholeScooped,x:i.backArmholeScooped.x+(c+30)}),p("vd",{id:"hBackSleeve",from:i.backArmholeScooped,to:i.backSleeve,x:i.backArmholeScooped.x+(c+15)}),p("vd",{id:"hBackTotal",from:i.backNeck,to:i.backSleeve,x:i.backArmholeScooped.x+(c+45)}),p("hd",{id:"wFrontSleeve",from:i.frontArmholeScooped,to:i.frontSleeve,y:i.frontSleeve.y+(c+15),noStartMarker:!0,noEndMarker:!0}),p("hd",{id:"wSleeveHem",from:i.frontSleeve,to:i.backSleeve,y:i.frontSleeve.y+(c+15)}),p("hd",{id:"wBackSleeve",from:i.backSleeve,to:i.backArmholeScooped,y:i.backSleeve.y+(c+15),noStartMarker:!0,noEndMarker:!0}),p("hd",{id:"wWidthAtArmpit",from:i.frontArmholeScooped,to:i.backArmholeScooped,y:i.frontSleeve.y+(c+30)}),p("hd",{id:"wWidthAtArmpit2",from:i.frontArmholeScooped,to:i.backArmholeScooped,y:Math.min(i.frontNeck.y,i.backNeck.y)-(c+45)}),p("hd",{id:"wFrontRaglanSleeveCurvedPortion",from:i.frontArmholeScooped,to:i.frontArmholeScoopEnd,y:Math.min(i.frontNeck.y,i.backNeck.y)-(c+15)}),p("hd",{id:"wFrontRaglanSleeveStraightPortion",from:i.frontArmholeScoopEnd,to:i.frontNeck,y:Math.min(i.frontNeck.y,i.backNeck.y)-(c+15)}),p("hd",{id:"wNeck",from:i.frontNeck,to:i.backNeck,y:Math.min(i.frontNeck.y,i.backNeck.y)-(c+15)}),p("hd",{id:"wBackRaglanSleeveStraightPortion",from:i.backNeck,to:i.backArmholeScoopEnd,y:Math.min(i.frontNeck.y,i.backNeck.y)-(c+15)}),p("hd",{id:"wBackRaglanSleeveCurvedPortion",from:i.backArmholeScoopEnd,to:i.backArmholeScooped,y:Math.min(i.frontNeck.y,i.backNeck.y)-(c+15)}),p("hd",{id:"wBackRaglanSleeve",from:i.backNeck,to:i.backArmholeScooped,y:Math.min(i.frontNeck.y,i.backNeck.y)-(c+30)}),p("hd",{id:"wFrontRaglanSleeve",from:i.frontArmholeScooped,to:i.frontNeck,y:Math.min(i.frontNeck.y,i.backNeck.y)-(c+30)}),i.grainlineBottom=i.backSleeve.shiftFractionTowards(i.frontSleeve,.5),i.grainlineTop=i.raglanCenter.shift(270,g),p("grainline",{from:i.grainlineTop,to:i.grainlineBottom}),l.cutlist.addCut({cut:2,from:"fabric"}),d.frontArmholeScoopEnd=new h("notch",i.frontArmholeScoopEnd),d.backArmholeScoopEnd=new h("bnotch",i.backArmholeScoopEnd),i.title=new o(0,i.backSleeve.y/3),p("title",{at:i.title,nr:3,title:"sleeve"}),i.logo=i.title.shift(-90,70*m),d.logo=new h("logo",i.logo),i.scalebox=i.logo.shift(-90,70*m),p("scalebox",{at:i.scalebox}),c&&(a.sa=a.saBase.offset(c).join(a.hemBase.offset(c*s.sleeveHem)).close().addClass("fabric sa"));const A=(new e).move(i.backNeck).curve(i.neckCP1,i.neckCP2,i.frontNeck);return l.set("neckLengthSide",A.length()),r},measurements:["wrist","shoulderToWrist"],options:{bicepsPosition:.2,wristEase:{pct:0,min:-30,max:
150,menu:"fit"},sleeveLength:{pct:20,min:0,max:125,menu:"style"},sleeveHem:{pct:200,min:0,max:800,menu:"construction"}}};const td={name:"shelly.neckband",plugins:[],draft:function({Path:t,Point:e,paths:o,points:a,measurements:i,options:n,part:s,store:r,complete:l,sa:c,macro:p}){const d=(r.get("neckLengthFront")+r.get("neckLengthBack")+r.get("neckLengthSide"))*n.neckbandLength,h=n.neckbandWidth*i.neck*2;return a.topLeftCorner=new e(0,0),a.bottomLeftCorner=new e(0,h),a.bottomRightCorner=new e(d,h),a.topRightCorner=new e(d,0),a.leftCenter=new e(0,h/2),a.rightCenter=new e(d,h/2),o.saBase=(new t).move(a.bottomLeftCorner).line(a.bottomRightCorner).line(a.topRightCorner).line(a.topLeftCorner).addClass("fabric").hide(),o.foldBase=(new t).move(a.topLeftCorner).line(a.bottomLeftCorner).hide(),l&&(o.foldLine=(new t).move(a.leftCenter).line(a.rightCenter).addClass("various dashed").addText("shelly:foldLine","center")),o.seam=o.saBase.join(o.foldBase).close().addClass("fabric"),p("vd",{id:"hWidth",from:a.topLeftCorner,to:a.bottomLeftCorner,x:-(15+c)}),p("hd",{id:"wLength",from:a.topLeftCorner,to:a.topRightCorner,y:-(c+15)}),a.cutonfoldFrom=a.topLeftCorner,a.cutonfoldTo=a.bottomLeftCorner,p("cutonfold",{from:a.cutonfoldFrom,to:a.cutonfoldTo,grainline:!0}),r.cutlist.addCut({cut:1,from:"fabric"}),a.title=new e(d/4,h/2),p("title",{at:a.title,nr:4,title:"neckband"}),c&&(o.sa=(new t).move(a.bottomLeftCorner).join(o.saBase.offset(c)).line(a.topLeftCorner).addClass("fabric sa")),s},after:[Zp],options:{neckbandLength:{pct:80,min:50,max:100,menu:"fit"},neckbandWidth:{pct:7.5,min:0,max:50,menu:"fit"}}},ed=new n.pT({data:Kp,parts:[Qp,qp,Zp,td]}),od=JSON.parse('{"id":"shin","name":"Shin swim trunks","code":"Joost De Cock","description":"A FreeSewing pattern for swim trunks","design":"Joost De Cock","difficulty":2,"tags":["bottoms","swimwear"],"techniques":["hem","stretch","curved-seam","elastic"],"version":"4.6.0","pkg":"@freesewing/shin","collection":true}'),ad={en:JSON.parse('{"t":"Shin swim trunks","d":"Shin are athletic swim trunks.","p":{"back":"Back","front":"Front","waistband":"Waistband"},"s":{"cutWaistband.t":"The waistband is not shown","cutWaistband.d":"The **Waistband** (3) is a rectangular piece of fabric {{{ w }}} wide and {{{ l }}} long."},"o":{"legReduction":{"t":"Leg reduction","d":"Reduces the leg opening to prevent gaping"},"elasticWidth":{"t":"Elastic width","d":"Width of the elastic at the waist"},"stretch":{"t":"Stretch","d":"The amount of stretch to design for."},"bulge":{"t":"Bulge","d":"Controls the amount of extra room to create at the front of the trunks."},"rise":{"t":"Rise","d":"Controls the height of the waist."},"backRise":{"t":"Back rise","d":"Controls how much the waist is higher in the back than  the front."}}}')};const id={name:"shin.back",measurements:["hips","upperLeg","waistToUpperLeg","waistToHips"],options:{frontFactor:.58,legFrontFactor:.48,gussetFactor:.0714,angle:10,elasticWidth:{pct:10,min:4,max:20,snap:Ro.HJ,...(0,n.Wx)("waistToUpperLeg"),menu:"style"},stretch:{pct:20,min:10,max:30,menu:"fit"},bulge:{pct:2.5,min:0,max:5,menu:"fit"},legReduction:{pct:5,min:0,max:10,menu:"fit"},rise:{pct:0,min:0,max:25,menu:"style"},backRise:{pct:5,min:0,max:10,menu:"fit"}},draft:function({store:t,macro:e,Point:o,Path:a,points:i,paths:n,snippets:s,Snippet:r,sa:l,options:c,measurements:p,utils:d,part:h}){t.set("hips",p.hips/2*d.stretchToScale(c.stretch)),t.set("hipFront",t.get("hips")*c.frontFactor),t.set("hipBack",t.get("hips")*(1-c.frontFactor)),t.set("legs",p.upperLeg*d.stretchToScale(c.stretch)),t.set("legFront",t.get("legs")*c.legFrontFactor),t.set("legBack",t.get("legs")*(1-c.legFrontFactor)),t.set("gusset",p.hips*c.gussetFactor),i.hipSide=new o(0,0),i.hipCb=new o(t.get("hipBack"),0),i.legSide=i.hipSide.shift(-90-c.angle,p.waistToUpperLeg-p.waistToHips),i.legSideCp=i.legSide.shift(-1*c.angle+7,t.get("legBack")),i.legInner=i.legSideCp.shift(-1*c.angle-90,t.get("gusset")/2),i.legSideCp=i.legSideCp.shiftFractionTowards(i.legSide,.5);let m=(new a).move(i.legInner)._curve(i.legSideCp,i.legSide).shiftAlong(2),f=i.legInner.angle(m);if(i.crossSeam=i.legInner.shift(f-90,t.get("gusset")),i.seatCb=i.hipCb.shift(-86,.62*(p.waistToUpperLeg-p.waistToHips)),m=d.beamsIntersect(i.crossSeam,i.crossSeam.shift(f,20),i.hipCb,i.seatCb),i.seatCp=i.seatCb.shiftFractionTowards(m,.7),i.crossSeamCp=i.crossSeam.shiftFractionTowards(m,.7),i.reducedLegInner=0===c.legReduction?i.legInner:(new a).move(i.legSide).curve_(i.legSideCp,i.legInner).shiftFractionAlong(1-c.legReduction),i.reducedLegInnerCp=i.legInner.rotate(90,i.reducedLegInner),i.reducedCrossSeam=(new a).move(i.crossSeam).curve(i.crossSeamCp,i.seatCp,i.seatCb).shiftFractionAlong(2*c.legReduction),c.rise>0){let t=(p.waistToUpperLeg-p.waistToHips)*c.rise;i.hipSide=i.hipSide.shift(90,t),i.hipCb=i.hipCb.shift(90,t)}if(c.backRise>0){let t=(p.waistToUpperLeg-p.waistToHips)*c.backRise;i.hipCb=i.hipCb.shift(90,t),i.hipSide=i.hipSide.shift(90,t),i.hipCbCp=new o(i.hi
1pCb.x/2,i.hipCb.y)}return n.saBase=(new a).move(i.crossSeam).curve(i.crossSeamCp,i.seatCp,i.seatCb).split(i.reducedCrossSeam).pop().line(i.hipCb),c.backRise>0?n.saBase._curve(i.hipCbCp,i.hipSide):n.saBase.line(i.hipSide),n.saBase.line(i.legSide),n.saBase=(new a).move(i.reducedLegInner).line(i.reducedCrossSeam).join(n.saBase),n.hemBase=(new a).move(i.legSide).curve_(i.legSideCp,i.reducedLegInner),n.saBase.hide(),n.hemBase.hide(),n.seam=n.saBase.join(n.hemBase).attr("class","fabric"),l&&(n.sa=n.hemBase.offset(3*l).join(n.saBase.offset(l)).close().addClass("fabric sa")),t.cutlist.setCut({cut:2,from:"fabric"}),i.logo=i.hipSide.shiftFractionTowards(i.seatCb,.3),s.logo=new r("logo",i.logo),i.title=i.hipSide.shiftFractionTowards(i.seatCb,.7),e("title",{at:i.title,nr:1,title:"back"}),e("scalebox",{at:new o(i.legSide.x+100,i.legSide.y-40)}),i.grainlineFrom=i.legSide.shift(0,15),i.grainlineTo=i.hipSide.shift(0,15),e("grainline",{from:i.grainlineFrom,to:i.grainlineTo}),e("hd",{id:"wAtWaist",from:i.hipSide,to:i.hipCb,y:i.hipCb.y-l-15}),e("hd",{id:"wSideHemToCfWaist",from:i.legSide,to:i.hipCb,y:i.hipCb.y-l-30}),e("vd",{id:"hSide",from:i.legSide,to:i.hipSide,x:i.legSide.x-l-15}),e("vd",{id:"hFull",from:i.reducedLegInner,to:i.hipSide,x:i.legSide.x-l-30}),e("hd",{id:"wHem",from:i.legSide,to:i.reducedLegInner,y:i.reducedLegInner.y+3*l+15}),e("hd",{id:"wFull",from:i.legSide,to:i.reducedCrossSeam,y:i.reducedLegInner.y+3*l+30}),e("vd",{id:"hInseam",from:i.reducedLegInner,to:i.reducedCrossSeam,x:i.reducedCrossSeam.x+l+15}),e("vd",{id:"hFull",from:i.reducedLegInner,to:i.hipCb,x:i.reducedCrossSeam.x+l+30}),h}};const nd={name:"shin.front",after:id,draft:function({store:t,macro:e,Point:o,Path:a,points:i,paths:n,snippets:s,Snippet:r,sa:l,options:c,measurements:p,utils:d,part:h}){const m=-12,f=(p.waistToUpperLeg-p.waistToHips)*c.bulge;if(i.hipSide=new o(0,0),i.hipCb=new o(t.get("hipFront"),0),i.legSide=i.hipSide.shift(-78,p.waistToUpperLeg-p.waistToHips),i.legSideCp=i.legSide.shift(0,t.get("legFront")),i.legInner=i.legSideCp.shift(-100,t.get("gusset")/2),i.crossSeam=i.legSideCp.shift(80,t.get("gusset")/2),i.legSideCp=i.legSide.shiftFractionTowards(i.legSideCp,.4),i.seatCb=i.hipCb.shift(-83,.67*(p.waistToUpperLeg-p.waistToHips)),i._tmp2=i.crossSeam.shift(m,20),i._tmp3=d.beamsIntersect(i.crossSeam,i._tmp2,i.hipCb,i.seatCb),i.seatCp=i.seatCb.shiftFractionTowards(i._tmp3,.7),i.crossSeamCp=i.crossSeam.shiftFractionTowards(i._tmp3,.7),i.midFront=i.hipCb.shiftFractionTowards(i.seatCb,.6),i.midFrontCpTop=i.hipCb.shiftFractionTowards(i.seatCb,.3),i.midFrontCpBottom=i.hipCb.shiftFractionTowards(i.seatCb,.9),i.midBulge=i.midFront.shift(12,f),i.bulgeCpTop=i.midFrontCpTop.shift(12,f),i.bulgeCpBottom=i.midFrontCpBottom.shift(12,f),i.midSide=i.hipSide.shiftFractionTowards(i.legSide,.5),i.hipSideCpBottom=i.hipSide.shiftFractionTowards(i.legSide,.2),i.midSideCpTop=i.hipSide.shiftFractionTowards(i.legSide,.2),i.midSideCpBottom=i.hipSide.shiftFractionTowards(i.legSide,.7),i.legSideCpTop=i.hipSide.shiftFractionTowards(i.legSide,.8),i.midSideBulge=i.midSide.shift(12,-1*f),i.midSideBulgeCpTop=i.midSideCpTop.shift(12,-1*f),i.midSideBulgeCpBottom=i.midSideCpBottom.shift(12,-1*f),i.reducedLegInner=0===c.legReduction?i.legInner:(new a).move(i.legSide).curve_(i.legSideCp,i.legInner).shiftFractionAlong(1-c.legReduction),i.reducedLegInnerCp=i.legInner.rotate(90,i.reducedLegInner),i.reducedCrossSeam=(new a).move(i.crossSeam).curve(i.crossSeamCp,i.seatCp,i.seatCb).shiftFractionAlong(2*c.legReduction),c.rise>0){let t=(p.waistToUpperLeg-p.waistToHips)*c.rise;i.hipSide=i.hipSide.shift(90,t),i.hipCb=i.hipCb.shift(90,t)}if(c.backRise>0){let t=(p.waistToUpperLeg-p.waistToHips)*c.backRise;i.hipSide=i.hipSide.shift(90,t/2),i.hipCbCp=new o(i.hipCb.x/2,i.hipCb.y)}return n.saBase=(new a).move(i.crossSeam).curve(i.crossSeamCp,i.seatCp,i.seatCb).split(i.reducedCrossSeam).pop().curve(i.midFrontCpBottom,i.bulgeCpBottom,i.midBulge).curve(i.bulgeCpTop,i.midFrontCpTop,i.hipCb),c.backRise>0?n.saBase.curve_(i.hipCbCp,i.hipSide):n.saBase.line(i.hipSide),n.saBase.curve(i.midSideCpTop,i.midSideBulgeCpTop,i.midSideBulge).curve(i.midSideBulgeCpBottom,i.legSideCpTop,i.legSide),n.saBase=(new a).move(i.reducedLegInner).line(i.reducedCrossSeam).join(n.saBase),n.hemBase=(new a).move(i.legSide).curve_(i.legSideCp,i.reducedLegInner),n.saBase.hide(),n.hemBase.hide(),n.seam=n.saBase.join(n.hemBase).attr("class","fabric"),l&&(n.sa=n.hemBase.offset(3*l).join(n.saBase.offset(l)).close().addClass("fabric sa")),t.cutlist.setCut({cut:2,from:"fabric"}),i.logo=i.hipSide.shiftFractionTowards(i.seatCb,.3),s.logo=new r("logo",i.logo),i.title=i.hipSide.shiftFractionTowards(i.seatCb,.7),e("title",{at:i.title,nr:2,t
1itle:"front"}),i.grainlineFrom=i.seatCb.shift(180,30),i.grainlineTo=i.hipCb.shift(180,30),e("grainline",{from:i.grainlineFrom,to:i.grainlineTo}),e("vd",{id:"hSide",from:i.legSide,to:i.hipSide,x:i.hipSide.x-l-15}),e("vd",{id:"hFull",from:i.reducedLegInner,to:i.hipSide,x:i.hipSide.x-l-30}),e("vd",{id:"hInseam",from:i.reducedLegInner,to:i.reducedCrossSeam,x:i.reducedCrossSeam.x+l+15}),e("vd",{id:"hFront",from:i.reducedLegInner,to:i.hipCb,x:i.reducedCrossSeam.x+l+30}),e("hd",{id:"wAtWaist",from:i.hipSide,to:i.hipCb,y:i.hipSide.y-l-15}),e("hd",{id:"wFull",from:i.hipSide,to:i.reducedCrossSeam,y:i.hipSide.y-l-30}),e("hd",{id:"wAtHem",from:i.legSide,to:i.reducedLegInner,y:i.reducedLegInner.y+3*l+15}),e("hd",{id:"wHemSideToFork",from:i.legSide,to:i.reducedCrossSeam,y:i.reducedLegInner.y+3*l+30}),h}};const sd={name:"shin.waistband",after:id,draft:function({store:t,macro:e,Point:o,Path:a,points:i,paths:n,sa:s,expand:r,units:l,absoluteOptions:c,part:p}){const d=2.5*c.elasticWidth;return i.topLeft=new o(0,0),i.topRight=new o(d,0),i.bottomLeft=new o(0,2*t.get("hips")),i.bottomRight=new o(d,i.bottomLeft.y),r?(t.flag.preset("expandIsOn"),n.seam=(new a).move(i.topLeft).line(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).line(i.topLeft).addClass("fabric"),s&&(n.sa=(new a).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).line(i.topLeft).close().offset(s).addClass("fabric sa")),t.cutlist.setCut({cut:1,from:"fabric"}),i.title=i.topLeft.shiftFractionTowards(i.bottomRight,.5),e("title",{at:i.title,nr:3,title:"waistband",align:"center",scale:.666}),i.grainlineFrom=i.bottomLeft.shiftFractionTowards(i.bottomRight,1/8),i.grainlineTo=new o(i.grainlineFrom.x,i.topLeft.y),e("grainline",{from:i.topLeft.shift(-90,20),to:i.topRight.shift(-90,20)}),e("vd",{id:"hFull",from:i.bottomRight,to:i.topRight,x:i.topRight.x+s+15}),e("hd",{id:"wFull",from:i.bottomLeft,to:i.bottomRight,y:i.bottomRight.y+s+15}),p):(t.flag.note({msg:"shin:cutWaistband",notes:[s?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:l(d+2*s),l:l(2*t.get("hips")+2*s)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),t.flag.preset("expandIsOff"),p.hide())}},rd=new n.pT({data:od,parts:[id,nd,sd]}),ld=JSON.parse('{"id":"simon","name":"Simon button-down shirt","code":"Joost De Cock","description":"A FreeSewing pattern for a button down shirt","design":"Joost De Cock","difficulty":4,"tags":["tops"],"techniques":["hem","button","interfacing","curved-seam","flat-felled-seam","flat-sleeve"],"version":"4.6.0","pkg":"@freesewing/simon","collection":true}'),cd={en:JSON.parse('{"t":"Simon shirt","d":"Simon is a highly adaptable shirt pattern for people without breasts.","p":{"back":"Back","buttonholePlacket":"Buttonhole placket","buttonPlacket":"Button placket","collar":"Collar","collarAndUndercollar":"Collar and Undercollar","collarStand":"Collar stand","cuff":"Cuff","front":"Front","frontLeft":"Front left","frontRight":"Front right","sleevePlacketOverlap":"Sleeve placket overlap","sleevePlacketUnderlap":"Sleeve placket underlap","sleeve":"Sleeve","yoke":"Yoke"},"s":{"buttonholePlacket":"Buttonhole placket","buttonPlacket":"Button placket","collarAndUndercollar":"Collar and Undercollar","collarStand":"Collar stand","cutUndercollarSlightlySmaller":"Cut undercollar slightly smaller","frontLeft":"Front left","frontRight":"Front right","sideOfTheCollarStand":"Side of the collar stand","sleevePlacketOverlap":"Sleeve placket overlap","sleevePlacketUnderlap":"Sleeve placket underlap","yoke":"Yoke","matchHere":"Match fabric along this line","cutUndercollarSmaller":"Cut the undercollar a little bit smaller","flatFelledSeamAllowance":"Flat-felled seam allowance"},"o":{"backDarts":{"t":"Back darts","d":"Whether or not to include back darts"},"backDarts.auto":{"t":"Automatic","d":"Add back darts (only) when doing so will improve fit"}
1,"backDarts.never":{"t":"Never","d":"Never add back darts, handle shaping elsewhere instead"},"backDarts.always":{"t":"Always","d":"Always include back darts, even when shaping is minimal"},"backDartShaping":{"t":"Back dart shaping","d":"The amount of shaping that is done by the back darts"},"barrelCuffNarrowButton":{"t":"Cuff narrow button","d":"Whether to include a button to tie the cuffs more narrow. This option is only relevant for barrel cuffs."},"barrelCuffNarrowButtonNo":{"t":"Do not include a narrow button","d":"Draft a pattern with a single button on the cuffs"},"barrelCuffNarrowButtonYes":{"t":"Include a narrow button","d":"Draft a pattern with an extra button on the cuffs to tie them more narrow"},"boxPleat":{"t":"Box pleat","d":"Whether to include a box pleat at the back or not"},"boxPleatNo":{"t":"No box pleat","d":"Draft a pattern without a box pleat"},"boxPleatYes":{"t":"Include a box pleat","d":"Draft a pattern with a box pleat"},"boxPleatWidth":{"t":"Box pleat width","d":"The total width of the box pleat"},"boxPleatFold":{"t":"Box pleat fold","d":"The amount by with the box pleat folds inwards"},"buttonPlacketStyle":{"t":"Button placket style","d":"Style of the button placket."},"buttonPlacketStyle.classic":{"t":"Classic button placket","d":"A classic button placket"},"buttonPlacketStyle.seamless":{"t":"Seamless button placket","d":"A seamless button placket gives a more modern look"},"buttonPlacketWidth":{"t":"Button placket width","d":"Width of the button placket."},"buttonFreeLength":{"t":"Button free length","d":"How much of the bottom of the front closure to keep button-free."},"buttonholePlacketFoldWidth":{"t":"Buttonhole placket fold width","d":"Width of the buttonhole placket fold."},"buttonholePlacketStyle":{"t":"Buttonhole placket style","d":"Style of the buttonhole placket."},"buttonholePlacketStyle.classic":{"t":"Classic buttonhole placket","d":"A classic buttonhole placket with pleats"},"buttonholePlacketStyle.seamless":{"t":"Seamless buttonhole placket","d":"A seamless buttonhole placket gives a more modern look"},"buttonholePlacketWidth":{"t":"Buttonhole placket width","d":"Width of the buttonhole placket."},"buttons":{"t":"Number of buttons","d":"The number of buttons on the front closure."},"collarAngle":{"t":"Collar angle","d":"The angle of the collar tips."},"collarBend":{"t":"Collar bend","d":"The bend of the collar."},"collarFlare":{"t":"Collar flare","d":"The flare of the collar tips."},"collarGap":{"t":"Collar gap","d":"The gap between the two collar ends."},"collarRoll":{"t":"Collar roll","d":"The amount by which the top collar is larger than the undercollar."},"collarWidth":{"t":"Collar width","d":"Width of the collar relative to collar stand."},"collarStandBend":{"t":"Collar stand bend","d":"The bend of the collar stand."},"collarStandCurve":{"t":"Collar stand curve","d":"The curve of the collar stand."},"collarStandWidth":{"t":"Collar stand width","d":"Width of the collar stand."},"cuffButtonRows":{"t":"Cuff button rows","d":"Whether to draft a single or double row of cuff buttons. This option is only relevant for barrel cuffs."},"cuffDrape":{"t":"Cuff drape","d":"The amount by which the sleeve is wider than the cuff where the are joined."},"cuffLength":{"t":"Cuff length","d":"The length of the cuffs."},"cuffStyle":{"t":"Cuff style","d":"What style of cuffs do you prefer?"},"cuffStyle.roundedBarrelCuff":{"t":"Rounded barrel cuff","d":"A classic barrel cuff, but with rounded corners"},"cuffStyle.angledBarrelCuff":{"t":"Angled  barrel cuff","d":"A classic barrel cuff, but with angled (chamfered) corners"},"cuffStyle.straightBarrelCuff":{"t":"Straight barrel cuff","d":"A classic straight barrel cuff"},"cuffStyle.roundedFrenchCuff":{"t":"Rounded French cuff","d":"A French cuff (the type you need cufflinks for) with rounded corners"},"cuffStyle.angledFrenchCuff":{"t":"Angled French cuff","d":"A French cuff (the type you need cufflinks for) with angled (chamfered) corners"},"cuffStyle.straightFrenchCuff":{"t":"Straight French cuff","d":"A straight French cuff (the type you need cufflinks for)"},"extraTopButton":{"t":"Extra top button","d":"Whether or not to include an extra top button between the collar button and the first shirt button on the front closure."},"extraTopButtonNo":{"t":"No extra top button","d":"Draft a pattern without an extra top button"},"extraTopButtonYes":{"t":"With extra top button","d":"Draft a pattern with an extra top button"},"ffsa":{"t":"Flat-felled seam allowance","d":"The amount of seam allowance on flat-felled seams as a proportion of the regular seam allowance"},"hemCurve":{"t":"Hem curve","d":"The height of the curve on a curved hem."},"hemStyle":{"t":"Hem style","d":"The style of the shirt hem."},"hemStyle.straight":{"t":"Straight hem","d":"Draft a straight hem"},"hemStyle.baseball":{"t":"Baseball hem","d":"Draft a so-called baseball hem that curves upwards towards the sides"},"hemStyle.slashed":{"t":"Slashed hem","d":"Draft a so-called slashed hem that is mostly straight but then sharply turns upwards at the sides"},"hipsEase":{"t":"Hips ease","d":"Controls the amount of ease at the hips."},"roundBack":{"t":"Round back","d":"To fit a round(er) back, this adds length to the center back (at the yoke) that tapers of towards the sides."}
1,"separateButtonholePlacket":{"t":"Separate buttonhole placket","d":"Draft a separate buttonhole placket."},"separateButtonholePlacketNo":{"t":"Do not separate the buttonhole placket","d":"Draft a pattern where the buttonhole placket is attached to the front"},"separateButtonholePlacketYes":{"t":"Separate the buttonhole placket","d":"Draft a pattern where the buttonhole placket is separated from the front, allowing one to use a different fabric or grain for the buttonhole placket"},"separateButtonPlacket":{"t":"Separate button placket","d":"Draft a separate button placket"},"separateButtonPlacketNo":{"t":"Do not separate the button placket","d":"Draft a pattern where the button placket is attached to the front"},"separateButtonPlacketYes":{"t":"Separate the button placket","d":"Draft a pattern where the button placket is separated from the front, allowing one to use a different fabric or grain for the button placket"},"sleeveHemShort":{"t":"Sleeve hem length","d":"Length of the hem"},"sleeveLengthShort":{"t":"Sleeve length","d":"Length of the short sleeves"},"sleevePlacketLength":{"t":"Sleeve placket length","d":"The length of the sleeve placket."},"sleevePlacketWidth":{"t":"Sleeve placket width","d":"The width of the sleeve placket."},"sleeveStyle":{"t":"Sleeve style","d":"Would you like long or short sleeves?"},"sleeveStyle.long":{"t":"Long sleeves","d":"Normal long sleeves with all the cuff options"},"sleeveStyle.short":{"t":"Short sleeves","d":"Short sleeves for the summer"},"splitYoke":{"t":"Split yoke","d":"Whether to draft a split or regular yoke. A split yoke is typically used for using a different grainline on both halves for visual effect"},"splitYokeNo":{"t":"Full-size yoke","d":"Draft a pattern with a single full-size yoke"},"splitYokeYes":{"t":"Split the yoke","d":"Draft a pattern with a yoke split in half"},"waistEase":{"t":"Waist ease","d":"The amount of ease at your (natural) waist."},"yokeHeight":{"t":"Yoke height","d":"Controls the height of the yoke"}}}')},pd=function(t){const{store:e,measurements:o,options:a}=t.shorthand(),i=o.chest*(1+a.chestEase),n=o.waist*(1+a.waistEase),s=o.hips*(1+a.hipsEase);let r=i-n,l=i-s;r<0&&(r=0),r<l&&(l=r),e.set("waistReduction",r),e.set("hipsReduction",l),e.set("reduction",!0),e.set("chest",i),e.set("waist",n),e.set("hips",s),("never"===a.backDarts||r<=l)&&"always"!==a.backDarts?e.set("backDarts",!1):e.set("backDarts",!0)},dd=function(t,e="cfNeck",o="button"){const{points:a,options:i,snippets:n,Snippet:s}=t.shorthand(),r=a.cfNeck.dist(a.cfHips),l=r*(1-i.buttonFreeLength),c=i.buttons;switch("bustAlignedButtons"in i?i.bustAlignedButtons:"default"){case"even":{const t=a.cfNeck.dist(a.cfBust),i=t/r,l=t/Math.round(c*i);for(let r=1;r<=c;r++)a["button"+r]=a[e].shift(-90,l*r),n[o+r]=new s(o,a["button"+r]);break}case"split":{const t=a.cfNeck.dist(a.cfBust),i=l-t,r=t/l,p=Math.round(c*r),d=t/p,h=i/(c-p);for(let l=1;l<=p;l++)a["button"+l]=a[e].shift(-90,d*l),n[o+l]=new s(o,a["button"+l]);const m=(d-h)/2;a.currentpoint=a.cfBust.clone();for(let e=p+1;e<=c;e++)a.currentpoint=a.currentpoint.shift(-90,h),e==p+1?a.currentpoint=a.currentpoint.shift(-90,m):e==c&&(a.currentpoint=a.currentpoint.shift(90,m)),a["button"+e]=a.currentpoint.clone(),n[o+e]=new s(o,a["button"+e]);break}default:{const t=l/c;for(let i=1;i<=c;i++)a["button"+i]=a[e].shift(-90,t*i),n[o+i]=new s(o,a["button"+i])}}i.extraTopButton&&(n["top"+o]=new s(o,a[e].shift(-90,l/c/2)))},hd=(t,e)=>dd(t,e,"buttonhole"),md=t=>{const{store:e,points:o,measurements:a,options:i,Point:n}=t.shorthand(),s=a.shoulderToWrist*i.cuffLength,r=a.wrist*(1+i.cuffEase)*(1+i.cuffOverlap);return e.set("cuffHeight",s),o.topLeft=new n(0,0),o.topRight=new n(r,0),o.bottomLeft=new n(0,s),o.bottomRight=new n(r,s),t},fd=t=>{const{macro:e,store:o,snippets:a,Snippet:i,points:n,measurements:s,options:r,Point:l}=t.shorthand();o.cutlist.setCut([{cut:4,from:"fabric"},{cut:2,from:"interfacing"}]),n.title=new l(n.bottomRight.x/2,n.bottomRight.y/2),e("title",{nr:11,title:"cuff",at:n.title,scale:.8});const c=s.wrist*r.cuffOverlap;n.buttonLineTop=n.topRight.shift(180,c/2),n.buttonLineBottom=n.bottomRight.shift(180,c/2),n.button
1holeLineTop=n.topLeft.shift(0,c/2),n.buttonholeLineBottom=n.bottomLeft.shift(0,c/2);for(let p=1;p<=r.cuffButtonRows;p++)n["button"+p]=n.buttonLineTop.shiftFractionTowards(n.buttonLineBottom,1/(Number(r.cuffButtonRows)+1)*p),a["button"+p]=new i("button",n["button"+p]),n["buttonhole"+p]=new l(n.buttonholeLineTop.x,n["button"+p].y),a["buttonhole"+p]=new i("buttonhole",n["buttonhole"+p]).attr("data-rotate",90),r.barrelCuffNarrowButton&&(n["narrowButton"+p]=n["button"+p].shift(180,c),a["narrowButton"+p]=new i("button",n["narrowButton"+p]));return t},ud=t=>{const{store:e,points:o,measurements:a,options:i,Point:n}=t.shorthand(),s=a.wrist*i.cuffOverlap,r=a.shoulderToWrist*i.cuffLength,l=a.wrist*(1+i.cuffEase+i.cuffOverlap+i.cuffDrape)+s/2;return e.set("cuffHeight",r),o.topLeft=new n(0,0),o.topRight=new n(l,0),o.midLeft=new n(0,r),o.midRight=new n(l,r),o.bottomLeft=new n(0,2*r),o.bottomRight=new n(l,2*r),t},gd=t=>{const{macro:e,store:o,snippets:a,Snippet:i,points:n,measurements:s,options:r,Point:l}=t.shorthand();o.cutlist.setCut([{cut:4,from:"fabric"},{cut:2,from:"interfacing"}]),n.title=new l(n.bottomRight.x/2,n.bottomRight.y/2),e("title",{nr:11,title:"cuff",at:n.title,scale:.8});const c=s.wrist*r.cuffOverlap;return n.buttonLineTop=n.topRight.shift(180,.75*c),n.buttonLineBottom=n.bottomRight.shift(180,.75*c),n.buttonholeLineTop=n.topLeft.shift(0,.75*c),n.buttonholeLineBottom=n.bottomLeft.shift(0,.75*c),n.button1=n.buttonLineTop.shiftFractionTowards(n.buttonLineBottom,.2),n.button2=n.buttonLineTop.shiftFractionTowards(n.buttonLineBottom,.8),n.button3=n.buttonholeLineTop.shiftFractionTowards(n.buttonholeLineBottom,.2),n.button4=n.buttonholeLineTop.shiftFractionTowards(n.buttonholeLineBottom,.8),a.buttonhole1=new i("buttonhole",n.button1).attr("data-rotate",90),a.buttonhole2=new i("buttonhole",n.button2).attr("data-rotate",90),a.buttonhole3=new i("buttonhole",n.button3).attr("data-rotate",90),a.buttonhole4=new i("buttonhole",n.button4).attr("data-rotate",90),t},bd=t=>{const{sa:e,macro:o,points:a,options:i,complete:n}=t.shorthand();return n&&o("hd",{id:"wBetweenButtonAndHole",from:a.buttonhole1,to:a.button1,y:a.bottomLeft.y+15+e}),o("hd",{id:"wFull",from:a.bottomLeft,to:a.bottomRight,y:a.bottomLeft.y+30+e}),o("vd",{id:"hCuff",from:a.bottomLeft,to:a.topLeft.shift(0,40),x:a.bottomLeft.x-15-e}),n&&i.barrelCuffNarrowButton&&o("hd",{id:"wBetweenButtons",from:a.narrowButton1,to:a.button1,y:a.topRight.y-15-e}),n&&2===Number(i.cuffButtonRows)&&o("vd",{id:"hBetweenButtons",from:a.button2,to:a.button1,x:a.topRight.x+15+e}),t},wd=t=>{const{sa:e,macro:o,points:a,complete:i}=t.shorthand();return i&&(o("hd",{id:"wBetweenButtons",from:a.button4,to:a.button2,y:a.bottomLeft.y+15+e}),o("vd",{id:"hBetweenButtons",from:a.button2,to:a.button1,x:a.topRight.x+15+e})),o("hd",{id:"wFull",from:a.midLeft,to:a.midRight,y:a.bottomLeft.y+30+e}),o("vd",{id:"hFull",from:a.bottomRight.shift(180,40),to:a.topRight.shift(180,40),x:a.topRight.x+30+e}),t},kd=(t,e="left")=>{const{sa:o,options:a,points:i,paths:n,macro:s}=t.shorthand(),r="right"===e?-1:1;return o&&s("banner",{id:"ffsa",path:n.ffsa,text:"simon:flatFelledSeamAllowance",classes:"text-sm fill-note center",dy:"left"===e?-2:9}),s("vd",{id:"hArmholeToArmholePitch",from:i.armhole,to:i.armholePitch,x:i.armhole.x+(15+o*a.ffsa)*r}),s("vd",{id:"hArmholeToShoulder",from:i.armhole,to:i.s3ArmholeSplit,x:i.armhole.x+(30+o*a.ffsa)*r}),s("vd",{id:"hArmholeToHps",from:i.armhole,to:i.s3CollarSplit,x:i.armhole.x+(45+o*a.ffsa)*r}),s("vd",{id:"hWaistToArmhole",from:i.waist,to:i.armhole,x:i.armhole.x+(15+o*a.ffsa)*r}),s("vd",{id:"hHipsToArmhole",from:i.hips,to:i.armhole,x:i.armhole.x+(30+o*a.ffsa)*r}),s("ld",{id:"wAtArmhole",from:"left"===e?i.cfArmhole:i.armhole,to:"left"===e?i.armhole:i.cfArmhole}),s("ld",{id:"wAtWaist",from:"left"===e?i.cfWaist:i.waist,to:"left"===e?i.waist:i.cfWaist}),s("ld",{id:"wAtHips",from:"left"===e?i.cfHips:i.hips,to:"left"===e?i.hips:i.cfHips}),"baseball"===a.hemStyle?(s("vd",{id:"hBaseballCurve",from:i.bballStart,to:i.bballEnd,x:i.hips.x+(15+a.ffsa*o)*r}),s("vd",{id:"hHemToHips",from:i.bballStart,to:i.hips,x:i.hips.x+(30+a.ffsa*
1o)*r}),s("vd",{id:"hHemToArmhole",from:i.bballStart,to:i.armhole,x:i.hips.x+(75+a.ffsa*o)*r}),s("vd",{id:"hFull",from:i.bballStart,to:i.s3CollarSplit,x:i.hips.x+(90+a.ffsa*o)*r}),s("hd",{id:"wBaseballCurve",from:i.bballStart,to:i.bballEnd,y:i.bballStart.y+15+3*o})):"slashed"===a.hemStyle?(s("vd",{id:"hSlashCurve",from:i.slashEnd,to:i.slashStart,x:i.hips.x+(15+3*o)*r}),s("vd",{id:"hHemToHips",from:i.slashEnd,to:i.hips,x:i.hips.x+(30+3*o)*r}),s("vd",{id:"hHemToArmhole",from:i.slashEnd,to:i.armhole,x:i.hips.x+(75+3*o)*r}),s("vd",{id:"hFull",from:i.slashEnd,to:i.s3CollarSplit,x:i.hips.x+(90+3*o)*r})):(s("vd",{id:"hHemtoArmhole",from:i.hem,to:i.armhole,x:i.armhole.x+(45+a.ffsa*o)*r}),s("vd",{id:"hFull",from:i.hem,to:i.s3CollarSplit,x:i.armhole.x+(60+a.ffsa*o)*r})),t};var Cd=o(61035);const vd={list:["auto","never","always"],dflt:"auto",menu:"style"},yd={pct:25,min:5,max:75,menu:"advanced"},Td={pct:7,min:4,max:10,...(0,n.Wx)("shoulderToShoulder"),menu:"advanced"},xd={pct:8,min:4,max:12,...(0,n.Wx)("neck"),menu:"style.closure"},Bd={pct:5,min:2,max:8,...(0,n.Wx)("neck"),menu:"style.closure"},Sd={pct:2,min:0,max:10,menu:"fit"},Ld={pct:8,min:3,max:13,...(0,n.Wx)("neck"),menu:"style.collar"},Pd={pct:5,min:0,max:10,menu:(t,e)=>"short"!==e?.sleeveStyle&&"style.cuffs"},Rd={pct:20,min:10,max:40,menu:(t,e)=>"short"!==e?.sleeveStyle&&"fit"},Fd={pct:10,min:3,max:15,menu:(t,e)=>"short"!==e?.sleeveStyle&&"style.cuffs"},Ed={list:["roundedBarrelCuff","angledBarrelCuff","straightBarrelCuff","roundedFrenchCuff","angledFrenchCuff","straightFrenchCuff"],dflt:"angledBarrelCuff",menu:(t,e)=>"short"!==e?.sleeveStyle&&"style.cuffs"},Wd={pct:15,min:10,max:35,...(0,n.Wx)("hips"),menu:"fit"},Hd={pct:2,min:0,max:15,...(0,n.Wx)("shoulderToShoulder"),menu:"fit"},Ad={pct:3.5,min:-40,max:10,...(0,n.Wx)("shoulderToWrist"),menu:(t,e)=>"short"!==e?.sleeveStyle&&"fit"},Od={pct:40,min:20,max:100,...(0,n.Wx)("shoulderToWrist"),menu:(t,e)=>"short"===e?.sleeveStyle&&"style"},Dd={pct:4,min:1,max:20,...(0,n.Wx)("shoulderToWrist"),menu:(t,e)=>"short"===e?.sleeveStyle&&"style"},Nd={pct:25,min:15,max:35,...(0,n.Wx)("shoulderToWrist"),menu:(t,e)=>"short"!==e?.sleeveStyle&&"style.cuffs"},Id={pct:13,min:8,max:18,...(0,n.Wx)("wrist"),menu:(t,e)=>"short"!==e?.sleeveStyle&&"style.cuffs"},Md={list:["short","long"],dflt:"long",menu:"style"},_d={pct:15,min:10,max:35,...(0,n.Wx)("waist"),menu:"fit"};const jd={name:"simon.back",plugins:[Cd.dG],measurements:["waist","hips"],from:N,hide:n.V9.HIDE_TREE,options:{collarFactor:5,backDarts:vd,backDartShaping:yd,boxPleat:{bool:!1,menu:"style"},boxPleatFold:{pct:15,min:10,max:20,toAbs:(t,{measurements:e},o)=>e.shoulderToShoulder*o.boxPleatWidth*t,menu:"advanced"},boxPleatWidth:Td,roundBack:{pct:0,min:0,max:10,menu:"fit"},buttonholePlacketWidth:xd,buttonholePlacketFoldWidth:{pct:16,min:8,max:24,toAbs:(t,{measurements:e},o)=>e.neck*o.buttonholePlacketWidth*t,menu:"style.closure"},buttonPlacketWidth:Bd,hemCurve:{pct:50,min:25,max:100,menu:"style"},hemStyle:{list:["straight","baseball","slashed"],dflt:"straight",menu:"style"},hipsEase:Wd,lengthBonus:{pct:25,min:-4,max:60,menu:"fit"},shoulderEase:Hd,yokeHeight:{pct:70,min:40,max:90,menu:"style"},sleevePlacketWidth:Id,waistEase:_d},draft:function({store:t,measurements:e,sa:o,Point:a,points:i,Path:n,paths:s,Snippet:r,snippets:l,complete:c,utils:p,macro:d,options:h,part:m}){t.set("buttonPlacketWidth",e.neck*h.buttonPlacketWidth),t.set("buttonholePlacketWidth",e.neck*h.button
1holePlacketWidth),t.set("buttonholePlacketFoldWidth",t.get("buttonholePlacketWidth")*h.buttonholePlacketFoldWidth),t.set("collarStandWidth",e.neck*h.collarStandWidth),t.set("sleevePlacketWidth",e.wrist*h.sleevePlacketWidth),t.set("boxPleatWidth",e.shoulderToShoulder*h.boxPleatWidth),t.set("boxPleatFold",t.get("boxPleatWidth")*h.boxPleatFold),pd(m),t.set("library.sleeve.backArmholeLength",(new n).move(i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.armholePitchCp1,i.armholePitch).join(s.backArmhole).length()),i.hips=i.hips.shift(180,t.get("hipsReduction")/4),i.hem=i.hem.shift(180,t.get("hipsReduction")/4);let f=t.get("waistReduction");if(t.get("backDarts")){let t=f*h.backDartShaping/4,o=f*(1-h.backDartShaping)/4;i.waist=i.waist.shift(180,o),i.dartCenter=i.cbWaist.shiftFractionTowards(i.waist,.6),i.dartTop=i.dartCenter.shift(90,.75*i.armhole.dy(i.waist)),i.dartBottom=i.dartCenter.shift(-90,.75*e.waistToHips),i.dartCenterIn=i.dartCenter.shift(180,t),i.dartCenterOut=i.dartCenter.shift(0,t),i.dartCenterInCp1=i.dartCenterIn.shift(90,.2*i.dartTop.dy(i.dartCenter)),i.dartCenterInCp2=i.dartCenterIn.shift(90,.2*i.dartBottom.dy(i.dartCenter)),i.dartCenterOutCp1=i.dartCenterOut.shift(90,.2*i.dartBottom.dy(i.dartCenter)),i.dartCenterOutCp2=i.dartCenterOut.shift(90,.2*i.dartTop.dy(i.dartCenter)),s.dart=(new n).move(i.dartTop)._curve(i.dartCenterInCp1,i.dartCenterIn).curve_(i.dartCenterInCp2,i.dartBottom)._curve(i.dartCenterOutCp1,i.dartCenterOut).curve_(i.dartCenterOutCp2,i.dartTop).close().attr("class","fabric")}else i.waist=i.waist.shift(180,f/4);i.waistCp1=i.waist.shift(-90,.5*e.waistToHips),i.waistCp2=i.waist.shift(90,i.armhole.dy(i.waist)/2),i.hipsCp2=i.hips.shift(90,i.waist.dy(i.hips)/4),i.cbYoke=new a(0,i.s3ArmholeSplit.y+i.s3ArmholeSplit.dy(i.armholePitch)*h.yokeHeight),i.cbNeck.dy(i.cbYoke)<10&&(i.cbYoke.y=i.cbNeck.y+10);const u=s.backArmhole.intersectsY(i.cbYoke.y).pop();u?i.armholeYokeSplit=u:(i.armholeYokeSplit=s.backArmhole.start(),i.cbYoke.y=i.armholeYokeSplit.y);const[g,b]=s.backArmhole.split(i.armholeYokeSplit);s.backArmholeYoke=b.hide(),s.backArmholeBack=g.attributes?g.hide():(new n).move(i.armholeYokeSplit).line(i.armholeYokeSplit).hide();const w=(new n).move(i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.armholePitchCp1,i.armholePitch);if(t.set("library.sleeve.backArmholeToArmholePitch",s.backArmholeBack.length()+w.length()),s.armhole=w,0===h.yokeHeight?s.armhole=s.armhole.join(s.backArmhole):s.armhole=s.armhole.join(s.backArmholeBack),s.armhole.hide(),h.roundBack>0?(i.cbTop=i.cbYoke.shift(90,i.armholePitch.x*h.roundBack),i.cbTopCp1=i.cbTop.shift(0,.5*i.armholePitch.x),s.roundedBack=(new n).move(i.armholeYokeSplit)._curve(i.cbTopCp1,i.cbTop)):i.cbTop=i.cbYoke,i.armholeYokeSplitPreBoxpleat=i.armholeYokeSplit.clone(),h.boxPleat){i.boxPleatLeft=i.cbTop.shift(0,t.get("boxPleatWidth")/2),i.boxPleatMid=i.boxPleatLeft.shift(0,t.get("boxPleatFold")),i.boxPleatRight=i.boxPleatMid.shift(0,t.get("boxPleatFold")),i.boxPleatLeftBottom=new a(i.boxPleatLeft.x,i.armholeHollowCp2.y),i.boxPleatMidBottom=new a(i.boxPleatMid.x,i.armholeHollowCp2.y),i.boxPleatRightBottom=new a(i.boxPleatRight.x,i.armholeHollowCp2.y),s.armhole.hide(),s.armhole=s.armhole.translate(2*t.get("boxPleatFold"),0);for(const e of["armholePitch","armholePitchCp1","armholeHollowCp2","armholeHollow","armholeHollowCp1","armholeCp2","armhole","armholeYokeSplit"])i[e]=i[e].shift(0,2*t.get("boxPleatFold"))}switch(h.hemStyle){case"baseball":i.bballStart=i.cbHem.shiftFractionTowards(i.hem,.5),i.bballEnd=i.hem.shiftFractionTowards(i.hi
1ps,h.hemCurve),i.bballCp1=i.bballStart.shiftFractionTowards(i.hem,.5),i.bballCp2=new a(i.bballCp1.x,i.bballEnd.y),s.saBase=(new n).move(i.bballEnd).line(i.hips).curve(i.hipsCp2,i.waistCp1,i.waist).curve_(i.waistCp2,i.armhole).join(s.armhole),s.hemBase=(new n).move(i.cbHem).line(i.bballStart).curve(i.bballCp1,i.bballCp2,i.bballEnd);break;case"slashed":{const t=d("round",{id:"slash",from:i.hips,to:i.cbHem,via:i.hem,radius:i.hips.dist(i.hem)*h.hemCurve});for(const e of["start","cp1","cp2","end"])i[`slash${p.capitalize(e)}`]=i[t.points[e]].copy();s.saBase=(new n).move(i.hips).curve(i.hipsCp2,i.waistCp1,i.waist).curve_(i.waistCp2,i.armhole).join(s.armhole),s.hemBase=(new n).move(i.cbHem).line(i.slashEnd).curve(i.slashCp2,i.slashCp1,i.slashStart);break}default:s.saBase=(new n).move(i.hem).line(i.hips).curve(i.hipsCp2,i.waistCp1,i.waist).curve_(i.waistCp2,i.armhole).join(s.armhole),s.hemBase=(new n).move(i.cbHem).line(i.hem)}let k;return s.roundedBack?s.saBase=s.saBase.join(s.roundedBack):s.saBase=s.saBase.line(i.cbYoke),s.saBase.hide(),s.hemBase.hide(),s.seam=s.hemBase.join(s.saBase).close().attr("class","fabric"),o&&(s.sa=s.saBase.offset(o).attr("class","fabric sa"),s.hemSa=s.hemBase.offset(3*o).attr("class","fabric sa"),s.saConnect=(new n).move(i.cbHem).line(s.hemSa.start()).move(s.hemSa.end()).line(s.sa.start()).move(s.sa.end()).line(i.cbYoke).attr("class","fabric sa")),c&&h.boxPleat&&(s.boxPleat=(new n).move(i.boxPleatLeft).line(i.boxPleatLeftBottom).move(i.boxPleatMid).line(i.boxPleatMidBottom).move(i.boxPleatRight).line(i.boxPleatRightBottom).attr("class","fabric stroke-sm dashed")),c&&(d("banner",{id:"chestLine",classes:"center contrast help",path:s.chest,text:"simon:chestLine"}),d("banner",{id:"waistLine",classes:"center contrast help",path:s.waist,text:"simon:waistLine"})),delete l.armholePitchNotch,l.sleevecapNotch=new r("notch",i.armholeYokeSplit),d("cutonfold",{from:i.cbYoke,to:i.cbHem,grainline:!0}),i.title=new a(i.armhole.x/4,i.armhole.y),d("title",{at:i.title,nr:3,title:"back"}),i.logo=new a(i.armhole.x/4,i.waistCp2.y),l.logo=new r("logo",i.logo),d("rmad"),t.get("backDarts")?(d("vd",{id:"hDartBottom",from:i.dartBottom,to:i.dartCenterIn,x:i.dartCenterIn.x-15}),d("vd",{id:"hDartTop",from:i.dartCenterIn,to:i.dartTop,x:i.dartCenterIn.x-15}),d("hd",{id:"wDart",from:i.dartCenterIn,to:i.dartCenterOut,y:i.dartBottom.y+15}),d("hd",{id:"wDartToWaistSide",from:i.dartCenterOut,to:i.waist}),d("hd",{id:"wDartToCbWaist",from:i.cbWaist,to:i.dartCenterIn})):d("hd",{id:"wAtWaist",from:i.cbWaist,to:i.waist}),void 0!==i.slashEnd?(d("hd",{id:"wCbHemToSlashStart",from:i.cbHem,to:i.slashEnd,y:i.cbHem.y+15+3*o}),d("vd",{id:"hSlashCurve",from:i.slashEnd,to:i.slashStart,x:i.slashStart.x+15+3*o}),k=i.slashEnd):void 0!==i.bballStart?(d("hd",{id:"wCbHemToBbalCurveStart",from:i.cbHem,to:i.bballStart,y:i.cbHem.y+15+3*o}),d("vd",{id:"hBballCurve",from:i.bballStart,to:i.bballEnd,x:i.hips.x+15+o}),k=i.bballStart):k=i.hem,d("hd",{id:"wAtHem",from:i.cbHem,to:i.hips,y:i.cbHem.y+30+3*o}),d("vd",{id:"hHemToHips",from:k,to:i.hips,x:i.hips.x+30+o}),d("vd",{id:"hHemToWaist",from:k,to:i.waist,x:i.hips.x+45+o}),d("vd",{id:"hHemToArmhole",from:k,to:i.armhole,x:i.hips.x+60+o}),h.roundBack>0?(d("vd",{id:"hArmholeToRoundBackYoke",from:i.armhole,to:i.armholeYokeSplit,x:i.armhole.x+15+o}),d("vd",{id:"hARmholeToCbYoke",from:i.armhole,to:i.cbTop,x:i.armhole.x+30+o}),d("hd",{id:"wCbYokeToArmholePitch",from:i.cbTop,to:i.armholePitch,y:i.cbTop.y-15-o}),d("hd",{id:"wCbYokeToArmholeYokeSplit",from:i.cbTop,to:i.armholeYokeSplit,y:i.cbTop.y-30-o})):(d("vd",{id:"hArmholeToArmholePitch",from:i.armhole,to:i.armholePitch,x:i.armhole.x+15+o}),d("hd",{id:"wAtYoke",from:i.cbYoke,to:i.armholePitch,y:i.cbYoke.y-15-o})),d("vd",{id:"hFull",from:i.cbHem,to:i.cbYoke,x:i.cbHem.x-15}),m}};const Gd={name:"simon.front",from:I,after:jd,hide:{self:!0,from:!0,inherited:!0},options:{backDarts:vd,backDartShaping:yd,buttonFreeLength:{pct:2,min:-10,max:15,menu:"style.closure"},extraTopButton:{bool:!0,menu:"style.closure"},separateButtonPlacket:{bool:!1,menu:"style.closure"},separateButtonholePlacket:{bool:!1,menu:"style.closure"},buttons:{count:7,min:4,max:12,menu:"style.closure"},ffsa:{pct:150,min:100,max:200,toAbs:(t,e)=>e.sa*t,menu:"advanced"}},draft:function({store:t,measurements:e,sa:o,Point:a,points:i,Path:n,paths:s,macro:r,utils:l,snippets:c,complete:p,options:d,part:h}){for(const u in s)-1===["frontArmhole","frontCollar","chest","waist"].indexOf(u)&&delete s[u];for(const u in c)u.indexOf("otch")&&delete c[u];r("rmcutonfold"),pd(h),t.set("library.sleeve.frontArmholeLength",(new n).move(i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.armholePitchCp1,i.armholePitch).join(s.frontArmhole).length()),i.hips=i.hips.shift(180,t.get("hipsReduction")/4),i.hem=i.hem.shift(180,t.get("hipsReduction")/4);let m=t.get("waistReduction");switch(t.get("backDarts")?m=m*(1-d.backDartShaping)/4:m/=4,i.waist=i.waist.shift(180,m),i.waist
1Cp1=i.waist.shift(-90,.5*e.waistToHips),i.waistCp2=i.waist.shift(90,i.armhole.dy(i.waist)/2),i.hipsCp2=i.hips.shift(90,i.waist.dy(i.hips)/4),i.hem.x<i.waist.x&&(i.hem.x=i.waist.x,i.hips.x=i.waist.x,i.hipsCp2.x=i.waist.x),s.saBaseFromHips=(new n).move(i.hips).curve(i.hipsCp2,i.waistCp1,i.waist).curve_(i.waistCp2,i.armhole),s.saBaseFromArmhole=(new n).move(i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.armholePitchCp1,i.armholePitch).join(s.frontArmhole).line(i.s3CollarSplit).join(s.frontCollar),d.hemStyle){case"baseball":i.bballStart=i.cfHem.shiftFractionTowards(i.hem,.5),i.bballEnd=i.hem.shiftFractionTowards(i.hips,d.hemCurve),i.bballCp1=i.bballStart.shiftFractionTowards(i.hem,.5),i.bballCp2=new a(i.bballCp1.x,i.bballEnd.y),s.saBase=(new n).move(i.bballEnd).line(i.hips).join(s.saBaseFromHips),s.hemBase=(new n).move(i.cfHem).line(i.bballStart).curve(i.bballCp1,i.bballCp2,i.bballEnd);break;case"slashed":{const t=r("round",{id:"slash",from:i.hips,to:i.cfHem,via:i.hem,radius:i.hips.dist(i.hem)*d.hemCurve});for(const e of["start","cp1","cp2","end"])i[`slash${l.capitalize(e)}`]=i[t.points[e]].copy();s.saBase=(new n).move(i.hips).join(s.saBaseFromHips),s.hemBase=(new n).move(i.cfHem).line(i.slashEnd).curve(i.slashCp2,i.slashCp1,i.slashStart);break}default:s.saBase=(new n).move(i.hem).line(i.hips).join(s.saBaseFromHips),s.hemBase=(new n).move(i.cfHem).line(i.hem)}s.saBase.hide(),s.saBaseFromHips.hide(),s.saBaseFromArmhole.hide(),s.hemBase.hide(),s.seam=s.hemBase.join(s.saBase).join(s.saBaseFromArmhole).addClass("fabric"),o&&(s.ffsa=s.saBase.offset(o*d.ffsa).attr("class","fabric sa"),s.saFromArmhole=s.saBaseFromArmhole.offset(o).attr("class","fabric sa"),s.hemSa=s.hemBase.offset(3*o).attr("class","fabric sa"),s.saConnect=(new n).move(s.hemSa.end()).line(s.ffsa.start()).move(s.ffsa.end()).line(s.saFromArmhole.start()).attr("class","fabric sa"),delete s.sa),p&&(r("banner",{id:"chestLine",classes:"center contrast help",path:s.chest,text:"simon:chestLine"}),r("banner",{id:"waistLine",classes:"center contrast help",path:s.waist,text:"simon:waistLine"})),t.cutlist.setCut({cut:1,from:"fabric"});const f=.2*(i.hem.x-i.cfHem.x);return r("grainline",{from:i.cfHem.shift(0,f),to:i.cfNeck.shift(0,f)}),r("sprinkle",{snippet:"notch",on:["waist","armholePitch","hips","cfHips","cfWaist","armhole","cfArmhole"]}),r("rmtitle"),h}};const Ud={name:"simon.frontRight",from:Gd,options:{buttonPlacketStyle:{list:["classic","seamless"],dflt:"classic",menu:(t,e)=>!e?.separateButtonPlacket&&"style.closure"}},draft:function(t){const{sa:e,options:o,points:a,macro:i,part:n,paths:s,complete:r}=t;if(i("flip"),r&&(i("banner",{id:"chestLine",classes:"center contrast help",path:s.chest.reverse(),text:"simon:chestLine"}),i("banner",{id:"waistLine",classes:"center contrast help",path:s.waist.reverse(),text:"simon:waistLine"})),a.scalebox=a.waist.shiftFractionTowards(a.cfWaist,.5),i("scalebox",{at:a.scalebox}),kd(n,"right"),i("ld",{id:"lShoulderSeam",from:a.s3ArmholeSplit,to:a.s3CollarSplit,d:15+e}),o.separateButtonPlacket)return(({store:t,snippets:e,utils:o,sa:a,Point:i,points:n,paths:s,macro:r,part:l})=>{const c=t.get("buttonPlacketWidth");return n.placketTopIn=o.lineIntersectsCurve(new i(c/-2,n.cfNeck.y+20),new i(c/-2,n.cfNeck.y-20),n.cfNeck,n.cfNeckCp1,n.neckCp2Front,n.neck),n.placketBottomIn=n.cfHem.shift(180,c/2),s.seam=s.seam.split(n.placketTopIn)[0],s.seam.ops[0].to=n.placketBottomIn,s.seam.close().attr("class","fabric"),a&&s.saFromArmhole.line(s.hemSa.start()),r("title",{at:n.title,nr:"1a",title:"rightFront"}),delete e["cfWaist-notch"],delete e["cfHips-notch"],delete e["cfArmhole-notch"],delete e["cfBust-notch"],n.edgeArmhole=new i(n.placketTopIn.x,n.armhole.y),n.edgeWaist=new i(n.placketTopIn.x,n.waist.y),n.edgeHips=new i(n.placketTopIn.x,n.hips.y),r("hd",{id:"wHpsToEdge",from:n.s3CollarSplit,to:n.placketTopIn,y:n.s3CollarSplit.y-a-15}),r("hd",{id:"wShoulderToEdge",from:n.s3ArmholeSplit,to:n.placketTopIn,y:n.s3CollarSplit.y-a-30}),r("hd",{id:"wFull",from:n.armhole,to:n.placketTopIn,y:n.s3CollarSplit.y-a-45}),r("vd",{id:"hPlacketTopToHps",from:n.placketTopIn,to:n.s3CollarSplit,x:n.placketTopIn.x+a+15}),r("vd",{id:"hFull",from:n.placketBottomIn,to:n.placketTopIn,x:n.placketTopIn.x+a+15}),l})(t);if("seamless"===o.buttonPlacketStyle)return(({sa:t,store:e,Point:o,points:a,Path:i,paths:n,complete:s,macro:r,options:l,part:c})=>{const p=e.get("buttonPlacketWidth");let d;a.placketTopFold1=a.cfNeck.shift(0,p/2),a.placketTopFold2=a.cfNeck.shift(0,1.5*p),a.placketTopEdge=a.cfNeck.shift(0,2.5*p),a.placketTopIn=a.cfNeck.shift(180,p/2),a.placketBottomFold1=a.cfHem.shift(0,p/2),a.placketBottomFold2=a.cfHem.shift(0,1.5*p),a.placketBottomEdge=a.cfHem.shift(0,2.5*p),a.placketBottomIn=a.cfHem.shift(180,p/2),n.seam.line(a.placketTopEdge).line(a.placketBottomEdge).line(a.cfHem).close(),t&&n.saFromArmhole.line(new o(a.placketTopEdge.x,a.placketTopEdge.y-t)).line(a.placketTopEdge).move(a.placketBottomEdge).line(a.placketBottomEdge.shift(-90,3*t)).line(n.hemSa.start()),s&&(n.frontCenter=(new i).move(a.cfNeck).line(a.cfHem).attr("class","help"),l.separateButtonholePlacket||n.frontCenter.addText("simon:matchHere","text-xs center"),n.placketFold1=(new i).move(a.placketTopFold1).line(a.placketBottomFold1).attr("class","dotted"),n.placketFold2=(new i).move(a.placketTopFold2).line(a.placketBottomFold2).attr("class","dotted"),n.placketInnerFold=(new i).move(a.placketBottomIn).line(a.placketTopIn).attr("class","dotted")),r("sprinkle",{snippet:"notch",on:["placketTopFold1","placketTopFold2","placketBottomFold1","placketBottomFold2","cfNeck","cfHem"]}),dd(c),r("title",{at:a.title,nr:1,title:"frontRight"}
1),r("hd",{id:"wHpsToEdge",from:a.hps,to:a.placketTopEdge,y:a.hps.y-t-15}),r("hd",{id:"wShoulderToEdge",from:a.s3ArmholeSplit,to:a.placketTopEdge,y:a.hps.y-t-30}),r("hd",{id:"wFull",from:a.armhole,to:a.placketTopEdge,y:a.hps.y-t-45}),r("vd",{id:"hHpsToPlacketTop",from:a.placketTopEdge,to:a.s3CollarSplit,x:a.placketTopEdge.x+t+15}),r("vd",{id:"hPlacket",from:a.placketBottomEdge,to:a.placketTopEdge,x:a.placketTopEdge.x+30}),a.button0=a.placketTopEdge;for(let h=0;h<l.buttons;h++)d=h+1,r("vd",{id:`hBetweenButtons${h}`,from:a["button"+d],to:a["button"+h],x:a.placketTopEdge.x+15});return r("hd",{id:"wPlacketFold2",from:a.placketTopFold2,to:a.placketTopEdge,y:a.placketTopEdge.y-15-t}),r("hd",{id:"wPlacketFold1",from:a.placketTopFold1,to:a.placketTopEdge,y:a.placketTopEdge.y-30-t}),r("hd",{id:"wCfToEdge",from:a.cfNeck,to:a.placketTopEdge,y:a.placketTopEdge.y-45-t}),r("hd",{id:"wPlacketInnerToEdge",from:a.placketTopIn,to:a.placketTopEdge,y:a.placketTopEdge.y-60-t}),c})(t);if("classic"===o.buttonPlacketStyle)return(({store:t,utils:e,sa:o,Point:a,points:i,Path:n,paths:s,complete:r,macro:l,options:c,part:p})=>{const d=t.get("buttonPlacketWidth");let h;i.placketTopIn=e.lineIntersectsCurve(new a(d/-2,i.cfNeck.y+20),new a(d/-2,i.cfNeck.y-20),i.cfNeck,i.cfNeckCp1,i.neckCp2Front,i.neck),i.placketTopOut=i.cfNeck.shift(0,d/2),i.placketTopEdge=i.cfNeck.shift(0,1.5*d),i.placketBottomIn=i.cfHem.shift(180,d/2),i.placketBottomOut=i.cfHem.shift(0,d/2),i.placketBottomEdge=i.cfHem.shift(0,1.5*d),s.seam.line(i.placketTopEdge).line(i.placketBottomEdge).line(i.cfHem).close(),o&&s.saFromArmhole.line(new a(i.placketTopEdge.x+o,i.placketTopEdge.y-o)).line(new a(i.placketBottomEdge.x+o,i.placketBottomEdge.y+3*o)).line(s.hemSa.start()),r&&(s.frontCenter=(new n).move(i.cfNeck).line(i.cfHem).attr("class","help"),c.separateButtonholePlacket||s.frontCenter.addText("simon:matchHere","text-xs center"),s.placketInnerFold=(new n).move(i.placketBottomIn).line(i.placketTopIn).attr("class","dotted"),s.placketOuterFold=(new n).move(i.placketTopOut).line(i.placketBottomOut).attr("class","dotted")),l("sprinkle",{snippet:"notch",on:["placketTopIn","placketTopOut","cfNeck","placketBottomIn","placketBottomOut","cfHem"]}),dd(p),l("rmtitle"),l("title",{at:i.title,nr:1,title:"frontRight"}),l("hd",{id:"wPlacketEdge",from:i.placketTopOut,to:i.placketTopEdge,y:i.placketTopEdge.y-15-o}),l("hd",{id:"wCfToEdge",from:i.cfNeck,to:i.placketTopEdge,y:i.placketTopEdge.y-30-o}),l("hd",{id:"wPlacketInnerToEdge",from:i.placketTopIn,to:i.placketTopEdge,y:i.placketTopEdge.y-45-o}),l("hd",{id:"wHpsToEdge",from:i.s3CollarSplit,to:i.placketTopEdge,y:i.s3CollarSplit.y-15-o}),l("hd",{id:"wShoulderToEdge",from:i.s3ArmholeSplit,to:i.placketTopEdge,y:i.s3CollarSplit.y-30-o}),l("hd",{id:"wFull",from:i.armhole,to:i.placketTopEdge,y:i.s3CollarSplit.y-45-o}),i.button0=i.placketTopEdge;for(let m=0;m<c.buttons;m++)h=m+1,l("vd",{id:`hBetweenButtons${m}`,from:i["button"+h],to:i["button"+m],x:i.placketTopEdge.x+15+o});return l("vd",{id:"hPlacket",from:i.placketBottomEdge,to:i.placketTopEdge,x:i.placketTopEdge.x+30+o}),p})(t);throw`Unexpected buttonPlacketStyle: ${o.buttonPlacketStyle}`}};const Yd={name:"simon.frontLeft",from:Gd,options:{buttonholePlacketStyle:{list:["classic","seamless"],dflt:"seamless",menu:(t,e)=>!e?.separateButtonholePlacket&&"style.closure"}},draft:function(t){const{sa:e,options:o,points:a,macro:i,part:n}=t;if(kd(n,"left"),i("ld",{from:a.s3CollarSplit,to:a.s3ArmholeSplit,d:15+e}),o.separateButtonholePlacket)return(({utils:t,sa:e,Point:o,points:a,Path:i,paths:n,store:s,snippets:r,macro:l,part:c})=>{const p=s.get("buttonholePlacketFoldWidth");return a.neckEdge=t.lineIntersectsCurve(new o(a.cfNeck.x+2*p,a.cfNeck.y+20),new o(a.cfNeck.x+2*p,a.cfNeck.y-20),a.cfNeck,a.cfNeckCp1,a.neckCp2Front,a.neck),a.hemEdge=new o(a.neckEdge.x,a.cfHem.y),n.seam=n.seam.split(a.neckEdge)[0],n.seam.ops[0].to=a.hemEdge,n.seam.close().attr("class","fabric"),e&&(n.saFromArmhole.end().x=a.neckEdge.x-e,n.hemSa.start().x=a.neckEdge.x-e,n.saClosure=(new i).move(n.saFromArmhole.end()).line(n.hemSa.start()).attr("class","fabric sa")),l("title",{at:a.title,nr:"2a",title:"frontLeft"}),delete r["cfWaist-notch"],delete r["cfHips-notch"],delete r["cfArmhole-notch"],delete r["cfBust-notch"],a.edgeArmhole=new o(a.neckEdge.x,a.armhole.y),a.edgeWaist=new o(a.neckEdge.x,a.waist.y),a.edgeHips=new o(a.neckEdge.x,a.hips.y),l("sprinkle",{snippet:"notch",on:["edgeArmhole","edgeWaist","edgeHips"]}),l("hd",{id:"wEdgeToHps",from:a.neckEdge,to:a.s3CollarSplit,y:a.s3CollarSplit.y-e-15}),l("hd",{id:"wEdgeToShoulder",from:a.neckEdge,to:a.s3ArmholeSplit,y:a.s3CollarSplit.y-e-30}),l("hd",{id:"wEdgeToArmhole",from:a.neckEdge,to:a.armhole,y:a.s3CollarSplit.y-e-45}),l("vd",{id:"hPlacketTopToHps",from:a.neckEdge,to:a.s3CollarSplit,x:a.neckEdge.x-e-15}),l("vd",{id:"hFull",from:a.hemEdge,to:a.s3CollarSplit,x:a.neckEdge.x-e-30}),c})(t);
1if("seamless"===o.buttonholePlacketStyle)return(({sa:t,points:e,Path:o,paths:a,complete:i,store:n,macro:s,options:r,part:l})=>{const c=n.get("buttonholePlacketWidth");e.placketCfNeck=e.cfNeck,e.placketTopFold1=e.cfNeck.shift(180,c/2),e.placketTopFold2=e.cfNeck.shift(180,1.5*c),e.placketTopEdge=e.cfNeck.shift(180,2.5*c),e.placketBottomFold1=e.cfHem.shift(180,c/2),e.placketBottomFold2=e.cfHem.shift(180,1.5*c),e.placketBottomEdge=e.cfHem.shift(180,2.5*c),a.seam.line(e.placketTopEdge).line(e.placketBottomEdge).close(),t&&a.saFromArmhole.line(e.placketTopEdge.shift(90,t)).line(e.placketTopEdge).move(e.placketBottomEdge).line(e.placketBottomEdge.shift(-90,3*t)).line(a.hemSa.start()),i&&(a.frontCenter=(new o).move(e.cfNeck).line(e.cfHem).attr("class","help"),r.separateButtonPlacket||a.frontCenter.addText("simon:matchHere","text-xs center"),a.placketFold1=(new o).move(e.placketBottomFold1).line(e.placketTopFold1).attr("class","dotted"),a.placketFold2=(new o).move(e.placketBottomFold2).line(e.placketTopFold2).attr("class","dotted")),s("sprinkle",{snippet:"notch",on:["cfNeck","cfHem","placketTopFold1","placketTopFold2","placketBottomFold1","placketBottomFold2"]}),hd(l,"cfNeck"),s("title",{at:e.title,nr:2,title:"frontLeft"});let p,d=0;for(const h of["placketBottomFold2","placketBottomFold1","cfHem","hips"])d+=15,s("hd",{id:`wEdgeTo${h}`,from:e.placketBottomEdge,to:e[h],y:e.placketBottomEdge.y+d+3*t});s("hd",{id:"wEdgeToHps",from:e.placketTopEdge,to:e.s3CollarSplit,y:e.s3CollarSplit.y-15-t}),s("hd",{id:"wEdgeToShoulder",from:e.placketTopEdge,to:e.s3ArmholeSplit,y:e.s3CollarSplit.y-30-t}),s("hd",{id:"wFull",from:e.placketTopEdge,to:e.armhole,y:e.s3CollarSplit.y-45-t}),e.button0=e.placketTopEdge;for(let h=0;h<r.buttons;h++)p=h+1,s("vd",{from:e["button"+p],id:`hBetweenButtons${h}`,to:e["button"+h],x:e.placketTopEdge.x-15});return s("vd",{id:"hPlacket",from:e.placketBottomEdge,to:e.placketTopEdge,x:e.placketTopEdge.x-30}),l})(t);if("classic"===o.buttonholePlacketStyle)return(({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,complete:l,macro:c,options:p,part:d})=>{const h=t.get("buttonholePlacketFoldWidth"),m=t.get("buttonholePlacketWidth");a.placketCfNeck=a.cfNeck.shift(180,2*h),a.placketTopInnerEdgeFold=a.placketCfNeck.shift(0,m/2),a.placketTopInnerEdgeOver=a.placketCfNeck.shift(0,m/2-h),a.placketTopInnerEdgeUnder=a.placketCfNeck.shift(0,m/2+h),a.placketTopOuterEdgeFold=a.placketCfNeck.shift(180,m/2),a.placketTopOuterEdgeOver=a.placketCfNeck.shift(180,m/2-h),a.placketTopOuterEdgeUnder=a.placketCfNeck.shift(180,m/2+h),a.placketCfHem=a.cfHem.shift(180,2*h),a.placketBottomInnerEdgeFold=a.placketCfHem.shift(0,m/2),a.placketBottomInnerEdgeOver=a.placketCfHem.shift(0,m/2-h),a.placketBottomInnerEdgeUnder=a.placketCfHem.shift(0,m/2+h),a.placketBottomOuterEdgeFold=a.placketCfHem.shift(180,m/2),a.placketBottomOuterEdgeOver=a.placketCfHem.shift(180,m/2-h),a.placketBottomOuterEdgeUnder=a.placketCfHem.shift(180,m/2+h),a.placketTopEdge=a.placketTopOuterEdgeFold.shift(180,m),a.placketBottomEdge=a.placketBottomOuterEdgeFold.shift(180,m),void 0!==a.cfBust&&(a.cfBust=a.cfBust.shift(180,2*h)),a.placketEdgeWaist=new o(a.placketBottomEdge.x,a.waist.y),a.placketEdgeArmhole=new o(a.placketBottomEdge.x,a.armhole.y),a.placketEdgeHips=new o(a.placketBottomEdge.x,a.hips.y),n.seam.line(a.placketTopEdge).line(a.placketBottomEdge).close(),e&&n.saFromArmhole.line(a.placketTopEdge.shift(90,e)).line(a.placketTopEdge).move(a.placketBottomEdge).line(a.placketBottomEdge.shift(-90,3*e)).line(n.hemSa.start()),l&&(n.frontCenter=(new i).move(a.placketCfNeck).line(a.placketCfHem).attr("class","help"),p.separateButtonPlacket||n.frontCenter.addText("simon:matchHere","text-xs center"),n.placketInnerEdgeFold=(new i).move(a.placketTopInnerEdgeFold).line(a.placketBottomInnerEdgeFold).attr("class","dotted"),n.placketInnerEdgeOver=(new i).move(a.placketTopInnerEdgeOver).line(a.placketBottomInnerEdgeOver).attr("class","dotted"),n.placketInnerEdgeUnder=(new i).move(a.placketTopInnerEdgeUnder).line(a.placketBottomInnerEdgeUnder).attr("class","dotted"),n.placketOuterEdgeFold=(new i).move(a.placketTopOuterEdgeFold).line(a.placketBottomOuterEdgeFold).attr("class","dotted"),n.placketOuterEdgeOver=(new i).move(a.placketBottomOuterEdgeOver).line(a.placketTopOuterEdgeOver).attr("class","dotted"),n.placketOuterEdgeUnder=(new i).move(a.placketTopOuterEdgeUnder).line(a.placketBottomOuterEdgeUnder).attr("class","dotted")),delete r["cfBust-notch"],c("sprinkle",{snippet:"notch",on:["placketCfNeck","placketCfHem","placketEdgeArmhole","placketEdgeWaist","placketEdgeHips","placketTopInnerEdgeFold","placketTopInnerEdgeOver","placketTopInnerEdgeUnder","placketTopOuterEdgeFold","placketTopOuterEdgeOver","placketTopOuterEdgeUnder","placketBottomInnerEdgeFold","placketBottomInnerEdgeOver","placketBottomInnerEdgeUnder","placketBottomOuterEdgeFold","placketBottomOuterEdgeOver","placketBottomOuterEdgeUnder"]}),delete r["cfWaist-notch"],delete r["cfHips-notch"],delete r["cfArmhole-notch"],a.cfBust&&(r["cfBust-notch"]=new s("notch",a.cfBust)),hd(d,"placketCfNeck"),c("title",{at:a.title,nr:2,t
1itle:"frontLeft"});let f,u=0;for(const g of["placketTopOuterEdgeUnder","placketTopOuterEdgeFold","placketTopOuterEdgeOver","placketCfNeck","placketTopInnerEdgeOver","placketTopInnerEdgeFold","placketTopInnerEdgeUnder"])u+=15,c("hd",{id:`wAt${g}`,from:a.placketTopEdge,to:a[g],y:a.placketTopEdge.y-u-e});c("hd",{id:"wEdgeToHps",from:a.placketTopEdge,to:a.s3CollarSplit,y:a.placketTopEdge.y-u-e-15}),c("hd",{id:"wEdgeToShoulder",from:a.placketTopEdge,to:a.s3ArmholeSplit,y:a.placketTopEdge.y-u-e-30}),c("hd",{id:"wEdgeToArmhole",from:a.placketTopEdge,to:a.armhole,y:a.placketTopEdge.y-u-e-45}),a.button0=a.placketTopEdge;for(let g=0;g<p.buttons;g++)f=g+1,c("vd",{id:`hBetweenButtons${g}`,from:a["button"+f],to:a["button"+g],x:a.placketTopEdge.x-15});return c("vd",{id:"hPlacket",from:a.placketBottomEdge,to:a.placketTopEdge,x:a.placketTopEdge.x-30}),d})(t);throw`Unexpected buttonholePlacketStyle: ${o.buttonholePlacketStyle}`}};const $d={name:"simon.buttonPlacket",from:Gd,after:jd,draft:function({utils:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,complete:l,macro:c,options:p,store:d,part:h}){if(!p.separateButtonPlacket)return h.paths={},h.snippets={},h.points={},h;for(const g in n)"seam"!==g&&delete h.paths[g];let m=["cfBust-notch","cfArmhole-notch","cfWaist-notch","cfHem-notch"];for(const g in r)m.includes(g)||delete r[g];c("flip");const f=d.get("buttonPlacketWidth");let u;a.placketTopIn=t.lineIntersectsCurve(new o(f/-2,a.cfNeck.y+20),new o(f/-2,a.cfNeck.y-20),a.cfNeck,a.cfNeckCp1,a.neckCp2Front,a.neck),a.placketTopOut=a.cfNeck.shift(0,f/2),a.placketTopEdge=a.cfNeck.shift(0,1.5*f),a.placketBottomIn=a.cfHem.shift(180,f/2),a.placketBottomOut=a.cfHem.shift(0,f/2),a.placketBottomEdge=a.cfHem.shift(0,1.5*f),n.saBase=(new i).move(a.placketBottomIn).line(a.placketTopIn).join(n.seam.split(a.placketTopIn)[1]).line(a.placketTopEdge).line(a.placketBottomEdge),n.seam=n.saBase.clone().close().attr("class","fabric"),e&&(n.sa=n.saBase.offset(-1*e).line(new o(a.placketBottomEdge.x+e,a.placketBottomEdge.y+3*e)).line(new o(a.placketBottomIn.x-e,a.placketBottomIn.y+3*e)).close().attr("class","fabric sa")),l&&(n.placketOuterFold=(new i).move(a.placketTopOut).line(a.placketBottomOut).attr("class","dotted"),c("sprinkle",{snippet:"notch",on:["placketTopOut","placketBottomOut"]})),dd(h),a.grainlineFrom=a.placketBottomEdge.shift(180,f/2),a.grainlineTo=a.placketTopEdge.shift(180,f/2),c("grainline",{from:a.grainlineFrom,to:a.grainlineTo}),a.title=new o(a.placketTopOut.x,a.cfArmhole.y),c("title",{at:a.title,nr:"1b",title:"buttonPlacket",scale:.75,rotation:-90}),a.logo=a.title.shift(-90,120),r.logo=new s("logo",a.logo).attr("data-scale",.5).attr("data-rotate",-90),c("hd",{id:"wHalfPlacket",from:a.placketTopIn,to:a.placketTopOut,y:a.placketTopIn.y-15-e}),c("hd",{id:"wFull",from:a.placketTopIn,to:a.placketTopEdge,y:a.placketTopIn.y-30-e}),c("vd",{id:"hFull",from:a.placketBottomEdge,to:a.placketTopEdge,x:a.placketTopEdge.x+15+e}),a.button0=a.placketTopEdge;for(let g=0;g<p.buttons;g++)u=g+1,c("vd",{id:`hBetweenButtons${g}`,from:a["button"+u],to:a["button"+g],x:a.placketTopIn.x-15-e});return h}};const zd={name:"simon.buttonholePlacket",from:Gd,after:jd,draft:function({utils:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,complete:l,macro:c,options:p,store:d,part:h}){if(!p.separateButtonholePlacket)return h.paths={},h.snippets={},h.points={},h;for(const b in n)delete h.paths[b];for(const b of["waist","armholePitch","hips","armhole","bust"])delete r[b+"-notch"];const m=d.get("buttonholePlacketWidth"),f=d.get("buttonholePlacketFoldWidth");a.topInnerEdge=t.lineIntersectsCurve(new o(a.cfNeck.x+2*f,a.cfNeck.y+20),new o(a.cfNeck.x+2*f,a.cfNeck.y-20),a.cfNeck,a.cfNeckCp1,a.neckCp2Front,a.neck),a.bottomInnerEdge=new o(a.topInnerEdge.x,a.cfHem.y),a.placketCfNeck=a.cfNeck.shift(180,2*f),a.placketTopInnerEdgeFold=a.placketCfNeck.shift(0,m/2),a.placketTopInnerEdgeOver=a.placketCfNeck.shift(0,m/2-f),a.placketTopInnerEdgeUnder=a.placketCfNeck.shift(0,m/2+f),a.placketTopOuterEdgeFold=a.placketCfNeck.shift(180,m/2),a.placketTopOuterEdgeOver=a.placketCfNeck.shift(180,m/2-f),a.placketTopOuterEdgeUnder=a.placketCfNeck.shift(180,m/2+f),a.placketCfHem=a.cfHem.shift(180,2*f),a.placketBottomInnerEdgeFold=a.placketCfHem.shift(0,m/2),a.placketBottomInnerEdgeOver=a.placketCfHem.shift(0,m/2-f),a.placketBottomInnerEdgeUnder=a.placketCfHem.shift(0,m/2+f),a.placketBottomOuterEdgeFold=a.placketCfHem.shift(180,m/2),a.placketBottomOuterEdgeOver=a.placketCfHem.shift(180,m/2-f),a.placketBottomOuterEdgeUnder=a.placketCfHem.shift(180,m/2+f),a.placketTopEdge=a.placketTopOuterEdgeFold.shift(180,m),a.placketBottomEdge=a.placketBottomOuterEdgeFold.shift(180,m),n.saBase=(new i).move(a.placketTopEdge).line(a.cfNeck).curve(a.cfNeckCp1,a.neckCp2Front,a.neck).split(a.topInnerEdge)[0].line(a.bottomInnerEdge),n.seam=n.saBase.clone().line(a.placketBottomEdge).close().attr("class","fabric"),e&&(n.sa=n.saBase.offset(-1*e),n.sa.line(new o(a.bottomInnerEdge.x+e,a.bottomInnerEdge.y+3*e)).line(new o(a.placketBottomEdge.x,a.placketBottomEdge.y+3*e)).line(a.placketBottomEdge).move(a.placketTopEdge).line(n.sa.start()).attr("class","fabric sa")),l&&(n.frontCenter=(new i).move(a.placketCfNeck).line(a.placketCfHem).attr("class","help"),n.placketInnerEdgeFold=(new i).move(a.placketTopInnerEdgeFold).line(a.placketBottomInnerEdgeFold).attr("class","dotted"),n.placketInnerEdgeOver=(new i).move(a.placketTopInnerEdgeOver).line(a.placketBottomInnerEdgeOver).attr("class","dotted"),n.placketOuterEdgeFold=(new i).move(a.placketTopOuterEdgeFold).line(a.placketBottomOuterEdgeFold).attr("class","dotted"),n.placketOuterEdgeOver=(new i).move(a.placketTopOuterEdgeOver).line(a.placketBottomOuterEdgeOver).attr("class","dotted"),n.placketOuterEdgeUnder=(new i).move(a.placketTopOuterEdgeUnder).line(a.placketBottomOuterEdgeUnder).attr("class","dotted")),r["cfArmhole-notch"].anchor.x=a.cfArmhole.x-2*f,r["cfWaist-notch"].anchor.x=a.cfArmhole.x-2*f,void 0!==r["cfBust-notch"]&&(r["cfBust-notch"].anchor.x=a.cfArmhole-2*f),void 0!==r["cfHem-notch"]&&(r["cfHem-notch"].anchor.x=a.cfArmhole.x-2*f),void 0!==r["cfHips-notch"]&&(r["cfHips-notch"].anchor.x=a.cfArmhole.x-2*f),hd(h,"placketCfNeck"),a.grainlineFrom=a.placketBottomEdge.shift(0,m/2),a.grainlineTo=a.placketTopEdge.shift(0,m/2),c("grainline",{from:a.grainlineFrom,to:a.grainlineTo}),a.title=new o(a.placketCfNeck.x,a.cfArmhole.y),c("title",{at:a.title,nr:"2b",title:"buttonholePlacket",scale:.75,rotation:-90}),a.logo=a.title.shift(-90,120),r.logo=new s("logo",a.logo).attr("data-scale",.5).attr("data-rotate",-90);let u,g=0;for(const b of["placketBottomOuterEdgeUnder","placketBottomOuterEdgeFold","placketBottomOuterEdgeOver","placketCfHem","placketBottomInnerEdgeOver","placketBottomInnerEdgeFold","placketBottomInnerEdgeUnder"])g+=15,c("hd",{id:`hEdgeTo${b}`,from:a.placketBottomEdge,to:a[b],y:a.placketBottomEdge.y+g+3*e});a.button0=a.placketTopEdge;for(let b=0;b<p.buttons;b++)u=b+1,c("vd",{id:`hBetweenButtons${b}`,from:a["button"+u],to:a["button"+b],x:a.placketTopEdge.x-15});return c("vd",{id:"hFull",from:a.placketBottomEdge,to:a.placketTopEdge,x:a.placketTopEdge.x-30}),h}};const Jd={name:"simon.yoke",from:jd,options:{splitYoke:{bool:!1,menu:"style"}}
1,draft:function({sa:t,Point:e,points:o,Path:a,paths:i,Snippet:n,snippets:s,macro:r,options:l,store:c,part:p}){for(const d in i)-1===["backCollar","backArmhole","backArmholeYoke"].indexOf(d)&&delete p.paths[d];return c.cutlist.setCut({cut:2,from:"fabric"}),i.saBase=(new a).move(o.cbYoke).line(o.armholeYokeSplitPreBoxpleat),l.yokeHeight>0&&(i.saBase=i.saBase.join(i.backArmholeYoke)),i.saBase=i.saBase.line(o.s3CollarSplit).join(i.backCollar),l.splitYoke?i.saBase=i.saBase.line(o.cbYoke).close():(r("mirror",{mirror:[o.cbNeck,o.cbYoke],paths:["saBase"],clone:!0}),i.saBase=i.saBase.join(i.mirroredSaBase.reverse()),i.mirroredSaBase.hide()),i.seam=i.saBase.clone(),i.saBase.hide(),i.seam=i.seam.close().attr("class","fabric"),t&&(i.sa=i.saBase.offset(t).attr("class","fabric sa"),l.splitYoke&&(i.sa=i.sa.line(o.cbNeck).move(o.cbYoke).line(i.sa.start()))),delete s.armholePitchNotch,delete s.collarNotch,delete s.shoulderNotch,s.sleevecapNotch=new n("notch",o.armholeYokeSplitPreBoxpleat),o.title=new e(o.neck.x,o.cbYoke.y/2),r("title",{at:o.title,nr:4,title:"yoke",scale:.8}),o.logo=new e(o.neck.x/2,.5*o.cbYoke.y),s.logo=new n("logo",o.logo).scale(.666),o.grainlineFrom=o.cbYoke.shiftFractionTowards(o.cbNeck,.2),o.grainlineTo=o.cbNeck.shiftFractionTowards(o.cbYoke,.2),r("grainline",{from:o.grainlineFrom,to:o.grainlineTo}),r("hd",{id:"wCbToHps",from:o.cbNeck,to:o.s3CollarSplit,y:o.s3CollarSplit.y-15-t}),r("ld",{id:"lShoulderSeam",from:o.s3CollarSplit,to:o.s3ArmholeSplit,d:15+t}),l.splitYoke?(r("hd",{id:"wCbToYokeEdge",from:o.cbYoke,to:o.armholeYokeSplitPreBoxpleat,y:o.cbYoke.y+15+t}),r("hd",{id:"wFullHalf",from:o.cbYoke,to:o.s3ArmholeSplit,y:o.cbYoke.y+30+t})):(r("hd",{id:"wAtYoke",from:o.armholeYokeSplitPreBoxpleat.flipX(),to:o.armholeYokeSplitPreBoxpleat,y:o.cbYoke.y+15+t}),r("hd",{id:"wFullHalf",from:o.s3ArmholeSplit.flipX(),to:o.s3ArmholeSplit,y:o.cbYoke.y+30+t})),r("vd",{id:"hAtCb",from:o.cbYoke,to:o.cbNeck,x:o.cbYoke.x-15-t}),r("vd",{id:"wToShoulder",from:o.cbYoke,to:o.s3ArmholeSplit,x:o.s3ArmholeSplit.x+15+t}),r("vd",{id:"wToHps",from:o.cbYoke,to:o.s3CollarSplit,x:o.s3ArmholeSplit.x+30+t}),p}};const Kd={name:"simon.sleeve",from:y,after:Gd,hide:n.V9.HIDE_TREE,options:{cuffOverlap:.15,cuffDrape:Pd,cuffEase:Rd,cuffLength:Fd,cuffStyle:Ed,sleeveLengthBonus:Ad,sleeveLengthShort:Od,sleeveHemShort:Dd,sleevePlacketLength:Nd,sleeveStyle:Md,libraryFitSleeve:!0},draft:function({measurements:t,sa:e,Point:o,points:a,Path:i,paths:n,complete:s,macro:r,options:l,snippets:c,Snippet:p,store:d,utils:h,part:m}){let f=0;for(const u in n)delete n[u];for(const u in c)delete c[u];if(n.sleevecap=(new i).move(a.bicepsRight)._curve(a.capQ1Cp1,a.capQ1).curve(a.capQ1Cp2,a.capQ2Cp1,a.capQ2).curve(a.capQ2Cp2,a.capQ3Cp1,a.capQ3).curve(a.capQ3Cp2,a.capQ4Cp1,a.capQ4).curve_(a.capQ4Cp2,a.bicepsLeft).hide(),a.top=new o(0,n.sleevecap.edge("top").y),"short"===l.sleeveStyle){const e=Math.max(t.shoulderToWrist*l.sleeveLengthShort,a.bicepsLeft.y-a.top.y,a.bicepsLeft.y-a.top.y+t.shoulderToWrist*l.sleeveHemShort);a.bottom=a.top.shift(-90,t.shoulderToWrist),a.shortSleeveHem=a.top.shift(-90,e),a.wristRightShort=a.bottom.shift(0,.6*t.wrist),a.wristLeftShort=a.wristRightShort.flipX();const o=Math.max(a.shortSleeveHem.y,a.bicepsLeft.y);a.wristLeft=h.beamIntersectsY(a.wristLeftShort,a.bicepsLeft,o),a.wristRight=h.beamIntersectsY(a.wristRightShort,a.bicepsRight,o),a.foldShortLeft=h.beamIntersectsY(a.wristLeftShort,a.bicepsLeft,o-t.shoulderToWrist*l.sleeveHemShort),a.foldShortRight=a.foldShortLeft.flipX(),a.foldShortLeft=a.foldShortLeft.flipY(a.wristLeft),a.foldShortRight=a.foldShortRight.flipY(a.wristRight),a.cuffMid=a.foldShortLeft.shiftFractionTowards(a.foldShortRight,.5),s&&(n.shortSleeveHemFold=(new i).move(a.wristLeft).line(a.wristRight).addClass("note help"))}else{const e=t.shoulderToWrist*(1+l.sleeveLengthBonus);a.bottom=a.top.shift(-90,e);let r=t.wrist*(1+l.cuffEase+l.cuffOverlap);"straightFrenchCuff"!==l.cuffStyle&&"roundedFrenchCuff"!==l.cuffStyle&&"angledFrenchCuff"!==l.cuffStyle||(r=t.wrist*(1+l.cuffEase+1.5*l.cuffOverlap));const c=t.shoulderToWrist*l.cuffLength;a.wristRight=a.bottom.shift(0,r/2).shift(90,c),a.wristLeft=a.wristRight.flipX(),a.cuffMid=new o(0,a.wristLeft.y),a.cuffLeftMid=a.cuffMid.shiftFractionTowards(a.wristLeft,.5),a.cuffRightMid=a.cuffMid.shiftFractionTowards(a.wristRight,.5),a.cuffLeftCusp=a.cuffLeftMid.shift(90,r/50),a.cuffRightCusp=a.cuffRightMid.shift(-90,r/50),a.cuffLeftCuspCp1=a.cuffLeftCusp.shift(180,r/10),a.cuffLeftCuspCp2=a.cuffLeftCusp.shift(0,r/10),a.cuffRightCuspCp1=a.cuffRightCusp.shift(180,r/10),a.cuffRightCuspCp2=a.cuffRightCusp.shift(0,r/10);const p=l.cuffDrape*t.shoulderToWrist,d=.15*t.shoulderToWrist;if(p>0){const t=["cuffRightCuspCp1","cuffRightCusp","cuffRightCuspCp2","wristRight","cuffRightMid"],e=["cuffLeftCuspCp1","cuffLeftCusp","cuffLeftCuspCp2","wristLeft"];f=p>20?2:1;for(const o of t)a[o]=a[o].shift(0,p/(2*f));for(const o of e)a[o]=a[o].shift(180,p/(2*f));if(a.cuffPleat1Fold=a.cuffMid.shift(0,p/(2*f)),a.cuffPleat1Edge=a.cuffMid.shift(0,p/f),a.cuffMidTop=a.cuffMid.shift(90,d),a.cuffPleat1FoldTop=a.cuffPleat1Fold.shift(90,d),a.cuffPleat1EdgeTop=a.cuffPleat1Edge.shift(90,d),2===f){const o=["cuffRightCuspCp2","wristRight"],i=t.concat(e);for(const t of i)-1===o.indexOf(t)?a[t]=a[t].shift(180,p/4):a[t]=a[t].shift(0,p/4);a.cuffPleat2Fold=a.cuffRightCusp.shift(0,p/4),a.cuffPleat2Edge=a.cuffRightCusp.shift(0,p/2),a.cuffPleat2FoldTo
1p=a.cuffPleat2Fold.shift(90,d),a.cuffPleat2EdgeTop=a.cuffPleat2Edge.shift(90,d),a.cuffPleat2Top=a.cuffRightCusp.shift(90,d)}}s&&(a.placketEnd=a.cuffLeftCusp.shift(90,l.sleevePlacketLength*t.shoulderToWrist),n.placketCut=(new i).move(a.cuffLeftCusp).line(a.placketEnd).attr("class","fabric"),f>0&&(n.pleats=(new i).move(a.cuffMid).line(a.cuffMidTop).move(a.cuffPleat1Fold).line(a.cuffPleat1FoldTop).move(a.cuffPleat1Edge).line(a.cuffPleat1EdgeTop),2===f&&n.pleats.move(a.cuffRightCusp).line(a.cuffPleat2Top).move(a.cuffPleat2Fold).line(a.cuffPleat2FoldTop).move(a.cuffPleat2Edge).line(a.cuffPleat2EdgeTop),n.pleats.attr("class","dotted")))}return n.frenchBase=(new i).move(a.wristRight).line(a.bicepsRight)._curve(a.capQ1Cp1,a.capQ1).curve(a.capQ1Cp2,a.capQ2Cp1,a.capQ2).curve(a.capQ2Cp2,a.capQ3Cp1,a.capQ3).curve(a.capQ3Cp2,a.capQ4Cp1,a.capQ4).curve_(a.capQ4Cp2,a.bicepsLeft),n.frenchBase.hide(),n.saBase=(new i).move(a.bicepsLeft).line(a.wristLeft),n.saBase.hide(),"short"===l.sleeveStyle?(n.cuffBase=(new i).move(a.wristLeft).line(a.foldShortLeft).line(a.foldShortRight),n.frenchBase=(new i).move(a.foldShortRight).join(n.frenchBase)):(n.cuffBase=(new i).move(a.wristLeft)._curve(a.cuffLeftCuspCp1,a.cuffLeftCusp),f>0&&n.cuffBase.curve_(a.cuffLeftCuspCp2,a.cuffMid).line(a.cuffPleat1Edge),n.cuffBase._curve(a.cuffRightCuspCp1,a.cuffRightCusp),2===f&&n.cuffBase.line(a.cuffPleat2Edge),n.cuffBase.curve_(a.cuffRightCuspCp2,a.wristRight),n.cuffBase.hide()),n.seam=n.frenchBase.clone().line(a.wristLeft).join(n.cuffBase).attr("class","fabric"),e&&(n.sa=n.frenchBase.offset(e*l.ffsa),n.frenchSa=n.sa.clone().attr("class","hidden"),n.sa=n.sa.join(n.saBase.offset(e)).join(n.cuffBase.offset(e)).close().attr("class","fabric sa"),r("banner",{path:n.frenchSa.reverse(),text:"simon:flatFelledSeamAllowance",repeat:30,classes:"text-sm fill-note center",dy:7})),c.backNotch=new p("bnotch",a.backNotch),c.frontNotch=new p("notch",a.frontNotch),r("title",{at:a.centerBiceps,nr:5,title:"sleeve"}),r("grainline",{from:a.cuffMid,to:new o(a.cuffMid.x,a.sleeveTip.y)}),r("hd",{id:"wCenterToBackNotch",from:a.backNotch,to:a.sleeveTip,y:a.sleeveTip.y-15-e*l.ffsa}),r("hd",{id:"wCenterToFrontNotch",from:a.sleeveTip,to:a.frontNotch,y:a.sleeveTip.y-15-e*l.ffsa}),r("hd",{id:"wFrontHalf",from:a.bicepsLeft,to:a.sleeveTip,y:a.sleeveTip.y-30-e*l.ffsa}),r("hd",{id:"wBackHalf",from:a.sleeveTip,to:a.bicepsRight,y:a.sleeveTip.y-30-e*l.ffsa}),r("hd",{id:"wFull",from:a.bicepsLeft,to:a.bicepsRight,y:a.sleeveTip.y-45-e*l.ffsa}),r("pd",{id:"lSleevecap",path:(new i).move(a.bicepsRight)._curve(a.capQ1Cp1,a.capQ1).curve(a.capQ1Cp2,a.capQ2Cp1,a.capQ2).curve(a.capQ2Cp2,a.capQ3Cp1,a.capQ3).curve(a.capQ3Cp2,a.capQ4Cp1,a.capQ4).curve_(a.capQ4Cp2,a.bicepsLeft).reverse(),d:15}),r("vd",{id:"hCuffToSleevecap",from:a.wristRight,to:a.bicepsRight,x:a.bicepsRight.x+15+e*l.ffsa}),r("vd",{id:"hSleevecapToFrontNotch",from:a.bicepsRight,to:a.frontNotch,x:a.bicepsRight.x+15+e*l.ffsa}),r("vd",{id:"hSleevecapToBackNotch",from:a.bicepsLeft,to:a.backNotch,x:a.bicepsLeft.x-15-e}),r("vd",{id:"hSleevecap",from:a.bicepsRight,to:a.sleeveTip,x:a.bicepsRight.x+30+e*l.ffsa}),r("hd",{id:"wCuff",from:a.wristLeft,to:a.wristRight,y:a.wristLeft.y+15+("short"===l.sleeveStyle?0:e)}),"short"===l.sleeveStyle?(r("hd",{id:"hFold",from:a.foldShortLeft,to:a.foldShortRight,y:a.foldShortLeft.y+15+e}),r("vd",{id:"vFold",from:a.foldShortLeft,to:a.wristLeft,x:a.foldShortLeft.x-15-e})):(s&&r("vd",{id:"hCut",from:a.cuffLeftCusp,to:a.placketEnd,x:a.placketEnd.x-15}),f>0&&r("hd",{id:"wPleat",from:a.cuffMidTop,to:a.cuffPleat1EdgeTop,y:a.cuffMidTop.y-15}),2===f&&r("hd",{id:"wPleat2",from:a.cuffPleat2Top,to:a.cuffPleat2EdgeTop,y:a.cuffPleat2Top.y-15})),m}};const Vd={name:"simon.collarStand",after:jd,options:{collarEase:Sd,collarStandBend:{deg:3,min:0,max:5,menu:"style.collar"},collarStandCurve:{deg:2,min:0,max:5,menu:"style.collar"},collarStandWidth:Ld},draft:function({measurements:t,store:e,sa:o,Point:a,points:i,Path:n,paths:s,Snippet:r,snippets:l,complete:c,macro:p,options:d,part:h}){const m=function(o=1){const s=t.neck*(1+d.collarEase)*o,r=e.get("collarStandWidth"),l=s/2,c=-1*d.collarStandBend,p=d.collarStandCurve-d.collarStandBend,h=90+(c+p)/2;return i.center=new a(0,0),i.hinge=i.center.shift(c,.7*l),i.rightCf=i.hinge.shift(p,.3*l),i.topMid=i.center.shift(90,r/2),i.bottomMid=i.topMid.flipY(),i.rightTopHinge=i.hinge.shift(h,r/2),i.rightBottomHinge=i.hinge.shift(180+h,r/2),i.rightTopCf=i.right
1Cf.shift(p+90,r/2),i.rightBottomCf=i.rightCf.shift(p-90,r/2),i.rightBottomEdge=i.rightBottomCf.shift(p,e.get("buttonholePlacketWidth")/2),i.bottomMidCp2=i.bottomMid.shift(0,.2*l),i.rightBottomHingeCp1=i.rightBottomHinge.shift(90+h,.2*l),i.rightBottomHingeCp2=i.rightBottomHinge.shift(h-90,.1*l),i.rightBottomCfCp1=i.rightBottomCf.shift(180+p,.1*l),i.rightBottomEdgeCp2=i.rightBottomCf.rotate(-90,i.rightBottomEdge),i.rightTopCfCp1=i.rightTopCf.shift(p,e.get("buttonholePlacketWidth")/2),i.topMidCp1=i.topMid.shift(0,.2*l),i.rightTopHingeCp2=i.rightTopHinge.shift(90+h,.2*l),i.rightTopHingeCp1=i.rightTopHinge.shift(h-90,.1*l),i.topEdgeCp1=i.rightTopCf.rotate(-90,i.rightBottomEdge),i.rightTopCfCp2=i.rightTopCf.shift(180+p,e.get("buttonholePlacketWidth")/2),i.leftCf=i.rightCf.flipX(),i.topMidCp2=i.topMidCp1.flipX(),i.leftTopHingeCp1=i.rightTopHingeCp2.flipX(),i.leftTopHinge=i.rightTopHinge.flipX(),i.leftTopHingeCp2=i.rightTopHingeCp1.flipX(),i.leftTopCfCp1=i.rightTopCfCp2.flipX(),i.leftTopCf=i.rightTopCf.flipX(),i.leftBottomCf=i.rightBottomCf.flipX(),i.leftBottomEdge=i.leftBottomCf.shift(c+180,e.get("buttonPlacketWidth")/2),i.leftTopCfCp2=i.leftTopCf.shift(c+180,e.get("buttonPlacketWidth")/2),i.leftBottomEdgeCp1=i.leftBottomCf.rotate(90,i.leftBottomEdge),i.leftBottomCfCp2=i.rightBottomCfCp1.flipX(),i.leftBottomHingeCp1=i.rightBottomHingeCp2.flipX(),i.leftBottomHinge=i.rightBottomHinge.flipX(),i.leftBottomHingeCp2=i.rightBottomHingeCp1.flipX(),i.bottomMidCp1=i.bottomMidCp2.flipX(),2*(new n).move(i.leftBottomCf).curve(i.leftBottomCfCp2,i.leftBottomHingeCp1,i.leftBottomHinge).curve(i.leftBottomHingeCp2,i.bottomMidCp1,i.bottomMid).length()-t.neck*(1+d.collarEase)};let f,u,g;u=1,g=1;do{f=m(u),u*=1-f/1e3,g++}while(Math.abs(f)>1&&g<20);s.seam=(new n).move(i.bottomMid).curve(i.bottomMidCp2,i.rightBottomHingeCp1,i.rightBottomHinge).curve(i.rightBottomHingeCp2,i.rightBottomCfCp1,i.rightBottomCf).line(i.rightBottomEdge).curve(i.rightBottomEdgeCp2,i.rightTopCfCp1,i.rightTopCf).curve(i.rightTopCfCp2,i.rightTopHingeCp1,i.rightTopHinge).curve(i.rightTopHingeCp2,i.topMidCp1,i.topMid).curve(i.topMidCp2,i.leftTopHingeCp1,i.leftTopHinge).curve(i.leftTopHingeCp2,i.leftTopCfCp1,i.leftTopCf).curve(i.leftTopCfCp2,i.leftBottomEdgeCp1,i.leftBottomEdge).line(i.leftBottomCf).curve(i.leftBottomCfCp2,i.leftBottomHingeCp1,i.leftBottomHinge).curve(i.leftBottomHingeCp2,i.bottomMidCp1,i.bottomMid).close().attr("class","fabric"),o&&(s.sa=s.seam.offset(o).attr("class","fabric sa")),c&&(s.help=(new n).move(i.rightTopCf).line(i.rightBottomCf).move(i.topMid).line(i.bottomMid).move(i.leftTopCf).line(i.leftBottomCf).attr("class","dotted")),e.cutlist.setCut([{cut:2,from:"fabric"},{cut:2,from:"interfacing"}]),p("grainline",{from:i.leftCf,to:i.rightCf}),i.title=i.center.shift(0,20),p("title",{at:i.title,nr:6,title:"collarStand",scale:.6}),p("sprinkle",{snippet:"notch",on:["rightTopCf","rightBottomCf","leftBottomCf","leftTopCf","rightBottomEdge","leftBottomEdge"]}),l.button=new r("button",i.leftCf);const b=d.collarStandCurve-d.collarStandBend-180;return i.buttonhole=i.rightCf.shift(b,3),l.buttonhole=new r("buttonhole",i.buttonhole).attr("data-rotate",90-b),p("hd",{id:"wCbToNotchRight",from:i.topMid,to:i.rightTopCf,y:i.topMid.y-15-o}),p("hd",{id:"wCbToNotchLeft",from:i.leftTopCf,to:i.topMid,y:i.topMid.y-15-o}),p("hd",{id:"wCbToEdgeRight",from:i.topMid,to:i.rightBottomEdge,y:i.topMid.y-30-o}),p("hd",{id:"wCbToEdgeLeft",from:i.leftBottomEdge,to:i.topMid,y:i.topMid.y-30-o}),p("pd",{id:"lBottomFit",path:(new n).move(i.leftBottomCf).curve(i.leftBottomCfCp2,i.leftBottomHingeCp1,i.leftBottomHinge).curve(i.leftBottomHingeCp2,i.bottomMidCp1,i.bottomMid).curve(i.bottomMidCp2,i.rightBottomHingeCp1,i.rightBottomHinge).curve(i.rightBottomHingeCp2,i.rightBottomCfCp1,i.rightBottomCf),d:15+o}),p("ld",{id:"lLeftNotchToEdge",from:i.leftBottomEdge,to:i.leftBottomCf,d:-30-o}),p("ld",{id:"lRightNotchToEdge",from:i.rightBottomCf,to:i.rightBottomEdge,d:-30-o}),p("ld",{id:"hStand",from:i.rightBottomCf,to:i.rightTopCf,d:-15-o-e.get("buttonholePlacketWidth")/2}),p("vd",{id:"hFull",from:i.rightBottomCf,to:i.topMid,x:i.rightBottomEdge.x+30+o}),h}};const Xd={name:"simon.collar",after:jd,options:{collarEase:Sd,collarAngle:{deg:85,min:60,max:130,menu:"style.collar"},collarBend:{pct:3.5,min:0,max:10,menu:"style.collar"},collarFlare:{deg:3.5,min:0,max:10,menu:"style.collar"},collarGap:{pct:2.5,min:0,max:6,menu:"style.collar"},collarRoll:{pct:3,min:0,max:6,menu:"style.collar"},collarWidth:{pct:120,min:90,max:200,menu:"style.collar"}},draft:function({store:t,measurements:e,utils:o,sa:a,Point:i,points:n,Path:s,paths:r,complete:l,macro:c,options:p,part:d}
1){const h=function(a=1){const r=e.neck*(1+p.collarEase-p.collarGap)*a,l=t.get("collarStandWidth")*p.collarWidth*(1+p.collarRoll);return n.topMid=new i(0,0),n.bottomMid=new i(0,l),n.bottomMidCp1=n.bottomMid.shift(0,.35*r),n.rightBottomEdge=new i(r/2,l+r*p.collarBend),n.rightTopHinge=n.topMid.shift(0,.25*r),n.rightTopEdgeDirection=n.rightTopHinge.shift(p.collarFlare,10),n.rightBottomEdgeDirection=n.rightBottomEdge.shift(p.collarAngle,10),n.rightTopEdge=o.beamsIntersect(n.rightTopHinge,n.rightTopEdgeDirection,n.rightBottomEdge,n.rightBottomEdgeDirection),n.rightTopHingeCp1=n.rightTopHinge.shift(0,.1*r),n.leftTopHinge=n.rightTopHinge.flipX(),n.bottomMidCp2=n.bottomMidCp1.flipX(),n.leftTopHingeCp2=n.rightTopHingeCp1.flipX(),n.leftTopEdge=n.rightTopEdge.flipX(),n.leftBottomEdge=n.rightBottomEdge.flipX(),2*(new s).move(n.leftBottomEdge)._curve(n.bottomMidCp2,n.bottomMid).length()-e.neck*(1+p.collarEase-p.collarGap)};let m,f,u;f=1,u=1;do{m=h(f),f*=1-m/1e3,u++}while(Math.abs(m)>1&&u<20);r.seam=(new s).move(n.bottomMid).curve_(n.bottomMidCp1,n.rightBottomEdge).line(n.rightTopEdge)._curve(n.rightTopHingeCp1,n.rightTopHinge).line(n.topMid).line(n.leftTopHinge).curve_(n.leftTopHingeCp2,n.leftTopEdge).line(n.leftBottomEdge)._curve(n.bottomMidCp2,n.bottomMid).close().attr("class","fabric");const g=n.topMid.dist(n.bottomMid)*p.collarRoll;n.ucTopMid=n.topMid.shift(-90,g),n.ucRightTopHinge=n.rightTopHinge.shift(-90,g),n.ucRightTopHingeCp1=n.rightTopHingeCp1.shift(-90,g),n.ucLeftTopHinge=n.ucRightTopHinge.flipX(),n.ucLeftTopHingeCp2=n.ucRightTopHingeCp1.flipX(),r.underCollar=(new s).move(n.rightTopEdge)._curve(n.ucRightTopHingeCp1,n.ucRightTopHinge).line(n.ucLeftTopHinge).curve_(n.ucLeftTopHingeCp2,n.leftTopEdge).attr("class","fabric dashed"),l&&(r.help=(new s).move(n.topMid).line(n.bottomMid).attr("class","dotted")),a&&(r.sa=r.seam.offset(a).attr("class","fabric sa"),r.saUndercollar=r.underCollar.offset(a).attr("class","dotted")),t.cutlist.setCut([{cut:1,from:"fabric"},{cut:1,from:"fabric"},{cut:1,from:"interfacing"},{cut:1,from:"interfacing"}]);const b=(n.bottomMid.y-n.ucTopMid.y)/2;return c("grainline",{from:new i(n.bottomMidCp2.x,b),to:new i(n.bottomMidCp1.x,b)}),n.title=new i(20,n.bottomMid.y/2),c("title",{at:n.title,nr:"7 + 8",title:"collarAndUndercollar",scale:.6,append:!0}),c("banner",{path:(new s).move(n.leftBottomEdge)._curve(n.bottomMidCp2,n.bottomMid).curve_(n.bottomMidCp1,n.rightBottomEdge),text:"simon:sideOfTheCollarStand",classes:"text-sm fill-note center"}),c("banner",{path:r.underCollar.reverse(),text:"simon:cutUndercollarSmaller",classes:"text-sm fill-note center",dy:8}),c("sprinkle",{snippet:"notch",on:["bottomMid","rightBottomEdge","leftBottomEdge","rightTopEdge","leftTopEdge","leftTopHinge","rightTopHinge"]}),c("vd",{id:"hAtCb",from:n.bottomMid,to:n.topMid,x:n.rightTopEdge.x+15+a}),c("vd",{id:"hCbBottomToTop",from:n.bottomMid,to:n.rightTopEdge,x:n.rightTopEdge.x+30+a}),c("vd",{id:"hBottomToCbTop",from:n.rightBottomEdge,to:n.topMid,x:n.rightTopEdge.x+45+a}),c("vd",{id:"hFull",from:n.rightBottomEdge,to:n.rightTopEdge,x:n.rightTopEdge.x+60+a}),c("hd",{id:"wBetweenHinges",from:n.leftTopHinge,to:n.rightTopHinge,y:n.leftTopEdge.y-15-a}),c("hd",{id:"wFullTop",from:n.leftTopEdge,to:n.rightTopEdge,y:n.leftTopEdge.y-30-a}),c("hd",{id:"wFullBottom",from:n.leftBottomEdge,to:n.rightBottomEdge,y:n.leftBottomEdge.y+15+a}),d}};const Qd={name:"simon.sleevePlacketUnderlap",after:jd,options:{sleevePlacketLength:Nd},draft:function({measurements:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,complete:l,macro:c,options:p,store:d,part:h}){if("short"===p.sleeveStyle)return h.hide();const m=Math.min(d.get("sleevePlacketWidth")/2,10),f=t.shoulderToWrist*p.sleevePlacketLength;return a.midLeft=new o(0,0),a.midRight=a.midLeft.shift(0,f),a.fold1Left=a.midLeft.shift(90,m),a.fold2Left=a.midLeft.shift(-90,m),a.fold1Right=a.fold1Left.shift(0,f),a.fold2Right=a.fold2Left.shift(0,f),a.topLeft=a.midLeft.shift(90,2*m-1.5),a.topRight=a.midRight.shift(90,2*m-1.5),a.bottomLeft=a.midLeft.shift(-90,2*m-1.5),a.bottomRight=a.midRight.shift(-90,2*m-1.5),n.seam=(new i).move(a.topLeft).line(a.topRight).line(a.bottomRight).line(a.bottomLeft).close().attr("class","fabric"),l&&(n.folds=(new i).move(a.fold1Left).line(a.fold1Right).move(a.fold2Left).line(a.fold2Right).move(a.midLeft).line(a.midRight).attr("class","help")),e&&(n.sa=(new i).move(a.bottomLeft).line(a.bottomLeft.shift(180,e)).line(a.topLeft.shift(180,e)).line(a.topLeft).addClass("fabric sa")),d.cutlist.setCut({cut:2,from:"fabric"}),a.title=new o(f/8,0),c("title",{at:a.title,nr:9,title:"sleevePlacketUnderlap",scale:.5,append:!0}),a.button=new o(f/2,m/2),r.button=new s("button",a.button),c("vd",{id:"wBetweenFolds",from:a.fold2Right,to:a.fold1Right,x:a.topRight.x+15}),c("vd",{id:"hFull",from:a.bottomRight,to:a.topRight,x:a.topRight.x+30}),l&&c("hd",{id:"wToButton",from:a.bottomLeft,to:a.button,y:a.bottomRight.y+15}),c("hd",{id:"wFull",from:a.bottomLeft,to:a.bottomRight,y:a.bottomRight.y+30}),h}};const qd={name:"simon.sleevePlacketOverlap",after:jd,options:{sleevePlacketLength:Nd},draft:function({measurements:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,complete:l,macro:c,options:p,store:d,part:h}){if("short"===p.sleeveStyle)return h.hide();const m=d.get("sleevePlacketWidth"),f=t.shoulderToWrist*p.sleevePlacketLength;return a.midLeft=new o(0,0),a.midLen=a.midLeft.shift(0,f),a.midRight=a.midLeft.shift(0,f+1.25*m),a.fold1Left=a.midLeft.shift(90,m/2),a.fold2Left=a.midLeft.shift(-90,m/2),a.boxTopRight=a.midRight.shift(90,m/2),a.boxBottomRight=a.midRight.shift(-90,m/2),a.boxTopLeft=a.fold1Left.shift(0,f-.25*m),a.boxBottomLeft=a.fold2Left.shift(0,f-.25*m),a.boxTip=a.midLen.shift(0,1.5*m),a.fold1Right=a.boxTopRight.shift(0,.5*m),a.fold2Right=a.boxBottomRight.shift(0,.5*m),a.topLeft=a.fold1Left.shift(90,m/2-1.5),a.topRight=a.fold1Right.shift(90,m/2-1.5),a.bottomRight=a.fold2Right.shift(-90,1.5*m-1.5),a.bottomLeft=a.fold2Left.shift(-90,1.5*m-1.5),a.fold3Left=new o(0,1.5*m),a.fold3Right=new o(f,1.5*m),a.cutBottom=new o(f,a.bottomLeft.y),a.cutLeft=a.fold3Right.shift(90,.1*m+1.5),a.cutRight=a.fold2Right.shift(-90,m/2-1.5),a.zig=a.cutRight.shift(180,.6*m),a.zag=new o(a.bottomRight.x-m,a.cutLeft.y),n.seam=(new i).move(a.topLeft).line(a.topRight).line(a.cutRight).line(a.zig).line(a.zag).line(a.cut
1Left).line(a.cutBottom).line(a.bottomLeft).close().attr("class","fabric"),l&&(n.outline=(new i).move(a.fold1Left).line(a.boxTopRight).line(a.boxTip).line(a.boxBottomRight).line(a.fold2Left).move(a.boxTopLeft).line(a.boxBottomLeft).attr("class","dashed"),n.folds=(new i).move(a.fold3Left).line(a.fold3Right).move(a.boxBottomRight).line(a.fold2Right).line(a.boxTip).line(a.fold1Right).line(a.boxTopRight).attr("class","dotted")),e&&(n.sa=(new i).move(a.bottomLeft).line(a.bottomLeft.shift(180,e)).line(a.topLeft.shift(180,e)).line(a.topLeft).attr("class","fabric sa")),d.cutlist.setCut({cut:2,from:"fabric"}),a.title=new o(f/4,0),c("title",{at:a.title,nr:10,title:"sleevePlacketOverlap",scale:.6}),a.buttonhole=new o(f/2,0),r.buttonhole=new s("buttonhole",a.buttonhole).attr("data-rotate",90),c("hd",{id:"wToZig1",from:a.bottomLeft,to:a.cutBottom,y:a.bottomLeft.y+15}),c("hd",{id:"wToZig2",from:a.bottomLeft,to:a.zag,y:a.bottomLeft.y+30}),c("hd",{id:"wToZag2",from:a.bottomLeft,to:a.zig,y:a.bottomLeft.y+45}),c("hd",{id:"wFull",from:a.bottomLeft,to:a.cutRight,y:a.bottomLeft.y+60}),c("vd",{id:"hTopFold",from:a.fold1Right,to:a.topRight,x:a.topRight.x+15}),c("vd",{from:a.boxTip,id:"hTopToMiddle",to:a.topRight,x:a.topRight.x+30}),c("vd",{id:"hTopToEdge",from:a.fold2Right,to:a.topRight,x:a.topRight.x+45}),c("vd",{id:"hTopToZag2",from:a.cutRight,to:a.topRight,x:a.topRight.x+60}),c("vd",{id:"hToZig2",from:a.zag,to:a.topRight,x:a.topRight.x+75}),c("vd",{id:"hFull",from:a.cutBottom,to:a.topRight,x:a.topRight.x+90}),c("hd",{id:"wToBox",from:a.topLeft,to:a.boxTopLeft,y:a.topLeft.y-15}),c("hd",{id:"wToTipStart",from:a.topLeft,to:a.boxTopRight,y:a.topLeft.y-30}),h}},Zd={name:"simon.cuff",options:{cuffOverlap:.15,barrelCuffNarrowButton:{bool:!0,menu:(t,e)=>"short"!==e?.sleeveStyle&&"style.cuffs"},cuffButtonRows:{count:1,min:1,max:2,menu:(t,e)=>"short"!==e?.sleeveStyle&&"style.cuffs"},cuffDrape:Pd,cuffEase:Rd,cuffLength:Fd,cuffStyle:Ed,sleeveStyle:Md},draft:t=>{if("short"===t.options.sleeveStyle)return t.part.hide();switch(t.options.cuffStyle){case"roundedBarrelCuff":return(({store:t,sa:e,utils:o,points:a,Path:i,paths:n,macro:s,part:r})=>{md(r);const l=t.get("cuffHeight"),c={topLeftRound:s("round",{id:"topLeftRound",from:a.topRight,to:a.bottomLeft,via:a.topLeft,radius:l/3}),topRightRound:s("round",{id:"topRightRound",from:a.bottomRight,to:a.topLeft,via:a.topRight,radius:l/3})};for(const p in c)for(const t of["start","cp1","cp2","end"])a[`${p}${o.capitalize(t)}`]=a[c[p].points[t]].copy();return a.leftAngleBottom=a.topLeft.shift(-90,l/3),a.rightAngleTop=a.topRight.shift(180,l/3),a.rightAngleBottom=a.topRight.shift(-90,l/3),n.seam=(new i).move(a.topLeftRoundEnd).line(a.bottomLeft).line(a.bottomRight).line(a.topRightRoundStart).curve(a.topRightRoundCp1,a.topRightRoundCp2,a.topRightRoundEnd).line(a.topLeftRoundStart).curve(a.topLeftRoundCp1,a.topLeftRoundCp2,a.topLeftRoundEnd).close().attr("class","fabric"),e&&(n.sa=n.seam.offset(e).attr("class","fabric sa")),t.cutlist.setCut({cut:4,from:"fabric"}),fd(r),bd(r),s("vd",{id:"hRound",from:a.topRightRoundStart,to:a.topRightRoundEnd,x:a.topRightRoundStart.x+15+e}),r})(t);case"straightBarrelCuff":return(({sa:t,points:e,Path:o,paths:a,part:i})=>(md(i),a.seam=(new o).move(e.topLeft).line(e.bottomLeft).line(e.bottomRight).line(e.topRight).line(e.topLeft).close().attr("class","fabric"),t&&(a.sa=a.seam.offset(t).attr("class","fabric sa")),fd(i),bd(i),i))(t);case"roundedFrenchCuff":return(({store:t,sa:e,points:o,Path:a,paths:i,complete:n,utils:s,macro:r,part:l})=>{ud(l);const c=t.get("cuffHeight"),p={topLeft:r("round",{id:"topLeft",from:o.topRight,to:o.bottomLeft,via:o.topLeft,radius:c/3}),bottomLeft:r("round",{id:"bottomLeft",from:o.topLeft,to:o.bottomRight,via:o.bottomLeft,radius:c/3}),bottomRight:r("round",{id:"bottomRight",from:o.bottomLeft,to:o.topRight,via:o.bottomRight,radius:c/3}),topRight:r("round",{id:"topRight",from:o.bottomRight,to:o.topLeft,via:o.topRight,radius:c/3})};for(const d in p)for(const t of["start","cp1","cp2","end"])o[`${d}${s.capitalize(t)}`]=o[p[d].points[t]].copy();return i.seam=(new a).move(o.topLeftEnd).line(o.bottomLeftStart).curve(o.bottomLeftCp1,o.bottomLeftCp2,o.bottomLeftEnd).line(o.bottomRightStart).curve(o.bottomRightCp1,o.bottomRightCp2,o.bottomRightEnd).line(o.topRightStart).curve(o.topRightCp1,o.topRightCp2,o.topRightEnd).line(o.topLeftStart).curve(o.topLeftCp1,o.topLeftCp2,o.topLeftEnd).close().attr("class","fabric"),n&&(i.fold=(new a).move(o.midLeft).line(o.midRight).attr("class","dotted")),e&&(i.sa=i.seam.offset(e).attr("class","fabric sa")),gd(l),wd(l),l})(t);case"angledFrenchCuff":return(({store:t,sa:e,points:o,Path:a,paths:i,part:n})=>{ud(n);const s=t.get("cuffHeight");return o.leftAngleTopTop=o.topLeft.shift(0,s/3),o.leftAngleTopBottom=o.topLeft.shift(-90,s/3),o.rightAngleTopTop=o.topRight.shift(180,s/3),o.rightAngleTopBottom=o.topRight.shift(-90,s/3),o.leftAngleBottomTop=o.bottomLeft.shift(90,s/3),o.leftAngleBottomBottom=o.bottomLeft.shift(0,s/3),o.rightAngleBottomTop=o.bottomRight.shift(90,s/3),o.rightAngleBottomBottom=o.bottomRight.shift(180,s/3),i.seam=(new a).move(o.leftAngleTopBottom).line(o.leftAngleBottomTop).line(o.leftAngleBottomBottom).line(o.rightAngleBottomBottom).line(o.rightAngleBottomTop).line(o.rightAngleTopBottom).line(o.rightAngleTopTop).line(o.leftAngleTopTop).line(o.leftAngleTopBottom).close().attr("class","fabric"),i.fold=(new a).move(o.midLeft).line(o.midRight).attr("class","dotted"),e&&(i.sa=i.seam.offset(e).attr("class","fabric sa")),gd(n),wd(n),n})(t);case"straightFrenchCuff":return(({sa:t,points:e,Path:o,paths:a,complete:i,part:n})=>(ud(n),a.seam=(new o).move(e.topLeft).line(e.bottomLeft).line(e.bottomRight).line(e.topRight).line(e.topLeft).close().attr("class","fabric"),i&&(a.fold=(new o).move(e.midLeft).line(e.midRight).attr("class","dotted")),t&&(a.sa=a.seam.offset(t).attr("class","fabric sa")),gd(n),wd(n),n)
1)(t);default:return(({store:t,sa:e,points:o,Path:a,paths:i,macro:n,part:s})=>{md(s);const r=t.get("cuffHeight");return o.leftAngleTop=o.topLeft.shift(0,r/3),o.leftAngleBottom=o.topLeft.shift(-90,r/3),o.rightAngleTop=o.topRight.shift(180,r/3),o.rightAngleBottom=o.topRight.shift(-90,r/3),i.seam=(new a).move(o.leftAngleBottom).line(o.bottomLeft).line(o.bottomRight).line(o.rightAngleBottom).line(o.rightAngleTop).line(o.leftAngleTop).line(o.leftAngleBottom).close().attr("class","fabric"),e&&(i.sa=i.seam.offset(e).attr("class","fabric sa")),fd(s),bd(s),n("vd",{id:"hFull",from:o.rightAngleBottom,to:o.rightAngleTop,x:o.rightAngleBottom.x+15+e}),s})(t)}}},th=new n.pT({data:ld,parts:[jd,zd,$d,Xd,Vd,Zd,Gd,Ud,Yd,Kd,qd,Qd,Jd]}),eh=(0,n.D4)([_,cd]),oh=JSON.parse('{"id":"simone","name":"Simone button-down shirt","code":"Joost De Cock","description":"A FreeSewing pattern for a button down shirt (Simone = Simon for people with breasts)","design":"Joost De Cock","difficulty":4,"tags":["tops"],"techniques":["hem","button","interfacing","curved-seam","flat-felled-seam","flat-sleeve"],"version":"4.6.0","pkg":"@freesewing/simone","collection":true}'),ah={en:JSON.parse('{"t":"Simone shirt","d":"Simone is simon, adapted for breasts.","p":{"back":"Back","buttonholePlacket":"Buttonhole placket","buttonPlacket":"Button placket","collar":"Collar","collarStand":"Collar stand","cuff":"Cuff","fbaFront":"FBA Front","front":"Front","frontLeft":"Front left","frontRight":"Front right","sleevePlacketOverlap":"Sleeve placket overlap","sleevePlacketUnderlap":"Sleeve placket underlap","sleeve":"Sleeve","yoke":"Yoke"},"s":{},"o":{"bustAlignedButtons":{"t":"Bust-aligned buttons","d":"Optional button spacing strategies to ensure a button at the bustline"},"bustAlignedButtons.even":{"t":"Even spacing","d":"Button spacing is calculated for buttons above the bustline, and this spacing is used for all buttons."},"bustAlignedButtons.split":{"t":"Split spacing","d":"Different button spacings are calculated and used for buttons above and below the bustline."},"bustAlignedButtons.disabled":{"t":"Disabled","d":"The same spacing is used for buttons above and below the bustline."},"bustDartAngle":{"t":"Bust dart angle","d":"Controls the angle by which the (side) bust dart slopes downward"},"bustDartLength":{"t":"Bust dart length","d":"Controls how close the bust dart approaches the bust point"},"contour":{"t":"Contour","d":"Controls how sharply the extra room for breasts is removed again below the chest"},"frontDarts":{"t":"Front darts","d":"Whether to include front darts or not"},"frontDartsNo":{"t":"No front darts","d":"Do not include front darts"},"frontDartsYes":{"t":"With front darts","d":"Do include front darts"},"frontDartLength":{"t":"Front dart length","d":"Controls how close the front dart approaches the bust point"}}}')};const ih={name:"simone.fbaFront",from:Gd,measurements:["highBust","bustSpan","hpsToBust"],hide:{self:!0,from:!0,inherited:!1},plugins:[A],options:{draftForHighBust:!0,minimalDartShaping:5,bustDartAngle:{deg:10,min:0,max:20,menu:"advanced"},bustDartLength:{pct:80,min:50,max:90,menu:"advanced"},frontDarts:{bool:!1,menu:"advanced"},frontDartLength:{pct:45,min:30,max:60,menu:"advanced"},contour:{pct:50,min:30,max:75,menu:"style"},bustAlignedButtons:{dflt:"disabled",list:["even","split","disabled"],menu:"style.closure"},lengthBonus:{pct:25,min:-4,max:60,menu:"fit"},buttonFreeLength:{pct:2,min:-10,max:15,menu:(t,e)=>"even"!==e.bustAlignedButtons&&"style.closure"}},draft:function({measurements:t,Point:e,points:o,Path:a,paths:i,macro:n,options:s,Snippet:r,snippets:l,utils:c,sa:p,log:d,part:h}){o.bust=new e(t.bustSpan/2,o.neck.y+t.hpsToBust),o.cfBust=new e(0,o.bust.y);const m=(1+s.chestEase)*(t.bust-t.highBust)/2;if(m<0)return d.info("No FBA required, using unaltered Simon front"),h;let f=o.armholePitch.dist(o.bust),u=o.bust.dx(o.armholePitch)/f*-1,g=(o.bust.dx(o.armholePitch)-m)/f*-1;const b=c.rad2deg(Math.acos(u))-c.rad2deg(Math.acos(g));o.realBustPoint=o.bust.clone(),o.bust=o.bust.rotate(-1*b,o.armholePitch),o._dartDirection=o.bust.shift(-1*s.bustDartAngle,t.bust/3);const w=()=>c.lineIntersectsCurve(o.bust,o._dartDirection,o.waist,o.waistCp2,o.armhole,o.armhole);let k=w();k||(o._dartDirection=(new a).move(o.waist).curve_(o.waistCp2,o.armhole).shiftFractionAlong(.5),k=w()),o.bustSideCut1=k,o.bustWaist=new e(o.bust.x,o.waist.y),o.bustHem=new e(o.bust.x,o.hem.y);const C=["bust","bustSideCut1","bustWaist","bustHem","hem","hips","hipsCp2","waistCp1","waist","waistCp2","armhole","armholeCp2","armholeHollowCp1","armholeHollow","armholeHollowCp2","armholePitchCp1"];for(let B of C)o[`${B}_rot1`]=o[B].rotate(b,o.armholePitch);const v=(new a).move(o.waist_rot1).curve_(o.waistCp2_rot1,o.armhole_rot1).split(o.bustSideCut1_rot1);i.fbaAboveDart=v.pop(),i.fbaBelowDart=v.pop(),i.fbaAboveDart.hide(),i.fbaBelowDart.hide(),o.belowDartCpTop_rot1=i.fbaBelowDart.ops[1].cp2,o.belowDartCpBottom_rot1=i.fbaBelowDart.ops[1].cp1,o.aboveDartCpBottom_rot1=i.fbaAboveDart.ops[1].cp1;const y=["bust","bustSideCut1","bustWaist","bustHem","hem","hips","hipsCp2","waistCp1","waist","waistCp2","armhole","armholeCp2","armholeHollowCp1","armholeHollow","armholeHollowCp2","armholePitchCp1","belowDartCpTop","belowDartCpBottom"];for(let B of y)o[`${B}_rot2`]=o[`${B}_rot1`].rotate(-1*b,o.bust_rot1);if(o.bustDartCenter=o.bustSideCut1_rot2.shiftFractionTowards(o.bustSideCut1_rot1,.5),o.bustDartTip=o.bustDartCenter.shiftFractionTowards(o.bust_rot2,s.bustDartLength),s.frontDarts){let t=
1o.waist.dx(o.waist_rot2);o.frontDartTip=o.bustWaist_rot2.shiftFractionTowards(o.bust_rot2,s.frontDartLength),o.frontDartRight=new e(o.frontDartTip.x+t/2,o.hem_rot2.y-o.frontDartTip.dy(o.hem_rot2)*s.contour),o.frontDartLeft=o.frontDartRight.flipX(o.frontDartTip),o.frontDartLeftCp=o.frontDartLeft.shift(90,o.frontDartTip.dy(o.frontDartLeft)/2),o.frontDartRightCp=o.frontDartLeftCp.flipX(o.frontDartTip),o.frontDartHemLeft=new e(o.frontDartLeft.x,o.hem_rot2.y),o.frontDartHemRight=new e(o.frontDartRight.x,o.hem_rot2.y),i.frontDart=(new a).move(o.frontDartHemRight).line(o.frontDartRight).curve_(o.frontDartRightCp,o.frontDartTip)._curve(o.frontDartLeftCp,o.frontDartLeft).line(o.frontDartHemLeft).attr("class","fabric dotted")}else{let t=o.waist.dx(o.waist_rot2)*s.contour,e=o.hips.dx(o.hips_rot2);for(let a of["waist_rot2","waistCp1_rot2","belowDartCpBottom_rot2"])o[a]=o[a].shift(180,t);for(let a of["hipsCp2_rot2","hips_rot2","hem_rot2"])o[a]=o[a].shift(180,e)}let T=["armhole","armholeCp2","armholeHollowCp1","armholeHollow","armholeHollowCp2","armholePitchCp1"];for(let B of T)o[B]=o[`${B}_rot1`].clone();let x=["hem","hips","hipsCp2","waistCp1","waist","bust"];for(let B of x)o[B]=o[`${B}_rot2`].clone();switch(o.cfHem=new e(o.cfHem.x,o.bustHem_rot2.y),o.waistCp2=o.belowDartCpBottom_rot2.clone(),o.dartBottomCp=o.belowDartCpTop_rot2.clone(),o.dartBottom=o.bustSideCut1_rot2.clone(),o.dartTop=o.bustSideCut1_rot1.clone(),o.dartTopCp=o.aboveDartCpBottom_rot1.clone(),o.cfArmhole=new e(0,o.armhole.y),o.cfWaist=new e(0,o.waist.y),o.cfHips=new e(0,o.hips.y),o.cfBust=new e(0,o.bust.y),o.armholePitch=o.armholePitchCp1_rot1.shiftTowards(o.armholePitchCp2,o.armholePitch.dist(o.armholePitchCp1_rot1)),i.frontArmhole.ops[0].to.x=o.armholePitch.x,i.frontArmhole.ops[0].to.y=o.armholePitch.y,i.dart=(new a).move(o.dartBottom).line(o.bustDartTip).line(o.dartTop),i.saBaseFromHips=(new a).move(o.hips).curve(o.hipsCp2,o.waistCp1,o.waist).curve(o.belowDartCpBottom_rot2,o.dartBottomCp,o.dartBottom).move(o.dartTop).curve_(o.dartTopCp,o.armhole),i.saBaseFromArmhole=(new a).move(o.armhole).curve(o.armholeCp2,o.armholeHollowCp1,o.armholeHollow).curve(o.armholeHollowCp2,o.armholePitchCp1,o.armholePitch).join(i.frontArmhole).line(o.s3CollarSplit).join(i.frontCollar),s.hemStyle){case"baseball":o.bballStart=o.cfHem.shiftFractionTowards(o.hem,.5),s.frontDarts&&o.bballStart.x>o.frontDartRight.x&&(o.bballStart.x=o.frontDartRight.x),o.bballEnd=o.hem.shiftFractionTowards(o.hips,s.hemCurve),o.bballCp1=o.bballStart.shiftFractionTowards(o.hem,.5),o.bballCp2=new e(o.bballCp1.x,o.bballEnd.y),i.saBase=(new a).move(o.bballEnd).line(o.hips).join(i.saBaseFromHips),i.hemBase=(new a).move(o.cfHem).line(o.bballStart).curve(o.bballCp1,o.bballCp2,o.bballEnd);break;
1case"slashed":n("round",{from:o.hips,to:o.cfHem,via:o.hem,radius:o.hips.dist(o.hem)*s.hemCurve,prefix:"slash"}),i.saBase=(new a).move(o.hips).join(i.saBaseFromHips),i.hemBase=(new a).move(o.cfHem).line(o.slashEnd).curve(o.slashCp2,o.slashCp1,o.slashStart);break;default:i.saBase=(new a).move(o.hem).line(o.hips).join(i.saBaseFromHips),i.hemBase=(new a).move(o.cfHem).line(o.hem)}i.seam=i.hemBase.join(i.saBase).join(i.saBaseFromArmhole).attr("class","fabric"),i.saBaseFromHips.hide(),i.saBaseFromArmhole.hide(),i.saBase.hide(),p&&(i.ffsa=i.saBase.offset(p*s.ffsa).attr("class","fabric sa"),i.saFromArmhole=i.saBaseFromArmhole.offset(p).attr("class","fabric sa"),i.hemSa=i.hemBase.offset(3*p).attr("class","fabric sa"),i.saConnect=(new a).move(i.hemSa.end()).line(i.ffsa.start()).move(i.ffsa.end()).line(i.saFromArmhole.start()).attr("class","fabric sa"),delete i.sa);for(let B in l)delete l[B];return n("sprinkle",{snippet:"notch",on:["armhole","armholePitch","cfArmhole","cfWaist","cfHem","hips","waist","bust","cfBust"]}),o.logo=new e(o.armhole.x/2,o.armhole.y),l.logo=new r("logo",o.logo),h}},nh={...zd,from:ih},sh={...$d,from:ih},rh={...Ud,from:ih},lh={...Yd,from:ih},ch=new n.pT({data:oh,parts:[ih,jd,Xd,Vd,Zd,Kd,qd,Qd,Jd,nh,sh,rh,lh]}),ph=(0,n.D4)([eh,ah]),dh=JSON.parse('{"id":"skully","name":"Skully the FreeSewing mascot","code":"Wouter Van Wageningen","description":"A FreeSewing pattern for skully, our logo, a plushy toy","design":"Wouter Van Wageningen","difficulty":4,"tags":["accessories","toys"],"techniques":["curved-seam","precision"],"version":"4.6.0","pkg":"@freesewing/skully","collection":true}'),hh={name:"skully.cheek",options:{size:{pct:75,min:10,max:300,toAbs:(t,{measurements:e},o)=>t*((e?.head?e.head:596)/929.5)*2*175,menu:"fit"}},optionalMeasurements:["head"],draft:({options:t,Point:e,Path:o,points:a,paths:i,Snippet:n,snippets:s,measurements:r,sa:l,complete:c,store:p,macro:d,part:h})=>{const m="text-xs center",f=("head"in r?r.head:596)/929.5*t.size*2;p.set("sizeFactor",f),a.point0=new e(0,0),a.point1=a.point0.shift(254.78244159705943,22.5254232590644*f),a.point1Cp1=a.point1.shift(321.2022157426192,7.140882368447221*f),a.point2=a.point0.shift(260.1018837009255,44.64105174612264*f),a.point2Cp1=a.point2.shift(243.25309471936828,16.615062563830442*f),a.point2Cp2=a.point2.shift(322.6411575424251,21.283352555459906*f),a.point3=a.point0.shift(261.38174456728586,76.35866165668438*f),a.point3Cp1=a.point3.shift(333.3176703576494,12.168666812761435*f),a.point3Cp2=a.point3.shift(85.91520774712568,11.731692674119953*f),a.point4=a.point0.shift(299.45265842618784,86.78060596475459*f),a.point4Cp1=a.point4.shift(84.35380802294482,49.11521286943584*f),a.point4Cp2=a.point4.shift(184.39630340760462,19.40463369919666*f),a.point5=a.point0.shift(342.8506386745285,121.04758752176764*f),a.point5Cp1=a.point5.shift(137.52316754335672,29.889370057597382*f),a.point5Cp2=a.point5.shift(196.75764739545923,56.96390931984925*f),a.point6=a.point0.shift(1.1205493505415198,54.26948752485138*f),a.point6Cp2=a.point6.shift(316.18924774003017,44.726876316259826*f),a.point7=a.point0.shift(357.37806779049225,43.287782602138435*f),a.point7Cp1=a.point7.shift(299.1399624138707,19.59910745416729*f),a.point8=a.point0.shift(317.5381963475652,36.1375990486363*f),a.point8Cp1=a.point8.shift(173.12090742697325,12.479807891149623*f),a.point8Cp2=a.point8.shift(353.1201304168364,15.075322060904695*f),a.point9=a.point0.shift(336.14503661026947,8.388980629373263*f),a.point9Cp2=a.point9.shift(255.27121271777986,18.645853640957277*f),a.point5a=(new o).move(a.point6).curve(a.point6Cp2,a.point5Cp1,a.point5).shiftAlong(65*f);const u=(new o).move(a.point5).curve(a.point5Cp1,a.point6Cp2,a.point6).split(a.point5a);return a.point5aCp1=u[1].ops[1].cp1.clone(),a.point6Cp2=u[1].ops[1].cp2.clone(),a.point5=a.point5.rotate(357,a.point0),a.point5Cp2=a.point5.shift(196.75764739545923,56.96390931984925*f),i.eyeBottom=(new o).move(a.point7).curve(a.point7Cp1,a.point8Cp2,a.point8).curve(a.point8Cp1,a.point9Cp2,a.point9).addText(c?"skully:eyeBottom":"",m).addText(c?" (4)":"",m).addClass("hidden"),i.mouthTop=(new o).move(a.point3).curve(a.point3Cp1,a.point4Cp2,a.point4).addText(c?"skully:mouthTop":"",m).addText(c?" (16)":"",m).addClass("hidden"),i.upperJaw=(new o).move(a.point4).curve(a.point4Cp1,a.point5Cp2,a.point5).addText(c?"skully:upperJaw":"",m).addText(c?" (16)":"",m).addClass("hidden"),i.nose=(new o).move(a.point1).curve(a.point1Cp1,a.point2Cp2,a.point2).addText(c?"skully:nose":"",m).addText(c?" (10)":"",m).addClass("hidden"),p.set("templeToJaw",a.point5.dist(a.point5a)),p.set("up
1perJaw",i.upperJaw.length()),i.seam1=(new o).move(a.point9).line(a.point0).addText(c?"1":"",m).addClass("hidden"),i.seam2=(new o).move(a.point6).line(a.point7).addText(c?"2":"",m).addClass("hidden"),i.seam5=(new o).move(a.point5a).curve(a.point5aCp1,a.point6Cp2,a.point6).addText(c?"5":"",m).addClass("hidden"),i.seam7=(new o).move(a.point0).line(a.point1).addText(c?"7":"",m).addClass("hidden"),i.seam8=(new o).move(a.point2).curve(a.point2Cp1,a.point3Cp2,a.point3).addText(c?"8":"",m).addClass("hidden"),i.seam=(new o).move(a.point0).join(i.seam7).join(i.nose).join(i.seam8).join(i.mouthTop).join(i.upperJaw).line(a.point5a).join(i.seam5).join(i.seam2).join(i.eyeBottom).join(i.seam1).close(),p.set("templeWidth",a.point6.dist(a.point7)),p.set("noseBridgeWidth",a.point0.dist(a.point9)),p.set("templeWidth",a.point6.dist(a.point7)),p.set("mouthTop",i.mouthTop.length()),p.set("eyeBottom",i.eyeBottom.length()),p.set("noseSide",i.nose.length()),p.set("noseHeight",a.point1.dist(a.point2)),p.cutlist.addCut({cut:2,from:"fabric"}),a.title=a.point4Cp2.shiftFractionTowards(a.point0,.3),d("title",{nr:1,at:a.title,scale:.5,title:"skully:cheek"}),s.n1=new n("notch",a.point9),s.n2=new n("notch",a.point5),s.n3=new n("notch",a.point5a),s.n4=new n("notch",a.point1),s.n5=new n("bnotch",a.point7),s.n6=new n("bnotch",a.point2),a.gridAnchor=a.point4.clone(),a.logo=a.point7.shiftFractionTowards(a.point5,.5).shiftFractionTowards(a.point4,.25),s.logo=new n("logo",a.logo).attr("data-scale",.3),l&&(i.sa=i.seam.offset(l).trim().attr("class","fabric sa")),a.noseX=i.nose.edge("right"),a.eyeBottomY=i.eyeBottom.edge("bottom"),a.upperJaw=i.upperJaw.shiftFractionAlong(.42),d("hd",{from:a.noseX,to:a.point4,y:a.noseX.y+5,id:"noseToBackOfJaw"}),d("hd",{from:a.point6,to:a.point5,y:a.point6.y-l-15,id:"cheekBoneToBackOfJaw"}),d("hd",{from:a.point6,to:a.point5a,y:a.point6.y-l-5,id:"cheekBoneWidth"}),d("hd",{from:a.point7,to:a.point5,y:a.point6.y-l-25,id:"rightEyeToBackOfJaw"}),d("hd",{from:a.point3,to:a.point7,y:a.point6.y-l-35,id:"leftToRightEye"}),d("hd",{from:a.point2,to:a.point7,y:a.point6.y-l-25,id:"bottomNoseToRigthEye"}),d("hd",{from:a.point1,to:a.point7,y:a.point6.y-l-15,id:"topNoseToRigthEye"}),d("hd",{from:a.point0,to:a.point7,y:a.point6.y-l-5,id:"foreheadToRightEye"}),d("hd",{from:a.point9,to:a.point7,y:a.point6.y-l+5,id:"eyeWidth"}),d("hd",{from:a.point3,to:a.point4,y:a.point4.y+l+15,id:"jawWidth"}),d("hd",{from:a.point4,to:a.point5,y:a.point4.y+l+15,id:"jawToRight"}),d("vd",{from:a.eyeBottomY,to:a.point4,x:a.point4.x,id:"eyeToJaw"}),d("vd",{from:a.point6,to:a.point5a,x:a.point5.x+l+10,id:"cheekBoneHeight"}),d("vd",{from:a.point6,to:a.point5,x:a.point5.x+l+20,id:"cheekBoneToJawCorner"}),d("vd",{from:a.point5,to:a.point4,x:a.point5.x+l+20,id:"bottomToJaw"}),d("vd",{from:a.point3,to:a.point2,x:a.point2.x-l-10,id:"jawToBottomNose"}),d("vd",{from:a.point3,to:a.point1,x:a.point2.x-l-20,id:"jawToTopNose"}),d("vd",{from:a.point1,to:a.point0,x:a.point2.x-l-20,id:"topNoseToForehead"}),d("vd",{from:a.point6,to:a.upperJaw,x:a.point6.x,id:"cheekBoneToJaw"}),h}},mh={name:"skully.cheekbone",after:hh,draft:({Point:t,Path:e,points:o,paths:a,sa:i,complete:n,store:s,macro:r,part:l})=>{const c="text-xs center text-decoration='line-through'",p=s.get("sizeFactor");return o.point0=new t(0,0),o.point0Cp1=o.point0.shift(26.9653561519379,19.25431213546719*p),o.point1=o.point0.shift(23.857094414377794,57.23972922717229*p),o.point1Cp1=o.point1.shift(135.7075072577942,32.47486987518195*p),o.point1Cp2=o.point1.shift(180.82587279494425,29.902106313769938*p),a.seam5=(new e).move(o.point1).curve_(o.point1Cp1,o.point0).setText(n?"5":"",c).addClass("hidden"),a.seam6=(new e).move(o.point0).curve(o.point0Cp1,o.point1Cp2,o.point1).setText(n?"6":"",c).attr("data-text-text-decoration","underline").addClass("hidden"),a.seam=(new e).move(o.point0).join(a.seam6).join(a.seam5).close(),s.cutlist.addCut({cut:2,from:"fabric"}),o.gridAnchor=o.point0.clone(),o.title=o.point0.shiftFractionTowards(o.point1,.65).shiftFractionTowards(o.point1Cp2,.4),r("title",{nr:6,at:o.title,scale:.15,rotation:325,title:"skully:cheekbone"}),i&&(a.sa=a.seam.offset(i).attr("class","fabric sa")),o.pointY=a.seam.edge("top"),r("hd",{from:o.point0,to:o.point1,y:o.point0.y+i+15,id:"width"}),r("hd",{from:o.point0,to:o.pointY,y:o.pointY.y-i-15,id:"leftToTop"}),r("hd",{from:o.pointY,to:o.point1,y:o.pointY.y-i-15,id:"topToRight",noStartMarker:!0,noEndMarker:!0}),r("vd",{from:o.point1,to:o.point0,x:o.point1.x+i+15,id:"cornerToCornerHeight",noStartMarker:!0,noEndMarker:!0}),r("vd",{from:o.pointY,to:o.point0,x:o.point0.x-i-15,id:"height",noStartMarker:!0,noEndMarker:!0}),l}},fh={name:"skully.forehead",after:hh,draft:({Point:t,Path:e,points:o,paths:a,Snippet:i,snippets:n,sa:s,complete:r,store:l,macro:c,part:p})=>{const d="text-xs center",h=l.get("sizeFactor");return o.point0=new t(0,0),o.point0Cp1=o.point0.shift(241.92955090220636,37.666339998598225*h),o.point0Cp2=o.point0.shift(333.9339465987448,38.41308527689494*h),o.point1=o.point0.shift(255.81688050452775,105.61426225557886*h),o.point1Cp2=o.point1.shift(122.25481630103288,16.221492810466046*h),o.point2=o.point0.shift(260.36453213741225,104.78002255825727*h),o.point2Cp1=o.point2.shift(104.52547665837686,6.962227517109787*h),o.point3=o.point0.shift(266.83135324063875,91.72676538115797*h),o.point3Cp1=o.point3.shift(10.824271939403667,7.255955140434657*h),o.point3Cp2=o.point3.shift(190.82219510192064,8.8744083082141*h),o.point4=o.point0.shift(279.23029819067256,99.89481626481647*h),o.point4Cp2=o.point4.shift(109.3914373863736,10.114793621226355*h),o.point5=o.point0.shift(285.6356187763194,96.73748550220853*h),o.point5Cp1=o.point5.shift(322.25160644653687,21.112881376069897*h),o.point6=o.point0.shift(299.0865415436474,123.293691591622*h),o.point6Cp1=o.point6.shift(102.44153405115529,30.07799330075059*h),o.point6Cp2=o.point6.shift(171.33241486296131,9.49614011059247*h),o.point7=o.point0.shift(301.8945694309706,53.41879968784397*h),o.point7Cp1=o.point7.shift(330.8064552671208,26.14383661592154*h),o.point7Cp2=o.point7.shift(306.82890730505164,20.883100248765764*h),o.point8=o.point0.shift(315.99934749521526,121.10503287183268*h),o.point8Cp2=o.point8.shift(138.225501502238,23.326308173390803*h),o.point9=o.point0.shift(325.07215199461336,129.7747702101221*h),o.point9Cp1=o.point9.
1shift(126.07355572621562,42.01723333347864*h),a.firstSeam=(new e).move(o.point9).curve(o.point9Cp1,o.point0Cp2,o.point0).setText(r?"20":"",d).addClass("hidden"),l.set("firstSeam",a.firstSeam.length()),l.set("templeTop",(new e).move(o.point8).line(o.point9).length()+(new e).move(o.point5).curve(o.point5Cp1,o.point6Cp2,o.point6).length()),a.eyeTop=(new e).move(o.point2).curve(o.point2Cp1,o.point3Cp2,o.point3).curve(o.point3Cp1,o.point4Cp2,o.point4).addText(r?"skully:eyeTop":"",d).addText(r?" (4)":"",d).addClass("hidden"),a.seam1=(new e).move(o.point1).line(o.point2).setText(r?"1":"",d).addClass("hidden"),a.seam2=(new e).move(o.point4).line(o.point5).setText(r?"2":"",d).addClass("hidden"),a.seam6a=(new e).move(o.point5).curve(o.point5Cp1,o.point6Cp2,o.point6).setText(r?"6":"",d).attr("data-text-text-decoration","underline").addClass("hidden"),a.seam6b=(new e).move(o.point8).line(o.point9).setText(r?"6":"",d).attr("data-text-text-decoration","underline").addClass("hidden"),a.seam7=(new e).move(o.point0).curve(o.point0Cp1,o.point1Cp2,o.point1).setText(r?"7":"",d).addClass("hidden"),a.seam=(new e).move(o.point0).join(a.seam7).join(a.seam1).join(a.eyeTop).join(a.seam2).join(a.seam6a).line(o.point8).join(a.seam6b).curve(o.point9Cp1,o.point0Cp2,o.point0).close(),a.dart=(new e).move(o.point6).curve(o.point6Cp1,o.point7Cp2,o.point7).curve(o.point7Cp1,o.point8Cp2,o.point8),l.set("eyeTop",a.eyeTop.length()),l.cutlist.addCut({cut:2,from:"fabric"}),o.gridAnchor=o.point0.clone(),o.title=o.point3Cp1.shiftFractionTowards(o.point0,.3),c("title",{nr:2,at:o.title,scale:.5,title:"skully:forehead"}),n.n1=new i("notch",o.point2),n.n2=new i("bnotch",o.point4),s&&(a.sa=a.seam.offset(s).trim().attr("class","fabric sa")),o.pointX=a.seam.edge("left"),c("hd",{from:o.point0,to:o.point9,y:o.point0.y-s-15,id:"topToRight"}),c("hd",{from:o.pointX,to:o.point0,y:o.point0.y-s-15,id:"leftToTop"}),c("hd",{from:o.point6,to:o.point8,y:o.point6.y+s+5,id:"dartWidth"}),c("hd",{from:o.point6,to:o.point9,y:o.point6.y+s+15,id:"dartToRight"}),c("hd",{from:o.point5,to:o.point6,y:o.point6.y+s+5,id:"cheekBoneToDart"}),c("hd",{from:o.point4,to:o.point6,y:o.point6.y+s+15,id:"rightEyeToDart"}),c("hd",{from:o.point2,to:o.point6,y:o.point6.y+s+25,id:"leftEyeToDart"}),c("hd",{from:o.point1,to:o.point6,y:o.point6.y+s+35,id:"leftCornerToDart"}),c("hd",{from:o.pointX,to:o.point6,y:o.point6.y+s+45,id:"leftToDart"}),c("hd",{from:o.point0,to:o.point7,y:o.point7.y,id:"topToDartPoint"}),c("vd",{from:o.point5,to:o.point0,x:o.pointX.x-s-10,id:"cheekBoneToTop"}),c("vd",{from:o.point4,to:o.point0,x:o.pointX.x-s-20,id:"rightEyeToTop"}),c("vd",{from:o.point1,to:o.point0,x:o.pointX.x-s-30,id:"leftCornerToTop"}),c("vd",{from:o.point2,to:o.point0,x:o.pointX.x-s-40,id:"leftEyeToTop"}),c("vd",{from:o.point0,to:o.point9,x:o.point9.x+s+10,id:"rightToTop"}),c("vd",{from:o.point0,to:o.point8,x:o.point9.x+s+20,id:"rightDartToTop"}),c("vd",{from:o.point0,to:o.point6,x:o.point9.x+s+30,id:"leftDartToTop"}),c("vd",{from:o.point0,to:o.point7,x:o.point0.x,id:"dartPointToTop"}),p}},uh={name:"skully.eye",after:[hh,fh],draft:({Point:t,Path:e,points:o,paths:a,Snippet:i,snippets:n,sa:s,complete:r,store:l,macro:c,part:p})=>{const d="text-xs center",h=(l.get("eyeBottom")+l.get("eyeTop"))/Math.PI*2,m=.55191502449351;o.point0=new t(0,0),o.point2=o.point0.shift(0,h/2).shift(90,h/2),o.point0Cp1=o.point0.shift(0,h/2*m),o.point2Cp2=o.point2.shift(270,h/2*m);const f=(new e).move(o.point0).curve(o.point0Cp1,o.point2Cp2,o.point2);o.point1=f.shiftAlong(f.length()/2);const u=f.split(o.point1);o.p0=u[0].ops[0].to.clone(),o.p0Cp1=u[0].ops[1].cp1.clone(),o.p1Cp2=u[0].ops[1].cp2.clone(),o.p1=u[1].ops[0].to.clone(),o.p1Cp1=u[1].ops[1].cp1.clone(),o.p2Cp2=u[1].ops[1].cp2.clone(),o.p2=u[1].ops[1].to.clone(),o.p0Cp1=o.p0.shift(0,h/2*m*.4),o.p2Cp2=o.p2.shift(270,h/2*m*.4),o.p1Cp1=o.p1.shift(45,h/2*m*.7),o.p1Cp2=o.p1.shift(225,h/2*m*.7),o.p0Cp2=o.p0Cp1.flipX(),o.p4=o.p2.flipX(),o.p4Cp1=o.p2Cp2.flipX(),o.p3=o.p1.flipX(),o.p3Cp2=o.p1Cp1.flipX(),o.p3Cp1=o.p1Cp2.flipX(),a.eye=(new e).move(o.p4).curve(o.p4Cp1,o.p3Cp2,o.p3).curve(o.p3Cp1,o.p0Cp2,o.p0).curve(o.p0Cp1,o.p1Cp2,o.p1).curve(o.p1Cp1,o.p2Cp2,o.p2),o.pointNotch=a.eye.shiftAlong(l.get("eyeTop"));const g=a.eye.split(o.pointNotch);return a.eyeTop=g[0].clone().addText(r?"skully:eyeTop":"",d).addText(r?" (4)":"",d),a.eyeBottom=g[1].clone().addText(r?"skully:eyeBottom":"",d).addText(r?" (4)":"",d),a.seam=(new e).move(o.p4).join(a.eyeTop).join(a.eyeBottom).line(o.p4).close(),o.title=o.p4.shiftFractionTowards(o.p1,.45).shiftFractionTowards(o.p0,.5),c("title",{nr:9,at:o.title,scale:.3,title:"skully:eye"}),o.ps3a=o.p2.shiftFractionTowards(o.p4,.25),o.ps3aCp1=o.ps3a.shift(270,o.p4.dist(o.p2)/6),o.ps3=o.p2.shiftFractionTowards(o.p4,.5),o.ps3cross1=o.ps3.shiftFractionTowards(o.p0,.1),o.ps3cross2=o.ps3.shiftFractionTowards(o.p0,-.1),o.ps3b=o.p2.shiftFractionTowards(o.p4,.75),o.ps3bCp1=o.ps3b.shift(270,o.p4.dist(o.p2)/6),o.gridAnchor=o.ps3.clone(),l.cutlist.addCut({cut:2,from:"fabric"}),c("sewtogether",{from:o.ps3a,to:o.ps3b,hinge:!0}
1),n.n1=new i("notch",o.p2),n.n2=new i("notch",o.p4),n.n3=new i("bnotch",o.pointNotch),s&&(a.sa=a.seam.offset(s).attr("class","fabric sa")),c("hd",{from:o.p4,to:o.pointNotch,y:o.p0.y+s+15,id:"leftToNotch",noStartMarker:!0,noEndMarker:!0}),c("hd",{from:o.p4,to:o.p2,y:o.p2.y-s-15,id:"width"}),c("vd",{from:o.p2,to:o.p0,x:o.p2.x+s+15,id:"height"}),p}},gh={name:"skully.head1",after:[hh,fh],draft:({Point:t,Path:e,points:o,paths:a,Snippet:i,snippets:n,sa:s,complete:r,store:l,macro:c,part:p})=>{const d="text-xs center",h=l.get("sizeFactor");return o.point0=new t(0,0),o.point0Cp2=o.point0.shift(270.9766531413822,42.41716221059584*h),o.point2=o.point0.shift(254.08224234639044,161.93553876093907*h),o.point2Cp2=o.point2.shift(105.78717948197567,54.27380801428633*h),o.point2Cp1=o.point2.shift(75.48077210575057,107.97156739510459*h),o.point1=o.point0.shift(180,72.005*h),o.point1Cp1=o.point1.shift(268.60871199245156,55.97160080799901*h),o.point0=o.point0.shift(270,5),o.point0Cp2=o.point0.shift(270.9766531413822,42.41716221059584*h),a.firstSeam=(new e).move(o.point1).curve(o.point1Cp1,o.point2Cp2,o.point2).setText(r?"20":"",d).addClass("hidden"),o.fs1=a.firstSeam.shiftAlong(l.get("firstSeam")),o.fs2=a.firstSeam.shiftAlong(l.get("firstSeam")+l.get("templeToJaw")),o.gridAnchor=o.point0.clone(),l.cutlist.addCut({cut:2,from:"fabric"}),l.set("upperJawToLowerJaw",a.firstSeam.length()-l.get("firstSeam")-l.get("templeToJaw")),a.secondSeam=(new e).move(o.point2).curve(o.point2Cp1,o.point0Cp2,o.point0).setText(r?"17":"",d).addClass("hidden"),a.top=(new e).move(o.point0).line(o.point1).setText(r?"19":"",d).addClass("hidden"),l.set("secondSeam",a.secondSeam.length()),a.seam=(new e).move(o.point0).join(a.top).join(a.firstSeam).join(a.secondSeam).close(),o.title=o.point2.shiftFractionTowards(o.point1,.65).shift(0,10*h),c("title",{nr:3,at:o.title,scale:.5,title:"skully:head1"}),n.n1=new i("notch",o.fs1),n.n2=new i("notch",o.fs2),s&&(a.sa=a.seam.offset(s).attr("class","fabric sa")),c("hd",{from:o.point1,to:o.point2,y:o.point2.y+s+10,id:"leftToBottom",noStartMarker:!0,noEndMarker:!0}),c("hd",{from:o.point2,to:o.point0,y:o.point2.y+s+10,id:"bottomToRight"}),c("vd",{from:o.point0,to:o.point2,x:o.point0.x+s+15,id:"bottomToRight"}),c("vd",{from:o.point2,to:o.point1,x:o.point1.x-s-15,id:"bottomToLeft"}),c("ld",{from:o.point1,to:o.point0,d:5,id:"topWidth"}),c("ld",{from:o.point2,to:o.fs2,d:5,noStartMarker:!0,noEndMarker:!0}),c("ld",{from:o.point2,to:o.fs1,d:15,id:"bottomToSecondNotch",noStartMarker:!0,noEndMarker:!0}),p}},bh={name:"skully.head2",after:[hh,gh],draft:({Point:t,Path:e,points:o,paths:a,sa:i,complete:n,log:s,store:r,macro:l,part:c})=>{const p="text-xs center",d=r.get("sizeFactor");o.point0=new t(0,0),o.point0Cp2=o.point0.shift(0,15*d),o.point1=o.point0.shift(257.7901473243395,66.12988849226953*d),o.point1Cp1=o.point1.shift(270,30.242724116719366*d),o.point1Cp2=o.point1.shift(90,18.83053830882166*d),o.point2=o.point0.shift(272.3327760921532,153.20596573567235*d),o.point3=o.point0.shift(282.5001868336755,164.15422647315543*d),o.point3Cp1=o.point3.shift(81.44269285511335,54.758598457228615*d),o.point4=o.point0.shift(340.927384878832,52.16879559660159*d),o.point4Cp2=o.point4.shift(274.04106104609286,50.57373626695976*d);const h=r.get("secondSeam");let m=0;var f;do{m++,(h-(f=(new e).move(o.point0)._curve(o.point1Cp2,o.point1).curve_(o.point1Cp1,o.point2)).length()>
1.1||h-f.length()<-.1)&&(o.point0=o.point0.shift(90,h-f.length()),o.point1=o.point1.shift(90,h-f.length()),o.point1Cp1=o.point1.shift(270,30.242724116719366*d),o.point1Cp2=o.point1.shift(90,18.83053830882166*d),o.point0Cp2=o.point0.shift(0,15*d))}while(m<100&&(h-f.length()>1||h-f.length()<-1));return m>=100&&s.error("Generating head2 could not be made to fit in 100 iterations!"),o.dartPoint0=(new e).move(o.point3).curve(o.point3Cp1,o.point4Cp2,o.point4).shiftAlong(99.23273836900117*d),o.dartPoint1=o.point0.shift(285.96197961706986,65.4910471438654*d),o.dartPoint1Cp1=o.dartPoint1.shift(354.74216521134053,13.662486193954589*d),o.dartPoint1Cp2=o.dartPoint1.shift(356.55115250146685,13.680777207454268*d),o.dartPoint2=(new e).move(o.point3).curve(o.point3Cp1,o.point4Cp2,o.point4).shiftAlong(92.81578231343269*d),a.secondSeam=(new e).move(o.point0)._curve(o.point1Cp2,o.point1).curve_(o.point1Cp1,o.point2).setText(n?"17":"",p).addClass("hidden"),a.thirdSeam=(new e).move(o.point3).curve(o.point3Cp1,o.point4Cp2,o.point4).setText(n?"18":"",p).addClass("hidden"),a.top=(new e).move(o.point4).curve(o.point4,o.point0Cp2,o.point0).setText(n?"19":"",p).addClass("hidden"),a.bottom=(new e).move(o.point2).line(o.point3).setText(n?"21":"",p).addClass("hidden"),r.set("thirdSeam",a.thirdSeam.length()-o.dartPoint0.dist(o.dartPoint2)),r.set("head2width",o.point2.dist(o.point3)),a.dart=(new e).move(o.dartPoint0)._curve(o.dartPoint1Cp2,o.dartPoint1).curve_(o.dartPoint1Cp1,o.dartPoint2),a.seam=(new e).move(o.point0).join(a.secondSeam).join(a.bottom).join(a.thirdSeam).join(a.top).close(),r.cutlist.addCut({cut:2,from:"fabric"}),o.gridAnchor=o.dartPoint1.clone(),o.title=o.dartPoint1.shiftFractionTowards(o.point2,.35),l("title",{nr:4,at:o.title,scale:.5,title:"skully:head2"}),i&&(a.sa=a.seam.offset(i).attr("class","fabric sa")),o.pointX=a.seam.edge("right"),l("hd",{from:o.point0,to:o.point4,y:o.point0.y-i-15,id:"topWidth"}),l("hd",{from:o.point0,to:o.pointX,y:o.point0.y-i-25,id:"topToRight"}),l("hd",{from:o.point1,to:o.pointX,y:o.point0.y-i-35,id:"totalWidth"}),l("hd",{from:o.point3,to:o.pointX,y:o.point3.y+i+15,id:"bottomRightToRight",noStartMarker:!0,noEndMarker:!0}),l("hd",{from:o.point2,to:o.point3,y:o.point3.y+i+15,id:"bottomWidth",noStartMarker:!0,noEndMarker:!0}),l("hd",{from:o.point1,to:o.point2,y:o.point3.y+i+15,id:"leftToBottomLeft",noStartMarker:!0,noEndMarker:!0}),l("hd",{from:o.point0,to:o.dartPoint1,y:o.dartPoint1.y,id:"leftTopToDartPoint",noStartMarker:!0,noEndMarker:!0}),l("vd",{from:o.point1,to:o.point0,x:o.point1.x-i-15,id:"leftToTop"}),l("vd",{from:o.point2,to:o.point1,x:o.point1.x-i-15,id:"leftToBottomLeft"}),l("vd",{from:o.point3,to:o.point1,x:o.point1.x-i-25,id:"leftToBottomRight"}),l("vd",{from:o.point0,to:o.point4,x:o.point4.x+i+15,id:"topRightToTopLeft",noStartMarker:!0,noEndMarker:!0}),l("vd",{from:o.point4,to:o.dartPoint0,x:o.point4.x+i+15,id:"topDartToTopRight"}),l("vd",{from:o.point4,to:o.dartPoint2,x:o.point4.x+i+25,id:"bottomDartToTopRight"}),l("vd",{from:o.dartPoint2,to:o.point3,x:o.point4.x+i+25,id:"bottomRightToBottomDart"}),l("vd",{from:o.point0,to:o.dartPoint1,x:o.dartPoint1.x,id:"dartPointToTopLeft"}),c}},wh={name:"skully.lowermouth",after:hh,draft:({Point:t,Path:e,points:o,paths:a,sa:i,complete:n,store:s,macro:r,part:l})=>{const c="text-xs center",p=s.get("sizeFactor");return o.point0=new t(0,0),o.point1=o.point0.shift(270,66.14600000000002*p),o.point1Cp1=o.point1.shift(0,0*p),o.point0Cp2=o.point0.shift(0,0*p),o.point2=o.point0.shift(219.80599709691597,51.66121657491237*p),o.point0=new t(0,0),o.point0Cp1=o.point0.shift(0,0*p),o.point1=o.point0.shift(222.41579397130369,49.03292752740774*p),o.point2=o.point0.shift(270,66.14600000000002*p),o.point2Cp2=o.point2.shift(0,0*p),o.point1.x=o.point0.x-o.point0.dist(o.point2)/2,o.point1Cp1=o.point1.shift(270,33.0746752291626*p),o.point1Cp2=o.point1.shift(90,33.0746752291626*p),a.mouth1=(new e).move(o.point0).curve(o.point0Cp1,o.point1Cp2,o.point1).addText(n?"skully:mouthBottom":"",c).addText(n?" (13)":"",c).addClass("hidden"),a.mouth2=(new e).move(o.point1).curve(o.point1Cp1,o.point2Cp2,o.point2).addText(n?"skully:mouthBottom":"",c).addText(n?" 
1(13)":"",c).addClass("hidden"),a.backOfMouth=(new e).move(o.point2).line(o.point0).addText(n?"skully:backOfMouth":"",c).addText(n?" (11)":"",c).addClass("hidden"),s.set("mouthWidth",o.point0.dist(o.point2)),a.seam=(new e).move(o.point0).curve(o.point0Cp1,o.point1Cp2,o.point1).curve(o.point1Cp1,o.point2Cp2,o.point2).line(o.point0).close(),s.cutlist.addCut({cut:1,from:"fabric"}),o.gridAnchor=o.point1.clone(),o.title=o.point0.shiftFractionTowards(o.point2,.25).shiftFractionTowards(o.point1,.6),r("title",{nr:10,at:o.title,scale:.25,rotation:90,title:"skully:lowermouth"}),i&&(a.sa=a.seam.offset(i).attr("class","fabric sa")),r("hd",{from:o.point1,to:o.point0,y:o.point0.y-i-15,id:"width"}),r("vd",{from:o.point0,to:o.point2,x:o.point0.x+i+15,id:"height"}),l}},kh={name:"skully.uppermouth",after:[hh,gh,wh],draft:({Point:t,Path:e,points:o,paths:a,sa:i,complete:n,store:s,macro:r,part:l})=>{const c="text-xs center",p=s.get("sizeFactor");o.point0=new t(0,0),o.point6=o.point0.shift(.11139916029446559,128.58224303534288*p),o.point6Cp2=o.point6.shift(269.8182450112891,5.359026963917993*p
1),o.point5=o.point0.shift(328.14341716244707,120.52788940738986*p),o.point5Cp1=o.point5.shift(29.114015378370315,25.571930803128662*p),o.point4=o.point0.shift(317.9233666855834,95.68080416154534*p),o.point4Cp2=o.point4.shift(178.12857030706965,15.433231709528583*p),o.point3=o.point0.shift(312.29520434983914,55.53156468171955*p),o.point3Cp2=o.point3.shift(90,6.745097849549684*p),o.point3Cp1=o.point3.shift(270,23.140963009347697*p),o.point2=o.point0.shift(312.62624217423604,44.01273783803957*p),o.point2Cp1=o.point2.shift(358.24231642721344,5.05337768230318*p),o.point1=o.point0.shift(270,32.77328218228992*p),o.point1=o.point1.shift(90,o.point0.dist(o.point1)-s.get("mouthWidth")/2),o.point2=o.point2.shift(90,o.point0.dist(o.point1)-s.get("mouthWidth")/2),o.point2Cp1=o.point2.shift(358.24231642721344,5.05337768230318*p),o.point3=o.point3.shift(90,o.point0.dist(o.point1)-s.get("mouthWidth")/2),o.point3Cp1=o.point3.shift(270,23.140963009347697*p),o.point3Cp2=o.point3.shift(90,6.745097849549684*p),o.point4=o.point4.shift(90,o.point0.dist(o.point1)-s.get("mouthWidth")/2),o.point4Cp2=o.point4.shift(178.12857030706965,15.433231709528583*p),o.point5=o.point4.shift(0,s.get("upperJaw")-(new e).move(o.point1).line(o.point2).curve(o.point2Cp1,o.point3Cp2,o.point3).curve(o.point3Cp1,o.point4Cp2,o.point4).length()),o.point5Cp1=o.point5.shift(0,9*p),o.point6=new t(o.point5.x,o.point0.y).shift(0,.2*o.point5.x),o.point6Cp2=o.point6.shift(270,5*p),o.pointM1=o.point0.shift(180,s.get("mouthWidth")/2),o.pointM1Cp1=o.pointM1.shift(270,33.0746752291626*p),a.backOfUpperJaw=(new e).move(o.point5).curve(o.point5Cp1,o.point6Cp2,o.point6).setText(n?"not sewn":"",c).addClass("hidden"),o.lowerJaw=a.backOfUpperJaw.shiftAlong(s.get("upperJawToLowerJaw"));var d=o.lowerJaw.angle(a.backOfUpperJaw.shiftAlong(s.get("upperJawToLowerJaw")+1));return s.set("halfOfBack",a.backOfUpperJaw.length()-s.get("upperJawToLowerJaw")),o.point2ToLowerJaw=o.point2.shift(0,o.point2.dist(o.lowerJaw)/2),o.lowerJawToPoint2=o.lowerJaw.shift(d+90,o.point2.dist(o.lowerJaw)/3),r("mirror",{mirror:[o.pointM1,o.point6],points:["point0","lowerJaw","lowerJawToPoint2","point2ToLowerJaw","pointM1Cp1","point1","point2","point2Cp1","point3","point3Cp1","point3Cp2","point4","point4Cp2","point5","point5Cp1","point6Cp2"],prefix:"m"}),a.upperJaw1=(new e).move(o.point1).line(o.point2).curve(o.point2Cp1,o.point3Cp2,o.point3).curve(o.point3Cp1,o.point4Cp2,o.point4).line(o.point5).addText(n?"skully:upperJaw":"",c).addText(n?" (16)":"",c).addClass("hidden"),a.upperJaw2=(new e).move(o.mPoint5).line(o.mPoint4).curve(o.mPoint4Cp2,o.mPoint3Cp1,o.mPoint3).curve(o.mPoint3Cp2,o.mPoint2Cp1,o.mPoint2).line(o.mPoint1).addText(n?"skully:upperJaw":"",c).addText(n?" (16)":"",c).addClass("hidden"),a.front1=(new e).move(o.pointM1).curve_(o.pointM1Cp1,o.point1).addText(n?"skully:mouthTop":"",c).addText(n?" (16)":"",c).addClass("hidden"),a.front2=(new e).move(o.mPoint1).curve_(o.mPointM1Cp1,o.pointM1).addText(n?"skully:mouthTop":"",c).addText(n?" (16)":"",c).addClass("hidden"),a.backOfUpperJaw.curve(o.mPoint6Cp2,o.mPoint5Cp1,o.mPoint5),a.seam=(new e).move(o.point1).join(a.upperJaw1).join(a.backOfUpperJaw).join(a.upperJaw2).join(a.front2).join(a.front1).close(),a.backOfMouth=(new e).move(o.mPoint1).line(o.point1).addText(n?"skully:backOfMouth":"",c).addText(n?" (11)":"",c).setClass("dashed"),a.lowerJaw1=(new e).move(o.point2).curve(o.point2ToLowerJaw,o.lowerJawToPoint2,o.lowerJaw).addText(n?"skully:lowerjaw":"",c).addText(n?" (14)":"",c).setClass("dashed"),a.lowerJaw2=(new e).move(o.mPoint2).curve(o.mPoint2ToLowerJaw,o.mLowerJawToPoint2,o.mLowerJaw).addText(n?"skully:lowerjaw":"",c).addText(n?" (14)":"",c).setClass("dashed"),a.backOfUpperJaw1=(new e).move(o.point5).line(o.lowerJaw).setText(n?"21":"",c).addClass("hidden"),a.backOfUpperJaw2=(new e).move(o.mLowerJaw).line(o.mPoint5).setText(n?"21":"",c).addClass("hidden"),s.set("lowerJaw",a.lowerJaw1.length()+o.point1.dist(o.point2)),s.cutlist.addCut({cut:1,from:"fabric"}),o.gridAnchor=o.point0.clone(),o.title=o.pointM1.shiftFractionTowards(o.point6,.5),r("title",{nr:7,at:o.title,scale:.5,title:"skully:uppermouth"}),i&&(a.sa=a.seam.offset(i).attr("class","fabric sa")),r("hd",{from:o.pointM1,to:o.point1,y:o.point5.y+i+15,id:"leftToBOM"}),r("hd",{from:o.point1,to:o.point3,y:o.point5.y+i+15,id:"BOMtoCorner"}),r("hd",{from:o.point3,to:o.point5,y:o.point5.y+i+15,id:"cornerToRight"}),r("hd",{from:o.point5,to:o.point6,y:o.point5.y+i+15,id:"rightToMiddle",noStartMarker:!0,noEndMarker:!0}),r("hd",{from:o.pointM1,to:o.point6,y:o.mPoint5.y-i-15,id:"totalWidth"}),r("vd",{from:o.point6,to:o.point5,x:o.point6.x+i+15,id:"bottomToMiddle"}),r("vd",{from:o.mPoint5,to:o.point6,x:o.point6.x+i+15,id:"middleToTop"}),r("vd",{from:o.mPoint1,to:o.mPoint5,x:o.pointM1.x-i-15,id:"topBOMtoTop",noStartMarker:!0,noEndMarker:!0}),r("vd",{from:o.point1,to:o.mPoint1,x:o.pointM1.x-i-15,id:"BOMheight1"}),r("vd",{from:o.point5,to:o.point1,x:o.pointM1.x-i-15,id:"bottomToBottomBOM",noStartMarker:!0,noEndMarker:!0}),r("vd",{from:o.point2,to:o.mPoint2,x:o.point2.x,id:"BOMheight2"}),r("ld",{from:o.point5,to:o.lowerJaw,d:5,id:"bottomLowerJawIndicator",noStartMarker:!0,noEndMarker:!0}),r("ld",{from:o.lowerJaw,to:o.point6,d:5,id:"bottomLowerJawIndicatorToMiddle"}),r("ld",{from:o.point6,to:o.mLowerJaw,d:5,id:"topLowerJawIndicatorToMiddle"}),r("ld",{from:o.mLowerJaw,to:o.mPoint5,d:5,id:"topLowerJawIndicator",noStartMarker:!0,noEndMarker:!0}),l}},Ch={name:"skully.lowerjaw",after:[hh,kh],draft:({Point:t,Path:e,points:o,paths:a,sa:i,complete:n,log:s,store:r,macro:l,part:c})=>{const p="text-xs center",d=r.get("sizeFactor");o.point0=new t(0,0),o.point1=o.point0.shift(174.91311161963839,43.0264648094635*d),o.point2=o.point0.shift(240.9901082422603,82.64382533498798*d),o.point3=o.point0.shift(251.1601763775522,106.01579184725264*d),o.point4=o.point0.shift(276.6440430845334,116.75813357963548*d),o.point5=o.point0.shift(264.48800048134507,50.78381912578058*d);const h=r.get("mouthTop");o.point0=new t(0,0),o.point0Cp2=o.point0.shift(354.9481781658739,16.659715303689914*d),o.point1=o.point0.shift(264.91311161963836,43.0264648094635*d),o.point1Cp1=o.point1.shift(0,53.02160375733651*d),o.point2=o.point0.shift(331.14662128979205,83.05325951149062*d),o.point2Cp1=o.point2.shift(23.491413537740165,11.818521142681087*d),o.point2Cp2=o.point2.shift(203.48599545649284,6.360957553702122*d),o.point3=o.point0.shift(341.2414817357221,106.45865437980989*d),o.point3Cp1=o.point3.shift(83.22770461819215,15.755934754878917*d),o.point3Cp2=o.point3.shift(263.2247839478168,8.959567958333654*d),o.point4=o.point0.shift(6.617587088273078,117.22282297600707*d),o.point4Cp1=o.point4.shift(171.59670910061834,40.160161877163844*d),o.point4Cp2=o.point4.shift(255.77964223723035,21.208879767682262*d),o.point5=o.point0.shift(354.81977589032454,54.026610044075944*d),o.point5Cp1=o.point5.shift(166.25960112580196,20.659041530160696*d),o.point5Cp2=o.point5.shift(76.26126036953632,34.11095664483535*d),o.point0=new t(0,0);let m=0;var f;do{m++,o.point5Cp1=o.point5.shift(166.25960112580196,20.659041530160696*d),o.point5Cp2=o.point5.shift(76.26126036953632,34.11095664483535*d),f=(new e).move(o.point5).curve(o.point5Cp1,o.point0Cp2,o.point0),o.point5=o.point5.shift(270,.5*(h-f.length()))}while(m<100&&(h-f.length()>1||h-f.length()<-1));return m>=100&&s.error("Something is not quite right here!"),o.point4=o.point4.shift(355,r.get("lowerJaw")-(new e).move(o.point4).curve(o.point4Cp1,o.point5Cp2,o.point5).length()),o.point4Cp1=o.point4.shift(171.59670910061834,40.160161877163844*d),o.point4Cp2=o.point4.shift(255.77964223723035,21.208879767682262*d),a.mouthBottom=(new e).move(o.point5).curve(o.point5Cp1,o.point0Cp2,o.point0).addText(n?"skully:mouthBottom":"",p).addText(n?" 
1(13)":"",p).addClass("hidden"),a.lowerJaw=(new e).move(o.point4).curve(o.point4Cp1,o.point5Cp2,o.point5).addText(n?"skully:lowerjaw":"",p).addText(n?" (14)":"",p).addClass("hidden"),a.front=(new e).move(o.point0).line(o.point1).setText(n?"12":"",p),a.bottomJaw=(new e).move(o.point1).curve(o.point1Cp1,o.point2Cp2,o.point2).curve(o.point2Cp1,o.point3Cp2,o.point3).curve(o.point3Cp1,o.point4Cp2,o.point4).addText(n?"skully:jawBottom":"",p).addText(n?"(15)":"",p).addClass("hidden"),a.seam=(new e).move(o.point0).join(a.front).join(a.bottomJaw).join(a.lowerJaw).join(a.mouthBottom).close(),r.set("bottomJaw",a.bottomJaw.length()),r.cutlist.addCut({cut:2,from:"fabric"}),o.gridAnchor=o.point5.clone(),o.title=o.point1.shiftFractionTowards(o.point4,.25),l("title",{nr:11,at:o.title,scale:.4,title:"skully:lowerjaw"}),i&&(a.sa=a.seam.offset(i).trim().attr("class","fabric sa")),o.pointY=(new e).move(o.point4).curve(o.point4Cp1,o.point5Cp2,o.point5).edge("top"),l("hd",{from:o.point0,to:o.point5,y:o.pointY.y-i-15,id:"leftTopToTopHook"}),l("hd",{from:o.pointY,to:o.point4,y:o.pointY.y-i-15,id:"topToRight"}),l("hd",{from:o.point1,to:o.point5,y:o.pointY.y-i-25,id:"leftBottomToTopHook"}),l("hd",{from:o.point5,to:o.point4,y:o.pointY.y-i-25,id:"topHookToRight"}),l("hd",{from:o.point1,to:o.point3,y:o.point1.y+i+15,id:"bottomLeftToRightCorner"}),l("hd",{from:o.point3,to:o.point4,y:o.point1.y+i+15,id:"rightCornerToRight",noStartMarker:!0,noEndMarker:!0}),l("vd",{from:o.point1,to:o.point5,x:o.point1.x-i-15,id:"bottomToTopHook"}),l("vd",{from:o.point1,to:o.point0,x:o.point1.x-i-25,id:"bottomToTopLeft"}),l("vd",{from:o.point1,to:o.pointY,x:o.point1.x-i-35,id:"totalHeight"}),l("vd",{from:o.pointY,to:o.point3,x:o.point4.x+i+25,id:"rightCornerToTop"}),l("vd",{from:o.point4,to:o.point3,x:o.point4.x+i+15,id:"rightCornerToRight"}),c}},vh={name:"skully.jawfloor",after:[hh,Ch],draft:({Point:t,Path:e,points:o,paths:a,sa:i,complete:n,store:s,macro:r,part:l})=>{const c="text-xs center",p=s.get("sizeFactor");return o.point0=new t(0,0),o.point0Cp1=o.point0.shift(271.5282081165893,13.423774618191423*p),o.point1=o.point0.shift(329.79784303240206,56.7574974166409*p),o.point1Cp1=o.point1.shift(.11113474162861184,14.951028125182583*p),o.point1Cp2=o.point1.shift(180.11102743493262,10.32101937794903*p),o.point2=o.point0.shift(341.7834753138606,84.52734739124374*p),o.point2Cp1=o.point2.shift(.270382570357072,8.900099100571891*p),o.point2Cp2=o.point2.shift(180.28237864410448,8.319101033164598*p),o.point3=o.point0.shift(343.81344080631544,113.99173416524552*p),o.point3Cp1=o.point3.shift(339.59546305762336,4.204834955143868*p),o.point3Cp2=o.point3.shift(159.590412018152,8.47076366096944*p),o.point4=o.point0.shift(340.4669995939806,139.17462884448446*p),o.point4Cp2=o.point4.shift(166.50426671920425,8.612823288562234*p),o.point5=o.point0.shift(3.560698409188234,135.3172211952344*p),o.point6=o.point0.shift(90.34672828513591,8.097148263432018*p),o.point0Cp2=o.point0.shift(89.35665584015415,4.809303171978241*p),o.point5=o.point5.shift(0,o.point4.dist(o.point5)/3),o.point5Cp2=o.point5.shift(270,o.point4.dist(o.point5)/3),o.gridAnchor=o.point5.clone(),r("mirror",{mirror:[o.point5,o.point6],points:["point0","point0Cp1","point0Cp2","point1Cp2","point1","point1Cp1","point2Cp2","point2","point2Cp1","point3Cp2","point3","point3Cp1","point4Cp2","point4","point4","point5Cp2","point5","point6"],prefix:"m"}),a.bottomJaw1=(new e).move(o.point6)._curve(o.point0Cp2,o.point0).curve(o.point0Cp1,o.point1Cp2,o.point1).curve(o.point1Cp1,o.point2Cp2,o.point2).curve(o.point2Cp1,o.point3Cp2,o.point3).curve(o.point3Cp1,o.point4Cp2,o.point4).addText(n?"skully:jawBottom":"",c).addText(n?" (15
1)":"",c).addClass("hidden"),a.bottomJaw2=(new e).move(o.mPoint4).curve(o.mPoint4Cp2,o.mPoint3Cp1,o.mPoint3).curve(o.mPoint3Cp2,o.mPoint2Cp1,o.mPoint2).curve(o.mPoint2Cp2,o.mPoint1Cp1,o.mPoint1).curve(o.mPoint1Cp2,o.mPoint0Cp1,o.mPoint0).curve_(o.mPoint0Cp2,o.point6).addText(n?"skully:jawBottom":"",c).addText(n?" (15)":"",c).addClass("hidden"),a.back=(new e).move(o.point4).curve(o.point4,o.point5Cp2,o.point5).curve(o.mPoint5Cp2,o.mPoint4,o.mPoint4).setText(n?"21":"",c).addClass("hidden"),a.seam=(new e).move(o.point6).join(a.bottomJaw1).join(a.back).join(a.bottomJaw2).close(),s.set("backOfLowerJaw",(new e).move(o.point4).curve(o.point4,o.point5Cp2,o.point5).length()),s.cutlist.addCut({cut:1,from:"fabric"}),o.title=o.point6.shiftFractionTowards(o.point5,.5),r("title",{nr:8,at:o.title,scale:.5,title:"skully:jawfloor"}),i&&(a.sa=a.seam.offset(i).attr("class","fabric sa")),r("hd",{from:o.mPoint0,to:o.mPoint5,y:o.mPoint4.y-i-15,id:"width"}),r("hd",{from:o.point4,to:o.point5,y:o.point4.y+i+15,id:"bottomRightToRight",noStartMarker:!0,noEndMarker:!0}),r("hd",{from:o.point2,to:o.point4,y:o.point4.y+i+15,id:"indentToBottomRight"}),r("hd",{from:o.point1,to:o.point2,y:o.point4.y+i+15,id:"outdentToIndent"}),r("hd",{from:o.point0,to:o.point1,y:o.point4.y+i+15,id:"leftToOutdent"}),r("vd",{from:o.point1,to:o.mPoint1,x:o.mPoint1.x,id:"outdentHeight"}),r("vd",{from:o.point2,to:o.mPoint2,x:o.mPoint2.x,id:"indentHeight"}),r("vd",{from:o.point3,to:o.mPoint3,x:o.mPoint3.x,id:"anotherHeight"}),r("vd",{from:o.point4,to:o.mPoint4,x:o.mPoint4.x,id:"totalHeight"}),r("vd",{from:o.mPoint4,to:o.point5,x:o.point5.x+i+15,id:"middleToTop"}),r("vd",{from:o.mPoint5,to:o.point4,x:o.mPoint5.x+i+15,id:"bottomToMiddle"}),l}},yh={name:"skully.head3",after:[hh,bh,vh],draft:({Point:t,Path:e,points:o,paths:a,sa:i,complete:n,log:s,store:r,macro:l,utils:c,part:p})=>{const d="text-xs center",h=r.get("sizeFactor");o.point0=new t(0,0),o.point0Cp2=o.point0.shift(176.85941213458383,24.45873430903567*h),o.point0Cp1=o.point0.shift(80.97143471134606,19.435805231582247*h),o.point5=o.point0.shift(174.83014371859687,57.4195861357429*h),o.point5Cp1=o.point5.shift(359.48476820979687,24.91000716579583*h),o.point4=o.point0.shift(128.37,82.29999999999998*h),o.point4Cp1=o.point4.shift(280,20*h),o.point3=o.point0.shift(122.10525602099625,99.24923435875874*h),o.point3Cp2=o.point3.shift(75,20*h),o.point2=o.point0.shift(92.0479806305003,131.18279286933938*h),o.point2Cp2=o.point2.shift(286.4630945432234,43.38779202725112*h),o.point2Cp1=o.point2.shift(208.11590506019132,16.689416556608613*h),o.point1=o.point0.shift(80.96712201455671,37.967861804426136*h),o.point1Cp2=o.point1.shift(266.0887375411011,17.372462375840676*h),o.point1Cp1=o.point1.shift(86.08762325510818,17.602020395397776*h),o.dartPoint0=o.point4.clone(),o.dartPoint0Cp1=o.dartPoint0.shift(10,15.674240045373793*h),o.dartPoint1=o.point0.shift(93.69495535762911,79.06034303618978*h),o.dartPoint1Cp1=o.dartPoint1.shift(190.57289744169927,19.19488590744941*h),o.dartPoint1Cp2=o.dartPoint1.shift(206.69161019830457,18.019174148667343*h),o.dartPoint2=o.point3.clone(),o.dartPoint2Cp2=o.dartPoint2.shift(345,15.211717490145492*h);let m=r.get("halfOfBack")-r.get("head2width"),f=r.get("thirdSeam")-(new e).move(o.point2).curve(o.point2Cp1,o.point3Cp2,o.point3).length(),u=c.circlesIntersect(o.dartPoint0,f,o.point0,m);return u?o.point5=u[0].clone():s.error("Could not make the lower part of head3 fit the other parts!"),o.point5Cp1=o.point5.shift(359.48476820979687,24.91000716579583*h),o.gridAnchor=o.dartPoint1.clone(),a.thirdSeam1=(new e).move(o.point2).curve(o.point2Cp1,o.point3Cp2,o.point3).setText(n?"18":"",d).addClass("hidden"),a.thirdSeam2=(new e).move(o.point4).line(o.point5).setText(n?"18":"",d).addClass("hidden"),a.back=(new e).move(o.point0).curve(o.point0Cp1,o.point1Cp2,o.point1).curve(o.point1Cp1,o.point2Cp2,o.point2).setText(n?"19":"",d).addClass("hidden"),a.bottom=(new e).move(o.point5).line(o.point0).setText(n?"21":"",d).addClass("hidden"),a.dart=(new e).move(o.dartPoint0).curve(o.dartPoint0Cp1,o.dartPoint1Cp2,o.dartPoint1).curve(o.dartPoint1Cp1,o.dartPoint2Cp2,o.dartPoint2),a.seam=(new e).move(o.point0).join(a.back).join(a.thirdSeam1).line(o.point4).join(a.thirdSeam2).join(a.bottom).close(),r.cutlist.addCut({cut:2,from:"Fabric"}),o.title=o.point4.shiftFractionTowards(o.point1,.25).shiftFractionTowards(o.point0,.25),l("title",{nr:5,at:o.title,scale:.5,title:"skully:head3"}),i&&(a.sa=a.seam.offset(i).attr("class","fabric sa")),o.pointX=(new e).move(o.point1).curve(o.point1Cp1,o.point2Cp2,o.point2).edge("right"),l("hd",{from:o.dartPoint2,to:o.point2,y:o.point2.y-i-15,id:"topDartToTop"}),l("hd",{from:o.dartPoint2,to:o.pointX,y:o.point2.y-i-25,id:"totalWidth"}),l("hd",{from:o.dartPoint2,to:o.point5,y:o.point0.y+i+15,id:"topDartToBottomLeft",noStartMarker:!0,noEndMarker:!0}),l("hd",{from:o.dartPoint0,to:o.point5,y:o.point0.y+i+5,id:"bottomDartToBottomLeft",noStartMarker:!0,noEndMarker:!0}),l("hd",{from:o.dartPoint2,to:o.point0,y:o.point0.y+i+25,id:"topDartToBottomRight"}),l("hd",{from:o.dartPoint2,to:o.dartPoint1,y:o.dartPoint2.y,id:"topDartToDartPoint"}),l("vd",{from:o.point2,to:o.dartPoint1,x:o.pointX.x+i+15,id:"dartPointToTop"}),l("vd",{from:o.dartPoint1,to:o.point0,x:o.pointX.x+i+15,id:"dartPointToBottom"}),l("vd",{from:o.point2,to:o.pointX,x:o.pointX.x+i+25,id:"rightToTop"}),l("vd",{from:o.dartPoint2,to:o.point2,x:o.dartPoint2.x-i-15,id:"topDartToTop"}),l("vd",{from:o.dartPoint0,to:o.dartPoint2,x:o.dartPoint2.x-i-15,id:"dartHeight",noStartMarker:!0,noEndMarker:!0}),l("vd",{from:o.point5,to:o.dartPoint0,x:o.dartPoint2.x-i-15,id:"bottomDartToTop"}),p}},Th={name:"skully.nose",after:[hh,fh,uh],draft:({Point:t,Path:e,points:o,paths:a,Snippet:i,snippets:n,sa:s,complete:r,log:l,store:c,macro:p,part:d})=>{const h="text-xs center",m=c.get("noseSide"),f=c.get("noseHeight");o.point0=new t(0,0),o.point2=o.point0.shift(90,f),o.point0Cp1=o.point0.shift(315,f),o.point2Cp2=o.point2.shift(325,f/3),a.p1=(new e).move(o.point0).curve(o.point0Cp1,o.point2Cp2,o.point2).hide(),o.pRotate=o.point0.shift(30,f),a.p0p1=(new e).move(o.point0).line(o.point2).setClass("dashed mark"),o.point1=o.pRotate.shiftTowards(o.point2,-1*f),o.point1Cp2=o.point1.shift(o.point1.angle(o.point2)+55,f/3);
1var u,g=0;do{g++,o.point1=o.point1.rotate(-.5,o.point2),o.point1Cp2=o.point1Cp2.rotate(-.5,o.point2),o.point0Cp1=o.point0Cp1.rotate(-.5,o.point2),a.p1=(new e).move(o.point0).curve(o.point0Cp1,o.point1Cp2,o.point1).addText(r?"skully:nose":"",h).addText(r?" (10)":"",h),u=a.p1.length()}while(g<100&&u-m>1);if(g>=100&&l.error("Generating nose could not be made to fit in 100 iterations!"),o.pMiddle1=o.point2.shiftFractionTowards(o.point1,.5),o.point3=o.point1.flipX(),o.point3Cp1=o.point1Cp2.flipX(),o.point0Cp2=o.point0Cp1.flipX(),o.pMiddle2=o.pMiddle1.flipX(),a.p2=(new e).move(o.point3).curve(o.point3Cp1,o.point0Cp2,o.point0).addText(r?"skully:nose":"",h).addText(r?" (10)":"",h),a.seam=(new e).move(o.point0).join(a.p1).line(o.point2).line(o.point3).join(a.p2).close(),c.cutlist.addCut({cut:1,from:"fabric"}),o.gridAnchor=o.point0.clone(),o.title=o.point0.shiftFractionTowards(o.point3,.5),p("title",{nr:12,at:o.title,scale:.15,rotation:325,title:"nose"}),n.n1=new i("bnotch",o.point0),n.n2=new i("notch",o.point1),n.n3=new i("notch",o.point2),n.n4=new i("notch",o.point3),p("sewtogether",{from:o.point1.shiftFractionTowards(o.point2,.25),to:o.point1.shiftFractionTowards(o.point2,.75),hinge:!0,id:"st1"}),p("sewtogether",{from:o.point2.shiftFractionTowards(o.point3,.25),to:o.point2.shiftFractionTowards(o.point3,.75),hinge:!0,id:"st2"}),s){const t=(new e).move(o.point0).join(a.p1).line(o.point2).offset(s).addClass("hidden"),i=(new e).move(o.point2).line(o.point3).curve(o.point3Cp1,o.point0Cp2,o.point0).offset(s).addClass("hidden"),n=t.intersectsX(0)[0];a.sa1=t.split(n)[1].hide();const r=i.intersectsX(0)[0];a.sa2=i.split(r)[0].hide(),a.sa=(new e).move(n).join(a.sa1).join(a.sa2).close().attr("class","fabric sa")}return o.pointY1=(new e).move(o.point0).curve(o.point0Cp1,o.point1Cp2,o.point1).edge("bottom"),o.pointY2=(new e).move(o.point0).curve(o.point0Cp2,o.point3Cp1,o.point3).edge("bottom"),p("vd",{from:o.point2,to:o.point1,x:o.point1.x+s+5,id:"heightRight",noStartMarker:!0,noEndMarker:!0}),p("vd",{from:o.pointY1,to:o.point2,x:o.point3.x-s-5,id:"heightLeft",noStartMarker:!0,noEndMarker:!0}),p("hd",{from:o.point0,to:o.point1,y:o.point2.y-s-5,id:"widthRight",noStartMarker:!0,noEndMarker:!0}),p("hd",{from:o.point3,to:o.point0,y:o.point2.y-s-5,id:"widthLeft",noStartMarker:!0,noEndMarker:!0}),p("hd",{from:o.pointY1,to:o.point1,y:o.pointY2.y+s+5,id:"bottomToRight",noStartMarker:!0,noEndMarker:!0}),p("hd",{from:o.pointY2,to:o.pointY1,y:o.pointY2.y+s+5,id:"leftToRight",noStartMarker:!0,noEndMarker:!0}),p("hd",{from:o.point3,to:o.pointY2,y:o.pointY2.y+s+5,id:"leftToBottom",noStartMarker:!0,noEndMarker:!0}),d}},xh={en:JSON.parse('{"t":"Skully logo plush toy","d":"A FreeSewing pattern for skully, our logo, a plushy toy.","p":{"backOfMouth":"Back of mouth","cheek":"Cheek","cheekbone":"Cheekbone","eye":"Eye","forehead":"Forehead","head1":"Head part 1","head2":"Head part 2","head3":"Head part 3","jawfloor":"Jaw floor","lowerjaw":"Lower Jaw","lowermouth":"Lower Mouth","nose":"Nose","upperjaw":"Upper Jaw","mouthTop":"Top of mouth","uppermouth":"Upper Mouth"},"s":{"backOfMouth":"Back of mouth","cheek":"Cheek","cheekbone":"Cheekbone","eye":"Eye","eyeBottom":"Eye bottom","eyeTop":"Eye top","forehead":"Forehead","head1":"Head part 1","head2":"Head part 2","head3":"Head part 3","jawBottom":"Bottom jaw","jawfloor":"Jaw floor","lowerjaw":"Lower Jaw","lowermouth":"Lower Mouth","mouthBottom":"Bottom of mouth","mouthTop":"Top of mouth","nose":"Nose","upperJaw":"Upper jaw","uppermouth":"Upper Mouth"},"o":{"size":{"t":"Size","d":"Controls the overall size (value shown is the resulting height of Skully)"}}}')},Bh=new n.pT({data:dh,parts:[hh,mh,uh,fh,gh,bh,yh,vh,Ch,wh,Th,kh]}),Sh=JSON.parse('{"id":"sophie","code":"JenBarb_","design":"JenBarb_","description":"A FreeSewing pattern for a slip dress with a gathered bust","name":"Sophie Slip Dress","difficulty":2,"tags":[],"techniques":[],"version":"4.6.0","pkg":"@freesewing/sophie","collection":true}'),Lh={name:"sophie.base",measurements:["bustSpan","hpsToBust","hpsToWaistBack","bustPointToUnderbust","bustFront","shoulderToShoulder","shoulderSlope","underbust","waist","hips","
1seat","waistToUnderbust","waistToHips","waistToSeat","waistToKnee"],optionalMeasurements:[],options:{strapWidth:{pct:30,min:10,max:100,menu:"style"},necklineCoverage:{pct:20,min:0,max:90,menu:"style"},backCoverage:{pct:10,min:-50,max:90,menu:"style"},sideCornerDrop:{pct:50,min:0,max:100,menu:"style"},lengthBonus:{pct:0,min:-50,max:50,...(0,n.Wx)("waistToKnee"),menu:"style"},bottomWidthBonus:{pct:20,min:0,max:100,...(0,n.Wx)("seat"),menu:"style"},armholeDrop:{pct:80,min:50,max:90,menu:"fit"},armholeWidthFront:{pct:30,min:20,max:60,menu:"fit"},armholeWidthBack:{pct:30,min:20,max:90,menu:"fit"},bustEase:{pct:5,min:0,max:25,...(0,n.Wx)("bustFront"),menu:"fit"},underbustEase:{pct:5,min:0,max:25,...(0,n.Wx)("underbust"),menu:"fit"},waistEase:{pct:5,min:0,max:25,...(0,n.Wx)("waist"),menu:"fit"},hipsEase:{pct:5,min:0,max:25,...(0,n.Wx)("hips"),menu:"fit"},seatEase:{pct:5,min:0,max:25,...(0,n.Wx)("seat"),menu:"fit"}},draft:({options:t,measurements:e,part:o,store:a,points:i,Point:n,Path:s,paths:r,macro:l,sa:c,paperless:p})=>{const d=e.hpsToBust+e.bustPointToUnderbust,h=e.bustFront*(1+t.bustEase);a.set("bustFront",h);const m=e.underbust*(1+t.underbustEase);a.set("underbust",m);const f=e.waist*(1+t.waistEase);a.set("waist",f);const u=e.hips*(1+t.hipsEase);a.set("hips",u);const g=e.seat*(1+t.seatEase);a.set("seat",g),a.set("hpsToUnderbust",d);const b=e.shoulderToShoulder/4*t.strapWidth;a.set("strapWidth",b);const w=(e.hpsToBust+e.bustPointToUnderbust)*t.necklineCoverage;a.set("necklineCoverage",w);const k=(e.hpsToWaistBack-e.waistToUnderbust)*t.backCoverage;a.set("backCoverage",k);const C=e.waistToKnee*(1+t.lengthBonus);a.set("skirtLength",C);const v=e.seat*(1+t.bottomWidthBonus);a.set("bottomWidth",v);const y=m/4*(1-t.sideCornerDrop)+f/4*t.sideCornerDrop;a.set("cornerWidth",y);const T=e.waistToUnderbust+a.get("skirtLength"),x=d*t.armholeDrop;a.set("armholeDrop",x);const B=(e.bustFront-e.bustSpan/2)*t.armholeWidthFront;a.set("armholeWidthFront",B);const S=m/4*t.armholeWidthBack;return a.set("armholeWidthBack",S),i.foldCenterpoint=new n(0,T/2),i.bottomCenterpoint=new n(0,T),i.bottomSide=new n(v/4,T),i.seatSide=new n(g/4,e.waistToUnderbust+e.waistToSeat),i.seatToHipsTweak=new n(g/4,e.waistToUnderbust+(e.waistToSeat+e.waistToHips)/2),i.hipsSide=new n(u/4,e.waistToUnderbust+e.waistToHips),i.hipsToWaistTweak=new n(f/4,e.waistToUnderbust+e.waistToHips/2),i.waistSide=new n(f/4,e.waistToUnderbust),i.topSide=new n(m/4*(1-t.sideCornerDrop)+f/4*t.sideCornerDrop,e.waistToUnderbust*t.sideCornerDrop),r.shared=(new s).move(i.bottomCenterpoint).line(i.bottomSide).line(i.seatSide).curve_(i.seatToHipsTweak,i.hipsSide).curve_(i.hipsToWaistTweak,i.waistSide).line(i.topSide),p&&(l("vd",{from:i.topSide,to:i.waistSide,x:i.bottomSide.x+c+10,id:"vd2"}),l("vd",{from:i.waistSide,to:i.hipsSide,x:i.bottomSide.x+c+10,id:"vd3"}),l("vd",{from:i.hipsSide,to:i.seatSide,x:i.bottomSide.x+c+10,id:"vd4"}),l("vd",{from:i.seatSide,to:i.bottomSide,x:i.bottomSide.x+c+10,id:"vd5"}),l("hd",{from:i.bottomCenterpoint,to:i.bottomSide,y:i.bottomSide.y+c+10,id:"hd0"}),l("hd",{from:i.seatSide,to:i.bottomSide,y:i.seatSide.y,id:"hd1"}),l("hd",{from:i.hipsSide,to:i.bottomSide,y:i.hipsSide.y,id:"hd2"}),l("hd",{from:i.waistSide,to:i.bottomSide,y:i.waistSide.y,id:"hd3"}),l("hd",{from:i.topSide,to:i.bottomSide,y:i.topSide.y,id:"hd4"})),o.hide(),o}},Ph={name:"sophie.cup",after:Lh,draft:({Point:t,points:e,Path:o,paths:a,macro:i,sa:n,measurements:s,part:r,store:l,paperless:c,options:p})=>{const d=l.get("hpsToUnderbust"),h=l.get("strapWidth"),m=l.get("armholeDrop"),f=l.get("armholeWidthFront"),u=l.get("necklineCoverage"),g=l.get("bustFront"),b=l.get("cornerWidth"),w=l.get("underbust");return e.a=new t(0,m),e.b=new t(w/4-b,d+s.waistToUnderbust*p.sideCornerDrop),e.bc=new t(g/2-s.bustSpan/4,d+s.waistToUnderbust*p.sideCornerDrop),e.c=new t(g/2,d-u),e.d=new t(s.shoulderToShoulder/4,0),e.e=e.d.shift(180+s.shoulderSlope,h),e.ea=new t(f,.9*m),a.cup=(new o).move(e.a).line(e.b).curve_(e.bc,e.c).line(e.d).line(e.e).curve_(e.ea,e.a).close().addClass("fabric").addClass("lining"),n&&(a.sa=a.cup.offset(n).addClass("fabric sa")),c&&(i("vd",{from:e.a,to:e.e,x:e.a.x-n-10,id:"vd0"}),i("vd",{from:e.b,to:e.a,x:e.a.x-n-10,id:"vd1"}),i("vd",{from:e.b,to:e.c,x:e.c.x+n+10,id:"vd2"}),i("vd",{from:e.c,to:e.d,x:e.c.x+n+10,id:"vd3"}),i("hd",{from:e.a,to:e.e,y:e.d.y-n-10,id:"hd0"}),i("hd",{from:e.b,to:e.c,y:e.b.y+n+10,id:"hd1"}),i("hd",{from:e.d,to:e.c,y:e.d.y-n-10,id:"hd2"}),i("hd",{from:e.e,to:e.d,y:e.d.y-n-10,id:"hd3"}),i("pd",{path:(new o).move(e.b).curve_(e.bc,e.c),d:15,force:!0})),l.cutlist.addCut({cut:2,from:"fabric"}),l.cutlist.addCut({cut:2,from:"lining"}),e.grainlineFrom=e.d.shift(-90,.1*d),e.grainlineTo=e.d.shift(-90,.5*d),i("grainline",{from:e.grainlineFrom,to:e.grainlineTo}),e.title=new t(g/4,.7*d),i("title",{at:e.title,nr:1,title:"cup",align:"center",scale:.8}),r}},Rh={name:"sophie.backStrap",after:Lh,draft:({Point:t,points:e,Path:o,paths:a,macro:i,sa:n,measurements:s,part:r,
1store:l,paperless:c,options:p})=>{const d=s.hpsToWaistBack-s.waistToUnderbust,h=s.hpsToWaistBack-s.waistToUnderbust*(1-p.sideCornerDrop),m=l.get("hpsToUnderbust"),f=l.get("strapWidth"),u=l.get("armholeDrop"),g=l.get("armholeWidthBack"),b=l.get("backCoverage"),w=l.get("underbust"),k=l.get("cornerWidth");return e.a=new t(0,d-(m-u)),e.b=new t(w/4-k,h),e.c=new t(w/4,d-b),e.d=new t(s.shoulderToShoulder/4,0),e.e=e.d.shift(180+s.shoulderSlope,f),e.ea=new t(g,d-.9*(m-u)),a.backStrap=(new o).move(e.a).line(e.b).line(e.c).line(e.d).line(e.e).curve_(e.ea,e.a).close().addClass("fabric").addClass("lining"),n&&(a.sa=a.backStrap.offset(n).addClass("fabric sa")),c&&(i("vd",{from:e.a,to:e.e,x:e.a.x-n-10,id:"vd0"}),i("vd",{from:e.b,to:e.a,x:e.a.x-n-10,id:"vd1"}),i("vd",{from:e.b,to:e.c,x:e.c.x+n+10,id:"vd2"}),i("vd",{from:e.c,to:e.d,x:e.c.x+n+10,id:"vd3"}),i("hd",{from:e.a,to:e.e,y:e.d.y-n-10,id:"hd0"}),i("hd",{from:e.b,to:e.c,y:e.b.y+n+10,id:"hd1"}),i("hd",{from:e.d,to:e.c,y:e.d.y-n-10,id:"hd2"}),i("hd",{from:e.e,to:e.d,y:e.d.y-n-10,id:"hd3"}),i("ld",{from:e.b,to:e.c,id:"ld1",d:15})),l.cutlist.addCut({cut:2,from:"fabric"}),l.cutlist.addCut({cut:2,from:"lining"}),e.grainlineFrom=e.d.shift(-90,.1*h),e.grainlineTo=e.d.shift(-90,.4*h),i("grainline",{from:e.grainlineFrom,to:e.grainlineTo}),e.title=new t(w/8,.6*h),i("title",{at:e.title,nr:2,title:"Back Strap",align:"center",scale:.8}),r}},Fh={en:JSON.parse('{"t":"Sophie Slip Dress","d":"Sophie is a slip dress with a gathered bust.","p":{"cup":"cup","backStrap":"back strap","backPanel":"back panel","frontPanel":"front panel"},"s":{},"o":{"strapWidth":{"t":"Strap Width","d":"How wide do you want your shoulder straps?"},"necklineCoverage":{"t":"Neckline Coverage","d":"How far up the neckline will be covered"},"backCoverage":{"t":"Back Coverage","d":"Controls how far up the back will be covered"},"sideCornerDrop":{"t":"Side Corner Drop","d":"How far down the cups go on the side between the underbust and the waist"},"lengthBonus":{"t":"Length Bonus","d":"This controls the length of the dress as a percentage of the natural waist to knee measurement"},"bottomWidthBonus":{"t":"Bottom Width Bonus","d":"How much room will there be around the legs at the bottom of the dress"},"armholeDrop":{"t":"Armhole Drop","d":"How much to lower the armhole"},"armholeWidthFront":{"t":"Armhole Width Front","d":"How far the armhole will extend toward the center of the chest"},"armholeWidthBack":{"t":"Armhole Width Back","d":"How far the armhole will extend toward the center of the back"},"bustEase":{"t":"Bust Ease","d":"How much room do you want around the bust?"},"underbustEase":{"t":"Underbust Ease","d":"How much room do you want around the underbust?"},"waistEase":{"t":"Waist Ease","d":"How much room do you want around the waist?"},"hipsEase":{"t":"Hips Ease","d":"How much room do you want around the hips?"},"seatEase":{"t":"Seat Ease","d":"How much room do you want around the seat?"}}}')},Eh={name:"sophie.frontPanel",from:Lh,draft:({Point:t,points:e,paths:o,snippets:a,Snippet:i,macro:n,measurements:s,part:r,sa:l,store:c,paperless:p})=>
1{const d=s.waistToUnderbust+c.get("skirtLength"),h=c.get("hips"),m=c.get("necklineCoverage");return e.topCenterpoint=new t(0,-m),o.seam=o.shared.clone().line(e.topCenterpoint).close().addClass("fabric"),n("cutonfold",{from:e.topCenterpoint,to:e.bottomCenterpoint,id:"front"}),l&&(o.sa=o.seam.offset(l).addClass("fabric sa")),p&&(n("vd",{from:e.bottomCenterpoint,to:e.topCenterpoint,x:e.topCenterpoint.x-l-10,id:"vd0"}),n("vd",{from:e.topCenterpoint,to:e.topSide,x:e.bottomSide.x+l+10,id:"vd1"}),n("ld",{from:e.topCenterpoint,to:e.topSide,id:"ld1",d:15})),e.grainlineFrom=e.foldCenterpoint.shift(-45,.1*d),e.grainlineTo=e.foldCenterpoint.shift(-45,.4*d),n("grainline",{from:e.grainlineFrom,to:e.grainlineTo}),a.waist=new i("notch",e.waistSide),a.seat=new i("notch",e.seatSide),c.cutlist.addCut({cut:1,from:"fabric",onFold:1,onBias:1}),e.title=new t(h/8,d/4),n("title",{at:e.title,nr:3,title:"Front Panel",align:"center",scale:.8}),e.scalebox=e.title.shift(-90,65),n("scalebox",{at:e.scalebox}),r}},Wh={name:"sophie.backPanel",from:Lh,draft:({Point:t,points:e,paths:o,snippets:a,Snippet:i,macro:n,measurements:s,part:r,sa:l,store:c,paperless:p})=>
1{const d=s.waistToUnderbust+c.get("skirtLength"),h=c.get("hips"),m=c.get("backCoverage");return e.topCenterpoint=new t(0,-m),o.seam=o.shared.clone().line(e.topCenterpoint).close().addClass("fabric"),n("cutonfold",{from:e.topCenterpoint,to:e.bottomCenterpoint,id:"back"}),l&&(o.sa=o.seam.offset(l).addClass("fabric sa")),p&&(n("vd",{from:e.bottomCenterpoint,to:e.topCenterpoint,x:e.topCenterpoint.x-l-10,id:"vd0"}),n("vd",{from:e.topCenterpoint,to:e.topSide,x:e.bottomSide.x+l+10,id:"vd1"}),n("ld",{from:e.topCenterpoint,to:e.topSide,id:"ld1",d:15})),e.grainlineFrom=e.foldCenterpoint.shift(-45,.1*d),e.grainlineTo=e.foldCenterpoint.shift(-45,.4*d),n("grainline",{from:e.grainlineFrom,to:e.grainlineTo}),a.waist=new i("notch",e.waistSide),a.hips=new i("notch",e.seatSide),c.cutlist.addCut({cut:1,from:"fabric",onFold:1,onBias:1}),e.title=new t(h/8,d/4),n("title",{at:e.title,nr:4,title:"Back Panel",align:"center",scale:.8}),r}},Hh=new n.pT({data:Sh,parts:[Ph,Rh,Eh,Wh]}),Ah=JSON.parse('{"id":"sunny","code":"Timur Duehr","design":"halbmoki","description":"A FreeSewing pattern for an 18th century split side skirt","name":"Sunny Split-side Skirt","difficulty":1,"tags":["skirt","bottoms"],"techniques":["hem","pleat"],"version":"4.6.0","pkg":"@freesewing/sunny","collection":true}');const Oh={name:"sunny.base",measurements:["waist","waistToSeat","seat"],options:{paperlessOffset:15,waistEase:{pct:20,min:-30,max:30,toAbs:(t,{measurements:e},o)=>t*(e.waist-e.seat),fromAbs:(t,{measurements:e},o)=>Math.round(1e4*t)/(e.waist-e.seat)/1e4,menu:"fit"},pleatOverlap:{pct:0,min:0,max:50,menu:"style"},sideOpeningLength:{pct:75,min:0,max:100,...(0,n.Wx)("waistToSeat"),menu:"fit"},length:{pct:100,min:25,max:400,...(0,n.Wx)("waist"),menu:"style"},waistbandWidth:{pct:25,min:10,max:100,...(0,n.Wx)("waistToSeat"),menu:t=>!!t.fabricWaistband&&"style"},bindingWidth:{pct:25,min:10,max:100,...(0,n.Wx)("waistToSeat"),menu:t=>!!t.fabricBinding&&"style"},fabricWaistband:{bool:!1,menu:"style"},fabricBinding:{bool:!0,menu:"style"},numPleats:{count:10,min:5,max:25,menu:"style"},waistbandLength:{pct:150,min:100,max:500,...(0,n.Wx)("waist"),menu:"style"},hem:{pct:300,min:100,max:900,fromAbs:function(t,e){return t/(e.sa?e.sa:10)},toAbs:function(t,e){return t*(e.sa?e.sa:10)},menu:t=>t?"style":null}},draft:({Point:t,points:e,Path:o,paths:a,macro:i,part:n,measurements:s,options:r,store:l,expand:c,units:p,sa:d,complete:h,snippets:m,Snippet:f,paperless:u})=>{const g=s.waist,b=s.waistToSeat*r.waistEase,w=(b+g)/2,k=r.length*s.waist;l.set("length",k);const C=w/(1-r.pleatOverlap)*3;l.set("width",C);const v=r.waistbandLength*s.waist;l.set("waistbandLength",v);const y=r.sideOpeningLength*s.waistToSeat,T=w+b/2;c&&l.flag.preset("expandIsOn");const x=r.hem*(d||10);l.set("hem",x);const B=4*r.waistbandWidth*s.waistToSeat;l.set("waistbandWidth",B);const S=4*r.bindingWidth*s.waistToSeat;l.set("bindingWidth",S),r.fabricWaistband?(l.flag.note({msg:"sunny:fabricWaistbandSelected"}),e.wbl=new t(0,B),e.wtr=new t(v,0),e.wbr=new t(v,B)):l.flag.note({msg:"sunny:ribbonLength",replace:{waistbandLength:p(v)}}),e.tl=new t(0,0),e.bl=new t(0,k),e.br=new t(C,k),e.tr=new t(C,0),e.lNotch=new t(0,y),e.rNotch=new t(C,y),r.fabricWaistband&&(e.wfold1tr=e.wtr.shift(-90,B/4),e.wfold1tl=e.tl.shift(-90,B/4),e.wfold1br=e.wbr.shift(90,B/4),e.wfold1bl=e.wbl.shift(90,B/4),e.wfold2r=e.wtr.shift(-90,B/2),e.wfold2l=e.tl.shift(-90,B/2),e.wtlNotch=new t(v/2-T/2,B/4),e.wtrNotch=new t(v/2+T/2,B/4),e.wblNotch=new t(v/2-T/2,B/4*3),e.wbrNotch=new t(v/2+T/2,B/4*3)),r.fabricBinding&&(e.bbl=new t(0,S),e.btr=new t(T,0),e.bbr=new t(T,S),e.bfold1tr=e.btr.shift(-90,S/4),e.bfold1tl=e.tl.shift(-90,S/4),e.bfold1br=e.bbr.shift(90,S/4),e.bfold1bl=e.bbl.shift(90,S/4),e.bfold2r=e.btr.shift(-90,S/2),e.bfold2l=e.tl.shift(-90,S/2));const L=r.numPleats,P=(s.waist+b)/2/r.numPleats,R=P*(3-r.pleatOverlap);for(let F=0;F<L;F++)for(let t=0;t<2;t++)for(let o=0;o<2;o++)e[`pleat${F+1}_${o?"top":"bottom"}_${t?"up":"down"}`]=e[o?"tl":"bl"].shift(0,P*(2-t)+R*F);a.upFolds=(new o).hide().addClass("lashed"),a.downFolds=(new o).hide().addClass("dashed");for(let F=L;F>0;F--)a.upFolds.move(e[`pleat${F}_top_up`]).line(e[`pleat${F}_bottom_up`]),a.downFolds.move(e[`pleat${F}_top_down`]).line(e[`pleat${F}_bottom_down`]);return e.text=new t(25,50),e.title=e.text.shift(0,100),e.logo=e.title.shift(0,100),m.logo=new f("logo",e.logo),!u&&h&&(e.miniscale=e.title.shift(-90,r.paperlessOffset+32),i("miniscale",{at:e.miniscale})),n.hide()}},Dh={name:"sunny.panel",measurements:[],optionalMeasurements:[],plugins:[Pp.e2],from:Oh,options:{},draft:({Point:t,points:e,Path:o,paths:a,macro:i,part:n,store:s,expand:r,units:l,sa:c,snippets:p,Snippet:d,complete:h,options:m})=>{const f=m.paperlessOffset,u=s.get("hem");if(!r){const t=s.get("width")+2*c,e=s.get("length")+c+(c?u:0);return s.flag.note({msg:"sunny:cutPanel",notes:["flag:partHiddenByExpand"],replace:{width:l(t),length:l(e)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),n.hide()}return a.left=(new o).move(e.tl).line(e.bl).hide(),a.right=(new o).move(e.br).line(e.tr).hide(),a.top=(new o).move(e.tr).line(e.tl).hide(),a.fabric=a.left.join(a.right).join(a.top),h&&(a.upFolds.unhide(),a.downFolds.unhide()),i("sprinkle",{snippet:"notch",on:["tl","tr"]}),c&&(a.hem=i("hem",{class:"fabric",path1:"left",path2:"right",hemWidth:u}),a.sa=i("sa",{paths:["left",{p:"hem",offset:0},"right","top"]}
1)),i("sprinkle",{snippet:"notch",on:["rNotch","lNotch"]}),i("hd",{id:"length",from:e.tl,to:e.tr,y:f}),h&&(i("hd",{id:"pleatA",to:e.pleat3_top_down,from:e.pleat3_top_up,y:2*f}),i("hd",{id:"pleatB",from:e.pleat3_top_down,to:e.pleat4_top_up,y:2*f})),i("vd",{id:"width",from:e.tl,to:e.bl,x:f}),p.logo=new d("logo",e.logo),i("title",{at:e.title,nr:1,title:"panel",align:"center"}),n}},Nh={name:"sunny.binding",measurements:[],optionalMeasurements:[],plugins:[Pp.e2],from:Oh,draft:({Point:t,points:e,Path:o,paths:a,macro:i,part:n,options:s,expand:r,store:l,units:c,snippets:p,Snippet:d,complete:h,sa:m})=>{const f=s.paperlessOffset,u=l.get("width"),g=l.get("bindingWidth");return s.fabricBinding?r?(h&&(a.bfold1=(new o).move(e.bfold1tr).line(e.bfold1tl).move(e.bfold1br).line(e.bfold1bl).addClass("fabric dashed stroke-sm"),a.bfold2=(new o).move(e.bfold2r).line(e.bfold2l).addClass("fabric lashed stroke-sm")),a.bLeft=(new o).move(e.tl).line(e.bbl).hide(),a.bRight=(new o).move(e.bbr).line(e.btr).hide(),a.bTop=(new o).move(e.btr).line(e.tl).hide(),a.bBottom=(new o).move(e.bbl).line(e.bbr).hide(),a.binding=a.bLeft.clone().join(a.bBottom).join(a.bRight).join(a.bTop),m&&(a.sa=i("sa",{paths:["bLeft",{p:"bBottom",offset:0},"bRight",{p:"bTop",offset:0}]})),i("hd",{id:"length",from:e.tl,to:e.btr,y:10}),i("vd",{id:"width",from:e.tl,to:e.bbl,x:10}),i("sprinkle",{snippet:"notch",on:["tl","btr","bbl","bbr"]}),i("vd",{id:"bfold",from:e.btr,to:e.bfold1tr,x:e.btr.x-f}),l.cutlist.addCut({cut:2,identical:!0}),i("title",{at:e.title,nr:2,title:"binding",align:"center"}),n):(l.flag.note({msg:"sunny:cutBinding",notes:["flag:saUnused","flag:partHiddenByExpand"],replace:{width:c(g),length:c(u+2*m)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),n.hide()):n.hide()}},Ih={name:"sunny.waistband",measurements:[],optionalMeasurements:[],from:Oh,draft:({Point:t,points:e,Path:o,paths:a,macro:i,part:n,options:s,expand:r,store:l,units:c,snippets:p,Snippet:d,complete:h,paperless:m})=>{const f=s.paperlessOffset,u=l.get("waistbandLength"),g=l.get("waistbandWidth");return s.fabricWaistband?r?(a.waistband=(new o).move(e.tl).line(e.wbl).line(e.wbr).line(e.wtr).line(e.tl).close(),h?(a.fold1=(new o).move(e.wfold1tr).line(e.wfold1tl).move(e.wfold1br).line(e.wfold1bl).addClass("fabric dashed stroke-sm"),a.fold2=(new o).move(e.wfold2r).line(e.wfold2l).addClass("fabric lashed stroke-sm"),i("hd",{id:"length",from:e.tl,to:e.wtr,y:f}),i("hd",{id:"waistNotch1",from:e.wfold1tl,to:e.wtlNotch,y:e.wfold1tl.y+f}),i("hd",{id:"waistNotch2",to:e.wfold1tr,from:e.wtrNotch,y:e.wfold1tr.y+f}),i("vd",{id:"width",from:e.tl,to:e.wbl,x:f}),i("vd",{id:"wfold",from:e.wtr,to:e.wfold1tr,x:e.wtr.x-f}),l.cutlist.addCut({cut:2,identical:!0}),i("sprinkle",{snippet:"notch",on:["wtlNotch","wtrNotch","wblNotch","wbrNotch"]}),i("title",{at:e.title,nr:s.fabricBinding?3:2,title:"waistband",align:"center"}),n):n):(l.flag.note({msg:"sunny:cutWaistband",notes:["flag:saUnused","flag:partHiddenByExpand"],replace:{width:c(g),length:c(u)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),n.hide()):n.hide()}},Mh={en:JSON.parse('{"t":"Sunny","d":"An 18th century split-side skirt","p":{"panel":"Front/back skirt panels","binding":"Binding","waistband":"Waistband"},"s":{"cutPanel.t":"The skirt front/back panels are not shown","cutPanel.d":"Each **panel** is a rectangles of fabric {{{ width }}} wide and {{{ length }}} long","ribbonLength.t":"A ribbon is selected for waistband ties","ribbonLength.d":"This will require two lengths of ribbon approximately {{{ waistbandLength }}} long","cutWaistband.t":"The waistband is not shown","cutWaistband.d":"The **waistband** is two rectangles of fabric {{{ width }}} wide and {{{ length }}} long","cutBinding.t":"The binding is not shown","cutBinding.d":"Each **binding** is two rectangles of fabric {{{ width }}} wide and {{{ length }}} long","fabricWaistbandSelected.t":"A fabric waistband is selected","fabricWaistbandSelected.d":"Extra waistband length may be required depending on fabric used and waistband width"},"o":{"waistEase":{"t":"Waist Ease","d":"Ease added to waistline."},"pleatOverlap":{"t":"Pleat Overlap","d":"Percentage overlap with the previous pleat."},"sideOpeningLength":{"t":"Side Opening Length","d":"Length of opening in the side seams."},"length":{"t":"Length","d":"Skirt length"},"waistbandWidth":{"t":"Waistband Width","d":"Width of the fabric waistband."},"bindingWidth":{"t":"Waistband Width","d":"Width of the fabric waistband."},"fabricBinding":{"t":"Fabric Binding","d":"Use a fabric binding to secure and finish the pleats."},"fabricWaistband":{"t":"Fabric Waistband","d":"Construct a fabric waistband instead of using a ribbon."},"numPleats":{"t":"Number of Pleats","d":"Number of pleats per side"},"waistbandLength":{"t":"Waistband Length","d":"Length of waistband."},"hem":{"t":"Hem","d":"Hem width"}}}')},_h=new n.pT({data:Ah,parts:[Dh,Nh,Ih]}),jh=JSON.parse('{"id":"sven","name":"Sven sweatshirt","code":"Joost De Cock","description":"A FreeSewing pattern for a straightforward sweater","design":"Joost De Cock","difficulty":3,"tags":["tops"],"techniques":["curved-seam","flat-sleeve","ribbing"],"version":"4.6.0","pkg":"@freesewing/sven","collection":true}'),Gh={en:JSON.parse('{"t":"Sven sweatshirt","d":"Sven is a straightforward sweater.","p":{"back":"Back","cuff":"Cuff","front":"Front","sleeve":"Sleeve","waistband":"Waistband"},"s":{"cutCuff.t":"The cuff is not shown","cutCuff.d":"The **Cuff** (6) is a rectangular piece of ribbing fabric {{{ w }}} wide and {{{ l }}} long.","cutWaistband.t":"The waistband is not shown","cutWaistband.d":"The **Waistband** (4) is a rectangular piece of ribbing fabric {{{ w }}} wide and {{{ l }}} long."},"o":{"hipsEase":{"t":"Hips ease","d":"Controls the amount of ease at your hips (the bottom of the sweater)"},"ribbing":{"t":"Ribbing","d":"Whether to finish the hem and cuffs with ribbing or not."},"ribbingNo":{"t":"Do not use ribbing","d":"Do not finish the hem and cuffs with ribbing but rather use a classic hem"},"ribbingYes":{"t":"Use ribbing","d":"Finish the hem and cuffs with ribbing fabric"},"ribbingHeight":{"t":"Ribbing height","d":"The height of the ribbing on cuffs and hem."},"ribbingStretch":{"t":"Ribbing stretch","d":"The amount of negative ease to apply to the ribbing used for cuffs and hem."}}}')};function Uh({store:t,measurements:e,sa:o,Point:a,points:i,Path:n,paths:s,macro:r,options:l,part:c}){let p=!0;if(void 0===i.cfHem&&(p=!1),i.hem.x=e.hips*(1+l.hipsEase)/4,i.hipsCp2=new a(i.hem.x,p?i.cfWaist.y:i.cbWaist.y),l.ribbing){let o=(e.hpsToWaistBack+e.waistToHips)*l.ribbingHeight;t.setIfUnset("ribbingHeight",o),i.hem=i.hem.shift(90,o),p?i.cfHem=i.cfHem.shift(90,o):i.cbHem=i.cbHem.shift(90,o)}return s.saBase=(new n).move(i.hem).curve_(i.hipsCp2,i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.armholePitchCp1,i.armholePitch),s.saBase=p?s.saBase.join(s.frontArmhole):s.saBase.join(s.backArmhole),s.saBase.line(i.s3CollarSplit),s.saBase=p?s.saBase.join(s.frontCollar):s.saBase.join(s.backCollar),s.hemBase=p?(new n).move(i.cfHem).line(i.hem):(new n).move(i.cbHem).line(i.hem),s.saBase.hide(),s.hemBase.hide(),s.seam=s.hemBase.join(s.saBase),p?s.seam.line(i.cfHem):s.seam.line(i.cbHem),s.seam.attr("class","fabric"),o&&(s.sa=s.hemBase.offset(o*(l.ribbing?1:3)).join(s.saBase.offset(o)),p?s.sa.line(i.cfNeck).move(i.cfHem):s.sa.line(i.cbNeck).move(i.cbHem),s.sa.line(s.sa.start()),s.sa.attr("class","fabric sa")),r("rmad"),r("pd",{id:"lArmhole",path:(new n).move(i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.armholePitchCp1,i.armholePitch).curve(i.armholePitchCp2,i.shoulderCp1,i.shoulder),d:o+15}),r("pd",{id:"lShoulderToArmholePitch",path:(new n).move(i.armholePitch).curve(i.armholePitchCp2,i.shoulderCp1,i.shoulder),d:-15}),r("vd",{id:"hHemToHips",from:i.hem,to:i.waist,x:i.hips.x+o+15}),r("vd",{id:"hHemToArmhole",from:i.hem,to:i.armhole,x:i.hips.x+o+30}),r("vd",{id:"hHemToArmholePitch",from:i.hem,to:i.armholePitch,x:i.hips.x+o+45}),r("vd",{id:"hHemToShoulder",from:i.hem,to:i.shoulder,x:i.hips.x+o+60}),r("vd",{id:"hFull",from:i.hem,to:i.neck,x:i.hips.x+o+75}),r("ld",{from:i.neck,to:i.shoulder,d:o+15,id:"lShoulderSeam"}
1),i.cxHem=new a(0,i.hem.y),i.cxNeck=i.cbNeck?i.cbNeck.copy():i.cfNeck.copy(),r("hd",{id:"wAtHem",from:i.cxHem,to:i.hem,y:i.hem.y+o+15}),r("hd",{id:"wAtArmhole",from:i.cxHem,to:i.armhole,y:i.hem.y+o+30}),r("hd",{id:"wNeckToHps",from:i.cxNeck,to:i.s3CollarSplit,y:i.s3CollarSplit.y-o-15}),r("hd",{id:"wNeckToShoulder",from:i.cxNeck,to:i.s3ArmholeSplit,y:i.s3CollarSplit.y-o-15}),r("hd",{id:"wNeckToArmhole",from:i.cxNeck,to:i.armhole,y:i.s3CollarSplit.y-o-45}),r("hd",{id:"wArmholeToPitch",from:i.armholePitch,to:i.armhole,y:i.armhole.y}),c}const Yh=["hips","waist"],$h={pct:8,min:-4,max:20,...(0,n.Wx)("hips"),menu:"fit"},zh={bool:!0,menu:"style"},Jh={waistEase:.08,collarEase:{pct:10,min:5,max:30,...(0,n.Wx)("neck"),menu:"fit"},lengthBonus:{pct:15,min:0,max:30,menu:"style"},sleeveLengthBonus:{pct:3,min:0,max:10,menu:"style"},ribbingHeight:{pct:8,min:3,max:15,menu:"style"},hipsEase:$h,ribbing:zh},Kh={name:"sven.front",from:I,options:Jh,hide:n.V9.HIDE_TREE,measurements:Yh,draft:Uh},Vh={name:"sven.back",from:N,options:Jh,hide:n.V9.HIDE_TREE,measurements:Yh,draft:Uh};const Xh={name:"sven.sleeve",from:y,hide:n.V9.HIDE_TREE,after:[Kh,Vh],options:{ribbing:zh,cuffEase:{pct:20,min:0,max:200,...(0,n.Wx)("wrist"),menu:"fit"},libraryFitSleeve:!0},draft:function({store:t,sa:e,points:o,paths:a,Path:i,macro:n,options:s,part:r}){if(s.ribbing){const e=t.get("ribbingHeight");o.wristLeft=o.wristLeft.shift(90,e),o.wristRight=o.wristRight.shift(90,e),o.centerWrist=o.centerWrist.shift(90,e)}return a.seam=(new i).move(o.wristRight).line(o.bicepsRight).join(a.sleevecap).line(o.wristLeft).line(o.wristRight).close().attr("class","fabric"),e&&(a.saBase=(new i).move(o.wristRight).line(o.bicepsRight).join(a.sleevecap).line(o.wristLeft),a.hemBase=(new i).move(o.wristLeft).line(o.wristRight),a.saBase.hide(),a.hemBase.hide(),a.sa=a.saBase.offset(e).join(a.hemBase.offset(e*(s.ribbing?1:3))),a.sa.line(a.sa.start()).close().attr("class","fabric sa")),n("grainline",{from:o.centerWrist,to:o.sleeveTop}),n("rmad"),n("vd",{id:"hWristToArmhole",from:o.wristLeft,to:o.bicepsLeft,x:o.bicepsLeft.x-e-15}),n("vd",{id:"hFull",from:o.wristLeft,to:o.sleeveTip,x:o.bicepsLeft.x-e-30}),n("hd",{id:"wFull",from:o.bicepsLeft,to:o.bicepsRight,y:o.sleeveTip.y-e-30}),n("hd",{id:"wCuff",from:o.wristLeft,to:o.wristRight,y:o.wristLeft.y+e*(s.ribbing?1:3)+15}),n("pd",{id:"lSleevecap",path:a.sleevecap.reverse(),d:-1*e-15}),r}},Qh=function({store:t,measurements:e,options:o,points:a,paths:i,Path:n,Point:s,sa:r,macro:l,units:c,part:p},d){const h=(e.hpsToWaistBack+e.waistToHips)*o.ribbingHeight;p.context.settings.sample?t.set("ribbingHeight",h):t.setIfUnset("ribbingHeight",h),a.topLeft=new s(0,0),a.topRight=new s(2*h,0),a.bottomLeft=new s(0,d),a.bottomRight=new s(2*h,d),i.seam=(new n).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).line(a.topLeft).close().attr("class","various"),r&&(i.sa=i.seam.offset(r).addClass("various sa")),a.title=new s(a.bottomRight.x/2,a.bottomRight.y/2),l("vd",{from:a.bottomRight,to:a.topRight,x:a.topRight.x+r+15,text:c(d)}),l("hd",{from:a.topLeft,to:a.topRight,y:a.topRight.y-r-15})};const qh={pct:15,min:0,max:30,menu:"fit"},Zh={name:"sven.cuff",measurements:["wrist"],after:Xh,options:{ribbing:zh,ribbingStretch:qh},draft:function(t){const{measurements:e,sa:o,points:a,macro:i,options:n,store:s,expand:r,units:l,part:c}=t;if(!n.ribbing)return c;const p=e.wrist*(1+n.cuffEase)*(1-n.ribbingStretch);if(!r){const t=o?2*o:0;return s.flag.note({msg:"sven:cutCuff",notes:[o?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:l((e.hpsToWaistBack+e.waistToHips)*n.ribbingHeight+t),l:l(p+t)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),s.flag.preset("expandIsOff"),c.hide()}return s.flag.preset("expandIsOn"),Qh(t,p),s.cutlist.setCut({cut:2,from:"ribbing"}),i("title",{at:a.title,nr:5,title:"cuff",align:"center"}),c}};const tm={name:"sven.waistband",measurements:["hips"],options:{ribbing:zh,ribbingStretch:qh,hipsEase:$h},draft:function(t){const{measurements:e,points:o,macro:a,options:i,store:n,expand:s,units:r,sa:l,part:c}=t;if(!i.ribbing)return c;const p=e.hips*(1+i.hipsEase)*(1-i.ribbingStretch);if(!s){const t=l?2*l:0;return n.flag.note({msg:"sven:cutWaistband",notes:[l?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:r((e.hpsToWaistBack+e.waistToHips)*i.ribbingHeight+t),l:r(p+t)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),n.flag.preset("expandIsOff"),c.hide()}return n.flag.preset("expandIsOn"),Qh(t,p),n.cutlist.setCut({cut:2,from:"ribbing"}),a("title",{at:o.title,nr:4,title:"waistband",align:"center"}),c}},em=new n.pT({data:jh,parts:[Kh,Vh,Xh,Zh,tm]}
1),om=(0,n.D4)([_,Gh]),am=JSON.parse('{"id":"tamiko","name":"Tamiko zero-waste top","code":"Joost De Cock","description":"A FreeSewing pattern for a zero-waste top","design":"Joost De Cock","difficulty":1,"tags":["tops"],"techniques":["curved-seam"],"version":"4.6.0","pkg":"@freesewing/tamiko","collection":true}'),im={en:JSON.parse('{"t":"Tamiko top","d":"Tamiko is a zero-waste top.","p":{"top":"Top"},"s":{},"o":{"flare":{"t":"Flare","d":"The amount by which the garment flares from your chest downwards"},"shoulderseamLength":{"t":"Shoulder seam length","d":"The length of the shoulder seam, as a factor of your shoulder to shoulder measurement"},"armholeDepthFactor":{"t":"Armhole depth factor","d":"Controls the depth of your armhole, as a factor of your shoulder to shoulder measurement."},"chestEase":{"t":"Chest ease","d":"The amount of ease at your chest."},"lengthBonus":{"t":"Length bonus","d":"How much longer than the default length to make your top."},"draftForHighBust":{"t":"Draft for high bust","d":"Draft the pattern for the high bust measurement (if available) rather than the (full) chest. This will result in a more fitted garment for people with breasts."},"draftForHighBustYes":{"t":"Draft using the high bust measurement","d":"Drafts a pattern using the high bust measurements as the chest measurement. Recommended for people with breasts."},"draftForHighBustNo":{"t":"Draft using the chest measurement","d":"Drafts a pattern using the chest measurement. Recommended for people without breasts."}}}')};const nm={name:"tamiko.top",plugins:[A],draft:function({sa:t,Point:e,points:o,Path:a,paths:i,Snippet:n,snippets:s,options:r,measurements:l,store:c,macro:p,part:d}){const h=l.shoulderToShoulder,m=l.chest/2*(1+r.chestEase),f=(1+r.lengthBonus)*(l.hpsToWaistBack+l.waistToHips),u=h*r.armholeDepthFactor,g=h*r.shoulderseamLength;o.shoulderEdge=new e(0,0),o.armgapTop=new e(5,0),o.armgapNeck=o.armgapTop.shift(-90,g),o.bottomLeft=new e(0,h),o.armholeTop=new e(h/4,h),o.armholeBottom=o.armholeTop.shift(0,u),o.armholePitch=o.armholeTop.shift(0,u/2).shift(90,u/5),o.armholePitchCp1=o.armholePitch.shift(180,u/2.5),o.armholePitchCp2=o.armholePitchCp1.flipX(o.armholePitch),o.armholeNeck=o.armholeTop.shiftTowards(o.armgapNeck,h*r.shoulderseamLength).rotate(l.shoulderSlope,o.armholeTop),o.armgapBottom=o.armgapTop.shift(0,u),o.armgapBottom=o.armholeBottom.shiftTowards(o.armgapBottom,m),o.sideBottom=o.armgapTop.shiftTowards(o.armgapBottom,f),o.sideEdge=o.armgapTop.shiftTowards(o.armgapBottom,f);const b=o.armgapTop.angle(o.armgapBottom)/-2;return o.sideBottom=o.sideBottom.rotate(b+r.flare,o.armgapBottom),o.sideEdge=o.armgapBottom.shiftFractionTowards(o.sideBottom,1.1),o.bottomRight=o.armholeTop.shift(0,f),o.topRight=new e(o.bottomRight.x,o.sideEdge.y),o.topLeft=new e(0,o.topRight.y),o.topRight=new e(o.bottomRight.x,o.topLeft.y),i.seam=(new a).move(o.topLeft).line(o.bottomLeft).line(o.armholeTop)._curve(o.armholePitchCp1,o.armholePitch).curve_(o.armholePitchCp2,o.armholeBottom).line(o.bottomRight).line(o.bottomRight).line(o.topRight).close().move(o.armgapTop).line(o.armgapNeck).move(o.armholeTop).line(o.armholeNeck).move(o.armgapBottom).line(o.sideBottom).attr("class","fabric"),t&&(i.sa=(new a).move(o.armholeTop)._curve(o.armholePitchCp1,o.armholePitch).curve_(o.armholePitchCp2,o.armholeBottom).offset(t).attr("class","sa fabric")),c.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),p("cutonfold",{from:o.bottomRight,to:o.bottomLeft,grainline:!0,reverse:!0,offset:1.4*o.armholeTop.dy(o.armholePitch)}),o.title=o.topLeft.shiftFractionTowards(o.bottomRight,.5),p("title",{at:o.title,nr:1,title:"top"}),o.logo=o.topLeft.shiftFractionTowards(o.bottomRight,.15),s.logo=new n("logo",o.logo),o.scalebox=o.topLeft.shiftFractionTowards(o.bottomRight,.65),p("scalebox",{at:o.scalebox}),p("sprinkle",{snippet:"notch",on:["armgapTop","armgapNeck","armgapBottom","armholeNeck","sideBottom"]}),p("hd",{id:"wEdgeToSideTop",from:o.topLeft,to:o.armgapBottom,y:o.topLeft.y-15}),p("hd",{id:"wEdgeToSideBottom",from:o.topLeft,to:o.sideBottom,y:o.topLeft.y-30}),p("hd",{id:"wFull",from:o.topLeft,to:o.topRight,y:o.topLeft.y-45}),p("vd",{id:"hSideToSideBottom",from:o.sideBottom,to:o.topLeft,x:o.sideBottom.x+15}),p("vd",{id:"hEdgeToSideTop",from:o.armgapBottom,to:o.topLeft,x:o.topLeft.x-15}),p("vd",{id:"hShoulderToTop",from:o.armgapTop,to:o.topLeft,x:o.topLeft.x-30}),p("vd",{id:"hFull",from:o.bottomLeft,to:o.topLeft,x:o.topLeft.x-45}),p("vd",{id:"hShoulderSeam",from:o.armgapNeck,to:o.armgapTop,x:o.armgapTop.x+15}),p("hd",{id:"wSideToHps",from:o.bottomLeft,to:o.armholeNeck,y:o.bottomLeft.y+1
15}),p("hd",{id:"wSideToShoulder",from:o.bottomLeft,to:o.armholeTop,y:o.bottomLeft.y+30}),p("hd",{id:"wArmhole",from:o.armholeTop,to:o.armholeBottom,y:o.bottomLeft.y+30}),p("vd",{id:"hArmhole",from:o.armholeTop,to:o.armholePitch,x:o.armholePitch.x}),d},measurements:["shoulderToShoulder","chest","hpsToWaistBack","shoulderSlope","waistToHips"],optionalMeasurements:["highBust"],options:{armholeDepthFactor:{pct:50,min:40,max:60,menu:"fit"},chestEase:{pct:2,min:1,max:20,...(0,n.Wx)("chest"),menu:"fit"},flare:{deg:15,min:-10,max:30,menu:"style"},lengthBonus:{pct:13,min:0,max:60,menu:"style"},shoulderseamLength:{pct:10,min:5,max:25,menu:"style"},draftForHighBust:{bool:!1,menu:"fit"}}},sm=new n.pT({data:am,parts:[nm]}),rm=JSON.parse('{"id":"teagan","name":"Teagan T-shirt","code":"Joost De Cock","description":"A FreeSewing pattern for a T-shirt","design":"Joost De Cock","difficulty":2,"tags":["tops"],"techniques":["curved-seam","hem","flat-sleeve","knit-band"],"version":"4.6.0","pkg":"@freesewing/teagan","collection":true}'),lm={en:JSON.parse('{"t":"Teagan T-shirt","d":"Teagan is a fitted T-shirt pattern.","p":{"back":"Back","front":"Front","sleeve":"Sleeve"},"s":{"fullLengthFromHps.t":"T-Shirt length: {{{ length }}}","fullLengthFromHps.d":"The full length of the T-Shirt (from HPS to hem) is {{{ length }}}.","neckOpeningLength.t":"Neck opening length: {{{ length }}}","neckOpeningLength.d":"The full length of the T-Shirt\'s neck opening is {{{ length }}}. This is relevant for the knit binding finish."},"o":{"draftForHighBust":{"t":"Draft for high bust","d":"Draft the pattern for the high bust measurement (if available) rather than the (full) chest. This will result in a more fitted garment for people with breasts."},"sleeveEase":{"t":"Sleeve ease","d":"Amount of ease of your sleeves"},"sleeveLength":{"t":"Sleeve length","d":"Controls the length of your sleeves"},"necklineBend":{"t":"Neckline curvature","d":"Controls the curvature of the neckline."},"necklineDepth":{"t":"Neckline depth","d":"Controls how deep the neck opening plunges down."},"necklineWidth":{"t":"Neckline width","d":"Controls the width of the neck opening."},"fitWaist":{"t":"Fit the waist","d":"Whether or not to fit the waist or rather only fit chest and hips."},"fitWaistNo":{"t":"Do not fit the waist","d":"Draft a pattern that transitions smoothly from chest to hips, not taking the waist measurement into account"},"fitWaistYes":{"t":"Fit the waist","d":"Draft a pattern that fits chest, waist, and hips (this is unusual for a T-shirt)"},"waistEase":{"t":"Waist ease","d":"Ease at the waist (only applies when the waist is fitted)."},"hipsEase":{"t":"Hips ease","d":"Ease at the hips."}}}')};const cm={name:"teagan.front",from:D,measurements:["hips","waist"],hide:n.V9.HIDE_TREE,options:{bicepsEase:.05,shoulderEase:0,collarEase:0,shoulderSlopeReduction:0,sleeveWidthGuarantee:.85,frontArmholeDeeper:.005,chestEase:{pct:12,min:5,max:25,...(0,n.Wx)("chest"),menu:"fit"},sleeveLength:{pct:30,min:20,max:100,menu:"fit"},lengthBonus:{pct:15,min:-20,max:60,menu:"style"},backNeckCutout:{pct:8,min:4,max:12,menu:"fit"},draftForHighBust:{bool:!1,menu:"fit"},fitWaist:{bool:!1,menu:"fit"},waistEase:{pct:25,min:8,max:40,...(0,n.Wx)("waist"),menu:(t,e)=>!!e.fitWaist&&"fit"},hipsEase:{pct:18,min:8,max:30,...(0,n.Wx)("hips"),menu:"fit"},necklineDepth:{pct:25,min:20,max:40,menu:"style"},necklineWidth:{pct:30,min:10,max:50,menu:"style"},necklineBend:{pct:30,min:0,max:70,menu:"style"}},draft:function({complete:t,utils:e,store:o,sa:a,Point:i,points:n,Path:s,paths:r,Snippet:l,snippets:c,options:p,measurements:d,macro:h,log:m,units:f,part:u}){for(let g of Object.keys(r))r[g].hide();if(p.fitWaist){let t,e,o,a;t=d.waist*(1+p.waistEase)/4,e=d.hips*(1+p.hipsEase)/4,n.hem.x=e,n.hips.x=e,n.waist.x=t,o=.6*n.armhole.dy(n.waist),a=.25*n.hips.dy(n.waist),n.waistCp1=n.waist.shift(90,2*a/3-o/3),n.waistCp2=n.waist.shift(90,2*o/3-a/3),n.hipsCp2=n.hips.shift(90,.3*n.waist.dy(n.hips)),t>e&&m.warn("width at waist exceeds width at hips; consider disabling the curve to waist option for a more standard shape")}else{let t;t=d.waist>d.hips?d.waist*(1+p.hipsEase)/4:d.hips*(1+p.hipsEase)/4,n.hem.x=t,n.hips.x=t,n.waist.x=t,n.waistCp2=n.waist.shift(90,n.armhole.dy(n.waist)/3)}for(let g of["Neck","Shoulder","Armhole","Hips","Hem"])n[`cf${g}`]=n[`cb${g}`].clone();if(n.cfNeck=new i(0,p.necklineDepth*d.hpsToWaistBack),n.cfNeckCp1=n.cfNeck.shift(0,n.neck.x*p.necklineBend*2),n.neck=n.hps.shiftFractionTowards(n.shoulder,p.necklineWidth),n.neckCp2=n.neck.shiftTowards(n.shoulder,n.neck.dy(n.cfNeck)*(.2+p.necklineBend)).rotate(-90,n.neck),n.shoulderCp1=e.beamIntersectsY(n.shoulder,n.shoulderCp1,n.armholePitch.y),n.armholeHollowCp2=e.beamIntersectsX(n.armholeHollow,n.armholeHollowCp2,n.armholePitch.x),o.flag.info({msg:"teagan:fullLengthFromHps",replace:{length:f(n.hps.dy(n.hem))}}),o.set("lengthFrontNeckOpening",2*(new s).move(n.neck).curve(n.neckCp2,n.cfNeckCp1,n.cfNeck).length()),p.fitWaist){if(n.hem.y<n.hipsCp2.y
1){const t=(new s).move(new i(n.hem.x,n.hipsCp2.y)).curve(n.hipsCp2,n.waistCp1,n.waist).curve_(n.waistCp2,n.armhole);n.hem=t.intersectsY(n.hem.y)[0];const e=t.split(n.hem);e[1].ops.length<3?(n.hipsCp2=n.hem.copy(),n.waistCp1=n.hem.copy(),n.waist=n.hem.copy()):(n.hipsCp2=e[1].ops[1].cp1.copy(),n.waistCp1=e[1].ops[1].cp2.copy(),n.waist=e[1].ops[1].to.copy(),n.waistCp2=e[1].ops[2].cp1.copy())}r.sideSeam=(new s).move(n.hem).curve(n.hipsCp2,n.waistCp1,n.waist).curve_(n.waistCp2,n.armhole).hide()}else r.sideSeam=(new s).move(n.hem).curve_(n.waistCp2,n.armhole).hide();return r.hemBase=(new s).move(n.cfHem).line(n.hem).hide(),r.saBase=(new s).move(n.armhole).curve(n.armholeCp2,n.armholeHollowCp1,n.armholeHollow).curve(n.armholeHollowCp2,n.shoulderCp1,n.shoulder).line(n.neck).curve(n.neckCp2,n.cfNeckCp1,n.cfNeck).hide(),r.seam=(new s).move(n.cfHem).join(r.hemBase).join(r.sideSeam).join(r.saBase).line(n.cfHem).close().attr("class","fabric"),a&&(r.sa=(new s).move(n.cfHem).join(r.hemBase.offset(3*a)).join(r.sideSeam.offset(a)).join(r.saBase.offset(a)).line(n.cfNeck).attr("class","fabric sa")),o.set("library.sleeve.frontArmholeLength",(new s).move(n.armhole).curve(n.armholeCp2,n.armholeHollowCp1,n.armholeHollow).curve(n.armholeHollowCp2,n.shoulderCp1,n.shoulder).length()),n.armholeNotchFront=(new s).move(n.armhole).curve(n.armholeCp2,n.armholeHollowCp1,n.armholeHollow).curve(n.armholeHollowCp2,n.shoulderCp1,n.shoulder).shiftFractionAlong(.5),o.set("library.sleeve.frontArmholeToArmholePitch",o.get("library.sleeve.frontArmholeLength")/2),n.chest=new i(n.armhole.x,n.cbChest.y),t&&(r.chest=(new s).move(n.cbChest).line(n.chest).attr("class","contrast help"),h("banner",{id:"chestLine",classes:"center contrast help",path:r.chest,text:"teagan:chestLine"})),t&&(r.waist=(new s).move(n.cbWaist).line(n.waist).attr("class","contrast help"),h("banner",{id:"waistLine",classes:"center contrast help",path:r.waist,text:"teagan:waistLine"})),o.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),h("cutonfold",{from:n.cfNeck,to:n.cfHem,grainline:!0}),n.title=new i(n.waist.x/2,n.waist.y),h("title",{at:n.title,nr:1,title:"front"}),n.logo=n.title.shift(-90,75),c.logo=new l("logo",n.logo),c.armholeNotch=new l("bnotch",n.armholeNotchFront),h("hd",{id:"wAtHem",from:n.cfHem,to:n.hem,y:n.hem.y+2.5*a+15}),p.fitWaist&&(h("hd",{id:"wHemToWaist",from:n.waist,to:n.hem,y:n.hem.y+2.5*a+30}),h("vd",{id:"hHemToWaist",from:n.hem,to:n.waist,x:n.waist.x-15})),h("vd",{id:"hHemToArmhole",from:n.hem,to:n.armhole,x:n.armhole.x+a+15}),h("vd",{id:"hHemToShoulder",from:n.hem,to:n.shoulder,x:n.armhole.x+a+30}),h("vd",{id:"hFull",from:n.hem,to:n.neck,x:n.armhole.x+a+45}),h("hd",{id:"wFoldToHps",from:n.cfNeck,to:n.neck,y:n.neck.y-a-15}),h("hd",{id:"wFoldToShoulder",from:n.cfNeck,to:n.shoulder,y:n.neck.y-a-30}),h("hd",{id:"wFull",from:n.cfNeck,to:n.armhole,y:n.neck.y-a-45}),h("vd",{id:"hHemToNeck",from:n.cfHem,to:n.cfNeck,x:n.cfHem.x-a-15}),u}};const pm={name:"teagan.back",from:cm,draft:function({store:t,sa:e,Point:o,points:a,Path:i,paths:n,options:s,macro:r,utils:l,units:c,measurements:p,snippets:d,Snippet:h,part:m}){return a.cbNeck=new o(0,a.neck.y+s.backNeckCutout*p.neck),a.cbNeckCp1=a.cbNeck.shift(0,a.neck.x/2),a.neckCp2=l.beamIntersectsY(a.neck,a.neckCp2,a.cbNeck.y),a.shoulderCp1=a.shoulderCp1.shiftFractionTowards(a.shoulder,.25),n.hemBase=(new i).move(a.cfHem).line(a.hem).hide(),s.fitWaist?n.sideSeam=(new i).move(a.hem).curve(a.hipsCp2,a.waistCp1,a.waist).curve_(a.waistCp2,a.armhole).hide():n.sideSeam=(new i).move(a.hem).curve_(a.waistCp2,a.armhole).hide(),n.saBase=(new i).move(a.armhole).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.shoulderCp1,a.shoulder).line(a.neck).curve(a.neckCp2,a.cbNeckCp1,a.cbNeck).hide(),n.seam=(new i).move(a.cfHem).join(n.hemBase).join(n.sideSeam).join(n.saBase).line(a.cfHem).close().setClass("fabric"),e&&(n.sa=(new i).move(a.cfHem).join(n.hemBase.offset(3*e)).join(n.sideSeam.offset(e)).join(n.saBase.offset(e)).line(a.cbNeck).attr("class","fabric sa")),t.set("sleevecapEase",0),t.set("library.sleeve.backArmholeLength",(new i).move(a.armhole).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.shoulderCp1,a.shoulder).length()),a.armholeNotchBack=(new i).move(a.armhole).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.shoulderCp1,a.shoulder).shiftFractionAlong(.5),t.set("library.sleeve.backArmholeToArmholePitch",t.get("library.sleeve.backArmholeLength")/2),t.flag.info({msg:"teagan:neckOpeningLength",replace:{length:c(t.get("lengthFrontNeckOpening")+2*(new i).move(a.neck).curve(a.neckCp2,a.cbNeckCp1,a.cbNeck).length())}}),t.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),r("cutonfold",{from:a.cfNeck,to:a.cfHem,grainline:!0}
1),r("title",{at:a.title,nr:2,title:"back"}),a.scaleboxAnchor=a.scalebox=a.title.shift(90,100),r("scalebox",{at:a.scalebox}),d.armholeNotch=new h("bnotch",a.armholeNotchBack),r("vd",{id:"hHemToNeck",from:a.cbHem,to:a.cbNeck,x:a.cbHem.x-e-15}),m}};const dm={name:"teagan.sleeve",from:y,after:pm,hide:{from:!0},options:{...y.options,sleeveEase:{pct:15,min:5,max:35,menu:"style"},libraryFitSleeve:!0},draft:function({sa:t,Point:e,points:o,Path:a,paths:i,options:n,macro:s,measurements:r,store:l,part:c}){i.sleevecap.hide();const p=o.bicepsRight.x*n.sleeveLength;let d=r.biceps*(1+n.bicepsEase)*(1+n.sleeveEase);return d>2*o.bicepsRight.x&&(d=2*o.bicepsRight.x),o.hemLeft=new e(d/-2,p),o.hemRight=new e(d/2,p),o.top=(new a).move(o.capQ2).curve(o.capQ2Cp2,o.capQ3Cp1,o.capQ3).edge("top"),i.hemBase=(new a).move(o.hemLeft).line(o.hemRight).hide(),i.saBase=(new a).move(o.hemRight).line(o.bicepsRight).curve(o.bicepsRight,o.capQ1Cp1,o.capQ1).curve(o.capQ1Cp2,o.capQ2Cp1,o.capQ2).curve(o.capQ2Cp2,o.capQ3Cp1,o.capQ3).curve(o.capQ3Cp2,o.capQ4Cp1,o.capQ4).curve(o.capQ4Cp2,o.bicepsLeft,o.bicepsLeft).line(o.hemLeft).hide(),i.seam=(new a).move(o.hemLeft).join(i.hemBase).join(i.saBase).close().attr("class","fabric"),t&&(i.sa=(new a).move(o.hemLeft.shift(-90,3*t)).join(i.hemBase.offset(3*t)).join(i.saBase.offset(t)).line(o.hemLeft.shift(-90,3*t)).close().attr("class","fabric sa")),l.cutlist.setCut({cut:2,from:"fabric"}),o.title=o.gridAnchor.clone(),s("title",{at:o.title,nr:3,title:"sleeve"}),s("grainline",{from:new e(o.top.x,o.hemLeft.y),to:o.top}),s("hd",{id:"wAtHem",from:o.hemLeft,to:o.hemRight,y:o.hemLeft.y+3*t+15}),s("hd",{id:"wFull",from:o.bicepsLeft,to:o.bicepsRight,y:o.hemLeft.y+3*t+30}),s("vd",{id:"hSleeveSeam",from:o.hemRight,to:o.bicepsRight,x:o.bicepsRight.x+t+15}),s("vd",{id:"hFull",from:o.hemRight,to:(new a).move(o.capQ2).curve(o.capQ2Cp2,o.capQ3Cp1,o.capQ3).edge("top"),x:o.bicepsRight.x+t+30}),c}},hm=new n.pT({data:rm,parts:[pm,cm,dm]}),mm=(0,n.D4)([_,lm]),fm=JSON.parse('{"id":"tiberius","name":"Tiberius tunica","code":"Rika Tamaike","description":"A FreeSewing pattern for a tunica, a historical Roman tunic","design":"Rika Tamaike","difficulty":1,"tags":["tops","historical"],"techniques":[],"version":"4.6.0","pkg":"@freesewing/tiberius","collection":true}'),um={en:JSON.parse('{"t":"Tiberius Tunica","d":"Tiberius is a historical Roman tunic","p":{"tunica":"Tunica"},"s":{"biasTape":"Bias tape"},"o":{"headRatio":{"t":"Head ratio","d":"Controls the size of the head opening"},"armholeDrop":{"t":"Armhole drop","d":"Controls the depth of the armhole"},"lengthBonus":{"t":"Length bonus","d":"Allows variation of the length of the garment"},"widthBonus":{"t":"Width bonus","d":"Allows variation of the width of the garment"},"clavi":{"t":"Clavi","d":"Whether or not to include guides for clavi"},"claviNo":{"t":"No clavi","d":"Do not include clavi on the pattern"},"claviYes":{"t":"Include clavi","d":"Include clavi on the pattern"},"clavusLocation":{"t":"Clavus location","d":"Controls the location of the clavi"},"clavusWidth":{"t":"Clavus width","d":"Controls the width of the clavi"},"length":{"t":"Length","d":"Controls the length of the garment"},"width":{"t":"Width","d":"Controls the width of the garment"},"width.toElbow":{"t":"To the elbow","d":"Drafts a tunica to the elbow"},"width.toShoulder":{"t":"To the shoulder","d":"Drafts a tunica to the shoulder"},"width.toMidArm":{"t":"To the midarm/biceps","d":"Drafts a tunica to middle of the upperarm (biceps)"},"forceWidth":{"t":"Force width","d":"Apply width settings regardless of constraints"}}}')};const gm={name:"tiberius.tunica",measurements:["head","shoulderToElbow","shoulderToShoulder","biceps","hpsToWaistBack","waistToKnee","waist","chest","seat","hips","waistToFloor","waistToUpperLeg"],options:{headRatio:{pct:100,min:80,max:120,menu:"fit"},armholeDrop:{pct:110,min:100,max:150,menu:"fit"},lengthBonus:{pct:90,min:60,max:130,menu:"style"},widthBonus:{pct:100,min:50,max:130,menu:"style"},clavi:{bool:!1,menu:"style.clavi"},clavusLocation:{pct:65,min:50,max:80,menu:"style.clavi"},clavusWidth:{pct:100,min:50,max:150,menu:"style.clavi"},length:{list:["toKnee","toMidLeg","toFloor"],dflt:"toKnee",menu:"style"},width:{list:["toElbow","toShoulder","toMidArm"],dflt:"toMidArm",menu:"style"},forceWidth:{bool:!1,menu:"advanced"}},draft:function({Point:t,points:e,Path:o,paths:a,measurements:i,options:n,macro:s,complete:r,snippets:l,Snippet:c,store:p,sa:d,part:h}){const m="toElbow"===n.width?i.shoulderToElbow:"toMidArm"===n.width?i.shoulderToElbow/2:0;let f=(i.shoulderToShoulder/2+m)*n.widthBonus;!1===n.forceWidth&&(f<i.waist/4&&(f=i.waist/4*n.widthBonus),f<i.hips/4&&(f=i.hips/4*n.widthBonus),f<i.chest/4&&(f=i.chest/4*n.widthBonus),f<i.seat/4&&(f=i.seat/4*n.widthBonus));const u="toKnee"===n.length?i.waistToKnee:"toMidLeg"===n.length?i.waistToKnee/1.3:.95*i.waistToFloor,g=(i.hpsToWaistBack+u)*n.lengthBonus,b=i.head/4*n.headRatio,w=i.biceps/2*1.3*n.armholeDrop,k=n.
1clavusWidth*f/13/n.widthBonus;return e.top=new t(0,0),e.bottom=new t(0,g),e.topLeft=e.top.shift(0,-f),e.headLeft=e.top.shift(180,b),e.topLeftMin=e.top.shiftFractionTowards(e.headLeft,1.1),e.topLeftMin.x<e.topLeft.x&&(e.topLeft.x=e.topLeftMin.x),e.bottomLeft=e.bottom.shift(0,e.bottom.dx(e.topLeft)),e.armholeLeft=e.topLeft.shift(-90,w),a.saBase=(new o).move(e.top).line(e.topLeft).line(e.bottomLeft).hide(),a.hem=(new o).move(e.bottomLeft).line(e.bottom).hide(),a.fold=(new o).move(e.bottom).line(e.top).hide(),a.seam=a.saBase.join(a.hem).join(a.fold).unhide().attr("class","fabric"),n.clavi&&r&&(e.claviCenterTop=e.top.shiftFractionTowards(e.topLeft,n.clavusLocation),e.claviRightTop=e.claviCenterTop.shift(0,k),e.claviLeftTop=e.claviRightTop.flipX(e.claviCenterTop),e.claviRightBottom=new t(e.claviRightTop.x,e.bottom.y),e.claviLeftBottom=new t(e.claviLeftTop.x,e.bottom.y),a.clavi=(new o).move(e.claviRightBottom).line(e.claviRightTop).move(e.claviLeftBottom).line(e.claviLeftTop).addClass("note dashed"),s("banner",{path:a.clavi,text:"tiberius:biasTape",classes:"center fill-note text-sm",repeat:69})),d&&(a.sa=a.saBase.offset(d).join(a.hem.offset(2.5*d)).close().attr("class","fabric sa")),p.cutlist.setCut({cut:2,from:"fabric",onFold:!0}),l.hl=new c("notch",e.headLeft),l.al=new c("notch",e.armholeLeft),s("cutonfold",{from:e.bottom,to:e.top,grainline:!0}),e.midTop=e.top.shiftFractionTowards(e.headLeft,.5),e.midBottom=new t(e.midTop.x,e.bottom.y),e.logo=e.midTop.shiftFractionTowards(e.midBottom,.3),l.logo=new c("logo",e.logo),e.title=e.midTop.shiftFractionTowards(e.midBottom,.5),s("title",{at:e.title,nr:1,title:"tunica",align:"center"}),e.scalebox=e.midTop.shiftFractionTowards(e.midBottom,.7),s("scalebox",{at:e.scalebox}),s("vd",{id:"hFull",from:e.bottom,to:e.top,x:e.bottomLeft.x-30-d}),s("vd",{id:"hToNotch",from:e.bottomLeft,to:e.armholeLeft,x:e.armholeLeft.x-15-d}),s("vd",{id:"hFromNotch",from:e.armholeLeft,to:e.topLeft,x:e.armholeLeft.x-15-d}),s("hd",{id:"wFull",from:e.topLeft,to:e.top,y:e.top.y-d-(n.clavi?60:30)}),s("hd",{id:"wNotchToFold",to:e.top,from:e.headLeft,y:e.top.y-15-d}),n.clavi&&(s("hd",{id:"wClavi1ToFold",from:e.claviRightTop,to:e.top,y:e.top.y-30-d}),s("hd",{id:"wClavi2ToFold",from:e.claviLeftTop,to:e.top,y:e.top.y-45-d})),h}},bm=new n.pT({data:fm,parts:[gm]}),wm=JSON.parse('{"id":"trayvon","name":"Trayvon tie","code":"Joost De Cock","description":"A FreeSewing pattern for a tie","design":"Joost De Cock","difficulty":2,"tags":["accessories"],"techniques":["precision","lining"],"version":"4.6.0","pkg":"@freesewing/trayvon","collection":true}'),km={en:JSON.parse('{"t":"Trayvon tie","d":"Trayvon is a tie that cuts no corners for a professional result.","p":{"fabricLoop":"Fabric loop","fabricTail":"Fabric tail","fabricTip":"Fabric tip","interfacingTail":"Interfacing tail","interfacingTip":"Interfacing tip","liningTail":"Lining tail","liningTip":"Lining tip"},"s":{"cutLoop.t":"The loop is not shown","cutLoop.d":"The **Loop** is a rectangular piece of fabric {{{ width }}} wide and {{{ length }}} long (this part does not use seam allowance). It is not shown because the **expand** core setting is currently disabled. Enable it to show this pattern part."},"o":{"tipWidth":{"t":"Tip width","d":"The width of your tie at the tip"},"knotWidth":{"t":"Knot width","d":"The width of your tie at the knot"},"lengthBonus":{"t":"Length bonus","d":"How much longer than the default length to make the tie."}}}')},Cm={tipWidth:{pct:15,min:5,max:35,snap:Ro.Hw,...(0,n.Wx)("neck"),menu:"style"},knotWidth:{pct:8,min:4,max:12,snap:Ro.Hw,...(0,n.Wx)("neck"),menu:"style"},lengthBonus:{pct:0,min:-50,max:50,menu:"style"}},vm=({store:t,measurements:e,options:o,absoluteOptions:a})=>{const i=(e.hpsToWaistBack+e.waistToHips+e.neck/2)*(1+o.lengthBonus);let n=.7*a.tipWidth;n<a.knotWidth&&(n=o.knotWidth),t.set("halfLength",i),t.set("backTip",n)},ym=({points:t,Point:e,store:o,utils:a,paths:i,Path:n,macro:s,absoluteOptions:r},l,c,p=!1)=>{const d=o.get("halfLength"),h=l/2,m=c/2;t.tip=new e(0,0),t.mid=new e(0,d),t.tipRight=new e(h,h),t.tipLeft=t.tipRight.flipX(),t._tmp1=t.mid.shift(0,m),t._tmp2=t._tmp1.rotate(45,t.mid),t.midRight=a.beamsIntersect(t.mid,t._tmp2,t.tipRight,t._tmp1),t._tmp3=t.mid.shift(180,m),t._tmp4=t._tmp3.rotate(45,t.mid),t.midLeft=a.beamsIntersect(t.mid,t._tmp4,t.tipLeft,t._tmp3),t.gridAnchor=new e(0,t.tipRight.y),t.title=new e(0,d/5),p&&(t.notch1=t.tip.shift(-45,r.tipWidth/5),t.notch2=t.tip.shift(-135,r.tipWidth/5),s("sprinkle",{snippet:"notch",on:["notch1","notch2","mid"]})),i.seam=(new n).move(t.tip).line(t.tipLeft).line(t.midLeft).line(t.midRight).line(t.tipRight).line(t.tip).close()},Tm=({points:t,macro:e,paths:o,Path:a,complete:i},n=!1)=>{e("hd",{id:"wFull",from:t.tipLeft,to:t.tipRight,y:t.tip.y-15}),e("vd",{id:"hTip",from:t.tipRight,to:t.tip,x:t.tipRight.x+15}),n?e("vd",{id:"hFull",from:t.cutRight,to:t.tip,x:t.cutRight.x+30}):(e("hd",{id:"wAtTip",from:t._tmp3,to:t._tmp1,y:t.midLeft.y+15}),e("vd",{id:"hLength",from:t.mid,to:t.tip,x:t.tipRight.x+30}),i&&(o.hint=(new a).move(t._tmp3).line(t._tmp1).line(t.midRight).attr("class","dotted")))},xm=({paths:t,Path:e,points:o,sa:a},i)=>{t.sa=(new e).move(o.tipLeft).line(o.tip).line(o.tipRight).offset(-1*a).attr("class","sa "+i),t.sa.move(t.sa.end()).line(o.tipRight).move(t.sa.start()).line(o.tipLeft)};const Bm={name:"trayvon.interfacingTail",measurements:["hpsToWaistBack","waistToHips","neck"],options:Cm,draft:function(t){const{paths:e,points:o,macro:a,complete:i,Path:n,store:s,absoluteOptions:r}=t;return vm(t),ym(t,s.get("backTip"),r.knotWidth),e.seam.addClass("interfacing"),s.cutlist.addCut({cut:1,material:"interfacing"}
1),a("title",{at:o.title,nr:2,title:"interfacingTail",rotation:-90}),Tm(t),i&&(e.n45=(new n).move(o.midLeft).line(o.midRight).addClass("hidden").addText("45\xb0","center text-sm fill-note")),t.part}},Sm={name:"trayvon.interfacingTip",measurements:["hpsToWaistBack","waistToHips","neck"],options:Cm,draft:function(t){const{paths:e,points:o,macro:a,complete:i,Path:n,absoluteOptions:s,store:r}=t;return vm(t),ym(t,s.tipWidth,s.knotWidth),e.seam.addClass("interfacing"),r.cutlist.addCut({cut:1,material:"interfacing"}),a("title",{at:o.title,nr:1,title:"interfacingTip",rotation:-90}),Tm(t),i&&(e.n45=(new n).move(o.midLeft).line(o.midRight).addClass("hidden").addText("45\xb0","center text-sm fill-note")),t.part}};const Lm={name:"trayvon.liningTail",measurements:["hpsToWaistBack","waistToHips","neck"],options:Cm,draft:function(t){const{Path:e,Snippet:o,macro:a,options:i,paths:n,points:s,sa:r,snippets:l,store:c,absoluteOptions:p}=t;return vm(t),ym(t,2.5*c.get("backTip"),2.5*i.knotWidth),s.cutRight=s.tipRight.shiftTowards(s.midRight,2.5*p.tipWidth),s.cutLeft=s.cutRight.flipX(),n.seam=(new e).move(s.tip).line(s.tipLeft).line(s.cutLeft).line(s.cutRight).line(s.tipRight).line(s.tip).close().addClass("lining"),r&&xm(t,"lining"),c.cutlist.addCut({cut:1,material:"lining"}),a("title",{at:s.title,nr:6,title:"liningTip",rotation:-90}),l.notch=new o("notch",s.tip),Tm(t,!0),t.part}},Pm={name:"trayvon.liningTip",measurements:["hpsToWaistBack","waistToHips","neck"],options:Cm,draft:function(t){const{Path:e,Snippet:o,macro:a,paths:i,points:n,sa:s,snippets:r,absoluteOptions:l,store:c}=t;return vm(t),ym(t,2.5*l.tipWidth,2.5*l.knotWidth),n.cutRight=n.tipRight.shiftTowards(n.midRight,2.5*l.tipWidth),n.cutLeft=n.cutRight.flipX(),i.seam=(new e).move(n.tip).line(n.tipLeft).line(n.cutLeft).line(n.cutRight).line(n.tipRight).line(n.tip).close().addClass("lining"),s&&xm(t,"lining"),c.cutlist.addCut({cut:1,material:"lining"}),a("title",{at:n.title,nr:5,title:"liningTip",rotation:-90}),r.notch=new o("notch",n.tip),a("miniscale",{at:n.gridAnchor}),Tm(t,!0),t.part}};const Rm={name:"trayvon.fabricTail",measurements:["hpsToWaistBack","waistToHips","neck"],options:Cm,draft:function(t){const{Path:e,complete:o,macro:a,paths:i,points:n,sa:s,store:r,absoluteOptions:l}=t;return vm(t),ym(t,2.5*r.get("backTip"),2.5*l.knotWidth,!0),i.seam.addClass("fabric"),s&&xm(t,"fabric"),r.cutlist.addCut({cut:1}),a("title",{at:n.title,nr:4,title:"fabricTail",rotation:-90}),Tm(t),a("ld",{id:"lTipToNotch1",from:n.tip,to:n.notch1,d:l.tipWidth/-2.5}),a("ld",{id:"lTipToNotch2",from:n.notch2,to:n.tip,d:l.tipWidth/-2.5}),o&&(i.n45=(new e).move(n.midLeft).line(n.midRight).addClass("hidden").addText("45\xb0","center")),t.part}},Fm={name:"trayvon.fabricTip",measurements:["hpsToWaistBack","waistToHips","neck"],options:Cm,draft:function(t){const{Path:e,Snippet:o,complete:a,macro:i,paths:n,points:s,sa:r,snippets:l,absoluteOptions:c,store:p}=t;return vm(t),ym(t,2.5*c.tipWidth,2.5*c.knotWidth,!0),n.seam.addClass("fabric"),r&&xm(t,"fabric"),p.cutlist.addCut({cut:1}),i("title",{at:s.title,nr:3,title:"fabricTip",rotation:-90}),s.logo=s.tip.shiftFractionTowards(s.mid,.4),l.logo=new o("logo",s.logo),Tm(t),i("ld",{id:"lTipToNotch1",from:s.tip,to:s.notch1,d:c.tipWidth/-2.5}),i("ld",{id:"lTipToNotch2",from:s.notch2,to:s.tip,d:c.tipWidth/-2.5}),a&&(n.n45=(new e).move(s.midLeft).line(s.midRight).addClass("hidden").addText("45\xb0","center")),t.part}};const Em={name:"trayvon.fabricLoop",after:Sm,measurements:["hpsToWaistBack","waistToHips","neck"],draft:function({points:t,Point:e,paths:o,Path:a,store:i,macro:n,expand:s,units:r,part:l}){const c=3.5*i.get("backTip"),p=i.get("backTip");return s?(i.flag.preset("expandIsOn"),t.topLeft=new e(0,0),t.bottomRight=new e(3.5*i.get("backTip"),i.get("backTip")),t.topRight=new e(t.bottomRight.x,t.topLeft.y),t.bottomLeft=new e(t.topLeft.x,t.bottomRight.y),o.seam=(new a).move(t.topLeft).line(t.bottomLeft).line(t.bottomRight).line(t.topRight).line(t.topLeft).close().attr("class","fabric"),i.cutlist.addCut({cut:1,material:"lining"}),t.title=t.topLeft.shiftFractionTowards(t.bottomRight,.5),n("title",{nr:7,title:"loop",at:t.title,align:"center",scale:.666}),n("hd",{id:"wFull",from:t.bottomLeft,to:t.bottomRight,y:t.bottomRight.y+15}),n("vd",{id:"hFull",from:t.topRight,to:t.bottomRight,x:t.topRight.x+15}),l):(i.flag.note({msg:"trayvon:cutLoop",replace:{width:r(c),length:r(p)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),i.flag.preset("expandIsOff"),l.hide())}},Wm=new n.pT({data:wm,parts:[Bm,Sm,Lm,Pm,Rm,Fm,Em]}),Hm={en:JSON.parse('{"t":"Tristan top","d":"Tristan is a fitted tank top with prince(ss) seams.","p":{"peplumFront":"Peplum front","peplumBack":"Peplum back"},"s":{"strapWidthAdjusted.t":"The strap width has been adjusted","strapWidthAdjusted.d":"The strap width has been adjusted to {{{ width }}} to allow for the position of the strap on the shoulder.","peplumWidth.t":"Peplum size","peplumWidth.d":"The peplum will be {{{ peplumWidth }}} long.","frontOutside":"Outside front","frontInside":"Inside front","backOutside":"Outside back","backInside":"Inside back","frontPeplum":"Peplum front","backPeplum":"Peplum back","hem":"Hem"},"o":{"frontShoulderWidth":{"t":"Front shoulder width","d":"Controls how much width is added to the shoulder in the front"},"cutDepthBack":{"t":"Depth of the cut in the back","d":"Controls the depth of the cut in the back"},"cutDepthFront":{"t":"Depth of the cut in the front","d":"Controls the depth of the cut in the front"},"cutRoundnessBack":{"t":"Roundness of the cut in the back","d":"Controls how \'round\' the cut in the back is, from V to round to square"},"cutRoundnessFront":{"t":"Roundness of the cut in the front","d":"Controls how \'round\' the cut in the front is, from V to round to square"},"strapWidth":{"t":"Width of the straps","d":"Controls the width of the straps"},"zipperLocation":{"t":"Zipper location","d":"The location of the zipper: side, back, or front"},"zipperLocation.front":{"t":"Front zipper location","d":"The location of the zipper will be in the front"},"zipperLocation.side":{"t":"Side zipper location","d":"The location of the zipper will be on the side"},"zipperLocation.back":{"t":"Back zipper location","d":"The location of the zipper will be in the back"},"hem":{"t":"Hem option","d":"Add a hem."},"hemYes":{"t":"Add a hem","d":"Add a hem at the waist"},"hemNo":{"t":"Do not add a hem","d":"Do not add a hem at the waist"},"hemSize":{"t":"Size of the hem","d":"Size of the hem, a percentage of the distance between the neckline and the waist"},"lacing":{"t":"Lacing option","d":"This removes part of the seam to create an opening for lacing"},"lacingYes":{"t":"Add Lacing","d":"Remove part of the seam to create an opening for lacing"},"lacingNo":{"t":"No lacing","d":"Close the seams normally"},"lacingLocation":{"t":"Location of the lacing","d":"Lacing in the front, or the back"},"lacingLocation.back":{"t":"Lacing in the back","d":"The lacing will be in the back"},"lacingLocation.front":{"t":"Lacing in the front","d":"The lacing will be in the front"},"lacingWidth":{"t":"Lacing width","d":"Width of the lacing opening"},"peplum":{"t":"Peplum","d":"Add a peplum"},"peplumYes":{"t":"Add a peplum","d":"This will generate the peplum part."}
1,"peplumNo":{"t":"No peplum","d":"Pattern will be generated without a peplum"},"peplumSize":{"t":"Peplum size","d":"Controls the size of the peplum"},"peplumFullness":{"t":"Peplum fullness","d":"Controls the \'fullness\' of the peplum. Basically from a half-circle to a full-circle."}}}')},Am=JSON.parse('{"id":"tristan","name":"Tristan top","code":"Wouter van Wageningen","description":"A FreeSewing pattern for a fitted top with prince(ss) seams","design":"Natalia Sayang","difficulty":3,"tags":["tops"],"techniques":["curved-seam","precision"],"version":"4.6.0","pkg":"@freesewing/tristan","collection":true}'),Om={name:"tristan.frontPoints",from:Vi,hide:n.V9.HIDE_ALL,options:{armholeBackDepth:.6,armholeBackIn:.6,armholeDartPosition:.5,armholeFrontDepth:.65,armholeFrontIn:.2,backArmholeCurvature:.63,backArmholePitchDepth:.035,backArmholeSlant:5,backDartHeight:.46,backHemSlope:2.5,backNeckCutout:.06,bustDartCurve:1,bustDartLength:.9,dartPosition:"shoulder",frontArmholeCurvature:.63,frontArmholePitchDepth:.29,shoulderToShoulderCorrection:.995,bustSpanEase:{pct:0,min:-5,max:20,...(0,n.Wx)("bustSpan"),menu:"fit"},armholeDepth:{pct:44,min:38,max:55,menu:"style"},cutDepthBack:{pct:40,min:5,max:90,menu:"style"},cutDepthFront:{pct:80,min:0,max:125,menu:"style"},cutRoundnessBack:{pct:20,min:0,max:100,menu:"style"},cutRoundnessFront:{pct:10,min:0,max:100,menu:"style"},shoulderDartPosition:{pct:50,min:10,max:90,menu:"style"},strapWidth:{pct:45,min:5,max:90,menu:"style"},hemSize:{pct:5.62,min:1,max:25,menu:(t,e)=>!1!==e.hem&&!0!==e.peplum&&"options"},upperDartLength:{pct:90,min:80,max:95,menu:"advanced"},waistDartLength:{pct:90,min:75,max:95,menu:"advanced"},zipperLocation:{dflt:"side",list:["front","side","back"],menu:"options"},hem:{bool:!1,menu:(t,e)=>!0!==e.peplum&&"options"},lacing:{bool:!0,menu:"options"},lacingLocation:{dflt:"front",list:["front","back"],menu:(t,e)=>!1!==e.lacing&&"options"},lacingWidth:{pct:20,min:0,max:50,menu:(t,e)=>!1!==e.lacing&&"options"}},draft:({points:t,Path:e,paths:o,snippets:a,options:i,macro:n,store:s,utils:r,units:l,part:c})=>{const p=1==i.lacing&&"front"==i.lacingLocation;for(const f of Object.keys(o))o[f].hide();for(const f in a)delete a[f];n("rmtitle"),n("rmscalebox"),n("rmcutonfold"),t.sideWaist=t.sideHem.clone(),t.sideWaistInitial=t.sideHemInitial.clone(),t.cfWaist=t.cfHem.clone(),s.cutlist.removeCut();const d=t.shoulderDartInside.dist(t.hps),h=t.shoulderDartOutside.dist(t.shoulder);let m=(d+h)*i.strapWidth;if(m/2>d&&(m=2*d),m/2>h&&(m=2*h),s.set("strapWidth",m),m!=(d+h)*i.strapWidth&&s.flag.info({msg:"tristan:strapWidthAdjusted",replace:{width:l(m)}}),t.strapInside=t.shoulderDartInside.shiftTowards(t.hps,m/2),t.strapOutside=t.shoulderDartOutside.shiftTowards(t.shoulder,m/2),t.cfCut=t.cfNeck.shiftFractionTowards(t.cfBust,i.cutDepthFront),o.cutSeamInside=(new e).move(t.waistDartLeft).curve(t.waistDartLeftCp,t.shoulderDartTipCpDownInside,t.shoulderDartTip).line(t.shoulderDartInside).hide(),t.cutSeamInside=o.cutSeamInside.intersectsY(t.cfCut.y)[0],t.cutSeamOutside=(new e).move(t.waistDartRight).curve(t.waistCpUp,t.waistUpDartRightCpDown,t.waistUpDartRight).curve(t.waistUpDartRightCpUp,t.shoulderDartTipCpDownOutside,t.shoulderDartOutside).intersectsY(t.cfCut.y)[0],t.cfCutCp=t.cfCut.shiftFractionTowards(t.cutSeamInside,1-i.cutRoundnessFront),t.strapInsideCp=t.strapInside.shiftFractionTowards(t.cutSeamInside.shift(t.cutSeamInside.angle(t.shoulderDartInside)+90,m/2),1-i.cutRoundnessFront),t.armholeCutCp=t.armhole.shiftFractionTowards(t.bustDartTip,i.armholeFrontIn),t.strapOutsideCp=t.strapOutside.shiftFractionTowards(t.bustDartTip.shift(t.cutSeamOutside.angle(t.shoulderDartOutside)-90,m/2),i.armholeFrontDepth),t.strapOutsideCp.x>t.armholeDartCpBottom.x&&(t.strapOutsideCp.x=t.armholeDartCpBottom.x),t.strapOutsideCp.y>t.armholeDartCpBottom.y&&(t.strapOutsideCp.y=t.armholeDartCpBottom.y),p&&(t.lacingCut=t.cfCut.shift(0,(t.strapInsideCp.x-t.cfCut.x)*i.lacingWidth),t.lacingWaist=t.cfWaist.shiftTowards(t.waistDartLeft,(t.strapInsideCp.x-t.cfCut.x)*i.lacingWidth)),i.hem&&!i.peplum){const e=t.cfWaist.dist(t.cfNeck)*i.hemSize;s.set("hemSize",e),t.cfHem=(p?t.lacingCut:t.cfCut).shiftOutwards(p?t.lacingWaist:t.cfWaist,e),t.cfHemIn=(p?t.lacingWaist:t.cfWaist).shiftTowards(p?t.lacingCut:t.cfCut,e);const o=t.cfHemIn.shift(t.cfWaist.angle(t.waistDartLeft),1.5*t.cfWaist.dist(t.waistDartLeft));t.waistDartLeftHem=r.beamIntersectsCurve(t.cfHemIn,o,t.waistDartLeft,t.waistDartLeftCp,t.shoulderDartTipCpDownInside,t.shoulderDartTip),t.sideWaistHem=t.armhole.shiftOutwards(t.sideWaist,e),t.sideWaistHemIn=t.sideWaist.shiftTowards(t.armhole,e);const a=t.sideWaistHemIn.shift(t.sideWaist.angle(t.waistDartRight),1.5*t.sideWaist.dist(t.waistDartRight));t.waistDartRightHem=r.beamIntersectsCurve(t.sideWaistHemIn,a,t.waistDartRight,t.waistDartRightCp,t.waistUpDartRightCpDown,t.waistUpDartRight),n("mirror",{clone:!1,mirror:[t.cfWaist,t.waistDartLeft],points:["waistDartLeftHem"]}),n("mirror",{clone:!1,mirror:[t.sideWaist,t.waistDartRight],points:["waistDartRightHem"]})}
1return s.set("frontOutsideWaistLength",t.waistDartRight.dist(t.sideWaist)),s.set("frontInsideWaistLength",t.waistDartLeft.dist(p?t.lacingWaist:t.cfWaist)),s.set("frontLength",t.cfNeck.dist(t.cfWaist)),s.set("sideSeamLength",t.armhole.dist(t.sideWaist)),c}},Dm={name:"tristan.frontInside",from:Om,draft:({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,options:l,macro:c,part:p})=>{delete a.waistDartHem,delete a.waistDartRight,delete a.waistDartRightCp,delete a.waistDartCpBottom,delete a.bustDartBottom,delete a.bustDartCpBottom,delete a.bustDartTip,delete a.bustDartTop,delete a.shoulderDartTipCpDownOutside,delete a.ex,delete a.bustB,delete a.shoulder,delete a.shoulderDartShoulder,delete a.shoulderDartOutside,delete a.pitchMax,delete a.armholeCpTarget,delete a.armholePitch,delete a.armholePitchCp1,delete a.armholePitchCp2,delete a.armhole,delete a.armholeCp2,delete a.bustDartCpTop,delete a.bustSide,delete a.bustDartMiddle,delete a.bustDartEdge;const d=1==l.lacing&&"front"==l.lacingLocation;n.cut=(new i).move(a.strapInside).curve(a.strapInsideCp,a.cfCutCp,d?a.lacingCut:a.cfCut),n.insideSeamTemp=(new i).move(a.waistDartLeft).curve(a.waistDartLeftCp,a.shoulderDartTipCpDownInside,a.shoulderDartTip).line(a.shoulderDartInside).join(n.cut).hide(),l.hem&&!l.peplum?(n.insideSeam=(new i).move(a.waistDartLeftHem).line(a.waistDartLeft).join(n.insideSeamTemp),n.hemFold=(new i).move(d?a.lacingWaist:a.cfWaist).line(a.waistDartLeft).addClass("note dashed").addText("hem","center note")):n.insideSeam=(new i).move(d?a.lacingWaist:a.cfWaist).line(a.waistDartLeft).join(n.insideSeamTemp);const h=d?(new i).move(a.lacingCut).line(a.lacingWaist):(new i).move(a.cfCut).line(a.cfWaist);if(l.hem&&!l.peplum&&h.line(a.cfHem),n.seam=n.insideSeam.clone().join(h).close().attr("class","fabric"),t.set("shoulderDartTipNotch",(new i).move(a.waistDartLeft).curve(a.waistDartLeftCp,a.shoulderDartTipCpDownInside,a.shoulderDartTip).length()),d){t.cutlist.addCut({cut:2,from:"fabric"}),n.originalSide=(new i).move(a.lacingCut).line(a.cfCut).line(a.cfWaist).line(a.lacingWaist).setClass("note dashed");const e=a.waistDartLeft.shift(135,10);c("grainline",{from:new o(e.x,a.cfCut.y),to:e,grainline:!0});const l=a.lacingWaist.y-a.lacingCut.y;if(l>
175){const t=Math.floor(l/15),e=l/(t+1);for(let i=0;i<t;i++)a["eyelet"+i]=new o(a.lacingCut.x+10,a.lacingCut.y+i*e+e),r["eyelet"+i]=new s("eyelet",a["eyelet"+i])}}else"front"==l.zipperLocation?(t.cutlist.addCut({cut:2,from:"fabric"}),c("grainline",{from:a.cfCut.shift(315,10),to:a.cfWaist.shift(45,10),grainline:!0})):(c("cutonfold",{from:a.cfCut,to:a.cfWaist,grainline:!0}),t.cutlist.addCut({cut:1,from:"fabric"}));return r.shoulderDartTip=new s("notch",a.shoulderDartTip),a.titleAnchor=a.waistDartLeft.shiftFractionTowards(d?a.lacingCut:a.cfCut,.75),c("title",{at:a.titleAnchor,nr:1,title:"tristan:frontInside"}),a.gridAnchor=a.hps.clone(),e&&("front"==l.zipperLocation?n.sa=n.seam.offset(e).attr("class","fabric sa"):l.hem&&!l.peplum?n.sa=(new i).move(a.waistDartLeftHem).join(n.insideSeam.offset(e)).line(d?a.lacingCut:a.cfCut).attr("class","fabric sa"):n.sa=(new i).move(d?a.lacingWaist:a.cfWaist).join(n.insideSeam.offset(e)).line(d?a.lacingCut:a.cfCut).attr("class","fabric sa")),c("hd",{from:d?a.lacingWaist:a.cfWaist,to:a.shoulderDartInside,y:a.hps.y-25,id:"hpsToDart"}),c("vd",{from:a.cfWaist,to:a.shoulderDartInside,x:-30,id:"waistToDart"}),c("vd",{from:a.cfWaist,to:a.shoulderDartTip,x:-10,id:"waistToDartTip"}),c("hd",{from:d?a.lacingWaist:a.cfWaist,to:a.shoulderDartTip,y:a.cfWaist.y+e+25,id:"middleToDartTip"}),c("vd",{from:a.cfWaist,to:d?a.lacingCut:a.cfCut,x:-20,id:"waistToNeck"}),c("vd",{from:a.cfWaist,to:a.strapInside,x:-40,id:"waistToHps"}),c("hd",{from:d?a.lacingWaist:a.cfWaist,to:a.waistDartLeft,y:a.cfWaist.y+e+15,id:"middleToDart"}),c("hd",{from:d?a.lacingCut:a.cfCut,to:a.strapInside,y:a.strapInside.y-e-15,id:"middleToHps"}),p}},Nm={name:"tristan.frontOutside",from:Om,after:Dm,draft:({store:t,sa:e,points:o,Path:a,paths:i,Snippet:n,snippets:s,options:r,macro:l,part:c})=>{delete o.bustDartTop,delete o.bustSide,delete o.bustDartMiddle,delete o.bustDartBottom,delete o.bustDartCpBottom,delete o.bustB,delete o.bustDartEdge,i.cut=(new a).move(o.armhole).curve(o.armholeCutCp,o.strapOutsideCp,o.strapOutside).hide(),i.armhole=(new a).move(o.armhole).curve(o.armholeCp2,o.armholePitchCp1,o.armholePitch).curve_(o.armholePitchCp2,o.shoulder).hide(),r.hem&&!r.peplum?(i.hem=(new a).move(o.waistDartRight).line(o.waistDartRightHem).line(o.sideWaistHem).line(o.sideWaist).hide(),i.hemFold=(new a).move(o.waistDartRight).line(o.sideWaist).addClass("note dashed").addText("hem","center note")):i.hem=(new a).move(o.waistDartRight).line(o.sideWaist).hide(),i.seamSA=(new a).move(o.sideWaist).line(o.armhole).join(i.cut).line(o.shoulderDartOutside).join(i.princessSeam).line(o.waistDartRight).hide(),i.seam=i.seamSA.clone().join(i.hem).close().unhide().attr("class","fabric"),o.grainTop=o.armhole.shift(225,20),o.grainBottom=o.sideWaistInitial.shift(135,20),l("grainline",{from:o.grainBottom,to:o.grainTop}),t.cutlist.addCut({cut:2,from:"fabric"}),o.snippet=i.princessSeam.shiftAlong(i.princessSeam.length()-t.get("shoulderDartTipNotch")),s.shoulderDartTip=new n("notch",o.snippet),o.titleAnchor=o.waistDartRight.shiftFractionTowards(o.armhole,.3).shiftFractionTowards(o.shoulderDartOutside,.2),l("title",{at:o.titleAnchor,nr:2,title:"tristan:frontOutside"}),o.gridAnchor=o.armholeCpTarget.clone(),o.scaleboxAnchor=o.titleAnchor.shiftFractionTowards(o.sideWaist,.5),o.scaleboxAnchor.x=o.titleAnchor.x,l("miniscale",{at:o.scaleboxAnchor}),e&&(r.hem&&!r.peplum?i.sa=(new a).move(o.sideWaistHem).join((new a).move(o.sideWaistHem).join(i.seamSA).line(o.waistDartRightHem).offset(e)).line(o.waistDartRightHem).attr("class","fabric sa"):i.sa=i.seam.offset(e).attr("class","fabric sa"));const p=i.princessSeam.edge("left");return l("hd",{from:o.waistDartRight,to:o.armholeOutsidePitchCp1,y:o.sideWaistInitial.y+e+35,id:"dartToArmhole"}),l("hd",{from:o.waistDartRight,to:o.sideWaistInitial,y:o.sideWaistInitial.y+e+25,id:"dartToSide"}),l("hd",{from:p,to:o.sideWaistInitial,y:o.sideWaistInitial.y+e+15,id:"leftToSide"}),l("hd",{from:o.shoulderDartOutside,to:o.strapOutside,y:o.shoulderDartOutside.y-e-15,id:"dartToShoulder"}),l("hd",{from:o.snippet,to:o.strapOutside,y:o.shoulderDartOutside.y-e-25,id:"dartPointToShoulder"}),l("hd",{from:p,to:o.strapOutside,y:o.shoulderDartOutside.y-e-35,id:"leftToShoulder"}),l("vd",{from:o.armholeOutsidePitchCp1,to:o.sideWaistInitial,x:o.sideWaistInitial.x+e+15,id:"waistToArmhole"}
1),l("vd",{from:o.waistDartRight,to:p,x:p.x-e-15,id:"waistToLeft"}),l("vd",{from:o.strapOutside,to:o.sideWaistInitial,x:o.sideWaistInitial.x+e+25,id:"waistToShoulder"}),l("vd",{from:o.shoulderDartOutside,to:o.sideWaistInitial,x:o.shoulderDartOutside.x,id:"sideWaistToShoulderDart"}),l("vd",{from:o.waistDartRight,to:o.shoulderDartOutside,x:p.x-e-25,id:"waistToShoulderDart"}),l("vd",{from:o.snippet,to:o.shoulderDartOutside,x:p.x-e-15,id:"shoulderDartToDartPoint"}),c}},Im={name:"tristan.backPoints",from:Yi,after:Om,hide:n.V9.HIDE_ALL,draft:({points:t,Path:e,paths:o,options:a,snippets:i,macro:n,utils:s,store:r,part:l})=>{const c=1==a.lacing&&"back"==a.lacingLocation;for(const d of Object.keys(o))o[d].hide();for(const d in i)delete i[d];delete t.bustDartLeft,delete t.bustDartLeftCp;const p=r.get("strapWidth");if(t.strapInside=t.shoulderDart.shiftTowards(t.hps,p/2),t.strapOutside=t.shoulderDart.shiftTowards(t.shoulder,p/2),t.cbCut=(new e).move(t.cbNeck).curve_(t.cbNeckCp2,t.waistCenter).shiftFractionAlong(a.cutDepthBack),t.cbCutCp2=(new e).move(t.cbNeck).curve_(t.cbNeckCp2,t.waistCenter).split(t.cbCut)[1].ops[1].cp1,t.cutSeamInside=(new e).move(t.dartBottomLeft).curve(t.dartLeftCp,t.shoulderDartCpDown,t.dartTip).curve(t.shoulderDartCpUp,t.shoulderDart,t.shoulderDart).intersectsY(t.cbCut.y)[0],t.cutSeamOutside=(new e).move(t.shoulderDart).curve(t.shoulderDart,t.shoulderDartCpUp,t.dartTip).curve(t.shoulderDartCpDown,t.dartRightCp,t.dartBottomRight).intersectsY(t.cbCut.y)[0],t.cbCutCp=t.cbCut.shiftFractionTowards(t.cutSeamInside,1-a.cutRoundnessBack),t.strapInsideCp=t.strapInside.shiftFractionTowards(t.cutSeamInside.shift(t.cutSeamInside.angle(t.shoulderDart)+90,p/2),1-a.cutRoundnessBack),t.armholeCutCp=t.armhole.shift(180,a.armholeBackIn*t.armhole.dist(t.dartTip)),t.strapOutsideCp=t.strapOutside.shiftFractionTowards(t.dartTip.shift(t.dartTip.angle(t.shoulderDart)-90,p/2),a.armholeFrontDepth),c){let e=(t.strapInsideCp.x-t.cbCut.x)*a.lacingWidth;t.waistCenter.dist(t.dartBottomLeft)<e&&(e=.95*t.waistCenter.dist(t.dartBottomLeft)),t.lacingCut=t.cbCut.shift(0,e),t.lacingWaist=t.waistCenter.shiftTowards(t.dartBottomLeft,e)}if(t.cbCutCp.x<(c?t.lacingCut:t.cbCut).x&&(t.cbCutCp.x=(c?t.lacingCut:t.cbCut).x),a.hem&&!a.peplum){const e=r.get("hemSize"),o=(c?t.lacingWaist:t.waistCenter).shiftTowards(c?t.lacingCut:t.cbCut,e),a=o.shift((c?t.lacingWaist:t.cbWaist).angle(t.dartBottomLeft),1.5*(c?t.lacingWaist:t.cbWaist).dist(t.dartBottomLeft)),i=a.shiftOutwards(o,100);t.waistCenterHem=c?s.beamsIntersect(i,a,t.lacingWaist,t.cbCut):s.beamIntersectsCurve(i,a,t.waistCenter,t.waistCenter,t.cbCutCp2,c?t.lacingCut:t.cbCut),t.dartBottomLeftHem=s.beamIntersectsCurve(i,a,t.dartBottomLeft,t.dartLeftCp,t.shoulderDartCpDown,t.dartTip),n("mirror",{clone:!1,mirror:[c?t.lacingWaist:t.waistCenter,t.dartBottomLeft],points:["waistCenterHem","dartBottomLeftHem"]});const l=t.waistSide.shiftTowards(t.armhole,e),p=l.shift(t.waistSide.angle(t.dartBottomRight),1.5*t.waistSide.dist(t.dartBottomRight)),d=p.shiftOutwards(l,100);t.waistSideHem=s.beamIntersectsCurve(d,p,t.waistSide,t.waistSideCp2,t.armhole,t.armhole),t.dartBottomRightHem=s.beamIntersectsCurve(d,p,t.dartTip,t.shoulderDartCpDown,t.dartRightCp,t.dartBottomRight),n("mirror",{clone:!1,mirror:[t.dartBottomRight,t.waistSide],points:["waistSideHem","dartBottomRightHem"]})}return r.set("backOutsideWaistLength",t.dartBottomRight.dist(t.waistSide)),r.set("backInsideWaistLength",t.dartBottomLeft.dist(t.waistCenter)),l}},Mm={name:"tristan.backInside",from:Im,draft:({sa:t,Point:e,points:o,Path:a,paths:i,Snippet:n,snippets:s,options:r,store:l,macro:c,part:p})=>{const d=1==r.lacing&&"back"==r.lacingLocation;if(c("rmtitle"),l.cutlist.removeCut(),i.cut=(new a).move(o.strapInside).curve(o.strapInsideCp,o.cbCutCp,d?o.lacingCut:o.cbCut),d){i.cut.line(o.lacingWaist),i.originalSide=(new a).move(o.lacingCut).line(o.cbCut).curve_(o.cbCutCp2,o.waistCenter).line(o.lacingWaist).setClass("note dashed");const t=o.lacingWaist.y-o.lacingCut.y;if(t>75){const e=Math.floor(t/15),i=t/(e+1),r=(new a).move(o.lacingCut).line(o.lacingWaist).offset(-10);for(let t=1;t<=e;t++)o["eyelet"+t]=r.shiftAlong(t*i),s["eyelet"+t]=new n("eyelet",o["eyelet"+t])}}else i.cut.curve_(o.cbCutCp2,o.waistCenter);return r.hem&&!r.peplum?(i.hem=(new a).move(d?o.lacingWaist:o.waistCenter).line(o.waistCenterHem).line(o.dartBottomLeftHem).line(o.dartBottomLeft).hide(),i.hemFold=(new a).move(o.waistCenter).line(o.dartBottomLeft).addClass("note dashed").addText("hem","center note")):i.hem=(new a).move(d?o.lacingWaist:o.waistCenter).line(o.dartBottomLeft).hide(),i.seamSA=(new a).move(o.dartBottomLeft).curve(o.dartLeftCp,o.shoulderDartCpDown,o.dartTip).curve(o.shoulderDartCpUp,o.shoulderDart,o.shoulderDart).line(o.strapInside).join(i.cut),i.seam=i.seamSA.clone().join(i.hem).close().attr("class","fabric"),o.grainlineFrom=new e(o.dartBottomLeft.x-10,o.cbCut.y),o.grainlineTo=new e(o.dartBottomLeft.x-10,o.waistSide.y),c("grainline",{from:o.grainlineFrom,to:o.grainlineTo}),l.cutlist.addCut({cut:2,from:"fabric"}),o.titleAnchor=o.dartBottomLeft.shiftFractionTowards(d?o.lacingCut:o.cbCut,.75),c("title",{at:o.titleAnchor,nr:3,title:"tristan:backInside"}),t&&(r.hem&&!r.peplum?i.sa=(new a).move(o.dartBottomLeftHem).join((new a).move(o.dartBottomLeftHem).line(o.dartBottomLeft).join(i.seamSA).line(o.waistCenterHem).offset(t)).line(o.waistCenterHem).attr("class","fabric sa"):i.sa=i.seam.offset(t).attr("class","fabric sa")),c("hd",{from:o.cbCut,to:o.strapInside,y:o.strapInside.y-t-15,id:"cutWi
1dth"}),c("hd",{from:o.cbCut,to:o.shoulderDart,y:o.strapInside.y-t-25,id:"cutToDart"}),c("hd",{from:d?o.lacingWaist:o.waistCenter,to:o.dartBottomLeft,y:o.waistCenter.y+t+15,id:"waistCenterToSide"}),c("hd",{from:o.cbCut,to:o.dartBottomLeft,y:o.waistCenter.y+t+25,id:"waistCutToSide"}),c("vd",{from:d?o.lacingWaist:o.waistCenter,to:o.cbCut,x:o.cbCut.x-t-15,id:"waistToCut"}),c("vd",{from:d?o.lacingWaist:o.waistCenter,to:o.strapInside,x:o.cbCut.x-t-25,id:"waistToStrap"}),c("vd",{from:o.dartBottomLeft,to:o.shoulderDart,x:o.shoulderDart.x+t+15,id:"dartToDart"}),c("vd",{from:o.dartBottomLeft,to:o.strapInside,x:o.shoulderDart.x+t+25,id:"dartToStrap"}),p}},_m={name:"tristan.backOutside",from:Im,draft:({sa:t,Point:e,points:o,Path:a,paths:i,options:n,store:s,macro:r,part:l})=>{s.cutlist.removeCut(),i.cut=(new a).move(o.armhole).curve(o.armholeCutCp,o.strapOutsideCp,o.strapOutside).hide(),i.dart=(new a).move(o.shoulderDart).curve(o.shoulderDart,o.shoulderDartCpUp,o.dartTip).curve(o.shoulderDartCpDown,o.dartRightCp,o.dartBottomRight).hide(),n.hem&&!n.peplum?(i.hem=(new a).move(o.dartBottomRight).line(o.dartBottomRightHem).line(o.waistSideHem).line(o.waistSide).hide(),i.hemFold=(new a).move(o.dartBottomRight).line(o.waistSide).addClass("note dashed").addText("hem","center note")):i.hem=(new a).move(o.dartBottomRight).line(o.waistSide).hide(),i.seamSA=(new a).move(o.waistSide).curve_(o.waistSideCp2,o.armhole).join(i.cut).join(i.dart),i.seam=i.seamSA.clone().join(i.hem).close().attr("class","fabric"),o.grainlineTo=new e(1.1*o.dartBottomRight.x,.95*o.dartBottomRight.y),o.grainlineFrom=new e(o.grainlineTo.x,o.dartTip.y),r("grainline",{from:o.grainlineFrom,to:o.grainlineTo}),s.cutlist.removeCut("fabric"),s.cutlist.addCut({cut:2,from:"fabric"}),o.titleAnchor=o.dartBottomRight.shiftFractionTowards(o.armholeCpTarget,.5),r("title",{at:o.titleAnchor,nr:4,title:"tristan:backOutside"}),t&&(n.hem&&!n.peplum?i.sa=(new a).move(o.waistSideHem).join((new a).move(o.waistSideHem).line(o.waistSide).join(i.seamSA).line(o.dartBottomRightHem).offset(t)).line(o.dartBottomRightHem).attr("class","fabric sa"):i.sa=i.seam.offset(t).attr("class","fabric sa"));const c=i.dart.edge("left");return r("hd",{from:c,to:o.shoulderDart,y:o.shoulderDart.y-t-15,id:"leftToDart"}),r("hd",{from:c,to:o.strapOutside,y:o.shoulderDart.y-t-25,id:"leftToStrap"}),r("hd",{from:c,to:o.armhole,y:o.shoulderDart.y-t-35,id:"leftToArmhole"}),r("hd",{from:c,to:o.waistSide,y:o.dartBottomRight.y+t+25,id:"leftToWaistSide"}),r("hd",{from:o.dartBottomRight,to:o.waistSide,y:o.dartBottomRight.y+t+15,id:"dartToWaistSide"}),r("vd",{from:o.dartBottomRight,to:c,x:c.x-t-15,id:"leftToDart"}),r("vd",{from:o.dartBottomRight,to:o.shoulderDart,x:c.x-t-25,id:"dartToDart"}),r("vd",{from:o.dartBottomRight,to:o.strapOutside,x:o.armhole.x+t+35,id:"dartToStrap"}),r("vd",{from:o.waistSide,to:o.strapOutside,x:o.armhole.x+t+25,id:"sideToStrap"}),r("vd",{from:o.waistSide,to:o.armhole,x:o.armhole.x+t+15,id:"sideToArmhole"}),l}},jm=({points:t,paths:e,Path:o,options:a,macro:i,store:n,sa:s,type:r,radius:l,width:c,ratio:p})=>{const d=r==a.zipperLocation||1==a.lacing&&r==a.lacingLocation;i("ringsector",{id:r+"Peblum",angle:a.peplumFullness/2*p*(d?.5:1),insideRadius:l,outsideRadius:l+c,rotate:!1}),i("cutOnFold",{id:r,from:t["__macro_ringsector_"+r+"Peblum_in2Flipped"],to:t["__macro_ringsector_"+r+"Peblum_ex2Flipped"]}),t[r+"TitleAnchor"]=t["__macro_ringsector_"+r+"Peblum_in2FlippedRotated"].shiftFractionTowards(t["__macro_ringsector_"+r+"Peblum_ex2FlippedRotated"],.5),n.cutlist.addCut({cut:d?2:1,from:"fabric",onFold:!0}),i("title",{nr:10+("front"==r?0:1),at:t[r+"TitleAnchor"],id:r+"Peplum",title:"tristan:"+r+"Peplum",align:"center",scale:2*a.peplumSize}),s&&(e[r+"SA"]=(new o).line(t["__macro_ringsector_"+r+"Peblum_ex2Flipped"]).join((new o).move(t["__macro_ringsector_"+r+"Peblum_ex2Flipped"]).curve(t["__macro_ringsector_"+r+"Peblum_ex2cFlipped"],t["__macro_ringsector_"+r+"Peblum_ex1cFlipped"],t["__macro_ringsector_"+r+"Peblum_ex1"]).curve(t["__macro_ringsector_"+r+"Peblum_ex1c"],t["__macro_ringsector_"+r+"Peblum_ex2c"],t["__macro_ringsector_"+r+"Peblum_ex2"]).line(t["__macro_ringsector_"+r+"Peblum_in2"]).curve(t["__macro_ringsector_"+r+"Peblum_in2c"],t["__macro_ringsector_"+r+"Peblum_in1c"],t["__macro_ringsector_"+r+"Peblum_in1"]).curve(t["__macro_ringsector_"+r+"Peblum_in1cFlipped"],t["__macro_ringsector_"+r+"Peblum_in2cFlipped"],t["__macro_ringsector_"+r+"Peblum_in2Flipped"]).offset(s)).line(t["__macro_ringsector_"+r+"Peblum_in2Flipped"]).attr("class","fabric sa")),i("hd",{id:"topWidth",from:t["__macro_ringsector_"+r+"Peblum_in2Flipped"],to:t["__macro_ringsector_"+r+"Peblum_in1Rotated"],y:t["__macro_ringsector_"+r+"Peblum_in1Rotated"].y-15-s}),i("hd",{id:"bottomWidth",from:t["__macro_ringsector_"+r+"Peblum_ex2Flipped"],to:t["__macro_ringsector_"+r+"Peblum_ex1Rotated"],y:t["__macro_ringsector_"+r+"Peblum_ex1Rotated"].y+15+s}),i("ld",{id:"width",from:t["__macro_ringsector_"+r+"Peblum_in1Rotated"],to:t["__macro_ringsector_"+r+"Peblum_ex1Rotated"],d:15+s})},Gm={name:"tristan.peplumFront",after:Im,options:{peplum:{bool:!1,menu:"options"},peplumSize:{pct:10,min:5,max:250,menu:(t,e)=>!1!==e.peplum&&"peplum"},peplumFullness:{deg:180,min:180,max:360,menu:(t,e)=>!1!==e.peplum&&"peplum"}},plugins:[Dp.IQ],draft:({sa:t,Point:e,points:o,paths:a,Path:i,options:n,macro:s,store:r,units:l,part:c})=>{if(0==n.peplum)return c.hide();const p=r.get("backInsideWaistLength"),d=r.get("backOutsideWaistLength"),h=r.get("frontInsideWaistLength"),m=r.get("frontOutsideWaistLength"),f=p+d+h+m,u=f/Math.PI*(360/n.peplumFullness)/2,g=n.peplumSize*r.get("frontLength"),b=(h+m)/f;return r.set("peplumRadius",u),r.set("peplumWidth",g),r.set("peplumratio",b),r.flag.note({msg:"tristan:peplumWidth",replace:{peplumWidth:l(g)}}),jm({Point:e,points:o,paths:a,Path:i,options:n,macro:s,store:r,sa:t,type:"front",radius:u,width:g,offset:0,ratio:b}),c}},Um={name:"tristan.peplumBack",after:Gm,plugins:[Dp.IQ],draft:({points:t,paths:e,Path:o,options:a,store:i,macro:n,sa:s,part:r})=>{if(0==a.peplum)return r.hide();const l=i.get("peplumRadius"),c=i.get("peplumWidth"),p=i.get("peplumratio");return jm({points:t,paths:e,Path:o,options:a,macro:n,store:i,sa:s,type:"back",radius:l,width:c,ratio:1-p}),r}},Ym=new n.pT({data:Am,parts:[Om,Dm,Nm,Im,Mm,_m,Gm,Um]}),$m=(0,n.D4)([Si,Hm],{p:{drop:["back","front"]},o:{keep:[...Object.keys(Om.options),...Object.keys(Gm.options),"armholeDartCurved","armholeDartCurvePoint","armholeDartCurveWidth","chestEase","frontShoulderWidth","fullChestEaseReduction","highBustWidth","shoulderDartCurvature","shoulderToShoulderEase","waistdartposition","waistEase"]},s:{drop:[]}}),zm=JSON.parse('{"id":"uma","name":"Uma undies","code":"Joost De Cock","description":"A FreeSewing pattern for a basic, highly-customizable underwear pattern","design":"Joost De Cock","difficulty":2,"tags":["bottoms","underwear"],"techniques":["elastic","curved-seam"],"version":"4.6.0","pkg":"@freesewing/uma","collection":true}'),Jm={en:JSON.parse('{"t":"Uma undies","d":"Uma is a basic, highly-customizable underwear pattern.","p":{"back":"Back","elastic":"Elastic","front":"Front","gusset":"Gusset","base":"Base"},"s":{"legElasticLength.t":"You need 2x {{{ length }}} elastic to finish the legs","legElasticLength.d":"You need two times {{{ length }}} of elastic to finish the legs.\\n\\nFold-over elastic is recommended for this.","waistbandElasticLength.t":"You need 1
1x {{{ length }}} elastic to finish the waistband","waistbandElasticLength.d":"You need {{{ length }}} of elastic to finish the leg opening.\\n\\nEither fold-over or regular elastic can be used for this."},"o":{"bulge":{"t":"Bulge","d":"Increase the bugle angle to create more room in the front pouch. Doesn\'t kick in below 2 degrees."},"gussetWidth":{"t":"Gusset width","d":"Controls the width of the gusset"},"gussetLength":{"t":"Gusset length","d":"Controls the length of the gusset"},"gussetPosition":{"t":"Gusset position","d":"This option allows you to shift the gusset more to the front or back. It is ignored when bulge is active"},"xStretch":{"t":"Horizontal fabric stretch","d":"Adjust this for more or less stretchy fabric in the horizontal direction"},"yStretch":{"t":"Vertical fabric stretch","d":"Adjust this for more or less stretchy fabric in the vertical direction"},"rise":{"t":"Rise","d":"Controls the height of the waist"},"legRise":{"t":"Leg rise","d":"Controls how high the leg is cut out"},"frontDip":{"t":"Front waist dip","d":"Controls how much the front waist curves (revealing more or less skin)"},"backDip":{"t":"Back waist dip","d":"Controls how much the back waist curves (revealing more or less skin)"},"frontExposure":{"t":"Front exposure","d":"Controls the amount of exposed skin on the front"},"backExposure":{"t":"Back exposure","d":"Controls the amount of exposed skin on the back"}}}')};const Km={name:"uma.base",measurements:["waist","seat","waistToSeat","waistToUpperLeg"],options:{xStretch:{pct:15,min:0,max:30,menu:"fit"},yStretch:{pct:5,min:0,max:15,menu:"fit"},gussetWidth:{pct:15,min:5,max:24,menu:"fit",toAbs:(t,{measurements:e},o)=>e.waistToUpperLeg*o.gussetWidth*2*(0,n.VT)(o.xStretch)},gussetLength:{pct:12.7,min:10,max:16,menu:"fit"},gussetPosition:{pct:70,min:5,max:95,menu:"fit"},bulge:{deg:0,min:0,max:30,menu:"fit"},rise:{pct:50,min:30,max:100,menu:"style"},legRise:{pct:54,min:5,max:95,menu:"style"},frontDip:{pct:10,min:0,max:25,menu:"style"},frontExposure:{pct:70,min:5,max:100,menu:"style"},backDip:{pct:-5,min:-15,max:10,menu:"style"},backExposure:{pct:30,min:0,max:115,menu:"style"}},draft:function({options:t,Point:e,Path:o,points:a,paths:i,measurements:n,store:s,utils:r,expand:l,units:c,part:p}){const d=r.stretchToScale(t.xStretch),h=r.stretchToScale(t.yStretch),m=n.seat*t.gussetLength*h,f=t.backExposure<.25?.25:t.backExposure;a.cfWaist=new e(0,0),a.sideWaist=new e(n.waist/4*d,0),a.cfSeat=new e(0,n.waistToSeat*h),a.sideSeat=new e(n.seat/4*d,a.cfSeat.y),a.cfMiddle=new e(0,h*n.waistToUpperLeg+m/2),a.sideMiddle=new e(n.waistToUpperLeg*t.gussetWidth*d,a.cfMiddle.y),a.cfMidGusset=a.cfMiddle.shift(-90,m/2).shift(90,m*t.gussetPosition),a.cfFrontGusset=a.cfMidGusset.shift(90,m/2),a.cfBackGusset=a.cfMidGusset.shift(-90,m/2),a.cfWaistband=a.cfSeat.shiftFractionTowards(a.cfWaist,t.rise),a.sideWaistband=r.beamIntersectsY(a.sideWaist,a.sideSeat,a.cfWaistband.y),a.cfWaistbandDip=a.cfWaistband.shift(-90,n.waistToUpperLeg*t.frontDip),a.cfWaistbandDipCp=new e(a.sideWaistband.x/2,a.cfWaistbandDip.y),a.sideLeg=a.sideSeat.shiftFractionTowards(a.sideWaistband,t.legRise);const u=a.sideWaistband.angle(a.cfWaistbandDipCp);a.sideLegCp=a.sideLeg.shift(u,a.sideMiddle.dx(a.sideLeg)/3),a.gussetFrontCp=a.sideMiddle.shift(90,a.sideLegCp.dy(a.sideMiddle)*t.frontExposure);for(const w of["cfWaist","cfWaistband","sideWaistband","sideLeg"])a[`${w}Back`]=a[w].flipY(a.cfMiddle);a.cfWaistbandDipBack=a.cfWaistbandBack.shift(90,n.waistToUpperLeg*t.backDip),a.cfWaistbandDipCpBack=new e(a.sideWaistbandBack.x/2,a.cfWaistbandDipBack.y);const g=a.sideWaistbandBack.angle(a.cfWaistbandDipCpBack);a.sideLegCpBack=a.sideLegBack.shift(g,a.sideMiddle.dx(a.sideLegBack)*f);const b=f>.8?1-4*(f-.8):1;if(a.gussetBackCp=a.sideMiddle.shift(90,a.sideLegCpBack.dy(a.sideMiddle)*f).shift(180,a.sideMiddle.x*(1-b)),1!==b&&(a.sideMiddle=r.beamIntersectsY(a.gussetFrontCp,a.gussetBackCp,a.sideMiddle.y)),s.set("bulge",t.bulge>=2),s.get("bulge")){if(s.set("gusset",!1),a.backGussetSplit=a.sideMiddle.copy(),i.frontAndGussetCurve=(new o).move(a.sideMiddle).curve(a.gussetFrontCp,a.sideLegCp,a.sideLeg).hide(),i.frontAndGusset=(new o).move(a.cfWaistbandDip).line(a.cfMiddle).line(a.sideMiddle).join(i.frontAndGussetCurve).line(a.sideWaistband).curve_(a.cfWaistbandDipCp,a.cfWaistbandDip).close().addClass("lining"),t.backExposure<.25){i.backCurve=(new o).move(a.sideMiddle).curve(a.gussetBackCp,a.sideLegCpBack,a.sideLegBack).addClass("stroke-xl lining").hide(),a.backCurveGussetSplit=i.backCurve.shiftFractionAlong(.15),a.backCurveBackSplit=i.backCurve.reverse().shiftFractionAlong(.05);const e=a.backCurveGussetSplit.angle(a.backCurveBackSplit),n=a.backCurveGussetSplit.dist(a.backCurveBackSplit),s=2*a.sideMiddle.x*(.25-t.backExposure);a.backCurveBump=a.backCurveGussetSplit.shiftFractionTowards(a.backCurveBackSplit,.5).shift(e+90,s),a.backCurveBumpCp1=a.backCurveBump.shift(e,n/4),a.backCurveBumpCp2=a.backCurveBump.shift(e,n/-4);let r=i.backCurve.split(a.backCurveBackSplit);i.backCurveBackRest=r[0].reverse().hide(),i.backCurveBack=r[1].hide(),r=i.backCurve.split(a.backCurveGussetSplit),i.backCurveGusset=r[0].hide(),i.backCurveGussetRest=r[1].hide(),a.backCurveGussetCp=a.backCurveGussetSplit.shiftTowards(i.backCurveBackRest.ops[1].cp1,s),a.backCurveBackCp=a.backCurveBackSplit.shiftTowards(i.backCurveGussetRest.ops[1].cp1,s),i.bump=(new o).move(a.backCurveBackSplit).curve(a.backCurveBackCp,a.backCurveBumpCp1,a.backCurveBump).smurve(a.backCurveGussetCp,a.backCurveGussetSplit).hide(),i.back=(new o).move(a.cfWaistbandDipBack).curve_(a.cfWaistbandDipCpBack,a.sideWaistbandBack).line(a.sideLegBack).join(i.backCurveBack.reverse()).join(i.bump).join(i.backCurveGusset.reverse()).line(a.cfMiddle).addClass("note"),i.legElastic=(new o).move(a.sideLegBack).join(i.backCurveBack.reverse()).join(i.bump).join(i.backCurveGusset.reverse()).hide()}else i.back=(new o).move(a.cfWaistbandDipBack).curve_(a.cfWaistbandDipCpBack,a.sideWaistbandBack).line(a.sideLegBack).curve(a.sideLegCpBack,a.gussetBackCp,a.sideMiddle).line(a.cfMiddle).addClass("note"),i.legElastic=(new o).move(a.sideLegBack).curve(a.sideLegCpBack,a.gussetBackCp,a.sideMiddle).addClass("stroke-2xl lining").hide();if(s.get("bulge")){for(const e of["gussetFrontCp","backGussetSplit","cfMiddle"])a[`${e}Bulge`]=a[e].rotate(t.bulge,a.cfWaistbandDip);a.bulgeCp=a.cfWaistbandDip.shift(-90,a.cfWaistbandDip.dy(a.cfMiddleBulge)/1.5),i.bulge=(new o).move(a.cfWaistbandDip).curve_(a.bulgeCp,a.cfMiddleBulge).line(a.backGussetSplitBulge).curve(a.gussetFrontCpBulge,a.sideLegCp,a.sideLeg).line(a.sideWaistband).curve_(a.cfWaistbandDipCp,a.cfWaistbandDip).line(a.cfWaistbandDip).close(),i.legElastic.move(a.backGussetSplitBulge).curve(a.gussetFrontCpBulge,a.sideLegCp,a.sideLeg).hide()}a.backGussetSplit=a.sideMiddle.copy(),a.backGussetSplitCpTop=a.gussetBackCp.copy(),a.backGussetSplitCpBottom=a.sideLegCpBack.copy()}else{s.set("gusset",!0),a.backGussetSplit=r.curveIntersectsY(a.sideLegBack,a.sideLegCpBack,a.gussetBackCp,a.sideMiddle,a.cfBackGusset.y);const e=(new o).move(a.sideLegBack).curve(a.sideLegCpBack,a.gussetBackCp,a.sideMiddle).split(a.backGussetSplit);a.backGussetSplitCpBottom=e[0].ops[1].cp1,a.backGussetSplitCpTop=e[0].ops[1].cp2,a.frontGussetSplit=r.curveIntersectsY(a.sideMiddle,a.gussetFrontCp,a.sideLegCp,a.sideLeg,a.cfFrontGusset.y);const n=(new o).move(a.sideMiddle).curve(a.gussetFrontCp,a.sideLegCp,a.sideLeg).split(a.frontGussetSplit);if(a.frontGussetSplitCpBottom=n[1].ops[1].cp1,a.frontGussetSplitCpTop=n[1].ops[1].cp2,a.gussetFrontSplitCpTop=n[0].ops[1].cp2,a.gussetFrontSplitCpBottom=n[0].ops[1].cp1,a.gussetBackSplitCpTop=e[1].ops[1].cp2,a.gussetBackSplitCpBottom=e[1].ops[1].cp1,i.gusset=(new o).move(a.backGussetSplit).join(e[1]).join(n[0]).line(a.cfFrontGusset).line(a.cfBackGusset).line(a.backGussetSplit).close().addClass("lining"),i.front=(new o).move(a.cfWaistbandDip).line(a.cfFrontGusset).line(a.frontGussetSplit).join(n[1]).line(a.sideWaistband).curve_(a.cfWaistbandDipCp,a.cfWaistbandDip).close().addClass("note"),t.backExposure<.25){i.backCurve=(new o).move(a.backGussetSplit).curve(a.backGussetSplitCpTop,a.backGussetSplitCpBottom,a.sideLegBack).addClass("stroke-xl lining").hide();const e=.05;a.backCurveGussetSplit=i.backCurve.shiftFractionAlong(e),a.backCurveBackSplit=i.backCurve.reverse().shiftFractionAlong(e);const n=a.backCurveGussetSplit.angle(a.backCurveBackSplit),s=a.backCurveGussetSplit.dist(a.backCurveBackSplit),r=2*a.sideMiddle.x*(.25-t.backExposure);a.backCurveBump=a.backCurveGussetSplit.shiftFractionTowards(a.backCurveBackSplit,.5).shift(n+90,r),a.backCurveBumpCp1=a.backCurveBump.shift(n,s/4),a.backCurveBumpCp2=a.backCurveBump.shift(n,s/-4);let l=i.backCurve.split(a.backCurveBackSplit);i.backCurveBackRest=l[0].hide(),i.backCurveBack=l[1].hide(),l=i.backCurve.split(a.backCurveGussetSplit),i.backCurveGusset=l[0].hide(),i.backCurveGussetRest=l[1].hide(),a.backCurveGussetCp=a.backCurveGussetSplit.shiftTowards(i.backCurveBackRest.ops[1].cp1,r),a.backCurveBackCp=a.backCurveBackSplit.shiftTowards(i.backCurveGussetRest.ops[1].cp1,r),i.bump=(new o).move(a.backCurveBackSplit).curve(a.backCurveBackCp,a.backCurveBumpCp1,a.backCurveBump).smurve(a.backCurveGussetCp,a.backCurveGussetSplit).hide(),i.back=(new o).move(a.cfWaistbandDipBack).curve_(a.cfWaistbandDipCpBack,a.sideWaistbandBack).line(a.sideLegBack).join(i.backCurveBack.reverse()).join(i.bump).join(i.backCurveGusset.reverse()).line(a.cfBackGusset).addClass("note"),i.legElastic=(new o).move(a.sideLegBack).join(i.backCurveBack.reverse()).join(i.bump).join(i.backCurveGusset.reverse()).curve(a.gussetBackSplitCpBottom,a.gussetBackSplitCpTop,a.sideMiddle).curve(a.gussetFrontCp,a.sideLegCp,a.sideLeg).hide()}else i.back=(new o).move(a.cfWaistbandDipBack).curve_(a.cfWaistbandDipCpBack,a.sideWaistbandBack).line(a.sideLegBack).join(e[0]).line(a.cfBackGusset).addClass("note"),i.legElastic=(new o).move(a.sideLegBack).curve(a.sideLegCpBack,a.gussetBackCp,a.sideMiddle).curve(a.gussetFrontCp,a.sideLegCp,a.sideLeg).hide()}return s.set("legElasticLength",i.legElastic.hide().length()),s.set("waistbandElasticLength",2*((new o).move(a.cfWaistbandDip).curve_(a.cfWaistbandDipCp,a.sideWaistband).length()+(new o).move(a.cfWaistbandDipBack).curve_(a.cfWaistbandDipCpBack,a.sideWaistbandBack).length())),l?s.flag.preset("expandIsOn"):s.flag.preset("expandIsOff"),s.flag.note({msg:"uma:legElasticLength",replace:{length:c(s.get("legElasticLength"))}}),s.flag.note({msg:"uma:waistbandElasticLength",replace:{length:c(s.get("waistbandElasticLength"))}}),p},hide:{self:!0}},Vm={name:"uma.back",from:Km,draft:function({Point:t,Path:e,points:o,paths:a,store:i,sa:n,Snippet:s,snippets:r,expand:l,macro:c,part:p}){const d=["cfWaistbandDipCpBack","sideWaistbandBack","sideLegBack","backGussetSplitCpTop","backGussetSplitCpBottom","backGussetSplit"];if(l){for(const t of d)o[`${t}Flipped`]=o[t].flipX().flipY(),o[t]=o[t].flipY();o.cfWaistbandDipBack=o.cfWaistbandDipBack.flipY(),o.cfBackGusset=o.cfBackGusset.flipY(),c("mirror",{mirror:[new t(0,0),new t(100,0)],paths:["back"],clone:!0}),c("mirror",{mirror:[new t(0,0),new t(0,100)],paths:["mirroredBack"],clone:!0}),a.seam=a.mirroredBack.join(a.mirroredMirroredBack.reverse()),a.mirroredBack.hide(),a.mirroredMirroredBack.hide(),n&&(a.sa=a.seam.offset(-1*n).addClass("fabric sa")),i.cutlist.setCut({cut:1,from:"fabric"}),c("grainline",{from:new t(0,o.backGussetSplit.y),to:o.cfWaistbandDipBack}),c("hd",{id:"wAtBottom",from:o.backGussetSplitFlipped,to:o.backGussetSplit,y:o.backGussetSplit.y+n+15}),c("hd",{id:"wAtLeg",from:o.sideLegBackFlipped,to:o.sideLegBack,y:o.backGussetSplit.y+n+30}),c("hd",{id:"wAtWaistband",from:o.sideWaistbandBackFlipped,to:o.sideWaistbandBack,y:o.sideWaistbandBack.y-n-15})}else{for(const t of d)o[t]=o[t].flipY();o.cfWaistbandDipBack=o.cfWaistbandDipBack.flipY(),o.cfBackGusset=o.cfBackGusset.flipY(),c("mirror",{mirror:[new t(0,0),new t(100,0)],paths:["back"],clone:!0}),a.mirroredBack.hide(),a.saBase=a.mirroredBack.reverse().hide(),a.seam=a.saBase.clone().line(o.cfWaistbandDipBack).close().unhide().addClass("fabric"),n&&(a.sa=(new e).move(o.cfBackGusset).join(a.saBase.offset(n)).line(a.saBase.end()).addClass("fabric sa")),i.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),c("cutonfold",{from:o.cfWaistbandDipBack,to:o.cfBackGusset,grainline:!0}),c("hd",{id:"wAtBottom",from:o.cfBackGusset,to:o.backGussetSplit,y:o.cfBackGusset.y+n+15}),c("hd",{id:"wAtLeg",from:o.cfBackGusset,to:o.sideLegBack,y:o.cfBackGusset.y+n+30}),c("hd",{id:"wAtTop",from:o.cfWaistbandDipBack,to:o.sideWaistbandBack,y:o.sideWaistbandBack.y-n-15})}return c("vd",{id:"hToLeg",from:o.backGussetSplit,to:o.sideLegBack,x:o.sideLegBack.x+n+15}),c("vd",{id:"hToCfWaistband",from:o.backGussetSplit,to:o.cfWaistbandDipBack,x:o.sideLegBack.x+n+30}),c("vd",{id:"hToSideWaistband",from:o.backGussetSplit,to:o.sideWaistbandBack,x:o.sideLegBack.x+n+45}),delete a.back,delete a.front,delete a.gusset,delete a.frontAndGusset,delete a.bulge,o.title=o.cfWaistbandDipBack.shiftFractionTowards(o.backGussetSplitCpTop,.5),c("title",{at:o.title,nr:3,title:"back"}),o.logo=o.title.shift(-90,80),r.logo=new s("logo",o.logo),p}};const Xm={name:"uma.front",from:Km,draft:function({Point:t,Path:e,points:o,paths:a,store:i,sa:n,Snippet:s,snippets:r,expand:l,macro:c,part:p}){if(i.get("bulge"))a.seam=a.bulge.clone().setClass("fabric"),delete a.bulge,delete a.back,delete a.frontAndGusset,n&&(a.sa=a.seam.offset(n).addClass("fabric sa")),i.cutlist.setCut([{cut:2,from:"fabric"},{cut:2,from:"lining"}]),o.title=new t(o.sideLegCp.x/2,o.sideLegCp.y),o.logo=o.title.shift(210,
160),c("grainline",{from:new t(o.logo.x,o.backGussetSplitBulge.y),to:new t(o.logo.x,o.cfWaistbandDip.y)}),c("hd",{id:"wAtTop",from:o.cfWaistbandDip,to:o.sideWaistband,y:o.sideWaistband.y-n-15}),c("hd",{id:"wFull",from:o.cfWaistbandDip,to:o.sideLeg,y:o.sideWaistband.y-n-30}),c("hd",{id:"wWedge",from:o.cfWaistbandDip,to:o.cfMiddleBulge,y:o.cfMiddleBulge.y+n+15}),c("hd",{id:"wTusk",from:o.cfWaistbandDip,to:o.backGussetSplitBulge,y:o.cfMiddleBulge.y+n+30}),c("vd",{id:"hToCf",from:o.cfMiddleBulge,to:o.cfWaistbandDip,x:o.cfWaistbandDip.x-n-15}),c("vd",{id:"hFull",from:o.cfMiddleBulge,to:o.sideWaistband,x:o.cfWaistbandDip.x-n-30}),c("vd",{id:"hSide",from:o.sideLeg,to:o.sideWaistband,x:o.sideWaistband.x+n+15});else{if(l){for(const t of["cfWaistbandDipCp","sideWaistband","sideLeg","sideLegCp","frontGussetSplitCpBottom","frontGussetSplitCpTop","frontGussetSplit"])o[`${t}Flipped`]=o[t].flipX();a.seam=(new e).move(o.cfWaistbandDip).curve_(o.cfWaistbandDipCpFlipped,o.sideWaistbandFlipped).line(o.sideLegFlipped).curve(o.frontGussetSplitCpTopFlipped,o.frontGussetSplitCpBottomFlipped,o.frontGussetSplitFlipped).line(o.frontGussetSplit).curve(o.frontGussetSplitCpBottom,o.frontGussetSplitCpTop,o.sideLeg).line(o.sideWaistband)._curve(o.cfWaistbandDipCp,o.cfWaistbandDip).close().addClass("fabric"),n&&(a.sa=a.seam.offset(n).addClass("fabric sa")),i.cutlist.setCut({cut:1,from:"fabric"}),o.title=o.cfSeat.copy(),o.logo=o.title.shift(30,60),c("grainline",{from:o.cfFrontGusset,to:o.cfWaistbandDip}),c("hd",{id:"wAtBottom",from:o.frontGussetSplitFlipped,to:o.frontGussetSplit,y:o.frontGussetSplit.y+n+15}),c("hd",{id:"wAtLeg",from:o.sideLegFlipped,to:o.sideLeg,y:o.frontGussetSplit.y+n+30}),c("hd",{id:"wAtWaistband",from:o.sideWaistbandFlipped,to:o.sideWaistband,y:o.sideWaistband.y-n-15})}else a.saBase=(new e).move(o.cfFrontGusset).line(o.frontGussetSplit).curve(o.frontGussetSplitCpBottom,o.frontGussetSplitCpTop,o.sideLeg).line(o.sideWaistband)._curve(o.cfWaistbandDipCp,o.cfWaistbandDip).hide(),a.seam=a.saBase.clone().line(o.cfFrontGusset).close().unhide().addClass("fabric"),n&&(a.sa=(new e).move(o.cfFrontGusset).join(a.saBase.offset(n)).line(a.saBase.end()).setClass("fabric sa").unhide()),i.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),o.title=new t(o.frontGussetSplit.x/3,o.cfSeat.y),o.logo=o.title.shift(30,60),c("cutonfold",{to:o.cfFrontGusset,from:o.cfWaistbandDip,grainline:!0}),c("hd",{id:"wAtBottom",from:o.cfFrontGusset,to:o.frontGussetSplit,y:o.frontGussetSplit.y+n+15}),c("hd",{id:"wAtLeg",from:o.cfFrontGusset,to:o.sideLeg,y:o.frontGussetSplit.y+n+30}),c("hd",{id:"wAtWaistband",from:o.cfWaistbandDip,to:o.sideWaistband,y:o.sideWaistband.y-n-15});c("vd",{id:"hToSideLeg",from:o.frontGussetSplit,to:o.sideLeg,x:o.sideLeg.x+n+15}),c("vd",{id:"hToWaistbandDip",from:o.frontGussetSplit,to:o.cfWaistbandDip,x:o.sideLeg.x+n+30}),c("vd",{id:"hFull",from:o.frontGussetSplit,to:o.sideWaistband,x:o.sideLeg.x+n+45})}return delete a.back,delete a.front,delete a.gusset,c("title",{at:o.title,nr:1,title:"front"}),r.logo=new s("logo",o.logo),p}};const Qm={name:"uma.gusset",from:Km,draft:function({Path:t,points:e,paths:o,store:a,sa:i,expand:n,macro:s,part:r}){if(a.get("bulge"))return r.hide();{if(n){for(const t of["frontGussetSplit","gussetFrontSplitCpBottom","gussetFrontSplitCpTop","sideMiddle","gussetBackSplitCpTop","gussetBackSplitCpBottom","backGussetSplit"])e[`${t}Flipped`]=e[t].flipX();o.seam=(new t).move(e.cfFrontGusset).line(e.frontGussetSplitFlipped).curve(e.gussetFrontSplitCpTopFlipped,e.gussetFrontSplitCpBottomFlipped,e.sideMiddleFlipped).curve(e.gussetBackSplitCpTopFlipped,e.gussetBackSplitCpBottomFlipped,e.backGussetSplitFlipped).line(e.backGussetSplit).curve(e.gussetBackSplitCpBottom,e.gussetBackSplitCpTop,e.sideMiddle).curve(e.gussetFrontSplitCpBottom,e.gussetFrontSplitCpTop,e.frontGussetSplit).line(e.cfFrontGusset).close().addClass("fabric"),i&&(o.sa=o.seam.offset(i).addClass("fabric sa")),a.cutlist.setCut({cut:2,from:"fabric"}),e.title=e.cfFrontGusset.shiftFractionTowards(e.cfMiddle,.5),s("grainline",{from:e.cfBackGusset,to:e.cfFrontGusset}),s("hd",{id:"wAtMiddle",from:e.sideMiddleFlipped,to:e.sideMiddle}),s("hd",{id:"wAtTop",from:e.frontGussetSplitFlipped,to:e.frontGussetSplit,y:e.frontGussetSplit.y-i-15}),s("hd",{id:"wAtBottom",from:e.backGussetSplitFlipped,to:e.backGussetSplit,y:e.backGussetSplit.y+i+15})}else o.saBase=(new t).move(e.cfBackGusset).line(e.backGussetSplit).curve(e.gussetBackSplitCpBottom,e.gussetBackSplitCpTop,e.sideMiddle).curve(e.gussetFrontSplitCpBottom,e.gussetFrontSplitCpTop,e.frontGussetSplit).line(e.cfFrontGusset),o.seam=o.saBase.clone().line(e.cfBackGusset).close().unhide().addClass("fabric"),i&&(o.sa=(new t).move(e.cfBackGusset).join(o.saBase.offset(i)).line(o.saBase.end()).addClass("fabric sa")),a.cutlist.setCut({cut:2,from:"fabric",onFold:!0}),e.title=e.cfFrontGusset.shiftFractionTowards(e.sideMiddle,.5),s("cutonfold",{to:e.cfBackGusset,from:e.cfFrontGusset,grainline:!0}),s("hd",{id:"wAtMiddle",from:e.cfMiddle,to:e.sideMiddle}),s("hd",{id:"wAtBottom",from:e.cfBackGusset,to:e.backGussetSplit,y:e.backGussetSplit.y+i+15}),s("hd",{id:"wAtTop",from:e.cfFrontGusset,to:e.frontGussetSplit,y:e.frontGussetSplit.y-i-15});const r=Math.max(e.frontGussetSplit.x,e.backGussetSplit.x);s("vd",{id:"hToMiddle",from:e.backGussetSplit,to:e.sideMiddle,x:r+i+15}),s("vd",{id:"hFromMiddle",from:e.sideMiddle,to:e.frontGussetSplit,x:r+i+15}),s("vd",{id:"hFull",from:e.backGussetSplit,to:e.frontGussetSplit,x:r+i+30})}return delete o.back,delete o.front,delete o.gusset,s("title",{at:e.title,nr:2,t
1itle:"gusset",scale:.666}),r}};const qm=new n.pT({data:zm,parts:[Km,Vm,Xm,Qm]}),Zm={en:JSON.parse('{"t":"Umbra undies","d":"Umbra is a basic, highly-customizable underwear pattern.","p":{"back":"Back","elastic":"Elastic","front":"Front","base":"Base"},"s":{"seat":"Seat","hips":"Hips","waist":"Waist","legElasticLength.t":"You need 2x {{{ length }}} elastic to finish the legs (optional)","legElasticLength.d":"If you want to add elastic to your legs, you need two times {{{ length }}}.","legMeasure":"Leg elastic: 2x ","waistbandElasticLength.t":"You need 1x {{{ length }}} elastic to finish the waistband","waistbandElasticLength.d":"You need {{{ length }}} of elastic to finish the waistband opening.","waistbandMeasure":"Waistband elastic: ","minStretch.t":"You need fabric with a minimum stretch of {{ pct }}","minStretch.d":"Your waistband and fabric needs a minimum stretch of {{ pct }} so that you can comfortably fit through the waistband opening.","foldLining":"Fold lining","pocketseam":"Pocket seam","zipper":"Zipper"},"o":{"bulge":{"t":"Bulge","d":"Increase the bugle angle to create more room in the front pouch. Doesn\'t kick in below 2 degrees."},"bulgeFullness":{"t":"Bulge fullness","d":"Determines the roundness of the bulge. Doesn\'t have an effect if the bulge is disabled."},"splitPosition":{"t":"Crotch seam","d":"Determines the position of the crotch seam"},"gussetPosition":{"t":"Gusset position","d":"Shift the gusset (crotch position with the smallest width) forwards or backwards. The default position equals the cross seam front measurement."},"gussetWidth":{"t":"Gusset width","d":"Controls the minimum width in the crotch area"},"xStretch":{"t":"Horizontal fabric stretch","d":"Adjust this for more or less stretchy fabric in the horizontal direction"},"yStretch":{"t":"Vertical fabric stretch","d":"Adjust this for more or less stretchy fabric in the vertical direction"},"elasticStretch":{"t":"Elastic stretch","d":"Adjust how much the elastics are stretched relative to the fabric"},"rise":{"t":"Rise","d":"Controls the height of the waist. A value of 100% puts the waistband onto the measured hip line."},"legRise":{"t":"Leg rise","d":"Controls how high the leg is cut out"},"frontDip":{"t":"Front waist dip","d":"Controls how much the front waist curves (revealing more or less skin)"},"frontDipShape":{"t":"Front waist dip shape","d":"Controls the shape of the front waist dip. Doesn\'t have much effect if the front waist dip is zero."},"backDip":{"t":"Back waist dip","d":"Controls how much the back waist curves (revealing more or less skin)"},"backDipShape":{"t":"Back waist dip shape","d":"Controls the shape of the back waist dip. Doesn\'t have much effect if the back waist dip is zero."},"frontExposure":{"t":"Front exposure","d":"Controls the amount of exposed skin on the front"},"frontReduction":{"t":"Front narrowing","d":"Controls by how much the front part is slimmer than the back part"},"pockets":{"t":"Pockets","d":"Choose if you want pockets"},"pocketHeight":{"t":"Pocket height","d":"Controls the position of the pocket hem or the zippers. Increasing this option results in shorter pockets. Only has an effect with pockets enabled."},"pocketGap":{"t":"Pocket gap","d":"Controls how much space is left in the front between both pockets. Only has an effect with pockets enabled."},"backExposure":{"t":"Back exposure","d":"Controls the amount of exposed skin on the back"},"minFabricWidth":{"t":"Minimum fabric width","d":"Controls the minimum width of the thong strip and side band. Does not have an effect if the back exposure and the leg rise is low."},"flipBack":{"t":"Flip back","d":"Determines if the back part should be rendered upside down"},"flipBackYes":{"t":"Flip upright","d":"Flips the back part, which is constructed upside down, to an upright orientation"},"flipBackNo":{"t":"Keep upside down","d":"Keeps the back part in its original orientation, which might help in the pattern inspector view"},"pockets.none":{"t":"No Pockets","d":"Create the design without any pockets (default)"},"pockets.inside":{"t":"Inside Pockets","d":"Create two secret pockets on the insides and a center front pouch"},"pockets.zipper":{"t":"Front pockets with zippers","d":"Create two front pockets with zippers"}}}')};function tf(t,e,o,a){let{points:i,paths:n,Path:s,macro:r}=t.shorthand();const l=e.intersectsY(i[a].y);if(2===l.length){let t=l[0],e=l[1];t.x>e.x&&([t,e]=[e,t]),n[a]=(new s).move(t).line(e).attr("class","contrast help"),r("banner",{id:a+"Line",classes:"center contrast help",path:n[a],text:"umbra:"+o})}}function ef(t,e){t.shorthand().complete&&(tf(t,e,"waist","cfWaist"),tf(t,e,"hips","cfHips"),tf(t,e,"seat","cfSeat"),tf(t,e,"waist","cfWaistBack"),tf(t,e,"hips","cfHipsBack"),tf(t,e,"seat","cfSeatBack"))}const of={name:"umbra.base",measurements:["waist","seat","waistToSeat","crossSeam","crossSeamFront","waistToHips","hips"],options:{xStretch:{pct:15,min:0,max:75,menu:"fit"},yStretch:{pct:5,min:0,max:50,menu:"fit"},elasticStretch:{pct:5,min:0,max:10,menu:"fit"},gussetPosition:{pct:50,min:20,max:100,menu:"fit"},gussetWidth:{pct:12,min:3,max:20,menu:"fit",toAbs:(t,{measurements:e},o)=>e.crossSeam*o.gussetWidth*(0,n.VT)(o.xStretch)},splitPosition:{pct:11,min:0,max:45,menu:"fit"},bulge:{deg:0,min:0,max:30,menu:"fit"},bulgeFullness:{pct:75,min:25,max:100,menu:(t,e)=>!(e?.bulge<2)&&"fit"},minFabricWidth:{pct:2,min:.5,max:5,menu:"style",toAbs:(t,{measurements:e})=>e.seat*t},frontReduction:{pct:10,min:0,max:30,menu:"style"},rise:{pct:75,min:20,max:150,menu:"style",toAbs:(t,{measurements:e},o)=>(e.crossSeam/2-e.waistToSeat+(e.waistToSeat-e.waistToHips)*o.rise)*(0,n.VT)(o.xStretch)},legRise:{pct:0,min:-20,max:40,menu:"style"},frontDip:{pct:2.5,min:-5,max:15,menu:"style"},frontDipShape:{pct:75,min:0,max:95,menu:"style"},frontExposure:{pct:70,min:5,max:100,menu:"style"},backDip:{pct:-2.5,min:-15,max:10,menu:"style"},backDipShape:{pct:80,min:0,max:95,menu:"style"},backExposure:{pct:15,min:0,max:100,menu:"style"},pockets:{dflt:"none",list:["none","inside","zipper"],menu:"style",extraNote:"Select if you want pockets"},pocketGap:{pct:25,min:15,max:35,menu:(t,e)=>"none"!==e?.pockets&&"style",toAbs:(t,{measurements:e},o)=>e.hips/2*o.pocketGap*(0,n.VT)(o.xStretch)},pocketHeight:{pct:20,min:10,max:30,menu:(t,e)=>"none"!==e?.pockets&&"style"},flipBack:{menu:"advanced",bool:!0,extraNote:"Select if the back part should be flipped into upright orientation, set to false for development and easier debugging of control points"}},draft:function({options:t,Point:e,Path:o,points:a,paths:i,measurements:n,complete:s,store:r,utils:l,expand:c,units:p,macro:d,part:h}){function m(t,e,o,a){return a<.5?2*(e*a+t*(.5-a)):2*(o*(a-.5)+e*(1-a))}const f=l.stretchToScale(t.xStretch),u=l.stretchToScale(t.yStretch),g=l.stretchToScale(t.elasticStretch);let b=t.minFabricWidth*n.seat;a.cfWaist=new e(0,0),a.sideWaist=new e(n.waist/4*f,0),a.cfHips=new e(0,n.waistToHips*u),a.sideHips=new e(n.hips/4*f,a.cfHips.y),a.cfSeat=new e(0,n.waistToSeat*u),a.sideSeat=new e(n.seat/4*f,a.cfSeat.y);const w=n.crossSeam/2;a.cfMiddle=new e(0,u*w),a.cfGusset=new e(0,u*m(n.waistToSeat,n.crossSeamFront,w,t.gussetPosition)),a.sideGusset=new e(w*t.gussetWidth*f,a.cfGusset.y),i.bodySide=(new o).move(a.sideWaist).line(a.sideHips).line(a.sideSeat).hide(),a.cfWaistband=a.cfSeat.shiftFractionTowards(a.cfHips,t.rise);const k=i.bodySide.intersectsY(a.cfWaistband.y);null==k||0===k.length?a.sideWaistbandBase=new e(a.sideWaist.x,a.cfWaistband.y):a.sideWaistbandBase=k[0],a.sideLegBase=a.sideSeat.shiftTowards(a.sideWaistbandBase,t.legRise*a.cfGusset.dist(a.cfHips)),(a.sideLegBase.dist(a.sideWaistbandBase)<b||a.sideLegBase.y<a.sideWaistbandBase.y)&&(a.sideLegBase=a.sideWaistbandBase.shiftTowards(a.sideSeat,b)),a.cfMaxSplit=new e(0,2*u*w-a.sideLegBase.y),a.cfBackGusset=a.cfGusset.shiftFractionTowards(a.cfMaxSplit,t.splitPosition),a.gussetFrontCp=a.sideGusset.shift(90,a.sideLegBase.dy(a.sideGusset)*t.frontExposure);for(const W of["cfWaist","cfHips","cfSeat","cfWaistband","sideWaistbandBase","sideLegBase"])a[`${W}Back`]=a[W].flipY(a.cfMiddle);a.sideWaistbandFront=new e(a.sideWaistbandBase.x*(1-t.frontReduction),a.sideWaistbandBase.y),a.sideLegFront=new e(a.sideLegBase.x*(1-t.frontReduction),a.sideLegBase.y),a.sideWaistbandBack=a.sideWaistbandBaseBack.shift(0,a.sideWaistbandFront.dist(a.sideWaistbandBase)),a.sideLegBack=a.sideLegBaseBack.shift(0,a.sideLegFront.dist(a.sideLegBase)),a.sideLegBack=a.sideWaistbandBack.shiftTowards(a.sideLegBack,a.sideWaistbandFront.dist(a.sideLegFront)),a.cfWaistbandDipCp1Front=l.beamIntersectsX(a.sideWaistbandFront,a.sideLegFront.rotate(-90,a.sideWaistbandFront),a.sideWaistbandFront.x/2),a.cfWaistbandDipFront=new e(0,a.cfWaistbandDipCp1Front.y+w*t.frontDip),a.cfWaistbandDipCp2Front=new e(a.cfWaistbandDipCp1Front.x*t.frontDipShape,a.cfWaistbandDipFront.y),a.cfWaistbandDipCp1Front=a.cfWaistbandDipCp1Front.shiftFractionTowards(a.sideWaistbandFront,t.frontDipShape),a.cfWaistbandDipCp1Back=l.beamIntersectsX(a.sideWaistbandBack,a.sideLegBack.rotate(-90,a.sideWaistbandBack),a.sideWaistbandBack.x/2),a.cfWaistbandDipBack=new e(0,a.cfWaistbandDipCp1Back.y-w*t.backDip),a.cfWaistbandDipCp2Back=new e(a.cfWaistbandDipCp1Back.x*t.backDipShape,a.cfWaistbandDipBack.y),a.cfWaistbandDipCp1Back=a.cfWaistbandDipCp1Back.shiftFractionTowards(a.sideWaistbandBack,t.backDipShape);const C=a.sideLegFront.angle(a.sideWaistbandFront)+90;a.sideLegCpFront=a.sideLegFront.shift(C,a.sideGusset.dx(a.sideLegFront)/3*(1-t.frontReduction)),a.sideLegCp1Back=a.sideLegBack.shift(-C,.25*a.sideGusset.dx(a.sideLegBack)),a.gussetBackCp2=a.sideGusset.shift(90,.25*a.sideLegCp1Back.dy(a.sideGusset)),r.set("bulge",t.bulge>=2),i.simpleBackCurve=(new o).move(a.sideLegBaseBack).curve(a.sideLegCp1Back,a.gussetBackCp2,a.sideGusset).hide();const v=a.cfWaistbandDipBack.y-a.sideLegBase.dist(a.sideWaistbandBase);a.backCurveCenterDefault=i.simpleBackCurve.shiftFractionAlong(.6);const y=i.simpleBackCurve.shiftFractionAlong(.59).angle(i.simpleBackCurve.shiftFractionAlong(.61));var T,x,B,S;a.backCurveCenterMax=new e(.7*a.sideLegBase.x,a.cfMiddle.shiftFractionTowards(a.sideLegBaseBack,.3).y),a.backCurveCenterMin=a.cfWaistbandBack.shiftFractionTowards(a.cfMiddle,.5).shift(0,b/2),a.sideFullnessBack=(T=a.backCurveCenterMax,x=a.backCurveCenterDefault,B=a.backCurveCenterMin,S=t.backExposure,new e(m(T.x,x.x,B.x,S),m(T.y,x.y,B.y,S))),a.sideFullnessBack.y>v&&(a.sideFullnessBack=new e(a.sideFullnessBack.x,v));const L=m(160,y,90,t.backExposure),P=a.cfSeat.dist(a.sideSeat)*m(.5,.1,.5,t.backExposure);a.sideLegCp2Back=a.sideFullnessBack.shift(L,-P),a.sideLegCp2Back.y>v&&(a.sideLegCp2Back=new e(a.sideLegCp2Back.x,v)),a.gussetBackCp1=a.sideFullnessBack.shift(L,P),a.gussetBackCp2=a.sideGusset.shift(90,a.sideFullnessBack.dy(a.sideGusset)/4),a.gussetFrontCp=a.sideGusset.shift(90,a.sideLegCpFront.dy(a.sideGusset)*t.frontExposure),i.backCurve=(new o).move(a.sideLegBack).curve(a.sideLegCp1Back,a.sideLegCp2Back,a.sideFullnessBack).curve(a.gussetBackCp1,a.gussetBackCp2,a.sideGusset).hide();const R=i.backCurve.intersectsY(a.cfBackGusset.y)[0];let F,E=[];R&&!Array.isArray(R)&&(a.backGussetSplit=R,E=i.backCurve.split(a.backGussetSplit)),E&&E.length>1||(a.backGussetSplit=a.sideGusset,E=[i.backCurve]),i.elasticLegBack=E[0].hide(),i.back=(new o).move(a.cfWaistbandDipBack).curve(a.cfWaistbandDipCp2Back,a.cfWaistbandDipCp1Back,a.sideWaistbandBack).join(i.elasticLegBack).line(a.cfBackGusset).hide(),a.cfBulgeSplit=a.cfMiddle.shiftFractionTowards(a.cfHips,.5),a.cfBulgeSplit.y<a.cfWaistbandDipFront.y+b&&(a.cfBulgeSplit=a.cfWaistbandDipFront.shift(-90,b)),a.rotationOrigin=new e(a.sideGusset.x,a.cfBulgeSplit.y);for(const W of["backGussetSplit","cfMiddle","cfGusset","cfBackGusset","sideGusset","gussetFrontCp"])r.get("bulge")?a[`${W}Bulge`]=a[W].rotate(t.bulge,a.rotationOrigin):a[`${W}Bulge`]=a[W];if(a.bulgeCp=a.cfBulgeSplit.shift(-90,a.cfBulgeSplit.dy(a.cfGussetBulge)*t.bulgeFullness),a.cfGussetBulgeCp=a.cfGussetBulge.shift(90+t.bulge,.5*a.cfGussetBulge.dist(a.cfBulgeSplit)),a.gussetFrontCpBulge=a.gussetFrontCpBulge.shiftFractionTowards(a.sideGussetBulge,t.bulge/200),r.get("bulge")?a.bulgeCpBulge=a.bulgeCp.rotate(t.bulge,a.rotationOrigin):a.bulgeCpBulge=a.bulgeCp,a.bulgeCpBottom=a.bulgeCpBulge.shiftFractionTowards(a.bulgeCp,t.bulgeFullness).shiftFractionTowards(a.cfBulgeSplit,.5),F=E.length<=1?null:r.get("bulge")?E[1].rotate(t.bulge,a.rotationOrigin):E[1],i.elasticLegFront=(new o).move(a.backGussetSplitBulge),F&&(i.elasticLegFront=i.elasticLegFront.join(F)),i.elasticLegFront.curve(a.gussetFrontCpBulge,a.sideLegCpFront,a.sideLegFront).hide(),"none"!==t.pockets){a.sidePocketHeight=a.sideWaistbandFront.shiftTowards(a.sideLegFront,Math.min(t.pocketHeight*a.cfHips.dist(a.cfSeat),a.sideWaistbandFront.dist(a.sideLegFront)/3)),a.cfPocketHeight=a.cfWaistbandDipFront.shiftTowards(a.cfMiddle,a.sidePocketHeight.dist(a.sideWaistbandFront)),a.cfPocketHeightCp=new e(a.sidePocketHeight.x/2*t.frontDipShape,a.cfPocketHeight.y),c?(d("mirror",{mirror:[new e(0,0),new e(0,100)],points:["cfPocketHeightCp","sidePocketHeight"],clone:!0}),i.pocketHeight=(new o).move(a.sidePocketHeight)._curve(a.cfPocketHeightCp,a.cfPocketHeight).curve_(a.mirroredCfPocketHeightCp,a.mirroredSidePocketHeight).reverse().addClass("help lining").addText("umbra:foldLining","center lining")):i.pocketHeight=(new o).move(a.sidePocketHeight)._curve(a.cfPocketHeightCp,a.cfPocketHeight).reverse().addClass("help lining").addText("umbra:foldLining","center lining"),s||i.pocketHeight.hide();const r=a.sideHips.x*t.pocketGap;a.pocketSeamTop=(new o).move(a.sideWaistbandFront).curve(a.cfWaistbandDipCp1Front,a.cfWaistbandDipCp2Front,a.cfWaistbandDipFront).intersectsX(r)[0],i.pocketPilotPath=(new o).move(a.pocketSeamTop).curve_(a.pocketSeamTop.shift(-80,n.crossSeamFront/2),new e(a.sideLegFront.x,a.sideGussetBulge.y
1)).setClass("mark").hide();const l=i.elasticLegFront.intersects(i.pocketPilotPath);if(l.length>0&&(a.pocketSeamBottom=l[0],i.pocketPilotPath2=(new o).move(a.pocketSeamBottom).line(a.pocketSeamBottom.shift(125,n.crossSeam)).hide(),a.pocketSeamMiddle=i.pocketPilotPath2.intersectsX(r)[0],a.pocketSeamBottomCp=new e(r,(2*a.pocketSeamBottom.y+a.pocketSeamMiddle.y)/3),s&&(i.pocketShape=(new o).move(a.pocketSeamTop).line(a.pocketSeamMiddle).curve_(a.pocketSeamBottomCp,a.pocketSeamBottom).addClass("mark dashed").addText("umbra:pocketseam","center mark")),"zipper"===t.pockets)){const t=r+10,l=Math.min(a.sidePocketHeight.x-10,t+n.hips/10),p=i.pocketHeight.intersectsX(t)[0],h=i.pocketHeight.intersectsX(l)[0],m=p.angle(h);a.leftZipperTop=p.shift(m+90,2.5),a.leftZipperBottom=a.leftZipperTop.shift(m-90,5),a.rightZipperTop=h.shift(m+90,2.5),a.rightZipperBottom=a.rightZipperTop.shift(m-90,5),s&&(i.zipper=(new o).move(a.leftZipperBottom).line(a.rightZipperBottom).line(a.rightZipperTop).line(a.leftZipperTop).close().reverse().addClass("mark dashed").addText("umbra:zipper","mark"),c&&(d("mirror",{mirror:[new e(0,0),new e(0,100)],points:["leftZipperBottom","rightZipperBottom","rightZipperTop","leftZipperTop"],clone:!0}),i.mirroredZipper=(new o).move(a.mirroredRightZipperTop).line(a.mirroredLeftZipperTop).line(a.mirroredLeftZipperBottom).line(a.mirroredRightZipperBottom).close().addClass("mark dashed").addText("umbra:zipper","mark"))),i.zipperCut=(new o).move(a.leftZipperBottom).line(a.leftZipperTop).move(a.rightZipperTop).line(a.rightZipperBottom).move(p).line(h).addClass("fabric"),i.pocketHeight.hide()}}return r.set("waistbandElasticLength",2*(new o).move(a.cfWaistbandDipBack).curve(a.cfWaistbandDipCp2Back,a.cfWaistbandDipCp1Back,a.sideWaistbandBack).move(a.cfWaistbandDipFront).curve(a.cfWaistbandDipCp2Front,a.cfWaistbandDipCp1Front,a.sideWaistbandFront).hide().length()*g),r.set("legElasticLength",(i.elasticLegBack.length()+i.elasticLegFront.length())*g),c?r.flag.preset("expandIsOn"):r.flag.preset("expandIsOff"),r.flag.note({msg:"umbra:waistbandElasticLength",replace:{length:p(r.get("waistbandElasticLength"))}}),r.flag.note({msg:"umbra:legElasticLength",replace:{length:p(r.get("legElasticLength"))}}),r.flag.note({msg:"umbra:minStretch",replace:{pct:Math.round(100*(n.seat/r.get("waistbandElasticLength")-1))+"%"}}),r.get("bulge")?i.seamBase=(new o).move(a.cfBulgeSplit).curve(a.bulgeCpBottom,a.cfGussetBulgeCp,a.cfGussetBulge).line(a.cfBackGussetBulge):i.seamBase=(new o).move(a.cfBackGussetBulge),i.seamBase=i.seamBase.line(a.backGussetSplitBulge).join(i.elasticLegFront).line(a.sideWaistbandFront).curve(a.cfWaistbandDipCp1Front,a.cfWaistbandDipCp2Front,a.cfWaistbandDipFront).join(i.back),h},hide:{self:!0},plugins:[Pp.e2]},af={name:"umbra.back",from:of,hide:{from:!0},draft:function({Point:t,Path:e,points:o,paths:a,store:i,sa:n,Snippet:s,snippets:r,options:l,expand:c,macro:p,part:d}){a.seamBase.hide();const h=["cfWaist","cfHips","cfSeat","cfWaistBack","cfHipsBack","cfSeatBack","cfWaistbandDipCp1Back","cfWaistbandDipCp2Back","sideWaistbandBack","sideLegBack","backGussetSplit"];if(c){if(l.flipBack){for(const t of h)o[t]=o[t].flipY();o.cfWaistbandDipBack=o.cfWaistbandDipBack.flipY(),o.cfBackGusset=o.cfBackGusset.flipY()}l.flipBack?p("mirror",{mirror:[new t(0,0),new t(100,0)],paths:["back"],clone:!0}):a.mirroredBack=a.back.reverse(),p("mirror",{mirror:[new t(0,0),new t(0,100)],paths:["mirroredBack"],clone:!0}),a.seam=a.mirroredBack.join(a.mirroredMirroredBack.reverse()).addClass("fabric"),a.mirroredBack.hide(),a.mirroredMirroredBack.hide(),n&&(a.sa=p("sa",{paths:[a.seam.reverse()]})),i.cutlist.setCut({cut:1,from:"fabric"}),p("grainline",{from:new t(0,o.backGussetSplit.y),to:o.cfWaistbandDipBack})}else{if(l.flipBack){for(const t of h)o[t]=o[t].flipY();o.cfWaistbandDipBack=o.cfWaistbandDipBack.flipY(),o.cfBackGusset=o.cfBackGusset.flipY(),p("mirror",{mirror:[new t(0,0),new t(100,0)],paths:["back"],clone:!0}),a.mirroredBack.hide(),a.saBase=a.mirroredBack.reverse().hide()}else a.saBase=a.back;a.seam=a.saBase.clone().line(o.cfWaistbandDipBack).close().unhide().addClass("fabric"),ef(d,a.seam),n&&(a.sa=p("sa",{paths:[a.saBase,null]})),i.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),l.flipBack?p("cutonfold",{from:o.cfWaistbandDipBack,to:o.cfBackGusset,grainline:!0}):p("cutonfold",{from:o.cfBackGusset,to:o.cfWaistbandDipBack,grainline:!0})}p("hd",{id:"wAtBottom",from:o.cfBackGusset,to:o.backGussetSplit,y:o.cfBackGusset.y+n+15}),p("hd",{id:"wAtLeg",from:o.cfBackGusset,to:o.sideLegBack,y:o.cfBackGusset.y+n+30}),p("hd",{id:"wAtTop",from:o.cfWaistbandDipBack,to:o.sideWaistbandBack,y:o.sideWaistbandBack.y-n-15}),p("vd",{id:"hToLeg",from:o.backGussetSplit,to:o.sideLegBack,x:o.sideLegBack.x+n+15}),p("vd",{id:"hToCfWaistband",from:o.backGussetSplit,to:o.cfWaistbandDipBack,x:o.sideLegBack.x+n+30}),0!==l.backDip&&p("vd",{id:"hToSideWaistband",from:o.backGussetSplit,to:o.sideWaistbandBack,x:o.sideLegBack.x+n+45});let m=o.sideWaistbandBack.shiftFractionTowards(o.sideLegBack,.5);r.sideBackCenter=new s("notch",m),c&&(r.sideBackCenterMirrored=new s("notch",new t(-m.x,m.y)));delete a.back,delete a.front,delete a.gusset,delete a.frontAndGusset,delete a.bulge,delete a.pocketHeight,delete a.saBase,delete a.pocketShape,delete a.zipper,delete a.mirroredZipper,delete a.zipperCut,l.flipBack?o.title=o.cfWaistbandDipBack.shift(0,20).shift(-90,50):o.title=o.cfWaistbandDipBack.shift(0,20).shift(90,50);
1return p("title",{at:o.title,nr:2,title:"back"}),o.logo=o.title.shiftFractionTowards(o.sideLegBack,.6).shift(-90,20),r.logo=new s("logo",o.logo),d}};const nf={name:"umbra.front",from:of,hide:{from:!0},draft:function({Point:t,Path:e,points:o,paths:a,store:i,sa:n,Snippet:s,snippets:r,options:l,expand:c,macro:p,units:d,part:h}){i.get("bulge")?a.seamBase=(new e).move(o.cfBulgeSplit).curve(o.bulgeCpBottom,o.cfGussetBulgeCp,o.cfGussetBulge).line(o.cfBackGussetBulge):a.seamBase=(new e).move(o.cfBackGussetBulge);a.seamBase=a.seamBase.line(o.backGussetSplitBulge).join(a.elasticLegFront).line(o.sideWaistbandFront).curve(o.cfWaistbandDipCp1Front,o.cfWaistbandDipCp2Front,o.cfWaistbandDipFront).hide(),c?(p("mirror",{mirror:[new t(0,0),new t(0,100)],paths:["seamBase"],clone:!0}),a.seam=a.seamBase.join(a.mirroredSeamBase.reverse()),a.mirroredSeamBase.hide(),p("mirror",{mirror:[new t(0,0),new t(0,100)],paths:["pocketShape","zipperCut"],points:["pocketTop"],clone:!0})):a.seam=a.seamBase.clone().close();a.seam.unhide().addClass("fabric"),ef(h,a.seam),n&&(a.saBase=(new e).move(o.cfBackGussetBulge).line(o.backGussetSplitBulge).join(a.elasticLegFront).line(o.sideWaistbandFront).curve(o.cfWaistbandDipCp1Front,o.cfWaistbandDipCp2Front,o.cfWaistbandDipFront).hide(),c?(p("mirror",{mirror:[new t(0,0),new t(0,100)],paths:["saBase"],clone:!0}),a.saBase=a.saBase.join(a.mirroredSaBase.reverse()).close().hide(),a.sa=p("sa",{paths:["saBase"]})):a.sa=p("sa",{paths:["saBase",null,i.get("bulge")?{p:(new e).move(o.cfBulgeSplit).line(o.cfGusset),offset:0}:null]}));i.cutlist.setCut({cut:1,from:"fabric",onFold:!c}),i.cutlist.addCut({cut:1,from:"lining",onFold:!c}),o.title=o.cfWaistbandDipFront.shift(-45,20).shift(-90,40),c?p("grainline",{to:i.get("bulge")?o.cfBulgeSplit:o.cfBackGusset,from:o.cfWaistbandDipFront}):p("cutonfold",{to:i.get("bulge")?o.cfBulgeSplit:o.cfBackGusset,from:o.cfWaistbandDipFront,grainline:!0});p("hd",{id:"wAtWaistband",from:o.cfWaistbandDipFront,to:o.sideWaistbandFront,y:o.sideWaistbandFront.y-n-15}),p("vd",{id:"grainline",from:o.cfWaistbandDipFront,to:o.cfBackGussetBulge,x:-30}),i.get("bulge")&&p("vd",{id:"grainline2",from:o.cfWaistbandDipFront,to:o.cfBulgeSplit,x:-15});p("vd",{id:"outer",from:o.sideWaistbandFront,to:o.sideLegFront,x:o.sideSeat.x+15}),0!==l.frontDip&&p("vd",{id:"outer2",from:o.cfWaistbandDipFront,to:o.sideLegFront,x:o.sideSeat.x});p("vd",{id:"waistbandDip",from:o.cfWaistbandDipFront,to:o.sideWaistbandFront,x:-15}),p("vd",{id:"heightToWaist",from:o.cfWaistbandDipFront,to:o.backGussetSplitBulge,x:o.backGussetSplitBulge.x}),p("hd",{id:"heightToSideLeg",from:o.backGussetSplitBulge,to:o.sideLegFront,y:o.backGussetSplitBulge.y}),l.bulge>=2&&p("hd",{id:"bulgeHeight",from:o.cfBulgeSplit,to:o.cfBackGussetBulge,y:o.cfBackGussetBulge.y+15});p("hd",{id:"backGusset",to:o.backGussetSplitBulge,from:o.cfBackGussetBulge,y:o.cfBackGussetBulge.y+15});let m=o.sideWaistbandFront.shiftFractionTowards(o.sideLegFront,.5);r.sideFrontCenter=new s("notch",m),c&&(r.sideFrontCenterMirrored=new s("notch",new t(-m.x,m.y)));o.pocketSeamBottom&&(r.pocketTop=new s("notch",o.pocketSeamTop),r.pocketBottom=new s("notch",o.pocketSeamBottom),c&&(r.pocketTopMirrored=new s("notch",new t(-o.pocketSeamTop.x,o.pocketSeamTop.y)),r.pocketBottomMirrored=new s("notch",new t(-o.pocketSeamBottom.x,o.pocketSeamBottom.y))));return delete a.back,delete a.front,delete a.saBase,p("title",{at:o.title,nr:1,title:"front",notes:["umbra:waistbandMeasure",d(i.get("waistbandElasticLength")),"\n","umbra:legMeasure",d(i.get("legElasticLength"))]}),h}};const sf=JSON.parse('{"id":"umbra","name":"Umbra undies","code":["Joost De Cock","Jonathan Haas"],"description":"A FreeSewing pattern for a basic, highly-customizable underwear pattern","design":["Joost De Cock","Jonathan Haas"],"difficulty":2,"tags":["bottoms","underwear"],"techniques":["elastic","curved-seam"],"version":"4.6.0","pkg":"@freesewing/umbra","collection":true}'),rf=new n.pT({data:sf,parts:[of,af,nf]}),lf=JSON.parse('{"id":"wahid","name":"Wahid waistcoat","code":"Joost De Cock","description":"A FreeSewing pattern for a classic fitted waistcoat","design":"Joost De Cock","difficulty":4,"tags":["tops"],"techniques":["curved-seam","hem","interfacing","lining","welt-pocket","button"],"version":"4.6.0","pkg":"@freesewing/wahid","collection":true}
1'),cf={en:JSON.parse('{"t":"Wahid waistcoat","d":"Wahid is a classic fitted waistcoat.","p":{"back":"Back","front":"Front","frontFacing":"Front facing","frontLining":"Front lining","pocketBag":"Pocket bag","pocketFacing":"Pocket facing","pocketInterfacing":"Pocket interfacing","pocketWelt":"Pocket welt"},"s":{"cutFrontFacing.t":"The front facing is not shown","cutFrontFacing.d":"The **Front facing** (1a) is not shown, but you can trace it from the Front part (1). Trace the outline on the left of the facing/lining boundary that extends from the tip of the dart to the shoulder seam. \\n\\nIt is not shown because the **expand** core setting is currently disabled. Enable it to show this pattern part.","cutFrontLining.t":"The front lining is not shown","cutFrontLining.d":"The **Front lining** (1b) is not shown, but you can trace it from the Front part (1). Trace the outline on the right of the facing/lining boundary that extends from the tip of the dart to the shoulder seam. \\n\\nIt is not shown because the **expand** core setting is currently disabled. Enable it to show this pattern part.","cutPocketWelt.t":"The pocket welt is not shown","cutPocketWelt.d":"The **Pocket welt** (3) is a rectangular piece of fabric {{{ w }}} wide and {{{ l }}} long (this part does not use seam allowance). \\n\\nIt is not shown because the **expand** core setting is currently disabled. Enable it to show this pattern part.","noBackDart.t":"The back dart is not necessary","noBackDart.d":"Your measurements indicate that a back dart is not necessary, so you can skip this part of the instructions. \\n\\nSome manual adjustments might be necessary if the chest size measurement is much smaller than the waist and hip size.","cutPocketInterfacing.t":"The pocket interfacing is not shown","cutPocketInterfacing.d":"The **Pocket interfacing** (6) is a rectangular piece of fabric {{{ w }}} wide and {{{ l }}} long (this part does not use seam allowance). \\n\\nIt is not shown because the **expand** core setting is currently disabled. Enable it to show this pattern part.","flbFacingSide":"Facing/Lining boundary : Facing side","flbLiningSide":"Facing/Lining boundary : Lining side"},"o":{"backScyeDart":{"t":"Back scye dart","d":"The amount to take out in a dart at the back of the armhole."},"frontScyeDart":{"t":"Front scye dart","d":"The amount to take out in a dart at the front of the armhole."},"pocketLocation":{"t":"Pocket location","d":"Determines the placement of the pocket"},"pocketWidth":{"t":"Pocket width","d":"Determines the width of the pocket"},"weltHeight":{"t":"Welt height","d":"Determines the height of the welt"},"necklineDrop":{"t":"Neckline drop","d":"Determines how low the neckline drops at the front"},"frontStyle":{"t":"Neck opening style","d":"Style of the neck opening"},"frontStyle.classic":{"t":"Classic","d":"Draft a waistcoat with a classic V-shaped neck opening"},"frontStyle.rounded":{"t":"Rounded","d":"Draft a waistcoat with a rounded V-shaped neck opening"},"hemStyle":{"t":"Hem style","d":"Style of the front hem"},"hemStyle.classic":{"t":"classic","d":"Draft a waistcoat with a classic cut-away hem style"},"hemStyle.rounded":{"t":"Rounded","d":"Draft a waistcoat with a rounded hem style"},"hemStyle.square":{"t":"Straight","d":"Draft a waistcoat with with straight hem"},"hemRadius":{"t":"Hem radius","d":"Radius by which the hem is rounded"},"backInset":{"t":"Back inset","d":"How much the back of the armhole is cut inwards"},"frontInset":{"t":"Front inset","d":"How much the front of the armhole is cut inwards"},"shoulderInset":{"t":"Shoulder inset","d":"How much the shoulder seam is cut inwards at the shoulder"},"neckInset":{"t":"Neck inset","d":"How much the shoulder seam is cut inwards at the neck"},"pocketAngle":{"t":"Pocket angle","d":"Angle of the pocket slant"},"buttons":{"t":"Buttons","d":"The amount of buttons to use."},"waistEase":{"t":"Waist ease","d":"Controls the amount of ease at the waist."},"hipsEase":{"t":"Hips ease","d":"Controls the amount of ease at the hips."},"centerBackDart":{"t":"Center back dart","d":"Whether or not to include a center back dart to fit a rounded back."},"legacyWaistHips":{"t":"Legacy waist and hips widths","d":"Enable this option to use the legacy (v3) way to calculate the waist and hips widths (using chest circumference) rather than the new way (using the waist and hips measurements)."},"legacyWaistHipsNo":{"t":"Calculate waist and hips widths the new way","d":"Uses the waist and hips measurements to calculate the waist and hips widths"},"legacyWaistHipsYes":{"t":"Calculate waist and hips widths the legacy (v3) way","d":"Uses the chest measurement to approximate the waist and hips widths"}}}')},pf=t=>{const{measurements:e,options:o,points:a,Point:i,store:n}=t.shorthand(),s={},r=e.chest*(1+o.chestEase),l=e.waist*(1+o.waistEase),c=e.hips*(1+o.hipsEase);s.waist=r-l,s.hips=r-c,s.hips<0&&(s.hips=0),s.waist<0&&(s.waist=0);let p=s.waist/12,d=s.hips/12;if(n.set("wr12",p),n.set("hr12",d),!o.legacyWaistHips){const t=r>=c?r:c;s.waist=t-l,s.hips=t-c,s.hips<0&&(s.hips=0),s.waist<0&&(s.waist=0);const e=15;p=s.waist/e,d=s.hips/e,n.set("wr12",-2*p),n.set("hr12",-2*d)}a.dartWaistCenter=new i(a.armhole.x/2,a.waist.y),a.dartWaistRight=a.dartWaistCenter.shift(0,p),a.dartWaistLeft=a.dartWaistCenter.shift(180,p),a.dartTop=a.dartWaistCenter.shift(90,.35*a.neck.dy(a.waist)),a.dartWaistRightCpTop=a.dartWaistRight.shift(90,.35*a.dartTop.dy(a.waist)),a.dartWaistLeftCpTop=a.dartWaistLeft.shift(90,.35*a.dartTop.dy(a.waist)),a.dartHipCenter=new i(a.dartWaistCenter.x,a.hips.y),a.dartHipRight=a.dartHipCenter.shift(0,d),a.dartHipLeft=a.dartHipCenter.shift(180,d),a.dartHemRight=new i(a.dartHipRight.x,a.hem.y),a.dartHemLeft=new i(a.dartHipLeft.x,a.hem.y),a.dartHipRightCpTop=a.dartHipRight.shift(90,.25*a.waist.dy(a.hips)),a.dartHipLeftCpTop=a.dartHipLeft.shift(90,.25*a.waist.dy(a.hips)),a.dartWaistRightCpBottom=a.dartWaistRight.shift(-90,.25*a.waist.dy(a.hips)),a.dartWaistLeftCpBottom=a.dartWaistLeft.shift(-90,.25*a.waist.dy(a.hips))},df=t=>{const{points:e,Point:o,store:a}=t.shorthand(),i=a.get("wr12"),n=a.get("hr12");e.waist=e.waist.shift(180,i),e.waistCp2=new o(e.waist.x,e.dartWaistRightCpTop.y),e.waistCp1=new o(e.waist.x,e.dartWaistRightCpBottom.y),e.hips=e.hips.shift(180,n),e.hipsCp2=new o(e.hips.x,e.dartHipRightCpTop.y),e.hem=e.hem.shift(180,n)},hf=t=>{const{Path:e,points:o}=t.shorthand();return(new e).move(o.dartStart).line(o.dartHipLeft).curve(o.dartHipLeftCpTop,o.dartWaistLeftCpBottom,o.dartWaistLeft).curve_(o.dartWaistLeftCpTop,o.dartTop)._curve(o.dartWaistRightCpTop,o.dartWaistRight).curve(o.dartWaistRightCpBottom,o.dartHipRightCpTop,o.dartHipRight).line(o.dartEnd)},mf={pct:10,max:15,min:8,menu:"style"},ff={pct:12.5,max:20,min:10,menu:"style"},uf={pct:10,min:0,max:20,menu:"advanced"},gf={pct:5,min:0,max:10,menu:"advanced"}
1,bf={deg:5,min:0,max:5,menu:"advanced"},wf={bool:!1,menu:"advanced"};const kf={name:"wahid.front",from:I,hide:n.V9.HIDE_TREE,measurements:["hips","waist"],options:{frontOverlap:.01,necklineDrop:{pct:50,min:35,max:85,menu:"style"},frontStyle:{dflt:"classic",list:["classic","rounded"],menu:"style"},frontInset:{pct:15,min:10,max:20,menu:"advanced"},shoulderInset:uf,neckInset:gf,hemStyle:{dflt:"classic",list:["classic","rounded","square"],menu:"style"},hemRadius:{pct:6,min:2,max:12,menu:"style"},pocketWidth:mf,pocketAngle:bf,pocketLocation:{pct:35,min:25,max:55,menu:"style"},frontScyeDart:{deg:6,min:0,max:12,menu:"fit"},buttons:{count:6,min:4,max:12,menu:"style"},waistEase:{pct:8,min:2,max:15,menu:"fit"},hipsEase:{pct:8,min:2,max:15,menu:"fit"},armholeDepthFactor:{pct:70,min:60,max:80,menu:"fit"},chestEase:{pct:2,min:1,max:10,menu:"fit"},lengthBonus:{pct:1,min:0,max:8,menu:"fit"},acrossBackFactor:.97,frontArmholeDeeper:.005,bicepsEase:.15,collarEase:.05,cuffEase:.2,shoulderEase:0,s3Collar:0,s3Armhole:0,shoulderSlopeReduction:{pct:0,min:0,max:80,menu:"advanced"},backNeckCutout:{pct:5,min:-2,max:8,menu:"advanced"},legacyWaistHips:wf},draft:function({points:t,Point:e,paths:o,Path:a,measurements:i,options:n,utils:s,macro:r,snippets:l,Snippet:c,complete:p,sa:d,store:h,part:m}){for(let v of Object.keys(o))delete o[v];delete l.armholePitchNotch,n.legacyWaistHips||(t.waist=new e(i.waist*(1+n.waistEase)/4,t.cfWaist.y),t.hips=new e(i.hips*(1+n.hipsEase)/4,t.cfHips.y),t.hem=new e(t.hips.x,t.cfHem.y)),t.closureTop=new e(i.chest*n.frontOverlap*-1,t.waist.y*n.necklineDrop),"classic"===n.frontStyle?t.closureTopCp1=new e(t.neck.x,t.waist.y*n.necklineDrop/2):t.closureTopCp1=new e(t.neck.x,t.closureTop.y);let f=t.shoulder.dist(t.neck),u=f*n.frontInset;if(t.armholePitch=t.armholePitch.shift(180,u),t.armholePitchCp1=t.armholePitchCp1.shift(180,u),t.armholePitchCp2=t.armholePitchCp2.shift(180,u),t.armholeHollow=t.armholeHollow.shift(180,u/2),t.armholeHollowCp2=t.armholeHollowCp2.shift(180,u/2),t.armholeHollowCp1=t.armholeHollowCp1.shift(180,u/2),t.shoulder=t.shoulder.shiftTowards(t.neck,f*n.shoulderInset),t.shoulderCp1=t.shoulderCp1.shift(t.shoulder.angle(t.neck),f*n.shoulderInset),t.neck=t.neck.shiftTowards(t.shoulder,f*n.neckInset),t.neckCp2=t.neck.shift(t.shoulder.angle(t.neck)+90,.2*f),pf(m),df(m),"classic"===n.hemStyle){let o=t.closureTop.dx(t.hem)/4;t.closureBottom=new e(t.closureTop.x,t.hem.y-o/2),t.hemTip=new e(t.closureBottom.x+o,t.closureBottom.y+o);let a=t.dartHemLeft.dx(t.dartHemRight);t.splitHem=t.hem.shift(180,a),t.hemSplit=s.curveIntersectsX(t.hemTip,t.hemTip,t.dartHemLeft,t.splitHem,t.dartHemLeft.x);let[i,n]=s.splitCurve(t.hemTip,t.hemTip,t.dartHemLeft,t.splitHem,t.hemSplit);t.splitDartHemLeftCp1=i.cp2,t.splitDartHemRightCp2=n.cp1.shift(0,a),t.splitHemCp1=n.cp2.shift(0,a),t.splitDartHemLeft=s.curveIntersectsX(t.hemTip,t.hemTip,t.dartHemLeft,t.splitHem,t.dartHemLeft.x),t.splitDartHemRight=t.splitDartHemLeft.shift(0,a),t.lastButton=new e(0,t.closureBottom.y)}else if("rounded"===n.hemStyle){t.closureBottom=new e(t.closureTop.x,t.hem.y);let o=i.hips*n.hemRadius;o>t.closureTop.dx(t.dartHemLeft)&&(o=t.closureTop.dx(t.dartHemLeft));const a=r("round",{id:"hem",from:t.closureTop,to:t.hem,via:t.closureBottom,radius:o});for(const e of["start","cp1","cp2","end"])t[`round${s.capitalize(e)}`]=t[a.points[e]].copy();t.lastButton=new e(0,t.roundStart.y),t.hemTip=t.roundEnd.copy()}else t.closureBottom=new e(t.closureTop.x,t.hem.y),t.lastButton=new e(0,.96*t.hem.y),t.hemTip=t.hem.copy();t.roundStart||(t.roundStart=t.closureBottom.clone()),t.roundEnd||(t.roundEnd=t.closureBottom.clone()),t.dartStart="classic"===n.hemStyle?t.splitDartHemLeft:t.dartHemLeft,t.dartEnd="classic"===n.hemStyle?t.splitDartHemRight:t.dartHemRight;let g=i.hips*n.pocketWidth,b=g*n.weltHeight,w=b/Math.cos(s.deg2rad(n.pocketAngle));t.pocketTopMid=t.dartWaistCenter.shiftFractionTowards(t.dartHipCenter,n.pocketLocation),t.pocketTopMidLeft=s.curveIntersectsY(t.dartWaistLeft,t.dartWaistLeftCpBottom,t.dartHipLeftCpTop,t.dartHipLeft,t.pocketTopMid.y),t.pocketBottomMidLeft=s.curveIntersectsY(t.dartWaistLeft,t.dartWaistLeftCpBottom,t.dartHipLeftCpTop,t.dartHipLeft,t.pocketTopMid.y+w);const k=t.pocketBottomMidLeft.angle(t.pocketTopMidLeft)-90;if(t.pocketTopLeft=t.pocketTopMidLeft.shift(180+n.pocketAngle+k,g/2),t.pocketBottomLeft=t.pocketTopLeft.shift(n.pocketAngle-90+k,b),t.pocketTopMidRight=t.pocketTopMidLeft.flipX(t.pocketTopMid),t.pocketBottomMidRight=t.pocketBottomMidLeft.flipX(t.pocketTopMid),t.pocketTopRight=t.pocketTopMidRight.shift(n.pocketAngle-k,g/2),t.pocketBottomRight=t.pocketTopRight.shift(n.pocketAngle-90-k,b),h.set("pocketBagLength",.75*t.pocketTopMid.dy(t.cfHem)),n.frontScyeDart){const e=t.cfArmhole.dist(t.armhole);t._dartWidth=t.dartTop.shiftFractionTowards(t.armholeHollow.rotate(n.frontScyeDart,t.dartTop),1.5),t.armholeHollowTop=(new a).move(t.armholeHollow).curve(t.armholeHollowCp2,t.armholePitchCp1,t.armholePitch).intersects((new a).move(t.dartTop).line(t._dartWidth)).pop(),t.armholeHollowCp2=t.armholeHollowCp2.shift(t.armholeHollow.angle(t.armholeHollowTop),t.armholeHollow.dist(t.armholeHollowTop));let o=["dartWaistRightCpTop","dartWaistRight","dartWaistRightCpBottom","dartHipRightCpTop","dartHipRight","dartHemRight","splitDartHemRight","splitDartHemRightCp2","splitHemCp1","hem","hips","hipsCp2","waistCp1","waist","waistCp2","armhole","armholeCp2","armholeHollow","pocketTopMidRight","pocketBottomMidRight","pocketTopRight","pocketBottomRight","dartEnd"];for(let a of o)void 0!==t[a]&&(t[a]=t[a].rotate(n.frontScyeDart,t.dartTop));n.legacyWaistHips||(t.armhole=t.cfArmhole.shiftTowards(t.armhole,e)),t.armholeHollowCp1=t.armholeHollowCp2.rotate(180,t.armholeHollow)}t.flbTop=t.neck.shiftFractionTowards(t.shoulder,.5),t.flbCp=t.dartTop.shift(-90,t.armholePitch.dy(t.flbTop)/2),t.flbCpTop=t.flbTop.shiftTowards(t.neck,t.flbTop.dy(t.armholePitch)).rotate(90,t.flbTop),delete o.cutonfold,delete o.saBase,delete o.sa,o.saBase=(new a).move(t.hem).line(t.hips).curve(t.hipsCp2,t.waistCp1,t.waist).curve_(t.waistCp2,t.armhole).curve(t.armholeCp2,t.armholeHollowCp1,t.armholeHollow).curve(t.armholeHollowCp2,t.armholePitchCp1,t.armholePitch).curve(t.armholePitchCp2,t.shoulderCp1,t.shoulder).line(t.neck).curve(t.neckCp2,t.closureTopCp1,t.closureTop),"classic"===n.hemStyle?(o.saBase.line(t.closureBottom).line(t.hemTip)._curve(t.splitDartHemLeftCp1,t.splitDartHemLeft),o.hemBase=(new a).move(t.dartEnd).curve(t.splitDartHemRightCp2,t.splitHemCp1,t.hem)):"rounded"===n.hemStyle?(o.saBase.line(t.roundStart).curve(t.roundCp1,t.roundCp2,t.roundEnd).line(t.dartHemLeft),o.hemBase=(new a).move(t.dartEnd).line(t.hem)):(o.saBase.line(t.closureBottom).line(t.dartHemLeft),o.hemBase=(new a).move(t.dartEnd).line(t.hem)),o.dart=hf(m),o.seam=o.saBase.join(o.dart).join(o.hemBase).close().attr("class","fabric"),d&&(o.sa=o.saBase.offset(d).join(o.hemBase.offset(d)).close().addClass("fabric sa")),o.saBase.hide(),o.hemBase.hide(),o.dart.hide(),p&&(o.pocket=(new a).move(t.pocketTopMidLeft).line(t.pocketTopLeft).line(t.pocketBottomLeft).line(t.pocketBottomMidLeft).move(t.pocketBottomMidRight).line(t.pocketBottomRight).line(t.pocketTopRight).line(t.pocketTopMidRight).addClass("fabric dashed"),o.flb=(new a).move(t.dartTop).curve(t.flbCp,t.flbCpTop,t.flbTop).addClass("lining help"),r("banner",{id:"flbFacing",path:o.flb,text:"wahid:flbFacingSide",classes:"text-sm fill-fabric center"}),r("banner",{id:"flbLining",path:o.flb,text:"wahid:flbLiningSide",dy:7,classes:"text-sm fill-lining center"})),h.cutlist.setCut({cut:2,from:"fabric"}),h.cutlist.addCut({cut:2,from:"interfacing"}),t.button1=new e(0,t.closureTop.y+10);let C=t.button1.dist(t.lastButton)/(n.buttons-1);for(let v=1;v<=n.buttons;v++)t["button"+v]=t.button1.shift(-90,C*(v-1)),l["button"+v]=new c("button",t["button"+v]),l["buttonhole"+v]=new c("button
1hole",t["button"+v]).attr("data-rotate",90);return r("grainline",{to:t.neck,from:new e(t.neck.x,t.cfHem.y)}),r("title",{at:t.flbCpTop,title:"front",nr:1,align:"center"}),r("hd",{id:"wFrontEdgeToHps",from:t.closureTop,to:t.neck,y:t.neck.y-15-d}),r("hd",{id:"wFrontEdgeToShoulder",from:t.closureTop,to:t.shoulder,y:t.neck.y-30-d}),r("hd",{id:"wFrontEdgeToArmhole",from:t.closureTop,to:t.armhole,y:t.neck.y-45-d}),r("ld",{id:"lShoulderSeam",from:t.neck,to:t.shoulder,d:15+d}),r("ld",{id:"lHpsToFlb",from:t.neck,to:t.flbTop,d:-15}),r("vd",{id:"hArmholeToShoulder",from:t.armhole,to:t.shoulder,x:t.armhole.x+15+d}),r("vd",{id:"hArmholeToHps",from:t.armhole,to:t.neck,x:t.armhole.x+30+d}),r("vd",{id:"hHemToArmhole",from:t.hem,to:t.armhole,x:(t.armhole.x>t.hem.x?t.armhole.x:t.hem.x)+15+d}),r("vd",{id:"hDartRightToArmhole",from:"classic"===n.hemStyle?t.splitDartHemRight:t.dartHemRight,to:t.armhole,x:(t.armhole.x>t.hem.x?t.armhole.x:t.hem.x)+30+d}),r("vd",{id:"hDartLeftToArmhole",from:"classic"===n.hemStyle?t.splitDartHemLeft:t.dartHemLeft,to:t.armhole,x:(t.armhole.x>t.hem.x?t.armhole.x:t.hem.x)+45+d}),r("ld",{id:"wDartToSide",from:t.dartHemRight,to:t.hem,d:15}),"classic"===n.hemStyle?(r("hd",{id:"wHemChamfer",from:t.closureBottom,to:t.hemTip,y:t.hemTip.y+15+d}),r("vd",{id:"hHemChamfer",from:t.hemTip,to:t.closureBottom,x:t.closureBottom.x-15-d})):"rounded"===n.hemStyle&&(r("hd",{id:"wHemFinish",from:t.roundStart,to:t.roundEnd,y:t.roundEnd.y+15+d}),r("vd",{id:"hHemToButton",from:t.roundEnd,to:t.roundStart,x:t.roundStart.x-15-d})),r("hd",{id:"wFrontEdgeToDartStart",from:t.roundStart,to:t.dartHemLeft,y:t.hemTip.y+30+d}),r("hd",{id:"wFrontEdgeToDartEnd",from:t.roundStart,to:t.dartHemRight,y:t.hemTip.y+45+d}),r("hd",{id:"wFull",from:t.roundStart,to:t.hem,y:t.hemTip.y+60+d}),r("vd",{id:"hHemToPocketTopAtDart",from:t.roundEnd,to:t.pocketTopMidLeft,x:t.roundStart.x-30-d}),r("vd",{id:"hHemToWaist",from:t.roundEnd,to:t.dartWaistLeft,x:t.roundStart.x-45-d}),r("vd",{id:"hHemToClosureTop",from:t.roundEnd,to:t.closureTop,x:t.roundStart.x-60-d}),r("vd",{id:"hClosureTopToHps",from:t.closureTop,to:t.neck,x:t.closureTop.x-15-d}),r("vd",{id:"hBetweenButtons",from:t.button2,to:t.button1,x:t.button1.x+15}),r("hd",{id:"wButtonFromEdge",from:t.closureTop,to:t.button2,y:t.button2.y+15}),r("ld",{id:"lDartAtWaist",from:t.dartWaistLeft,to:t.dartWaistRight}),r("ld",{id:"lDartAtHip",from:t.dartHipLeft,to:t.dartHipRight}),r("ld",{id:"lPocketTopLeft",from:t.pocketTopLeft,to:t.pocketTopMidLeft,d:15}),r("ld",{id:"lPocketTopRight",from:t.pocketTopMidRight,to:t.pocketTopRight,d:15}),r("ld",{id:"lPocketHeight",from:t.pocketBottomRight,to:t.pocketTopRight,d:-15}),r("vd",{id:"wPocketMidToDartTip",from:t.pocketTopMidLeft,to:t.dartTop,x:t.closureTop.x-30-d}),m}};const Cf={name:"wahid.back",from:N,hide:n.V9.HIDE_TREE,measurements:["hips","waist"],options:{backInset:{pct:15,min:10,max:20,menu:"advanced"},shoulderInset:uf,neckInset:gf,centerBackDart:{pct:2,min:0,max:5,menu:"fit"},backScyeDart:{deg:2,min:0,max:6,menu:"fit"},legacyWaistHips:wf},draft:function({points:t,Point:e,paths:o,Path:a,measurements:i,options:n,macro:s,store:r,sa:l,snippets:c,part:p}){for(let g of Object.keys(o))delete o[g];delete c.armholePitchNotch,n.legacyWaistHips||(t.waist=new e(i.waist*(1+n.waistEase)/4,t.cbWaist.y),t.hips=new e(i.hips*(1+n.hipsEase)/4,t.cbHips.y),t.hem=new e(t.hips.x,t.cbHem.y));let d=t.shoulder.dist(t.neck),h=d*n.backInset;t.armholePitch=t.armholePitch.shift(180,h),t.armholePitchCp1=t.armholePitchCp1.shift(180,h),t.armholePitchCp2=t.armholePitchCp2.shift(180,h),t.armholeHollow=t.armholeHollow.shift(180,h/2),t.armholeHollowCp2=t.armholeHollowCp2.shift(180,h/2),t.armholeHollowCp1=t.armholeHollowCp1.shift(180,h/2),t.shoulder=t.shoulder.shiftTowards(t.neck,d*n.shoulderInset),t.shoulderCp1=t.shoulderCp1.shift(t.shoulder.angle(t.neck),d*n.shoulderInset),t.neck=t.neck.shiftTowards(t.shoulder,d*n.neckInset),t.neckCp2=t.neck.shift(t.shoulder.angle(t.neck)+90,.1*d),t.cbNeck=(new a).move(t.cbNeck)._curve(t.neckCp2,t.neck).shiftAlong(i.shoulderToShoulder*n.centerBackDart),t.cbNeckCp2=new e(0,t.armholePitch.y),pf(p),t.dartStart=t.dartHemLeft,t.dartEnd=t.dartHemRight,df(p),t._dartWidth=t.cbNeckCp2.shiftFractionTowards(t.armholePitch.rotate(n.backScyeDart,t.cbNeckCp2),1.2),t.armholePitchTop=n.backScyeDart>0?(new a).move(t.armholePitch).curve(t.armholePitchCp2,t.shoulderCp1,t.shoulder).intersects((new a).move(t.cbNeckCp2).line(t._dartWidth)).pop():t.armholePitch.clone();let m=["cbNeck","neckCp2","neck","shoulder","shoulderCp1"];for(let g of m)t[g]=t[g].rotate(n.backScyeDart,t.cbNeckCp2);delete o.cutonfold,delete o.saBase,delete o.sa,o.saBase=(new a).move(t.hem).line(t.hips).curve(t.hipsCp2,t.waistCp1,t.waist).curve_(t.waistCp2,t.armhole).curve(t.armholeCp2,t.armholeHollowCp1,t.armholeHollow).curve(t.armholeHollowCp2,t.armholePitchCp1,t.armholePitch).curve(t.armholePitchCp2,t.shoulderCp1,t.shoulder).line(t.neck).curve_(t.neckCp2,t.cbNeck)._curve(t.cbNeckCp2,t.cbArmhole).line(t.cbHem),o.hemBase=(new a).move(t.cbHem).line(t.hem),o.dart=hf(p),o.seam=o.saBase.clone().line(t.dartHemLeft).join(o.dart).line(t.hem).attr("class","fabric"),l&&(o.sa=o.saBase.offset(l).join(o.hemBase.offset(l)).close().attr("class","fabric sa")),o.saBase.hide(),o.hemBase.hide(),o.hemBase.hide(),o.dart.hide();const f=r.get("wr12"),u=r.get("hr12");return 0===f&&0===u&&r.flag.warn({title:"wahid:noBackDart.t",desc:"wahid:noBackDart.d"}),r.cutlist.setCut({cut:2,from:"fabric"}),r.cutlist.addCut({cut:2,from:"lining"}),s("title",{at:t.title,title:"back",nr:2,align:"center"}),t.grainlineBottom=new e(t.logo.x/2,t.cbNeck.y),t.grainlineTop=new e(t.grainlineBottom.x,t.gridAnchor.y),s("grainline",{from:t.grainlineTop,to:t.grainlineBottom}),s("scalebox",{at:new e(t.logo.x,t.cfNeck.y)}),s("ld",{id:"lShoulderSeam",from:t.neck,to:t.shoulder,d:15+l}),s("hd",{id:"wCbDart",from:t.cbArmhole,to:t.cbNeck,y:t.cbNeck.y-15-l}),s("hd",{id:"wCbToHps",from:t.cbArmhole,to:t.neck,y:t.cbNeck.y-30-l}),s("hd",{id:"wCbToShoulder",from:t.cbArmhole,to:t.shoulder,y:t.cbNeck.y-45-l}),s("hd",{id:"wCbToArmholePitch",from:t.cbArmhole,to:t.armholePitch,y:t.armholePitch.y}),s("hd",{id:"wCbToDartTip",from:t.cbArmhole,to:t.dartTop,y:t.dartTop.y-15}),s("vd",{id:"hArmholeToArmholePitch",from:t.armhole,to:t.armholePitch,x:t.armhole.x+15+l}),s("vd",{id:"hArmholeTpShoulder",from:t.armhole,to:t.shoulder,x:t.armhole.x+30+l}),s("vd",{id:"hArmholeToHps",from:t.armhole,to:t.neck,x:t.armhole.x+45+l}),s("vd",{id:"hHemToWaist",from:t.hem,to:t.waist,x:t.armhole.x+15+l}),s("vd",{id:"hHemToArmhole",from:t.hem,to:t.armhole,x:t.armhole.x+30+l}),s("hd",{id:"wDartSideAtHemToSide",from:t.dartHemRight,to:t.hem,y:t.hem.y+3*l+15}),s("hd",{id:"wDartSideAtHemToCb",from:t.cbHem,to:t.dartHemLeft,y:t.hem.y+3*l+15}),s("hd",{id:"wAtHem",from:t.cbHem,to:t.hem,y:t.hem.y+3*l+30}),s("ld",{id:"lDartAtWaist",from:t.dartWaistLeft,to:t.dartWaistRight}),s("ld",{id:"wDartAtHip",from:t.dartHipLeft,to:t.dartHipRight}),s("vd",{id:"hHemToArmhole",from:t.cbHem,to:t.cbArmhole,x:t.cbHem.x-15-l}),s("vd",{id:"hHemToCbNeck",from:t.cbHem,to:t.cbNeck,x:t.cbHem.x-30-l}),s("vd",{id:"hFull",from:t.cbHem,to:t.neck,x:t.cbHem.x-45-l}),p}};const vf={name:"wahid.frontFacing",from:kf,draft:function({points:t,Point:e,paths:o,Path:a,options:i,macro:n,snippets:s,Snippet:r,store:l,expand:c,sa:p,part:d}){if(!c)return l.flag.note({msg:"wahid:cutFrontFacing",suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),l.flag.preset("expandIsOff"),d.hide();l.flag.preset("expandIsOn");for(let h of Object.keys(o).filter((t=>"grainline"!==t)))delete o[h];for(let h of Object.keys(s))delete s[h];return o.seam=(new a).move(t.dartStart).line(t.dartHipLeft).curve(t.dartHipLeftCpTop,t.dartWaistLeftCpBottom,t.dartWaistLeft).curve_(t.dartWaistLeftCpTop,t.dartTop).curve(t.flbCp,t.flbCpTop,t.flbTop).line(t.neck).curve(t.neckCp2,t.closureTopCp1,t.closureTop),"classic"===i.hemStyle?o.seam.line(t.closureBottom).line(t.hemTip)._curve(t.splitDartHemLeftCp1,t.splitDartHemLeft):"rounded"===i.hemStyle?o.seam.line(t.roundStart).curve(t.roundCp1,t.roundCp2,t.roundEnd).line(t.dartHemLeft):o.seam.line(t.closureBottom).line(t.dartHemLeft),o.seam.close().attr("class","fabric"),p&&(o.sa=o.seam.offset(p).attr("class","fabric sa")),l.cutlist.setCut({cut:2,from:"fabric"}),t.title=new e(t.dartWaistLeft.x/2,t.waist.y),n("title",{nr:"1a",at:t.title,title:"frontFacing"}),t.logo=t.closureTop.shiftFractionTowards(t.dartWaistLeft,.5),s.logo=new r("logo",t.logo),n("grainline",{to:t.neck,from:new e(t.neck.x,t.cfHem.y)}),d}};const yf={name:"wahid.frontLining",from:kf,draft:function({points:t,Point:e,paths:o,Path:a,options:i,macro:n,snippets:s,Snippet:r,store:l,sa:c,expand:p,part:d}){if(!p)return l.flag.note({msg:"wahid:cutFrontLining",suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),l.flag.preset("expandIsOff"),d.hide();l.flag.preset("expandIsOn");for(let h of Object.keys(o))delete o[h];for(let h of Object.keys(s))delete s[h];return o.seam=(new a).move(t.hem).line(t.hips).curve(t.hipsCp2,t.waistCp1,t.waist).curve_(t.waistCp2,t.armhole).curve(t.armholeCp2,t.armholeHollowCp1,t.armholeHollow).curve(t.armholeHollowCp2,t.armholePitchCp1,t.armholePitch).curve(t.armholePitchCp2,t.shoulderCp1,t.shoulder).line(t.flbTop).curve(t.flbCpTop,t.flbCp,t.dartTop)._curve(t.dartWaistRightCpTop,t.dartWaistRight).curve(t.dartWaistRightCpBottom,t.dartHipRightCpTop,t.dartHipRight).line(t.dartEnd),"classic"===i.hemStyle?o.seam.curve(t.splitDartHemRightCp2,t.splitHemCp1,t.hem):o.seam.line(t.hem),o.seam.close().setClass("lining"),c&&
1(o.sa=o.seam.offset(c).attr("class","lining sa")),l.cutlist.setCut({cut:2,from:"lining"}),n("grainline",{from:t.flbTop,to:new e(t.flbTop.x,t.dartTop.y)}),t.title=t.armhole.shiftFractionTowards(t.dartTop,.5),n("rmtitle"),n("title",{nr:"1b",at:t.title,title:"frontLining"}),t.logo=t.dartWaistRight.shiftFractionTowards(t.waist,.5),s.logo=new r("logo",t.logo),d}};const Tf={name:"wahid.pocketWelt",measurements:["hips"],options:{pocketWidth:mf,pocketAngle:bf,weltHeight:ff},draft:function({points:t,Point:e,paths:o,Path:a,measurements:i,store:n,options:s,macro:r,units:l,complete:c,expand:p,part:d}){const h=i.hips*s.pocketWidth,m=h*s.weltHeight;if(!p)return n.flag.note({msg:"wahid:cutPocketWelt",replace:{l:l(h),w:l(m)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),n.flag.preset("expandIsOff"),d.hide();n.flag.preset("expandIsOn"),t.topLeft=new e(0,0),t.topRight=new e(h+30,0),t.bottomLeft=new e(0,2*m+20),t.bottomRight=new e(t.topRight.x,t.bottomLeft.y),t.notchLeft=new e(15,10),t.notchRight=new e(h+15,10),t.midLeft=new e(0,m+10),t.midRight=new e(h+30,m+10),o.seam=(new a).move(t.topLeft).line(t.bottomLeft).line(t.bottomRight).line(t.topRight).line(t.topLeft).close().attr("class","fabric"),c&&(o.cutline=(new a).move(t.notchLeft).line(t.notchRight).attr("class","fabric stroke-sm dashed"),o.foldline=(new a).move(t.midLeft).line(t.midRight).attr("class","hint dotted")),n.cutlist.setCut({cut:2,from:"fabric"}),t.title=t.topLeft.shiftFractionTowards(t.bottomRight,.5),r("title",{nr:3,title:"pocketWelt",at:t.title,align:"center",scale:.666});let f=.1*t.topLeft.dist(t.topRight);return t.grainlineFromWelt=new e(t.topLeft.x,t.topLeft.y).shift(0,f),t.grainlineToWelt=new e(t.topLeft.x,t.topLeft.y).shift(0,f).shift(-90,2*m+20),t.grainlineToWeltRotated=t.grainlineToWelt.rotate(s.pocketAngle,t.grainlineFromWelt),r("grainline",{from:t.grainlineFromWelt,to:t.grainlineToWeltRotated}),r("sprinkle",{snippet:"notch",on:["notchLeft","notchRight"]}),r("hd",{id:"wBetweenNotches",from:t.notchLeft,to:t.notchRight,y:t.bottomLeft.y+15}),r("hd",{id:"wFull",from:t.bottomLeft,to:t.bottomRight,y:t.bottomLeft.y+30}),r("vd",{id:"hToNotch",from:t.midRight,to:t.notchRight,x:t.midRight.x+15}),r("vd",{id:"hHalf",from:t.midRight,to:t.topRight,x:t.midRight.x+30}),r("vd",{from:t.bottomRight,id:"hFull",to:t.topRight,x:t.midRight.x+45}),d}};const xf={name:"wahid.pocketBag",after:kf,draft:function({points:t,Point:e,paths:o,Path:a,measurements:i,utils:n,options:s,macro:r,store:l,part:c}){const p=i.hips*s.pocketWidth,d=l.get("pocketBagLength");t.topLeft=new e(0,0),t.topRight=new e(p+30,0),t.bottomLeft=new e(0,d+10),t.bottomRight=new e(t.topRight.x,t.bottomLeft.y);const h={roundLeft:r("round",{id:"roundLeft",from:t.topLeft,to:t.bottomRight,via:t.bottomLeft,radius:p/8,hidden:!0}),roundRight:r("round",{id:"roundRight",from:t.bottomLeft,to:t.topRight,via:t.bottomRight,radius:p/8,hidden:!0})};for(const m in h)for(const e of["start","cp1","cp2","end"])t[`${m}${n.capitalize(e)}`]=t[h[m].points[e]].copy();return o.seam=(new a).move(t.topLeft).line(t.roundLeftStart).curve(t.roundLeftCp1,t.roundLeftCp2,t.roundLeftEnd).line(t.roundRightStart).curve(t.roundRightCp1,t.roundRightCp2,t.roundRightEnd).line(t.topRight).line(t.topLeft).close().attr("class","lining"),l.cutlist.setCut({cut:2,from:"lining"}),t.title=t.topLeft.shiftFractionTowards(t.bottomRight,.5),r("title",{nr:5,title:"pocketBag",at:t.title,align:"center"}),r("grainline",{from:t.roundLeftEnd,to:new e(t.roundLeftEnd.x,t.topLeft.y)}),r("hd",{id:"wFull",from:t.bottomLeft,to:t.bottomRight,y:t.bottomLeft.y+15}),r("vd",{id:"hFull",from:t.bottomRight,to:t.topRight,x:t.topRight.x+15}),c}};const Bf={name:"wahid.pocketFacing",after:kf,draft:function({points:t,Point:e,paths:o,Path:a,measurements:i,utils:n,options:s,macro:r,complete:l,store:c,part:p}){const d=i.hips*s.pocketWidth,h=d*s.weltHeight,m=c.get("pocketBagLength")+h;t.topLeft=new e(0,0),t.topRight=new e(d+30,0),t.bottomLeft=new e(0,m+10),t.bottomRight=new e(t.topRight.x,t.bottomLeft.y),t.notchLeft=new e(15,10),t.notchRight=new e(d+15,10);
1const f={roundLeft:r("round",{id:"roundLeft",from:t.topLeft,to:t.bottomRight,via:t.bottomLeft,radius:d/8,hidden:!0}),roundRight:r("round",{id:"roundRight",from:t.bottomLeft,to:t.topRight,via:t.bottomRight,radius:d/8,hidden:!0})};for(const g in f)for(const e of["start","cp1","cp2","end"])t[`${g}${n.capitalize(e)}`]=t[f[g].points[e]].copy();o.seam=(new a).move(t.topLeft).line(t.roundLeftStart).curve(t.roundLeftCp1,t.roundLeftCp2,t.roundLeftEnd).line(t.roundRightStart).curve(t.roundRightCp1,t.roundRightCp2,t.roundRightEnd).line(t.topRight).line(t.topLeft).close().attr("class","fabric"),l&&(o.cutline=(new a).move(t.notchLeft).line(t.notchRight).attr("class","fabric stroke-sm dashed")),c.cutlist.setCut({cut:2,from:"fabric"}),t.title=t.topLeft.shiftFractionTowards(t.bottomRight,.5),r("title",{nr:4,title:"pocketFacing",at:t.title});let u=.1*t.topLeft.dist(t.topRight);return t.grainlineFromPocketFacing=new e(t.topLeft.x,t.topLeft.y).shift(0,u),t.grainlineToPocketFacing=new e(t.topLeft.x,t.topLeft.y).shift(0,u).shift(-90,m),t.grainlineToPocketFacingRotated=t.grainlineToPocketFacing.rotate(s.pocketAngle,t.grainlineFromPocketFacing),r("grainline",{from:t.grainlineFromPocketFacing,to:t.grainlineToPocketFacingRotated}),r("sprinkle",{snippet:"notch",on:["notchLeft","notchRight"]}),r("hd",{id:"wFull",from:t.bottomLeft,to:t.bottomRight,y:t.bottomLeft.y+15}),r("vd",{id:"hFull",from:t.bottomRight,to:t.topRight,x:t.topRight.x+15}),p}};const Sf={name:"wahid.pocketInterfacing",measurements:["hips"],options:{pocketWidth:mf,pocketAngle:bf,weltHeight:ff},draft:function({points:t,Point:e,paths:o,Path:a,measurements:i,options:n,macro:s,expand:r,units:l,store:c,complete:p,part:d}){const h=i.hips*n.pocketWidth,m=h*n.weltHeight;if(!r)return c.flag.note({msg:"wahid:cutPocketInterfacing",replace:{l:l(h),w:l(m)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),c.flag.preset("expandIsOff"),d.hide();c.flag.preset("expandIsOn"),t.topLeft=new e(0,0),t.topRight=new e(h+30,0),t.bottomLeft=new e(0,m+20),t.bottomRight=new e(t.topRight.x,t.bottomLeft.y),t.notchLeft=new e(15,10),t.notchRight=new e(h+15,10),o.seam=(new a).move(t.topLeft).line(t.bottomLeft).line(t.bottomRight).line(t.topRight).line(t.topLeft).close().attr("class","interfacing"),p&&(o.cutline=(new a).move(t.notchLeft).line(t.notchRight).attr("class","interfacing stroke-sm dashed")),c.cutlist.setCut({cut:2,from:"interfacing"}),t.title=t.topLeft.shiftFractionTowards(t.bottomRight,.5),s("title",{nr:6,title:"pocketInterfacing",at:t.title,align:"center",scale:.666});const f=.1*t.topLeft.dist(t.topRight);return t.grainlineFromInterfacing=new e(t.topLeft.x,t.topLeft.y).shift(0,f),t.grainlineToInterfacing=new e(t.topLeft.x,t.topLeft.y).shift(0,f).shift(-90,m+20),t.grainlineToInterfacingRotated=t.grainlineToInterfacing.rotate(n.pocketAngle,t.grainlineFromInterfacing),s("grainline",{from:t.grainlineFromInterfacing,to:t.grainlineToInterfacingRotated}),s("sprinkle",{snippet:"notch",on:["notchLeft","notchRight"]}),s("hd",{id:"wFull",from:t.bottomLeft,to:t.bottomRight,y:t.bottomLeft.y+15}),s("vd",{id:"hFull",from:t.bottomRight,to:t.topRight,x:t.topRight.x+15}),d}},Lf=new n.pT({data:lf,parts:[kf,Cf,vf,yf,Tf,xf,Bf,Sf]}),Pf=(0,n.D4)([_,cf],{o:{drop:Object.keys(_.en.o).filter((t=>0===t.indexOf("sleeve")))}}),Rf=JSON.parse('{"id":"walburga","name":"Walburga wappenrock","code":"Rika Tamaike","description":"A FreeSewing pattern for a wappenrock (tabard/surcoat), a historical European/medieval (ish) garment","design":"Rika Tamaike","difficulty":1,"tags":["bottoms","historical"],"techniques":["hem"],"version":"4.6.0","pkg":"@freesewing/walburga","collection":true}'),Ff={en:JSON.parse('{"t":"Walburga Wappenrock","d":"Walburga is a tabard/surcoat, a historical garment from medieval Europe","p":{"base":"Base","back":"Back","front":"Front"},"s":{},"o":{"headRatio":{"t":"Head ratio","d":"Controls the size of the head opening"},"lengthBonus":{"t":"Length bonus","d":"Allows variation of the length of the garment"},"widthBonus":{"t":"Width bonus","d":"Allows variation of the width of the garment"},"length":{"t":"Length","d":"Controls the length of the garment"},"length.toKnee":{"t":"To the knee","d":"Draft a surcoat that ends at the knee"},"length.toMidLeg":{"t":"To the middle of the leg","d":"Draft a surcoat that in the middle of the leg (below the knee)"},"length.toFloor":{"t":"To the floor","d":"Draft a full-length surcoat down to the floor"},"neckoRatio":{"t":"Neck opening shape","d":"Controls the shape of the neck opening"},"neckline":{"t":"Neckline","d":"Controls whether or not to draft a neck opening"},"necklineNo":{"t":"No neck opening","d":"Drafts a surcoat without neck opening"},"necklineYes":{"t":"With neck opening","d":"Drafts a surcoat with a neck opening included"}}}')};const Ef={bool:!0,menu:"style"},Wf={pct:100,min:10,max:190,menu:"style"},Hf={name:"walburga.base",hide:{self:!0},measurements:["head","shoulderToShoulder","hpsToWaistBack","waistToKnee","waistToHips","waistToFloor","waistToUpperLeg"],options:{headRatio:{pct:100,min:80,max:120,menu:"fit"},lengthBonus:{pct:85,min:60,max:130,menu:"style"},widthBonus:{pct:95,min:50,max:130,menu:"style"},length:{list:["toKnee","toMidLeg","toFloor"],dflt:"toKnee",menu:"style"},neckline:Ef,neckoRatio:Wf},draft:function({Point:t,points:e,Path:o,paths:a,measurements:i,options:s,macro:r,snippets:l,Snippet:c,sa:p,store:d,utils:h,part:m}){const f="toKnee"===s.length?i.waistToKnee:"toMidLeg"===s.length?i.waistToKnee/1.3:.95*i.waistToFloor,u=i.hpsToWaistBack+i.waistToHips,g=i.shoulderToShoulder/2*s.widthBonus,b=(i.hpsToWaistBack+f)*s.lengthBonus,w=i.head/4*s.headRatio;if(d.set("hhead",w),d.set("goldenRatio",n.fC),e.top=new t(0,0),e.bottom=new t(0,b),e.topLeft=e.top.shift(0,-g),e.bottomLeft=e.bottom.shift(0,e.bottom.dx(e.topLeft)),e.headLeft=e.top.shift(180,w),e.bottomMiddle=e.bottom.shiftFractionTowards(e.bottomLeft,.5),e.hips=e.top.shift(-90,u),e.hipsLeft=e.hips.shift(0,e.bottom.dx(e.bottomLeft)),e.triangle=e.bottom.shift(90,e.bottomLeft.dx(e.bottom)/n.fC),e.triangleLeft=e.triangle.shift(0,e.bottom.dx(e.bottomLeft)),a.seamBase=(new o).move(e.headLeft).line(e.topLeft).line(e.triangleLeft).line(e.bottomMiddle).line(e.triangle).hide(),a.seam=(new o).move(e.top).line(e.topLeft).join(a.seamBase).line(e.top).close().attr("class","fabric"),p){const t=e.bottomMiddle.angle(e.triangle);a.saBase=(new o).noop("start").move(e.topLeft.shift(90,p)).line(e.topLeft.shift(180,p)).line(e.triangleLeft.shift(180,p)).line(e.triangleLeft.shift(180+t,p)).line(e.bottomMiddle.shift(180+t,p)).line(e.bottomMiddle.shift(270+t,p)).line(h.beamIntersectsX(e.bottomMiddle.shift(270+t,p),e.triangle.shift(270+t,p),e.triangle.x)).line(e.triangle).hide(),a.sa=a.saBase.insop("start",(new o).move(e.top).line(e.top.shift(90,p)).line(e.topLeft.shift(90,p))).addClass("fabric sa").unhide()}return d.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),!1===s.neckline&&(l.hl=new c("notch",e.headLeft)),r("cutonfold",{from:e.triangle,to:e.top,grainline:!0}),e.logo=e.top.shift(45,e.bottom.dy(e.top)/5),l.logo=new c("logo",e.logo),e.title=e.logo.shift(90,e.bottom.dy(e.top)/4),r("title",{at:e.title,nr:1,title:"wappenrock-base",align:"center"}),e.scalebox=e.title.shift(90,e.bottom.dy(e.top)/5),r("scalebox",{at:e.scalebox}),r("vd",{from:e.bottom,to:e.top,x:e.bottom.x+15}),r("vd",{id:"hTip",from:e.bottomMiddle,to:e.triangleLeft,x:e.bottomLeft.x-15-p}),r("vd",{id:"hSide",from:e.topLeft,to:e.triangleLeft,x:e.bottomLeft.x-30-p}),r("hd",{id:"wFull",from:e.topLeft,to:e.top,y:e.top.y-30-p}),r("hd",{id:"wTohead",from:e.headLeft,to:e.top,y:e.top.y-15-p}),r("hd",{id:"wFromHead",from:e.topLeft,to:e.headLeft,y:e.top.y-15-p}),r("hd",{id:"wHalfTip",from:e.triangleLeft,to:e.bottomMiddle,y:e.bottomMiddle.y+p+15}),r("vd",{id:"hHipsToStartTip",from:e.triangleLeft,to:e.hipsLeft,x:e.triangleLeft.x-15-p}),r("ld",{id:"lTip",from:e.triangleLeft,to:e.bottomMiddle,d:-15-p}),m}};const Af={name:"walburga.front",from:Hf,measurements:["neck"],options:{neckline:Ef,neckoRatio:Wf},draft:function({points:t,Path:e,paths:o,measurements:a,options:i,macro:n,snippets:s,Snippet:r,sa:l,store:c,utils:p,part:d}){const h=2*c.get("hhead"),m=c.get("goldenRatio"),f=m*i.neckoRatio;if(!0===i.neckline){let i,n;i=1/4*(-(f**2)*h+Math.sqrt(4*h**2*f**2+h**2*f**4)),n=2*i/f,i<a.neck/4&&(i=a.neck/4,n=2*a.neck/4/m),n<a.neck/4&&(n=a.neck/4,i=a.neck/4*m/2),t.neckotop=t.top.shift(0,-i),t.neckomid=t.top.shift(-90,n),o.seam=(new e).move(t.neckomid).line(t.neckotop).line(t.headLeft).join(o.seamBase).line(t.neckomid).close().attr("class","fabric")}return l&&!0===i.neckline&&(o.saHelper=(new e).move(t.neckomid).line(t.neckotop).offset(l).hide(),o.sa=o.saBase.insop("start",(new e).move(t.neckomid).line(p.beamIntersectsX(o.saHelper.start(),o.saHelper.end(),t.neckomid.x)).line(p.beamIntersectsY(o.saHelper.start(),o.saHelper.end(),t.neckotop.y-l)).line(t.topLeft.shift(90,l))).attr("class","fabric sa").unhide()),!0===i.neckline&&(n("rmcutonfold"),n("cutonfold",{from:t.triangle,to:t.neckomid,grainline:!0})),t.logo=t.top.shift(45,t.bottom.dy(t.top)/5),s.logo=new r("logo",t.logo),t.title=t.logo.shift(90,t.bottom.dy(t.top)/4),n("title",{at:t.title,nr:1,title:"front",align:"center"}),t.scalebox=t.title.shift(90,t.bottom.dy(t.top)/5),n("scalebox",{at:t.scalebox}),i.neckline&&(n("ld",{id:"lNeckOpening",from:t.neckotop,to:t.neckomid,d:-15}),n("hd",{id:"wNeckOpening",from:t.neckomid,to:t.neckotop,y:t.top.y-l-15}),n("vd",{id:"hNeckOpening",from:t.neckotop,to:t.neckomid,x:t.to
1p.x+l+15})),d}};const Of={name:"walburga.back",from:Hf,draft:function({points:t,macro:e,snippets:o,Snippet:a,part:i}){return t.logo=t.top.shift(45,t.bottom.dy(t.top)/5),o.logo=new a("logo",t.logo),t.title=t.logo.shift(90,t.bottom.dy(t.top)/4),e("title",{at:t.title,nr:2,title:"back",align:"center"}),t.scalebox=t.title.shift(90,t.bottom.dy(t.top)/5),e("scalebox",{at:t.scalebox}),i}},Df=new n.pT({data:Rf,parts:[Of,Af]}),Nf=JSON.parse('{"id":"waralee","name":"Waralee wrap pants","code":"Wouter Van Wageningen","description":"A FreeSewing pattern for wrap pants","design":"Wouter Van Wageningen","difficulty":2,"tags":["bottoms","trousers"],"techniques":["curved-seam","hem","welt-pocket"],"version":"4.6.0","pkg":"@freesewing/waralee","collection":true}'),If={en:JSON.parse('{"t":"Waralee wrap pants","d":"Waralee are wrap pants.","p":{"backPocket":"Back pocket","cutout":"Cutout","facingBack":"Back Pocket Facing","facingFront":"Front Pocket Facing","mini":"Mini version","pants":"Pants","pantsProto":"Pants prototype","pocket":"Pocket","strapBack":"Strap back","strapFront":"Strap front","waistbandBack":"Waistband back","waistbandFront":"Waistband front"},"s":{"thisIsNotAPart":"This is not a real part","doNotCutFromFabric":"Do not cut this from the fabric","useMeasurementsToCutFromFabric":"Use these measurements to cut the shape from the fabric","cutBackPocket.t":"The back pocket is not shown","cutBackPocket.d":"The **back pocket** is made of two rectangles of fabric {{{ width }}} wide and {{{ length }}} long.","cutFacingback.t":"The back pocket facing is not shown","cutFacingback.d":"The **back pocket facing** is made of a rectangle of fabric {{{ width }}} wide and {{{ length }}} long.","cutFacingfront.t":"The front pocket facing is not shown","cutFacingfront.d":"The **front pocket facing** is made of a rectangle of fabric {{{ width }}} wide and {{{ length }}} long.","cutwaistbandBack.t":"The back waist band is not shown","cutwaistbandBack.d":"The **back waist band** is made of two strips of fabric {{{ width }}} wide and {{{ length }}} long.","cutwaistbandFront.t":"The front waist band is not shown","cutwaistbandFront.d":"The **front waist band** is made of two strips of fabric {{{ width }}} wide and {{{ length }}} long.","cutstrapBack.t":"The back strap is not shown","cutstrapBack.d":"The **back strap** is made of two strips of fabric {{{ width }}} wide and {{{ length }}} long.","cutstrapFront.t":"The front strap is not shown","cutstrapFront.d":"The **front strap** is made of two strips of fabric {{{ width }}} wide and {{{ length }}} long.","showPants.t":"The full pants are shown","showPants.d":"The **full pants** are shown. This takes up a lot of paper to print. Consider hiding this part, and a minimized version will show with the dimensions.","hidePants.t":"The full pants are not shown","hidePants.d":"The **full pants** are not shown. Instead a minimized version is show with the dimensions, allowing you cut this directly from the fabric. This saves considerably on the required paper to print this pattern."},"o":{"backPocket":{"t":"Back pocket","d":"Whether to include a back pocket or not"},"backPocketYes":{"t":"Back pocket","d":"The back pocket is included"},"backPocketNo":{"t":"No Back pocket","d":"The pattern is drawn without a back pocket"},"frontPocket":{"t":"Front pocket","d":"Whether to include a front pocket or not"},"frontPocketYes":{"t":"Front pocket","d":"The front pocket is included"},"frontPocketNo":{"t":"No Front pocket","d":"The pattern is drawn without a front pocket"},"hemWidth":{"t":"Hem size","d":"Size of the hem at the bottom of the pants"},"waistbandWidth":{"t":"Waist Band","d":"Size of the waist band"},"waistRaise":{"t":"Waist Raise","d":"How much to raise the waist from the seat depth measurement. This influences the depth of the crotch cut-out."},"crotchBack":{"t":"Crotch Back","d":"The percentage of the seat circumference that the back crotch needs to occupy. This creates more or less space between the side seam and the back."},"crotchFront":{"t":"Crotch Front","d":"The percentage of the seat circumference that the front crotch needs to occupy. This creates more or less space between the side seam and the front."},"crotchFactorBackHor":{"t":"Back Crotch Factor Horizontal","d":"Used to move the curve of the crotch in the back horizontally"},"crotchFactorBackVer":{"t":"Back Crotch Factor Vertical","d":"Used to move the curve of the crotch in the back vertically"},"crotchFactorFrontHor":{"t":"Front Crotch Factor Horizontal","d":"Used to move the curve of the crotch in the front horizontally"},"crotchFactorFrontVer":{"t":"Front Crotch Factor Vertical","d":"Used to move the curve of the crotch in the front vertically"},"waistOverlap":{"t":"Waist Overlap","d":"This dictates how much you want the leg flaps to overlap at the waist. A setting of 0 would have them meet at the side seam, and a setting of 100 makes them meet at the front/back."},"legSize":{"t":"Leg Size","d":"This dictates how long the pants will be. It is a factor of the inseam measurement. The larger the value, the longer the pants."},"backRaise":{"t":"Back Raise","d":"This setting raises the waist in the back. Our waist does not sit horizontally, but is angled up at the back. This setting allows you to raise this in the back if you need it for a good fit."},"fitWaist":{"t":"Fit the garment to the waist","d":"Traditionally, wrap pants are not fitted to the waist, and just use the flexibility of the fabric to adjust."},"fitWaistNo":{"t":"Do not fit the garment to the waist","d":"The traditional wrap pants."},"fitWaistYes":{"t":"Fit the garment to the waist","d":"Adjust the crotch cutout to make the waist fit better."},"frontPocketStyle":{"t":"Front pocket style","d":"A welt pocket, or a pocket hidden in the waistband."},"frontPocketStyle.welt":{"t":"Welt style Front pocket","d":"The front pocket will be a welt pocket, slanted, and hidden by the overlap."},"frontPocketStyle.waistband":{"t":"Waistband Front pocket","d":"The front pocket will be hidden in the seam of the waistband."},"knotPlacement":{"t":"Placement of the knot(s)","d":"The knot of the wrap straps can be placed in the front, back, or both front and back (traditional)."},"knotPlacement.front":{"t":"Knot in the front","d":"The knot of the wrap straps will be in the front."},"knotPlacement.back":{"t":"Knot in the back","d":"The knot of the wrap straps will be in the back."},"knotPlacement.traditional":{"t":"Knot in the front and back","d":"The knot of the wrap straps will be in the front and the back."},"separateWaistband":{"t":"Create a separate waistband","d":"Create a separate waistband, or have a hem the size of the waistband."},"separateWaistbandNo":{"t":"No separate waistband","d":"The waistband is created by a folded hem."},"separateWaistbandYes":{"t":"Separate waistband","d":"The waistband is a separate piece, and sewn onto the pants."}}}')},Mf={backRaise:{pct:10,min:0,max:25,toAbs:(t,{measurements:e,options:o},a)=>t*(e.crotchDepth*(1+a.waistRaise)*a.crotchEase),menu:"fit"},waistRaise:{pct:0,min:-20,max:40,toAbs:(t,{measurements:e,options:o},a)=>e.crotchDepth*(1+t),menu:"fit"},fitWaist:{bool:!0,menu:"fit"},hemWidth:{pct:1.75,min:1,max:2.5,...(0,n.Wx)("inseam"),menu:"style"},legSize:{pct:75,max:90,min:50,...(0,n.Wx)("inseam"),menu:"style"},waistOverlap:{pct:50,min:10,max:100,toAbs:(t,{measurements:e,options:o},a)=>{const i=void 0===e.waist||0==a.fitWaist?e.seat:e.waist;return(e.seat>i?e.seat:i)*t},menu:"style"},frontPocket:{bool:!0,menu:"style"},backPocket:{bool:!0,menu:"style"},waistbandWidth:{pct:3.5,min:2,max:5,...(0,n.Wx)("inseam"),menu:"style"},frontPocketStyle:{dflt:"welt",list:["welt","waistband"],menu:"style"},separateWaistband:{bool:!1,menu:"style"},knotPlacement:{dflt:"front",list:["front","back","traditional"],menu:"style"},crotchFront:{pct:30,min:10,max:70,menu:"advanced"},crotchBack:{pct:45,min:10,max:70,menu:"advanced"},crotchFactorFrontHor:{pct:90,min:10,max:100,menu:"advanced"},crotchFactorFrontVer:{pct:30,min:10,max:70,menu:"advanced"},crotchFactorBackHor:{pct:90,min:10,max:100,menu:"advanced"},crotchFactorBackVer:{pct:60,min:20,max:90,menu:"advanced"},backWaistAdjustment:.3,frontPocketVerticalOffset:.07,frontPocketHorizontalOffset:.18,frontPocketSize:.45,frontPocketWidthHeightRatio:.076,frontPocketDepthFactor:1.6,frontWaistAdjustment:.163,backPocketDepth:.5,backPocketVerticalOffset:.2,backPocketHorizontalOffset:.045,backPocketSize:.45,crotchEase:1.08},_f={name:"waralee.pantsProto",hide:{self:!0},measurements:["seat","inseam","crotchDepth","waistToHips"],optionalMeasurements:["waist","waistBack"],options:Mf,draft:({options:t,measurements:e,Point:o,Path:a,points:i,paths:n,store:s,part:r,utils:l})=>{const c=e.crotchDepth*(1+t.waistRaise)*t.crotchEase,p=void 0===e.waist||0==t.fitWaist?e.seat:e.waist,d=e.seat>p?e.seat:p,h=void 0===e.waistBack||0==t.fitWaist?p/2:e.waistBack,m=t.separateWaistband||"waistband"==t.frontPocketStyle,f=d/4,u=e.inseam*t.hemWidth,g=e.inseam*t.waistbandWidth,b=t.frontPocketSize*e.crotchDepth,w=(e.crotchDepth-e.waistToHips)*t.frontPocketDepthFactor>1.75*b?(e.crotchDepth-e.waistToHips)*t.frontPocketDepthFactor:1.75*b,k=b*t.frontPocketWidthHeightRatio;s.set("waistBand",g),s.set("hem",u),s.set("pocketDepth",w),s.set("frontPocketSize",b),i.mWaist=new o(0,0),i.mHip=i.mWaist.shift(270,c),i.fWaistSide=i.mWaist.shift(180,t.crotchFront*f).shift(90,g),i.fWaistCrotchCP=i.fWaistSide.shift(270,c*t.crotchFactorFrontVer+g),i.fHipCrotchCP=i.mHip.shift(180,t.crotchFront*f*t.crotchFactorFrontHor),i.fHipSide=i.mHip.shift(180,t.crotchFront*f),i.bWaistSide=i.mWaist.shift(0,t.crotchBack*f).shift(90,g).shift(90,t.backRaise*c),i.bWaistCrotchCP=i.bWaistSide.shift(270,c*t.crotchFactorBackVer),i.bHipCrotchCP=i.mHip.shift(0,t.crotchBack*f*t.crotchFactorBackHor),i.bHipSide=i.mHip.shift(0,t.crotchBack*f),i.fCutOutHip=(new a).move(i.fWaistSide).curve(i.fWaistCrotchCP,i.fHipCrotchCP,i.mHip).shiftAlong(e.waistToHips+g),i.bCutOutHip=(new a).move(i.bWaistSide).curve(i.bWaistCrotchCP,i.bHipCrotchCP,i.mHip).shiftAlong(e.waistToHips+g+t.backRaise*c);const C=e.seat/2-h,v=e.seat/2-(p-h);i.bWaistAdjusted=i.bWaistSide.shift(0,C*t.backWaistAdjustment),i.fWaistAdjusted=i.fWaistSide.shift(180,v*t.frontWaistAdjustment),i.mLeg=i.mHip.shift(270,e.inseam*t.legSize),i.fLegSide=i.mLeg.shift(180,t.crotchFront*f),i.bLegSide=i.mLeg.shift(0,t.crotchBack*f),i.fWaistFront=i.fWaistSide.shift(180,f),i.fWaistFrontOverlap=i.fWaistFront.shift(180,t.waistOverlap*f),i.fHipFront=i.fHipSide.shift(180,f),i.fHipFrontOverlap=i.fHipFront.shift(180,t.waistOverlap*f),i.fLegFront=i.fLegSide.shift(180,f),i.fLegFrontOverlap=i.fLegFront.shift(180,t.waistOverlap*f);const y=Math.sqrt(f*f-t.backRaise*c*t.backRaise*c);i.bWaistBack=i.mWaist.shift(90,g).shift(0,t.crotchBack*f+y),i.bWaistBackOverlap=i.bWaistBack.shift(0,t.waistOverlap*f),i.bHipBack=i.bHipSide.shift(0,f),i.bHipBackOverlap=i.bHipBack.shift(0,t.waistOverlap*f),i.bLegBack=i.bLegSide.shift(0,f),i.bLegBackOverlap=i.bLegBack.shift(0,t.waistOverlap*f),i.bWaistSideTemp=i.bWaistSide.shift(0,2);const T=(new a).move(i.fWaistSide).curve(i.fWaistCrotchCP,i.fHipCrotchCP,i.mHip).split(i.fCutOutHip),x=(new a).move(i.bWaistSide).curve(i.bWaistCrotchCP,i.bHipCrotchCP,i.mHip).split(i.bCutOutHip);if(T[0].hide(),T[1].hide(),x[0].hide(),x[1].hide(),i.fCutOutHipCp1=T[1].ops[1].cp1.shiftFractionTowards(i.fCutOutHip,1.25),i.fCutOutHipCp2=T[1].ops[1].cp1.clone(),i.mHipCp1=T[1].ops[1].cp2.clone(),i.mHipCp2=x[1].ops[1].cp2.clone(),i.bCutOutHipCp1=x[1].ops[1].cp1.clone(),i.bCutOutHipCp2=x[1].ops[1].cp1.shiftFractionTowards(i.bCutOutHip,1.25),n.frontBottomCutOut=(new a).move(i.mHip).curve(i.mHipCp1,i.fCutOutHipCp2,i.fCutOutHip).hide(),n.backBottomCutOut=(new a).move(i.bCutOutHip).curve(i.bCutOutHipCp1,i.mHipCp2,i.mHip).hide(),n.frontTopCutOut=(new a).move(i.fCutOutHip).curve(i.fCutOutHipCp1,i.fWaistAdjusted,i.fWaistAdjusted).hide(),n.backTopCutOut=(new a).move(i.bWaistAdjusted).curve(i.bWaistAdjusted,i.bCutOutHipCp2,i.bCutOutHip).hide(),i.fWaistSideHem=n.frontTopCutOut.reverse().shiftAlong(g),i.fWaistSideSeam=n.frontTopCutOut.reverse().shiftAlong(2*g),i.fWaistSide=i.fWaistSideSeam.flipY(i.fWaistSideHem),i.bWaistSideHem=n.backTopCutOut.shiftAlong(g),i.bWaistSideSeam=n.backTopCutOut.shiftAlong(2*g),i.bWaistSide=i.bWaistSideSeam.flipY(i.bWaistSideHem),i.fWaistFrontOverlapHem=i.fWaistFrontOverlap.shift(270,g),i.bWaistBackHem=i.bWaistBack.shift(270,g),i.bWaistBackOverlapHem=i.bWaistBackOverlap.shift(270,g),i.fWaistFrontOverlapSeam=i.fWaistFrontOverlap.shift(270,2*g),i.bWaistBackSeam=i.bWaistBack.shift(270,2*g),i.bWaistBackOverlapSeam=i.bWaistBackOverlap.shift(270,2*g),i.fWaistSideCp2=n.frontTopCutOut.split(i.fWaistSideSeam)[0].ops[1].cp2.clone(),i.fWaistSideCp2=n.frontTopCutOut.split(i.fWaistSideSeam)[0].ops[1].cp2.clone(),i.fWaistHipCp1=n.frontTopCutOut.split(i.fWaistSideSeam)[0].ops[1].cp1.clone(),i.bWaistSideCp1=n.backTopCutOut.split(i.bWaistSideSeam)[1].ops[1].cp1.clone(),i.bWaistHipCp2=n.backTopCutOut.split(i.bWaistSideSeam)[1].ops[1].cp2.clone(),i.mWaist1=new o(i.mWaist.x,m?i.fWaistSideSeam.y:i.fWaistSide.y),i.mWaist2=new o(i.mWaist.x,m?i.bWaistSideSeam.y:i.bWaistSide.y),n.frontTopCutOut=(new a).move(i.fCutOutHip).curve(i.fCutOutHipCp1,i.fWaistSideCp2,i.fWaistSideSeam).hide(),0==m&&(n.frontTopCutOut.line(i.fWaistSideHem),n.frontTopCutOut.line(i.fWaistSide)),n.backTopCutOut=0==m?(new a).move(i.bWaistSide).line(i.bWaistSideHem).line(i.bWaistSideSeam):(new a).move(i.bWaistSideSeam),n.backTopCutOut.curve(i.bWaistSideCp1,i.bCutOutHipCp2,i.bCutOutHip).hide(),n.cutout=n.backTopCutOut.join(n.backBottomCutOut).join(n.frontBottomCutOut).join(n.frontTopCutOut).hide(),n.waistBack=(new a).move(m?i.bWaistBackOverlapSeam:i.bWaistBackOverlap).line(m?i.bWaistBackSeam:i.bWaistBack).line(m?i.bWaistSideSeam:i.bWaistSide).hide(),n.waistFront=(new a).move(m?i.fWaistSideSeam:i.fWaistSide).line(m?i.fWaistFrontOverlapSeam:i.fWaistFrontOverlap).hide(),n.front=(new a).move(m?i.fWaistFrontOverlapSeam:i.fWaistFrontOverlap).line(i.fHipFrontOverlap).line(i.fLegFrontOverlap).hide(),n.back=(new a).move(i.bLegBackOverlap).line(i.bHipBackOverlap).line(m?i.bWaistBackOverlapSeam:i.bWaistBackOverlap).hide(),n.leg=(new a).move(i.fLegFrontOverlap).line(i.bLegBackOverlap).hide(),n.seam=n.waistFront.join(n.front).join(n.leg).join(n.back).join(n.waistBack).join(n.cutout).close().addClass("fabric").hide(),t.frontPocket){i.frontPocketTop=i.fWaistSideSeam.shift(270,t.frontPocketVerticalOffset*e.crotchDepth+g*(m?1:2)).shift(180,t.frontPocketHorizontalOffset*e.seat),i.frontPocketTop2=i.frontPocketTop.shift(340,k),i.frontPocketBottom=i.frontPocketTop.shift(250,b),i.frontPocketBottom2=i.frontPocketBottom.shift(340,k),n.frontPocket=(new a).move(i.frontPocketTop).line(i.frontPocketBottom).line(i.frontPocketBottom2).line(i.frontPocketTop2).close().addClass("fabric").hide(),i.frontPocketSeam=l.beamsIntersect(i.frontPocketBottom,i.frontPocketTop,i.fWaistSideSeam,i.fWaistFrontOverlapSeam);const o=i.frontPocketTop.dist(i.frontPocketSeam);i.frontPocketTopLeft=i.frontPocketSeam.shiftTowards(i.fWaistFrontOverlapSeam,k),i.frontPocketTopRight=i.frontPocketTopLeft.shift(0,w*(1/3)),i.frontPocketBottomRight=i.frontPocketTopRight.shift(270,w+o),i.frontPocketBottomLeft=i.frontPocketTopLeft.shift(250,w*(5/6)+o),i.frontPocketBottomRightCP=i.frontPocketBottomRight.shift(180,w*(1/6)),i.frontPocketBottomLeftCP=i.frontPocketBottomLeft.shift(315,w*(1/4)),n.frontPocketSeamSA=(new a).move(i.frontPocketTopRight).line(i.frontPocketTopLeft).line(i.frontPocketBottomLeft).curve(i.frontPocketBottomLeftCP,
1i.frontPocketBottomRightCP,i.frontPocketBottomRight).hide(),n.frontPocketSeam=(new a).move(i.frontPocketBottomRight).line(i.frontPocketTopRight).join(n.frontPocketSeamSA).close().addClass("dotted mark").hide()}return t.backPocket&&(i.backPocketRight=i.bWaistBack.shiftTowards(i.bWaistSide,t.backPocketHorizontalOffset*e.seat).shift(270,t.backPocketVerticalOffset*e.crotchDepth+g*(m?1:2)),i.backPocketLeft=i.bWaistBack.shiftTowards(i.bWaistSide,t.backPocketHorizontalOffset*e.seat+t.backPocketSize*e.crotchDepth).shift(270,t.backPocketVerticalOffset*e.crotchDepth+g*(m?1:2)),i.backPocketRight2=i.backPocketRight.shift(i.backPocketRight.angle(i.backPocketLeft)+90,12),i.backPocketLeft2=i.backPocketLeft.shift(i.backPocketLeft.angle(i.backPocketRight)-90,12),n.backPocket=(new a).move(i.backPocketLeft).line(i.backPocketLeft2).line(i.backPocketRight2).line(i.backPocketRight).close().addClass("fabric").hide()),r.hide()}},jf={name:"waralee.pants",from:_f,draft:({options:t,points:e,Path:o,paths:a,Snippet:i,snippets:n,sa:s,macro:r,store:l,expand:c,part:p})=>{const d=t.separateWaistband||"waistband"==t.frontPocketStyle;if(!c)return l.flag.note({msg:"waralee:hidePants"}),l.flag.preset("expand"),p.hide();l.flag.note({msg:"waralee:showPants",suggest:{text:"flag:hide",icon:"expand",update:{settings:["expand",0]}}}),0==d&&(a.waistFoldBack=(new o).move(e.bWaistSideHem).line(d?e.bWaistBackSeam:e.bWaistBackHem).line(d?e.bWaistBackSeam:e.bWaistBackOverlapHem).addClass("fabric stroke-sm"),a.waistFoldFront=(new o).move(e.fWaistSideHem).line(e.fWaistFrontOverlapHem).addClass("fabric stroke-sm")),a.frontFold=a.front.offset(-1*l.get("hem")).addClass("fabric stroke-sm"),a.legFold=a.leg.offset(-1*l.get("hem")).addClass("fabric stroke-sm"),a.backFold=a.back.offset(-1*l.get("hem")).addClass("fabric stroke-sm"),a.seam.unhide(),l.cutlist.addCut({cut:2,from:"fabric"}),e.title=e.fWaistFront.shift(270,400),r("title",{nr:1,at:e.title,title:"pants"}),e.logo=e.title.shift(270,75),n.logo=new i("logo",e.logo),r("scalebox",{at:e.mHip.shift(-90,70)}),s&&(a.sa=a.seam.offset(s).addClass("fabric sa")),t.frontPocket&&"welt"==t.frontPocketStyle&&(a.frontPocket.unhide(),a.frontPocketSeam.unhide()),t.backPocket&&a.backPocket.unhide();let h=d?e.fWaistSideSeam:e.fWaistSide,m=d?e.bWaistSideSeam:e.bWaistSide;return r("hd",{id:1,from:h,to:e.mWaist1,y:h.y}),r("hd",{id:2,from:e.fWaistFrontOverlap,to:e.mWaist1,y:h.y-s-15}),r("hd",{id:2,from:e.mWaist,to:m,y:m.y}),r("hd",{id:3,from:e.mWaist1,to:d?e.bWaistBackSeam:e.bWaistBack,y:m.y-s-15}),r("hd",{id:4,from:e.mWaist1,to:d?e.bWaistBackSeam:e.bWaistBackOverlap,y:m.y-s-30}),r("vd",{id:5,from:e.mWaist1,to:e.mHip,x:e.mWaist.x}),r("vd",{id:6,from:m,to:d?e.bWaistBackSeam:e.bWaistBack,x:m.x+15}),r("vd",{id:7,from:d?e.bWaistBackSeam:e.bWaistBackOverlap,to:e.bLegBackOverlap,x:e.bLegBackOverlap.x-30}),0==d&&(r("vd",{id:8,from:e.fWaistSide,to:e.fWaistSideHem,x:e.fWaistSide.x+10}),t.frontPocket&&"welt"==t.frontPocketStyle&&(r("vd",{id:9,from:h,to:e.frontPocketTop,x:e.frontPocketTop.x}),r("vd",{id:10,from:h,to:e.frontPocketBottom,x:e.frontPocketBottom.x}),r("hd",{id:11,from:e.frontPocketTop,to:h,y:e.frontPocketTop.y}),r("hd",{id:12,from:e.frontPocketBottom,to:h,y:e.frontPocketBottom.y})),t.backPocket&&(r("vd",{id:13,from:m,to:e.backPocketLeft,x:e.backPocketLeft.x}),r("vd",{id:14,from:m,to:e.backPocketRight,x:e.backPocketRight.x}),r("hd",{id:15,from:m,to:e.backPocketLeft,y:e.backPocketLeft.y}),r("hd",{id:16,from:m,to:e.backPocketRight,y:e.backPocketRight.y}))),p}},Gf={name:"waralee.cutout",from:_f,draft:({options:t,Path:e,points:o,paths:a,Snippet:i,snippets:n,sa:s,macro:r,expand:l,part:c})=>{if(l)return c.hide();const p=t.separateWaistband||"waistband"==t.frontPocketStyle;return a.seam=(new e).move(o.mWaist1).line(o.mWaist2).line(p?o.bWaistSideSeam:o.bWaistSide).join(a.backTopCutOut).join(a.backBottomCutOut).join(a.frontBottomCutOut).join(a.frontTopCutOut).close().attr("class","fabric"),o.title=o.mWaist.shift(270,75),r("title",{nr:2,at:o.title,title:"cutOut"}),o.logo=o.title.shift(270,75),n.logo=new i("logo",o.logo),s&&(a.seamAlternate=(new e).move(p?o.bWaistSideSeam:o.bWaistSide).join(a.backTopCutOut).join(a.backBottomCutOut).join(a.frontBottomCutOut).join(a.frontTopCutOut),a.sa=a.seamAlternate.offset(s).attr("class","fabric sa")),r("hd",{id:1,from:o.fWaistSide,to:o.mWaist,y:(p?o.fWaistSideCp2:o.mWaist).y}),r("hd",{id:2,from:o.mWaist,to:o.bWaistSide,y:(p?o.fWaistSideCp2:o.mWaist).y}),r("vd",{id:3,from:o.mWaist1,to:o.mHip,x:o.mWaist.x}),r("vd",{id:4,from:o.mWaist2,to:o.mWaist1,x:o.mWaist.x+15}),c}},Uf={name:"waralee.pocket",from:_f,draft:({options:t,Point:e,Path:o,points:a,paths:i,Snippet:s,snippets:r,sa:l,macro:c,store:p,part:d})=>{if(0==t.frontPocket)return d.hide();const h=p.get("frontPocketSize");return"welt"!=t.frontPocketStyle?(a.topLeft=new e(0,0),a.topRight=a.topLeft.shift(0,h),a.bottomLeft=a.topLeft.shift(270,1.5*h),a.bottomRight=a.topRight.shift(270,1.5*h),a.bottomLeftCornerUp=a.bottomLeft.shift(90,h/4),a.bottomLeftCornerUpCp1=a.bottomLeftCornerUp.shift(270,h/4*n.Qr),a.bottomLeftCornerOver=a.bottomLeft.shift(0,h/4),a.bottomLeftCornerOverCp2=a.bottomLeftCornerOver.shift(180,h/4*n.Qr),a.bottomRightCornerUp=a.bottomRight.shift(90,h/4),a.bottomRightCornerUpCp2=a.bottomRightCornerUp.shift(270,h/4*n.Qr),a.bottomRightCornerOver=a.bottomRight.shift(180,h/4),a.bottomRightCornerOverCp1=a.bottomRightCornerOver.shift(0,h/4*n.Qr),i.seam=(new o).move(a.topLeft).line(a.bottomLeftCornerUp).curve(a.bottomLeftCornerUpCp1,a.bottomLeftCornerOverCp2,a.bottomLeftCornerOver).line(a.bottomRightCornerOver).curve(a.bottomRightCornerOverCp1,a.bottomRightCornerUpCp2,a.bottomRightCornerUp).line(a.topRight).line(a.topLeft).close().addClass("fabric"),i.sa=i.seam.offset(l).addClass("fabric sa")):(i.frontPocketSeam.unhide().setClass("fabric"),l&&(i.sa=i.frontPocketSeamSA.offset(l).close().addClass("fabric sa")),i.frontPocket.unhide().setClass("mark"),c("cutonfold",{from:a.frontPocketBottomRight,to:a.frontPocketTopRight})),p.cutlist.addCut({cut:2,from:"lining"}),a.title=a.frontPocketTopLeft.shift(270,75).shift(0,50),c("title",{nr:3,at:a.title,title:"pocket"}),a.logo=a.title.shift(270,75),r.logo=new s("logo",a.logo),a.text=a.logo.shift(-90,25).addText("Waralee","center"),"welt"==t.frontPocketStyle?(c("hd",{id:1,from:a.frontPocketTopLeft,to:a.frontPocketTopRight,y:a.frontPocketTopLeft.y-l-15}),c("hd",{id:2,from:a.frontPocketBottomLeft,to:a.frontPocketBottomRight,y:a.frontPocketBottomRight.y+l+15}),c("vd",{id:3,from:a.frontPocketBottomLeft,to:a.frontPocketTopLeft,x:a.frontPocketBottomLeft.x-l-15}),c("vd",{id:4,from:a.frontPocketTopRight,to:a.frontPocketBottomRight,x:a.frontPocketBottomRight.x+15}),c("vd",{id:5,from:a.frontPocketBottomRight,to:a.frontPocketBottomLeft,x:a.frontPocketBottomLeft.x-l-15})):(c("hd",{id:6,from:a.topLeft,to:a.topRight,y:a.topLeft.y+15}),c("vd",{id:7,from:a.bottomLeftCornerOver,to:a.topLeft,x:a.bottomLeftCornerOver.x})),d}},Yf={name:"waralee.backPocket",after:_f,draft:({options:t,measurements:e,Point:o,Path:a,points:i,paths:n,Snippet:s,snippets:r,macro:l,sa:c,store:p,expand:d,units:h,part:m})=>
1{if(0==t.backPocket)return m.hide();const f=t.backPocketDepth*e.crotchDepth;return d?(i.topLeft=new o(0,0),i.bottomLeft=i.topLeft.shift(270,f+t.backPocketVerticalOffset*e.crotchDepth),i.topRight=i.topLeft.shift(0,t.backPocketSize*e.crotchDepth),i.bottomRight=i.topRight.shift(270,f+t.backPocketVerticalOffset*e.crotchDepth),n.seamSA=(new a).move(i.bottomRight).line(i.topRight).line(i.topLeft).line(i.bottomLeft).hide(),n.seam=(new a).move(i.bottomLeft).line(i.bottomRight).join(n.seamSA).close().addClass("fabric"),l("cutonfold",{from:i.bottomLeft,to:i.bottomRight}),p.cutlist.addCut({cut:2,from:"lining"}),i.title=i.topLeft.shift(270,75).shift(0,50),l("title",{nr:4,at:i.title,title:"backPocket"}),i.logo=i.title.shift(270,75),r.logo=new s("logo",i.logo),i.text=i.logo.shift(-90,25).addText("Waralee","center"),c&&(n.sa=n.seamSA.close().offset(c).addClass("fabric sa")),l("hd",{id:1,from:i.topLeft,to:i.topRight,y:i.topLeft.y+15}),l("vd",{id:2,from:i.topLeft,to:i.bottomLeft,x:i.topLeft.x+15}),m):(p.flag.note({msg:"waralee:cutBackPocket",replace:{width:h(t.backPocketSize*e.crotchDepth),length:h(f+t.backPocketVerticalOffset*e.crotchDepth)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),p.flag.preset("expand"),m.hide())}};function $f(t,{options:e,measurements:o,Point:a,Path:i,points:n,paths:s,Snippet:r,snippets:l,macro:c,sa:p,store:d,expand:h,units:m,part:f}){const u=e.frontPocketSize*o.crotchDepth,g=e.backPocketSize*o.crotchDepth;if("front"==t){if(!e.frontPocket||"welt"!=e.frontPocketStyle)return f.hide()}else if(!e.backPocket)return f.hide();const b=("front"==t?u:g)+p+p,w=("front"==t?u:g)/2;return h?(n.tl=new a(0,0),n.tr=n.tl.shift(0,b),n.bl=n.tl.shift(270,w),n.br=n.tr.shift(270,w),s.seamSeam=(new i).move(n.tl).line(n.bl).line(n.br).line(n.tr).line(n.tl).close().addClass("fabric"),d.cutlist.addCut({cut:"front"==t?4:2,from:"fabric"}),n.title=n.tl.shift(270,30).shift(0,40),c("title",{nr:"front"==t?5:6,at:n.title.shift(0,30),title:t+"Facing",scale:.6}),n.logo=n.title.shift(270,0),l.logo=new r("logo",n.logo).attr("data-scale",.3),c("hd",{id:1,from:n.tl,to:n.tr,y:n.tl.y+15}),c("vd",{id:2,from:n.tl,to:n.bl,x:n.tl.x+15}),f):(d.flag.note({msg:"waralee:cutFacing"+t,replace:{width:m(b),length:m(w)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),d.flag.preset("expand"),f.hide())}const zf={name:"waralee.facingFront",after:_f,draft:t=>$f("front",t)},Jf={name:"waralee.facingBack",after:_f,draft:t=>$f("back",t)},Kf={name:"waralee.mini",from:_f,draft:({options:t,Path:e,points:o,paths:a,sa:i,macro:n,store:s,expand:r,part:l})=>{if(r)return l.hide();const c=o.bWaistBackOverlapSeam.dist(o.fWaistFrontOverlapSeam)/150,p=t.separateWaistband||"waistband"==t.frontPocketStyle;for(const u in o)o[u].x=o[u].x/c,o[u].y=o[u].y/c;a.waistFoldBack=a.waistBack.offset(-1*s.get("waistBand")/c).addClass("fabric stroke-sm"),a.waistFoldFront=a.waistFront.offset(-1*s.get("waistBand")/c).addClass("fabric stroke-sm"),a.frontFold=a.front.offset(-1*s.get("hem")/c).addClass("fabric stroke-sm"),a.legFold=a.leg.offset(-1*s.get("hem")/c).addClass("fabric stroke-sm"),a.backFold=a.back.offset(-1*s.get("hem")/c).addClass("fabric stroke-sm"),a.cutOut=(new e).move(p?o.bWaistSideSeam:o.bWaistSide).line(o.mWaist2).line(o.mWaist1).line(p?o.fWaistSideSeam:o.fWaistSide).addClass("help"),a.seam.unhide(),n("scalebox",{at:o.mLeg.shift(-90,35)}),t.frontPocket&&"welt"==t.frontPocketStyle&&a.frontPocket.unhide(),t.backPocket&&a.backPocket.unhide(),i&&(a.sa=a.seam.offset(i/c).addClass("fabric sa")),o.pText1=o.mHip.shiftFractionTowards(o.mLeg,.5).addText("waralee:thisIsNotAPart","center"),o.pText2=o.mHip.shiftFractionTowards(o.mLeg,.6).addText("waralee:doNotCutFromFabric","center"),o.pText3=o.mHip.shiftFractionTowards(o.mLeg,.7).addText("waralee:useMeasurementsToCutFromFabric","center");const d=p?o.fWaistSideSeam:o.fWaistSide,h=p?o.fWaistFrontOverlapSeam:o.fWaistFrontOverlap,m=p?o.bWaistSideSeam:o.bWaistSide,f=p?o.bWaistBackOverlapSeam:o.bWaistBackOverlap;return n("hd",{id:1,from:o.fWaistFrontOverlap,to:d,y:d.y+10,text:l.units(d.dist(o.fWaistFrontOverlap)*c),force:!0}),n("hd",{id:2,from:o.fLegFrontOverlap,to:o.bLegBackOverlap,y:o.bLegBackOverlap.y-10,text:l.units(o.fLegFrontOverlap.dist(o.bLegBackOverlap)*c),force:!0}),n("hd",{id:3,from:o.bWaistBack,to:o.bWaistBackOverlap,y:o.bWaistBackOverlap.y+20,text:l.units(o.bWaistBackOverlap.dist(o.bWaistBack)*c),force:!0}),n("hd",{id:4,from:o.fWaistFrontOverlap,to:o.mHip,y:o.mHip.y+10,text:l.units((o.mHip.x-o.fWaistFrontOverlap.x)
1*c),force:!0}),n("vd",{id:5,from:h,to:o.fLegFrontOverlap,x:o.fLegFrontOverlap.x+10,text:l.units(h.dist(o.fLegFrontOverlap)*c),force:!0}),n("vd",{id:6,from:o.bLegBackOverlap,to:f,x:o.bLegBackOverlap.x-10,text:l.units(f.dist(o.bLegBackOverlap)*c),force:!0}),n("vd",{id:7,from:o.bLegBackOverlap,to:m,x:m.x+10,text:l.units((o.bLegBackOverlap.y-m.y)*c),force:!0}),t.frontPocket&&"welt"==t.frontPocketStyle&&(n("hd",{id:8,from:h,to:o.frontPocketBottom2,y:o.frontPocketBottom2.y+20,text:l.units((o.frontPocketBottom2.x-h.x)*c),force:!0}),n("vd",{id:9,from:h,to:o.frontPocketBottom2,x:o.frontPocketBottom2.x+20,text:l.units((o.frontPocketBottom2.y-h.y)*c),force:!0})),t.backPocket&&(n("hd",{id:10,from:o.backPocketRight,to:f,y:f.y+40,text:l.units((f.x-o.backPocketRight.x)*c),force:!0}),n("vd",{id:11,from:f,to:o.backPocketRight,x:o.backPocketRight.x,text:l.units((o.backPocketRight.y-f.y)*c),force:!0})),l}};function Vf(t,{options:e,measurements:o,Point:a,Path:i,points:n,paths:s,Snippet:r,snippets:l,macro:c,sa:p,store:d,expand:h,units:m,part:f}){const u=d.get("waistBand"),g=n.fWaistSideHem.dist(n.fWaistFrontOverlapHem),b=n.bWaistSideHem.dist(n.bWaistBackHem)+n.bWaistBackHem.dist(n.bWaistBackOverlapHem);let w=o.waist+1.75*o.crotchDepth,k=0;switch(t){case"strapFront":k=7,w-=2*g,w+="front"===e.knotPlacement?o.waist/2:0;break;case"strapBack":k=8,w-=2*b,w+="back"===e.knotPlacement?o.waist/2:0;break;case"waistBandFront":if(0==e.separateWaistband&&"welt"===e.frontPocketStyle)return f.hide();k=9,w=2*g;break;case"waistBandBack":if(0==e.separateWaistband&&"welt"===e.frontPocketStyle)return f.hide();k=10,w=2*b}return h?(d.cutlist.addCut({cut:1,from:"fabric"}),n.tl=new a(0,0),n.bl=new a(0,w),n.tm=new a(u,0),n.bm=new a(u,w),n.tr=new a(2*u,0),n.br=new a(2*u,w),s.seam=(new i).move(n.br).line(n.tr).line(n.tl).line(n.bl).line(n.br).close(),s.fold=(new i).move(n.tm).line(n.bm).addClass("fabric dotted").setText("fold"),p&&(s.sa=s.seam.offset(p).addClass("fabric sa")),d.cutlist.addCut({cut:1,from:"fabric"}),n.title=new a(u,.2*w),c("title",{nr:k,at:n.title,title:t,scale:.4,align:"center"}),n.logo=new a(u,.4*w),l.logo=new r("logo",n.logo).attr("data-scale",.3),c("hd",{id:"w",from:n.tl,to:n.tr,y:n.tl.y-p-10}),c("vd",{id:"h",from:n.tr,to:n.br,x:n.br.x+p+10}),f):(d.flag.note({msg:"waralee:cut"+t,replace:{width:m(2*u),length:m(w)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),d.flag.preset("expand"),f.hide())}const Xf={name:"waralee.waistbandFront",from:_f,draft:t=>Vf("waistBandFront",t)},Qf={name:"waralee.waistbandBack",from:_f,draft:t=>Vf("waistBandBack",t)},qf={name:"waralee.strapFront",from:_f,draft:t=>Vf("strapFront",t)},Zf={name:"waralee.strapBack",from:_f,draft:t=>Vf("strapBack",t)},tu=new n.pT({data:Nf,parts:[jf,Gf,Uf,Yf,zf,Jf,Kf,Xf,Qf,qf,Zf]}),eu=JSON.parse('{"id":"yuri","name":"Yuri sweater","code":"Hellgy","description":"A FreeSewing pattern for a fancy zipless sweater based on the Huey hoodie","design":"Biou","difficulty":3,"tags":["tops"],"techniques":["curved-seam","flat-sleeve","hem","button"],"version":"4.6.0","pkg":"@freesewing/yuri","collection":true}'),ou={en:JSON.parse('{"t":"Yuri hoodie","d":"Yuri is a fancy zipless cardigan based on the Huey & Hugo hoodies","p":{"back":"Back","front":"Front","gusset":"Gusset","hoodCenter":"Hood center","hoodSide":"Hood side","sleeve":"Sleeve"},"s":{"cutHoodCenter.t":"The hood center is not shown","cutHoodCenter.d":"The **Hood center** is a rectangular piece of fabric {{{ width }}} wide and {{{ length }}} long."},"o":{"hipsEase":{"t":"Hips ease","d":"Controls the amount of ease at the hips"}}}')},au=function(t,e){const{macro:o,Point:a,points:i,sa:n}=t.shorthand();"front"===e?(i.cHem=i.cfBottom,i.cNeck=i.cfNeck):(i.cHem=i.cbBottom,i.cNeck=i.cbNeck),o("hd",{id:"wAtHem",from:i.cHem,to:i.bottom,y:i.cHem.y+3*n+15}),o("hd",{id:"wHemToArmhole",from:i.armhole,to:i.bottom,y:i.bottom.y+10}),o("ld","front"===e?{id:"wCollarToArmholePitch",from:new a(i.s3CollarSplit.x,i.armholePitch.y),to:i.armholePitch}:{from:new a(0,i.armholePitch.y),to:i.armholePitch}),"back"===e&&(o("hd",{id:"wCbNeckToHps",from:i.cNeck,to:i.neck,y:i.neck.y-n-15}),o("hd",{id:"wCbNeckToShoulder",from:i.cNeck,to:i.shoulder,y:i.neck.y-n-30}),o("hd",{id:"wFull",from:i.cNeck,to:i.armhole,y:i.neck.y-n-45})),"front"===e&&(o("hd",{id:"wEdgeToCollar",from:i.button,to:i.s3CollarSplit,y:i.s3CollarSplit.y}),o("vd",{id:"hEdgeToCollar",from:i.button,to:i.s3CollarSplit,x:i.button.x}),o("vd",{id:"hShoulderToCollar",from:i.s3CollarSplit,to:i.s3ArmholeSplit,x:i.s3ArmholeSplit.x})),o("ld",{id:"lShoulderSeam",from:i.neck,to:i.shoulder,d:-15}),o("vd",{id:"hHem",from:i.cHem,to:i.bottom,x:i.bottom.x+10}),o("vd",{id:"hHemToArmhole",from:i.bottom,to:i.armhole,x:i.armhole.x+n+15}),o("vd",{id:"hArmholeToArmholePitch",from:i.armhole,to:i.armholePitch,x:i.armhole.x+n+15}),o("vd",{id:"hArmholePitchToShoulder",from:i.armholePitch,to:i.shoulder,x:i.armhole.x+n+15}
1),o("vd",{from:i.armhole,id:"hArmholeToShoulder",to:i.shoulder,x:i.armhole.x+n+30}),o("vd",{id:"hArmholeToHps",from:i.armhole,to:i.neck,x:i.armhole.x+n+45}),"back"===e&&(o("vd",{id:"hCbNeckToHps",from:i.cNeck,to:i.neck,x:i.cNeck.x-15}),o("vd",{id:"hHemToCbHeck",from:i.cHem,to:i.cNeck,x:i.cNeck.x-15}),o("vd",{id:"hFull",from:i.cHem,to:i.neck,x:i.cNeck.x-30}))};const iu={name:"yuri.back",from:{...N,options:{...N.options,collarEase:{pct:20,min:10,max:30,...(0,n.Wx)("neck"),menu:"fit"},cuffEase:{pct:30,min:20,max:60,...(0,n.Wx)("wrist"),menu:"fit"},lengthBonus:{pct:10,min:5,max:15,menu:"fit"},sleeveLengthBonus:{pct:1,min:0,max:10,menu:"fit"}}},hide:n.V9.HIDE_TREE,options:{hipsEase:{pct:0,min:0,max:10,menu:"fit"}},measurements:["hips"],draft:function({store:t,macro:e,Path:o,Point:a,points:i,paths:n,sa:s,options:r,measurements:l,part:c}){for(const p in n)-1===["backArmhole","backCollar"].indexOf(p)&&delete n[p];return i.hips.x=l.hips*(1+r.hipsEase)/4,i.hem.x=i.hips.x,i.hemCp2=new a(i.hips.x,i.cbWaist.y),i.cbBottom=new a(0,1.27*i.cbHem.y),i.bottom=new a(1.23*i.hem.x,.97*i.cbBottom.y),i.bottomCp2=new a(i.bottom.x,i.cbWaist.y),t.set("backNeckSeamLength",(new o).move(i.neck).curve_(i.neckCp2,i.cbNeck).length()),t.set("neckCutoutBack",i.cbNeck.y),n.gussetBase=(new o).move(i.bottom).line(i.armhole).setClass("note stroke-xxl").hide(),t.set("gussetLength",n.gussetBase.length()),n.saBase=(new o).move(i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.armholePitchCp1,i.armholePitch).join(n.backArmhole).line(i.s3CollarSplit).join(n.backCollar).setClass("note stroke-xxl").hide(),n.hemBase=(new o).move(i.cbBottom).line(i.bottom).setClass("note stroke-xxl").hide(),n.seam=n.gussetBase.join(n.saBase).clone().line(i.cbBottom).join(n.hemBase).close().attr("class","fabric"),s&&(n.sa=n.hemBase.offset(3*s).join(n.gussetBase.offset(s)).join(n.saBase.offset(s)),n.sa.move(n.sa.end()).line(i.cbNeck).move(n.sa.start()).line(i.cbBottom).attr("class","fabric sa")),t.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),e("cutonfold",{from:i.cbNeck,to:i.cbBottom,grainline:!0}
1),e("scalebox",{at:new a(i.armholePitch.x/2,i.cbWaist.y)}),e("rmtitle"),e("title",{at:i.title,nr:2,title:"back"}),au(c,"back"),c}};const nu={name:"yuri.front",from:{...I,options:{...I.options,collarEase:{pct:20,min:10,max:30,...(0,n.Wx)("neck"),menu:"fit"},cuffEase:{pct:30,min:20,max:60,...(0,n.Wx)("wrist"),menu:"fit"},lengthBonus:{pct:10,min:5,max:15,menu:"fit"},sleeveLengthBonus:{pct:1,min:0,max:10,menu:"fit"}}},hide:n.V9.HIDE_TREE,options:{hipsEase:{pct:0,min:0,max:10,menu:"fit"}},measurements:["hips","hpsToBust"],draft:function({store:t,Point:e,Path:o,points:a,paths:i,sa:n,options:s,measurements:r,macro:l,snippets:c,Snippet:p,part:d}){for(const h in i)-1===["frontArmhole","frontCollar"].indexOf(h)&&delete i[h];return a.hips.x=r.hips*(1+s.hipsEase)/4,a.hem.x=a.hips.x,a.hemCp2=new e(a.hips.x,a.cfWaist.y),a.cfBottom=new e(0,1.27*a.cfHem.y),a.bottom=new e(1.23*a.hem.x,.97*a.cfBottom.y),a.bottomCp2=new e(a.bottom.x,a.cfWaist.y),a.button=new e(a.s3CollarSplit.x-2/3*r.shoulderToShoulder,a.s3CollarSplit.y+1.17*r.hpsToBust),t.set("frontNeckSeamLength",(new o).move(a.neck).curve(a.neckCp2Front,a.cfNeckCp1,a.cfNeck).length()),t.set("neckCutoutFront",a.cfNeck.y),i.saBase=(new o).move(a.bottom).line(a.armhole).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.armholePitchCp1,a.armholePitch).join(i.frontArmhole).line(a.s3CollarSplit).setClass("note stroke-xxl").hide(),i.buttonBase=(new o).move(a.s3CollarSplit).line(a.button).line(a.cfBottom).attr("note stroke-xxl").hide(),i.hemBase=(new o).move(a.cfBottom).line(a.bottom).setClass("note stroke-xxl").hide(),i.seam=i.saBase.clone().join(i.buttonBase).join(i.hemBase).close().attr("class","fabric"),n&&(i.sa=i.hemBase.offset(3*n).join(i.saBase.offset(n)).join(i.buttonBase.offset(3*n)),i.sa=i.sa.line(i.sa.start()).close().attr("class","fabric sa")),t.cutlist.setCut({cut:2,from:"fabric"}),l("grainline",{from:a.s3CollarSplit,to:new e(a.s3CollarSplit.x,a.bottom.y)}),c.buttonhole=new p("buttonhole-start",a.button.shift(0,25)).attr("data-rotate","90").attr("data-scale","2.5"),c.button=new p("button",i.buttonBase.shiftFractionAlong(.146).shift(0,30)).attr("data-scale","3.3"),au(d,"front"),d}};const su={name:"yuri.sleeve",from:y,hide:n.V9.HIDE_TREE,draft:function({Path:t,points:e,paths:o,sa:a,part:i}){return o.saBase=(new t).move(e.wristRight).line(e.bicepsRight).join(o.sleevecap).line(e.wristLeft).setClass("various stroke-xxl").hide(),o.hemBase=(new t).move(e.wristLeft).line(e.wristRight).setClass("various stroke-xxl").hide(),o.seam=o.saBase.join(o.hemBase).close().setClass("fabric"),a&&(o.sa=o.saBase.clone().offset(a).join(o.hemBase.offset(3*a)).close(),o.sa.attr("class","fabric sa")),i},options:{...y.options,libraryFitSleeve:!0}};const ru={name:"yuri.gusset",after:iu,draft:function({Point:t,Path:e,points:o,paths:a,Snippet:i,snippets:n,sa:s,macro:r,store:l,part:c}){const p=l.get("gussetLength");return o.top=new t(0,0),o.bottom=new t(0,p),o.right=o.bottom.rotate(36,o.top),o.cp1=new t(0,6*p/5).rotate(90,o.bottom),o.cp2=new t(o.right.x,6*o.right.y/5).rotate(-60,o.right),o.title=new t(0,2*p/3).rotate(15,o.top),a.hat=(new e).move(o.right).line(o.top).line(o.bottom).attr("class","fabric"),a.curve=(new e).move(o.bottom).curve(o.cp1,o.cp2,o.right).attr("class","fabric"),a.seam=a.hat.join(a.curve).close(),s&&(a.saBase=(new e).move(o.right).line(o.top).hide(),a.sa=a.curve.offset(3*s).join(a.saBase.offset(s)).line(o.top).close().attr("class","fabric sa")),l.cutlist.setCut({cut:2,from:"fabric",onFold:!0}),r("cutonfold",{from:new t(o.top.x,o.top.y+50),to:o.bottom,grainline:!0}),r("title",{at:o.title,nr:4,title:"gusset"}),o.logo=o.title.shift(-75,100),n.logo=new i("logo",o.logo),r("vd",{id:"hFull",from:o.top,to:o.bottom,x:o.top.x-s-15}),r("vd",{id:"hBottomToTipRight",from:new t(0,o.right.y),to:o.bottom,x:20}),r("ld",{id:"lSide",from:o.top,to:o.right,d:s+15}),r("hd",{id:"wFull",from:new t(0,o.right),to:o.right,y:o.right.y}),c}};const lu={name:"yuri.hoodSide",after:[nu,iu],measurements:["head"],draft:function({store:t,sa:e,Point:o,points:a,Path:i,paths:n,Snippet:s,snippets:r,measurements:l,macro:c,part:p}){const d=t.get("frontNeckSeamLength")+t.get("backNeckSeamLength"),h=l.head,m=t.get("neckCutoutFront")-t.get("neckCutoutBack");t.set("hoodCenterWidth",l.head/10);const f=t.get("hoodCenterWidth")/2;a.topLeft=new o(0,0),a.topRight=new o(d,0),a.neckRight=new o(d,(h-f)/2),a.neckLeft=new o(0,a.neckRight.y),a.frontLeft=a.neckLeft.shift(-90,m),a.frontEdge=a.neckRight.shift(-90,m),a.neckEdge=a.neckLeft.shift(0,f),a.neckEdgeCp2=new o(a.neckRight.x/2,a.neckEdge.y),a.frontEdgeCp1=new o(a.neckEdgeCp2.x,a.frontEdge.y),a.shoulderNot
1ch=(new i).move(a.neckEdge).curve(a.neckEdgeCp2,a.frontEdgeCp1,a.frontEdge).shiftAlong(t.get("backNeckSeamLength")-f),a.hoodTop=new o(a.shoulderNotch.x,a.topLeft.y),a.hoodTopCp2=a.hoodTop.shift(180,.7*a.neckEdge.y),a.hoodRim=new o(a.frontEdge.x,.2*a.neckRight.y),a.hoodTopCp1=a.hoodTop.shift(0,a.hoodTop.dx(a.hoodRim)/2),a.frontEdgeCp2=a.frontEdge.shift(90,f),a._tmp1=(new i).move(a.hoodRim).curve(a.hoodRim,a.hoodTopCp1,a.hoodTop).shiftAlong(2).rotate(90,a.hoodRim),a.hoodRimCp=a.hoodRim.shiftTowards(a._tmp1,a.neckRight.y/3),a.neckRoll=a.neckRight.shift(180,f),a._tmp2=(new i).move(a.neckRoll).curve(a.neckRoll,a.hoodRimCp,a.hoodRim).shiftAlong(2),a.neckRollCp2=a.neckRoll.shiftTowards(a._tmp2,f),a.neckRollCp1=a.neckRollCp2.rotate(180,a.neckRoll),n.seam=(new i).move(a.frontEdge).curve(a.frontEdgeCp2,a.neckRollCp1,a.neckRoll).curve(a.neckRollCp2,a.hoodRimCp,a.hoodRim).curve(a.hoodRim,a.hoodTopCp1,a.hoodTop).curve(a.hoodTopCp2,a.neckEdge,a.neckEdge).curve(a.neckEdgeCp2,a.frontEdgeCp1,a.frontEdge).close().attr("class","fabric"),t.set("hoodCenterLength",(new i).move(a.hoodRim).curve(a.hoodRim,a.hoodTopCp1,a.hoodTop).curve(a.hoodTopCp2,a.neckEdge,a.neckEdge).length()),e&&(n.sa=n.seam.reverse().offset(-1*e).addClass("fabric sa")),t.cutlist.setCut({cut:4,from:"fabric"}),a.title=a.hoodTop.shift(-90,50),c("title",{at:a.title,nr:5,title:"hoodSide"}),a.logo=a.title.shift(-90,60),r.logo=new s("logo",a.logo),c("grainline",{from:a.shoulderNotch,to:a.hoodTop});const u=(new i).move(a.neckEdge).curve(a.neckEdgeCp2,a.frontEdgeCp1,a.frontEdge).split(a.shoulderNotch),g=(new i).move(a.hoodRim).curve(a.hoodRim,a.hoodTopCp1,a.hoodTop).curve(a.hoodTopCp2,a.neckEdge,a.neckEdge).reverse(),b=(new i).move(a.neckRoll).curve(a.neckRollCp2,a.hoodRimCp,a.hoodRim);c("pd",{id:"lNeckBackToNotch",path:u[0],d:e+15}),c("pd",{id:"lNotchToNeckFront",path:u[1],d:e+15}),c("pd",{id:"lCentralSeam",path:g,d:-1*e-15}),c("hd",{id:"wAtNeck",from:a.neckEdge,to:a.frontEdge,y:a.frontEdge.y+e+30}),c("hd",{id:"wFull",from:g.edge("left"),to:a.frontEdge,y:a.frontEdge.y+e+45});const w=b.edge("left");return c("hd",{id:"wOpeningDepth",from:w,to:a.frontEdge,y:w.y}),c("vd",{id:"hToOpeningTop",from:a.frontEdge,to:a.hoodRim,x:a.hoodRim.x+e+15}),c("vd",{id:"hFull",from:a.frontEdge,to:a.hoodTop,x:a.hoodRim.x+e+30}),p}};const cu={name:"yuri.hoodCenter",after:lu,draft:function({store:t,sa:e,Point:o,points:a,Path:i,paths:n,expand:s,macro:r,units:l,part:c}){const p=t.get("hoodCenterWidth"),d=t.get("hoodCenterLength");if(!s){const o=e?2*e:0;return t.flag.note({msg:"yuri:cutHoodCenter",notes:[e?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{width:l(p+o),length:l(d+o)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),t.flag.preset("expandIsOff"),c.hide()}return t.flag.preset("expandIsOn"),a.topLeft=new o(0,0),a.bottomLeft=new o(0,p),a.topRight=new o(d,0),a.bottomRight=new o(d,p),n.seam=(new i).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).line(a.topLeft).close().attr("class","fabric"),e&&(n.sa=n.seam.offset(e).addClass("fabric sa")),t.cutlist.setCut({cut:2,from:"fabric"}),a.title=a.bottomLeft.shiftFractionTowards(a.topRight,.5),r("title",{at:a.title,nr:6,title:"hoodCenter"}),r("grainline",{from:a.topLeft.shift(-90,p/2),to:a.topRight.shift(-90,p/2)}),r("hd",{id:"wFull",from:a.bottomLeft,to:a.bottomRight,y:a.bottomRight.y+e+15,text:l(t.get("hoodCenterLength"))}),r("vd",{id:"hFull",from:a.bottomRight,to:a.topRight,x:a.topRight.x+e+15}),c}},pu=new n.pT({data:eu,parts:[iu,nu,su,ru,lu,cu]}),du={aaron:V,albert:tt,bee:ft,bella:st,benjamin:vt,bent:St,bibi:te,bob:ae,breanna:ye,brian:_,bruce:We,carlita:fo,carlton:no,cathrin:xo,charlie:Ko,cornelius:na,crux:yi,devon:Bn,diana:Hn,florence:Dn,florent:Mn,gozer:zn,hi:Qn,holmes:ds,hortensia:ws,huey:Ms,hugo:ar,jaeger:Ar,jane:Nr,jett:qr,library:m,lily:tl,lucy:kl,lumina:yl,lumira:xl,lunetius:Kl,noble:Si,octoplushy:ql,onyx:hc,opal:Sc,otis:Gc,paco:ul,penelope:qc,percy:xp,sabrina:Bp,sandy:Op,sarah:zp,shelly:Vp,shin:ad,simon:eh,simone:ph,skully:xh,sophie:Fh,sunny:Mh,sven:om,tamiko:im,teagan:mm,tiberius:um,titan:Po,trayvon:km,tristan:$m,uma:Jm,umbra:Zm,w
1ahid:Pf,walburga:Ff,waralee:If,yuri:(0,n.D4)([_,ou])};var hu=o(57416);const mu={aaron:"showcase-tight-aaron",albert:"showcase-albert-by-wouter",bee:"d0312c99-7b2f-4e37-c131-d626d34cd300",bella:"showcase-bella-by-karen",benjamin:"showcase-benjamin-by-anto",bent:"showcase-linnen-jaeger-by-paul",bob:"showcase-bob-bibs-by-duck",breanna:"showcase-magicantace-breanna-sandy",brian:"showcase-brian-by-stefan-1",bruce:"showcase-nsfw-bruce",cathrin:"showcase-green-cathrin",carlton:"showcase-carlton-by-boris",carlita:"showcase-quentin-carlita",charlie:"showcase-charlie-by-joost",cornelius:"showcase-cornelius-by-wouter",diana:"showcase-diana-by-deby",florence:"showcase-rowans-leaf-print-florence",florent:"showcase-florent-by-enno",gozer:"80f22d09-e1fd-4e04-67f7-e58253c66200",hi:"showcase-hi-the-shark-has-our-hearts",holmes:"showcase-a-modified-holmes",hortensia:"showcase-hortensia-by-saber",huey:"showcase-anneke-huey",hugo:"showcase-husband-hugo",jaeger:"showcase-jaeger-by-roberta",lucy:"showcase-houseoflief-lucy",lumira:"showcase-lumira-leggings-with-cycling-chamois",lunetius:"showcase-lunetius-the-lacerna",noble:"showcase-a-casual-test-of-noble",octoplushy:"showcase-meet-octoplushy",onyx:"showcase-onyx-full-body-unisuit",opal:"showcase-embroidered-opal-shortalls",otis:"showcase-four-versions-of-otis-and-a-bonus-bob",paco:"showcase-paco-by-karen",penelope:"showcase-pregnant-lady-penelope",sandy:"showcase-sandy-by-anneke",shelly:"showcase-short-sleeve-shelly-rash-guard",shin:"showcase-just-peachy-shin-bee",simon:"showcase-simon-shirt-by-sewingdentist",simone:"showcase-simone-by-gaelle",skully:"showcase-3d-skully",sven:"showcase-french-terry-sven",tamiko:"showcase-a-tamiko-top",teagan:"showcase-teagan-karen",tiberius:"showcase-tiberius-the-tunica",titan:"showcase-a-mock-up-of-titan-with-the-fit-to-knee-option-enabled",trayvon:"showcase-liberty-trayvon",tristan:"showcase-a-lined-tristan-top-with-front-lacing",uma:"showcase-lower-rise-ursula",wahid:"showcase-sterling42-wahid",walburga:"showcase-walburga-the-wappenrock",waralee:"fde729f5-ea72-4af4-b798-331bbce04000",yuri:"showcase-yuri-by-its-designer"},fu={};for(const[Eu,Wu]of Object.entries(mu))fu[Eu]=`${hu.iR.url}${Wu}/public`;const uu={aaron:K,albert:et,bee:ht,bella:rt,benjamin:yt,bent:Bt,bibi:Zt,bob:ie,breanna:Te,brian:M,bruce:He,carlita:mo,carlton:io,cathrin:Bo,charlie:Jo,cornelius:sa,crux:Ti,devon:xn,diana:Wn,florence:Nn,florent:$n,gozer:Vn,hi:cs,holmes:gs,hortensia:Ss,huey:Is,hugo:or,jaeger:Hr,jane:Ir,jett:Zr,library:L,lily:bl,lucy:vl,lumina:zl,lumira:Dl,lunetius:Xl,noble:qi,octoplushy:pc,onyx:Bc,opal:_c,otis:Xc,paco:fl,penelope:pp,percy:Tp,sabrina:Hp,sandy:Mp,sarah:Jp,shelly:ed,shin:rd,simon:th,simone:ch,skully:Bh,sophie:Hh,sunny:_h,sven:em,tamiko:sm,teagan:hm,tiberius:bm,titan:Wo,trayvon:Wm,tristan:Ym,uma:qm,umbra:rf,wahid:Lf,walburga:Df,waralee:tu,yuri:pu},gu=Object.keys(uu),bu={},wu={},ku={},Cu={},vu=new Set,yu=new Set,Tu=new Set,xu=new Set;for(const Eu in uu)bu[Eu]=uu[Eu].patternConfig.measurements,wu[Eu]=uu[Eu].patternConfig.optionalMeasurements,ku[Eu]=[...uu[Eu].patternConfig.measurements,...uu[Eu].patternConfig.optionalMeasurements],Cu[Eu]={...uu[Eu].designConfig.data}
1,Cu[Eu].tags&&Cu[Eu].tags.forEach((t=>vu.add(t))),Cu[Eu].techniques&&Cu[Eu].techniques.forEach((t=>yu.add(t))),Array.isArray(Cu[Eu].code)?Cu[Eu].code.forEach((t=>Tu.add(t))):Tu.add(Cu[Eu].code),Array.isArray(Cu[Eu].design)?Cu[Eu].design.forEach((t=>xu.add(t))):xu.add(Cu[Eu].design);const Bu=Array.from(vu).filter((t=>!!t)).sort(),Su=Array.from(yu).filter((t=>!!t)).sort(),Lu=Array.from(Tu).filter((t=>!!t)).sort(),Pu=Array.from(xu).filter((t=>!!t)).sort(),Ru=du,Fu={id:mu,href:fu}},57416:(t,e,o)=>{o.d(e,{A4:()=>i.A,DS:()=>c.D,I3:()=>s.I3,Kk:()=>s.Kk,Ot:()=>l.O,VI:()=>n.V,Vi:()=>r.V,fR:()=>p.f,iR:()=>a.i,iU:()=>l.i,rA:()=>s.rA,zM:()=>i.z});var a=o(80021),i=o(33727),n=o(99005),s=o(27791),r=o(84985),l=o(29203),c=o(19970),p=o(2980)},59427:(t,e,o)=>{o.d(e,{s:()=>r});var a=o(14041),i=o(86560),n=o(56702),s=o(73570);const r=({uuid:t,href:e=!1,label:o="UUID",Link:r=!1})=>(r||(r=n.N_),!1===e?a.createElement("span",{className:"flex flex-row items-center"},a.createElement("span",{className:"daisy-badge daisy-badge-secondary font-mono"},(0,i.c_)(t)),a.createElement(s.T,{content:t,label:o,sup:!0})):a.createElement("span",{className:"flex flex-row items-center"},a.createElement(r,{href:e,title:t},a.createElement("span",{className:"daisy-badge daisy-badge-secondary font-mono"},(0,i.c_)(t))),a.createElement(s.T,{content:t,label:o,sup:!0})))},61035:(t,e,o)=>{o.d(e,{dG:()=>n,FY:()=>s});const a=JSON.parse('{"id":"plugin-flip","r":"4.6.0"}'),i={name:a.id,version:a.r,macros:{flip:function(t,{paths:e,points:o,snippets:a}){const i="y"===t?.axis?"y":"x";let n=null;const s=["from","to","cp1","cp2"];for(const r in o)null===n&&(n=o[r].attributes.get("flipped"),!1===n?n=1:n+=1),o[r][i]=-1*o[r][i],o[r].attributes.set("flipped",n);for(let r of Object.keys(e))for(let t in e[r].ops)for(let o of s)if(void 0!==e[r].ops[t][o]){let a=e[r].ops[t][o].attributes.get("flipped");!1!==a&&(a=parseInt(a)),a!==n&&(e[r].ops[t][o][i]=-1*e[r].ops[t][o][i],e[r].ops[t][o].attributes.set("flipped",n))}for(let r of Object.keys(a)){let t=a[r].anchor.attributes.get("flipped");!1!==t&&(t=parseInt(t)),t!==n&&(a[r].anchor[i]=-1*a[r].anchor[i])}}}},n=i,s=i},62919:(t,e,o)=>{o.d(e,{Y:()=>l});var a=o(89575),i=o(14041),n=o(16840),s=o(68158),r=o(94744);const l=t=>{let e;return e=t.json?r.Ay.dump(JSON.parse(t.json)):t.js?r.Ay.dump(t.js):t.children,i.createElement(n.f,(0,a.A)({language:"yaml"},t,{raw:s.A.highlight(e,{language:"yaml"}).value,copy:e}))}},66348:(t,e,o)=>{o.d(e,{IQ:()=>r,eJ:()=>c,k_:()=>l});const a=JSON.parse('{"id":"plugin-ringsector","r":"4.6.0"}'),i=(t,e)=>{const o={};for(const a of t)o[a]=`__macro_ringsector_${e}_${a}`;return o},n=(t,e=90,o)=>{const a=o.deg2rad(e/2);return 4*t*(1-Math.cos(a))/Math.sin(a)/3},s=["center","in1","in1c","in2","in2c","ex1","ex1c","ex2","ex2c","in2Flipped","in2cFlipped","in1cFlipped","ex1cFlipped","ex2cFlipped","ex2Flipped"],r={name:a.id,version:a.r,macros:{rmringsector:function(t="ringsector",{points:e,paths:o,store:a,part:i}){const n=["parts",i.name,"macros","@freesewing/plugin-ringsector","ids",t];for(const s of Object.values(a.get([...n,"paths"])))delete o[s];for(const s of Object.values(a.get([...n,"points"])))delete e[s]},ringsector:function(t,{utils:e,Point:o,points:a,Path:r,paths:l,store:c}){const{angle:p,insideRadius:d,outsideRadius:h,rotate:m=!1,center:f=new o(0,0),id:u="ringsector"}=t,g=i(s,u),b=i(["path"],u),w=n(d,p/2,e),k=n(h,p/2,e);a[g.center]=f.copy(),a[g.in1]=a[g.center].shift(-90,d),a[g.in1c]=a[g.in1].shift(0,w),a[g.in2]=a[g.center].shift(p/2-90,d),a[g.in2c]=a[g.in2].shift(p/2+180,w),a[g.ex1]=a[g.center].shift(-90,h),a[g.ex1c]=a[g.ex1].shift(0,k),a[g.ex2]=a[g.center].shift(p/2-90,h),a[g.ex2c]=a[g.ex2].shift(p/2+180,k);for(const i of["in2","in2c","in1c","ex1c","ex2c","ex2"])a[g[i+"Flipped"]]=a[g[i]].flipX(f);for(const i of s)a[g[i]+"Rotated"]=a[g[i]].rotate(p/2,a[g.center]),g[i+"Rotated"]=g[i]+"Rotated";if(m){const t=270-a[g.in2Flipped].angle(a[g.ex2Flipped]);for(const e of s)a[g[e]]=a[g[e]].rotate(t,a[g.in2Flipped]),a[g[e]+"Rotated"].rotate(t,a[g.in2Flipped])}return l[b.path]=(new r).move(a[g.ex2Flipped]).curve(a[g.ex2cFlipped],a[g.ex1cFlipped],a[g.ex1]).curve(a[g.ex1c],a[g.ex2c],a[g.ex2]).line(a[g.in2]).curve(a[g.in2c],a[g.in1c],a[g.in1]).curve(a[g.in1cFlipped],a[g.in2cFlipped],a[g.in2Flipped]).line(a[g.ex2Flipped]).close(),c.storeMacroIds(t.id,{paths:b,points:g}),c.getMacroIds(t.id)}}},l=r,c=r},68024:(t,e,o)=>{o.d(e,{F:()=>n});var a=o(80170);const i={username:!1,control:o(57416).A4.dflt};function n(){const[t,e]=(0,a.A)("fs-account",{defaultValue:i}),[o,n]=(0,a.A)("fs-admin",{defaultValue:i}),[s,r]=(0,a.A)("fs-token",{defaultValue:null}),[l,c]=(0,a.A)("fs-seen-user",{defaultValue:!1}),p=()=>n(i);return{account:t,setAccount:e,token:s,setToken:r,seenUser:l,setSeenUser:c,signOut:()=>{console.log("SIGN OUT"),e(i),r(null)},admin:o,clearAdmin:p,impersonate:o=>{n({token:s,account:t});const a={...o.account,impersonatingAdmin:{id:t.id,username:t.username}};e(a),r(o.token)},stopImpersonating:()=>{e(o.account),r(o.token),p()},control:t?.control||2}}},68363:(t,e,o)=>{o.d(e,{AZ:()=>h,Qq:()=>f,Uy:()=>m,ds:()=>u,kW:()=>g});var a=o(89575),i=o(14041),n=o(48831);const s=t=>i.createElement("iframe",(0,a.A)({},t,{style:{height:"90vh",width:"90vw"},className:"tw:w-full tw:mx-auto tw:max-w-4xl"})),r=({path:t})=>i.createElement(s,{src:`https://freesewing.eu/${t}/?docusaurus-data-fs-embed=true`}),l=({design:t,o:e})=>t&&e?i.createElement(s,{src:`https://freesewing.eu/docs/designs/${t.toLowerCase()}/options/${e.toLowerCase()}/index.html?docusaurus-data-fs-embed=true`,title:"Design Options Help"}
1):i.createElement("p",null,"Invalid props provided to DesignOptionHelp."),c=({name:t})=>t?i.createElement(s,{src:`https://freesewing.eu/docs/editor/menus/settings/${t.toLowerCase()}/index.html?docusaurus-data-fs-embed=true`,title:"Core Setting Help"}):i.createElement("p",null,"Invalid props provided to CoreSettingsHelp."),p=({name:t})=>t?i.createElement(s,{src:`https://freesewing.eu/docs/editor/menus/preferences/${t.toLowerCase()}/index.html?docusaurus-data-fs-embed=true`,title:"UI Preferences Help"}):i.createElement("p",null,"Invalid props provided to UiPreferenceHelp."),d=({m:t})=>t?i.createElement("iframe",{src:`https://freesewing.eu/docs/measurements/${t.toLowerCase()}/index.html?docusaurus-data-fs-embed=true`,title:"Measurement Help",style:{height:"90vh",width:"90vw"}}):i.createElement("p",null,"No measurement name provided in the m prop.");function h(t,e){e(i.createElement(n.F,{fullWidth:!0,keepOpenOnClick:!0},i.createElement(c,{name:t})))}function m(t,e){e(i.createElement(n.F,{fullWidth:!0,keepOpenOnClick:!0},i.createElement(p,{name:t})))}function f(t,e,o){o(i.createElement(n.F,{fullWidth:!0,keepOpenOnClick:!0},i.createElement(l,{design:t,o:e})))}function u(t,e){e(i.createElement(n.F,{fullWidth:!0,keepOpenOnClick:!0},i.createElement(d,{m:t})))}function g(t,e){e(i.createElement(n.F,{wide:!0,keepOpenOnClick:!0},i.createElement(r,{path:t})))}},70672:(t,e,o)=>{o.d(e,{R:()=>i,s:()=>a});const a={enableBackend:!0,hrefNewSet:"/account/data/sets/",cloudImageDflt:"https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/365cc64e-1502-4d2b-60e0-cc8beee73f00/public",cloudImageUrl:"https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/",cloudImageVariants:["public","sq100","sq200","sq500","w200","w500","w1000","w2000"],mainViews:["draft","designs","save","export"],extraViews:["measurements","undos","layout","docs"],devViews:["editSettings","inspect","logs","test","timing"],utilViews:["picker"],measurementsFreeViews:["designs","measurements","docs","picker"],viewComponents:{draft:"DraftView",designs:"DesignsView",save:"SaveView",export:"ViewPicker",measurements:"MeasurementsView",undos:"UndosView",layout:"ViewPicker",editSettings:"ViewPicker",docs:"ViewPicker",inspect:"ViewPicker",logs:"ViewPicker",test:"ViewPicker",timing:"ViewPicker",picker:"ViewPicker",error:"ViewPicker"},menuValueComponents:{bool:"BoolValue",constant:"ConstantOptionValue",count:"CountOptionValue",deg:"DegOptionValue",list:"ListOptionValue",mm:"MmOptionValue",pct:"PctOptionValue"},menuGroupEmojis:{advanced:"\ud83e\udd13",fit:"\ud83d\udc55",style:"\ud83d\udc83\ud83c\udffd",dflt:"\ud83d\udd79\ufe0f",groupDflt:"\ud83d\udcc1"},menuOptionEditLabels:{pct:"%",count:"#",deg:"\xb0",mm:"mm"},i18nPatternNamespaces:["plugin-annotations"],stateBackend:"url",uxLevels:{core:{sa:1,paperless:2,units:1,complete:3,expand:4,only:4,scale:3,margin:3},ui:{renderer:4,aside:3,kiosk:3,rotate:4,ux:1},views:{draft:1,measurements:1,test:4,timing:4,layout:2,export:1,save:1,undos:2,editSettings:3,logs:4,inspect:4,docs:1,designs:1,picker:1}},defaultUx:4,flagTypes:["error","warn","note","info","tip","fixme"],initialState:{settings:{},ui:{renderer:"react",kiosk:0,aside:0,ux:4}},roles:{levels:{readNone:0,readSome:1,readOnly:2,writeSome:3,user:4,tester:4,curator:5,bughunter:6,support:8,admin:9},base:"user"},notifyTimeout:2500,degreeMeasurements:["shoulderSlope"]},i=(t={})=>{const e={...a,...t};return e.views=[...e.mainViews,...e.extraViews,...e.devViews,...e.utilViews],e}},71336:(t,e,o)=>{o.d(e,{F:()=>s});var a=o(14041),i=o(86560),n=o(1199);const s=({k:t,val:e,color:o="primary",small:s=!1,href:S=!1,onClick:L=!1})=>{const P=(0,a.useState)(!1)[1],{setLoadingStatus:R}=(0,a.useContext)(n.q);let F=c;"secondary"===o?F=d:"neutral"===o?F=m:"accent"===o?F=u:"info"===o?F=b:"warning"===o?F=k:"success"===o?F=v:"error"===o&&(F=T);let E=p;if("secondary"===o?E=h:"neutral"===o?E=f:"accent"===o?E=g:"info"===o?E=w:"warning"===o?E=C:"success"===o?E=y:"error"===o&&(E=x),S)return a.createElement(r,{k:t,val:e,color:o,small:s,href:S,colorClasses1:F,colorClasses2:E});const W=a.createElement(a.Fragment,null,a.createElement("span",{className:`${l} ${s?"tw:rounded-l":"tw:rounded-l-lg"} ${F} ${s?"tw:text-xs":""} tw:pr-0.5`},t),a.createElement("span",{className:`${l} ${s?"tw:rounded-r":"tw:rounded-r-lg"} ${E} ${s?"tw:text-xs":""} tw:pl-0.5`},e));return!1===L?a.createElement("button",{className:"tw:daisy-btn-ghost tw:p-0",onClick:()=>{(0,i.lW)(e),B(P,R,t)}},W):a.createElement("button",{className:"tw:daisy-btn-ghost tw:p-0",onClick:"function"==typeof L?L:null},W)},r=({k:t,val:e,small:o=!1,href:i=!1,colorClasses1:n,colorClasses2:s,Link:r=!1})=>{const c=a.createElement(a.Fragment,null,a.createElement("span",{className:`${l} ${o?"tw:rounded-l":"tw:rounded-l-lg"} ${n} ${o?"tw:text-xs":""} tw:pr-0.5`},t),a.createElement("span",{className:`${l} ${o?"tw:rounded-r":"tw:rounded-r-lg"} ${s} ${o?"tw:text-xs":""} tw:pl-0.5`},e)),p={className:"tw:daisy-btn-ghost tw:p-0 tw:hover:no-underline tw:hover:bg-transparent",href:i};return r?a.createElement(r,p,c):a.createElement("a",p,c)},l="tw:px-1 tw:text-sm tw:font-medium tw:whitespace-nowrap tw:border-2 tw:border-solid",c="tw:text-primary-content tw:bg-primary tw:border-primary",p="tw:text-primary tw:border-primary",d="tw:text-secondary-content tw:bg-secondary tw:border-secondary",h="tw:text-secondary tw:border-secondary",m="tw:text-neutral-content tw:bg-neutral tw:border-neutral",f="tw:text-neutral tw:border-neutral",u="tw:text-accent-content tw:bg-accent tw:border-accent",g="tw:text-accent tw:border-accent",b="tw:text-info-content tw:bg-info tw:border-info",w="tw:text-info tw:border-info",k="tw:text-warning-content tw:bg-warning tw:border-warning",C="tw:text-warning tw:border-warning",v="tw:text-warning-content tw:bg-success tw:border-success",y="tw:text-success tw:border-success",T="tw:text-error-content tw:bg-error tw:border-error",x="tw:text-error tw:border-error",B=(t,e,o)=>{t(!0),e([!0,o?`${o} copied to clipboard`:"Copied to clipboard",!0,!0]),setTimeout((()=>t(!1)),1e3)}},73570:(t,e,o)=>{o.d(e,{K:()=>l,T:()=>r});var a=o(14041),i=o(86560),n=o(95069),s=o(1199);const r=({children:t,content:e,label:o=!1,sup:r=!1,btnClasses:l="tw:daisy-btn tw:daisy-btn-ghost tw:hover:border-transparent w:hover:border-transparent tw:hover:shadow-none",onCopy:c=!1})=>{const[p,d]=(0,a.useState)(!1),{setLoadingStatus:h}=(0,a.useContext)(s.q),m=r?"tw:w-4 tw:h-4 tw:-mt-4 tw:-ml-1":"tw:w-5 tw:h-5";return a.createElement("button",{className:(p?"tw:text-success ":"")+l+" tw:w-full tw:lg:w-auto tw:group tw:flex tw:flex-row tw:justify-between",onClick:()=>((t,e,o,a,n=!1)=>{(0,i.lW)(t),e(!0),o([!0,a?`${a} copied to clipboard`:"Copied to clipboard",!0,!0]),setTimeout((()=>e(!1)),1e3),"function"==typeof n&&n(t,a)})(e,d,h,o,c)},r?t:null,p?a.createElement(n.aV,{className:`${m} tw:text-success-content tw:bg-success tw:rounded-full tw:p-1`,stroke:4}):a.createElement(n.Td,{className:`${m} tw:text-inherit tw:group-hover:text-secondary`}),r?null:t)},l=({btnProps:t={},children:e=[],className:o="",color:i="primary",href:n=!1,onClick:s=!1,title:r=""})=>{const l={className:`tw:daisy-btn-${i} hover:tw:text-${i}-content ${o}`,title:r,...t};return s?l.onClick=s:n&&(l.href=n),s?a.createElement("button",l,a.createElement("div",{className:`tw:text-${i}-content ${c}`},e)):a.createElement("a",l,a.createElement("div",{className:`tw:text-${i}-content ${c}`},e))}
1,c="tw:flex tw:flex-row tw:gap-2 tw:lg:gap-6 tw:items-center tw:grow tw:justify-between tw:w-full tw:md:w-auto tw:daisy-btn tw:hover:no-underline tw:capitalize"},76936:(t,e,o)=>{o.d(e,{L:()=>s});var a=o(14041),i=o(16840),n=o(68158);const s=t=>{const e=t.js?JSON.stringify(t.js,null,2):t.children;return a.createElement(i.f,{language:"json",raw:n.A.highlight(e,{language:"json"}).value,copy:e})}},78688:(t,e,o)=>{o.d(e,{Bv:()=>p,Wc:()=>h});var a=o(89575),i=o(14041),n=o(68024),s=o(1199),r=o(50182),l=o(95069),c=o(90512);const p=t=>i.createElement(r.i,null,i.createElement(s.V,null,i.createElement(d,(0,a.A)({},t,{Layout:!1})))),d=({Layout:t=c.PE,children:e=[],crumbs:o=[],description:a="Free Bespoke Sewing Patterns",title:n="FreeSewing"})=>{const{modalContent:l}=(0,i.useContext)(r.V),{LoadingStatus:p}=(0,i.useContext)(s.q);return i.createElement("div",{className:"tailwind-container"},i.createElement(p,null),t?i.createElement(t,{title:n,description:a,crumbs:o},e):e,"function"==typeof l?l():l)},h=t=>{const{id:e,Default:o}=t,a=f[e]?f[e]:o;return i.createElement(a,t)},m=({label:t,Icon:e,href:o,Link:a})=>i.createElement(a,{className:"tw:daisy-btn tw:daisy-btn-ghost tw:hover:no-underline tw:hover:text-base-content custom-navbar-item no-hover-decoration",href:o},i.createElement("div",{className:"tw:flex tw:flex-row tw:gap-2 tw:items-center"},i.createElement(e,{className:"tw:w-6 tw:h-6 tw:text-base-content"}),i.createElement("span",{className:"tw:text-lg tw:text-base-content"},t))),f={account:({Link:t})=>{const[e,o]=(0,i.useState)(!1),{account:a}=(0,n.F)();(0,i.useEffect)((()=>{a?.username&&o(!0)}),[a]);const s=e&&a.username?{Link:t,label:a.username,Icon:l.ny,href:"/account/"}:{Link:t,label:"Sign In",Icon:l.XA,href:"/signin/"};return i.createElement(m,s)},designs:t=>i.createElement(m,{label:"Designs",href:"/designs/",Icon:l.Uk,Link:t.Link}),docs:t=>i.createElement(m,{label:"Docs",href:"/docs/",Icon:l.Vf,Link:t.Link}),showcase:t=>i.createElement(m,{label:"Showcase",href:"/showcase/",Icon:l.jp,Link:t.Link}),blog:t=>i.createElement(m,{label:"Blog",href:"/blog/",Icon:l.wi,Link:t.Link}),forum:t=>i.createElement(m,{label:"Forum",href:"https://forum.freesewing.eu/",Icon:l.oy,Link:t.Link}),support:t=>i.createElement(m,{label:"Support",href:"/support/",Icon:l.NT,Link:t.Link})}},80021:(t,e,o)=>{o.d(e,{i:()=>a});const a={account:"edd96e8b19d1be5946c5f7983365bda4",url:"https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/",variants:["public","sq100","sq200","sq500","w200","w500","w1000","w2000"],dflt:"https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/365cc64e-1502-4d2b-60e0-cc8beee73f00/public"}},81637:(t,e,o)=>{o.d(e,{o:()=>
1l,t:()=>r});var a=o(14041),i=o(50182),n=o(48831),s=o(95069);const r=({tabs:t="",active:e=0,children:o,withModal:r=!1})=>{const{setModal:l}=(0,a.useContext)(i.V),[c,p]=(0,a.useState)(e),d=Array.isArray(t)?t:t.split(",").map((t=>t.trim()));if(!d)return null;const h=o.map(((t,e)=>a.cloneElement(t,{activeTab:c,tabId:e,key:e})));return a.createElement("div",{className:"tw:border tw:border-base-300 tw:rounded-lg tw:pt-2"},a.createElement("div",{className:"tw:daisy-tabs tw:daisy-tabs-border",role:"tablist"},d.map(((t,e)=>{const o=`tw:text-lg tw:font-bold tw:capitalize tw:daisy-tab tw:h-auto tw:grow tw:py-1 ${c===e?"tw:daisy-tab-active":""} tw:border-b-2 tw:border-solid tw:border-x-0 tw:border-t-0 tw:bg-transparent`;return r&&c===e?a.createElement("button",{key:e,role:"tab",className:o,onClick:()=>l(a.createElement(n.F,{flex:"col",justify:"top tw:lg:justify-center",slideFrom:"right",fullWidth:!0},h))},a.createElement("span",{className:"tw:pr-2"},t),a.createElement(s.Vs,{className:"tw:w-6 tw:h-6 hover:tw:tw:text-secondary"})):a.createElement("button",{key:e,className:o,onClick:()=>p(e)},t)}))),a.createElement("div",{className:"tw:p-4 tw:pb-2"},h))},l=({children:t,tabId:e,activeTab:o})=>o===e?t:null},84985:(t,e,o)=>{o.d(e,{V:()=>a});const a=["basting","biasBinding","blockDevelopment","boning","buttons","curved seams","darts","elastic","gathering","grommets","handSewing","interfacing","knitBinding","lining","pleating","pockets","precision","ribbing","serg
1ing","sleeves","topstitching","weltPockets","zipper"]},85627:(t,e,o)=>{o.d(e,{y:()=>i});var a=o(14041);const i=({className:t="tw:h-6 tw:w-6"})=>a.createElement("svg",{className:`tw:animate-spin ${t}`,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},a.createElement("circle",{className:"tw:opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.createElement("path",{className:"tw:opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}))},86063:(t,e,o)=>{o.d(e,{hk:()=>n});const a=JSON.parse('{"id":"plugin-gore","r":"4.6.0"}'),i={name:a.id,version:a.r,macros:{gore:function(t,{points:e,paths:o,Path:a}){const i=t.from,n=Number(t.gores),s=Number(t.radius),r=t.prefix||"gore",l=Number(t.extraLength);e[r+"p1"]=i.shift(0,s*Math.PI/2+l),e[r+"Cp1"]=e[r+"p1"].shift(180-180/n,s/2/Math.cos(Math.PI/n)),e[r+"p3"]=i.shift(90,s*Math.PI/n),e[r+"p2"]=e[r+"p3"].shift(0,l),e[r+"Cp2"]=e[r+"p2"].shift(0,s*(Math.PI-2)/2),l<0&&(o.auxiliaryPath=(new a).move(e[r+"p1"]).curve(e[r+"Cp1"],e[r+"Cp2"],e[r+"p2"]).hide(),e[r+"p2"]=o.auxiliaryPath.intersectsX(0)[0],o.auxiliaryPath=o.auxiliaryPath.split(e[r+"p2"])[0],e[r+"Cp1"]=o.auxiliaryPath.ops[1].cp1,e[r+"Cp2"]=o.auxiliaryPath.ops[1].cp2,e[r+"p3"]=e[r+"p2"].clone()),o[r+"seam"]=(new a).move(i).line(e[r+"p1"]).curve(e[r+"Cp1"],e[r+"Cp2"],e[r+"p2"]).line(e[r+"p3"]).line(i).close().attr("class",t.class?t.class:""),t.hidden?o[r+"seam"].hide():o[r+"seam"].unhide()}}},n=i},86354:(t,e,o)=>{o.d(e,{F:()=>r});o(14041);var a=o(16840),i=o(81637),n=(o(95069),o(73570),o(34519)),s=o(31085);const r=({docs:t,example:e})=>{if(!t)return(0,s.jsx)(n.yV,{children:"No docs passed in"});const o=e||null;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:t.desc}),(0,s.jsxs)(i.t,{tabs:"Import, Props, Example, Source",children:[(0,s.jsxs)(i.o,{children:[(0,s.jsxs)("p",{children:["You can import the ",(0,s.jsx)("code",{children:t.name})," component from the ",(0,s.jsx)("b",{children:t.family})," ","component family in the ",(0,s.jsx)("code",{children:"@freesewing/react"})," package:"]}),(0,s.jsx)(a.f,{language:"js",children:t.importAs})]}),(0,s.jsxs)(i.o,{children:[t.params?(0,s.jsxs)("p",{children:[" ","The ",(0,s.jsx)("code",{children:t.name})," component takes the following props:"]}):(0,s.jsx)(n.yV,{children:"This component does not take any props"}),t.params?(0,s.jsx)(l,{docs:t}):null]}),(0,s.jsx)(i.o,{children:(0,s.jsx)(o,{})}),(0,s.jsx)(i.o,{children:(0,s.jsxs)("p",{children:["The ",(0,s.jsx)("code",{children:t.name})," component is defined"," ",(0,s.jsxs)("a",{href:`https://codeberg.org/freesewing/freesewing/src/branch/develop/${t.file}#L${t.line}`,children:["on"," ",(0,s.jsxs)("b",{children:["line"," ",t.line]})," ","in ",(0,s.jsx)("b",{children:t.file})]}),"."]})})]})]})},l=({docs:t})=>(0,s.jsxs)("table",{children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Name"}),(0,s.jsx)("th",{children:"Type"}),(0,s.jsx)("th",{children:"Description"}),(0,s.jsx)("th",{children:"Optional"}),(0,s.jsx)("th",{children:"Default Value"})]})}),(0,s.jsx)("tbody",{children:(t.params||[]).map(((t,e)=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:t.name}),(0,s.jsx)("td",{children:t.type.names}),(0,s.jsx)("td",{children:t.description}),(0,s.jsx)("td",{children:t.optional?"yes":"no"}),(0,s.jsx)("td",{children:(0,s.jsx)("code",{children:(0,s.jsx)(c,{value:t.defaultvalue})})})]},e)))})]}),c=({value:t})=>!0===t?"true":!1===t?"false":null===t?"null":void 0===t?"undefined":t},86560:(t,e,o)=>{o.d(e,{ZH:()=>w,o8:()=>k,qk:()=>y,lW:()=>J,cA:()=>T,Ky:()=>x,p3:()=>C,pc:()=>B,m2:()=>L,ZV:()=>P,Ee:()=>R,Jt:()=>d,ov:()=>E,z4:()=>W,f_:()=>u,Ci:()=>g,lD:()=>b,R8:()=>H,_p:()=>A,G0:()=>O,oo:()=>V,z2:()=>I,My:()=>f,XK:()=>D,RT:()=>N,lg:()=>M,LI:()=>_,hZ:()=>h,XV:()=>G,c_:()=>U,Z6:()=>X,fF:()=>Y,Ip:()=>v,DT:()=>$,Pb:()=>z});var a=o(34172),i=o(57416),n=o(46123),s=o(41263),r=o(73450),l=o(56622);o(69182);const c=["Unfolding ideas...","Teaching hamsters to run faster...","Convincing pixels to get in line...","Warming up the flux capacitor...","Untangling digital spaghetti...","Counting backwards from infinity...","Generating witty loading messages...","Brewing digital coffee...","Herding cats into quantum boxes...","Downloading more RAM...","Dividing by zero...","Spinning up the hamster wheel...","Convert
1ing caffeine to code...","Bending the space-time continuum...","Charging laser batteries...","Summoning the data spirits...","Searching for the lost semicolon...","Consulting the digital rolodex...","Calibrating the flux capacitor...","Collecting magic internet points...","Solving P vs NP...","Compressing time and space...","Entering the matrix...","Upgrading to Web 4.0...","Debugging the debugger..."];var p=o(52665);const d=n,h=s,m=r,f=l,u="tw:flex tw:flex-row tw:items-center tw:justify-between tw:gap-4 tw:w-full",g="tw:md:flex tw:md:flex-row tw:md:items-center tw:md:justify-between tw:md:gap-4 tw:w-full",b="tw:text-secondary tw:hover:underline tw:hover:cursor-pointer";function w(t){return"string"==typeof t?t.charAt(0).toUpperCase()+t.slice(1):""}function k(t){return JSON.parse(JSON.stringify(t))}function C(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}function v({ihash:t=!1,variant:e="public"}){return i.iR.variants.includes(e)||(e="sq100"),y(t?{id:`uid-${t}`,variant:e}:{id:"default-avatar",variant:e})}function y({id:t="default-avatar",variant:e="public"}){return t&&"default-avatar"!==t?(i.iR.variants.includes(e)||(e="sq100"),`${i.iR.url}${t}/${e}`):i.iR.dflt}function T(t){return void 0!==t?.pct?"pct":void 0!==t?.bool?"bool":void 0!==t?.count?"count":void 0!==t?.deg?"deg":void 0!==t?.list?"list":void 0!==t?.mm?"mm":"constant"}function x(t=!1,e=!1){if(!t)return!1;const o=e?/^-?[0-9]*(\s?[0-9]+\/|[.])?[0-9]+$/:/^-?[0-9]*[.]?[0-9]+$/;return!!(t=t.toString().trim().replace(",",".")).match(o)&&(e&&(t=F(t)),!isNaN(t)&&Number(t))}const B=(t,e="html")=>{let o="",a="",i="";t<0&&(t*=-1,o="-"),Math.abs(t)<1?i=t:(a=Math.floor(t),i=t-a);let n=Math.round(128*i);if(0==n)return S(o,a||n,!1,!1,e);for(let s=1;s<7;s++){const t=Math.pow(2,7-s);if(n%t==0)return S(o,a,n/t,Math.pow(2,s),e)}return o+Math.round(100*t)/100+("html"===e||"notags"===e?'"':"")};function S(t,e,o=!1,a=!1,i="html"){return"html"===i?o?`${t}${e}&nbsp;<sup>${o}</sup>/<sub>${a}</sub>"`:`${t}${e}"`:"notags"===i?o?`${t}${e} ${o}/${a}"`:`${t}${e}"`:o?`${t}${e} ${o}/${a}`:`${t}${e}`}function L(t,e,o="html"){if(t=j(t),"imperial"===e||!0===e){if(0==t)return S("",0,!1,!1,o);return B(t/25.4,o)}return"html"===o||"notags"===o?j(t/10)+"cm":j(t/10)}const P=(t,e="")=>{if(null==t)return t;if(void 0!==t.value&&(t=t.value),t<1)return t;if(t){const o=["","K","M","B"],a=Math.min(parseInt(Math.floor(Math.log(t)/Math.log(1e3)).toString(),10),o.length-1);return`${(t/1e3**a).toFixed(a?1:0)}${o[a]}${e}`}return"0"};function R(t){return Math.round(1e3*t)/10+"%"}function F(t){if(!isNaN(t))return t;let e=0,o=String(t).split(" ");if(o.length>2)return Number.NaN;if(2===o.length){const t=Number(o.shift());if(isNaN(t))return Number.NaN;e+=t}let a=o[0].trim().split("/");if(2!==a.length||""===a[1])return Number.NaN;let i=Number(a[0]),n=Number(a[1]);return isNaN(i)||isNaN(n)?NaN:e+i/n}function E(t="id"){if("undefined"!=typeof window)return new URLSearchParams(window.location.search).get(t)}function W(t,e={}){t=function(t){return t?.patternConfig?t:{patternConfig:{measurements:t}}}(t);const o=[];for(const a of t.patternConfig?.measurements||[])void 0===e[a]&&o.push(a);return[0===o.length,o]}function H(t,e="metric"){if("number"==typeof t)return t*("imperial"===e?25.4:10);if(String(t).endsWith("."))return!1;if("metric"===e)return t=Number(t),!isNaN(t)&&10*t;{const e=F(t);return!isNaN(e)&&25.4*e}}function A(t,e="metric"){return _(t/("imperial"===e?25.4:10),4)}const O=(t={},e,o="unset")=>{if("unset"===o)if(Array.isArray(e)&&Array.isArray(e[0]))for(const[a,i="unset"]of e)"unset"===i?m(t,a):h(t,a,i);else m(t,e);else h(t,e,o);return t};function D(t){let e=new p.dd;for(const o of t.ops)"move"===o.type&&(e=e.move(new p.bR(o.to.x,o.to.y))),"line"===o.type&&(e=e.line(new p.bR(o.to.x,o.to.y))),"curve"===o.type&&(e=e.curve(new p.bR(o.cp1.x,o.cp1.y),new p.bR(o.cp2.x,o.cp2.y),new p.bR(o.to.x,o.to.y))),"close"===o.type&&(e=e.close());return e.length()}const N=(t={},e=!1,o="draft")=>{const a=k(t),i=e?{...a.settings?.measurements||{}}:{},n={...a.settings||{}};n.measurements=i;const s={design:a.design,settings:n,view:o};return t.id&&(s.pid=t.id),`/editor/#s=${encodeURIComponent(JSON.stringify(s))}`},I=t=>`${t}`.length>0;function M(){return c[Math.floor(Math.random()*c.length)]}function _(t,e=1){return Math.round(t*Math.pow(10,e))/Math.pow(10,e)}function j(t,e){return"imperial"===e||!0===e?Math.round(1e6*t)/1e6:Math.round(10*t)/10}function G(t=!1,e=!0){const o={year:"numeric",month:"short",day:"numeric"};e&&(o.hour="2-digit",o.minute="2-digit",o.hour12=!1);return(t?new Date(t):new Date).toLocaleDateString("en",o)}const U=t=>t.slice(0,5);
1function Y(t,e=!0){const o=new Date-new Date(t),a=Math.floor(o/1e3),i=Math.floor(a/60),n=Math.floor(i/60),s=Math.floor(n/24),r=Math.floor(s/30),l=Math.floor(s/365),c=" ago";return a<1?"Now":1===a?`${e?"1s":"1 second"}${c}`:60===a?`${e?"1m":"1 minute"}${c}`:a<91?`${a}${e?"s":" seconds"}${c}`:60===i?`${e?"1h":"1 hour"}${c}`:i<120?`${i}${e?"m":" minutes"}${c}`:24===n?`${e?"1d":"1 day"}${c}`:n<48?`${n}${e?"h":" hours"}${c}`:s<61?`${s}${e?"d":" days"}${c}`:r<25?`${r}${e?"M":" months"}${c}`:`${l}${e?"Y":" years"}${c}`}function $(t){return/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t)}function z(t){const e=t.split("@").pop().split(".").pop().toLowerCase();return-1!==a.indexOf(e)||e}function J(t){navigator?.clipboard?navigator.clipboard.writeText(t).catch((e=>{console.error("Failed to use the clipboard API to copy text to clipboard:",e),K(t)})):K(t)}function K(t){const e=document.createElement("textarea");e.value=t,e.style.position="fixed",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}function V(t,e=!1){window&&(window.location.href=e?`${window.location.origin}${t}`:t)}const X=(t,e=!1)=>{if(!e)return t;const o=t.split(":");return o[0]=e,o.join(":")}},89069:(t,e,o)=>{o.d(e,{y:()=>i});var a=o(14041);const i=({nr:t,color:e="secondary"})=>a.createElement("span",{className:`tw:p-2 tw:w-8 tw:h-8 tw:flex tw:flex-col tw:items-center tw:justify-center tw:shrink-0 tw:rounded-full tw:text-center tw:p-0 tw:py-2 tw:bg-${e} tw:text-${e}-content tw:border-2 tw:border-base-100`},t)},90512:(t,e,o)=>{o.d(e,{I_:()=>h,PE:()=>s,YS:()=>r,bi:()=>l,jR:()=>d,yw:()=>c,zz:()=>p});var a=o(14041),i=o(97230),n=o(56702);const s=({children:t=[],crumbs:e=[],Link:o=!1,title:s})=>(o||(o=n.N_),a.createElement(r,null,a.createElement("div",{className:"tw:max-w-xl tw:w-full tw:mx-auto"},a.createElement(i.B,{crumbs:e,title:s,Link:o}),a.createElement("h1",{className:"tw:break-words"},s),a.createElement("div",{className:"tw:xl:pl-4"},t)))),r=({children:t})=>a.createElement("div",{className:"tw:flex tw:flex-row tw:items-start tw:w-full tw:justify-between tw:2xl:px-36 tw:xl:px-12 tw:px-4 tw:gap-0 tw:lg:gap-4 tw:xl:gap-8 3xl:tw:gap-12"},t),l=({children:t=[]})=>a.createElement("div",{className:"tw:max-w-96 tw:w-1/4 tw:hidden tw:lg:block tw:shrink-0 tw:my-8 tw:sticky tw:top-4 tw:max-h-screen tw:overflow-scroll"},t),c=({children:t=[]})=>a.createElement("div",{className:"tw:max-w-96 tw:w-1/4 tw:hidden tw:xl:block tw:my-8 tw:sticky tw:top-2"},t),p=({children:t=[],wide:e=!1})=>a.createElement("div",{className:`tw:grow tw:w-full tw:m-auto tw:max-w-${e?"full":"prose"} tw:my-8`},t),d=({children:t=[]})=>a.createElement("div",{className:"tw:grow tw:w-full tw:m-auto tw:my-8 tw:grow"},t),h=({children:t})=>a.createElement(r,null,a.createElement("div",{className:"tw:max-w-xl tw:w-full tw:mx-auto"},a.createElement("div",null,t)))},95069:(t,e,o)=>{o.d(e,{AD:()=>ie,Ab:()=>Ft,BK:()=>Ut,C3:()=>X,CR:()=>st,Ct:()=>L,DZ:()=>F,Ex:()=>ht,Ey:()=>j,FN:()=>Y,G:()=>Bt,GP:()=>I,GQ:()=>b,H2:()=>mt,HD:()=>x,H_:()=>Et,Hd:()=>Qt,Hk:()=>J,IJ:()=>D,JM:()=>qt,Je:()=>$,LP:()=>Ht,Lo:()=>ne,N0:()=>dt,NA:()=>Lt,NR:()=>K,NT:()=>Q,Nl:()=>Gt,O_:()=>ae,PX:()=>oe,Pd:()=>At,Q8:()=>kt,RY:()=>tt,Rq:()=>wt,Ru:()=>ct,SH:()=>q,TP:()=>z,Td:()=>S,Ty:()=>h,US:()=>v,Uk:()=>R,V5:()=>$t,Vf:()=>E,Vs:()=>et,WI:()=>Nt,XA:()=>nt,Xy:()=>Kt,YG:()=>_,Yp:()=>vt,Z3:()=>d,ZB:()=>pt,Ze:()=>It,Zm:()=>te,aP:()=>Pt,aV:()=>ut,aZ:()=>O,aj:()=>k,bo:()=>Jt,c1:()=>yt,cF:()=>f,cG:()=>c,cp:()=>u,cu:()=>p,cw:()=>Yt,ej:()=>Vt,g6:()=>xt,hM:()=>Tt,hh:()=>r,hl:()=>T,hs:()=>lt,iF:()=>U,iQ:()=>Dt,id:()=>ee,ik:()=>M,j1:()=>Ct,jD:()=>P,jf:()=>St,jp:()=>_t,k5:()=>W,kp:()=>it,lQ:()=>Xt,lm:()=>Mt,lo:()=>y,mE:()=>gt,mS:()=>N,nF:()=>V,ny:()=>Zt,oW:()=>Z,oy:()=>g,p6:()=>jt,qU:()=>A,qY:()=>at,rG:()=>G,rZ:()=>ot,s3:()=>H,sN:()=>Ot,sQ:()=>l,tJ:()=>w,uc:()=>zt,ve:()=>C,wF:()=>Rt,wi:()=>Wt,xf:()=>ft,xh:()=>B,z3:()=>bt,zA:()=>rt,zB:()=>m});var a=o(89575),i=o(14041),n=o(57416);const s="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z",r=({className:t="tw:w-6 tw:h-6",stroke:e=2,children:o=null,fill:a=!1,fillOpacity:n=1,dasharray:s=null})=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:a?"currentColor":"none",fillOpacity:n,strokeOpacity:n,viewBox:"0 0 24 24",strokeWidth:e,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeDasharray:s||"",className:t+" icon"},o),l=t=>
1i.createElement(r,t,i.createElement("path",{d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z"})),c=t=>i.createElement(r,t,i.createElement("path",{d:"M 16.004103,4.4394969 V 20.706071 M 3.1922297,4.3530908 H 20.925704 c 1.04693,0 1.889764,0.8428346 1.889764,1.8897638 V 18.889699 c 0,1.04693 -0.842834,1.889764 -1.889764,1.889764 H 3.1922297 c -1.0469291,0 -1.8897638,-0.842834 -1.8897638,-1.889764 V 6.2428546 c 0,-1.0469292 0.8428347,-1.8897638 1.8897638,-1.8897638 z"})),p=t=>i.createElement(r,t,i.createElement("path",{d:"M9.75 3.104v5.714a2.25 2.25 0 01-.659 1.591L5 14.5M9.75 3.104c-.251.023-.501.05-.75.082m.75-.082a24.301 24.301 0 014.5 0m0 0v5.714c0 .597.237 1.17.659 1.591L19.8 15.3M14.25 3.104c.251.023.501.05.75.082M19.8 15.3l-1.57.393A9.065 9.065 0 0112 15a9.065 9.065 0 00-6.23-.693L5 14.5m14.8.8l1.402 1.402c1.232 1.232.65 3.318-1.067 3.611A48.309 48.309 0 0112 21c-2.773 0-5.491-.235-8.135-.687-1.718-.293-2.3-2.379-1.067-3.61L5 14.5"})),d=t=>i.createElement(r,(0,a.A)({},t,{className:`${t.className||"tw:w-6 tw:h-6"} tw:-rotate-45`}),i.createElement("path",{d:"M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3"})),h=({size:t=6})=>i.createElement(ft,{className:`tw:w-${t} tw:h-${t} tw:text-error`,stroke:4}),m=({size:t=6})=>i.createElement(ut,{className:`tw:w-${t} tw:h-${t} tw:text-success`,stroke:4}),f=t=>i.createElement(r,t,i.createElement("path",{d:"M17.593 3.322c1.1.128 1.907 1.077 1.907 2.185V21L12 17.25 4.5 21V5.507c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0111.186 0z"})),u=t=>i.createElement(r,t,i.createElement("circle",{cx:"12",cy:"12",r:"8"})),g=t=>i.createElement(r,t,i.createElement("path",{d:"M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.076-4.076a1.526 1.526 0 011.037-.443 48.282 48.282 0 005.68-.494c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.
1123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"})),b=t=>i.createElement(r,t,i.createElement("circle",{cx:"12",cy:"12",r:"10"}),t.label?i.createElement("text",{x:"12",y:"17.5",stroke:"none",fill:"currentColor",textAnchor:"middle"},t.label):null),w=t=>i.createElement(r,t,i.createElement("path",{d:"m 8.233159,2.5000002 c 0,0 0.03684,1.4367676 0.07562,2.1541457 C 8.413989,6.5901608 7.3671071,6.9496995 7.3372662,8.1692173 7.3029172,9.5719723 8.2152,10.315942 8.255388,12.267223 8.290568,13.973294 7.1739465,15.012709 7.1739465,17.259683 9.46861,17.549817 10.668009,19.205086 11.354231,21.5 h 0.109763 0.93923 0.109803 c 0.686181,-2.294914 1.88558,-3.950183 4.180285,-4.240317 0,-2.246974 -1.116622,-3.286389 -1.081483,-4.99246 0.04015,-1.951281 0.952433,-2.6952507 0.918122,-4.0980057 -0.0298,-1.2195178 -1.076723,-1.5790565 -0.971513,-3.5150714 0.0389,-0.7173781 0.07562,-2.1541457 0.07562,-2.1541457 h -0.722313 c 0,1.5276628 -1.146752,3.7763442 -2.978112,3.7763442 -1.831402,0 -2.978154,-2.2486814 -2.978154,-3.7763442 z"})),k=t=>i.createElement(r,t,i.createElement("path",{d:"M 6.2021092,6.7988281 C 5.0433189,10.972649 5.2215488,13.211802 5.2215488,16.798828 h 5.8983122 l 0.143133,-1.21128 c 0.331559,-1.834081 0.655671,-2.543616 1.078829,0.07477 l 0.134587,1.136509 h 5.896176 c 0,-3.587026 0.180363,-5.826179 -0.978425,-9.9999999 z"})),C=t=>i.createElement(r,t,i.createElement("path",{d:"M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 01-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 011.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 00-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 01-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 00-3.375-3.375h-1.5a1.125 1.125 0 01-1.125-1.125v-1.5a3.375 3.375 0 00-3.375-3.375H9.75"})),v=t=>i.createElement(r,t,i.createElement("path",{d:"M6 18L18 6M6 6l12 12"})),y=t=>i.createElement(r,t,i.createElement("path",{d:"M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"})),T=t=>i.createElement(r,t,i.createElement("path",{d:"m15 15v4.5m0-4.5h4.5m-15.8-11.3 5.25 5.25m6 0v-4.5m0 4.5h4.5m-15.8 11.3 5.25-5.25h-4.5m4.5 0v4.5m11.3-15.8-5.25 5.25m-6 0h-4.5m4.5 0v-4.5m11.3 15.8-5.25-5.25"})),x=t=>i.createElement(r,t,i.createElement("path",{d:"M2.25 7.125C2.25 6.504 2.754 6 3.375 6h6c.621 0 1.125.504 1.125 1.125v3.75c0 .621-.504 1.125-1.125 1.125h-6a1.125 1.125 0 01-1.125-1.125v-3.75zM14.25 8.625c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v8.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 01-1.125-1.125v-8.25zM3.75 16.125c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v2.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 01-1.125-1.125v-2.25z"})),B=t=>i.createElement(r,t,i.createElement("path",{d:"M12 3v17.25m0 0c-1.472 0-2.882.265-4.185.75M12 20.25c1.472 0 2.882.265 4.185.75M18.75 4.97A48.416 48.416 0 0012 4.5c-2.291 0-4.545.16-6.75.47m13.5 0c1.01.143 2.01.317 3 .52m-3-.52l2.62 10.726c.122.499-.106 1.028-.589 1.202a5.988 5.988 0 01-2.031.352 5.988 5.988 0 01-2.031-.352c-.483-.174-.711-.703-.59-1.202L18.75 4.971zm-16.5.52c.99-.203 1.99-.377 3-.52m0 0l2.62 10.726c.122.499-.106 1.028-.589 1.202a5.989 5.989 0 01-2.031.352 5.989 5.989 0 01-2.031-.352c-.483-.174-.711-.703-.59-1.202L5.25 4.971z"})),S=t=>i.createElement(r,t,i.createElement("path",{d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})),L=t=>i.createElement(r,t,i.createElement("path",{d:s}),i.createElement("circle",{cx:"9",cy:"12",r:"1"}),i.createElement("circle",{cx:"14",cy:"12",r:"1"}),i.createElement("path",{d:"M 9 16 C 11 18 12 18 14 16"})),P=t=>i.createElement(r,t,i.createElement("path",{d:"M12 21v-8.25M15.75 21v-8.25M8.25 21v-8.25M3 9l9-6 9 6m-1.5 12V10.332A48.36 48.36 0 0012 9.75c-2.551 0-5.056.2-7.5.582V21M3 21h18M12 6.75h.008v.008H12V6.75z"})),R=t=>i.createElement(r,(0,a.A)({},t,{stroke:0,fill:!0}),i.createElement("path",{d:"m11.975 2.9104c-1.5285 0-2.7845 1.2563-2.7845 2.7848 0 0.7494 0.30048 1.4389 0.78637 1.9394a0.79437 0.79437 0 0 0 0.0084 0.00839c0.38087 0.38087 0.74541 0.62517 0.94538 0.82483 0.19998 0.19966 0.25013 0.2645 0.25013 0.51907v0.65964l-9.1217 5.2665c-0.28478 0.16442-0.83603 0.46612-1.3165 0.9611-0.48047 0.49498-0.92451 1.3399-0.66684 2.2585 0.22026 0.78524 0.7746 1.3486 1.3416 1.5878 0.56697 0.23928 1.0982 0.23415 1.4685 0.23415h18.041c0.37033 0 0.90158 0.0051 1.4686-0.23415 0.56697-0.23928 1.1215-0.80261 1.3418-1.5878 0.25767-0.91859-0.18662-1.7636-0.66709-2.2585-0.48046-0.49498-1.0315-0.79669
1-1.3162-0.9611l-8.9844-5.1873v-0.73889c0-0.70372-0.35623-1.2837-0.71653-1.6435-0.35778-0.3572-0.70316-0.58503-0.93768-0.81789-0.20864-0.21601-0.33607-0.50298-0.33607-0.83033 0-0.67 0.52595-1.1962 1.1959-1.1962 0.67001 0 1.1962 0.5262 1.1962 1.1962a0.79429 0.79429 0 0 0 0.79434 0.79427 0.79429 0.79429 0 0 0 0.79427-0.79427c0-1.5285-1.2563-2.7848-2.7848-2.7848zm-0.06859 8.2927 8.9919 5.1914c0.28947 0.16712 0.69347 0.41336 0.94393 0.67138 0.25046 0.25803 0.31301 0.3714 0.24754 0.60483-0.10289 0.36677-0.19003 0.40213-0.35969 0.47373-0.16967 0.07161-0.47013 0.09952-0.80336 0.09952h-18.041c-0.33323 0-0.6337-0.02792-0.80336-0.09952-0.16967-0.07161-0.25675-0.10696-0.35963-0.47373-0.06548-0.23342-0.00303-0.3468 0.24748-0.60483 0.25046-0.25803 0.65471-0.50426 0.94418-0.67138z"})),F=t=>i.createElement(r,t,i.createElement("path",{d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"})),E=t=>i.createElement(r,t,i.createElement("path",{d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})),W=t=>i.createElement(r,t,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:t.stroke||2,d:"M19 9l-7 7-7-7"})),H=t=>i.createElement(r,t,i.createElement("path",{d:"M12 9.75v6.75m0 0l-3-3m3 3l3-3m-8.25 6a4.5 4.5 0 01-1.41-8.775 5.25 5.25 0 0110.233-2.33 3 3 0 013.758 3.848A3.752 3.752 0 0118 19.5H6.75z"})),A=t=>i.createElement(r,t,i.createElement("path",{d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})),O=t=>i.createElement(r,t,i.createElement("path",{d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})),D=t=>i.createElement(r,t,i.createElement("path",{d:"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"})),N=t=>i.createElement(r,t,i.createElement("path",{d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M2
10.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"})),I=t=>i.createElement(r,t,i.createElement("path",{d:"M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})),M=({size:t=6})=>i.createElement(ft,{className:`tw:w-${t} tw:h-${t} tw:text-secondary-content`,stroke:4}),_=t=>i.createElement(r,t,i.createElement("path",{d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})),j=t=>i.createElement(r,t,i.createElement("path",{d:"M7.864 4.243A7.5 7.5 0 0119.5 10.5c0 2.92-.556 5.709-1.568 8.268M5.742 6.364A7.465 7.465 0 004.5 10.5a7.464 7.464 0 01-1.15 3.993m1.989 3.559A11.209 11.209 0 008.25 10.5a3.75 3.75 0 117.5 0c0 .527-.021 1.049-.064 1.565M12 10.5a14.94 14.94 0 01-3.6 9.75m6.633-4.596a18.666 18.666 0 01-2.485 5.33"})),G=t=>i.createElement(r,t,i.createElement("path",{d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"})),U=t=>i.createElement(r,t,i.createElement("path",{d:"M3 3v1.5M3 21v-6m0 0l2.77-.693a9 9 0 016.208.682l.108.054a9 9 0 006.086.71l3.114-.732a48.524 48.524 0 01-.005-10.499l-3.11.732a9 9 0 01-6.085-.711l-.108-.054a9 9 0 00-6.208-.682L3 4.5M3 15V4.5"})),Y=t=>i.createElement(r,t,i.createElement("path",{d:"M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"})),$=t=>i.createElement(r,(0,a.A)({},t,{stroke:0,fill:!0}),i.createElement("path",{d:n.VI})),z=t=>i.createElement(r,t,i.createElement("path",{d:"M 4.9580501,20.694732 A 9.9588146,9.9588156 45 0 1 4.9523103,6.6165865 9.9588146,9.9588156 45 0 1 19.030446,6.5993628 9.9588146,9.9588156 45 0 1 19.059151,20.67748 Z"}),i.createElement("path",{d:"m 13.346899,14.905658 c 0.185287,0.691503 -0.22474,1.402361 -0.916092,1.588212 -0.691356,0.185836 -1.402539,-0.223628 -1.588938,-0.914833 -0.186401,-0.691204 0.222481,-1.402721 0.913533,-1.589686 l 4.660195,-6.2056598 z"})),J=t=>i.createElement(r,(0,a.A)({},t,{stroke:0,fill:!0}),i.createElement("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})),K=t=>i.createElement(r,(0,a.A)({},t,{fill:!0}),i.createElement("path",{d:"M 12.25009,0 C 7.5567085,0 3.5033589,2.69334 1.530043,6.613315 0.71674427,8.240005 0.25,10.06676 0.25,12.00009 c 0,1.93333 0.46674427,3.759905 1.280043,5.386595 C 3.5033589,21.30666 7.5567085,24 12.25009,24 c 3.239959,0 5.959944,-1.066635 7.94668,-2.906575 2.266629,-2.093365 3.573349,-5.173415 3.573349,-8.826735 0,-0.98666 -0.08023,-1.70661 -0.253496,-2.453265 l -11.266533,0 0,4.45322 6.613137,0 c -0.133283,1.106705 -0.853233,2.77333 -2.453266,3.89327 -1.013315,0.706675 -2.373243,1.199975 -4.159871,1.199975 -3.173318,0 -5.8666835,-2.09327 -6.826777,-4.986605 -0.2533286,-0.746655 -0.399991,-1.54657 -0.399991,-2.373195 0,-0.82672 0.1467055,-1.62672 0.386706,-2.373375 C 6.3834495,6.73338 9.076772,4.63993 12.25009,4.63993 c 2.253301,0 3.773228,0.973465 4.639932,1.786855 L 20.27666,3.12004 C 18.196718,1.186705 15.490049,0 12.25009,0 Z"})),V=t=>i.createElement(r,t,i.createElement("path",{d:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"})),X=t=>i.createElement(r,t,i.createElement("path",{d:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"})),Q=t=>i.createElement(r,t,i.createElement("path",{d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"})),q=t=>i.createElement(r,t,i.createElement("path",{d:"M10.5 6a7.5 7.5 0 107.5 7.5h-7.5V6z"}),i.createElement("path",{d:"M13.5 10.5H21A7.5 7.5 0 0013.5 3v7.5z"})),Z=t=>i.createElement(r,(0,a.A)({},t,{stroke:0,fill:!0}),i.createElement("path",{d:"M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 
112 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z"})),tt=t=>i.createElement(r,t,i.createElement("path",{d:"M15.75 5.25a3 3 0 013 3m3 0a6 6 0 01-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1121.75 8.25z"})),et=t=>i.createElement(r,t,i.createElement("path",{d:"M 3,17.033898 V 7.2838983 c 0,-1.242641 1.007359,-2.25 2.25,-2.25 h 13.5 c 1.242641,0 2.25,1.007359 2.25,2.25 v 9.7499997 m -18,0 c 0,1.242641 1.007359,2.25 2.25,2.25 h 13.5 c 1.242641,0 2.25,-1.007359 2.25,-2.25"})),ot=t=>i.createElement(r,t,i.createElement("path",{d:"M15 19l-7-7 7-7"})),at=t=>i.createElement(r,t,i.createElement("path",{d:"M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244"})),it=t=>i.createElement(r,t,i.createElement("path",{d:"M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"})),nt=t=>i.createElement(r,t,i.createElement("path",{d:"M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"})),st=t=>i.createElement(r,t,i.createElement("path",{d:"m 2.4889452,14.488945 h 7.0221096 v 7.02211 H 2.4889452 Z M 14.488945,2.4889452 h 7.02211 v 7.0221096 h -7.02211 z m -11.9999998,0 H 9.5110548 V 9.5110548 H 2.4889452 Z M 14.488945,14.488945 h 7.02211 v 7.02211 h -7.02211 z"})),rt=t=>i.createElement(r,(0,a.A)({},t,{fill:!0,stroke:0}),i.createElement("path",{d:"m 11.217423,0.1875 c -2.8267978,0.0231106 -5.545964,0.32921539 -7.1306105,1.056962 0,0 -3.14282962,1.4058166 -3.14282962,6.2023445 0,1.0983506 -0.021349,2.4116171 0.013437,3.8043315 0.11412502,4.690743 0.85993502,9.313695 5.19692442,10.461603 1.9996899,0.529281 3.7166529,0.640169 5.0993757,0.564166 2.507534,-0.139021 3.915187,-0.894849 3.915187,-0.894849 l -0.08272,-1.819364 c 0,0 -1.79194,0.564966 -3.804377,0.496111 -1.9938518,-0.06838 -4.0987697,-0.214969 -4.4212502,-2.662908 -0.029782,-0.215025 -0.044673,-0.445024 -0.044673,-0.686494 0,0 1.9573364,0.47844 4.4378282,0.592088 1.516743,0.06957 2.939062,-0.08886 4.383732,-0.261231 2.770451,-0.330816 5.182722,-2.037815 5.485905,-3.597546 0.477704,-2.456993 0.438356,-5.9959075 0.438356,-5.9959075 0,-4.7965279 -3.142655,-6.2023445 -3.142655,-6.2023445 C 16.83453,0.51671539 14.113674,0.21061063 11.286876,0.1875 Z M 8.0182292,3.9352913 c 1.177465,0 2.0690118,0.4525587 2.6585778,1.3578046 l 0.573249,0.9608111 0.573247,-0.9608111 c 0.589448,-0.9052459 1.480995,-1.3578046 2.65858,-1.3578046 1.017594,0 1.837518,0.3577205 2.463657,1.0555661 0.606959,0.6978459 0.909169,1.6411822 0.909169,2.8281631 V 13.626816 H 15.553691 V 7.9896839 c 0,-1.1882914 -0.49996,-1.7914432 -1.500043,-1.7914432 -1.10575,0 -1.659889,0.715401 -1.659889,2.1301529 V 11.413948 H 10.106352 V 8.3283936 c 0,-1.4147519 -0.5543138,-2.1301529 -1.6600628,-2.1301529 -1.000084,0 -1.5000426,0.6031518 -1.5000426,1.7914432 V 13.626816 H 4.6452275 V 7.8190205 c 0,-1.18698
109 0.3022656,-2.1303172 0.9093441,-2.8281631 C 6.1805914,4.2930118 7.0005147,3.9352913 8.0182292,3.9352913 Z"})),lt=t=>i.createElement(r,t,i.createElement("path",{d:"m 23.045963,7.9355562 v 3.7987498 l -0.01469,-0.056 C 23.346411,18.817891 1.2185835,21.36545 1.2185835,21.36545 v -3.836793 m 0.075177,-5.192339 V 8.3573441 M 6.7939469,16.638959 C 5.6484749,16.381008 4.6127423,16.03325 3.7570739,15.581871 2.2780992,14.801689 1.3370697,13.711938 1.2971261,12.241292 M 2.0464728,10.122206 C 4.5831883,3.7286119 20.382021,3.7454996 22.30006,10.110938 M 1.2185835,17.535357 c 0,0 23.2148625,-2.584129 21.7494555,-10.2183133 C 21.611034,0.24754253 2.7448834,0.46882453 1.373585,7.5355232 0.41141246,12.493877 8.5647942,13.74509 15.368311,13.344749 v 1.037311"})),ct=t=>i.createElement(r,t,i.createElement("path",{d:"M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z"})),pt=t=>i.createElement(r,t,i.createElement("path",{d:"M4 6h16M4 12h16M4 18h16"})),dt=t=>i.createElement(r,t,i.createElement("path",{d:"M19 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zM4 19.235v-.11a6.375 6.375 0 0112.75 0v.109A12.318 12.318 0 0110.374 21c-2.331 0-4.512-.645-6.374-1.766z"})),ht=t=>i.createElement(r,t,i.createElement("path",{d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})),mt=t=>i.createElement(r,t,i.createElement("path",{d:"M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 01-2.25 2.25M16.5 7.5V18a2.25 2.25 0 002.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 002.25 2.25h13.5M6 7.5h3v3H6v-3z"})),ft=t=>i.createElement(r,t,i.createElement("path",{d:"M6,6 L 18,18 M 18,6 L 6,18"})),ut=t=>i.createElement(r,t,i.createElement("path",{d:"M4.5 12.75l6 6 9-13.5"})),gt=t=>i.createElement(r,t,i.createElement("path",{d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 11-3 0m3 0a1.5 1.5 0 10-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m-9.75 0h9.75"})),bt=t=>i.createElement(r,t,i.createElement("path",{d:"M 4.5 2.5 v 19.2 h 15 v -13.3 h-3 v 10.3 h-9 v-13.2 h 6 v-3 z",strokeWidth:.1,stroke:"none",fill:"currentColor",fillOpacity:"0.666"}),i.createElement("path",{d:s})),wt=t=>i.createElement(r,t,i.createElement("path",{d:s,transform:"scale(-1 1) translate(-21 0)"}),i.createElement("path",{d:"M 16.5 7.75 h 5 v 14 h-5"})),kt=t=>i.createElement(r,t,i.createElement("path",{d:s}),i.createElement("path",{d:s,transform:"scale(0.666) translate(3, 11)"})),Ct=t=>i.createElement(r,t,i.createElement("path",{d:"M 1.5867219,1.58672 H 22.413278 V 22.41328 H 1.5867219 Z"}),i.createElement("path",{d:"M 22.007133,15.500122 H 1.97864 m 20.028493,-7 H 1.97864 M 15.492887,1.9858756 V 22.014369 m -7,-20.0284934 V 22.014369",strokeWidth:t.stroke/2||1.1})),vt=t=>i.createElement(r,t,i.createElement("path",{d:s})),yt=t=>i.createElement(r,t,i.createElement("path",{d:"M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"})),Tt=t=>i.createElement(r,t,i.createElement("path",{d:"M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z"})),xt=t=>i.createElement(r,t,i.createElement("path",{d:"M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"})),Bt=t=>i.createElement(r,(0,a.A)({},t,{stroke:0,fill:!0}),i.createElement("path",{d:"M 11.710829,0.00384705 C 5.0683862,0.16990815 -0.16221405,5.6505729 0.00384705,12.293016 0.16990814,18.686369 5.3178021,23.833614 11.628124,24.082706 18.27056
17,24.248767 23.833939,19.018167 24,12.375723 V 11.710829 C 23.833939,5.0683862 18.353273,-0.16221404 11.710829,0.00384705 Z m 5.187788,5.10021625 c 0.15698,0.00649 0.313636,0.048326 0.458939,0.1313569 0.581214,0.3321223 0.912687,1.0793971 0.580565,1.660611 C 17.605998,7.4772452 16.858724,7.808718 16.27751,7.4765965 15.862357,7.3105352 15.614238,6.8947339 15.614238,6.3965506 L 13.038995,5.8159854 12.208689,9.55236 c 1.826672,0.08303 3.48858,0.664893 4.651007,1.495199 0.664245,-0.664245 1.826673,-0.664245 2.490917,0 0.332122,0.332121 0.49786,0.747274 0.49786,1.245457 0.249091,0.747275 -0.249092,1.327193 -0.830306,1.576284 v 0.49948 c 0,2.740009 -3.155161,4.897506 -7.057597,4.897506 -3.9024357,0 -7.0575963,-2.157497 -7.0575963,-4.897506 V 13.8693 C 3.9896377,13.454147 3.6578398,12.458754 3.989962,11.545418 c 0.2490916,-0.664245 0.9120387,-1.08037 1.5762832,-0.99734 0.4981831,0 0.9133359,0.167358 1.2454581,0.499481 C 8.2232228,10.134222 9.8848065,9.55236 11.545418,9.55236 l 0.913011,-4.1515273 c 0,-0.083031 0.08271,-0.1654124 0.08271,-0.1654125 0.08303,-0.08303 0.166711,-0.084328 0.249741,-0.084328 l 2.906069,0.664893 C 15.946037,5.3800751 16.427678,5.084603 16.898617,5.1040633 Z M 9.3026198,12.293016 c -0.6642443,0 -1.2454583,0.581214 -1.2454583,1.245458 0,0.664245 0.498183,1.245459 1.2454583,1.245459 0.6642442,0 1.2454582,-0.581214 1.2454582,-1.245459 0,-0.664244 -0.581214,-1.245458 -1.2454582,-1.245458 z m 5.4813132,0 c -0.664245,0 -1.245459,0.581214 -1.245459,1.245458 0,0.664245 0.581214,1.245459 1.245459,1.245459 0.664245,0 1.245458,-0.581214 1.245458,-1.245459 0,-0.664244 -0.581213,-1.245458 -1.245458,-1.245458 z m -5.3872557,3.943952 c -0.072653,0 -0.135249,0.04021 -0.1767645,0.123249 -0.1660605,0.16606 -0.1660605,0.332121 0,0.415152 0.8303052,0.830306 2.4905922,0.914633 2.9887762,0.914633 0.498183,0 2.077061,-0.08433 2.990396,-0.914633 -0.08303,-0.08303 -0.084,-0.249092 -0.167034,-0.415152 -0.166061,-0.166062 -0.332121,-0.166062 -0.415152,0 -0.498183,0.581213 -1.660611,0.747598 -2.490917,0.747598 -0.830305,0 -1.992733,-0.166385 -2.4909165,-0.747598 -0.08303,-0.08303 -0.1657365,-0.123249 -0.2383882,-0.123249 z"})),St=t=>i.createElement(r,t,i.createElement("path",{d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99"})),Lt=t=>i.createElement(r,t,i.createElement("path",{d:"M12 9.75 14.25 12m0 0 2.25 2.25M14.25 12l2.25-2.25M14.25 12 12 14.25m-2.58 4.92-6.374-6.375a1.125 1.125 0 0 1 0-1.59L9.42 4.83c.21-.211.497-.33.795-.33H19.5a2.25 2.25 0 0 1 2.25 2.25v10.5a2.25 2.25 0 0 1-2.25 2.25h-9.284c-.298 0-.585-.119-.795-.33Z"})),Pt=t=>i.createElement(r,t,i.createElement("path",{d:"M12 18 l 0 -12 l -8 6 z M 20 18 l 0 -12 l -8 6 z M 2 6 l 0 12 l 1 0 l 0 -10 z"})),Rt=t=>i.createElement(r,t,i.createElement("path",{d:"M9 5l7 7-7 7"})),Ft=t=>i.createElement(r,t,i.createElement("path",{d:"M15.59 14.37a6 6 0 01-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 006.16-12.12A14.98 14.98 0 009.631 8.41m5.96 5.96a14.926 14.926 0 01-5.841 2.58m-.119-8.54a6 6 0 00-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 00-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 01-2.448-2.448 14.9 14.9 0 01.06-.312m-2.24 2.39a4.493 4.493 0 00-1.757 4.306 4.493 4.493 0 004.306-1.758M16.5 9a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0z"})),Et=t=>i.createElement(r,t,i.createElement("path",(0,a.A)({strokeLinecap:"round",strokeLinejoin:"round",d:"M 19.5,12 C 19.5,10.768 19.454,9.547 19.362,8.338 19.21576,6.3582806 17.641719,4.7842398 15.662,4.638 14.504476,4.5506731 13.344609,4.5048098 12.184624,4.5004103 M 19.5,12 l 3,-3 m -3,3 -3,-3 m -12,3 c 0,1.232 0.046,2.453 0.138,3.662 0.1462398,1.979719 1.7202806,3.55376 3.7,3.7 1.295324,0.09777 2.593584,0.143587 3.891661,0.13746 M 4.5,12 l 3,3 m -3,-3 -3,3"},t))),Wt=t=>i.createElement(r,t,i.createElement("path",{d:"M6 5c7.18 0 13 5.82 13 13M6 11a7 7 0 017 7m-6 0a1 1 0 11-2 0 1 1 0 012 0z"})),Ht=t=>i.createElement(r,t,i.createElement("path",{d:"M12 24V12.5m0 0l3 3m-3-3l-3 3M6.75 19.5a4.5 4.5 0 01-1.41-8.775 5.25 5.25 0 0110.233-2.33 3 3 0 013.758 3.848A3.752 3.752 0 0118 19.5H6.75z"})),At=t=>i.createElement(r,t,i.createElement("path",{d:"M2.25 15a4.5 4.5 0 004.5 4.5H18a3.75 3.75 0 001.332-7.257 3 3 0 00-3.7
158-3.848 5.25 5.25 0 00-10.233 2.33A4.502 4.502 0 002.25 15z M 11.5,10 v6 M 8.5,13 h 6"})),Ot=t=>i.createElement(r,t,i.createElement("circle",{cx:"12",cy:"12",r:"5"}),i.createElement("circle",{cx:"12",cy:"12",r:"10",strokeDasharray:"2 4"})),Dt=t=>i.createElement(r,t,i.createElement("path",{d:"M 2 20 h 20",strokeWidth:t.stroke/2||1}),i.createElement("path",{d:"M 2 12 h 20"}),i.createElement("path",{d:"M 2 4 h 20",strokeWidth:2*t.stroke||4})),Nt=t=>i.createElement(r,t,i.createElement("path",{d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"})),It=t=>i.createElement(r,t,i.createElement("path",{d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),i.createElement("path",{d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})),Mt=t=>i.createElement(r,t,i.createElement("path",{d:"M9 12.75L11.25 15 15 9.75m-3-7.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285z"})),_t=t=>i.createElement(r,t,i.createElement("path",{d:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"}),i.createElement("path",{d:"M15 13a3 3 0 11-6 0 3 3 0 016 0z"})),jt=t=>i.createElement(r,t,i.createElement("path",{d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"})),Gt=t=>i.createElement(r,(0,a.A)({},t,{className:`${t.className?t.className:"tw:h-6 tw:w-6"} tw:animate-spin`}),i.createElement("circle",{className:"tw:opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),i.createElement("path",{className:"tw:opacity-85",fill:"currentColor",stroke:"none",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})),Ut=({size:t=6})=>i.createElement(ut,{className:`tw:w-${t} tw:h-${t} tw:text-secondary-content`,stroke:4}),Yt=t=>i.createElement(r,t,i.createElement("path",{d:"M 21.070629,5.6224629 A 5.7508474,5.7508474 0 0 1 16.547219,0.52913011 V 0 H 12.41376 v 16.404252 a 3.474745,3.474745 0 0 1 -6.2403831,2.091334 l -0.0024,-0.0012 0.0024,0.0012 A 3.4735455,3.4735455 0 0 1 9.9924767,13.084289 V 8.8848362 A 7.5938063,7.5938063 0 0 0 3.5205237,21.713559 7.5950059,7.5950059 0 0 0 16.547219,16.405452 V 8.0233494 a 9.8171151,9.8171151 0 0 0 5.72685,1.8309665 V 5.7472464 A 5.7964413,5.7964413 0 0 1 21.070637,5.6225887 Z"})),$t=t=>i.createElement(r,t,i.createElement("path",{d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"})),zt=t=>i.createElement(r,(0,a.A)({},t,{stroke:t.stroke||2}),i.createElement("path",{d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"})),Jt=t=>i.createElement(r,(0,a.A)({},t,{stroke:0,fill:!0}),i.createElement("path",{d:"M2.149 0l-1.612 4.119v16.836h5.731v3.045h3.224l3.045-3.045h4.657l6.269-6.269v-14.686h-21.314zm19.164 13.612l-3.582 3.582h-5.731l-3.045 3.045v-3.045h-4.836v-15.045h17.194v11.463zm-3.582-7.343v6.262h-2.149v-6.262h2.149zm-5.731 0v6.262h-2.149v-6.262h2.149z"})),Kt=t=>i.createElement(r,t,i.createElement("path",{d:"M9 17.25v1.007a3 3 0 01-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0115 18.257V17.25m6-12V15a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 15V5.25m18 0A2.25 2.25 0 0018.75 3H5.25A2.25 2.25 0 003 5.25m18 0V12a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 12V5.25"})),Vt=t=>i.createElement(r,t,i.createElement("path",{d:"m 2.447878,2.716835 v 4.38448 h 4.38448 M 3.1307,6.882055 c 1.771085,-3.0536 5.075566,-5.10
1727 8.859706,-5.10727 5.65253,0 10.234811,4.58228 10.234811,10.23481 0,5.65253 -4.582281,10.23481 -10.234811,10.23481 -5.440329,0 -9.889258,-4.24469 -10.215624,-9.60291"}),t.text?i.createElement("text",{x:"12",y:"17",style:{fontSize:"15px",textAnchor:"middle",fontWeight:500,fill:"currentColor",stroke:"none"}},t.text):null),Xt=t=>i.createElement(r,t,i.createElement("path",{d:"m 1.5,4.5 h 21 v 15 h -21 z"}),i.createElement("path",{d:"m 3.5,19.316406 v -3.708984 z m 2.1035156,0 v -3.708984 z m 2.1035156,0 v -3.708984 z m 2.1035157,0 v -3.708984 z m 4.3789061,0 v -3.708984 z m 2.103516,0 v -3.708984 z m 2.103515,0 v -3.708984 z m 2.103516,0 V 15.607422 Z M 12,19.130859 v -5.082031 z m 0,-8.986328 V 5.0625001 Z M 5.6035156,8.5859371 v -3.708984 z m 12.7929684,0 v -3.708984 z",strokeWidth:t.stroke/2||1.1})),Qt=t=>i.createElement(r,t,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:t.stroke||2,d:"M19 16l-7 -7-7 7"})),qt=t=>i.createElement(r,t,i.createElement("path",{d:"M12 16.5V9.75m0 0l3 3m-3-3l-3 3M6.75 19.5a4.5 4.5 0 01-1.41-8.775 5.25 5.25 0 0110.233-2.33 3 3 0 013.758 3.848A3.752 3.752 0 0118 19.5H6.75z"})),Zt=t=>i.createElement(r,t,i.createElement("path",{d:"M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"})),te=t=>i.createElement(r,t,i.createElement("path",{d:"M12 3v17.25m0 0c-1.472 0-2.882.265-4.185.75M12 20.25c1.472 0 2.882.265 4.185.75M18.75 4.97A48.416 48.416 0 0012 4.5c-2.291 0-4.545.16-6.75.47m13.5 0c1.01.143 2.01.317 3 .52m-3-.52l2.62 10.726c.122.499-.106 1.028-.589 1.202a5.988 5.988 0 01-2.031.352 5.988 5.988 0 01-2.031-.352c-.483-.174-.711-.703-.59-1.202L18.75 4.971zm-16.5.52c.99-.203 1.99-.377 3-.52m0 0l2.62 10.726c.122.499-.106 1.028-.589 1.202a5.989 5.989 0 01-2.031.352 5.989 5.989 0 01-2.031-.352c-.483-.174-.711-.703-.59-1.202L5.25 4.971z"})),ee=t=>i.createElement(r,t,i.createElement("path",{d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})),oe=t=>i.createElement(r,t,i.createElement("path",{d:"M11.42 15.17L17.25 21A2.652 2.652 0 0021 17.25l-5.877-5.877M11.42 15.17l2.496-3.03c.317-.384.74-.626 1.208-.766M11.42 15.17l-4.655 5.653a2.548 2.548 0 11-3.586-3.586l6.837-5.63m5.108-.233c.55-.164 1.163-.188 1.743-.14a4.5 4.5 0 004.486-6.336l-3.276 3.277a3.004 3.004 0 01-2.25-2.25l3.276-3.276a4.5 4.5 0 00-6.336 4.486c.091 1.076-.071 2.264-.904 2.95l-.102.085m-1.745 1.437L5.909 7.5H4.5L2.25 3.75l1.5-1.5L7.5 4.5v1.409l4.26 4.26m-1.745 1.437l1.745-1.437m6.615 8.206L15.75 15.75M4.867 19.125h.008v.008h-.008v-.008z"})),ae=t=>i.createElement(r,t,i.createElement("path",{d:"M14 10l-2 1m0 0l-2-1m2 1v2.5M20 7l-2 1m2-1l-2-1m2 1v2.5M14 4l-2-1-2 1M4 7l2-1M4 7l2 1M4 7v2.5M12 21l-2-1m2 1l2-1m-2 1v-2.5M6 18l-2-1v-2.5M18 18l2-1v-2.5"})),ie=t=>i.createElement(r,t,i.createElement("path",{d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607ZM10.5 7.5v6m3-3h-6"})),ne=t=>i.createElement(r,t,i.createElement("path",{d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607ZM13.5 10.5h-6"}))},97230:(t,e,o)=>{o.d(e,{B:()=>i});var a=o(14041);const i=({crumbs:t=[],title:e,Link:o=!1})=>(!1===o&&(o=n),a.createElement("div",{className:"tw:tailwind-container tw:p-0"},a.createElement("ul",{className:"tw:flex tw:flex-row tw:items-center tw:gap-2 tw:m-0 tw:py-4",style:{paddingLeft:0}},a.createElement("li",{className:"tw:inline"},a.createElement(o,{href:"/"},a.createElement("b",null,"Home"))),a.createElement(s,null),t.map(((t,e)=>a.createElement(a.Fragment,{key:e},a.createElement("li",{key:e,className:"tw:inline"},a.createElement(o,{href:t.href},t.label)),a.createElement("li",{key:e,className:"tw:inline"},a.createElement(s,null))))),a.createElement("li",{className:"tw:inline"},e)))),n=({href:t,children:e})=>a.createElement("a",{href:t},e),s=()=>a.createElement("li",{className:"tw:inline"},"\xbb")},99005:(t,e,o)=>{o.d(e,{V:()=>a});const a="m18.56 0c-0.4945 0.3515-0.469 0.3065-0.8685 0.437-0.916 0.2995-1.7945 0.135-2.837 0.048-0.3135-0.035-0.6245-0.0555-0.928-0.0575-1.5325-0.0105-2.834 0.439-3.0805 1.694-0.4545 0.2755-0.8725 0.609-1.2865 0.943-0.884 0.6975-1.5495 1.55-2.0035 2.5775-0.62 1.5175-0.06 3.146 0.2175 4.684 0.066 0.36 0.135 0.703 0.172 0.8355 0.0525 0.1865 0.145 0.3645 0.2455 0.5245 0.0235 4e-3 0.1475-0.187 0.177-0.2715 0.043-0.123 0.0385-0.3205-0.0085-0.4905-0.104-0.3825-0.203-0.693-0.2115-0.849-0.015-0.293 0.042-0.5635 0.149-0.6975 0.038-0.0475 0.125 0.1975 0.1025 0.2885-0.0265 0.1095-0.0465 0.297-0.038 0.3835 0.0235 0.293 0.0665 0.6065 0.12 0.8805 0.0685 0.3535 0.098 0.5805 0.0855 0.6685-9e-3 0.064-0.039 0.1285-0.154 0.3265-0.1 0.1735-0.152 0.314-0.16 0.438-0.0085 0.121 0.028 0.4235 0.062 0.4975 0.0495 0.1155 0.1985 0.237 0.3285 0.267 0.1245 0.0475 0.187 0.146 0.251 0.2565 0.1555 0.2965 0.2755 0.6575 0.3945 1.2015 0.058 0.2605 0.1065 0.493 0.122 0.615-0.96 1e-3 -2.1895 0.0015-3.3095 0.0015-0.377 6e-3 -1.058-0.171-1.6825-0.212-0.0905-0.977-0.5195-2.112-1.2535-2.178-0.501-0.0455-0.9165 0.145-1.268 0.9365l0.01 0.0425c0.2075-0.1735 0.4265-0.704 1.2155-0.6675 0.606 0.0275 0.808 1.1745 0.868 1.8645-0.369 0.027-0.683 0.1405-0.847 0.424h-0.0035c0 5e-4 0 0.0015 0.0015 0.0025-0.0015 1e-3 -0.0015 2e-3 -0.0015 3e-3h0.0035c0.169 0.2905 0.4945 0.403 0.877 0.4255 0.2555 7.225 7.047 8.157 8.903 8.157 6.924 0 9.348-4.705 9.7125-6.5685 0.1705 0.794-0.3665 1.8055-0.495 2.552 1.4605-1.6885 1.1965-3.312 0.9295-4.945 0.222 0.264 0.5225 0.4275 0.93 0.337-0.2905-0.194-0.6845-0.058-0.9205-0.8765-0.103-0.3535-0.192-0.6185-0.2805-0.841-0.191-0.7165-0.462-1.401-0.795-2.068-0.281-0.7235-0.0955-1.1925-0.1235-1.8135 0.5055 1.667 0.8215 2.1105 1.4115 2.285-1.484-1.788-0.976-4.5565-1.8145-7.0275 0.3795 0.223 0.8125 0.29 1.2735 0.0175-0.446-0.127-0.891 0.2085-1.531-0.732-0.5405-1.0515-1.3235-1.828-2.2735-2.513-0.509-0.332-1.074-0.555-1.642-0.762 0.5785-0.145 1.2245-0.66 1.2545-1.0445zm-0.9705 5.5535c0.762 0.278 1.602 1.334 1.5925 2.37v0.058c-0.0205 1.407-0.66 2.1635-0.633 3.1005 0.0345 1.1035 0.5095 1.4885 0.604 1.6725-0.162-0.6805-0.257-1.5365-0.043-2.2145 0.275-0.872 0.5525-1.594 0.5325-2.277-0.01-0.16-0.078-0.7585-0.1235-1.0235 0.817 1.179-0.177 2.8935 0.109 4.0155 0.497 1.9545 2.7245 2.2015 2.0615 6.1395-0.5835 3.462-4.5815 6.0895-8.6795 6.0895-3.038 0-8.3025-1.6815-8.5625-7.646 0.61
175-0.044 1.2815-0.216 1.654-0.21 1.126 0 2.412 5e-4 3.381 1e-3 0.182 0.821 0.3185 1.019 1.009 1.566 0.768 0.604 0.947 0.6775 2.083 0.6885 1.1365 0.0115 1.4735-0.232 2.576-1.275 0.238-0.279 0.341-0.6445 0.4565-0.988 1.134-0.0105 1.961-0.0305 2.7745-0.0685 0.8285-0.0375 0.9455 0 2.2805-0.1375-1.335-0.1375-1.452-0.1-2.2805-0.138-0.792-0.036-1.594-0.0565-2.6785-0.0665 0.091-0.4085 0.221-0.8075 0.3595-1.202 0.0855-0.2325 0.186-0.459 0.289-0.6845l0.1125-0.035c0.217-0.077 0.409-0.242 0.4855-0.465 0.0985-0.2955 0.0285-0.6275-0.162-0.869-0.0655-0.0905-0.147-0.206-0.1805-0.257-0.1005-0.159-0.103-0.2475-0.018-0.8385 0.0715-0.495 0.0795-0.754 0.03-1.005-0.01-0.1435-0.011-0.4385-0.0155-0.518 0.038 0.021 0.1205 0.209 0.204 0.4635 0.083 0.2555 0.0965 0.3085 0.1155 0.526 0.021 0.247-0.0715 0.43-0.1475 0.7985-0.038 0.19-0.0715 0.3665-0.0715 0.3905 0 0.0255 0.018 0.0795 0.037 0.1215 0.0445 0.094 0.128 0.226 0.1435 0.226 0.2725-0.3005 0.4325-0.6715 0.575-1.048 0.15-0.426 0.194-0.878 0.299-1.3165 0.085-0.382 0.183-0.7645 0.2135-1.1565 0.0615-0.765 0.0255-1.305-0.1435-2.102-0.0405-0.18-0.1575-0.5235-0.239-0.6855zm-2.68 3.7685c0.2925-0.0035 0.582 0.032 0.8575 0.1115 0.3745 0.1435 0.427 0.478 0.496 0.8535 0.0385 0.24 0.037 0.4125-0.0065 0.6945-0.0305 0.409-0.193 0.7255-0.548 0.948-0.5355 0.099-1.108 0.1945-1.562-0.16-0.381-0.525-0.6105-1.1885-0.523-1.8355 0.0555-0.2655 0.179-0.4035 0.433-0.486 0.2735-0.0785 0.563-0.1215 0.853-0.126zm-4.4415 0.0475c0.2735-0.0025 0.55 0.0265 0.702 0.1235 0.6525 0.4415 0.443 1.16 0.185 1.7905-0.3755 0.8255-1.1875 0.795-1.9745 0.7885-0.4355-0.1275-0.4755-0.4845-0.5385-0.866-0.054-0.3685-0.169-0.7635-0.073-1.134 0.2465-0.596 1.1475-0.6645 1.699-0.7025zm9.9515 0.103c0.0035 1.5865 0.2745 2.366 0.8185 3.4895-0.3205-0.6115-0.7785-0.9595-0.949-1.6905-0.326-1.4115 0.0255-1.3325 0.1305-1.799zm-7.9065 1.149c0.086 0.087 0.1275 0.207 0.202 0.3025 0.0575-0.0985 0.1165-0.1965 0.1905-0.284 0.0385 1e-3 0.0855 0.077 0.128 0.213 0.182 0.503 0.2175 1.0565 0.4535 1.54 0.2205 0.35-0.0805 0.554-0.411 0.57-0.241-5e-4 -0.343-0.165-0.4845-0.328-0.0365 0.1065-0.106 0.175-0.189 0.247-0.211 0.177-0.6245 0.1115-0.6885-0.1675 0.085-0.533 0.3565-1.0225 0.5345-1.5335 0.0885-0.1865 0.0895-0.3295 0.2645-0.5595zm-3.096 2.6925c0.1065 0 0.399 0.1985 0.4585 0.3105 0.041 0.0745 0.1345 0.3645 0.141 0.435 0.0105 0.084-0.015 0.283-0.041 0.337-0.019 0.0385-0.0335 0.044-0.0555 0.019-0.0185-0.021-0.2635-0.491-0.42-0.802-0.123-0.249-0.136-0.2995-0.083-0.2995zm6.111 0.1555c4e-3 5e-4 0.01 2e-3 0.0155 0.0035 0.033 0.0135 0.01 0.1305-0.114 0.5555-0.0235 0.128-0.0805 0.229-0.164 0.313-0.0275 0-0.04-0.032-0.083-0.2095-0.0365-0.1515-0.0405-0.2865-0.015-0.4075 0.044-0.1515 0.222-0.198 0.3605-0.255zm-0.7415 0.9265c0.0105-2e-3 0.0205 0.0035 0.0335 0.014 0.045 0.0315 0.0515 0.1145 0.0215 0.277-0.0365 0.209-0.0445 0.232-0.0985 0.2535-0.0235 0.0105-0.0655 0.018-0.0935 0.018-0.0505-9e-3 -0.0635-0.05-0.0515-0.112 0-0.13 0.038-0.243 0.124-0.3765 0.0325-0.05 0.049-0.0715 0.0645-0.074zm-4.3165 0.0095c0.0345 0 0.1385 0.075 0.177 0.127 0.043 0.055 0.092 0.3825 0.0645 0.439-0.0315 0.071-0.1855 0.0355-0.228-0.053-0.026-0.053-0.0875-0.339-0.0875-0.407 0-0.063 0.0305-0.106 0.074-0.106zm3.9455 0.0865c0.042 0.06 0.053 0.137 0.044 0.306l-0.0085 0.154-0.044 0.044c-0.0265 0.0245-0.0715 0.0545-0.0985 0.067-0.0595 0.028-0.105 0.0305-0.1135 8e-3 -0.01-0.03 7e-3 -0.221 0.0255-0.2855 0.0215-0.0665 0.118-0.265 0.15-0.307 0.0145-0.0385 0.0315 0.0095 0.045 0.0135zm-2.5105-9e-3c0.0905 0.023 0.1305 0.1045 0.18 0.1785l0.0335 0.066-0.047 0.1635c-0.025 0.09-0.0515 0.171-0.0595 0.18-9e-3 0.01-0.0425 0.015-0.092 0.0145-0.132-0.0035-0.147-9e-3 -0.1825-0.063l-0.033-0.049 0.028-0.1375c0.0405-0.198 0.06-0.2575 0.105-0.3085 0.0235-0.0275 0.047-0.0425 0.0675-0.0445zm-0.8355 0.1415 0.0745 0.0745 0.0125 0.1685c0.0065 0.092 0.0095 0.1775 0.0045 0.188-0.0045 0.0145-0.0315 0.0185-0.115 0.0185h-0.1085c-0.058-0.0635-0.076-0.141-0.1005-0.221-0.057-0.2405-0.057-0.35 2e-3 -0.3645 0.0965 6e-3 0.16 0.076 0.2305 0.136zm2.9-0.1155c0.118 0.0315 0.0945 0.219 0.094 0.353-9e-3 0.217-0.0175 0.262-0.0455 0.29-0.0485 0.0485-0.1835 0.0215-0.249-0.0505-0.0215-0.026-0.0235-0.034-0.006
15-0.1395 0.0195-0.1285 0.0445-0.2085 0.1-0.3185 0.0405-0.079 0.0785-0.1285 0.107-0.1345zm-2.663 0.01c0.0065-5e-4 0.017 0 0.027 1e-3 0.075 6e-3 0.145 0.055 0.207 0.145l0.05 0.0735c0.0045 0.1205 0 0.2475-0.0215 0.3595-0.013 0.0065-0.067 0.0165-0.12 0.0215-0.092 0.0085-0.1005 0.0065-0.1325-0.0215-0.0445-0.038-0.057-0.1085-0.068-0.3425-0.0065-0.191-2e-3 -0.2335 0.058-0.2365zm1.1345 0.04c0.0805 0.017 0.1315 0.06 0.154 0.1305 0.018 0.0605 0.029 0.399 0.0115 0.4225-6e-3 0.01-0.044 0.0225-0.0875 0.028-0.162 0.0205-0.305 5e-3 -0.319-0.0335-0.018-0.044 0.1025-0.48 0.147-0.534 0.019-0.042 0.065-0.0095 0.094-0.0135zm1.049 3e-3c0.0355-0.0035 0.0735 0.0305 0.1105 0.103 0.03 0.0605 0.0345 0.0815 0.0345 0.217 0 0.108-0.0065 0.1545-0.018 0.1645-0.01 8e-3 -0.0505 0.0225-0.0935 0.0335-0.075 0.0195-0.0915 0.0215-0.115 0.0135l-0.1125-0.0205 0.0085-0.067c8e-3 -0.0875 0.0655-0.2815 0.106-0.3655 0.024-0.05 0.0515-0.075 0.0795-0.0785zm-0.489 0.0015c0.0235-1e-3 0.0345 0.0045 0.0495 0.021 0.0355 0.042 0.0805 0.166 0.109 0.2985 0.038 0.1865 0.038 0.186-0.0435 0.2105-0.0355 0.011-0.1105 0.0225-0.164 0.0255-0.1765 9e-3 -0.19-0.0015-0.1685-0.1575 0.017-0.139 0.0855-0.358 0.115-0.374 0.032-0.017 0.069-0.0165 0.1025-0.024zm-8.9965 0.7045c0.0015-5e-4 0.0035 0 0.0035 0 0.0045 0.0975 0.0045 0.196 0.0065 0.294-0.2475-0.019-0.4295-0.078-0.4295-0.1475 0-0.0685 0.1755-0.127 0.4195-0.1465zm0.4325 0.0085c0.2005 0.025 0.339 0.0775 0.3365 0.138 0 0.061-0.134 0.113-0.333 0.1375-2e-3 -0.0915-2e-3 -0.1835-0.0035-0.2755zm9.363 0.2665c0.017-0.0015 0.0245-3e-3 0.0505-5e-4 0.104 0.0105 0.119 0.017 0.119 0.052 0 0.046-0.079 0.1845-0.1325 0.2325-0.025 0.024-0.0595 0.044-0.0715 0.044-0.06 0-0.095-0.1265-0.067-0.243 0.017-0.063 0.048-0.0825 0.1015-0.085zm-0.3775 0.0415c0.0465-4e-3 0.0915 0.0085 0.1365 0.0145-0.013 0.1315-0.072 0.239-0.1815 0.3105-0.027 0-0.0405-0.0515-0.0405-0.164 0-0.134 7e-3 -0.1595 0.0855-0.161zm-0.414 0.0485c0.0965 0 0.1815 0.0045 0.1855 0.01 0.018 0.017-0.034 0.146-0.1105 0.277-0.0655 0.1165-0.075 0.125-0.1155 0.128-0.159-0.018-0.1545-0.2045-0.179-0.3325 0-0.076 0.017-0.0825 0.2195-0.0825zm-1.5045 0.0145c0.1105 2e-3 0.1535 0.0185 0.1535 0.061 0 0.054-0.041 0.1615-0.0645 0.175-0.0355 0.0195-0.0385 0.0185-0.1085-0.0545-0.1105-0.124-0.123-0.147 0.0195-0.1815zm0.532 0.0055c2e-3 3e-3 0.0235 0.042 0.045 0.086 0.047 0.0915 0.0505 0.1315 0.017 0.162-0.079 0.045-0.0955 0.0195-0.167-0.026-0.083-0.0785-0.1485-0.184-0.127-0.206 0.074-0.0265 0.1555-0.0165 0.232-0.016zm0.211 0.0025 0.1975 0.0035c0.077 0 0.1435 4e-3 0.147 0.01 0.0135 0.012-0.03 0.269-0.0535 0.327-0.027 0.065-0.1215 0.0655-0.1705-0.0115-0.07-0.1105-0.116-0.2035-0.1175-0.2675z"},99025:(t,e,o)=>{o.d(e,{Sr:()=>et,Ru:()=>ot});const a=JSON.parse('{"id":"plugin-annotations","r":"4.6.0"}'),i={en:JSON.parse('{"plugin-annotations:canvas":"canvas","plugin-annotations:cut":"Cut","plugin-annotations:contrast":"contrasting fabric","plugin-annotations:cutOnFold":"Cut on fold","plugin-annotations:cutOnFoldAndGrainline":"Cut on fold / Grainline","plugin-annotations:fabric":"main fabric","plugin-annotations:altFabric1":"alternative fabric","plugin-annotations:altFabric2":"alternative fabric #2","plugin-annotations:altFabric3":"alternative fabric #3","plugin-annotations:altFabric4":"alternative fabric #4","plugin-annotations:facing":"facing","plugin-annotations:from":"from","plugin-annotations:fusible":"fusible interfacing","plugin-annotations:grainline":"Grainline","plugin-annotations:interfacing":"interfacing","plugin-annotations:lining":"lining","plugin-annotations:mirrored":"mirrored","plugin-annotations:noName":"No name","plugin-annotations:noVersion":"No version","plugin-annotations:onBias":"on the bias","plugin-annotations:onFold":"on the fold","plugin-annotations:onFoldAndBias":"on the fold, and on bias","plugin-annotations:ribbing":"ribbing","plugin-annotations:rigidinterfacing":"rigid interfacing","plugin-annotations:sewTogether":"Sew together","plugin-annotations:specialty":"specialty fabric (see pattern instructions)","plugin-annotations:underside":"underside fabric","plugin-annotations:supportFreeSewingBecomeAPatron":"Support FreeSewing, become a patron","plugin-annotations:theBlackOutsideOfThisBoxShouldMeasure":"The (black) outside of this box should measure","plugin-annotations:theWhiteInsideOfThisBoxShouldMeasure":"The (white) inside of this box should measure"}')},n=[{name:"button",def:t=>`\n<g id="button"\ntransform="scale(${t})">\n  <circle\n    cx="0" cy="0" r="3.4"\n    class="mark"\n  ></circle>\n  <circle cx="-1" cy="-1" r="0.5" class="no-stroke fill-mark"></circle>\n  <circle cx="1"  cy="-1" r="0.5" class="no-stroke fill-mark"></circle>\n  <circle cx="1"  cy="1"  r="0.5" class="no-stroke fill-mark"></circle>\n  <circle cx="-1" cy="1"  r="0.5" class="no-stroke fill-mark"></circle>\n</g>`}
1,{name:"buttonhole",def:t=>`\n<g id="buttonhole"\ntransform="scale(${t})">\n  <path\n    class="mark"\n    d="M -1,-5 L 1,-5 L 1,5 L -1,5 z"\n  ></path>\n</g>`},{name:"buttonhole-start",def:t=>`\n<g id="buttonhole-start"\ntransform="scale(${t})">\n  <path\n    class="mark"\n    d="M -1,-10 L 1,-10 L 1,0 L -1,0 z"\n  ></path>\n</g>`},{name:"buttonhole-end",def:t=>`\n<g id="buttonhole-end"\ntransform="scale(${t})">\n  <path\n    class="mark"\n    d="M -1,0 L 1,0 L 1,10 L -1,10 z"\n  ></path>\n</g>`},{name:"snap-stud-grad",def:t=>`\n<radialGradient id="snap-stud-grad" cx="50%" cy="50%" r="50%" fx="50%" fy="50%"\ntransform="scale(${t})">\n  <stop offset="30%" style="stop-color:rgb(235,235,235); stop-opacity:1"></stop>\n  <stop offset="80%" style="stop-color:rgb(100,100,100);stop-opacity:1"></stop>\n</radialGradient>`},{name:"snap-stud",def:t=>`\n<g id="snap-stud"\ntransform="scale(${t})">\n  <circle id="snap-stud-circle-edge" cx="0" cy="0" r="3.4"\n    style="stroke:#666;fill:#dddddd;stroke-width:0.3;"\n  ></circle>\n  <circle id="snap-stud-circle-middle" cx="0" cy="0" r="1.8"\n    style="stroke:none;fill:url(#snap-stud-grad);"\n  ></circle>\n  <path\n    id="snap-stud-lines" style="fill:none;stroke:#666; stroke-width:0.2;"\n    d="M -2,0 L -3,0 M 2,0 L 3,0 M 0,2 L 0,3 M 0,-2 L 0,-3 M 1.5,1.5 L 2.1,2.1 M -1.5,1.5 L -2.1,2.1 M -1.5,-1.5 L -2.1,-2.1 M 1.5,-1.5 L 2.1,-2.1"\n  ></path>\n</g>`},{name:"snap-socket",def:t=>`\n<g id="snap-socket"\ntransform="scale(${t})">\n  <circle id="snap-socket-circle-edge" cx="0" cy="0" r="3.4"\n    style="stroke:#666;fill:#bbbbbb;stroke-width:0.3;"\n  ></circle>\n  <circle id="snap-socket-circle-middle" cx="0" cy="0" r="2"\n    style="stroke:#666;fill:#dddddd; stroke-width:0.4;"\n  ></circle>\n  <path\n    style="fill:none;stroke:#666; stroke-width:0.5;"\n    d="M -1.7,-1 L -1.7,1 M 1.7,-1 L 1.7,1" id="snap-socket-lines"\n  ></path>\n</g>`},{name:"eyelet",def:'\n<g id="eyelet">\n  <circle id="eyelet-circle" cx="0" cy="0" r="3.4" class="no-full stroke-mark mark" stroke-width="1" fill="none" stroke="currentColor">\n  </circle>\n</g>'}];var s=o(57416);const r=[{name:"logo",def:t=>`<g id="logo" transform="scale(${2*t}) translate(-12.55 -18)"><path class="logo" fill="currentColor" d="${s.VI}"/></g>`}],l=[{name:"notch",def:t=>`\n<g id="notch" transform="scale(${t})">\n  <circle cy="0" cx="0" r="1.4" class="fill-note"></circle>\n  <circle cy="0" cx="0" r="2.8" class="note"></circle>\n</g>`},{name:"bnotch",def:t=>`\n<g id="bnotch" transform="scale(${t})">\n  <path d="M -1.1 -1.1 L 1.1 1.1 M 1.1 -1.1 L -1.1 1.1" class="note"></path>\n  <circle cy="0" cx="0" r="2.8" class="note"></circle>\n</g>`}],c={classes:"center",dy:-1,force:!1,id:"banner",repeat:10,spaces:12},p={banner:function(t,{paths:e,store:o,complete:a}){if(!a&&!t.force)return;const i={...c,...t},n=o.generateMacroIds(["banner"],i.id);e[n.banner]=i.path.clone().setClass("hidden").attr("data-text-dy",i.dy).attr("data-text-class",i.classes);const s="&#160;".repeat(i.spaces);for(let r=0;r<i.repeat;r++)e[n.banner].addText(i.text).addText(s);return e[n.banner].addText(i.text),o.storeMacroIds(i.id,{paths:n}),o.getMacroIds(i.id)},rmbanner:(t=c.id,{store:e,part:o})=>e.removeMacroNodes(t,"banner",o)},d={classes:{text:"text-xs fill-note",box:"stroke-xs stroke-note lashed"},dy:4,id:"bannerbox",margin:15,repeat:99,spaces:12,text:""},h={bannerbox:function(t,{Point:e,paths:o,Path:a,macro:i,log:n,store:s,complete:r}){if(!r&&!t.force)return;const l={...d,...t,classes:d.classes};t.classes&&(l.classes={...l.classes,...t.classes}),l.topLeft&&"function"==typeof l.topLeft.attr||(n.warn("Bannerbox macro called without a valid topLeft point. Using (0,0) for topLeft."),l.topLeft=new e(0,0)),l.bottomRight&&"function"==typeof l.bottomRight.attr||(n.warn("Bannerbox macro called without a valid bottomRight point. Using (6660,666) for bottomRight."),l.bottomRight=new e(666,666));const c=s.generateMacroIds(["box"],l.id),p=Math.sqrt(2*Math.pow(l.margin,2));return o[c.box]=(new a).move(l.topLeft.shift(135,p)).line(new e(l.bottomRight.x,l.topLeft.y).shift(45,p)).line(l.bottomRight.shift(315,p)).line(new e(l.topLeft.x,l.bottomRight.y).shift(225,p)).line(l.topLeft.shift(135,p)).close().addClass(l.classes.box),i("banner",{id:l.id,path:o[c.box],text:l.text,className:l.classes.text,repeat:l.repeat,spaces:l.spaces,dy:l.dy}),s.storeMacroIds(l.id,{paths:c}),s.getMacroIds(l.id)},rmbannerbox:(t=d.id,{macro:e,store:o,part:a})=>(e("rmbanner",t),o.removeMacroNodes(t,"bannerbox",a))},m={anchor:!1,angle:0,bartackAlong:!1,bartackFractionAlong:!1,classes:"stroke-sm stroke-mark",density:3,end:1,from:!1,id:"bartack",length:15,path:!1,start:0,to:!1,width:3},f=(t,e,o)=>t?((t,{Path:e})=>{let o=(new e).move(t.path1[0]);for(const a in t.path1)t.path1[a]&&(o=o.line(t.path1[a])),t.path2[a
1]&&(o=o.line(t.path2[a]));return o})(((t,e)=>{let o=t.offset(e.width/2),a=t.offset(e.width/-2),i=o.length(),n=a.length();if(n>i){let t=a;a=o,o=t,i=n}let s={path1:[o.start()],path2:[a.start()]},r=Math.ceil(i/e.width*e.density);for(let l=1;l<r;l++)s.path1.push(o.shiftFractionAlong(1/r*l)),s.path2.push(a.shiftFractionAlong(1/r*l));return s})(t,e),o):null;function u(t,e){if(!e.complete&&!t.force)return;const o={...m,...t},{Path:a,paths:i}=e;o.angle<0&&(o.angle=360+o.angle%-360);let n=!1;if(o.anchor)n=(new a).move(o.anchor).line(o.anchor.shift(o.angle,o.length));else if(o.from&&o.to)n=(new a).move(o.from).line(o.to);else if(o.path){let t=!1,e=!1;if(o.bartackAlong)n=o.path.clone();else if(o.bartackFractionAlong){if(o.start===o.end)return null;if(o.start>o.end){const t=o.start;o.start=o.end,o.end=t}o.start>0&&(t=o.path.shiftFractionAlong(o.start)),o.end<1&&(e=o.path.shiftFractionAlong(o.end)),n=t&&e?o.path.split(t).pop().split(e).shift():t?o.path.split(t).pop():e?o.path.split(e).shift():o.path.clone()}}const s=e.store.generateMacroIds(["stitches"],o.id);return i[s.stitches]=f(n,o,e).attr("class",o.classes),e.store.storeMacroIds(o.id,{paths:s}),e.store.getMacroIds(o.id)}const g=(t="bartack",e=m.id,{store:o,part:a})=>o.removeMacroNodes(e,t,a),b={bartack:(t,e)=>u(t,e),bartackAlong:(t,e)=>u({...t,id:"bartackalong",bartackFractionAlong:!1,bartackAlong:!0,anchor:!1,from:!1,to:!1},e),bartackFractionAlong:(t,e)=>u({...t,id:"bartackfractionalong",bartackFractionAlong:!0,bartackAlong:!1,anchor:!1,from:!1,to:!1},e),rmbartack:(t,e)=>g("bartack",t,e),rmbartackAlong:(t,e)=>g("bartackalong",t,e),rmbartackFractionAlong:(t,e)=>g("bartackfractionalong",t,e)},w={classes:{box:"lining dotted stroke-sm",cross:"lining dotted stroke-sm",text:"center fill-lining"},id:"crossbox",offset:.1,text:""},k={crossbox:function(t,{points:e,Point:o,paths:a,Path:i,complete:n,store:s,log:r}){if(!n&&!t.force)return;const l={...w,...t,classes:w.classes};t.classes&&(l.classes={...l.classes,...t.classes}),l.topLeft&&"function"==typeof l.topLeft.attr||(r.warn("Crossbox macro called without a valid topLeft point. Using (0,0) for topLeft."),l.topLeft=new o(0,0)),l.bottomRight&&"function"==typeof l.bottomRight.attr||(r.warn("Crossbox macro called without a valid bottomRight point. Using (666,666) for bottomRight."),l.bottomRight=new o(666,666));const c=s.generateMacroIds(["box","cross","text"],l.id),p={paths:{box:c.box,cross:c.cross},points:{text:c.text}},d=Math.abs(l.topLeft.dx(l.bottomRight))>Math.abs(l.topLeft.dy(l.bottomRight))?Math.abs(l.topLeft.dx(l.bottomRight))*l.offset:Math.abs(l.topLeft.dy(l.bottomRight))*l.offset;return a[p.paths.box]=(new i).move(l.topLeft).line(new o(l.topLeft.x,l.bottomRight.y)).line(l.bottomRight).line(new o(l.bottomRight.x,l.topLeft.y)).line(l.topLeft).close().attr("class",l.classes.box),a[p.paths.cross]=(new i).move(l.topLeft.shift(315,d)).line(new o(l.bottomRight.x,l.topLeft.y).shift(225,d)).line(l.bottomRight.shift(135,d)).line(new o(l.topLeft.x,l.bottomRight.y).shift(45,d)).line(l.topLeft.shift(315,d)).line(l.bottomRight.shift(135,d)).move(new o(l.bottomRight.x,l.topLeft.y).shift(225,d)).line(new o(l.topLeft.x,l.bottomRight.y).shift(45,d)).attr("class",l.classes.box),l.text?e[p.points.text]=l.topLeft.shiftFractionTowards(l.bottomRight,.5).addText(l.text,l.classes.text):delete p.points.text,s.storeMacroIds(l.id,p),s.getMacroIds(l.id)},rmcrossbox:(t=w.id,{store:e,part:o})=>e.removeMacroNodes(t,"crossbox",o)},C=[["cutlist.addCut",v],["cutlist.setCut",function(t,e){return y(t),v(t,e)}],["cutlist.removeCut",y],["cutlist.setGrain",function(t,e=!1,o="grainline"){const a=t.get("activePart"),i=["cutlist",a,"grain"];if(!1===e)return t.log.warn("Using setGrain() to remove the grain is deprecated. Use removeGrain() instead"),t.unset(i);if("number"!=typeof e)return t.log.error("Called part.setGrain() with a value that is not a number"),t;return t.set(["cutlist",a,"grainOrigin"],o),t.set(i,e)}],["cutlist.removeGrain",function(t){return t.unset(["cutlist",t.get("activePart"),"grain"])}],["cutlist.getGrainOrigin",function(t){return t.get(["cutlist",t.get("activePart"),"grainOrigin"],null)}],["cutlist.setCutOnFold",function(t,e,o){const a=["cutlist",t.get("activePart"),"cutOnFold"];if(!1===e&&void 0===o)return t.log.warn("Using setCutOnFold() to remove the cutonfold is deprecated. Use removeCutOnFold() instead"),t.unset(a);isNaN(e.x)||isNaN(e.y)||isNaN(o.x)||isNaN(o.y)?t.log.error("Called part.setCutOnFold() but at least one parameter is not a Point instance"):t.set(a,[e,o]);return t}],["cutlist.removeCutOnFold",function(t){return t.unset(["cutlist",t.get("activePart"),"cutOnFold"])}],["cutlist.getCutFabrics",function(t,e){const o=t.get("cutlist"),a=e.only?[].concat(e.only):Object.keys(o),i=[];return a.forEach((t=>{if(o[t]?.materials)for(var e in o[t].materials)i.includes(e)||i.push(e)})),i}]];function v(t,e={}){if(Array.isArray(e)){for(const o of e)v(t,o);return t}const{cut:o=2,from:a="fabric",identical:i=!1,onBias:n=!1,onFold:s=!1}
1=e,r=t.get("activePart");if(!1===o)return!1===a?t.unset(["cutlist",r,"materials"]):t.unset(["cutlist",r,"materials",a]),t;if(!(Number.isInteger(o)&&o>-1))return t.log.error("Tried to set cut to a value that is not a positive integer"),t;if("string"!=typeof a)return t.log.warn("Tried to set material to a value that is not a string"),t;const l=["cutlist",r,"materials",a],c=t.get(l,[]);return t.set(l,c.concat({cut:o,identical:i,onBias:n,onFold:s})),t}function y(t,e=!1){return v(t,{cut:!1,from:e})}const T={classes:{lead:"text-xs bold",title:"text bold",text:"text-xs",link:"text-sm fill-note bold",metric:"text-xs center",imperial:"text-xs center",imperialBox:"scalebox imperial fill-current",metricBox:"scalebox metric fill-bg"},lead:"FreeSewing",link:"FreeSewing.org/patrons/join",text:"plugin-annotations:supportFreeSewingBecomeAPatron",title:!1,force:!1},x={scalebox:{metric:[[10,5,"1cm","0.5cm"],[20,10,"2cm","1cm"],[30,15,"3cm","1.5cm"],[40,20,"4cm","2cm"],[50,25,"5cm","2.5cm"],[60,30,"6cm","3cm"],[70,35,"7cm","3.5cm"],[80,40,"8cm","4cm"],[90,45,"9cm","4.5cm"],[100,50,"10cm","5cm"]],imperial:[[12.7,6.35,'1/2"','1/4"'],[25.4*.875,12.7,'7/8"','1/2"'],[31.75,15.875,'1 1/4"','5/8"'],[41.275,25.4*.875,'1 5/8"','7/8"'],[50.8,25.4,'2"','1"'],[25.4*2.375,31.75,'2 3/8"','1 1/4"'],[25.4*2.875,25.4*1.5,'2 7/8"','1 1/2"'],[82.55,41.275,'3 1/4"','1 5/8"'],[25.4*3.625,47.625,'3 5/8"','1 7/8"'],[101.6,50.8,'4"','2"']]},miniscale:[[10,"1cm",25.4*.375,'3/8"'],[13,"1.3cm",12.7,'1/2"'],[16,"1.6cm",15.875,'5/8"'],[19,"1.9cm",25.4*.75,'3/4"'],[22,"2.2cm",25.4*.875,'7/8"'],[25,"2.5cm",25.4,'1"']]},B=function(t=!1,{store:e,part:o},a){return t||(t=a),e.removeMacroNodes(t,a,o)},S={scalebox:function(t,{store:e,points:o,paths:a,scale:i,Point:n,Path:s,complete:r,log:l}){if(!r&&!t.force)return;const c={...T,id:"scalebox",...t,classes:T.classes};t.classes&&(c.classes={...c.classes,...t.classes});const p=Math.round(10*Math.max(.1,Math.min(1,i)))-1,[d,h,m,f]=x.scalebox.metric[p],[u,g,b,w]=x.scalebox.imperial[p];c.at&&"function"==typeof c.at.attr||(l.warn("Scalebox macro called without a valid at point. Using (0,0) for at."),c.at=new n(0,0));const k=e.generateMacroIds(["metric","imperial","textLead","textMetric","textImperial","textTitle","textText","textLink"],c.id),C={mtl:new n(c.at.x-d/2,c.at.y-h/2),mtr:new n(c.at.x+d/2,c.at.y-h/2),mbl:new n(c.at.x-d/2,c.at.y+h/2),mbr:new n(c.at.x+d/2,c.at.y+h/2),itl:new n(c.at.x-u/2,c.at.y-g/2),itr:new n(c.at.x+u/2,c.at.y-g/2),ibl:new n(c.at.x-u/2,c.at.y+g/2),ibr:new n(c.at.x+u/2,c.at.y+g/2)},v={lead:new n(c.at.x-45*i,c.at.y-15*i),metric:new n(c.at.x,c.at.y+20*i),imperial:new n(c.at.x,c.at.y+24*i)};if(v.title=v.lead.shift(-90,10*i),v.text=v.title.shift(-90,12*i),v.link=v.text.shift(-90,5*i),c.rotate){c.rotate=Number(c.rotate);for(const t in C)C[t]=C[t].rotate(c.rotate,c.at);for(const t in v)v[t]=v[t].rotate(c.rotate,c.at),v[t].attr("data-text-transform",`rotate(${-1*c.rotate}, ${v[t].x}, ${v[t].y})`,!0)}a[k.imperial]=(new s).addClass(c.classes.imperialBox).move(C.itl).line(C.ibl).line(C.ibr).line(C.itr).line(C.itl).close(),a[k.metric]=(new s).addClass(c.classes.metricBox).move(C.mtl).line(C.mbl).line(C.mbr).line(C.mtr).line(C.mtl).close(),o[k.textLead]=v.lead.addText(c.lead,c.classes.lead);let y=c.title;return y||(y=e.data?.name||"plugin-annotations:noName",-1!==y.indexOf("@freesewing/")&&(y=y.replace("@freesewing/",""))),o[k.textTitle]=v.title.addText(y,c.classes.title).attr("data-text","v"+(e.data?.version||"No Version")),o[k.textText]=v.text.addText(c.text,c.classes.text),o[k.textLink]=v.link.addText(c.link,c.classes.link).attr("data-text-lineheight",4),o[k.textMetric]=v.metric.attr("data-text","plugin-annotations:theWhiteInsideOfThisBoxShouldMeasure").attr("data-text",m).attr("data-text","x").attr("data-text",f).attr("data-text-class",c.classes.metric),o[k.textImperial]=v.imperial.attr("data-text","plugin-annotations:theBlackOutsideOfThisBoxShouldMeasure").attr("data-text",b).attr("data-text","x").attr("data-text",w).attr("data-text-class",c.classes.imperial),e.storeMacroIds(c.id,{points:{textLead:k.textLead,textMetric:k.textMetric,textImperial:k.textImperial,textTitle:k.textTitle,textText:k.textText,textLink:k.textLink},paths:{metric:k.metric,imperial:k.imperial}}),e.getMacroIds(c.id)},miniscale:function(t,{points:e,paths:o,scale:a,Point:i,Path:n,complete:s,log:r,store:l}){if(!s&&!t.force)return;const c={...T,id:"miniscale",...t,classes:T.classes};t.classes&&(c.classes={...c.classes,...t.classes});const p=Math.ceil(6*Math.max(.1,Math.min(1,a)))-1,[d,h,m,f]=x.miniscale[p];c.at&&"function"==typeof c.at.attr||(r.warn("Scalebox macro called without a valid at point. Using (0,0) for at."),c.at=new i(0,0));const u=l.generateMacroIds(["metric","imperial","textMetric","textImperial"],c.id),g={mtl:new i(c.at.x-d/2,c.at.y-d/2),mtr:new i(c.at.x+d/2,c.at.y-d/2),mbl:new i(c.at.x-d/2,c.at.y+d/2),mbr:new i(c.at.x+d/2,c.at.y+d/2),itl:new i(c.at.x-m/2,c.at.y-m/2),itr:new i(c.at.x+m/2,c.at.y-m/2),ibl:new i(c.at.x-m/2,c.at.y+m/2),ibr:new i(c.at.x+m/2,c.at.y+m/2)},b={metric:new i(c.at.x,c.at.y-2*a),imperial:new i(c.at.x,c.at.y+8*a)};if(c.rotate){c.rotate=Number(c.rotate);for(const t in g)g[t]=g[t].rotate(c.rotate,c.at);for(const t in b)b[t]=b[t].rotate(c.rotate,c.at).attr("data-text-transform",`rotate(${-1*c.rotate}, ${b[t].x}, ${b[t].y})`,!0)}return o[u.imperial]=(new n).attr("class","scalebox imperial fill-current").move(g.itl).line(g.ibl).line(g.ibr).line(g.itr).line(g.itl).close(),o[u.metric]=(new n).attr("class","scalebox metric fill-bg").move(g.mtl).line(g.mbl).line(g.mbr).line(g.mtr).line(g.mtl).close(),e[u.textMetric]=b.metric.addText(`${h} x ${h}
1`,c.classes.metric),e[u.textImperial]=b.imperial.addText(`${f} x ${f}`,c.classes.imperial),l.storeMacroIds(c.id,{points:{textMetric:u.textMetric,textImperial:u.textImperial},paths:{metric:u.metric,imperial:u.imperial}}),l.getMacroIds(c.id)},rmscalebox:(t,e)=>B(t,e,"scalebox"),rmminiscale:(t,e)=>B(t,e,"miniscale")},L={align:"left",append:!1,cutlist:!0,dy:8,id:"title",force:!1,nr:1,rotation:0,scale:1,title:"plugin-annotations:noName",notes:!1,brand:"FreeSewing",classes:{notes:"text-md fill-current",date:"text-sm fill-current",name:"fill-note",nr:"text-4xl fill-note font-bold",title:"text-lg fill-current font-bold"}},P={title:function(t,{Point:e,points:o,scale:a,locale:i,store:n,part:s,log:r,complete:l}){if(!l&&!t.force)return;const c={...L,...t,classes:L.classes};t.classes&&(c.classes={...c.classes,...t.classes}),c.scale=c.scale*a,c.at&&"function"==typeof c.at.attr||(r.warn("Title macro called without a valid anchor point. Anchoring title at (0,0)."),c.at=new e(0,0)),["left","right","center"].includes(c.align)||(r.warn(`Title macro called with invalid alignement (${c.align}). Left-aligning title.`),c.align="left");const p=`matrix(${c.scale}, 0, 0, ${c.scale}, `+(c.at.x-c.scale*c.at.x)+", "+(c.at.y-c.scale*c.at.y)+`) rotate(${c.rotation} ${c.at.x} ${c.at.y})`,d=n.generateMacroIds(["nr","date","title","name","notes"],c.id);let h=c.dy;void 0!==c.nr?(o[d.nr]=c.at.clone().attr("data-text",c.nr,!c.append).attr("data-text-class",`${c.classes.nr} ${c.align}`).attr("data-text-transform",p).attr("data-render-always",1),n.set(["partNumbers",s.name],c.nr)):delete d.nr,o[d.date]=c.at.shift(-90,h/2).addText((new Date).toLocaleString(i||"en",{weekday:"long",year:"numeric",month:"short",day:"numeric"}),`${c.classes.date} ${c.align}`).attr("data-text-transform",p).attr("data-render-always",1),h+=c.dy,c.title?(o[d.title]=c.at.clone().shift(-90,h).attr("data-text-transform",p).attr("data-render-always",1),c.append?o[d.title].addText(c.title,`${c.classes.title} ${c.align}`):o[d.title].setText(c.title,`${c.classes.title} ${c.align}`),h+=c.dy,n.set(["partTitles",s.name],c.title)):delete d.title;const m=s.context.settings;var f;o[d.name]=c.at.clone().shift(-90,h).addText(`${c.brand} ${f=(n.data?.name||"plugin-annotations:noName").replace("@freesewing/",""),"string"==typeof f?f.charAt(0).toUpperCase()+f.slice(1):""} v${n.data?.version||"plugin-annotations:noVersion"} (`,`${c.classes.name} ${c.align}`).addText(m.metadata?.setName?m.metadata.setName:"ephemeral").addText(")").attr("data-text-transform",p).attr("data-render-always",1),h+=c.dy;const u=[];if(c.cutlist){o[d.notes]=c.at.clone().shift(-90,h);const t=n.get(["cutlist",s.name],null);if(t?.materials)for(const[e,o]of Object.entries(t.materials))o.forEach((({cut:t,identical:o,onBias:a,onFold:i})=>{u.push("plugin-annotations:cut"),u.push(t),!o&&t>1&&u.push("plugin-annotations:mirrored"),i?u.push(a?"plugin-annotations:onFoldAndBias":"plugin-annotations:onFold"):a&&u.push("plugin-annotations:onBias"),u.push("plugin-annotations:from",(e.includes(":")?"":"plugin-annotations:")+e),u.push("\n")}))}return c.notes&&(Array.isArray(c.notes)?u.push(...c.notes):u.push(c.notes)),u.length>0?o[d.notes].addText(u,`${c.classes.notes} ${c.align}`).attr("data-text-transform",p).attr("data-render-always",1).attr("data-text-lineheight",c.dy):delete d.cutlist,n.storeMacroIds(c.id,{points:d}),n.getMacroIds(c.id)},rmtitle:(t=L.id,{store:e,part:o})=>e.removeMacroNodes(t,"title",o)},R={classes:{line:"note",text:"center fill-note"},id:"cutonfold",grainline:!1,margin:.05,offset:15,reverse:!1},F=[{name:"cutonfoldFrom",def:t=>`\n<marker orient="auto" refY="0" refX="0" id="cutonfoldFrom" style="overflow:visible;" markerWidth="12" markerHeight="8" transform="scale(${t})">\n\t<path class="note fill-note" d="M 0,0 L 12,-4 C 10,-2 10,2 12,4 z" transform="scale(${t})"/>\n</marker>`},{name:"cutonfoldTo",def:t=>`\n<marker orient="auto" refY="0" refX="0" id="cutonfoldTo" style="overflow:visible;" markerWidth="12" markerHeight="8" transform="scale(${t})">\n\t<path class="note fill-note" d="M 0,0 L -12,-4 C -10,-2 -10,2 -12,4 z" transform="scale(${t})"/>\n</marker>`}],E={cutonfold:function(t,{paths:e,Path:o,complete:a,store:i,scale:n,log:s,Point:r}){if(!a&&!t.force)return;const l={...R,text:t.grainline?"plugin-annotations:cutOnFoldAndGrainline":"plugin-annotations:cutOnFold",...t,classes:R.classes};t.classes&&(l.classes={...l.classes,...t.classes}),l.from&&"function"==typeof l.from.attr||(s.warn("Cutonfold macro called without a valid from point. Using (0,0) for from."),l.from=new r(0,0)),l.to&&"function"==typeof l.to.attr||(s.warn("Cutonfold macro called without a valid to point. Using (6660,666) for to."),l.to=new r(666,666)),i.cutlist.setCutOnFold(l.from,l.to),l.grainline&&i.cutlist.setGrain(l.from.angle(l.to),"cutonfold");const c=i.generateMacroIds(["line"],l.id),p=l.from.shiftFractionTowards(l.to,l.margin),d=l.to.shiftFractionTowards(l.from,l.margin),h=p.shiftTowards(l.from,l.offset*n).rotate(-90,p),m=d.shiftTowards(l.to,l.offset*n).rotate(90,d);return e[c.line]=(new o).move(p).line(h).line(m).line(d),l.reverse&&(e[c.line]=e[c.line].reverse()),e[c.line]=e[c.line].attr("class",l.classes.line).attr("marker-start","url(#cutonfoldFrom)").attr("marker-end","url(#cutonfoldTo)").addText(l.text,l.classes.text),i.storeMacroIds(l.id,{paths:c}),i.getMacroIds(l.id)},rmcutonfold:(t=R.id,{store:e,part:o})=>("cutonfold"===e.cutlist.getGrainOrigin()&&e.cutlist.removeGrain(),e.cutlist.removeCutOnFold(),e.removeMacroNodes(t,"cutonfold",o))},W=[{name:"dimensionFrom",def:t=>`\n<marker orient="auto" refY="0" refX="0" id="dimensionFrom" style="overflow:visible;" markerWidth="12" markerHeight="8">\n\t<path class="mark fill-mark" d="M 0,0 L 12,-4 C 10,-2 10,2 12,4 z" transform="scale(${t})"/>\n</marker>`},{name:"dimensionTo",def:t=>`\n<marker orient="auto" refY="0" refX="0" id="dimensionTo" style="overflow:visible;" markerWidth="12" markerHeight="8">\n\t<path class="mark fill-mark" d="M 0,0 L -12,-4 C -10,-2 -10,2  -12,4 z" transform="scale(${t})"/>\n</marker>`}],H={text:!1,noStartMarker:!1,noEndMarker:!1,classes:{line:"mark",leaders:"mark dotted",text:"fill-mark center"}},A={hd:function(t,e,o,a){let i;return void 0===t.y||t[e].y===t.y?i=t[e]:(i=new o.Point(t[e].x,t.y),O(o,t[e],i,a)),i},vd:function(t,e,o,a){let i;return void 0===t.x||t[e].x===t.x?i=t[e]:(i=new o.Point(t.x,t[e].y),O(o,t[e],i,a)),i},ld:function(t,e,o,a){let i,n,s;return"from"===e?(n=1,s="to"):(n=-1,s="from"),void 0===t.d?i=t[e]:(i=t[e].shiftTowards(t[s],t.d).rotate(90*n,t[e]),O(o,t[e],i,a)),i}};function O({paths:t,Path:e},o,a,i){t[i]=(new e).move(o).line(a).attr("class","mark dotted")}const D=(t,e,o)=>{if(!e.paperless&&!t.force)return;const a={...H[o],id:o,...t,classes:H.classes};t.classes&&(a.classes={...a.classes,...t.classes});const i=e.store.generateMacroIds(["line","from","to"],a.id);return"pd"===o?(void 0===a.d&&(a.d=10*e.scale),e.paths[i.line]=a.path.offset(a.d).attr("class",a.classes.line).addText(a.text||e.units(a.path.length()),a.classes.text),a.noStartMarker||e.paths[i.line].attributes.set("marker-start","url(#dimensionFrom)"),a.noEndMarker||e.paths[i.line].attributes.set("marker-end","url(#dimensionTo)"),O(e,a.path.start(),e.paths[i.line].start(),i.from),O(e,a.path.end(),e.paths[i.line].end(),i.to)):e.paths[i.line]=function(t,e,o,{Path:a,units:i}){const n=(new a).move(t).line(e).attr("class","mark").attr("data-text",o.text||i(t.dist(e))).attr("data-text-class","fill-mark center").attr("data-macro-id",o.id);return o.noStartMarker||n.attributes.set("marker-start","url(#dimensionFrom)"),o.noEndMarker||n.attributes.set("marker-end","url(#dimensionTo)"),n}(A[o](a,"from",e,i.from),A[o](a,"to",e,i.to),a,e),e.store.storeMacroIds(a.id,{paths:i}),e.store.getMacroIds(a.id)},N=function(t=H.id,{store:e,part:o},a){return e.removeMacroNodes(t,a,o)},I=function({store:t,part:e},o){const a=t.get(["parts",e.name,"macros",o,"ids"],{});for(const i in a)t.removeMacroNodes(i,o,e)},M={hd:(t,e)=>D(t,e,"hd"),ld:(t,e)=>D(t,e,"ld"),vd:(t,e)=>D(t,e,"vd"),pd:(t,e)=>D(t,e,"pd"),rmhd:(t,e)=>N(t,e,"hd"),rmld:(t,e)=>N(t,e,"ld"),rmvd:(t,e)=>N(t,e,"vd"),rmpd:(t,e)=>N(t,e,"pd"),rmahd:(t,e)=>I(e,"hd"),rmald:(t,e)=>I(e,"ld"),rmavd:(t,e)=>I(e,"vd"),rmapd:(t,e)=>I(e,"pd"),rmad:(t,e)=>function({macro:t}){t("rmahd"),t("rmald"),t("rmavd"),t("rmapd")}(e)},_={classes:{line:"note",text:"center fill-note"},id:"grainline",margin:.05,text:"plugin-annotations:grainline"},j=[{name:"grainlineFrom",def:t=>`\n<marker orient="auto" refY="0" refX="0" id="grainlineFrom" style="overflow:visible;" markerWidth="12" markerHeight="8">\n\t<path class="note fill-note" d="M -10,0 L 2,-4 C 0,-2 0,2  2,4 z" transform="scale(${t})"/>\n</marker>`},{name:"grainlineTo",def:t=>`\n<marker orient="auto" refY="0" refX="0" id="grainlineTo" style="overflow:visible;" markerWidth="12" markerHeight="8">\n\t<path class="note fill-note" d="M 10,0 L -2,-4 C 0,-2 -2,2  -2,4 z" transform="scale(${t})"/>\n</marker>`}],G={grainline:function(t={},{paths:e,Path:o,Point:a,complete:i,store:n,log:s}){if(!i&&!t.force)return;const r={..._,...t,classes:_.classes};t.classes&&(r.classes={...r.classes,...t.classes}),r.from&&"function"==typeof r.from.attr||(s.warn("Grainline macro called without a valid from point. Using (0,0) for from."),r.from=new a(0,0)),r.to&&"function"==typeof r.to.attr||(s.warn("Grainline macro called without a valid to point. Using (666,666) for to."),r.to=new a(666,666)),n.cutlist.setGrain(r.from.angle(r.to),"grainline");const l=n.generateMacroIds(["line"],r.id),c=r.from.shiftFractionTowards(r.to,.05),p=r.to.shiftFractionTowards(r.from,.05);return e[l.line]=(new o).move(c).line(p).attr("class",r.classes.line).attr("marker-start","url(#grainlineFrom)").attr("marker-end","url(#grainlineTo)").addText(r.text,r.classes.text),n.storeMacroIds(r.id,{paths:l}),n.getMacroIds(r.id)},rmgrainline:(t=_.id,{store:e,part:o})=>("grainline"===e.cutlist.getGrainOrigin()&&e.cutlist.removeGrain(),e.removeMacroNodes(t,"grainline",o))},U={classes:{arrow:"note",from:"note",to:"note dashed"},id:"pleat",margin:35,reverse:!1},Y=[{name:"pleat",def:t=>`\n<marker id="pleatTo" markerWidth="10" markerHeight="6" orient="auto" refY="3" refX="10">\n\t<path d="M 10,3 L 0,0 C 2,2 2,4 0,6 z" class="fill-note note" transform="scale(${t})" />\n</marker>\n`}],$={pleat:function(t,{paths:e,Path:o,log:a,Point:i,complete:n,scale:s,store:r}){if(!n&&!t.force)return;const l={...U,...t,classes:U.classes};t.classes&&(l.classes={...l.classes,...t.classes}),l.from&&"function"==typeof l.from.attr||(a.warn("Pleat macro called without a valid from point. Using (0,0) for from."),l.from=new i(0,0)),l.to&&"function"==typeof l.to.attr||(a.warn("Pleat macro called without a valid to point. Using (666,666) for to."),l.to=new i(666,666));const c=r.generateMacroIds(["from","to","arrow"],l.id),p=l.to.shift(l.from.shiftTowards(l.to,.1).angle(l.to)+90,l.margin*s),d=l.from.shift(l.from.shiftTowards(l.to,.1).angle(l.from)+270,l.margin*s);return e[c.from]=(new o).move(l.from).line(d).attr("class",l.reverse?l.classes.to:l.classes.from),e[c.to
1]=(new o).move(l.to).line(p).attr("class",l.reverse?l.classes.from:l.classes.to),e[c.arrow]=l.reverse?(new o).move(l.to.shiftFractionTowards(p,.25)).line(l.from.shiftFractionTowards(p,.25)):(new o).move(l.from.shiftFractionTowards(d,.25)).line(l.to.shiftFractionTowards(d,.25)),e[c.arrow].attr("class",l.classes.arrow).attr("marker-end","url(#pleatTo)"),r.storeMacroIds(l.id,{paths:c}),r.getMacroIds(l.id)},rmpleat:(t=U.id,{store:e,part:o})=>e.removeMacroNodes(t,"rmpleat",o)},z={classes:{curve:"dotted note stroke-sm",hinge:"note dotted stroke-sm",text:"center fill-note text-xs"},id:"sewtogether",force:!1,text:"plugin-annotations:sewTogether"},J=[{name:"sewTogetherStart",def:t=>`\n<marker id="sewTogetherStart" markerWidth="10" markerHeight="6" orient="auto" refX="1" refY="2">\n\t<path d="M 0,2 L 6,0 C 5,1 5,3 6,4 z" class="fill-note note" transform="scale(${t})" />\n</marker>`},{name:"sewTogetherEnd",def:t=>`\n<marker id="sewTogetherEnd" markerWidth="10" markerHeight="6" orient="auto" refX="6" refY="2">\n\t<path d="M 6,2 L 0,0 C 1,1 1,3 0,4 z" class="fill-note note" transform="scale(${t})" />\n</marker>`},{name:"sewTogetherCross",def:t=>`\n<marker id="sewTogetherCross" markerWidth="5" markerHeight="5" orient="auto" refX="2.5" refY="2.5">\n  <path d="M 0,0 L 5,5 M 5,0 L 0,5" class="note" transform="scale(${t})" />\n</marker>`}],K={sewtogether:function(t,{paths:e,Path:o,log:a,Point:i,complete:n,sa:s,store:r}){if(!n&&!t.force)return;const l={...z,...t,classes:z.classes};t.classes&&(l.classes={...l.classes,...t.classes}),l.from&&"function"==typeof l.from.attr||(a.warn("Sewtogether macro called without a valid from point. Using (0,0) for from."),l.from=new i(0,0)),l.to&&"function"==typeof l.to.attr||(a.warn("Sewtogether macro called without a valid to point. Using (666,666) for to."),l.to=new i(666,666)),l.middle||(l.middle=l.from.shiftFractionTowards(l.to,.5));const c=r.generateMacroIds(["curve","hinge"],l.id),p=l.from.shift(l.from.angle(l.middle)+90,l.from.dist(l.middle)/1.5),d=l.to.shift(l.to.angle(l.middle)-90,l.to.dist(l.middle)/1.5);if(e[c.curve]=(new o).move(l.from).curve(p,d,l.to).attr("class",l.classes.curve).attr("marker-start","url(#sewTogetherStart)").attr("marker-end","url(#sewTogetherEnd)").addText(l.text,l.classes.text),l.hinge){const t=l.middle.shift(l.middle.angle(l.to)+Math.abs(l.middle.angle(l.from)-l.middle.angle(l.to))/2+(s?180:0),s||l.from.dist(l.middle)/4);e[c.hinge]=(new o).move(l.middle).line(t).attr("marker-start","url(#sewTogetherCross)").attr("class",l.classes.hinge)}else delete c.hinge;return r.storeMacroIds(l.id,{paths:c}),r.getMacroIds(l.id)},rmsewtogether:(t=z.id,{store:e,part:o})=>e.removeMacroNodes(t,"sewtogether",o)},V=["plugins","plugin-annotations","flags"],X=[["flag.info",(t,e)=>Q("info",t,e)],["flag.tip",(t,e)=>Q("tip",t,e)],["flag.note",(t,e)=>Q("note",t,e)],["flag.warn",(t,e)=>Q("warn",t,e)],["flag.fixme",(t,e)=>Q("fixme",t,e)],["flag.error",(t,e)=>Q("error",t,e)],["flag.preset",(t,e)=>Q("preset",t,e)],["unflag.info",(t,e)=>q("info",t,e)],["unflag.tip",(t,e)=>q("tip",t,e)],["unflag.note",(t,e)=>q("note",t,e)],["unflag.warn",(t,e)=>q("warn",t,e)],["unflag.fixme",(t,e)=>q("fixme",t,e)],["unflag.error",(t,e)=>q("error",t,e)],["unflag.preset",(t,e)=>q("preset",t,e)]];function Q(t,e,o){"preset"===t&&Z[o]&&(t=(o=Z[o]).type),o.msg&&(o.title=o.msg+".t",o.desc=o.msg+".d",delete o.msg),o.id||o.title?e.set([...V,t,o.id?o.id:o.title],o):e.log.warn(`store.flag.${t} called without an id or title property`)}function q(t,e,o){"preset"===t&&Z[o]&&(t=Z[o].type,o=Z[o].id||Z[o].title),e.unset([...V,t,o])}const Z={expandIsOff:{type:"tip",title:"flag:expandIsOff.t",desc:"flag:expandIsOff.d",suggest:{text:"flag:enable",icon:"expand",update:{settings:["expand",1]}}},expandIsOn:{type:"tip",title:"flag:expandIsOn.t",desc:"flag:expandIsOn.d",suggest:{text:"flag:disable",icon:"compact",update:{settings:["expand",0]}}}},tt={name:a.id,version:a.r,hooks:{preRender:[function(t){const e=[...n,...F,...W,...j,...r,...l,...Y,...J];for(const o of e)t.defs.setIfUnset(o.name,"function"==typeof o.def?o.def(t.pattern.settings[0].scale):o.def)}],prePartDraft:[function(t){const e=t.config.inject[t.activePart];if(!e)return;const o=t.setStores[t.activeSet],a=o.get(["cutlist",e],{});o.set(["cutlist",t.activePart],{...a})}]},macros:{...p,...h,...b,...k,...S,...E,...M,...G,...$,...K,...P},store:[...C,...X]},et=tt,ot=i}}]);

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.