PageSourceSearch

https://freesewing.dev/assets/js/a4b7343d.cd48170d.js

js freesewing.dev collected 2026-10-08 19:52:33 UTC 1,679,513 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdev=self.webpackChunkdev||[]).push([[12569],{2980:(t,e,o)=>{o.d(e,{f:()=>i});const i={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"}},19970:(t,e,o)=>{o.d(e,{D:()=>i});const i={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"}}},23773:(t,e,o)=>{o.d(e,{Ci:()=>r,Ck:()=>s,HJ:()=>a,Hw:()=>n,U7:()=>l});const i=t=>Array.isArray(t)?t.map((t=>25.4*t)):25.4*t,a={metric:[3.5,5,10,12,20,25,30,40,50,60,80,100,120],imperial:i([1/8,1/4,3/8,.5,5/8,3/4,1,1.25,1.5,1.75,2,3,4,5])},s={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:i([3,4,5,6,7,8,9,10,11,12,14,16,18,20,22,24,28,30,36,42,48,60,80])},n={metric:1,imperial:.79375},r={metric:5,imperial:3.175},l={metric:10,imperial:12.7}},27791:(t,e,o)=>{o.d(e,{I3:()=>a,Kk:()=>i,rA:()=>s});const i=["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"],a=["shoulderSlope"],s=t=>-1!==a.indexOf(t)},29203:(t,e,o)=>{o.d(e,{O:()=>i,i:()=>a});const i={levels:{readNone:0,readSome:1,readOnly:2,writeSome:3,user:4,tester:4,curator:5,bughunter:6,support:8,admin:9},base:"user"},a=["user","curator","support","admin"]},30175:(t,e,o)=>{o.d(e,{e2:()=>l,iv:()=>c});const i=JSON.parse('{"id":"plugin-path-utils","r":"4.6.0"}');function a(t,e,o){let i=[];for(const a of t)if("string"==typeof a){const t=e[a];t&&t.ops?i.push(t):o.error(`Path "${a}" is not a valid path`)}else a&&a.ops?i.push(a):null!==a?o.error(`Path "${a}" is not a valid path`):i.push(null);return i}const s=function(t,e){let{log:o,Path:i}=e;const s=a(t.paths,e.paths,o);let n=s.length-1,r=new i;const l=t.mode??"corner";return s.forEach((function(t,e){if(null!==t&&null!==s[n]){const o=s[n].intersects(t);if(o.length>0){const i=o.pop(),a=s[n].hidden,r=t.hidden;s[n]=s[n].split(i)[0]??s[n],s[e]=t.split(i).pop()??t,a&&s[n].hide(),r&&s[e].hide()}}n=e})),s.forEach((function(o,i){if(null!==o){const a=s[n];if(null!==a){if(o.hidden&&a.hidden)return void(n=i);0===r.ops.length&&r.move(a.end()),function(t,e,o,i,a,s){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"===i)return;const n=e.reverse(),r=n.ops[0].to,l=o.ops[0].to;if(r.dist(l)<1)return;let c=n.ops[1].cp1??n.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 h=s.beamsIntersect(c,r,l,p);if(h){const e=h.dist(r),o=h.dist(l);if(e>h.dist(c))return;if(o>h.dist(p))return;if("corner"===i){if(a){const i=Math.min(e,o);if(e>a&&o>a){const e=h.shiftTowards(r,i-a),o=h.shiftTowards(l,i-a);return void t.line(e).line(o)}}t.line(h)}}}(r,a,o,l,t.limit,e.utils),o.hidden||(a.hidden?r.move(o.start()):r.line(o.start()),r.ops.push(...o.ops.slice(1)))}else o.hidden||r.ops.push(...o.ops)}n=i})),r},n=function(t,e){const o=[];let i="unset",n="unset",{log:r,Path:l}=e;for(const s of t.paths){let t=s?.p??[null],c=s?.offset??0,p=s?.hidden??!1;Array.isArray(t)||(t=[t]),t=a(t,e.paths,r);for(const e of t)if(null==e)"unset"===n&&(n=null),i&&i.ops&&(o.push((new l).move(i.end()).line(i.end())),o.push(null)),i=null;else{null===i&&o.push((new l).move(e.start()).line(e.start()));const t=e.divide();for(const e of t){if("unset"===n&&(n=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),i=e)}}}return null===n&&null!==i&&o.push((new l).move(i.start()).line(i.start())),null!==n&&null===i&&o.unshift((new l).move(n.start()).line(n.start())),s({...t,paths:o},e)}
1,r={name:i.id,version:i.r,macros:{join:s,offset:n,sa:function(t,e){let{log:o}=e,i=t.sa??e.sa;i||(i=0);let a={...t,paths:[]};for(const n of t.paths)null===n?a.paths.push(null):n.ops||"string"==typeof n?a.paths.push({p:n,offset:i}):n.p&&"number"==typeof n.offset?a.paths.push(n):o.error(`Entry "${n}" is not a valid seam allowance path specification`);let s=n(a,e);return s.setClass(t.class??"fabric"),s.addClass("sa"),s},hem:function({path1:t,path2:e,offset1:o=null,offset2:i=null,hemWidth:n,lastFoldWidth:r=null,folds:l=2,prefix:c="hemMacro",cssClass:p="fabric"},h){let{sa:d,utils:f,log:m,paths:u,Point:g,Path:b}=h;const k=(t,e)=>{const[o,i,a]=((t,e)=>{const{x:o,y:i}=t,{x:a,y:s}=e,[n,r]=[-(s-i),a-o];return[n,r,-(n*o+r*i)]})(t,e);return t=>{const{x:e,y:s}=t,n=o*o+i*i;return new g(((i*i-o*o)*e-2*o*i*s-2*o*a)/n,((o*o-i*i)*s-2*o*i*e-2*i*a)/n)}},w=(t,e)=>{const o=e.clone();for(const i of o.ops)switch(i.type){case"move":case"line":i.to=t(i.to);break;case"curve":i.to=t(i.to),i.cp1=t(i.cp1),i.cp2=t(i.cp2)}return o.reverse()};r||(r=d>0?d:10),t=a([t],u,m).pop(),e=a([e],u,m).shift(),null===o&&(o=d),null===i&&(i=d);let C=t.end(),v=e.start(),T=C,y=v,x=C.angle(v),B=C.shift(x+90,n),S=v.shift(x+90,n);if(o&&(t=t.offset(o)),i&&(e=e.offset(i)),0===t.intersectsBeam(B,S).length){let e=f.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=f.beamsIntersect(e.start(),e.start().shift(x+90,10),B,S);e=e.clone().line(t)}function L(t,e,o){let i=t.intersectsBeam(e,o),a=0===i.length?t:t.split(i.shift()).shift();return null===a&&(a=t),a}function P(t,e,o){let i=t.intersectsBeam(e,o),a=0===i.length?t:t.split(i.pop()).pop();return null===a&&(a=t),a}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 W=k(T,y),H=w(W,R),A=w(W,F),O=[H],D=[A];for(let a=1;a<l;a++)u[c+"Fold"+a]=(new b).move(H.end()).line(A.start()).setClass(p).addClass("help"),T=T.shift(x-90,n),y=y.shift(x-90,n),W=k(T,y),H=w(W,H),A=w(W,A),O.push(H),D.unshift(A);T=T.shift(x-90,r),y=y.shift(x-90,r),O[O.length-1]=L(O[O.length-1],T,y),D[0]=P(D[0],T,y);let E=[...O,(new b).move(T).line(y),...D,null];return s({paths:E},h).setClass(p).addClass("sa")}}},l=r,c=r},33727:(t,e,o)=>{o.d(e,{A:()=>s,z:()=>n});const i={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"}}},a={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}},s={account:i,editor:a,dflt:3,flat:{...i.fields.data,...i.fields.info,...i.fields.settings,...i.fields.security,...i.fields.identities,sets:i.sets,core:a.core,ui:a.ui,views:a.views}},n={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"}}},49418:(t,e,o)=>{o.d(e,{qV:()=>N});var i=o(99025);const a=JSON.parse('{"id":"plugin-measurements","r":"4.6.0"}'),s={name:a.id,version:a.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))}}},n=s,r=JSON.parse('{"id":"plugin-mirror","r":"4.6.0"}'),l=(t,e)=>{const{x:o,y:i}=t,{x:a,y:s}=e,[n,r]=[-(s-i),a-o];return[n,r,-(n*o+r*i)]},c=(t,e)=>{const[o,i,a]=l(t,e);return t=>{const{x:e,y:s}=t,n=(i**2-o**2)*e-2*o*i*s-2*o*a,r=(o**2-i**2)*s-2*o*i*e-2*i*a,l=o**2+i**2;t.x=n/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),h={name:r.id,version:r.r,macros:{mirror:function({mirror:t,clone:e=!0,points:o=[],paths:i=[],snippets:a=[],prefix:s="mirrored",nameFormat:n,reverse:r=!1}){const[l,h]=t,d=c(l,h);for(const c of i)if(this.paths[c]){let t=e?this.paths[c].clone():this.paths[c];t=r?t.reverse():t;const o=e?"function"==typeof n?n(c,"path"):`${s}${p(c)}`:c;for(const e of t.ops)switch(e.type){case"move":case"line":e.to=d(e.to);break;case"curve":e.to=d(e.to),e.cp1=d(e.cp1),e.cp2=d(e.cp2)}this.paths[o]=t}for(const c of o)if(this.points[c]){const t=d(e?this.points[c].clone():this.points[c]),o=e?"function"==typeof n?n(c,"point"):`${s}${p(c)}`:c;this.points[o]=t}for(const c of a)if(this.snippets[c]){const t=this.snippets[c].anchor.name,o=e?this.snippets[c].clone():this.snippets[c],i=e?"function"==typeof n?n(c,"snippet"):`${s}${p(c)}`:c;this.snippets[i]=o;const a=d(o.anchor);if(this.points[t]){const i=e?"function"==typeof n?n(t,"point"):`${s}${p(t)}`:t;
1this.points[i]=a,o.anchor=this.points[i]}else o.anchor=a}}},methods:{lineValues:l,mirrorGen:c}},d=h,f=JSON.parse('{"id":"plugin-transform","r":"4.6.0"}'),m=(t,e,o,i)=>(t.x=(t.x-i.x)*e+i.x,t.y=(t.y-i.y)*o+i.y,t),u={name:f.id,version:f.r,macros:{transform:function({transform:t=Object.freeze({rotate:"rotate",translate:"translate",scale:"scale"}),x:e=0,y:o,angle:i=0,c:a=new this.Point(0,0),clone:s=!0,points:n=[],paths:r=[],prefix:l="transformed_"}){void 0===o&&(o=e);for(const c of r)if(this.paths[c]){const n=s?this.paths[c].clone():this.paths[c],r=s?"function"==typeof l?l(c,"path"):`${l}${c}`:c;switch(t){case"rotate":this.paths[r]=n.rotate(i,a);break;case"translate":this.paths[r]=n.translate(e,o);break;case"scale":for(const t of n.ops)switch(t.type){case"curve":t.cp1=m(t.cp1,e,o,a),t.cp2=m(t.cp2,e,o,a);case"move":case"line":t.to=m(t.to,e,o,a)}this.paths[r]=n}}for(const c of n)if(this.points[c]){const n=s?this.points[c].clone():this.points[c],r=s?"function"==typeof l?l(c,"point"):`${l}${c}`:c;switch(t){case"rotate":this.points[r]=n.rotate(i,a);break;case"translate":this.points[r]=n.translate(e,o);break;case"scale":this.points[r]=m(n,e,o,a)}}}}},g=u,b=JSON.parse('{"id":"plugin-round","r":"4.6.0"}'),k=["start","cp1","cp2","end"],w=["path"],C={name:b.id,version:b.r,macros:{round:function(t,{points:e,paths:o,Point:i,Path:a,store:s}){const n=.55191502449,{from:r=new i(0,0),to:l=new i(666,666),via:c=new i(666,0),id:p="round",classes:h="",hide:d=!0}=t;let{radius:f=66.6}=t;const m=s.generateMacroIds(k,p),u=s.generateMacroIds(w,p),g={...m,...u},b=r.dist(c),C=l.dist(c);return(f>b||f>C)&&(f=b>C?C:b),e[g.start]=c.shiftTowards(r,f),e[g.cp1]=c.shiftTowards(r,f*(1-n)),e[g.cp2]=c.shiftTowards(l,f*(1-n)),e[g.end]=c.shiftTowards(l,f),o[g.path]=(new a).move(this.points[g.start]).curve(e[g.cp1],e[g.cp2],e[g.end]).addClass(h),d?o[g.path].hide():o[g.path].unhide(),s.storeMacroIds(t.id,{paths:u,points:m}),s.getMacroIds(t.id)}}},v=C,T=JSON.parse('{"id":"plugin-sprinkle","r":"4.6.0"}'),y={name:T.id,version:T.r,macros:{sprinkle:function(t,{snippets:e,Snippet:o,points:i}){for(let a of t.on)e[a+"-"+t.snippet]=new o(t.snippet,i[a]),t.scale&&e[a+"-"+t.snippet].attr("data-scale",t.scale),t.rotate&&e[a+"-"+t.snippet].attr("data-rotate",t.rotate)}}},x=y,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,i,a,s=t.length;if(0===s)return;let n=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:n,height:r},e=0;e<s;e++)i=t[e],(o=this.findNode(this.root,i.width,i.height))?(a=this.splitNode(o,i.width,i.height),i.x=a.x,i.y=a.y):(a=this.growNode(i.width,i.height),i.x=a.x,i.y=a.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 i=t.y+o;t.down={x:t.x,y:i,width:t.width,height:Math.min(t.height-o,this.maxHeight-i)};const a=t.x+e;return t.right={x:a,y:t.y,width:Math.min(t.width-e,this.maxWidth-a),height:o},t},growNode:function(t,e){let o=t<=this.root.width,i=e<=this.root.height;const a=this.root.width+t;let s=i&&(this.ensureSquare?this.root.height:this.maxWidth)>=a;const n=this.root.height+e;let r=o&&(this.ensureSquare?this.root.width:this.maxHeight)>=n;return s?this.growRight(t,e):r?this.growDown(t,e):i?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 i={...L,...o.pattern.settings[0]},a=new S(i),s=i.inPlace||!1;let n=e.map((function(t){return s?t:{width:t.width,height:t.height,item:t}}));const r=n.sort((function(t,e){return e.width-t.width}))[0].width,l=i.maxWidth&&r>i.maxWidth;
1n=n.sort((function(t,e){return i.maxWidth&&!i.maxHeight&&l?e.width-t.width:i.maxWidth&&!i.maxHeight||i.maxHeight?e.height-t.height:e.width*e.height-t.width*t.height})),a.fit(n);const c={width:n.reduce((function(t,e){return Math.max(t,e.x+e.width)}),0),height:n.reduce((function(t,e){return Math.max(t,e.y+e.height)}),0)};return s||(c.items=n),c}]]},R=P,F=JSON.parse('{"id":"core-plugins","r":"4.6.0"}'),W=[i.Sr,n,d,v,x,g,R],H={},A={},O=[];function D(t){for(const e in t.hooks){void 0===H[e]&&(H[e]=[]);const o=t.hooks[e];if("function"==typeof o)H[e].push(o);else if("object"==typeof o)for(let t of o)H[e].push(t)}}function E(t){for(const e in t.macros)A[e]=t.macros[e]}function I(t){t.store&&O.push(...t.store)}for(const M of W)D(M),E(M),I(M);const N={name:F.id,version:F.r,store:O,hooks:H,macros:A}},49499:(t,e,o)=>{o.r(e),o.d(e,{assets:()=>c,contentTitle:()=>l,default:()=>d,frontMatter:()=>r,metadata:()=>i,toc:()=>p});const i=JSON.parse('{"id":"reference/packages/collection/readme","title":"@freesewing/collection","description":"FreeSewing\'s collection package bundles all FreeSewing designs as well as","source":"@site/docs/reference/packages/collection/readme.mdx","sourceDirName":"reference/packages/collection","slug":"/reference/packages/collection/","permalink":"/reference/packages/collection/","draft":false,"unlisted":false,"editUrl":"https://codeberg.org/freesewing/freesewing/src/branch/develop/sites/dev/docs/reference/packages/collection/readme.mdx","tags":[],"version":"current","frontMatter":{"title":"@freesewing/collection"},"sidebar":"tutorialSidebar","previous":{"title":"Packages","permalink":"/reference/packages/"},"next":{"title":"@freesewing/config","permalink":"/reference/packages/config/"}}');var a=o(31085),s=o(71184),n=o(56821);const r={title:"@freesewing/collection"},l=void 0,c={},p=[{value:"Installation",id:"installation",level:2},{value:"Named Exports",id:"named-exports",level:2},{value:"about",id:"about",level:3},{value:"collection",id:"collection",level:3},{value:"designs",id:"designs",level:3},{value:"designers",id:"designers",level:3},{value:"developers",id:"developers",level:3},{value:"i18n",id:"i18n",level:3},{value:"measurements",id:"measurements",level:3},{value:"optionalMeasurements",id:"optionalmeasurements",level:3},{value:"requiredMeasurements",id:"requiredmeasurements",level:3},{value:"tags",id:"tags",level:3},{value:"techniques",id:"techniques",level:3}];function h(t){const e={a:"a",admonition:"admonition",br:"br",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,s.R)(),...t.components},{ConsoleButton:o}=e;return o||function(t,e){throw new Error("Expected "+(e?"component":"object")+" `"+t+"` to be defined: you likely forgot to import, pass, or provide it.")}("ConsoleButton",!0),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(e.p,{children:["FreeSewing's ",(0,a.jsx)(e.strong,{children:"collection"})," package bundles all FreeSewing designs as well as\ninformation about those designs."]}),"\n",(0,a.jsxs)(e.p,{children:["It is published on NPM as ",(0,a.jsx)(e.a,{href:"https://www.npmjs.com/package/@freesewing/collection",children:"@freesewing/collection\n"}),".",(0,a.jsx)(e.br,{}),"\n","The source code for this package is available in ",(0,a.jsx)(e.a,{href:"https://codeberg.org/freesewing/freesewing",children:"our monorepo on Codeberg\n"})," under ",(0,a.jsx)(e.a,{href:"https://codeberg.org/freesewing/freesewing/src/branch/develop/packages/collection",children:"packages/collection\n"}),"."]}),"\n",(0,a.jsx)(e.admonition,{type:"note",children:(0,a.jsx)(e.p,{children:"This package does not provide a default export."})}),"\n",(0,a.jsx)(e.h2,{id:"installation",children:"Installation"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-sh",children:"npm install --save @freesewing/collection\n"})}),"\n",(0,a.jsx)(e.h2,{id:"named-exports",children:"Named Exports"}),"\n",(0,a.jsx)(e.h3,{id:"about",children:"about"}),"\n",(0,a.jsx)(e.p,{children:"Holds on object where the key is the design name and the value is an object\nholding a bunch of information about a Design."}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-js",children:"import { about } from '@freesewing/collection'\n"})}),"\n",(0,a.jsx)(o,{data:n.Cv}),"\n",(0,a.jsx)(e.h3,{id:"collection",children:"collection"}),"\n",(0,a.jsx)(e.p,{children:"Holds an array of design names that are included in the package."}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-js",children:"import { collection } from '@freesewing/collection'\n"})}),"\n",(0,a.jsx)(o,{data:n.rJ}),"\n",(0,a.jsx)(e.h3,{id:"designs",children:"designs"}),"\n",(0,a.jsx)(e.p,{children:"An object holding all of our designs. The key is the design name, and the value\nthe design instance."}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-js",children:"import { designs } from '@freesewing/collection'\n"})}),"\n",(0,a.jsx)(o,{data:n._e}),"\n",(0,a.jsx)(e.h3,{id:"designers",children:"designers"}),"\n",(0,a.jsxs)(e.p,{children:["An array holding the various designers,\nwhich we use to filter designs based on the data in the ",(0,a.jsx)(e.code,{children:"about"})," export."]}
1),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-js",children:"import { developers } from '@freesewing/collection'\n"})}),"\n",(0,a.jsx)(o,{data:n.$$}),"\n",(0,a.jsx)(e.h3,{id:"developers",children:"developers"}),"\n",(0,a.jsxs)(e.p,{children:["An array holding the various developers,\nwhich we use to filter designs based on the data in the ",(0,a.jsx)(e.code,{children:"about"})," export."]}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-js",children:"import { developers } from '@freesewing/collection'\n"})}),"\n",(0,a.jsx)(o,{data:n.wm}),"\n",(0,a.jsx)(e.h3,{id:"i18n",children:"i18n"}),"\n",(0,a.jsx)(e.p,{children:"An object holding English translations for all designs in our collection."}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-js",children:"import { i18n } from '@freesewing/collection'\n"})}),"\n",(0,a.jsx)(o,{data:n.Ru}),"\n",(0,a.jsx)(e.h3,{id:"measurements",children:"measurements"}),"\n",(0,a.jsx)(e.p,{children:"Holds an object where the key is the design name and the value is an array of\nall the consolidated measurements for that design.\nBy consolidated, we mean the required measurements, plus the optional\nmeasurments."}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-js",children:"import { measurements } from '@freesewing/collection'\n"})}),"\n",(0,a.jsx)(o,{data:n.Kk}),"\n",(0,a.jsx)(e.h3,{id:"optionalmeasurements",children:"optionalMeasurements"}),"\n",(0,a.jsx)(e.p,{children:"Holds an object where the key is the design name and the value is an array of\nall the optional measurements for that design."}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-js",children:"import { optionalMeasurements } from '@freesewing/collection'\n"})}),"\n",(0,a.jsx)(o,{data:n.WA}),"\n",(0,a.jsx)(e.h3,{id:"requiredmeasurements",children:"requiredMeasurements"}),"\n",(0,a.jsx)(e.p,{children:"Holds an object where the key is the design name and the value is an array of\nall the required measurements for that design."}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-js",children:"import { requiredMeasurements } from '@freesewing/collection'\n"})}),"\n",(0,a.jsx)(o,{data:n.J6}),"\n",(0,a.jsx)(e.h3,{id:"tags",children:"tags"}),"\n",(0,a.jsxs)(e.p,{children:["An array holding the various tags,\nwhich we use to filter designs based on the data in the ",(0,a.jsx)(e.code,{children:"about"})," export."]}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-js",children:"import { tags } from '@freesewing/collection'\n"})}),"\n",(0,a.jsx)(o,{data:n._A}),"\n",(0,a.jsx)(e.h3,{id:"techniques",children:"techniques"}),"\n",(0,a.jsxs)(e.p,{children:["An array holding the various techniques,\nwhich we use to filter designs based on the data in the ",(0,a.jsx)(e.code,{children:"about"})," export."]}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-js",children:"import { techniques } from '@freesewing/collection'\n"})}),"\n",(0,a.jsx)(o,{data:n.Wp})]})}function d(t={}){const{wrapper:e}={...(0,s.R)(),...t.components};return e?(0,a.jsx)(e,{...t,children:(0,a.jsx)(h,{...t})}):h(t)}},52665:(t,e,o)=>{o.d(e,{wA:()=>s,pT:()=>Dt,dd:()=>l,bR:()=>r,ZH:()=>x,Qr:()=>b,Ey:()=>W,B0:()=>nt,fC:()=>g,V9:()=>Tt,D4:()=>I,lL:()=>N,Wx:()=>M,U1:()=>j,VT:()=>Q,rE:()=>Et});var i={};o.r(i),o.d(i,{__addNonEnumProp:()=>V,__asNumber:()=>q,__isCoord:()=>Z,__macroName:()=>tt,applyTransformToPoint:()=>st,beamIntersectsCircle:()=>k,beamIntersectsCurve:()=>y,beamIntersectsLine:()=>D,beamIntersectsX:()=>w,beamIntersectsY:()=>C,beamsIntersect:()=>v,capitalize:()=>x,cbqc:()=>b,circlesIntersect:()=>B,combineTransforms:()=>at,curveEdge:()=>S,curveIntersectsX:()=>L,curveIntersectsY:()=>P,curveParameterFromPoint:()=>U,curvesIntersect:()=>R,deg2rad:()=>F,generateStackTransform:()=>W,getSnappedPercentageValue:()=>H,getTransformedBounds:()=>nt,goldenRatio:()=>g,lineIntersectsCircle:()=>A,lineIntersectsCurve:()=>E,linesIntersect:()=>O,mergeI18n:()=>I,mergeOptions:()=>N,pctBasedOn:()=>M,pctBasedOnSa:()=>_,pointOnBeam:()=>G,pointOnCurve:()=>Y,pointOnLine:()=>z,projectPointOntoCurve:()=>lt,projectPointOntoLine:()=>rt,rad2deg:()=>J,round:()=>$,snappedPctOption:()=>j,splitCurve:()=>X,stretchToScale:()=>Q,units:()=>K});var a=o(48122);class s extends a.w{reduce(){const t=this.getUtils(),e=.001;if(!(this.length()>0))return[];let o,i,a,s=0,n=[],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),i=l[0],o=1;o<l.length;o++)s=l[o],a=this.split(i,s),a._t1=i,a._t2=s,n.push(a),i=s;
1return n.forEach((function(o){r.push(...function(o){const i=[];let a=0;if(!(o._t2-o._t1>=e))return[];if(o.simple())return[o];for(;a<1&&!o.split(a,1).simple();){let t=a+e,s=1,n=a+e;if(t>s)break;for(let e=0;e<20;e++){const i=(t+s)/2;if(o.split(a,i).simple()?(n=i,t=i):s=i,a!==n&&e>=5)break}i.push(n),a=n}i.push(1);const s=[];let n=0;for(const e of i){const i=o.split(n,e);i._t1=t.map(n,0,1,o._t1,o._t2),i._t2=t.map(e,0,1,o._t1,o._t2),s.push(i),n=e}return s}(o))})),r}}function n(){return this.list={},this}function r(t,e){this.x=t,this.y=e,this.attributes=new n}function l(){return this.hidden=!1,this.ops=[],this.attributes=new n,this.topLeft=!1,this.bottomRight=!1,this}n.prototype.add=function(t,e){return void 0===this.list[t]&&(this.list[t]=[]),this.list[t].push(e),this},n.prototype.asPropsIfPrefixIs=function(t=""){let e={},o=t.length;for(let i in this.list)if(i.substr(0,o)===t){let t=i.substr(o);"class"===t&&(t="className"),e[t]=this.get(i)}return e},n.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},n.prototype.clone=function(){let t=new n;return t.list=JSON.parse(JSON.stringify(this.list)),t},n.prototype.get=function(t){return void 0!==this.list[t]&&this.list[t].join(" ")},n.prototype.getAsArray=function(t){return void 0!==this.list[t]&&this.list[t]},n.prototype.remove=function(t){return delete this.list[t],this},n.prototype.render=function(){let t="";for(let e in this.list)t+=` ${e}="${this.list[e].join(" ")}"`;return t},n.prototype.renderAsCss=function(){let t="";for(let e in this.list)t+=` ${e}:${this.list[e].join(" ")};`;return t},n.prototype.renderIfPrefixIs=function(t=""){let e="",o=t.length;for(let i in this.list)i.substr(0,o)===t&&(e+=` ${i.substr(o)}="${this.list[i].join(" ")}"`);return e},n.prototype.set=function(t,e){return this.list[t]=[e],this},n.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 J(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()),i=this.angle(e);return new r(e.x+o*Math.cos(F(i+t))*-1,e.y+o*Math.sin(F(i+t))).__withLog(this.log)},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 ${$(e.to.x)},${$(e.to.y)}`;break;case"line":t+=` L ${$(e.to.x)},${$(e.to.y)}`;break;case"curve":t+=` C ${$(e.cp1.x)},${$(e.cp1.y)} ${$(e.cp2.x)},${$(e.cp2.y)} ${$(e.to.x)},${$(e.to.y)}`;break;
1case"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 h(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 d(t){let e,o=(new l).__withLog(t[0].log).move(t[0].ops[0].to);for(let i of t)for(let t of i.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 f(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 m(t,e,o,i=!1){if(t.x===e.x&&t.y===e.y)return!1;let a=t.angle(e)-90;return(new l).__withLog(i).move(t.shift(a,o)).line(e.shift(a,o))}function u(t,e,o){let i,a,s,n,l=0;for(let c=0;c<=o;c++){if(s=c/o,a=e.get(s),a=new r(a.x,a.y),c>0){if(n=a.dist(i),l+n>t)return a;l+=n}i=a}}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 i=this.ops[o];"line"===i.type?e.push(f({from:t,to:i.to})):"curve"===i.type&&e.push(h(new s({x:t.x,y:t.y},{x:i.cp1.x,y:i.cp1.y},{x:i.cp2.x,y:i.cp2.y},{x:i.to.x,y:i.to.y}))),i.to&&(t=i.to)}return 0===e.length&&t&&e.push(f({from:t,to:t})),function(t){let e=1/0,o=-1/0,i=1/0,a=-1/0;for(let s of t)s.topLeft.x<e&&(e=s.topLeft.x),s.topLeft.y<i&&(i=s.topLeft.y),s.bottomRight.x>o&&(o=s.bottomRight.x),s.bottomRight.y>a&&(a=s.bottomRight.y);return{topLeft:new r(e,i),bottomRight:new r(o,a)}}(e)},l.prototype.circleSegment=function(t,e){const o=this.end().dist(e),i=Math.ceil(Math.abs(t/90)),a=t/i,s=F(a),n=o*(4/3)*Math.tan(s/4);for(let r=0;r<i;r++){const t=this.end(),o=t.rotate(a,e),i=t.angle(e)-90,s=o.angle(e)+90,r=t.shift(i,n),l=o.shift(s,n);this.curve(r,l,o)}return this},l.prototype.clean=function(){const t=[];let e;for(const o in this.ops){const i=this.ops[o];["move","close","noop"].includes(i.type)?t.push(i):"line"===i.type?i.to.sitsRoughlyOn(e)||t.push(i):"curve"===i.type&&(i.cp1.sitsRoughlyOn(e)&&i.cp2.sitsRoughlyOn(e)&&i.to.sitsRoughlyOn(e)||t.push(i)),e=i.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 i in this.ops){let a=this.ops[i];"move"===a.type?e=a.to:"line"===a.type?a.to.sitsRoughlyOn(t)||o.push((new l).__withLog(this.log).move(t).line(a.to)):"curve"===a.type?o.push((new l).__withLog(this.log).move(t).curve(a.cp1,a.cp2,a.to)):"close"===a.type&&o.push((new l).__withLog(this.log).move(t).line(e)),a.to&&(t=a.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,i=e,a=e;for(let s in this.ops){let n=this.ops[s];if("move"===n.type)a=n.to;else if("line"===n.type){let a=rt(t,i,n.to),s=a.dist(t);s<o&&(o=s,e=a)}else if("curve"===n.type){let a=lt(t,i,n.cp1,n.cp2,n.to),s=a.dist(t);s<o&&(o=s,e=a)}else if("close"===n.type){let s=rt(t,i,a),n=s.dist(t);n<o&&(o=n,e=s)}n.to&&(i=n.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(),i=o;for(let a in this.ops){let n=this.ops[a];if("move"===n.type)i=n.to;else if("line"===n.type){if(z(o,n.to,t))return e+=o.dist(t),e;e+=o.dist(n.to)}else if("curve"===n.type){let i=new s({x:o.x,y:o.y},{x:n.cp1.x,y:n.cp1.y},{x:n.cp2.x,y:n.cp2.y},{x:n.to.x,y:n.to.y});const a=i.project({x:t.x,y:t.y});if(a.d<1)return e+=i.split(a.t).left.length(),e;e+=i.length()}else if("close"===n.type){if(z(o,i,t))return e+=o.dist(t),e;e+=o.dist(i)}n.to&&(o=n.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 s({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 i in o.ops)"noop"===o.ops[i].type&&o.ops[i].id===t&&(o.ops=o.ops.slice(0,i).concat(e.ops).concat(o.ops.slice(Number(i)+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 i of t.divide())"line"===o.ops[1].type?"line"===i.ops[1].type?c(O(o.ops[0].to,o.ops[1].to,i.ops[0].to,i.ops[1].to),e):"curve"===i.ops[1].type&&c(E(o.ops[0].to,o.ops[1].to,i.ops[0].to,i.ops[1].cp1,i.ops[1].cp2,i.ops[1].to),e):"curve"===o.ops[1].type&&("line"===i.ops[1].type?c(E(i.ops[0].to,i.ops[1].to,o.ops[0].to,o.ops[1].cp1,o.ops[1].cp2,o.ops[1].to),e):"curve"===i.ops[1].type&&c(R(o.ops[0].to,o.ops[1].cp1,o.ops[1].cp2,o.ops[1].to,i.ops[0].to,i.ops[1].cp1,i.ops[1].cp2,i.ops[1].to),e));return e},l.prototype.intersectsBeam=function(t,e){let o=[];for(let i of this.divide())"line"===i.ops[1].type?c(D(t,e,i.ops[0].to,i.ops[1].to),o):"curve"===i.ops[1].type&&c(y(t,e,i.ops[0].to,i.ops[1].cp1,i.ops[1].cp2,i.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]?d([this,t[0]]).close():d([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 d([this,...t])},l.prototype.length=function(t=!1){let e,o,i=0;for(let a in this.ops){let n=this.ops[a];"move"===n.type?void 0===o?o=n.to:t&&(i+=e.dist(n.to)):"line"===n.type?i+=e.dist(n.to):"curve"===n.type?i+=new s({x:e.x,y:e.y},{x:n.cp1.x,y:n.cp1.y},{x:n.cp2.x,y:n.cp2.y},{x:n.to.x,y:n.to.y}).length():"close"===n.type&&(i+=e.dist(o)),n.to&&(e=n.to)}return i},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 i,a,n=[],r=!1,c=!1;for(let h in t.ops){let o=t.ops[h];if("line"===o.type){let a=m(i,o.to,e,t.log);a&&n.push(a)}else if("curve"===o.type){let a,r;i.sitsRoughlyOn(o.cp1)?(a=(new l).__withLog(t.log).move(i).curve(o.cp1,o.cp2,o.to),a=a.shiftAlong(a.length()>2?2:a.length()/10)):a=o.cp1,o.cp2.sitsRoughlyOn(o.to)?(r=(new l).__withLog(t.log).move(o.to).curve(o.cp2,o.cp1,i),r=r.shiftAlong(r.length()>2?2:r.length()/10)):r=o.cp2;let c=new s({x:i.x,y:i.y},{x:a.x,y:a.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&&n.push(e)}}else if("close"===o.type){let o=m(i,r,e,t.log);o&&n.push(o),c=!0}o.to&&(i=o.to),r&&"move"!==o.type||(r=i)}if(0!==n.length)a=d(n);else{let s=m(r,i,e,t.log);s?a=s:(a=(new l).move(r).line(i),o.warn("Could not properly calculate offset path, the given path is likely too short."))}return c?a.close():a}(this,t=q(t,"distance","Path.offset",this.log),this.log)},l.prototype.reverse=function(t=!1){let e,o=[],i=!1;for(let s in this.ops){let t=this.ops[s];"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&&(i=!0),t.to&&(e=t.to)}let a=(new l).__withLog(this.log).move(e);for(let s of o.reverse())a.end().sitsOn(s.ops[0].to)?a.ops.push(s.ops[1]):a.ops.push(...s.ops);return i&&a.close(),t&&(a.attributes=this.attributes.clone()),a},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 i=(new l).__withLog(this.log);for(const a of this.ops)if("move"===a.type){const o=a.to.rotate(t,e);i.move(o)}else if("line"===a.type){const o=a.to.rotate(t,e);i.line(o)}else if("curve"===a.type){const o=a.cp1.rotate(t,e),s=a.cp2.rotate(t,e),n=a.to.rotate(t,e);i.curve(o,s,n)}else"close"===a.type&&i.close();return o&&(i.attributes=this.attributes.clone()),i},l.prototype.roughLength=function(){let t,e,o=0;for(let i in this.ops){let a=this.ops[i];"move"===a.type?e=a.to:"line"===a.type?o+=t.dist(a.to):"curve"===a.type?(o+=t.dist(a.cp1),o+=a.cp1.dist(a.cp2),o+=a.cp2.dist(a.to)):"close"===a.type&&(o+=t.dist(e)),a.to&&(t=a.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,i=0;for(let a in this.ops){let n=this.ops[a];if("line"===n.type){let e=n.to.dist(o);if(Math.abs(i+e-t)<.1)return n.to;if(i+e>t)return o.shiftTowards(n.to,t-i);i+=e}else if("curve"===n.type){let a=new s({x:o.x,y:o.y},{x:n.cp1.x,y:n.cp1.y},{x:n.cp2.x,y:n.cp2.y},{x:n.to.x,y:n.to.y}),r=a.length();if(Math.abs(i+r-t)<.1)return n.to;if(i+r>t)return u(t-i,a,r*e);i+=r}o=n.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(),i=o.cp2.rotate(180,o.to);return this.ops.push({type:"curve",cp1:i,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),i=t;return this.ops.push({type:"curve",cp1:o,cp2:i,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=[],i=[];for(let a=0;a<e.length;a++){let n=e[a];if(n.ops[0].to.sitsRoughlyOn(t)){e[a].ops[0].to=t.copy(),a>0&&(e[a-1].ops[1].to=t.copy()),o=e.slice(0,a),i=e.slice(a);break}if("line"===n.ops[1].type){if(n.ops[1].to.sitsRoughlyOn(t)){a++,o=e.slice(0,a),i=e.slice(a);break}if(z(n.ops[0].to,n.ops[1].to,t)){o=e.slice(0,a),o.push((new l).__withLog(this.log).move(n.ops[0].to).line(t)),a++,i=e.slice(a),i.unshift((new l).__withLog(this.log).move(t).line(n.ops[1].to));break}}else if("curve"===n.ops[1].type){let c=U(n.ops[0].to,n.ops[1].cp1,n.ops[1].cp2,n.ops[1].to,t);if(!1!==c){let p=new s({x:n.ops[0].to.x,y:n.ops[0].to.y},{x:n.ops[1].cp1.x,y:n.ops[1].cp1.y},{x:n.ops[1].cp2.x,y:n.ops[1].cp2.y},{x:n.ops[1].to.x,y:n.ops[1].to.y}).split(c);o=e.slice(0,a),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())),a++,i=e.slice(a),i.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?d(o):null,i=i.length>0&&i[0].ops.length>1?d(i):null,[o,i]},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 i=e[o];if("line"===i.ops[1].type){if(z(i.ops[0].to,i.ops[1].to,t))return i.ops[0].to.angle(i.ops[1].to)}else if("curve"===i.ops[1].type){let e=U(i.ops[0].to,i.ops[1].cp1,i.ops[1].cp2,i.ops[1].to,t);if(!1!==e){let t=new s({x:i.ops[0].to.x,y:i.ops[0].to.y},{x:i.ops[1].cp1.x,y:i.ops[1].cp1.y},{x:i.ops[1].cp2.x,y:i.ops[1].cp2.y},{x:i.ops[1].to.x,y:i.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();
1for(let i of o.ops)"close"!==i.type&&(i.to=i.to.translate(t,e)),"curve"===i.type&&(i.cp1=i.cp1.translate(t,e),i.cp2=i.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,i=parseInt(t.length)-1;for(let a=o;a<i;a++){let o=t[e].intersects(t[a]);if(o.length>0){let i,n=o.pop(),c=t.slice(0,e),p=t.slice(parseInt(a)+1),h=(new l).__withLog(this.log),f=!0;for(let o of[e,a]){let e=t[o].ops;if("line"===e[1].type)h.line(n);else if("curve"===e[1].type){let t,o=new s({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}),i=U(e[0].to,e[1].cp1,e[1].cp2,e[1].to,n),a=o.split(i);t=f?a.left:a.right,h.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))}f=!1}return i=c.length>0?d(c).join(h):h,p.length>0&&(i=i.join(d(p))),i.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),i=[];for(let a in this.ops){let n=this.ops[a];if("move"===n.type||"line"===n.type)n.to.x<e.x&&(e.x=n.to.x,i.leftOp=a),n.to.y<e.y&&(e.y=n.to.y,i.topOp=a),n.to.x>o.x&&(o.x=n.to.x,i.rightOp=a),n.to.y>o.y&&(o.y=n.to.y,i.bottomOp=a);else if("curve"===n.type){let r=new s({x:t.x,y:t.y},{x:n.cp1.x,y:n.cp1.y},{x:n.cp2.x,y:n.cp2.y},{x:n.to.x,y:n.to.y}).bbox();r.x.min<e.x&&(e.x=r.x.min,i.leftOp=a),r.y.min<e.y&&(e.y=r.y.min,i.topOp=a),r.x.max>o.x&&(o.x=r.x.max,i.rightOp=a),r.y.max>o.y&&(o.y=r.y.max,i.bottomOp=a)}n.to&&(t=n.to)}this.topLeft=e,this.bottomRight=o;for(let a of["top","left","bottom","right"]){let t=a+"Op";this[t]=this.ops[i[t]],this[t].from="move"===this[t].type?this[t].to:this.ops[i[t]-1].to}return this},l.prototype.__intersectsAxis=function(t=!1,e){let o=[],i="x"===e?new r(t,-1e5):new r(-1e4,t),a="x"===e?new r(t,1e5):new r(1e5,t);for(let s of this.divide())"line"===s.ops[1].type?c(O(s.ops[0].to,s.ops[1].to,i,a),o):"curve"===s.ops[1].type&&c(E(i,a,s.ops[0].to,s.ops[1].cp1,s.ops[1].cp2,s.ops[1].to),o);return o},l.prototype.__withLog=function(t=!1){return t&&V(this,"log",t),this};const g=1.618034,b=.55191502449351;function k(t,e,o,i,a="x"){let s=i.x-o.x,n=i.y-o.y,l=Math.pow(s,2)+Math.pow(n,2),c=2*(s*(o.x-t.x)+n*(o.y-t.y)),p=Math.pow(o.x-t.x,2)+Math.pow(o.y-t.y,2)-Math.pow(e,2),h=Math.pow(c,2)-4*l*p;if(l<=1e-7||h<0)return!1;if(0===h){let t=-1*c/(2*l);return[new r(o.x+t*s,o.y+t*n)]}{let t=(-1*c+Math.sqrt(h))/(2*l),e=new r(o.x+t*s,o.y+t*n);t=(-1*c-Math.sqrt(h))/(2*l);let i=new r(o.x+t*s,o.y+t*n);return"x"===a&&e.x<=i.x||"y"===a&&e.y<=i.y?[e,i]:[i,e]}}function w(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,i){const a=T(t,e,o,i);return!!a&&a.p}function T(t,e,o,i){function a(t,e){return t.x*e.y-t.y*e.x}const s={x:e.x-t.x,y:e.y-t.y},n={x:i.x-o.x,y:i.y-o.y},l={x:o.x-t.x,y:o.y-t.y},c=a(s,n);if(Math.abs(c)<1e-10)return!1;const p=a(l,n)/c,h=a(l,s)/c;return{p:new r(t.x+p*s.x,t.y+p*s.y),t:p,u:h}}function y(t,e,o,i,a,n){let l=[],c=new s({x:o.x,y:o.y},{x:i.x,y:i.y},{x:a.x,y:a.y},{x:n.x,y:n.y}),p={p1:{x:t.x,y:t.y},p2:{x:e.x,y:e.y}};for(let h of s.getUtils().roots(c.points,p)){let t=c.get(h);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,i,a="x"){let s=t.dx(o),n=t.dy(o),l=t.dist(o);if(l>parseFloat(e)+parseFloat(i))return!1;if(l<Math.abs(parseFloat(i)-parseFloat(e)))return!1;if(0===l&&e===i)return!1;let c=(Math.pow(e,2)-Math.pow(i,2)+Math.pow(l,2))/(2*l),p=Math.sqrt(Math.pow(e,2)-Math.pow(c,2)),h=t.x+c*s/l,d=t.y+c*n/l,f=new r(h+p*n/l,d-p*s/l),m=new r(h-p*n/l,d+p*s/l);return"x"===a&&f.x<=m.x||"y"===a&&f.y<=m.y?[f,m]:[m,f]}function S(t,e,o=500){let i,a=1/0,s=1/0;"bottom"===e&&(s=-1/0),"right"===e&&(a=-1/0);for(let n=0;n<o;n++)i=t.get(n/o),("top"===e&&i.y<s||"bottom"===e&&i.y>s||"right"===e&&i.x>a||"left"===e&&i.x<a)&&(a=i.x,s=i.y);return new r(a,s)}function L(t,e,o,i,a){return E(new r(a,-1e4),new r(a,1e4),t,e,o,i)}function P(t,e,o,i,a){return E(new r(-1e4,a),new r(1e4,a),t,e,o,i)}function R(t,e,o,i,a,n,l,c){let p=[],h=new s({x:t.x,y:t.y},{x:e.x,y:e.y},{x:o.x,y:o.y},{x:i.x,y:i.y}),d=new s({x:a.x,y:a.y},{x:n.x,y:n.y},{x:l.x,y:l.y},{x:c.x,y:c.y});for(let s of h.intersects(d,.005)){let t=h.get(s.substr(0,s.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 i of t)e.sitsRoughlyOn(i)&&(o=!0);o||t.push(e)}return 1===t.length?t.shift():t}}function F(t){return t*(Math.PI/180)}function W(t=0,e=0,o=0,i=!1,a=!1,s){const n=[];let r=t||0,l=e||0,c=1,p=1;
1if(i&&(r+=s.topLeft.x,r+=s.bottomRight.x,c=-1),a&&(l+=s.topLeft.y,l+=s.bottomRight.y,p=-1),c+p<2&&n.push(`scale(${c}, ${p})`),o){const t={x:s.topLeft.x+s.width/2,y:s.topLeft.y+s.height/2};n.push(`rotate(${o}, ${t.x}, ${t.y})`)}return 0===r&&0===l||n.unshift(`translate(${r}, ${l})`),n}function H(t,e,o){let i=e.snap;if(!Array.isArray(i)&&i.metric&&i.imperial&&(i="imperial"===o?i.imperial:i.metric),"number"==typeof i)return Math.round(t/i)*i;if(Array.isArray(i)&&i.length>1)for(const a of i.sort(((t,e)=>t-e)).map(((t,e)=>{const o=e<i.length-1?(i[Number(e)+1]-t)/2:(t-i[e-1])/2;return{min:t-o,max:t+Number(o),snap:t}})))if(t<=a.max&&t>=a.min)return a.snap;return t}function A(t,e,o,i,a="x"){let s=k(t,e,o,i,a);if(!1===s)return!1;if(1===s.length)return!!z(o,i,s[0])&&s;{let t=s[0],e=s[1];if(!z(o,i,t,5)&&!z(o,i,e,5))return!1;if(z(o,i,t,5)&&z(o,i,e,5))return"x"===a&&t.x<=e.x||"y"===a&&t.y<=e.y?[t,e]:[e,t];if(z(o,i,t,5))return[t];if(z(o,i,e,5))return[e]}}function O(t,e,o,i){const a=T(t,e,o,i);if(!a)return!1;const s=1e-10;return!(a.t<-1e-10||a.t>1+s)&&(!(a.u<-1e-10||a.u>1+s)&&a.p)}function D(t,e,o,i){const a=T(t,e,o,i);if(!a)return!1;return!(a.u<-1e-10||a.u>1+1e-10)&&a.p}function E(t,e,o,i,a,n){let l=[],c=new s({x:o.x,y:o.y},{x:i.x,y:i.y},{x:a.x,y:a.y},{x:n.x,y:n.y}),p={p1:{x:t.x,y:t.y},p2:{x:e.x,y:e.y}};for(let s of c.intersects(p)){let t=c.get(s);l.push(new r(t.x,t.y))}return 0!==l.length&&(1===l.length?l[0]:l)}function I(t,e){const o={};for(const i of t)for(const t in i){const a=i[t];void 0===o[t]&&(o[t]={}),a.t&&(o[t].t=a.t),a.d&&(o[t].d=a.d);for(const i of"spo")if(a[i]){void 0===o[t][i]&&(o[t][i]={});for(const[s,n]of Object.entries(a[i]))et(s,e?.[i])&&(o[t][i][s]=n)}}return o}function N(t={},e){let o={};for(const[i,a]of Object.entries(e))"object"==typeof a?void 0!==a.pct?o[i]=a.pct/100:void 0!==a.mm?o[i]=a.mm:void 0!==a.deg?o[i]=a.deg:void 0!==a.count?o[i]=a.count:void 0!==a.bool?o[i]=a.bool:void 0!==a.dflt&&(o[i]=a.dflt):o[i]=a;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:i,units:a})=>H(i[t]*o,e,a),fromAbs:(e,{measurements:o})=>Math.round(1e4*e/o[t])/1e4}}function G(t,e,o,i=1e6){if(t.sitsOn(o))return!0;if(e.sitsOn(o))return!0;let a=o.dx(t)*e.dy(t)-o.dy(t)*e.dx(t);return 0===Math.abs(Math.round(a*i)/i)}function Y(t,e,o,i,a){return!1!==U(t,e,o,i,a)}function U(t,e,o,i,a){if(t.sitsOn(a))return 0;if(i.sitsOn(a))return 1;let n=new s({x:t.x,y:t.y},{x:e.x,y:e.y},{x:o.x,y:o.y},{x:i.x,y:i.y}),r=n.intersects({p1:{x:a.x-1,y:a.y},p2:{x:a.x+1,y:a.y}});return 0===r.length&&(r=n.intersects({p1:{x:a.x,y:a.y-1},p2:{x:a.x,y:a.y+1}})),r.length>0&&r.shift()}function z(t,e,o,i=1e6){if(!G(t,e,o,i))return!1;let a=t.dist(e),s=t.dist(o)+o.dist(e);return 0===Math.round(Math.abs(a-s)*i)}function J(t){return t/Math.PI*180}function $(t){return Math.round(100*t)/100}function X(t,e,o,i,a){let[s,n]=(new l).move(t).curve(e,o,i).split(a);return[{start:s.ops[0].to,cp1:s.ops[1].cp1,cp2:s.ops[1].cp2,end:s.ops[1].to},{start:n.ops[0].to,cp1:n.ops[1].cp1,cp2:n.ops[1].cp2,end:n.ops[1].to}]}function Q(t){return 1/(1+parseFloat(t))}function K(t,e="metric"){return"imperial"===e?$(t/25.4)+"&quot;":$(t/10)+"cm"}function V(t,e,o){return Object.defineProperty(t,e,{enumerable:!1,configurable:!1,writable:!0,value:o}),t}function q(t,e,o,i){if("number"==typeof t)return t;if("string"==typeof t){i.warn(`Called \`${o}(${e})\` but \`${e}\` is not a number. Will attempt to cast to Number`);try{return t=Number(t)}catch{i.error(`Called \`${o}(${e})\` but \`${e}\` is not a number nor can it be cast to one`)}}else i.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],i=e[2].split(/,\s*/).map(parseFloat);return{parts:e,name:o,values:i}}function it(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,i=o[1],a=o[2];void 0!==i&&(e=it("translate",e,[i,a]));const s=Math.cos(t),n=Math.sin(t);e=[e[0]*s+e[2]*n,e[1]*s+e[3]*n,e[0]*-n+e[2]*s,e[1]*-n+e[3]*s,e[4],e[5]],void 0!==i&&(e=it("translate",e,[-i,-a]));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 at(t=[]){if(t.length<1)return"";let e=[1,0,0,1,0,0];for(let o=0;o<t.length;o++){const{name:i,values:a}=ot(t[o]);e=it(i,e,a)}return"matrix("+e.join(", ")+")"}function st(t,e){const{name:o,values:i}=ot(t);let a=[1,0,0,1,0,0];a=it(o,a,i);const s=e.x*a[0]+e.y*a[2]+a[4],n=e.x*a[1]+e.y*a[3]+a[5];return e.x=s,e.y=n,e}function nt(t,e=!1){if(!t.topLeft)return{};
1let o=t.topLeft,i=t.bottomRight,a=new r(i.x,o.y),s=new r(o.x,i.y);if(e){const t=at(e);o=st(t,o.copy()),i=st(t,i.copy()),a=st(t,a.copy()),s=st(t,s.copy())}return{topLeft:new r(Math.min(o.x,i.x,s.x,a.x),Math.min(o.y,i.y,s.y,a.y)),bottomRight:new r(Math.max(o.x,i.x,s.x,a.x),Math.max(o.y,i.y,s.y,a.y))}}function rt(t,e,o){const i=o.x-e.x,a=o.y-e.y,s=i*i+a*a;if(0===s)return e.copy();const n=((t.x-e.x)*i+(t.y-e.y)*a)/s,l=Math.max(0,Math.min(1,n));return new r(e.x+l*i,e.y+l*a)}function lt(t,e,o,i,a){const n=new s({x:e.x,y:e.y},{x:o.x,y:o.y},{x:i.x,y:i.y},{x:a.x,y:a.y}).project({x:t.x,y:t.y});return new r(n.x,n.y)}function ct(t,e,o=!1){return this.def=t,this.anchor=e,this.attributes=new n,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),ht=o(40876),dt=o(5157);const ft=["set","setIfUnset","push","unset","get","extend"];function mt(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 i={};for(const a of t)i[a]=`__macro_${o}_${e}_${a}`;return i},this.storeMacroIds=function(t,e,o=!1,i=!1){o||(o=this.get("activeMacro")),i||(i=this.get("activePart")),this.set(["parts",i,"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 i=this.getMacroIds(t,e,o.name);if(i){if(i.points)for(const t of Object.values(i.points))delete o.points[t];if(i.paths)for(const t of Object.values(i.paths))delete o.paths[t]}return this.getMacroIds(t,e)},this.pack=ut;for(const[o,i]of t)-1!==ft.indexOf(o)?this.log.warn(`You cannot overwrite \`store.${o}()\``):pt(this,o,i);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}mt.prototype.extend=function(t){for(const[e,o]of t)-1!==ft.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},mt.prototype.get=function(t,e,o=""){t=gt(o,t);const i=dt(this,t,e);return void 0===i&&this.log.warn(`Store.get(key) on key \`${t}\`, which is undefined`),i},mt.prototype.push=function(t,...e){const o=dt(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)},mt.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},mt.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===dt(this,t)?pt(this,t,e):this},mt.prototype.unset=function(t,e=""){return ht(this,gt(e,t)),this};const bt=()=>({parts:[],data:{}});function kt(){return{preInit:[],postInit:[],preDraft:[],preSetDraft:[],prePartDraft:[],postPartDraft:[],postSetDraft:[],postDraft:[],preSample:[],postSample:[],preRender:[],preLayout:[],postLayout:[],postRender:[],insertText:[]}}var wt=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 kt,this.macros={},this.__storeMethods=new Set,t.designConfig.noCorePlugins||this.use(wt.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 i of this.hooks[t])if(i.method===e)return this;return this.hooks[t].push({method:e,data:o}),this},vt.prototype.use=function(t,e,o=[{}]){const i=Ct(t);return this.plugins?.[i]?(this.store.log.info(`Plugin \`${i}\` 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 i of t.hooks[o])this.on(o,i,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 i=0;for(const a of o)t.condition(a)&&i++;return i>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 Tt={HIDE_ALL:{self:!0,from:!0,after:!0,inherited:!0},HIDE_TREE:{from:!0,inherited:!0}};function yt(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=[],V(this,"__mutated",{optionDistance:{},partDistance:{},hideDistance:{}}),V(this,"__hiding",{from:{},after:{},inherited:{},always:{},never:{}})}yt.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)},yt.prototype.addPart=function(t){return this.isPartValid(t)&&this.__addPart([t]),this},yt.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(", ")}`)},yt.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}},yt.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)}},yt.prototype.__addPartConfig=function(t){return this.__addPartOptions(t).__addPartMeasurements(t,!1).__addPartMeasurements(t,!0).__addPartPlugins(t)},yt.prototype.__addPartOptions=function(t){if(!t.options)return this;const e=this.__mutated.partDistance?.[t.name];for(const o in t.options){const i=t.options[o],a=this.__mutated.optionDistance[o];(!a||a>e)&&(this.options[o]=Object.freeze(i),this.__mutated.optionDistance[o]=e,this.store.log.debug(a?`\ud83d\udfe3  __${o}__ option overwritten by \`${t.name}\``:`\ud83d\udd35  __${o}__ option loaded from part \`${t.name}\``))}return this},yt.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 i=this.optionalMeasurements.indexOf(o),a=-1!==i;e&&!a&&this.optionalMeasurements.push(o),e||(this.measurements.push(o),a&&this.optionalMeasurements.splice(i,1)),this.store.log.debug(`\ud83d\udfe0  __${o}__ measurement is ${e?"optional":"required"} in \`${t.name}\``)})),this},yt.prototype.__addPartPlugins=function(t){if(!t.plugins)return this;const e=this.plugins;let o=t.plugins;Array.isArray(o)||(o=[o]);for(let i of o){const o=Ct(i);if(this.store.log.debug(i.plugin?`\ud83d\udd0c  Resolved __${o}__ conditional plugin in \`${t.name}\``:`\ud83d\udd0c  Resolved __${o}__ plugin in \`${t.name}\``),Array.isArray(i)){i={...i[0],data:i[1]}}e[o]?i.plugin&&i.condition?e[o]?.condition?(e[o+"_"]=i,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]=i,this.store.log.info(`Plugin \`${o}\` was explicitly added. Changing from conditional.`)):(e[o]=i,this.store.log.info(i.condition?`New plugin conditionally added: \`${o}\``:`New plugin added: \`${o}\``))}return this};const xt=["from","after"],Bt=["never","always"];function St(){return V(this,"freeId",0),V(this,"topLeft",!1),V(this,"bottomRight",!1),V(this,"width",!1),V(this,"height",!1),V(this,"utils",i),V(this,"layout",{move:{x:0,y:0}}),V(this,"Point",r),V(this,"Path",l),V(this,"Snippet",ct),V(this,"hooks",new kt),this.hidden=!1,this.attributes=new n,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){V(this,"openGroups",[]),V(this,"freeId",0),V(this,"prefix",'<?xml version="1.0" encoding="UTF-8" standalone="no"?>'),this.pattern=t,this.attributes=new n,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",Et),this.layout={},this.style="",this.defs=new Rt}function Wt(t=null){return V(this,"freeId",0),V(this,"layout",{move:{x:0,y:0}}),this.attributes=new n,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}yt.prototype.__resolvePartHiding=function(t){let e=t.hide;if("string"==typeof e&&(e=Tt[e]),!e)return;const o=this.__mutated.partDistance?.[t.name],i=this.__hiding.never[t.name]||1/0,a=this.__hiding.always[t.name]||1/0;e.self&&(i>o||a<=i)&&(this.partHide[t.name]=!0),Bt.forEach(((t,i)=>{e[t]&&e[t].forEach((e=>{if((this.__hiding[Bt[Math.abs(i-1)]][e]||1/0)>o){const a=this.__hiding[t][e]||1/0;this.__hiding[t][e]=Math.min(a,o),this.partHide[e]=1==i}}))})),xt.concat("inherited").forEach((o=>{void 0===this.__hiding[o][t.name]&&(this.__hiding[o][t.name]=e[o])}))},yt.prototype.__resolvePartDependencies=function(t){const e=t[0];this.resolvedDependencies[e.name]=this.resolvedDependencies[e.name]||[],xt.forEach((o=>{if(e[o]){const a=[].concat(e[o]);for(var i=a.length-1;i>=0;i--){const s=a[i];this.__addDependency("directDependencies",e.name,s.name),t.forEach((t=>this.__addDependency("resolvedDependencies",t.name,s.name))),this.__handlePartDependencyOfType(e,s.name,o),this.parts[s.name]?this.__resolvePartDependencies([s,...t]):this.__addPart([s,...t])}}})),this.__resolveMutatedPartDistance(e.name)},yt.prototype.__addDependency=function(t,e,o){this[t][e]=this[t][e]||[];const i=this[t][e].indexOf(o);-1!==i&&this[t][e].splice(i,1),this[t][e].push(o)},yt.prototype.__handlePartDependencyOfType=function(t,e,o){!0===this.__hiding[o][t.name]&&void 0===this.partHide[e]&&(this.partHide[e]=!0);const i=this.__hiding.inherited[t.name];"from"===o&&(this.inject[t.name]=e,this.__hiding.after[e]=i),this.__hiding.from[e]=i,this.__hiding.inherited[e]=i},yt.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 i in this.paths)t[i]=this.paths[i].asRenderProps();const e={};for(const i in this.points)e[i]=this.points[i].asRenderProps();const o={};for(const i in this.snippets)o[i]=this.snippets[i].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,a=!!this.context.settings?.paperless,n=this.context.settings?.sa||0,c={complete:e,context:this.context,expand:o,getId:this.__getIdClosure(),log:this.context.store.log,paperless:a,part:this,sa:n,scale:this.context.settings?.scale,store:this.context.store.extend([["pget",function(e,o,i){const a=t.context.settings.options.storePrefix?t.context.settings.options.storePrefix:t.context.store.activePart+".";t.context.store.get(o,i,a);return t.context.store.get(o,i,a)}],["pset",function(e,o,i){const a=t.context.settings.options.storePrefix?t.context.settings.options.storePrefix:t.context.store.activePart+".";return t.context.store.set(o,i,a)}]]),units:this.__unitsClosure(),utils:i,Bezier:s,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,i)=>{i instanceof r!=1&&e.warn(`\`points.${o}\` was set with a value that is not a \`Point\` object`),null!=i.x&&Z(i.x)||e.warn(`\`points.${o}\` was set with a \`x\` parameter that is not a \`number\``),null!=i.y&&Z(i.y)||e.warn(`\`points.${o}\` was set with a \`y\` parameter that is not a \`number\``);try{i.name=o}catch(a){e.warn(`Could not set \`name\` property on \`points.${o}\``)}return t[o]=i}}}(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,i)=>{i instanceof l!=1&&e.warn(`\`paths.${o}\` was set with a value that is not a \`Path\` object`);try{i.name=o}catch(a){e.warn(`Could not set \`name\` property on \`paths.${o}\``)}return t[o]=i}}}(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,i)=>{i instanceof ct!=1&&e.warn(`\`snippets.${o}\` was set with a value that is not a \`Snippet\` object`),"string"!=typeof i.def&&e.warn(`\`snippets.${o}\` was set with a \`def\` parameter that is not a \`string\``),i.anchor instanceof r!=1&&e.warn(`\`snippets.${o}\` was set with an \`anchor\` parameter that is not a \`Point\``);try{i.name=o}catch(a){e.warn(`Could not set \`name\` property on \`snippets.${o}\``)}return t[o]=i}}}(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,i)=>t.context.settings.measurements[o]=i}),c.options=new Proxy(this.context.settings.options,{get:function(e,o,i){const a=t.context.store.activePart.replace(".","_")+"_"+o;return void 0===e[a]?(void 0===e[o]&&t.context.store.log.warn(`Tried to access \`options.${o}\` but it is \`undefined\``),Reflect.get(...arguments)):e[a]},set:(e,o,i)=>t.context.settings.options[o]=i}),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,i)=>t.context.settings.absoluteOptions[o]=i}),c.macro=this.__macroClosure(c),c},St.prototype.unhide=function(){return this.hidden=!1,this},St.prototype.units=function(t){return K(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 i in this.paths)try{let o=this.paths[i].__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.${i}\``),!1}for(let i in this.points){let o=this.points[i],a=o.attributes.get("data-circle");a&&(a=parseFloat(a),o.x-a<t.x&&(t.x=o.x-a),o.y-a<t.y&&(t.y=o.y-a),o.x+a>e.x&&(e.x=o.x+a),o.y+a>
1e.y&&(e.y=o.y+a))}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 i in t.paths[o].ops){let a=t.paths[o].ops[i];if("close"!==a.type){let t=e(a.to);t&&(this.paths[o].ops[i].to=this.points[t])}if("curve"===a.type){let t=e(a.cp1);t&&(this.paths[o].ops[i].cp1=this.points[t]);let s=e(a.cp2);s&&(this.paths[o].ops[i].cp2=this.points[s])}}}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,i){const a=tt(o.toLowerCase());let s;if("function"==typeof e[a]){"context"in e&&(s=e.context.store.get("activeMacro",!1),e.context.store.set("activeMacro",o.toLowerCase()));const n=e[a](i,t);return"context"in e&&(s?e.context.store.set("activeMacro",s):e.context.store.unset("activeMacro")),n}"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}\`)`),K(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 i=o.draft(this.pattern.parts[e][t].shorthand());return void 0===i?this.activeStore.log.error(`Result of drafting part \`${t}\` was undefined. Did you forget to return the part?`):(this.pattern.__wants(t,e)||i.hide(),this.pattern.__runHooks("postPartDraft"),this.pattern.parts[e][t]=i),i}catch(i){this.activeStore.log.error([`Unable to draft part \`${t}\` (set \`${e}\`)`,i])}}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(i){this.activeStore.log.error([`Could not inject part \`${o}\` into part \`${t}\``,i])}}},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 i in this.pattern.plugins.macros)o[tt(i)]=this.pattern.plugins.macros[i];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 i=o.toAbs(this.pattern.settings[t].options[e],this.pattern.settings[t],N(this.pattern.settings[t],this.pattern.config.options));this.pattern.settings[t].absoluteOptions[e]=i,this.pattern.setStores[t].log.debug(`\ud83e\uddee Absolute value of \`${e}\` option is \`${i}\` for set __${t}__`)}}return this},Lt.prototype.__snappedPercentageOption=function(t,e){const o=this.pattern.config.options[t];return H(o.toAbs(this.pattern.settings[e].options[t],this.pattern.settings[e],N(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(),i=[];let a=1;void 0!==e.bool&&(e={list:[!1,!0]});for(const s of e.list){const e={...o,options:{...o.options},idPrefix:`sample-${a}`,partClasses:`sample-${a}`};e.options[t]=s,i.push(e),a++}return i},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 i=[],a=this.__setBase();for(let s=1;s<11;s++){const n={...a,measurements:{...a.measurements},idPrefix:`sample-${s}`,partClasses:`sample-${s}`};n.measurements[t]=e,i.push(n),e+=o}return i},Pt.prototype.__modelSets=function(t,e=!1){const o=[],i=this.__setBase();let a=1;e&&(o.push({...i,measurements:t[e],idPrefix:`sample-${a}`,partClasses:`sample-${a} sample-focus`}),a++,delete t[e]);for(const s of Object.values(t))o.push({...i,measurements:s,idPrefix:`sample-${a}`,partClasses:`sample-${a}`});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 i,a,s=1,n=10,r=n-1;if(void 0===o.min||void 0===o.max){o={min:.9*o,max:1.1*o}}if(void 0!==o.pct&&(s=100),a=o.min/s,void 0!==o.count||void 0!==o.mm){const t=o.max-o.min+1;t<10&&(n=t,r=Math.max(n-1,1))}i=(o.max/s-a)/r;const l=this.__setBase(),c=void 0!==o.count||void 0!==o.mm;for(let p=1;p<=n;p++){const o={...l,options:{...l.options},idPrefix:`sample-${p}`,partClasses:`sample-${p}`};o.options[t]=c?Math.ceil(a):a,e.push(o),a+=i}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",$(this.pattern.width)+"mm"),this.attributes.add("height",$(this.pattern.height)+"mm")),this.attributes.add("viewBox",`0 0 ${$(this.pattern.width)} ${$(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="${$(t.x)}" cy="${$(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-"),i="",a=t.attributes.get("data-text-class");a&&a.indexOf("center")>-1?i=' startOffset="50%" ':a&&a.indexOf("right")>-1&&(i=' startOffset="100%" ');let s=this.__nl()+"<text>";return this.__indent(),s+=`<textPath xlink:href="#${t.attributes.get("id")}" ${i}><tspan ${o}>${this.__escapeText(this.text)}</tspan></textPath>`,this.__outdent(),s+=this.__nl()+"</text>",s},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 i in t.paths){let e=t.paths[i];e.hidden||(o+=this.__renderPath(e))}for(let i in t.points)t.points[i].attributes.get("data-text")&&(o+=this.__renderText(t.points[i])),t.points[i].attributes.get("data-circle")&&(o+=this.__renderCircle(t.points[i]));for(let i in t.snippets){let e=t.snippets[i];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=$(t.anchor.x),o=$(t.anchor.y),i=t.attributes.get("data-scale")||1;i*=this.pattern.settings.scale||1,i&&(t.attributes.add("transform",`translate(${e}, ${o})`),t.attributes.add("transform",`scale(${i})`),t.attributes.add("transform",`translate(${-1*e}, ${-1*o})`));let a=t.attributes.get("data-rotate");a&&t.attributes.add("transform",`rotate(${a}, ${e}, ${o})`);let s=this.__nl();return s+=`<use x="${e}" y="${o}" `,s+=`xlink:href="#${t.def}" ${t.attributes.render()}>`,s+="</use>",s},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",$(t.x)),t.attributes.set("data-text-y",$(t.y));let o=t.attributes.get("data-text-lineheight")||6*(this.pattern.settings.scale||1);t.attributes.remove("data-text-lineheight");let i=`${this.__nl()}<text ${t.attributes.renderIfPrefixIs("data-text-")}>`;if(this.__indent(),-1!==this.text.indexOf("\n")){let e=this.text.split("\n");i+=`<tspan>${e.shift()}</tspan>`;for(let a of e)i+=`<tspan x="${$(t.x)}" dy="${o}">${a}</tspan>`}else i+=`<tspan>${this.__escapeText(this.text)}</tspan>`;
1return this.__outdent(),i+=this.__nl()+"</text>",i},Ft.prototype.__runHooks=function(t,e=!1){!1===e&&(e=this);let o=this.hooks[t];if(o.length>0)for(let i of o)i.method(e,i.data)},Ft.prototype.__tab=function(){let t="";for(let e=0;e<this.tabs;e++)t+="  ";return t},Wt.prototype.addPart=function(t){return t&&this.parts.add(t),this},Wt.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()))}},Wt.prototype.getPartList=function(){return[...this.parts]},Wt.prototype.getPartNames=function(){return[...this.parts].map((t=>t.name))},Wt.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:i,bottomRight:a}=nt(o,e.attributes.getAsArray("transform"));i&&(this.topLeft.x=Math.min(this.topLeft.x,i.x),this.topLeft.y=Math.min(this.topLeft.y,i.y),this.bottomRight.x=Math.max(this.bottomRight.x,a.x),this.bottomRight.y=Math.max(this.bottomRight.y,a.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},Wt.prototype.getAnchor=function(){let t=!0,e=!0;const o=this.getPartList();for(const i of o)void 0===i.points.anchor&&(t=!1),void 0===i.points.gridAnchor&&(e=!1);return t?o[0].points.anchor:e?o[0].points.gridAnchor:new r(0,0)},Wt.prototype.attr=function(t,e,o=!1){return o?this.attributes.set(t,e):this.attributes.add(t,e),this},Wt.prototype.generateTransform=function(t){const{move:e,rotate:o,flipX:i,flipY:a}=t,s=W(e?.x,e?.y,o,i,a,this);return this.attributes.remove("transform"),s.forEach((t=>this.attr("transform",t))),this};function Ht(t){this.pattern=t,this.autoLayout=t.autoLayout}Ht.prototype.render=function(){return this.__startRender(),this.pattern.svg=this.svg,this.svg.render()},Ht.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},Ht.prototype.__startRender=function(){return this.svg=new Ft(this.pattern),this.svg.hooks=this.pattern.plugins.hooks,this.__pack(),this},Ht.prototype.__stack=function(){this.stacks={};const t=this.pattern.settings;for(const e in t)for(const[o,i]of Object.entries(this.pattern.parts[e])){const a=t[e].stackPrefix+("function"==typeof i.stack?i.stack(t[e],o):i.stack);void 0===this.stacks[a]&&(this.stacks[a]=this.__createStackWithContext(a,e)),this.stacks[a].addPart(i)}this.pattern.stacks=this.stacks},Ht.prototype.__pack=function(){this.pattern.__runHooks("preLayout");const{settings:t,setStores:e,activeSet:o}=this.pattern;for(const s in t)if(e[s].logs.error.length>0)return e[s].log.warn("One or more errors occured. Not packing pattern parts"),this;this.__stack();let i=[];for(const[s,n]of Object.entries(this.stacks))n.attributes.remove("transform"),this.pattern.__isStackHidden(s)||(n.home(),!0===t[o].layout&&i.push({id:s,width:n.width,height:n.height}));if(!0===t[o].layout){const t=i.length>0?this.pattern.store.pack(i,this):{width:0,height:0};this.autoLayout.width=t.width,this.autoLayout.height=t.height;for(let e of i){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 a="object"==typeof t[o].layout?t[o].layout:this.autoLayout;this.width=a.width,this.height=a.height;for(let s of Object.keys(a.stacks))if(this.stacks[s]){let t=a.stacks[s];this.stacks[s].generateTransform(t)}return this.pattern.width=this.width,this.pattern.height=this.height,this.pattern.autoLayout=this.autoLayout,this.pattern.__runHooks("postLayout"),this},Ht.prototype.__createStackWithContext=function(t){const e=new Wt;return e.name=t,e.context={config:this.pattern.config,settings:this.pattern.settings,setStores:this.pattern.setStores},e};var At=o(68290);function Ot(t={}){return this.designConfig=At(t),this.config={},this.store=new mt,this.setStores=[],V(this,"width",0),V(this,"height",0),V(this,"autoLayout",{stacks:{}}),V(this,"is",""),V(this,"Point",r),V(this,"Path",l),V(this,"Snippet",ct),V(this,"Attributes",n),V(this,"__initialized",!1),V(this,"config.parts",{}),V(this,"config.resolvedDependencies",{}),V(this,"plugins",new vt(this)),V(this,"__configResolver",new yt(this)),this}function Dt(t){t={...bt(),...t};const e=function(...e){return Ot.call(this,t),this.__applySettings(e)};return(e.prototype=Object.create(Ot.prototype)).constructor=e,e.de
1signConfig=t,e.patternConfig=(new e).getConfig(),e}Ot.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},Ot.prototype.getConfig=function(){return this.__init().config},Ot.prototype.on=function(t,e,o){return this.plugins.on(t,e,o),this},Ot.prototype.use=function(t,e){return this.plugins.use(t,e,this.settings),this},Ot.prototype.draft=function(){return this.__init(),new Lt(this).draft(),this},Ot.prototype.draftPartForSet=function(t,e){return this.__init(),new Lt(this).draftPartForSet(t,e)},Ot.prototype.render=function(){return new Ht(this).render()},Ot.prototype.getRenderProps=function(){return new Ht(this).getRenderProps()},Ot.prototype.getLogs=function(){return{pattern:this.store.logs,sets:this.setStores.map((t=>t.logs))}},Ot.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()},Ot.prototype.sampleMeasurement=function(t){return new Pt(this).sampleMeasurement(t)},Ot.prototype.sampleModels=function(t,e=!1){return new Pt(this).sampleModels(t,e)},Ot.prototype.sampleOption=function(t){return new Pt(this).sampleOption(t)},Ot.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},Ot.prototype.__extendPatternStore=function(){return this.store.extend([...this.plugins.__storeMethods]),this.store},Ot.prototype.__createSetStore=function(){const t=new mt;return t.set("data",this.store.data),t.extend([...this.plugins.__storeMethods]),t},Ot.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:${Et}\``),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},Ot.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},Ot.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)}},Ot.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},Ot.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},Ot.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 i of o){if(i===t)return!0;
1if(-1!==this.config.resolvedDependencies[i]?.indexOf(t))return!0}return!1},Ot.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 Et="4.6.0"},56821:(t,e,o)=>{o.d(e,{Cv:()=>Cu,rJ:()=>gu,$$:()=>Pu,_e:()=>uu,wm:()=>Lu,K1:()=>Fu,Ru:()=>Ru,Kk:()=>wu,WA:()=>ku,J6:()=>bu,_A:()=>Bu,Wp:()=>Su});var i={};o.r(i),o.d(i,{articulatedKnee:()=>Yi,articulatedKneeAngle:()=>Ji,articulatedKneeDartSize:()=>zi,articulatedKneeSize:()=>Ui,backPocketCargo:()=>Zi,backPocketCargoWidth:()=>ta,backPocketInside:()=>qi,backPocketType:()=>Vi,bandBelowKnee:()=>Ci,curvedDartBottomControlOffset:()=>ki,curvedDartControlAngle:()=>gi,curvedDartTopControlOffset:()=>bi,curvedDarts:()=>ui,dartPosition:()=>wi,flyWidth:()=>Hi,frontPocketCargo:()=>ia,frontPocketCargoWidth:()=>aa,frontPocketInside:()=>oa,frontPocketType:()=>ea,fullness:()=>Ai,gussetDepth:()=>Xi,gussetExtraSpace:()=>$i,gussetWidthBack:()=>Ki,gussetWidthFront:()=>Qi,hemLength:()=>Gi,hemType:()=>ji,hipsShift:()=>Oi,legLength:()=>Mi,legLengthCustom:()=>_i,pctAtoT:()=>Wi,pctKtoH:()=>Fi,pctKtoRout:()=>Pi,pctKtoRup:()=>Ri,pctRtoKdown:()=>Li,pctRtoKin:()=>Si,pctRtoZin:()=>xi,pctRtoZup:()=>Bi,pctZtoR:()=>yi,ventLength:()=>vi,waistBandWidth:()=>Ii,waistReduction:()=>Ni,waistbandBelowWaist:()=>Ti,waistbandLower:()=>Ei,waistbandType:()=>Di});var a={};o.r(a),o.d(a,{armholeDartCurvePoint:()=>Ga,armholeDartCurveWidth:()=>Ya,armholeDartCurved:()=>ja,armholeDartPosition:()=>_a,backHemSlope:()=>Oa,bustDartAngle:()=>Fa,bustDartCurve:()=>Pa,bustDartLength:()=>Ra,bustDartMinimumFabric:()=>Wa,bustSpanEase:()=>Aa,dartPosition:()=>Ea,shoulderDartCurvature:()=>Na,shoulderDartPosition:()=>Ma,shoulderToShoulderCorrection:()=>La,upperDartLength:()=>Da,waistDartCurve:()=>Ha,waistdartposition:()=>Ia});var s=o(52665);const n={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 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."},"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"}}}'),h=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."}}}'),d=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."}}}'),f={en:{...c,p:{...p.p,...h.p,...d.p},s:{...p.s,...h.s,...d.s},o:{...p.o,...h.o,...d.o}}},m={en:h},u={en:d};function g(t,e,o,i){let a=!1;for(const s of t.store.reads)["title","cutlist"].includes(s)||o.pget(s)||(a=!0);if(a){const a=`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:a,suggest:{text:i[e]?"Clear mocked store values":"Mock store values",icon:"fixme",update:{settings:[["options",e],!i[e]]}}}),o.log.warn(a),!!i[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:i,Snippet:a,units:s,options:n,Point:r,points:l,Path:c,paths:p,log:h,measurements:d,part:f})=>{if(!g(b,"mockRectangle",t,n))return f;l.topLeft=new r(0,0),l.topRight=new r(t.pget("width",100)*n.rectangleWidth,0),l.bottomRight=new r(l.topRight.x,t.pget("height",100)*n.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(n.seamClasses),e&&!n.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 m=t.pget("cutlist",{});Array.isArray(m)||(m=[m]);for(const g of m)t.cutlist.addCut({cut:1,from:"fabric",...g});l.logo=new r(l.topRight.x/2,l.bottomRight.y/2),i.logo=new a("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}),f}};function k(t){return t.pget("sleevecapLength")-t.pget("sleevecapTarget")}function w(t){const e=k(t),o=e/t.pget("sleevecapLength");let i=t.pget("__sleevecapFactor");o>.1&&(i*=.8),i*=o>.02?.9:o<-.1?1.3:o<-.02?1.15:e>0?.99:1.008,t.pset("__sleevecapFactor",i)}function C(t,e){let{store:o,measurements:i,options:a,Point:s,points:n,Path:r,paths:l}=t.shorthand();n.centerBiceps=new s(0,0),a.legacyArmholeDepth?n.centerCap=n.centerBiceps.shift(90,a.sleevecapTopFactorY*(i.biceps*(1+(a.bicepsEase||.15))*a.armholeDepthFactor*o.pget("__sleevecapFactor"))):n.centerCap=n.centerBiceps.shift(90,a.sleevecapTopFactorY*(i.hpsToWaistBack-i.waistToArmpit)*(1+(a.armholeDepth||0))*.75*o.pget("__sleevecapFactor"));let c=i.biceps*(1+(a.bicepsEase||.15))/2;n.bicepsLeft=n.centerBiceps.shift(180,c*a.sleeveWidthGuarantee+c*(1-a.sleeveWidthGuarantee)*o.pget("__sleevecapFactor")),n.bicepsRight=n.bicepsLeft.flipX(n.centerBiceps),n.capLeft=new s(n.bicepsLeft.x,n.centerCap.y),n.capRight=n.capLeft.flipX(),n.centerCap=n.capLeft.shiftFractionTowards(n.capRight,a.sleevecapTopFactorX);let p=n.bicepsRight.x,h=n.centerCap.y;n.backPitch=new s(-1*p*a.sleevecapBackFactorX,h*a.sleevecapBackFactorY),n.frontPitch=new s(p*a.sleevecapFrontFactorX,h*a.sleevecapFrontFactorY),n.capQ1Base=n.frontPitch.shiftFractionTowards(n.bicepsRight,.5),n.capQ2Base=n.frontPitch.shiftFractionTowards(n.centerCap,.5),n.capQ3Base=n.backPitch.shiftFractionTowards(n.centerCap,.5),n.capQ4Base=n.backPitch.shiftFractionTowards(n.bicepsLeft,.5);let d=i.biceps*(1+(a.bicepsEase||.15));if(n.capQ1=n.capQ1Base.shift(n.bicepsRight.angle(n.frontPitch)+90,d*a.sleevecapQ1Offset),n.capQ2=n.capQ2Base.shift(n.centerCap.angle(n.frontPitch)+90,d*a.sleevecapQ2Offset),n.capQ3=n.capQ3Base.shift(n.centerCap.angle(n.backPitch)-90,d*a.sleevecapQ3Offset),n.capQ4=n.capQ4Base.shift(n.bicepsLeft.angle(n.backPitch)-90,d*a.sleevecapQ4Offset),n.capQ1Cp1=n.capQ1.shift(n.frontPitch.angle(n.bicepsRight),d*a.sleevecapQ1Spread1),n.capQ1Cp2=n.capQ1.shift(n.frontPitch.angle(n.bicepsRight),d*a.sleevecapQ1Spread2*-1),n.capQ2Cp1=n.capQ2.shift(n.centerCap.angle(n.frontPitch),d*a.sleevecapQ2Spread1),n.capQ2Cp2=n.capQ2.shift(n.centerCap.angle(n.frontPitch),d*a.sleevecapQ2Spread2*-1),n.capQ3Cp1=n.capQ3.shift(n.backPitch.angle(n.centerCap),d*a.sleevecapQ3Spread1),n.capQ3Cp2=n.capQ3.shift(n.backPitch.angle(n.centerCap),d*a.sleevecapQ3Spread2*-1),n.capQ4Cp1=n.capQ4.shift(n.bicepsLeft.angle(n.backPitch),d*a.sleevecapQ4Spread1),n.capQ4Cp2=n.capQ4.shift(n.bicepsLeft.angle(n.backPitch),d*a.sleevecapQ4Spread2*-1),l.sleevecap=(new r).move(n.bicepsRight).curve(n.bicepsRight,n.capQ1Cp1,n.capQ1).curve(n.capQ1Cp2,n.capQ2Cp1,n.capQ2).curve(n.capQ2Cp2,n.capQ3Cp1,n.capQ3).curve(n.capQ3Cp2,n.capQ4Cp1,n.capQ4).curve(n.capQ4Cp2,n.bicepsLeft,n.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*a.sleevecapEase;o.pset("sleevecapEase",e),o.pset("sleevecapTarget",t+e)}}const v="advanced.sleevecap",T={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:i,Snippet:a,units:s,options:n,Point:r,points:l,Path:c,paths:p,log:h,measurements:d,part:f})=>{if(!g(T,"mockSleeve",t,n))return f;t.pset("__sleevecapFactor",1);let m=0,u=0;do{C(f,m),u=k(t),w(t),m++}while((n.mockSleeve||!0===n.libraryFitSleeve)&&m<50&&Math.abs(k(t))>2);p.sleevecap.attr("class","fabric"),t.pset("sleeveLength",d.shoulderToWrist*(1+n.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,d.wrist*(1+n.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),i.logo=new a("logo",l.logo);const v=t.pget("title",{});return o("title",{at:l.centerBiceps,nr:1,title:"sleeve",...v}),(n.mockSleeve||t.pget("frontArmholeToArmholePitch"))&&(l.frontNotch=p.sleevecap.shiftAlong(t.pget("frontArmholeToArmholePitch",150)),i.frontNotch=new a("notch",l.frontNotch)),(n.mockSleeve||t.pget("backArmholeToArmholePitch"))&&(l.backNotch=p.sleevecap.reverse().shiftAlong(t.pget("backArmholeToArmholePitch",150)),i.backNotch=new a("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}),f},store:{reads:["backArmholeLength","backArmholeToArmholePitch","frontArmholeLength","frontArmholeToArmholePitch","cutlist","t
1itle"],writes:["sleevecapHeight","sleevecapLength","sleeveLength","sleevecapTarget","sleevecapEase"],uses:["__sleevecapFactor"]}};const y={name:"library.twoPartSleeve",hide:{self:!0},measurements:["shoulderToElbow","shoulderToWrist","wrist"],options:{mockTwoPartSleeve:!1,cuffEase:{pct:40,min:2,max:100,...(0,s.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:i,options:a,part:s}){function n(t,e){let{Point:o,Path:i,points:a,store:s,options:n,measurements:r,utils:l}=t.shorthand();a.top=new o(0,0);const c=r.biceps/4*(1+(n.bicepsEase||.15));a.boxTopRight=a.top.shift(0,c*e),a.boxTopLeft=a.boxTopRight.flipX(),a.boxBottom=a.top.shift(-90,r.shoulderToWrist*(1+n.sleeveLengthBonus)),a.boxBottomRight=a.boxBottom.shift(0,a.boxTopRight.x),a.boxBottomLeft=a.boxBottomRight.flipX(),a.armCenter=a.top.shift(-90,r.biceps*(1+(n.bicepsEase||.15))*n.sleevecapHeight*e),a.armRight=a.armCenter.shift(0,a.boxTopRight.x),a.armLeft=a.armRight.flipX(),a.elbowCenter=a.top.shift(-90,r.shoulderToElbow),a.elbowRight=a.elbowCenter.shift(0,a.boxTopRight.x),a.elbowLeft=a.elbowRight.flipX();let p=a.boxTopRight.x;a.backPitchPoint=new o(p,a.armCenter.y/3),a.usTip=a.backPitchPoint.shift(180,p/4),a.tsLeftEdge=a.armLeft.shift(180,p/4),a.usLeftEdge=a.armLeft.shift(0,p/4),a.tsRightEdge=a.armRight.shift(0,p/9),a.usRightEdge=a.armRight.shift(180,p/9),a.frontPitchPoint=new o(a.boxTopLeft.x,.6*a.armCenter.y),a.tsElbowLeft=a.elbowLeft.shift(180,p/9),a.usElbowLeft=a.elbowLeft.shift(0,p/2.4),a.tsWristRight=l.beamsIntersect(a.elbowRight,a.boxBottomRight.rotate(-1*n.sleeveBend,a.elbowRight),a.boxBottomLeft,a.boxBottomRight),a.usWristRight=a.tsWristRight.clone();let h=r.wrist*(1+n.cuffEase),d=h/2+p/5,f=h/2-p/5;a.tsWristLeftHelperBottom=a.tsWristRight.shift(180,d/2),a.usWristLeftHelperBottom=a.usWristRight.shift(180,f/2),a.tsWristLeftHelperTop=a.tsElbowLeft.shiftFractionTowards(a.elbowRight,.5),a.usWristLeftHelperTop=a.usElbowLeft.shiftFractionTowards(a.elbowRight,.5);let m=a.tsWristLeftHelperBottom.angle(a.tsWristLeftHelperTop),u=a.usWristLeftHelperBottom.angle(a.usWristLeftHelperTop);a.tsWristLeft=a.tsWristRight.shift(m-90,-1*d),a.usWristLeft=a.usWristRight.shift(u-90,-1*f),a.tsRightEdgeCpTop=a.tsRightEdge.shift(90,a.backPitchPoint.dy(a.tsRightEdge)/2),a.tsRightEdgeCpBottom=a.tsRightEdgeCpTop.flipY(a.tsRightEdge),a.elbowRightCpTop=a.tsWristRight.shiftFractionTowards(a.elbowRight,1.15),a.topCpRight=a.top.shift(0,p/1.6),a.topCpLeft=a.topCpRight.flipX(),a.tsLeftEdgeCpRight=a.tsLeftEdge.shift(0,a.tsLeftEdge.dist(a.armLeft)/2),a.frontPitchPointCpBottom=a.frontPitchPoint.shiftFractionTowards(a.tsLeftEdgeCpRight,.666),a.frontPitchPointCpTop=a.frontPitchPointCpBottom.rotate(180,a.frontPitchPoint),a.tsElbowLeftCpTop=a.tsWristLeft.shiftFractionTowards(a.tsElbowLeft,1.2),a.usRightEdgeCpBottom=a.usRightEdge.shift(a.usTip.angle(a.elbowRight),a.usTip.dy(a.usRightEdge)/2),a.usRightEdgeCpTop=a.usRightEdgeCpBottom.rotate(180,a.usRightEdge),a._helper1=(new i).move(a.backPitchPoint)._curve(a.topCpRight,a.top).shiftAlong(5),a._helper2=(new i).move(a.backPitchPoint)._curve(a.tsRightEdgeCpTop,a.tsRightEdge).shiftAlong(5),a.usLeftEdgeRight=a.usLeftEdge.shift(0,a.usLeftEdge.dist(a.armCenter)/3),a.usLeftEdgeCpRight=a.usLeftEdge.shift(0,a.usLeftEdge.dist(a.armCenter)/1.2);let g=a._helper1.angle(a.backPitchPoint)-a.backPitchPoint.angle(a._helper2);a.usTipCpBottom=a.usRightEdgeCpTop.rotate(-1*g,a.usTip),a.usElbowLeftCpTop=a.usWristLeft.shiftFractionTowards(a.usElbowLeft,1.2);let b=(new i).move(a.backPitchPoint).curve(a.backPitchPoint,a.topCpRight,a.top).curve(a.topCpLeft,a.frontPitchPointCpTop,a.frontPitchPoint).curve(a.frontPitchPointCpBottom,a.tsLeftEdgeCpRight,a.tsLeftEdge).length(),k=(new i).move(a.usTip).curve(a.usTipCpBottom,a.usLeftEdgeCpRight,a.usLeftEdgeRight).line(a.usLeftEdge).length();s.set("sleevecapLength",b+k)}if(!g(y,"mockTwoPartSleeve",i,a))return s;let r=i.pget("frontArmholeLength",200)+i.pget("backArmholeLength",200),l=r*a.sleevecapEase;i.set("sleevecapEase",l),i.set("sleevecapTarget",r+l);let c=0,p=0,h=1,d=i.pget("sleevecapTarget");do{n(s,h),p++,c=i.pget("sleevecapLength")-d,h*=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(),s},store:{reads:["frontArmholeLength","backArmholeLength","cutlist","t
1itle"],writes:["sleevecapLength","sleevecapTarget"]}};function x(t,e){let{macro:o,points:i,sa:a}=t.shorthand();o("ld",{id:"wAtCuff",from:i[e+"WristLeft"],to:i[e+"WristRight"],d:15}),o("ld",{id:"wAtElbow",from:i[e+"ElbowLeft"],to:i.elbowRight}),o("ld",{id:"wAtArmhole",from:i[e+"LeftEdge"],to:i[e+"RightEdge"]}),o("hd",{id:"wArmholeInnerToElbowInner",from:i[e+"LeftEdge"],to:i[e+"ElbowLeft"],y:i[e+"WristRight"].y+3*a+15}),o("hd",{id:"wArmholeInnerToCuffInner",from:i[e+"LeftEdge"],to:i[e+"WristLeft"],y:i[e+"WristRight"].y+3*a+30}),o("hd",{id:"wCuffHorizontal",from:i[e+"LeftEdge"],to:i[e+"WristRight"],y:i[e+"WristRight"].y+3*a+45}),o("hd",{id:"wCuffInnerToElbow",from:i[e+"LeftEdge"],to:i.elbowRight,y:i[e+"WristRight"].y+3*a+60}),o("vd",{id:"hElbowToArmholeInner",from:i[e+"ElbowLeft"],to:i[e+"LeftEdge"],x:i[e+"LeftEdge"].x-a-15}),o("vd",{id:"hCuffInnerToArmholeInner",from:i[e+"WristLeft"],to:i[e+"LeftEdge"],x:i[e+"LeftEdge"].x-a-30}),o("vd",{id:"hCuffOuterToArmholeInner",from:i[e+"WristRight"],to:i[e+"LeftEdge"],x:i[e+"LeftEdge"].x-a-45})}const B={name:"library.topsleeve",from:y,draft:function({macro:t,Path:e,Point:o,points:i,paths:a,snippets:s,Snippet:n,options:r,sa:l,store:c,part:p}){if(!g(y,"mockTwoPartSleeve",c,r))return p;delete a.us,a.seam=a.ts.clone().unhide().setClass("fabric"),delete a.ts,l&&(a.sa=a.seam.clone(),a.sa.ops.splice(-2),a.sa=a.sa.offset(l).join((new e).move(i.tsWristLeft).line(i.tsWristRight).offset(3*l)).close().addClass("fabric sa"));let h=c.pget("cutlist",{});Array.isArray(h)||(h=[h]);for(const f of h)c.cutlist.addCut({cut:2,from:"fabric",...f});s.logo=new n("logo",i.elbowCenter.shift(90,50));const d=c.pget("title",{});return t("title",{at:i.armCenter,nr:3,title:"topsleeve",...d}),t("grainline",{from:new o(i.top.x,i.tsWristLeft.y),to:i.top}),x(p,"ts"),t("vd",{id:"hSleeveCap",from:i.tsLeftEdge,to:i.top,x:i.tsLeftEdge.x-l-15}),t("hd",{id:"wArmholeInnerToSleevecapTop",from:i.tsLeftEdge,to:i.top,y:i.top.x-l-15}),t("hd",{id:"wArmholeInnerToSleevecapEnd",from:i.tsLeftEdge,to:i.backPitchPoint,y:i.top.x-l-30}),t("hd",{id:"wSleeveHead",from:i.tsLeftEdge,to:i.tsRightEdge,y:i.top.x-l-45}),t("vd",{id:"hArmholeInnerToSleeveCapEnd",from:i.tsRightEdge,to:i.backPitchPoint,x:i.tsRightEdge.x+l+15}),p},options:y.options};const S={name:"library.undersleeve",from:y,draft:function({macro:t,Path:e,Point:o,points:i,paths:a,snippets:s,Snippet:n,options:r,sa:l,store:c,part:p}){if(!g(y,"mockTwoPartSleeve",c,r))return p;delete a.ts,a.seam=a.us.clone().unhide().setClass("fabric"),delete a.us,i.anchor=i.usTip.clone(),l&&(a.sa=a.seam.clone(),a.sa.ops.splice(-2),a.sa=a.sa.offset(l).join((new e).move(i.usWristLeft).line(i.usWristRight).offset(3*l)).close().attr("class","fabric sa"));let h=c.pget("cutlist",{});Array.isArray(h)||(h=[h]);for(const f of h)c.cutlist.addCut({cut:2,from:"fabric",...f});s.logo=new n("logo",i.elbowCenter);const d=c.pget("title",{});return t("title",{at:i.armCenter,nr:4,title:"undersleeve",...d}),t("grainline",{from:new o(i.usLeftEdgeCpRight.x,i.usWristLeft.y),to:i.usLeftEdgeCpRight}),x(p,"us"),t("hd",{id:"wArmholeInnerSleeveCapTip",from:i.usLeftEdge,to:i.usTip,y:i.usTip.y-l-15}),t("vd",{id:"hArmholeInnerSleeveCapTip",from:i.tsRightEdge,to:i.usTip,x:i.tsRightEdge.x+l+15}),p},options:y.options},L=new s.pT({data:l,parts:[b,T,B,S,y]});function P(t,e,o,i,a){0!==i.s3Armhole&&(t.shoulderNotch=new e(a,o.shoulder)),0!==i.s3Collar&&(t.collarNotch=new e(a,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 W(t,e){const{macro:o,points:i,Path:a,sa:s,paths:n}=t.shorthand();o("pd",{id:"lArmhole",path:(new a).move(i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.armholePitchCp1,i.armholePitch).join(n[`${e}Armhole`]),d:s+15}),o("pd",{id:"lShoulderToArmholePitch",path:n[`${e}Armhole`],d:-15}),o("vd",{id:"hHemToArmhole",from:i.hem,to:i.armhole,x:i.hips.x+s+15}),o("vd",{id:"hHemToArmholePitch",from:i.hem,to:i.armholePitch,x:i.hips.x+s+30}),o("vd",{id:"hHemToShoulder",from:i.hem,to:i.s3ArmholeSplit,x:i.hips.x+s+45}),o("vd",{id:"hTotal",from:i.hem,to:i.s3CollarSplit,x:i.hips.x+s+60}),o("ld",{id:"lShoulder",from:i.s3CollarSplit,to:i.s3ArmholeSplit,d:s+15})}const H=JSON.parse('{"id":"plugin-bust","r":"4.6.0"}'),A={name:H.id,version:H.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)}}},O=A,D=A,E={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,s.Wx)("biceps"),menu:"fit"},chestEase:{pct:15,min:-4,max:35,...(0,s.Wx)("chest"),menu:"fit"},collarEase:{pct:5,min:0,max:10,...(0,s.Wx)("neck"),menu:"fit"},cuffEase:{pct:20,min:0,max:200,...(0,s.Wx)("wrist"),menu:"fit"},draftForHighBust:{bool:!1,menu:t=>!!t?.measurements?.highBust&&"fit"},shoulderEase:{pct:0,min:-2,max:6,...(0,s.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:[O],draft:({measurements:t,options:e,store:o,points:i,snippets:a,Point:s,Snippet:n,Path:r,paths:l,utils:c,macro:p,part:h})=>{o.set("shoulderEase",t.shoulderToShoulder*e.shoulderEase/2),i.cbHps=new s(0,0),i.cbNeck=new s(0,e.backNeckCutout*t.neck),i.cbChest=new s(0,t.hpsToBust),i.cbWaist=new s(0,t.hpsToWaistBack),i.cbHips=new s(0,i.cbWaist.y+t.waistToHips),i.neck=new s(t.neck*(1+e.collarEase)/e.collarFactor,0),i.hps=i.neck.clone(),i.shoulder=c.beamsIntersect(i.hps,i.hps.shift(-1*t.shoulderSlope,100),new s(t.shoulderToShoulder/2+o.get("shoulderEase"),-100),new s(t.shoulderToShoulder/2+o.get("shoulderEase"),100)),i.cbShoulder=new s(0,i.shoulder.y),e.legacyArmholeDepth?i.cbArmhole=new s(0,i.shoulder.y+t.biceps*(1+e.bicepsEase)*e.armholeDepthFactor):i.cbArmhole=new s(0,i.cbWaist.y-t.waistToArmpit*(1-e.armholeDepth-e.bicepsEase/2)),i.shoulder.y-=(i.shoulder.y-i.cbHps.y)*e.shoulderSlopeReduction,i.shoulder.y<i.cbHps.y&&(i.shoulder=new s(i.shoulder.x,0)),i.cbHem=new s(0,i.cbHips.y*(1+e.lengthBonus)),i.armhole=new s(t.chest*(1+e.chestEase)/4,i.cbArmhole.y),i.shoulder.x>=i.armhole.x&&o.flag.warn({msg:"brian:largeShoulderWidth"}),i.waist=new s(i.armhole.x,i.cbWaist.y),i.hips=new s(i.armhole.x,i.cbHips.y),i.hem=new s(i.armhole.x,i.cbHem.y),i.armholePitch=new s(t.shoulderToShoulder*e.acrossBackFactor/2+o.get("shoulderEase")/2,i.shoulder.y+i.shoulder.dy(i.armhole)/2),i.backArmholePitch=i.armholePitch.clone(),i.frontArmholePitch=i.armholePitch.clone(),i._tmp1=new s(i.armholePitch.x,i.armhole.y),i._tmp2=i._tmp1.shift(45,10),i._tmp3=c.beamsIntersect(i._tmp1,i._tmp2,i.armhole,i.armholePitch),i.armholeHollow=i._tmp1.shiftFractionTowards(i._tmp3,.5),i.armholeCp2=i.armhole.shift(180,i._tmp1.dx(i.armhole)/4),i.armholeHollowCp1=i.armholeHollow.shift(-45,i.armholeHollow.dy(i.armhole)/2),i.armholeHollowCp2=i.armholeHollow.shift(135,i.armholePitch.dx(i.armholeHollow)),i.armholePitchCp1=i.armholePitch.shift(-90,i.armholePitch.dy(i.armholeHollow)/2),i.backArmholePitchCp1=i.armholePitchCp1.clone(),i.frontArmholePitchCp1=i.armholePitchCp1.clone(),i.armholePitchCp2=i.armholePitch.shift(90,i.shoulder.dy(i.armholePitch)/2),i.backArmholePitchCp2=i.armholePitchCp2.clone(),i.frontArmholePitchCp2=i.armholePitchCp2.clone(),i.shoulderCp1=i.shoulder.shiftTowards(i.neck,i.shoulder.dy(i.armholePitch)/5).rotate(90,i.shoulder),i._tmp4=i.neck.shiftTowards(i.shoulder,10).rotate(-90,i.neck),i.neckCp2=c.beamIntersectsY(i.neck,i._tmp4,i.cbNeck.y),i.cfNeck=i.neck.rotate(-90,new s(0,0));let d=t.neck*(1+e.collarEase),f=0,m=0;do{m++,i.cfNeck=i.cfNeck.shift(90,f/3),i.frontNeckCpEdge=c.beamsIntersect(i.neck,i.neckCp2,i.cfNeck,new s(20,i.cfNeck.y)),i.cfNeckCp1=i.cfNeck.shiftFractionTowards(i.frontNeckCpEdge,.55),i.neckCp2Front=i.neck.shiftFractionTowards(i.frontNeckCpEdge,.65),l.neckOpening=(new r).move(i.cfNeck).curve(i.cfNeckCp1,i.neckCp2Front,i.neck).curve(i.neckCp2,i.cbNeck,i.cbNeck).attr("class","dashed stroke-xl various"),f=2*l.neckOpening.length()-d}while(Math.abs(f)>1&&e.brianFitCollar&&m<10);delete l.neckOpening,i.gridAnchor=i.cbHem;let u=t.chest*e.frontArmholeDeeper;for(const g of["","Cp1","Cp2"])i[`frontArmholePitch${g}`]=i[`armholePitch${g}`].shift(180,u);return p("mirror",{mirror:[i.hps,i.shoulder],points:["neckCp2Front","cfNeckCp1","cfNeck","cbNeck","neckCp2","frontArmholePitch","frontArmholePitchCp2","shoulderCp1"],clone:!0}),o.set("s3CollarMaxFront",i.hps.dy(i.cfNeck)/2),o.set("s3CollarMaxBack",i.hps.dy(i.cbNeck)/2),o.set("s3ArmholeMax",i.shoulder.dy(i.frontArmholePitch)/4),i.title=new s(i.armholePitch.x/2,
1i.armholePitch.y),p("title",{nr:0,title:"base",at:i.title}),i.logo=i.title.shift(-90,100),a.logo=new n("logo",i.logo),h}},I={from:E,options:E.options,name:"brian.back",draft:({store:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,complete:l,macro:c,options:p,utils:h,part:d})=>{i.anchor=i.hps.clone(),p.s3Collar<.1&&p.s3Collar>-.1?(i.s3CollarSplit=i.hps,s.backCollar=(new a).move(i.hps).curve_(i.neckCp2,i.cbNeck).hide()):p.s3Collar>0?(i.s3CollarSplit=h.curveIntersectsY(i.hps,i.mirroredNeckCp2Front,i.mirroredCfNeckCp1,i.mirroredCfNeck,-1*t.get("s3CollarMaxFront")*p.s3Collar),s.backCollar=(new a).move(i.hps)._curve(i.mirroredNeckCp2Front,i.mirroredCfNeckCp1,i.mirroredCfNeck).split(i.s3CollarSplit)[0].reverse().join((new a).move(i.hps).curve_(i.neckCp2,i.cbNeck)).hide()):p.s3Collar<0&&(i.s3CollarSplit=h.curveIntersectsY(i.hps,i.neckCp2,i.cbNeck,i.cbNeck,-1*t.get("s3CollarMaxBack")*p.s3Collar),s.backCollar=(new a).move(i.cbNeck)._curve(i.neckCp2,i.neck).split(i.s3CollarSplit)[0].reverse().hide()),p.s3Armhole<.1&&p.s3Armhole>-.1?(i.s3ArmholeSplit=i.shoulder,s.backArmhole=(new a).move(i.armholePitch).curve(i.armholePitchCp2,i.shoulderCp1,i.shoulder).hide()):p.s3Armhole>0?(i.s3ArmholeSplit=h.curveIntersectsY(i.shoulder,i.mirroredShoulderCp1,i.mirroredFrontArmholePitchCp2,i.mirroredFrontArmholePitch,-1*t.get("s3ArmholeMax")*p.s3Armhole+i.shoulder.y),s.backArmhole=(new a).move(i.armholePitch).curve(i.armholePitchCp2,i.shoulderCp1,i.shoulder).join((new a).move(i.shoulder).curve(i.mirroredShoulderCp1,i.mirroredFrontArmholePitchCp2,i.mirroredFrontArmholePitch).split(i.s3ArmholeSplit)[0]).hide()):p.s3Armhole<0&&(i.s3ArmholeSplit=h.curveIntersectsY(i.shoulder,i.shoulderCp1,i.armholePitchCp2,i.armholePitch,-1*t.get("s3ArmholeMax")*p.s3Armhole+i.shoulder.y),s.backArmhole=(new a).move(i.armholePitch).curve(i.armholePitchCp2,i.shoulderCp1,i.shoulder).split(i.s3ArmholeSplit)[0].hide()),s.saBase=(new a).move(i.cbHem).line(i.hem).line(i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.armholePitchCp1,i.armholePitch).join(s.backArmhole).line(i.s3CollarSplit).join(s.backCollar).hide(),s.seam=(new a).move(i.cbNeck).line(i.cbHips).join(s.saBase).attr("class","fabric");for(const f of["sleeve","twoPartSleeve","topsleeve","undersleeve"])t.set(`library.${f}.backArmholeLength`,R(i,a)),t.set(`library.${f}.backArmholeToArmholePitch`,F(i,a));return t.set("library.sleeve.title",{nr:3}),e&&(s.sa=s.saBase.offset(e).attr("class","fabric sa").line(i.cbNeck).move(i.cbHips),s.sa.line(s.sa.start())),c("cutonfold",{from:i.cbNeck,to:i.cbHips,grainline:!0}),t.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),c("title",{at:i.title,nr:2,title:"back"}),r.armholePitchNotch=new n("bnotch",i.armholePitch),i.chest=new o(i.armhole.x,i.cbChest.y),l&&(s.chest=(new a).move(i.cbChest).line(i.chest).attr("class","contrast help"),c("banner",{id:"chestLine",classes:"center contrast help",path:s.chest,text:"brian:chestLine"})),l&&(s.waist=(new a).move(i.cbWaist).line(i.waist).attr("class","contrast help"),c("banner",{id:"waistLine",classes:"center contrast help",path:s.waist,text:"brian:waistLine"})),P(r,n,i,p,"bnotch"),W(d,"back"),c("hd",{id:"wHem",from:i.cbHips,to:i.hips,y:i.hem.y+e+15}),c("vd",{id:"hHemToWaist",from:i.cbHem,to:i.cbWaist,x:i.cbHips.x-15}),c("vd",{id:"hHemToNeckOpeningBottom",from:i.cbHem,to:i.cbNeck,x:i.cbHips.x-30}),c("hd",{id:"wCFrontToHps",from:i.cbNeck,to:i.s3CollarSplit,y:i.s3CollarSplit.y-e-15}),c("hd",{id:"lShoulder",from:i.cbNeck,to:i.s3ArmholeSplit,y:i.s3CollarSplit.y-e-30}),d}},N={from:I,options:I.options,name:"brian.front",draft:({store:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,options:l,complete:c,macro:p,utils:h,part:d})=>{i.armholePitchCp1=i.frontArmholePitchCp1,i.armholePitch=i.frontArmholePitch,i.armholePitchCp2=i.frontArmholePitchCp2,l.s3Collar<.1&&l.s3Collar>-.1?(i.s3CollarSplit=i.hps,s.frontCollar=(new a).move(i.hps).curve(i.neckCp2Front,i.cfNeckCp1,i.cfNeck).hide()):l.s3Collar>0?(i.s3CollarSplit=h.curveIntersectsY(i.hps,i.neckCp2Front,i.cfNeckCp1,i.cfNeck,t.get("s3CollarMaxFront")*l.s3Collar),s.frontCollar=(new a).move(i.hps).curve(i.neckCp2Front,i.cfNeckCp1,i.cfNeck).split(i.s3CollarSplit)[1].hide()):l.s3Collar<0&&(i.s3CollarSplit=h.curveIntersectsY(i.mirroredCbNeck,i.mirroredCbNeck,i.mirroredNeckCp2,i.hps,t.get("s3CollarMaxBack")*l.s3Collar),s.frontCollar=(new a).move(i.hps).curve_(i.mirroredNeckCp2,i.mirroredCbNeck).split(i.s3CollarSplit)[0].reverse().join((new a).move(i.hps).curve(i.neckCp2Front,i.cfNeckCp1,i.cfNeck)).hide()),l.s3Armhole<.1&&l.s3Armhole>-.1?(i.s3ArmholeSplit=i.shoulder,s.frontArmhole=(new a).move(i.armholePitch).curve(i.armholePitchCp2,i.shoulderCp1,i.shoulder).hide()):l.s3Armhole>0?(i.s3ArmholeSplit=h.curveIntersectsY(i.shoulder,i.shoulderCp1,i.armholePitchCp2,i.armholePitch,t.get("s3ArmholeMax")*l.s3Armhole+i.shoulder.y),s.frontArmhole=(new a).move(i.armholePitch).curve(i.armholePitchCp2,i.shoulderCp1,i.shoulder).split(i.s3ArmholeSplit)[0].hide()):l.s3Armhole<0&&(i.s3ArmholeSplit=h.curveIntersectsY(i.shoulder,i.mirroredShoulderCp1,i.mirroredFrontArmholePitchCp2,i.mirroredFrontArmholePitch,t.get("s3ArmholeMax")*l.s3Armhole+i.shoulder.y),s.frontArmhole=(new a).move(i.armholePitch).curve(i.armholePitchCp2,i.shoulderCp1,i.shoulder).join((new a).move(i.shoulder).curve(i.mirroredShoulderCp1,i.mirroredFrontArmholePitchCp2,i.mirroredFrontArmholePitch).split(i.s3ArmholeSplit)[0]).hide());for(let f of["Shoulder","Armhole","Waist","Hips","Hem"])i[`cf${f}`]=new o(i[`cb${f}`].x,i[`cb${f}`].y),delete i[`cb${f}`];i.neckCp2=new o(i.neckCp2Front.x,i.neckCp2Front.y),s.saBase=(new a).move(i.cfHem).line(i.hem).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 a).move(i.cfNeck).line(i.cfHem).join(s.saBase).attr("class","fabric"),e&&(s.sa=s.saBase.offset(e).attr("class","fabric sa").line(i.cfNeck).move(i.cfHips),s.sa.line(s.sa.start()));for(const f of["sleeve","twoPartSleeve","topsleeve","undersleeve"])t.set(`library.${f}.frontArmholeLength`,R(i,a)),t.set(`library.${f}.frontArmholeToArmholePitch`,F(i,a));return p("cutonfold",{from:i.cfNeck,to:i.cfHips,grainline:!0}),p("title",{at:i.title,nr:1,title:"front"}
1),r.armholePitchNotch=new n("notch",i.armholePitch),P(r,n,i,l,"notch"),W(d,"front"),p("hd",{id:"wHem",from:i.cfHips,to:i.hips,y:i.hem.y+e+15}),p("vd",{id:"hHemToWaist",from:i.cfHem,to:i.cfWaist,x:i.cfHips.x-e-15}),p("vd",{id:"hHemToNeckOpeningBottom",from:i.cfHem,to:i.cfNeck,x:i.cfHips.x-e-30}),p("hd",{id:"wCFrontToHps",from:i.cfNeck,to:i.s3CollarSplit,y:i.s3CollarSplit.y-e-15}),p("hd",{id:"WCFrontToShoulder",from:i.cfNeck,to:i.s3ArmholeSplit,y:i.s3CollarSplit.y-e-30}),d}},M=new s.pT({data:r,parts:[I,N,T]}),_=(0,s.D4)([m,n]),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 Y(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 U={from:E,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,s.Wx)("chest"),menu:"fit"},draftForHighBust:{bool:!1,menu:"fit"},hipsEase:{pct:8,min:0,max:20,...(0,s.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:i,points:a,Path:s,paths:n,Snippet:r,snippets:l,options:c,measurements:p,macro:h,part:d,complete:f})=>{for(let m of Object.keys(n))n[m].hide();for(let m in a)a[m].x=a[m].x*(1-c.stretchFactor);for(let m of["Neck","Shoulder","Armhole","Hips","Hem"])a[`cf${m}`]=a[`cb${m}`].clone();if(a.cfNeck=a.cfNeck.shift(-90,c.necklineDrop*p.hpsToWaistBack),a.strapCenter=a.neck.shiftFractionTowards(a.shoulder,c.shoulderStrapPlacement),a.strapLeft=a.strapCenter.shiftTowards(a.neck,a.neck.dist(a.shoulder)*c.shoulderStrapWidth),a.strapRight=a.strapLeft.rotate(180,a.strapCenter),a.necklineCorner=t.beamsIntersect(a.strapLeft,a.strapRight.rotate(-90,a.strapLeft),a.cfNeck.shift(0,a.armholePitch.x/4),a.cfNeck),a.strapLeftCp2=a.strapLeft.shiftFractionTowards(a.necklineCorner,c.necklineBend),a.cfNeckCp1=a.cfNeck.shiftFractionTowards(a.necklineCorner,c.necklineBend),e.set("armholeY",a.armhole.y*(1+c.armholeDrop)),a.hips.x=(p.hips+c.hipsEase*p.hips)/4*(1-c.stretchFactor),a.waist.x=a.hips.x,a.hipsCp2=new i(a.hips.x,e.get("armholeY")+(a.hips.y-e.get("armholeY"))/2),a.hem.x=a.hips.x,a.armhole=t.beamIntersectsY(a.armhole,a.hips,a.armhole.y*(1+c.armholeDrop)),a.armholeCorner=t.beamsIntersect(a.armhole,a.armhole.shift(180,10),a.strapRight,a.strapLeft.rotate(90,a.strapRight)),a.armholeCp2=a.armhole.shiftFractionTowards(a.armholeCorner,.5),a.strapRightCp1=a.strapRight.shiftFractionTowards(a.armholeCorner,.5),a.anchor=a.cfNeck.clone(),n.seam=(new s).move(a.cfNeck).line(a.cfHem).line(a.hem).curve_(a.hipsCp2,a.armhole).curve(a.armholeCp2,a.strapRightCp1,a.strapRight).line(a.strapLeft).curve(a.strapLeftCp2,a.cfNeckCp1,a.cfNeck).close().attr("class","fabric"),o){let t=(new s).move(a.strapRight).line(a.strapLeft).offset(o);n.saShoulder=(new s).move(a.strapRight).line(t.start()).join(t).line(a.strapLeft).attr("class","fabric sa"),n.sa=(new s).move(a.cfHem).line(a.cfHem).join((new s).move(a.cfHem).line(a.hem).offset(2.5*o)).join((new s).move(a.hem).curve_(a.waist,a.armhole).offset(o).line(a.armhole)).attr("class","fabric sa")}return e.set("frontArmholeLength",(new s).move(a.armhole).curve(a.armholeCp2,a.strapRightCp1,a.strapRight).length()),e.set("frontNeckOpeningLength",(new s).move(a.strapLeft).curve(a.cfNeckCp1,a.cfNeckCp1,a.cfNeck).length()),a.gridAnchor=a.cfHem,e.cutlist.addCut({cut:1,from:"fabric",onFold:1}),a.title=new i(a.waist.x/2,a.waist.y),h("title",{at:a.title,nr:1,title:"front"}),h("cutonfold",{from:a.cfNeck,to:a.cfHem,grainline:!0}),a.logo=a.title.shift(-90,75),l.logo=new r("logo",a.logo),Y(h,a,o),h("vd",{from:a.cfHem,to:a.cfNeck,x:a.cfHem.x-o-15,id:"hHemToCfNeck"}),a.chest=new i(a.armhole.x,a.cbChest.y),f&&(n.chest=(new s).move(a.cbChest).line(a.chest).attr("class","contrast help"),h("banner",{id:"chestLine",classes:"center contrast help",path:n.chest,text:"aaron:chestLine"})),f&&(n.waist=(new s).move(a.cbWaist).line(a.waist).attr("class","contrast help"),h("banner",{id:"waistLine",classes:"center contrast help",path:n.waist,text:"aaron:waistLine"})),d}},z={from:U,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:i,Path:a,paths:s,options:n,complete:r,expand:l,macro:c,utils:p,units:h,measurements:d,part:f})=>(i.cbNeck.y=d.neck/10,i.strapLeftCp2=p.beamsIntersect(i.strapLeft,i.strapCenter.rotate(90,i.strapLeft),i.cbNeck,i.cbNeck.shift(0,10)),i.armholeCp2=i.armhole.shiftFractionTowards(i.armholeCorner,n.backlineBend),i.strapRightCp1=i.strapRight.shiftFractionTowards(i.armholeCorner,n.backlineBend),i.anchor=i.cbNeck.clone(),s.seam=(new a).move(i.cbNeck).line(i.cbHem).line(i.hem).curve_(i.hipsCp2,i.armhole).curve(i.armholeCp2,i.strapRightCp1,i.strapRight).line(i.strapLeft).line(i.strapLeft).curve(i.strapLeftCp2,i.cbNeck,i.cbNeck).close().attr("class","fabric"),i.gridAnchor=i.cfHem,c("cutonfold",{from:i.cfNeck,to:i.cfHem,grainline:!0}),c("title",{at:i.title,nr:2,title:"back"}),i.scaleboxAnchor=i.scalebox=i.title.shift(90,100),c("scalebox",{at:i.scalebox}),t.set("bindingWidth",(e||10)*n.knitBindingWidth),t.set("armBindingLength",.95*((new a).move(i.armhole).curve(i.armholeCp2,i.strapRightCp1,i.strapRight).length()+t.get("frontArmholeLength"))),t.set("neckBindingLength",2*((new a).move(i.strapLeft).curve(i.strapLeftCp2,i.cbNeck,i.cbNeck).length()+t.get("frontNeckOpeningLength"))*.95),e>10&&t.get("bindingWidth")>61&&t.flag.tip({msg:"aaron:largeSaAdaptKnitBindingWidth",replace:{sa:h(e),width:h(t.get("bindingWidth"))},suggest:{text:"flag:apply",icon:"options",update:{settings:[["options","knitBindingWidth"],60/t.get("bindingWidth")*6]}}}),r&&!l&&(i.bindingAnchor=new o(i.armhole.x/4,i.armhole.y).attr("data-text","aaron:cutTwoStripsToFinishTheArmholes").attr("data-text",":\n").attr("data-text",`2x: ${h(t.get("bindingWidth"))} x ${h(t.get("armBindingLength"))}`).attr("data-text","\n \n").attr("data-text","aaron:cutOneStripToFinishTheNeckOpening").attr("data-text",":\n").attr("data-text",`${h(t.get("bindingWidth"))} x ${h(t.get("neckBindingLength"))}`)),Y(c,i,e),c("vd",{from:i.cbHem,to:i.cbNeck,x:i.cbHem.x-e-15}),f)},J={name:"aaron.armBinding",after:z,draft:({store:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,macro:l,complete:c,expand:p,units:h,part:d})=>{const f=t.get("bindingWidth"),m=t.get("armBindingLength");if(!p)return t.flag.note({msg:"aaron:cutArmBinding",notes:["flag:saUnused","flag:partHiddenByExpand"],replace:{width:h(f),length:h(m)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),t.flag.preset("expand"),d.hide();if(t.flag.preset("expandIsOn"),i.topLeft=new o(0,0),i.bottomLeft=new o(0,m),i.bottomRight=new o(f,m),i.topRight=new o(f,0),s.seam=(new a).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).line(i.topLeft).close().addClass("fabric"),t.cutlist.addCut({cut:2}),i.title=new o(f/2,m/8),l("title",{at:i.title,nr:4,title:"aaron:armBinding",align:"center",scale:.5}),c)for(const u of[1,2,3])s[`fold${u}
1`]=(new a).move(i.topLeft.shiftFractionTowards(i.topRight,.25*u)).line(i.bottomLeft.shiftFractionTowards(i.bottomRight,.25*u)).addClass("note help"),l("banner",{id:`foldHere${u}`,path:s[`fold${u}`],text:"foldHere",classes:"fill-note text-sm center",repeat:30,spaces:60});return i.logo=i.title.shift(-90,75),r.logo=new n("logo",i.logo).scale(.75),l("vd",{from:i.bottomRight,to:i.topRight,x:i.topRight.x+e+15}),l("hd",{from:i.bottomLeft,to:i.bottomRight,y:i.bottomRight.y+e+15}),d}},$={name:"aaron.neckBinding",after:z,draft:({store:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,macro:l,complete:c,expand:p,units:h,part:d})=>{const f=t.get("bindingWidth"),m=t.get("neckBindingLength");if(!p)return t.flag.note({msg:"aaron:cutNeckBinding",notes:["flag:saUnused","flag:partHiddenByExpand"],replace:{width:h(f),length:h(m)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),t.flag.preset("expand"),d.hide();if(t.flag.preset("expandIsOn"),i.topLeft=new o(0,0),i.bottomLeft=new o(0,m),i.bottomRight=new o(f,m),i.topRight=new o(f,0),s.seam=(new a).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).line(i.topLeft).close().addClass("fabric"),t.cutlist.addCut({cut:1}),i.title=new o(f/2,m/8),l("title",{at:i.title,nr:3,title:"aaron:neckBinding",align:"center",scale:.5}),i.logo=i.title.shift(-90,75),r.logo=new n("logo",i.logo).scale(.75),c)for(const u of[1,2,3])s[`fold${u}`]=(new a).move(i.topLeft.shiftFractionTowards(i.topRight,.25*u)).line(i.bottomLeft.shiftFractionTowards(i.bottomRight,.25*u)).addClass("note help"),l("banner",{id:`foldHere${u}`,path:s[`fold${u}`],text:"foldHere",classes:"fill-note text-sm center",repeat:30,spaces:60});return l("vd",{from:i.bottomRight,to:i.topRight,x:i.topRight.x+e+15}),l("hd",{from:i.bottomLeft,to:i.bottomRight,y:i.bottomRight.y+e+15}),d}},X=new s.pT({data:G,parts:[z,U,J,$]}),Q=(0,s.D4)([_,j],{p:{keep:["front","back","armBinding","neckBinding"]},o:{keep:[...Object.keys(z.options),...Object.keys(U.options),"cuffEase","s3Collar","s3Armhole","legacyArmholeDepth","legacyArmholeDepthNo","legacyArmholeDepthYes","armholeDepth","draftForHighBustNo","draftForHighBustYes"]},s:{drop:[]}}),K=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}'),V={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:i,points:a,paths:s,Snippet:n,snippets:r,sa:l,complete:c,macro:p,store:h,part:d})=>{const f=e.chest/4*t.bibWidth,m=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,k=u/4;if(h.set("bibWidth",f),h.set("apronLength",u),h.set("apronWidth",g),h.set("strapWidth",b),h.set("pocketSize",k),a.topLeft=new o(0,0),a.topLeftHem=a.topLeft.shift(270,b),a.bottomLeftHem=a.topLeftHem.shift(270,u),a.waistLeft=a.topLeftHem.shift(270,m),a.bottomLeft=a.bottomLeftHem.shift(270,b),a.topRight=a.topLeft.shift(0,f/2),a.topRightHem=a.topLeftHem.shift(0,f/2),a.bottomRightHem=a.bottomLeftHem.shift(0,g/2),a.bottomRight=a.bottomLeft.shift(0,g/2),a.topRightBack=a.bottomRightHem.shift(90,u-m),a.topRightBackCPfront=a.topRightBack.shift(180,(g-f)/2/1.5),a.topRightCPdown=a.topRightHem.shift(270,e.hpsToWaistBack*t.bibLength/4),a.topCOF=a.topLeft.shift(270,u/5),a.bottomCOF=a.bottomLeft.shift(90,u/5),a.pocketLeftTop=a.waistLeft.shift(270,b),a.pocketRightTop=a.pocketLeftTop.shift(0,k),a.pocketLeftBottom=a.pocketLeftTop.shift(270,k),a.pocketRightBottom=a.pocketLeftBottom.shift(0,k),a.crossBox1TopLeft=new o(a.topRightHem.x-b,a.topRightHem.y-b),a.crossBox1BottomRight=new o(a.crossBox1TopLeft.x+b,a.crossBox1TopLeft.y+b),a.crossBox2TopLeft=a.topRightBack.copy().shift(180,b),a.crossBox2BottomRight=new o(a.crossBox2TopLeft.x+b,a.crossBox2TopLeft.y+b),s.seam=(new i).move(a.bottomRight).line(a.topRightBack).curve(a.topRightBackCPfront,a.topRightCPdown,a.topRightHem).line(a.topRight).line(a.topLeft).line(a.bottomLeft).line(a.bottomRight).close().addClass("class","fabric"),c&&(s.pocket=(new i).move(a.pocketLeftBottom).line(a.pocketLeftTop).line(a.pocketRightTop).line(a.pocketRightBottom).line(a.pocketLeftBottom).addClass("fabric help"),p("banner",{id:"pocket",path:s.pocket,text:"pocket",classes:"fill-note center"})),l){const t=(new i).move(a.bottomLeft.shift(-90,b-l)).line(a.bottomRight.shift(-90,b-l).shift(0,b-l)).line(a.topRightBack.shift(0,b-l)).curve(a.topRightBackCPfront,a.topRightCPdown,a.topRightHem).line(a.topRight.shift(90,b-l)).line(a.topLeft.shift(90,b-l));s.sa=t.clone().offset(2*l).addClass("fabric sa"),s.sa=(new i).move(a.bottomLeft).line(s.sa.start()).join(s.sa).line(a.topLeft).attr("class","fabric sa"),c&&(s.hemHint=t.clone().offset(l).addClass("note help"),p("banner",{id:"narrowHem",path:s.hemHint,text:"albert:narrowHem",repeat:60,spaces:60,classes:"fill-note center"})),p("hd",{from:a.bottomRight,to:a.bottomRight.shift(0,b),y:a.bottomLeft.y+l+(l?b:0)+15,id:"wBottomHem"}),p("vd",{from:a.topLeft,to:a.topLeft.shift(90,b),x:a.topLeftHem.x-15,id:"foldoverTop"}),p("vd",{from:a.bottomLeft.shift(270,b),to:a.bottomLeft,x:a.topLeftHem.x-15,id:"hLeftToFoldover"})}return h.cutlist.addCut({cut:1,from:"fabric"}),p("cutonfold",{to:a.bottomCOF,from:a.topCOF,reverse:!0}),a.logo=a.topRightBack.shiftFractionTowards(a.pocketRightBottom,.5),r.logo=new n("logo",a.logo),a.title=a.logo.shift(-90,100),p("title",{nr:1,at:a.title,title:"front"}),a.scaleboxAnchor=a.pocketLeftBottom.shiftFractionTowards(a.bottomRight,.5),p("scalebox",{at:a.scaleboxAnchor}),p("crossbox",{topLeft:a.crossBox1TopLeft,bottomRight:a.crossBox1BottomRight,id:"crossbox1"}),p("crossbox",{topLeft:a.crossBox2TopLeft,bottomRight:a.crossBox2BottomRight,id:"crossbox2",text:"albert:attachStrap"}),p("hd",{from:a.bottomLeft,to:a.bottomRight,y:a.bottomLeft.y+l+(l?b:0)+15,id:"wBottom"}),p("hd",{from:a.topLeft,to:a.topRight,y:a.topLeft.y-l-(l?b:0)-15,id:"wTop"}),p("vd",{from:a.bottomLeft,to:a.topLeft,x:a.topLeft.x-15,id:"hLeft"}),p("vd",{from:a.bottomRight,to:a.topRightBack,x:a.topRightBack.x+l+(l?b:0)+15,id:"hRightBottom"}),p("vd",{from:a.topRightBack,to:a.topRight,x:a.topRightBack.x+l+(l?b:0)+15,id:"hRightTop"}),d}},q={name:"albert.pocket",after:V,draft:({Point:t,Path:e,points:o,paths:i,Snippet:a,snippets:s,sa:n,macro:r,expand:l,units:c,store:p,part:h,complete:d})=>{const f=p.get("pocketSize");if(!l){const t=n?2*n:0;return p.flag.note({msg:"albert:cutPocket",notes:[n?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{width:c(2*f+t),length:c(f+t+p.get("strapWidth"))},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),p.flag.preset("expand"),h.hide()}return o.topLeft=new t(0,0),o.topRight=new t(f,0),o.bottomLeft=o.topLeft.shift(270,f),o.bottomRight=o.topRight.shift(270,f),i.seam=(new e).move(o.bottomLeft).line(o.bottomRight).line(o.topRight).line(o.topLeft).line(o.bottomLeft).close().attr("class","fabric"),n&&(i.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(n).attr("class","fabric sa"),i.sa=(new e).move(o.bottomLeft).line(i.sa.start()).join(i.sa).line(o.topLeft).attr("class","fabric sa"),d&&(i.SAhemHint=(new e).move(o.topRight.shift(90,p.get("strapWidth")).shift(0,n)).line(o.topLeft.shift(90,p.get("strapWidth"))).addClass("note help"),r("banner",{id:"SAfoldHere",path:i.SAhemHint.reverse(),text:"albert:foldHere",repeat:60,spaces:30,classes:"fill-note center"}),i.hemHint=(new e).move(o.topRight.shift(0,n)).line(o.topLeft).setHidden(!0),r("banner",{id:"foldHere",path:i.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),s.logo=new a("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+n+15,id:"width"}),r("vd",{from:o.bottomLeft,to:o.topLeft,x:o.topLeft.x-15,id:"height"}),h}},Z={name:"albert.strap",after:V,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:i,points:a,paths:s,Snippet:n,snippets:r,sa:l,macro:c,store:p,complete:h,units:d,expand:f,part:m})=>{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,k=p.get("strapWidth"),w=Math.sqrt(g*g+b*b)+e.chest*t.chestDepth;if(!f){const t=l?2*l:0;return p.flag.note({msg:"albert:cutStrap",notes:[l?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{width:d(2*k+t),length:d(w+2*k+t)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),p.flag.preset("expand"),m.hide()}return a.topLeft=new o(0,0),a.topLeftHem=a.topLeft.shift(270,k),a.topMiddle=new o(k,0),a.topMiddleHem=new o(k,k),a.topRight=new o(2*k,0),a.bottomLeftHem=new o(0,w+k),a.bottomLeft=new o(0,w+2*k),a.bottomMiddleHem=new o(k,w+k),a.bottomMiddle=new o(k,w+2*k),a.bottomRight=new o(2*k,w+2*k),s.seam=(new i).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).line(a.topLeft).close().attr("class","fabric"),h&&(s.fold=(new i).move(a.topMiddle).line(a.bottomMiddle).addClass("note help").addText("albert:foldHere","fill-note center"),c("banner",{id:"foldHere",path:s.fold,text:"albert:foldHere"})),l&&(s.sa=s.seam.offset(l).attr("class","fabric sa")),p.cutlist.addCut({cut:2,from:"fabric"}),a.logo=a.topLeft.shiftFractionTowards(a.bottomRight,.5),r.logo=new n("logo",a.logo),a.title=a.logo.shift(-90,70),c("title",{nr:2,at:a.title,title:"strap",align:"center"}),c("crossbox",{topLeft:a.topLeft,bottomRight:a.topMiddleHem,id:"crossbox1"}),c("crossbox",{topLeft:a.bottomLeftHem,bottomRight:a.bottomMiddle,id:"crossbox2"}),c("hd",{from:a.bottomLeft,to:a.bottomRight,y:a.bottomLeft.y+l+15,id:"wBottom"}),c("vd",{from:a.bottomLeft,to:a.topLeft,x:a.topLeft.x-l-30,id:"hLeft"}),c("vd",{from:a.topMiddleHem,to:a.topMiddle,x:a.topLeft.x-l-15,id:"crossboxTop"}),c("vd",{from:a.bottomMiddleHem,to:a.topMiddleHem,x:a.topLeft.x-l-15,id:"betweenCrossboxes"}),c("vd",{from:a.bottomMiddle,to:a.bottomMiddleHem,x:a.topLeft.x-l-15,id:"crossboxBottom"}),m}},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 s.pT({data:K,parts:[V,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}'),it=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}'),at={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,s.Wx)("bustSpan"),menu:"fit"},chestEase:{pct:11,min:5,max:20,...(0,s.Wx)("chest"),menu:"fit"},fullChestEaseReduction:{pct:4,min:0,max:8,menu:"fit"},shoulderToShoulderEase:{pct:-.5,min:-1,max:5,...(0,s.Wx)("shoulderToShoulder"),menu:"fit"},waistEase:{pct:5,min:1,max:20,...(0,s.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:i,Path:a,paths:s,options:n,macro:r,utils:l,measurements:c,log:p,part:h})=>{i.cbNeck=new o(0,c.neck*n.backNeckCutout),i.hps=new o(c.neck*n.neckWidthBack,0),i.cbNeckCp1=new o(.8*i.hps.x,i.cbNeck.y);let d=c.shoulderSlope*n.shoulderSlopeBack*-1;i.shoulder=l.beamsIntersect(new o(c.shoulderToShoulder*(1+n.shoulderToShoulderEase)/2,0),new o(c.shoulderToShoulder*(1+n.shoulderToShoulderEase)/2,100),i.hps,i.hps.shift(d,85)),i.armholePitch=new o(i.shoulder.x*n.acrossBackFactor,c.hpsToWaistBack*n.backArmholePitchDepth),i.dartTip=new o(c.underbust*n.backDartLocation,c.hpsToWaistBack*n.backDartHeight);let f=c.underbust/4*(1+n.chestEase),m=c.waistBack/2*(1+n.waistEase),u=f-m;
1i.cbWaist=new o(0,c.hpsToWaistBack),i.waistCenter=i.cbWaist.shift(0,u*n.backCenterWaistReduction),i.waistSide=i.waistCenter.shift(n.backHemSlope,m+u*(1-n.backCenterWaistReduction/2)),i.dartBottomCenter=l.beamIntersectsX(i.waistCenter,i.waistSide,i.dartTip.x);let g=u*(1-.5*n.backCenterWaistReduction);g<=0&&(g=0,p.info("`"+h.name+"`: Back dart omitted (because the calculated dart width was 0.0 mm/inches or less).")),i.dartBottomLeft=i.dartBottomCenter.shift(180,g/2),i.dartBottomRight=i.dartBottomLeft.rotate(180,i.dartBottomCenter),i.dartLeftCp=i.dartBottomLeft.shift(90,i.dartTip.dy(i.dartBottomLeft)/2),i.dartRightCp=new o(i.dartBottomRight.x,i.dartLeftCp.y);let b=c.hpsToWaistBack*n.armholeDepth+i.shoulder.y;i.cbNeckCp2=new o(0,b);let k=l.curveIntersectsY(i.dartBottomLeft,i.dartLeftCp,i.dartTip,i.dartTip,b),w=0;if(i.cbArmhole=l.curveIntersectsY(i.cbNeck,i.cbNeckCp2,i.waistCenter,i.waistCenter,b),k&&(i.dartLeftArmhole=k,w=2*i.dartLeftArmhole.dx(i.dartTip)+i.cbArmhole.x),i.armhole=new o(c.underbust/4*(1+n.chestEase)+w,b),i.waistSideCp2=i.waistSide.shift(90,i.armhole.dy(i.waistSide)/2),i.armholeCp2=i.armhole.shift(180-n.backArmholeSlant,40),i.armholePitchCp1=i.armholePitch.shift(-90-n.backArmholeSlant,40),i.armholeCpTarget=l.beamsIntersect(i.armhole,i.armhole.shift(180-n.backArmholeSlant,40),i.armholePitch,i.armholePitch.shift(-90-n.backArmholeSlant,40)),i.armholeCp2=i.armhole.shiftFractionTowards(i.armholeCpTarget,n.backArmholeCurvature),i.armholePitchCp1=i.armholePitch.shiftFractionTowards(i.armholeCpTarget,n.backArmholeCurvature),i.armholePitchCp2=i.armholePitchCp1.rotate(180,i.armholePitch),i.armholePitchCp2.y<i.shoulder.y&&(i.armholePitchCp2.y=i.shoulder.y+i.shoulder.dy(i.armholePitch)/2),c.hpsToBust<i.waistCenter.y?i.bustCenter=l.curveIntersectsY(i.cbNeck,i.cbNeckCp2,i.waistCenter,i.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"}),i.bustCenter=i.waistCenter.clone()),i.bustCenter.y<i.armhole.y){i.sideArmhole=i.armhole.clone();let t=(new a).move(i.armhole).curve(i.armhole,i.waistSideCp2,i.waistSide).shiftAlong(10);i.sideArmhole=t.shiftOutwards(i.armhole,100),i.bustSide=l.beamIntersectsY(i.armhole,i.sideArmhole,c.hpsToBust)}else c.hpsToBust<i.waistSide.y?i.bustSide=l.curveIntersectsY(i.waistSide,i.waistSideCp2,i.armhole,i.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"}),i.bustSide=i.waistSide.clone());i.bustCenter.y<i.dartTip.y?(i.bustDartLeft=i.bustCenter.clone(),i.bustDartLeft.x=i.dartTip.x):c.hpsToBust<i.dartBottomLeft.y?i.bustDartLeft=l.curveIntersectsY(i.dartBottomLeft,i.dartLeftCp,i.dartTip,i.dartTip,c.hpsToBust):(p.warn("Unable to adjust bottom of dart on back part. Using unadjusted dart instead."),t.flag.warn({msg:"bella:bustDartCompromise"}),i.bustDartLeft=i.dartBottomLeft.clone()),i.bustDartRight=i.bustDartLeft.flipX(i.dartTip),t.set("bustWidthBack",i.bustCenter.dx(i.bustDartLeft)+i.bustDartRight.dx(i.bustSide)),t.set("sideSeamLength",(new a).move(i.waistSide).curve_(i.waistSideCp2,i.armhole).length()),t.set("backHemLength",i.waistCenter.dist(i.dartBottomLeft)+i.dartBottomRight.dist(i.waistSide)),t.set("sideReduction",i.armhole.x-i.waistSide.x),s.seam=(new a).move(i.cbNeck).curve_(i.cbNeckCp2,i.waistCenter).line(i.dartBottomLeft),g>0?s.seam.curve_(i.dartLeftCp,i.dartTip)._curve(i.dartRightCp,i.dartBottomRight):s.seam.line(i.dartBottomRight),s.seam.line(i.waistSide).curve_(i.waistSideCp2,i.armhole).curve(i.armholeCp2,i.armholePitchCp1,i.armholePitch).curve_(i.armholePitchCp2,i.shoulder).line(i.hps)._curve(i.cbNeckCp1,i.cbNeck).close().attr("class","fabric"),s.saBase=(new a).move(i.cbNeck).curve_(i.cbNeckCp2,i.waistCenter).line(i.dartBottomLeft).line(i.dartBottomRight).line(i.waistSide).curve_(i.waistSideCp2,i.armhole).curve(i.armholeCp2,i.armholePitchCp1,i.armholePitch).curve_(i.armholePitchCp2,i.shoulder).line(i.hps)._curve(i.cbNeckCp1,i.cbNeck).close().hide(),r("grainline",{from:new o(i.hps.x/2,i.shoulder.y),to:new o(i.hps.x/2,i.waistSide.y)}),e&&(s.sa=s.saBase.offset(e).attr("class","fabric sa")),t.cutlist.addCut({cut:2,from:"fabric",onFold:!0}),i.titleAnchor=new o(i.hps.x,i.armholePitchCp2.y),r("title",{nr:2,title:"back",at:i.titleAnchor}),r("sprinkle",{snippet:"bnotch",on:["armholePitch","bustCenter"]}),r("vd",{id:"hHemToWaistDartTop",from:i.waistCenter,to:i.dartTip,x:i.cbNeck.x-e-15}),r("vd",{id:"hHemToBackNeckCutout",from:i.waistCenter,to:i.cbNeck,x:i.cbNeck.x-e-30}),r("vd",{id:"hTotal",from:i.waistCenter,to:i.hps,x:i.cbNeck.x-e-45}),r("hd",{id:"wCbTopToCnBottom",from:i.cbNeck,to:i.waistCenter,y:i.waistCenter.y+e+15});let C=0;return g>0&&(C=30,r("hd",{id:"wCbToWaistDartLeft",from:i.cbNeck,to:i.dartBottomLeft,y:i.waistCenter.y+e+30}),r("hd",{id:"wCbToWaistDartRight",from:i.cbNeck,to:i.dartBottomRight,y:i.waistCenter.y+e+45}),r("hd",{id:"wWaistDart",from:i.dartBottomLeft,to:i.dartBottomRight,y:i.waistCenter.y+e+15})),r("hd",{id:"wCbToHemEdge",from:i.cbNeck,to:i.waistSide,y:i.waistCenter.y+e+30+C}),r("hd",{id:"wTotal",from:i.cbNeck,to:i.armhole,y:i.waistCenter.y+e+45+C}),r("vd",{id:"hHemRightToArmhole",from:i.waistSide,to:i.armhole,x:i.armhole.x+e+15}),r("vd",{id:"hHemRightToArmholePitch",from:i.waistSide,to:i.armholePitch,x:i.armhole.x+e+30}),r("vd",{id:"hHemRightToArmholeShoulder",from:i.waistSide,to:i.shoulder,x:i.armhole.x+e+45}),r("vd",{id:"hTotal",from:i.waistSide,to:i.hps,x:i.armhole.x+e+60}),r("vd",{id:"hemRiseRight",from:i.waistCenter,to:i.waistSide,x:i.waistSide.x+e+15}),r("hd",{id:"wCbToHps",from:i.cbNeck,to:i.hps,y:i.hps.y-e-15}),r("hd",{id:"wCbToArmholePitch",from:i.cbNeck,to:i.armholePitch,y:i.hps.y-e-30}),r("hd",{id:"wCbToShoulder",from:i.cbNeck,to:i.shoulder,y:i.hps.y-e-45}),r("hd",{id:"wCbToArmhole",from:i.cbNeck,to:i.armhole,y:i.hps.y-e-60}),r("ld",{id:"shoulderLength",from:i.hps,to:i.shoulder,d:10+e}),h}},st={name:"bella.frontSideDart",after:at,draft:({store:t,sa:e,Point:o,points:i,Path:a,paths:s,options:n,complete:r,macro:l,utils:c,measurements:p,log:h,part:d})=>{i.cfNeck=new o(0,p.neck*n.collarFactor),i.hps=new o(p.neck*n.neckWidthFront,0),i.cfNeckCp1=new o(.8*i.hps.x,i.cfNeck.y),i.hpsCp2=new o(i.hps.x,i.cfNeck.y/2);let f=p.shoulderSlope*(2-n.shoulderSlopeBack)*-1,m=p.shoulderToShoulder*(1+n.shoulderToShoulderEase)/2*n.frontShoulderWidth;i.shoulder=c.beamsIntersect(new o(m,0),new o(m,100),i.hps,i.hps.shift(f,85)),i.ex=i.shoulder.shift(180,10),i.armholePitch=new o(i.shoulder.x*n.acrossBackFactor,p.hpsToWaistBack*n.frontArmholePitchDepth);let u=p.hpsToWaistBack*n.armholeDepth+i.shoulder.y;i.armhole=new o(p.highBust/4*(1+n.chestEase)*n.highBustWidth,u),i.bust=new o(.5*p.bustSpan*(1+n.bustSpanEase),p.hpsToBust),i.armholeCp2=i.armhole.shift(180,40),i.armholePitchCp1=i.armholePitch.shift(-90,40),i.armholeCpTarget=c.beamsIntersect(i.armhole,i.armhole.shift(180,40),i.armholePitch,i.armholePitch.shift(-90,40)),i.armholeCp2=i.armhole.shiftFractionTowards(i.armholeCpTarget,n.frontArmholeCurvature),i.armholePitchCp1=i.armholePitch.shiftFractionTowards(i.armholeCpTarget,n.frontArmholeCurvature),i.armholePitchCp2=i.armholePitchCp1.rotate(180,i.armholePitch),i.armholePitchCp2.y<i.shoulder.y&&(i.armholePitchCp2.y=i.shoulder.y+i.shoulder.dy(i.armholePitch)/2),i.cfHem=new o(0,p.hpsToWaistFront),i.sideHem=new o(i.armhole.x,i.cfHem.y);let g=p.chest*(1+n.chestEase-n.fullChestEaseReduction)/2-t.get("bustWidthBack"),b=["armhole","armholeCp2","armholePitchCp1","bustB","sideHem"];i.bustA=i.bust.clone(),i.bustB=i.bust.clone(),i.bustSide=c.beamIntersectsY(i.armhole,i.sideHem,i.bust.y);let k=0,w=0;for(;i.bustSide.x<g&&k<80;){for(const t of b)i[t]=i[t].rotate(.5,i.armholePitch);w+=.5,i.bustSide=c.beamIntersectsY(i.armhole,i.sideHem,i.bust.y),k++}t.set("bustDartAngleSide",w),i.cfBust=new o(0,i.bust.y),i.pitchMax=c.beamsIntersect(i.armholePitchCp1,i.armholePitchCp2,i.armholePitch,i.armholePitch.shift(i.armholePitchCp1.angle(i.armholePitchCp2)-90,30)),i.armholePitch=i.armholePitch.shiftFractionTowards(i.pitchMax,.2),i.armholePitchCp1=i.armholePitch.shiftFractionTowards(i.armholePitchCp2.rotate(180,i.armholePitch),.8);const C=t.get("sideSeamLength"),v=C*n.bustDartMinimumFabric;i.bustDartTop=c.beamsIntersect(i.armhole,i.sideHem,i.bust,i.bust.shift(Number(n.bustDartAngle),
1100)),i.bustDartTop.y<i.armhole.y+v&&(i.bustDartTop=i.armhole.shiftTowards(i.sideHem,v),h.info(d.name+": Restricted bust dart angle to ensure minimum fabric above the bust dart.")),i.armhole.dist(i.bustDartTop)>C-v&&(i.bustDartTop=i.armhole.shiftTowards(i.sideHem,C-v),h.info(d.name+": Restricted bust dart angle to ensure minimum fabric below the bust dart.")),i.bustDartBottom=i.bustDartTop.rotate(-1*w,i.bust),i.bustDartMiddle=i.bustDartTop.shiftFractionTowards(i.bustDartBottom,.5),i.bustDartTip=i.bustDartMiddle.shiftFractionTowards(i.bust,n.bustDartLength),i.bustDartEdge=c.beamsIntersect(i.bust,i.bustDartMiddle,i.armhole,i.bustDartTop),i.bustDartCpTop=i.bust.shiftFractionTowards(i.bustDartTop,.666).rotate(5*n.bustDartCurve,i.bust),i.bustDartCpBottom=i.bust.shiftFractionTowards(i.bustDartBottom,.666).rotate(-5*n.bustDartCurve,i.bust);const T=C-i.armhole.dist(i.bustDartTop);i.sideHemInitial=i.bustDartBottom.shift(-90,T).shift(180,t.get("sideReduction")),i.sideHem=i.bustDartBottom.shiftTowards(i.sideHemInitial,T);let y=p.waist/2*(1+n.waistEase)-t.get("backHemLength"),x=i.cfHem.dist(i.sideHemInitial)-y,B=!0;x<=0&&(B=!1,h.info("`"+d.name+"`: Front waist dart omitted (because the calculated dart width was 0.0 mm/inches or less).")),i.waistDartHem=new o(i.bust.x,i.cfHem.y),i.waistDartLeft=i.waistDartHem.shift(180,x/2),i.waistDartRight=i.waistDartHem.shift(0,x/2),i.waistDartTip=i.waistDartHem.shiftFractionTowards(i.bust,n.waistDartLength),i.waistDartLeftCp=i.waistDartLeft.shift(90,i.waistDartHem.dist(i.bust)/2),i.waistDartRightCp=i.waistDartRight.shift(90,i.waistDartHem.dist(i.bust)/2),i.waistDartLeftMid=(new a).move(i.bust).line(i.waistDartLeft).shiftFractionAlong(.5),i.waistDartRightMid=(new a).move(i.bust).line(i.waistDartRight).shiftFractionAlong(.5);const S=i.waistDartLeftMid.dist(i.waistDartLeftCp)*n.waistDartCurve;i.waistDartLeftCp.x=i.waistDartLeftMid.x-S,i.waistDartRightCp.x=i.waistDartRightMid.x+S,s.seam=(new a).move(i.cfHem),B&&s.seam.line(i.waistDartLeft).curve_(i.waistDartLeftCp,i.waistDartTip)._curve(i.waistDartRightCp,i.waistDartRight).line(i.waistDartRight),s.seam.line(i.sideHem).line(i.bustDartBottom)._curve(i.bustDartCpBottom,i.bustDartTip).curve_(i.bustDartCpTop,i.bustDartTop).line(i.armhole).curve(i.armholeCp2,i.armholePitchCp1,i.armholePitch).curve_(i.armholePitchCp2,i.shoulder).line(i.hps).curve(i.hpsCp2,i.cfNeckCp1,i.cfNeck).line(i.cfHem).close().attr("class","fabric"),s.saBase=(new a).move(i.cfHem),B&&s.saBase.line(i.waistDartLeft).line(i.waistDartRight),s.saBase.line(i.sideHem).line(i.bustDartBottom).line(i.bustDartEdge).line(i.bustDartTop).line(i.armhole).curve(i.armholeCp2,i.armholePitchCp1,i.armholePitch).curve_(i.armholePitchCp2,i.shoulder).line(i.hps).curve(i.hpsCp2,i.cfNeckCp1,i.cfNeck).hide(),r&&(s.dart=(new a).move(i.bustDartTop).line(i.bustDartEdge).line(i.bustDartBottom).attr("class","help")),e&&(s.sa=s.saBase.offset(e).line(i.cfNeck).attr("class","fabric sa"),s.sa=s.sa.move(i.cfHem).line(s.sa.start())),t.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),l("cutonfold",{from:i.cfNeck,to:i.cfHem,grainline:!0,reverse:!0}
1),i.titleAnchor=new o(i.armholePitch.x/2,i.armholePitchCp2.y),l("title",{at:i.titleAnchor,nr:1,title:"front"}),i.scaleboxAnchor=i.titleAnchor.shift(-90,70),l("scalebox",{at:i.scaleboxAnchor}),l("sprinkle",{snippet:"notch",on:["bust","armholePitch","cfBust"]});let L=0;return B&&(L=15,l("vd",{id:"hCfHemToWaistDartTop",from:i.cfHem,to:i.waistDartTip,x:-15})),l("vd",{id:"hCfHemToBustPoint",from:i.cfHem,to:i.bust,x:-15-L}),l("vd",{id:"hCfHemToNeckCutout",from:i.cfHem,to:i.cfNeck,x:-30-L}),l("vd",{id:"hTotal",from:i.cfHem,to:i.hps,x:-45-L}),l("hd",{id:"wCfToWaistDartTip",from:i.cfBust,to:i.bust,y:i.bust.y-15}),l("hd",{id:"wCfToBustDartTip",from:i.cfBust,to:i.bustDartTip,y:i.bust.y-30}),L=0,B&&(L=30,l("hd",{id:"wCfToWaistDartLeft",from:i.cfHem,to:i.waistDartLeft,y:i.cfHem.y+e+15}),l("hd",{id:"wCfToWaistDartRight",from:i.cfHem,to:i.waistDartRight,y:i.cfHem.y+e+30})),l("hd",{id:"wHemTotal",from:i.cfHem,to:i.sideHem,y:i.cfHem.y+e+15+L}),l("hd",{id:"wCfHemToBustDartBottom",from:i.cfHem,to:i.bustDartBottom,y:i.cfHem.y+e+30+L}),l("hd",{id:"wCfHemToBustDartTop",from:i.cfHem,to:i.bustDartTop,y:i.cfHem.y+e+45+L}),l("vd",{id:"hHemRightToBustDartBottom",from:i.sideHem,to:i.bustDartBottom,x:i.bustDartTop.x+e+15}),l("vd",{id:"hHemRightToBustDartTop",from:i.sideHem,to:i.bustDartTop,x:i.bustDartTop.x+e+30}),l("vd",{id:"hHemRightToArmhole",from:i.sideHem,to:i.armhole,x:i.bustDartTop.x+e+45}),l("vd",{id:"hHemRightToArmholePitch",from:i.sideHem,to:i.armholePitch,x:i.bustDartTop.x+e+60}),l("vd",{id:"hHemRightToShoulder",from:i.sideHem,to:i.shoulder,x:i.bustDartTop.x+e+75}),l("hd",{id:"wCbToHps",from:i.cfNeck,to:i.hps,y:i.hps.y-e-15}),l("hd",{id:"wCbToArmholePitch",from:i.cfNeck,to:i.armholePitch,y:i.hps.y-e-30}),l("hd",{id:"wCbToShoulder",from:i.cfNeck,to:i.shoulder,y:i.hps.y-e-45}),l("hd",{id:"wCbToArmhole",from:i.cfNeck,to:i.armhole,y:i.hps.y-e-60}),d}},nt={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 s.pT({data:it,parts:[at,st]}),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,s.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:i,Path:a,paths:s,options:n,units:r,paperless:l,macro:c,measurements:p,expand:h,absoluteOptions:d,part:f})=>{n.reversible&&(n.duoNeckTieColours=!0);const m=n.crossBackTies?Math.sqrt(Math.pow(p.hpsToWaistFront,2)+Math.pow(.5*(p.underbust*n.bandLength-.5*p.underbust),2))*(1+n.neckTieLength):p.hpsToBust*(1+n.neckTieLength),u=n.duoNeckTieColours?d.neckTieWidth:2*d.neckTieWidth;if(t.set("neckTieLength",m),!h&&!n.pointedNeckTieEnds||!n.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(m)}}),f.hide()}return i.topLeft=new o(0,0),i.topRight=new o(u,i.topLeft.y),i.bottomLeft=new o(i.topLeft.x,m),i.bottomRight=new o(i.topRight.x,i.bottomLeft.y),i.topMid=new o(u/2,i.topLeft.y),i.bottomMid=new o(i.topMid.x,i.bottomLeft.y),i.topPeak=n.pointedNeckTieEnds?n.duoNeckTieColours?i.topRight.shift(90,u):i.topMid.shift(90,u/2):i.topMid,s.seam=(new a).move(i.bottomLeft).line(i.bottomRight).line(i.topRight).line(i.topPeak).line(i.topLeft).line(i.bottomLeft).close().addClass("fabric"),e&&(s.sa=s.seam.offset(e).close().addClass("fabric sa")),i.grainlineFrom=i.topLeft.shift(0,d.neckTieWidth/2),i.grainlineTo=new o(i.grainlineFrom.x,i.bottomLeft.y),c("grainline",{from:i.grainlineFrom,to:i.grainlineTo}),t.cutlist.addCut({cut:2,from:"fabric",identical:"true"}),n.duoNeckTieColours&&t.cutlist.addCut({cut:2,from:"contrast",identical:"true"}),i.title=i.topLeft.translate(d.neckTieWidth/8,i.bottomLeft.y/4),c("title",{at:i.title,nr:2,title:"neckTie",scale:.2}),n.duoNeckTieColours||(s.foldline=(new a).move(i.topPeak).line(i.bottomMid).addText("foldLine","center fill-note text-sm").attr("class","note help")),l&&(c("vd",{from:i.topLeft,to:i.bottomLeft,x:i.topLeft.x-e-15,id:"vd0"}),c("hd",{from:i.bottomLeft,to:i.bottomRight,y:i.bottomLeft.y+e+15,id:"hd0"}),n.pointedNeckTieEnds&&(c("vd",{from:i.topPeak,to:i.topLeft,x:i.topLeft.x-e-15,id:"vdP0"}),c("vd",{from:i.topPeak,to:i.bottomLeft,x:i.topLeft.x-e-30,id:"vdP1"}),n.duoNeckTieColours||c("hd",{from:i.topLeft,to:i.topPeak,y:i.topPeak.y-e-15,id:"hdP0"}))),f}},ct={name:"bee.cup",from:st,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:i,Path:a,paths:s,options:n,macro:r,utils:l,measurements:c,snippets:p,Snippet:h,absoluteOptions:d,paperless:f,expand:m,part:u})=>{for(const w in s)delete s[w];for(const w in p)delete p[w];r("rmtitle"),r("rmscalebox"),r("rmcutonfold");const g=c.bustPointToUnderbust*(1+n.bottomCupDepth),b=n.crossBackTies?0:d.bandTieWidth;o.bustDartClosed=o.bustDartTop;const k=["waistDartRightCp","waistDartRight","sideHemInitial"];for(const w of k)o[w]=o[w].rotate(t.get("bustDartAngleSide"),o.bust);return o.sideHem=l.beamsIntersect(o.waistDartRight,o.sideHemInitial,o.armhole,o.bustDartClosed),n.bellaGuide&&(s.bellaGuide=(new a).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*n.topDepth),o.topLeft=o.topMid.shift(o.topMid.angle(o.hps)+90,d.neckTieWidth/2),o.topRight=o.topMid.shift(o.topMid.angle(o.hps)-90,d.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,n.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,n.sideCurve),o.middleFront=o.topLeft.shiftFractionTowards(o.bottomLeft,.5),o.bottomLeftCp1=o.middleFront.shiftFractionTowards(o.bust,n.frontCurve),o.bottomLeftCp2=o.frontEdgeCp2.shiftTowards(o.topMid,b),o.bottomRightCp1=o.sideEdgeCp1.shiftTowards(o.topMid,b),s.seam=(new a).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&&(s.sa=s.seam.offset(e).close().addClass("fabric sa")),n.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),s.bottomCurve=(new a).move(o.bottomLeft).line(o.frontEdge).curve_(o.frontEdgeCp2,o.dartEdge).curve_(o.sideEdgeCp1,o.sideEdge).hide(),t.set("cupWidth",s.bottomCurve.split(o.leftSplit)[0].length()+s.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}),n.reversible?(t.cutlist.setCut({cut:2,from:"fabric"}),t.cutlist.addCut({cut:2,from:"contrast"})):t.cutlist.setCut({cut:4,from:"fabric"}),s.frontCurve=(new a).move(o.topLeft).curve_(o.bottomLeftCp1,o.bottomLeft).hide(),o.frontNotch=s.frontCurve.shiftFractionAlong(.5),r("sprinkle",{snippet:"notch",on:["frontNotch","bottomLeft","bottomRight"]}),n.crossBackTies||(r("sprinkle",{snippet:"notch",on:["frontEdge","sideEdge"]}),s.casingline=(new a).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 i(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 h("logo",o.logo).attr("data-scale",.7),n.ties&&m||(o.neckTieLength=o.topLeft.shiftFractionTowards(o.bottomLeft,.7).addText("Neck Tie Length: "+l.units(t.get("neckTieLength"))),n.crossBackTies||(o.backTieLength=o.topLeft.shiftFractionTowards(o.bottomLeft,.8).addText("Band Tie Length: "+l.units(c.underbust*(1+n.bandTieLength))))),f&&(r("vd",{from:o.bottomLeft,to:s.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:s.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:s.seam.bbox().bottomRight,x:o.sideEdge.x+e+15,id:"vd5"}),r("vd",{from:o.topRight,to:s.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:s.seam.bbox().bottomRight,y:o.dartEdge.y+e+15,id:"hd6"}),r("hd",{from:o.frontEdge,to:s.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"}),n.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,s.Wx)("hpsToWaistFront"),menu:"style"},pointedBandTieEnds:{bool:!1,menu:"style"},duoBandTieColours:{bool:!1,menu:"style"}}
1,draft:({store:t,sa:e,Point:o,points:i,Path:a,paths:s,options:n,macro:r,measurements:l,snippets:c,expand:p,Snippet:h,paperless:d,utils:f,absoluteOptions:m,part:u})=>{n.reversible&&(n.duoBandTieColours=!0);const g=n.crossBackTies?l.underbust*n.bandLength/2+2*n.neckTieWidth:l.underbust*(1+n.bandTieLength)/2,b=n.crossBackTies||!n.duoBandTieColours?2*m.bandTieWidth:m.bandTieWidth;if(!((p||n.pointedBandTieEnds)&&n.ties||n.crossBackTies)){const o=e?2*e:0;return t.flag.note({msg:"bee:cutBandTie",notes:[e?"flag:saIncluded":"flag:saExcluded"],replace:{width:f.units(b+o),length:f.units(2*g)}}),u}return i.topLeft=new o(0,0),i.topRight=new o(b,i.topLeft.y),i.bottomLeft=new o(i.topLeft.x,g),i.bottomRight=new o(i.topRight.x,i.bottomLeft.y),i.topMid=new o(i.topRight.x/2,i.topLeft.y),i.bottomMid=new o(i.topMid.x,i.bottomLeft.y),i.topPeak=n.crossBackTies||!n.pointedBandTieEnds?i.topMid:n.duoBandTieColours?i.topRight.shift(90,b):i.topMid.shift(90,b/2),s.seam=(new a).move(i.bottomRight).line(i.topRight).line(i.topPeak).line(i.topLeft).line(i.bottomLeft).close().addClass("fabric"),e&&(s.sa=s.seam.offset(e).close().addClass("fabric sa")),i.cutOnFoldFrom=i.bottomLeft,i.cutOnFoldTo=i.bottomRight,r("cutonfold",{from:i.cutOnFoldFrom,to:i.cutOnFoldTo,grainline:!0}),t.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),n.duoBandTieColours&&!n.crossBackTies&&t.cutlist.addCut({cut:1,from:"contrast",onFold:!0}),n.crossBackTies&&(i.sideNotchLeft=i.bottomLeft.shift(90,t.get("cupWidth")),i.sideNotchRight=i.sideNotchLeft.flipX(i.topMid),r("sprinkle",{snippet:"notch",on:["bottomRight","sideNotchLeft","sideNotchRight"]})),i.title=i.topLeft.translate(b/8,g/4),r("title",{at:i.title,nr:3,title:n.crossBackTies?"band":"bandTie",scale:.5}),!n.crossBackTies&&n.duoBandTieColours||(s.foldline=(new a).move(i.topPeak).line(i.bottomMid).addText("foldLine","center fill-note text-sm").addClass("note help")),d&&(r("vd",{from:i.topLeft,to:i.bottomLeft,x:i.topLeft.x-e-15,id:"vd0"}),r("hd",{from:i.bottomLeft,to:i.bottomRight,y:i.bottomLeft.y+e+15,id:"hd0"}),n.pointedBandTieEnds&&!n.crossBackTies&&(r("vd",{from:i.topPeak,to:i.topLeft,x:i.topLeft.x-e-15,id:"vdP0"}),r("vd",{from:i.topPeak,to:i.bottomLeft,x:i.topLeft.x-e-30,id:"vdP1"}),n.duoBandTieColours||r("hd",{from:i.topLeft,to:i.topPeak,y:i.topPeak.y-e-15,id:"hdP0"}))),u}},ht={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"}}}')},dt=new s.pT({data:ot,parts:[ct,lt,pt]}),ft=[...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 Wu of["reversible","duoColorTies","pointedTieEnds","crossBackTies","bellaGuide","ties"])ft.push(Wu+"Yes",Wu+"No");const mt=(0,s.D4)([nt,ht],{o:{keep:ft}}),ut=JSON.parse('{"id":"benjamin","name":"Benjamin bow tie","code":"Wouter Van Wageningen","de
1scription":"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,s.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:i,Path:a,paths:s,Snippet:n,snippets:r,utils:l,options:c,measurements:p,macro:h,part:d}){"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 f=t.get("collarBandHeight");t.set("knotWidth",Math.max(f,t.get("knotWidth")));const m=t.get("knotWidth");t.set("tipWidth",Math.max(m,t.get("tipWidth")));const u=t.get("tipWidth"),g=t.get("bandLength"),b=m*c.transitionLength,k=t.get("bowLength");if(i.bandBottomLeft=new o(0,f/2),i.bandTopLeft=i.bandBottomLeft.flipY(),i.bandBottomRight=i.bandBottomLeft.shift(0,g),i.bandTopRight=i.bandBottomRight.flipY(),i.transitionBottomRight=new o(g+b,m/2),i.transitionTopRight=i.transitionBottomRight.flipY(),i.tip1Bottom=new o(g+b+.5*k,u/2),i.tip1Top=i.tip1Bottom.flipY(),i.tip2Bottom=new o(g+b+1.5*k,u/2),i.tip2Top=i.tip2Bottom.flipY(),i.knotBottom=new o(g+b+k,m/2),i.knotTop=i.knotBottom.flipY(),"pointed"===c.endStyle||"rounded"===c.endStyle?i.tip=new o(i.tip2Bottom.x+i.tip2Bottom.y,0):i.tip=new o(i.tip2Bottom.x,0),i.titleAnchor=new o(i.tip1Top.x,0),s.cap=(new a).hide().move(i.tip2Bottom),"straight"===c.endStyle)s.cap=(new a).move(i.tip2Bottom).line(i.tip2Top);else if("pointed"===c.endStyle)s.cap=(new a).move(i.tip2Bottom).line(i.tip).line(i.tip2Top);else{i.roundBottom=new o(i.tip.x,i.tip2Bottom.y),i.roundTop=i.roundBottom.flipY();const t={bottom:h("round",{id:"bottom",from:i.tip2Bottom,to:i.tip,via:i.roundBottom,hide:!1}),top:h("round",{id:"top",from:i.tip,to:i.tip2Top,via:i.roundTop,hide:!1})};for(const e in t)for(const o of["start","cp1","cp2","end"])i[`${e}${l.capitalize(o)}`]=i[t[e].points[o]].copy();s.cap=s[t.top.paths.path].clone().reverse().join(s[t.bottom.paths.path].clone().reverse()).reverse()}if("diamond"===c.bowStyle||"butterfly"===c.bowStyle){const t="diamond"===c.bowStyle?k/10:k/4;i.transitionBottomRightCp2=i.bandBottomRight.shiftOutwards(i.transitionBottomRight,t),i.transitionBottomRightCp2.y>i.tip1Bottom.y&&(i.transitionBottomRightCp2.y=i.tip1Bottom.y),i.transitionTopRightCp1=i.transitionBottomRightCp2.flipY(),i.tip1TopCp2=i.tip1Top.shift(180,t),i.tip1TopCp1=i.tip1Top.shift(0,t),i.tip1BottomCp1=i.tip1Bottom.shift(180,t),i.tip1BottomCp2=i.tip1Bottom.shift(0,t),i.knotTopCp2=i.knotTop.shift(180,t),i.knotTopCp1=i.knotTop.shift(0,t),i.knotBottomCp2=i.knotBottom.shift(0,t),i.knotBottomCp1=i.knotBottom.shift(180,t),i.tip2TopCp2=i.tip2Top.shift(180,t),i.tip2BottomCp1=i.tip2Bottom.shift(180,t),s.bow=(new a).move(i.bandBottomRight).line(i.transitionBottomRight).curve(i.transitionBottomRightCp2,i.tip1BottomCp1,i.tip1Bottom).curve(i.tip1BottomCp2,i.knotBottomCp1,i.knotBottom).curve(i.knotBottomCp2,i.tip2BottomCp1,i.tip2Bottom).join(s.cap).line(i.tip2Top).curve(i.tip2TopCp2,i.knotTopCp1,i.knotTop).curve(i.knotTopCp2,i.tip1TopCp1,i.tip1Top).curve(i.tip1TopCp2,i.transitionTopRightCp1,i.transitionTopRight).line(i.bandTopRight).hide()}else s.bow=(new a).move(i.bandBottomRight).line(i.transitionBottomRight).line(i.tip2Bottom).join(s.cap).line(i.tip2Top).line(i.transitionTopRight).line(i.bandTopRight).hide();i.logoAnchor=i.tip.shift(180,20),r.logo=new n("logo",i.logoAnchor).attr("data-scale",u/120);let w=i.tip2Bottom.y+e+15;return h("hd",{id:"wEdgeToKnot",from:i.knotBottom,to:i.tip2Bottom,y:w}),w+=15,["butterfly","diamond"].includes(c.bowStyle)&&(h("hd",{id:"wEdgeToMidTip",from:i.tip1Bottom,to:i.tip2Bottom,y:w}),w+=15,h("vd",{id:"hMidTip",from:i.tip1Bottom,to:i.tip1Top})),h("hd",{id:"wEdgeToBandTransitionStart",from:i.transitionBottomRight,to:i.tip2Bottom,y:w}),w+=15,h("hd",{id:"wEdgeToBandTransitionEnd",from:i.bandBottomRight,to:i.tip2Bottom,y:w}),w+=15,t.set("baseY",w),h("vd",{id:"hBandTransitionEnd",from:i.bandBottomRight,to:i.bandTopRight}),h("vd",{id:"hBandTransitionStart",from:i.transitionBottomRight,to:i.transitionTopRight}),h("vd",{id:"hEdge",from:i.tip2Bottom,to:i.tip2Top,x:i.tip.x+15+e}),"straight"!==c.endStyle&&h("hd",{id:"wEdgeToStyledTip",from:i.tip2Bottom,to:i.tip,y:i.tip2Bottom.y+15+e}),d}};const bt={name:"benjamin.bow1",from:gt,draft:function({Point:t,points:e,Path:o,paths:i,macro:a,sa:s,store:n,options:r,part:l}){return e.bandBottomLeft=e.bandBottomLeft.shift(0,0),e.bandTopLeft=e.bandBottomLeft.flipY(),e.grainlineStart=new t(0,0),i.seam=(new o).move(e.bandTopLeft).line(e.bandBottomLeft).join(i.bow).line(e.bandTopLeft).close().attr("class","fabric").unhide(),s&&(i.sa=i.seam.offset(s).attr("class","fabric sa").unhide()),a("grainline",{from:e.grainlineStart,to:e.tip.shift(180,20)}),n.cutlist.addCut(r.adjustmentRibbon?[{cut:1,from:"fabric"},{cut:1,from:"interfacing"}]:[{cut:4,from:"fabric"},{cut:4,from:"interfacing"}]),a("title",{at:e.titleAnchor,nr:1,title:r.adjustmentRibbon?"Short Bow":"Bow",scale:n.get("tipWidth")/75}),e.scaleboxAnchor=e.bandTopLeft.shift(30,80),a("scalebox",{at:e.scaleboxAnchor}),a("hd",{id:"wFull",from:e.bandBottomLeft,to:e.tip2Bottom,y:n.get("baseY")}),l}};const kt={name:"benjamin.bow2",from:gt,draft:function({options:t,Point:e,points:o,Path:i,paths:a,macro:s,sa:n,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),s("grainline",{from:o.grainlineStart,to:o.tip.shift(180,20)}),a.seam=(new i).move(o.bandTopLeft).line(o.bandBottomLeft).join(a.bow).line(o.bandTopLeft).close().attr("class","fabric").unhide(),n&&(a.sa=a.seam.offset(n).attr("class","fabric sa").unhide()),r.cutlist.addCut([{cut:2,from:"fabric"},{cut:2,from:"interfacing"}
1]),s("title",{at:o.titleAnchor,nr:2,title:"Medium Bow",scale:r.get("tipWidth")/75}),s("hd",{id:"wFull",from:o.bandBottomLeft,to:o.tip2Bottom,y:r.get("baseY")}),l):l.hide()}};const wt={name:"benjamin.bow3",from:gt,draft:function({options:t,Point:e,points:o,Path:i,paths:a,macro:s,sa:n,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),a.seam=(new i).move(o.bandTopLeft).line(o.bandBottomLeft).join(a.bow).line(o.bandTopLeft).close().attr("class","fabric").unhide(),n&&(a.sa=a.seam.offset(n).attr("class","fabric sa").unhide()),r.cutlist.addCut([{cut:1,from:"fabric"},{cut:1,material:"interfacing"}]),s("grainline",{from:o.grainlineStart,to:o.tip.shift(180,20)}),s("title",{at:o.titleAnchor,nr:3,title:"Long Bow",scale:r.get("tipWidth")/75}),s("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:i,options:a,macro:s,points:n,paths:r,sa:l,expand:c,utils:p,part:h}){if(a.adjustmentRibbon)return h.hide();const d={h:p.units(i.get("collarBandHeight")+2*l),l:p.units(o.neck*(1+a.collarEase)-2*i.get("knotWidth"))};return c?(n.bottomLeft=new t(0,.5*i.get("collarBandHeight")),n.topLeft=n.bottomLeft.flipY(),n.bottomRight=n.bottomLeft.shift(0,o.neck*(1+a.collarEase)-2*i.get("knotWidth")),n.topRight=n.bottomRight.flipY(),n.titleAnchor=n.topLeft.shiftFractionTowards(n.bottomRight,.5),r.seam=(new e).move(n.topLeft).line(n.bottomLeft).line(n.bottomRight).line(n.topRight).line(n.topLeft).close().attr("class","fabric"),l&&(r.sa=r.seam.offset(l).attr("class","fabric sa")),i.cutlist.addCut({cut:2,from:"fabric"}),i.cutlist.addCut({cut:2,from:"interfacing"}),s("title",{at:n.titleAnchor,nr:2,title:"collarBand",scale:.5}),s("hd",{id:"wFull",from:n.bottomLeft,to:n.bottomRight,y:n.bottomLeft.y+15+l}),s("vd",{id:"hFull",from:n.bottomRight,to:n.topRight,x:n.topRight.x+15+l}),h):(n.text=new t(10,10).addText("benjamin:cutCollarBand","fill-note").addText(":").addText(d.h).addText(" x ").addText(d.l),r.diag=(new e).move(new t(0,0)).line(new t(100,15)).addClass("hidden"),i.flag.note({msg:"benjamin:cutCollarBandFlag",notes:[l?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{height:d.h,length:d.l},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),i.flag.preset("expand"),h)}},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"}}}')},Tt=new s.pT({data:ut,parts:[bt,kt,wt,Ct]}),yt=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 s.pT({data:yt,parts:[N,I,B,S]}),St=(0,s.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 adju
1stment (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."},"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 i=e.split(o);return Array.isArray(i[0])&&(i[0]=(new t).move(o)),Array.isArray(i[1])&&(i[1]=(new t).move(o)),i}function Ft(t,e){const{measurements:o,points:i}=t.shorthand();void 0!==o.waistToKnee?i[e+"Knee"]=i[e+"Waist"].translate(0,o.waistToKnee):i[e+"Knee"]=i[e+"Waist"].translate(0,1.5*o.hpsToWaistBack),void 0!==o.waistToFloor?i[e+"Floor"]=i[e+"Waist"].translate(0,o.waistToFloor):i[e+"Floor"]=i[e+"Waist"].translate(0,2.5*o.hpsToWaistBack),i.sideTarget=i[e+"Knee"].translate(i.seatBase.x,0)}function Wt(t){const{measurements:e,options:o,points:i,Point:a}=t.shorthand();i.cfBust=new a(0,e.hpsToBust),e.bustSpan?i.bust=new a(e.bustSpan/2,e.hpsToBust):i.bust=new a(e.chest/8,e.hpsToBust),i.chest=new a(e.chest*(1+o.chestEase)/4,e.hpsToBust),i.cbWaist=new a(0,e.hpsToWaistBack),i.cfWaist=new a(0,Math.max(e.hpsToWaistBack,e.hpsToWaistFront)).shiftFractionTowards(i.cbWaist,1-o.lengthAdjustment);const s=e.waist*(1+o.waistEase)/4,n=i.armhole.x*o.waistAdjustment;i.waist=new a(Math.max(s,n),i.cfWaist.y),i.cfArmhole=new a(0,i.cbWaist.y-e.waistToArmpit*(1-o.armholeDepth-o.bicepsEase/2)),i.armhole=new a(i.armhole.x,i.cfArmhole.y),i.armholeCp2=i.armhole.shift(180,i._tmp1.dx(i.armhole)/4),i.cfUnderbust=ne
1w a(0,i.cfWaist.y-(e.waistToUnderbust??e.hpsToWaistBack/6)),i.underbust=new a(e.chest*(1+o.chestEase)/4,i.cfUnderbust.y),i.cfHips=new a(0,i.cfWaist.y+e.waistToHips),i.hips=new a(e.hips*(1+o.hipsEase)/4,i.cfHips.y);const r=e.seat-e.seatBack,l=(e.seatBack-r)/4;i.cfSeat=new a(0,i.cfWaist.y+e.waistToSeat),i.seatBase=new a(e.seat*(1+o.seatEase)/4,i.cfSeat.y),i.seat=Dt(i.seatBase,i.hips,-l*o.seatBackAdjustment),Ft(t,"cf")}function Ht(t){const{measurements:e,options:o,points:i,Point:a}=t.shorthand();i.chest=new a(e.chest*(1+o.chestEase)/4,e.hpsToBust),i.cbWaist=new a(0,e.hpsToWaistBack);const s=e.waist*(1+o.waistEase)/4,n=i.armhole.x*o.waistAdjustment;i.waist=new a(Math.max(s,n),i.cbWaist.y),i.cbUnderbust=new a(0,i.cbWaist.y-(e.waistToUnderbust??e.hpsToWaistBack/6)),i.underbust=new a(e.chest*(1+o.chestEase)/4,i.cbUnderbust.y),i.cbHips=new a(0,i.cbWaist.y+e.waistToHips),i.hips=new a(e.hips*(1+o.hipsEase)/4,i.cbHips.y),i.cbSeat=new a(0,i.cbWaist.y+e.waistToSeat);const r=e.seat-e.seatBack,l=(e.seatBack-r)/4;i.seatBase=new a(e.seat*(1+o.seatEase)/4,i.cbSeat.y),i.seat=Dt(i.seatBase,i.hips,l*o.seatBackAdjustment),Ft(t,"cb")}function At(t,e){return t-(t*t*(3-2*t)-e)/(-6*(t-1)*t)}function Ot(t){let e=.5;for(let o=0;o<10;o++)e=At(e,t);return e}function Dt(t,e,o){const i=e.dist(t);return t.rotate(o/i*90,e)}function Et(t){const{options:e,points:o,utils:i}=t.shorthand();o.chestBelowArmhole=o.chest.y>o.armhole.y?o.chest:o.armhole,!e.sleeves&&o.armhole.y>o.chest.y&&(o.armhole=i.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 It(t,e,o,i,a){t:for(;;){let s=null,n=null,r=null;for(const e of o)e.x>i.x&&(i=new t(e.x,i.y));for(const t of o){const o=e.dx(t)/e.dx(i),l=e.dy(t)/e.dy(i),c=e.dy(t)/e.dy(i),p=.95;if(o>p&&l>p)continue;const h=Ot(o);let d=1-(c-3*.5*(1-h)*(1-h)*h-h*h*h)/(3*(1-h)*h*h);d=Math.max(a,Math.min(d,1));let f=(c-3*(1-d)*(1-h)*h*h-h*h*h)/(3*(1-h)*(1-h)*h);if(f<0){i=i.translate(5,0);continue t}f=Math.min(.5,f),d=1-(c-3*f*(1-h)*(1-h)*h-h*h*h)/(3*(1-h)*h*h),d=Math.max(a,Math.min(d,1));let m=f-d;d>0&&(null===r||m<r)&&(s=f,n=d,r=m)}return null===s&&(s=.5,n=a),[e.translate(0,s*e.dy(i)),i.translate(0,-n*e.dy(i)),i]}}function Nt(t,e){const{points:o,options:i,paths:a,Path:s,Point:n}=t.shorthand(),r=It(n,o.waist,[o.hips],o.seat,i.curvatureAdjustment),l=(new s).move(o.armhole).line(o.chestBelowArmhole).curve(o.armholeCp1,o.waistCp2,o.waist).curve(r[0],r[1],r[2]);a.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 s).move(o.armhole).line(o.chestBelowArmhole).join(function(t,e,o,i,a,s,n){return e.waistCp1=i??o.translate(0,.2*o.dy(s)),e.hemCp2=a??s.translate(0,o.dy(s)*-n),(new t).move(o).curve(e.waistCp1,e.hemCp2,s)}(s,o,o.chestBelowArmhole,o.armholeCp1,null,o.hem,i.curvatureAdjustment));else{let t,e;c=(new s).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=It(n,o.waist,e,o.hem,i.curvatureAdjustment),o.waistCp1=t[0],o.hemCp2=t[1],o.hem=t[2];let a=i.flare/2;o.hem.y<o.waist.y?a=0:o.hem.y<o.seat.y&&(a*=o.waist.dy(o.hem)/o.waist.dy(o.seat)),o.waistCp1=o.waistCp1.shiftFractionTowards(o.waist,a),o.hemCp2=o.hemCp2.rotate(45*a,o.waist).shiftFractionTowards(o.waist,a),o.hem=o.hem.rotate(90*a,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:i,points:a,paths:s,Path:n,Point:r,log:l}=t.shorthand();let c,p=0,h=o.hpsToWaistBack;switch(i.length){case"underbust":c=a.cbUnderbust,h=o.waistToUnderbust;break;case"waist":c=a.cbWaist;break;case"hips":c=a.cbHips;break;case"seat":c=a.cbSeat,p=o.seatBack-o.seat/2,h*=2;break;case"knee":c=a.cbKnee,p=o.seatBack-o.seat/2,h*=3;break;case"floor":c=a.cbFloor,p=o.seatBack-o.seat/2,h*=3}c||(c=a.cbSeat);let d=c.y+h*i.lengthBonus+e;d<=1.1*a.armhole.y&&(l.warn("Adjusting hem as it would be above or too close to armhole."),d=1.1*a.armhole.y),d<=a.underbust.y&&(l.warn("Adjusting hem as it would be above the underbust."),d=a.underbust.y),a.cbHem=new r(0,d+p*i.seatBackAdjustment),s.sideSeam=Nt(t,d).clean().addClass("fabric"),a.midHemCp1=new r(.66*a.hem.x,a.cbHem.y),a.midHemCp2=a.hem.shift(s.sideSeam.angleAt(a.hem)+90,.1*a.hem.x),s.hem=(new n).move(a.cbHem).curve(a.midHemCp1,a.midHemCp2,a.hem).addClass("fabric")}function jt(t,e=0){const{measurements:o,options:i,points:a,paths:s,Path:n,Point:r,log:l}=t.shorthand();let c,p=o.hpsToWaistBack;switch(i.length){case"underbust":c=a.cfUnderbust,p=o.waistToUnderbust;break;case"waist":c=a.cfWaist;break;case"hips":c=a.cfHips;break;case"seat":c=a.cfSeat,p*=2;break;case"knee":c=a.cfKnee,p*=3;break;case"floor":c=a.cfFloor,p*=3}c||(c=a.cfSeat);let h=c.y+p*i.lengthBonus+e;h<=1.1*a.armhole.y&&(l.warn("Adjusting hem as it would be above or too close to armhole."),h=1.1*a.armhole.y),h<=a.underbust.y&&(l.warn("Adjusting hem as it would be above the underbust."),h=a.underbust.y),a.cfHem=new r(0,h),s.sideSeam=Nt(t,h).clean().addClass("fabric"),a.midHemCp1=new r(.66*a.hem.x,a.cfHem.y),a.midHemCp2=a.hem.shift(s.sideSeam.angleAt(a.hem)+90,.1*a.hem.x),s.hem=(new n).move(a.cfHem).curve(a.midHemCp1,a.midHemCp2,a.hem).addClass("fabric")}function Gt(t,e,o,i,a="notch"){const{store:s,options:n,points:r,paths:l,Path:c,snippets:p,Snippet:h,utils:d}=t.shorthand();if(n.sleeves)if(s.get("capSleeves")){const t=4*(n.sleeveLength+.2)*s.get("sleeveCapHeight");r.sleeveCap=r.shoulder.shift(r.neck.angle(r.shoulder)-30+15*n.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 h(a,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=d.beamsIntersect(r.strapTop,r.strapTopCp1,r.armhole,r.armholeCp2),r.armholeIntersectionDrop=r.armholeIntersection.shiftFractionTowards(r.strapTop,-i),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 Yt(t,e){const{points:o,macro:i,utils:a}=t.shorthand(),s={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 n=(o.cfHem??o.cbHem).y;const r=Object.keys(s);for(let l=0;l<r.length;l++){const t=r[l];let c=s[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 s=o.clone();s.y=n,n=c,i("hd",{id:"wAt"+a.capitalize(t),from:o,to:e,y:c}),i("vd",{id:"hBelow"+a.capitalize(t),from:o,to:s,x:30})}}}function Ut(t,e){const{store:o,measurements:i,options:a,points:n,paths:r,Path:l,Point:c,expand:p,sa:h,macro:d,units:f,complete:m}=t.shorthand();(void 0===o.get("ribbingHeight")||t.context.settings.sample)&&o.set("ribbingHeight",(i.hpsToWaistBack+i.waistToHips)*a.ribbingHeight);const u=o.get("ribbingHeight");if(!p){const i=h?2*h:0;return o.flag.note({msg:`bibi:cut${(0,s.ZH)(t.name.split(".")[1])}`,notes:[h?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:f(2*u+i),l:f(e+i)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),o.flag.preset("expandIsOff"),t.hide()}o.flag.preset("expandIsOn"),n.topLeft=new c(0,0),n.topRight=new c(2*u,0),n.topFold=new c(u,0),n.bottomLeft=new c(0,e),n.bottomRight=new c(n.topRight.x,e),n.bottomFold=new c(n.topFold.x,e),r.seam=(new l).move(n.bottomRight).line(n.topRight).line(n.topLeft).line(n.bottomLeft).line(n.bottomRight).close().addClass("various"),m&&(r.fold=(new l).move(n.topFold).line(n.bottomFold).addClass("various help")),h&&(r.sa=r.seam.offset(h).addClass("various s
1a")),n.title=new c(n.bottomRight.x/3,n.bottomRight.y/3),d("vd",{id:"hFull",from:n.bottomRight,to:n.topRight,x:n.topRight.x+h+15}),d("hd",{id:"wFull",from:n.topLeft,to:n.topRight,y:n.topRight.y-h-15})}function zt(t,e){const{store:o,absoluteOptions:i,points:a,paths:n,Path:r,Point:l,expand:c,sa:p,macro:h,units:d,complete:f}=t.shorthand();(void 0===o.get("bindingHeight")||t.context.settings.sample)&&o.set("bindingHeight",i.bindingHeight);const m=o.get("bindingHeight");if(!c){const i=p?2*p:0;return o.flag.note({msg:`bibi:cut${(0,s.ZH)(t.name.split(".")[1])}`,notes:[p?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:d(4*m),l:d(e+i)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),o.flag.preset("expandIsOff"),t.hide()}o.flag.preset("expandIsOn"),a.topLeft=new l(0,0),a.topRight=new l(4*m,0),a.topFold=new l(m,0),a.bottomLeft=new l(0,e),a.bottomRight=new l(a.topRight.x,e),a.bottomFold=new l(a.topFold.x,e),n.seam=(new r).move(a.bottomRight).line(a.topRight).line(a.topLeft).line(a.bottomLeft).line(a.bottomRight).close().addClass("various"),f&&(n.fold=(new r).move(a.topFold).line(a.bottomFold).addClass("various help")),p&&(n.sa=(new r).move(a.topLeft).line(a.topLeft.translate(0,-p)).line(a.topRight.translate(0,-p)).line(a.topRight).move(a.bottomLeft).line(a.bottomLeft.translate(0,p)).line(a.bottomRight.translate(0,p)).line(a.bottomRight).addClass("various sa")),a.title=new l(a.bottomRight.x/3,a.bottomRight.y/3),h("vd",{id:"hFull",from:a.bottomRight,to:a.topRight,x:a.topRight.x+p+15}),h("hd",{id:"wFull",from:a.topLeft,to:a.topRight,y:a.topRight.y-p-15}),h("hd",{id:"wFold",from:a.bottomFold,to:a.bottomRight,y:a.bottomFold.y+p+15})}const Jt={name:"bibi.waistband",from:E,hide:{from:!0},options:{fitWaist:{bool:!0,menu:"fit",order:"EBA"},waistEase:{pct:5,min:-10,max:20,...(0,s.Wx)("waist"),menu:(t,e)=>!!e.fitWaist&&"fit",order:"EBB"},hipsEase:{pct:5,min:-5,max:50,...(0,s.Wx)("hips"),menu:"fit",order:"ECA"},seatEase:{pct:2,min:-5,max:50,...(0,s.Wx)("seat"),menu:"fit",order:"EDA"},chestEase:{pct:2,min:-5,max:25,...(0,s.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:i,paths:a,points:s,snippets:n,macro:r}){if(e.set("ribbingHeight",(o.hpsToWaistBack+o.waistToHips)*i.ribbingHeight),!i.useWaistRibbing)return t.hide();Ht(t),Mt(t),Et(t),_t(t),e.set("backHemLength",2*a.hem.length()),Wt(t),Mt(t),jt(t),e.set("frontHemLength",2*a.hem.length());for(const l of Object.keys(a))delete a[l];for(const l of Object.keys(n))delete n[l];for(const l of Object.keys(s))delete s[l];return Ut(t,(e.frontHemLength+e.backHemLength)*(1-i.ribbingStretch)),e.cutlist.setCut({cut:1,from:"ribbing"}),r("title",{at:s.title,nr:5,scale:.5,rotation:90,title:"waistband"}),t}};const $t={name:"bibi.cuff",from:T,after:[N,I],hide:{from:!0,inherited:!0,after:!0},options:{s3Collar:0,s3Armhole:0,libraryFitSleeve:!0,brianFitCollar:!1,bicepsEase:{pct:5,min:0,max:50,...(0,s.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,s.Wx)("shoulderToShoulder"),menu:"fit"},cuffEase:{pct:20,min:0,max:200,...(0,s.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:i,paths:a,points:s,snippets:n,Point:r,macro:l}){l("rmtitle"),l("rmscalebox");for(const c of Object.keys(a))a[c].hide();for(const c of Object.keys(n))delete n[c];if(e.set("ribbingHeight",(o.hpsToWaistBack+o.waistToHips)*i.ribbingHeight),!i.useCuffRibbing||!i.sleeves||i.sleeveLength<.05)return e.set("cuffSize",0),t.hide();return s.sleeveTip=a.sleevecap.edge("top"),s.sleeveTop=new r(0,s.sleeveTip.y),s.centerWrist=s.sleeveTop.shift(-90,o.shoulderToWrist),s.wristRight=s.centerWrist.shift(0,o.wrist*(1+i.cuffEase)/2),s.wristLeft=s.wristRight.rotate(180,s.centerWrist),s.cuffRight=s.bicepsRight.shiftFractionTowards(s.wristRight,i.sleeveLength),s.cuffLeft=s.bicepsLeft.shiftFractionTowards(s.wristLeft,i.sleeveLength),s.centerCuff=s.cuffRight.shiftFractionTowards(s.cuffLeft,.5),e.set("cuffSize",s.cuffLeft.dist(s.cuffRight)),a.sleevecap.hide(),Ut(t,e.cuffSize*(1-i.ribbingStretch)),e.cutlist.setCut({cut:2,from:"ribbing",identical:!0}),l("title",{at:s.title,nr:6,scale:.5,rotation:90,title:"cuff"}),t}};const Xt={name:"bibi.sleeve",from:$t,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:i,paths:a,Point:s,Path:n,sa:r,macro:l,snippets:c,Snippet:p,part:h,utils:d}){for(const f of Object.keys(a))a[f].hide();if(i.sleeveTip=a.sleevecap.edge("top"),i.sleeveTop=new s(0,i.sleeveTip.y),e.set("sleeveLength",o.shoulderToWrist*t.sleeveLength),e.set("capSleeves",t.sleeveLength<.05),e.set("separateSleeves",!0),e.set("sleeveCapHeight",-i.sleeveTop.y),e.get("capSleeves"))return e.set("separateSleeves",!1),h.hide();if(!t.sleeves)return e.set("sleeveLength",0),e.set("separateSleeves",!1),h.hide();if(i.centerWrist=i.sleeveTop.shift(-90,o.shoulderToWrist),i.wristRight=i.centerWrist.shift(0,o.wrist*(1+t.cuffEase)/2),i.wristLeft=i.wristRight.rotate(180,i.centerWrist),i.cuffRight=i.bicepsRight.shiftFractionTowards(i.wristRight,t.sleeveLength),i.cuffLeft=i.bicepsLeft.shiftFractionTowards(i.wristLeft,t.sleeveLength),e.cuffSize>0){let t;t=i.bicepsLeft.dy(i.cuffLeft)>1.5*e.ribbingHeight?i.cuffLeft.y-e.ribbingHeight:.5*e.ribbingHeight,i.cuffLeft=d.beamIntersectsY(i.bicepsLeft,i.cuffLeft,t),i.cuffRight=d.beamIntersectsY(i.bicepsRight,i.cuffRight,t)}i.centerCuff=i.cuffRight.shiftFractionTowards(i.cuffLeft,.5),a.sleevecap.hide(),a.seam=(new n).move(i.bicepsLeft).line(i.cuffLeft).line(i.cuffRight).line(i.bicepsRight).join(a.sleevecap).close().attr("class","fabric"),r&&(0===e.cuffSize?(i.hemLeft=d.beamIntersectsY(i.bicepsRight,i.cuffRight,i.cuffRight.y+2*r).translate(i.cuffRight.dx(i.cuffLeft),0),i.hemRight=d.beamIntersectsY(i.bicepsLeft,i.cuffLeft,i.cuffLeft.y+2*r).translate(i.cuffLeft.dx(i.cuffRight),0),a.saBottom=(new n).move(i.cuffLeft).line(i.hemLeft).line(i.hemRight).line(i.cuffRight).hide()):a.saBottom=(new n).move(i.cuffLeft).line(i.cuffRight).hide(),a.sa=(new n).move(i.bicepsLeft).join(a.saBottom).line(i.bicepsRight).join(a.sleevecap).close().offset(r).attr("class","fabric sa"));return i.gridAnchor=new s(0,0),l("grainline",{from:i.centerCuff,to:i.centerBiceps}),e.cutlist.addCut({cut:2,from:"fabric"}),i.logo=i.centerBiceps.shiftFractionTowards(i.centerCuff,.3),c.logo=new p("logo",i.logo),l("title",{at:i.centerBiceps,nr:4,title:"sleeve"}),i.frontNotch=a.sleevecap.shiftAlong(e.get("library.sleeve.frontArmholeToArmholePitch")),i.backNotch=a.sleevecap.reverse().shiftAlong(e.get("library.sleeve.backArmholeToArmholePitch")),c.frontNotch=new p("notch",i.frontNotch),c.backNotch=new p("bnotch",i.backNotch),l("vd",{id:"hCuffToArmhole",from:i.cuffLeft,to:i.bicepsLeft,x:i.bicepsLeft.x-r-15}),l("vd",{id:"hFull",from:i.cuffLeft,to:i.sleeveTip,x:i.bicepsLeft.x-r-30}),l("hd",{id:"wFull",from:i.bicepsLeft,to:i.bicepsRight,y:i.sleeveTip.y-r-30}),l("hd",{id:"wCuff",from:i.cuffLeft,to:i.cuffRight,y:i.cuffLeft.y+r+30}),l("pd",{id:"lSleevevap",path:a.sleevecap.reverse(),d:-1*r-15}),h}};const Qt={name:"bibi.back",from:E,measurements:["hips","waist","hpsToWaistBack","chest","seat","seatBack","waistToSeat"],optionalMeasurements:["bustSpan","highBust","waistToUnderbust","waistToKnee","waistToFloor"],hide:{from:!0},after:[Jt,Xt],options:{},draft:function({store:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,options:l,absoluteOptions:c,macro:p,complete:h,part:d}){for(const u of Object.keys(s))s[u].hide();i.armholePitchCp1=i.backArmholePitchCp1,i.armholePitch=i.backArmholePitch,i.armholePitchCp2=i.backArmholePitchCp2,delete i.frontArmholePitchCp1,delete i.frontArmholePitch,delete i.frontArmholePitchCp2,delete i.backArmholePitchCp1,delete i.backArmholePitch,delete i.backArmholePitchCp2,delete i.cfNeck,delete i.cfNeckCp1,Ht(d),Mt(d),Et(d),_t(d,l.useWaistRibbing?-t.get("ribbingHeight"):0),t.set("backSideSeamLength",s.sideSeam.length());const f=l.sleeves?0:l.strapWidth;i.neck=i.hps.shiftFractionTowards(i.shoulder,l.necklineWidth*(1-f)),i.cbNeck=new o(0,i.neck.y+l.backNeckCutout*i.neck.dy(i.cbChest)),i.cbNeckCp1=i.cbNeck.shift(0,i.neck.x*l.backNeckBend),i.neckCp2=i.neck.shiftTowards(i.shoulder,i.neck.dy(i.cbNeck)*(.2+l.backNeckBend)).rotate(-90,i.neck),s.backNeck=(new a).move(i.neck).curve(i.neckCp2,i.cbNeckCp1,i.cbNeck).addClass("fabric"),Gt(d,f,l.armholeCurveBack,l.armholeDropBack,"bnotch"),s.centerLine=(new a).move(i.cbNeck).line(i.cbHem).addClass("fabric"),t.set("gatherAreaStart",Math.min(i.armhole.dy(i.cbWaist)/10,.1*s.sideSeam.length())),t.set("gatherAreaLength",Math.min(.8*s.sideSeam.length(),.5*i.armhole.dy(i.cbWaist))),t.set("armholeSizeBack",s.armhole.length()),t.set("neckSizeBack",s.backNeck.length());const m=s.sideSeam.reverse();r.gatherAreaStart=new n("notch",m.shiftAlong(t.get("gatherAreaStart"))),r.gatherAreaBack=new n("notch",m.shiftAlong(t.get("gatherAreaStart")+t.get("gatherAreaLength"))),e&&(s.sa=(new a).move(i.cbHem).join(s.hem.offset(e*(l.useWaistRibbing?1:3))).join(s.sideSeam.offset(e)).join(s.armhole.offset(e*(t.separateSleeves?1:0))).join(s.shoulder.offset(e)).line(i.neck).attr("class","fabric sa"));p("cutonfold",{from:i.cbNeck,to:i.cbHem,grainline:!0}),delete r.logo,i.title=i.cbHem.shift(45,60),p("title",{at:i.title,nr:2,t
1itle:"back"}),h&&(i.hem.y>i.waist.y&&(s.waist=(new a).move(i.cbWaist).line(i.waist).attr("class","help")),t.separateSleeves||(s.armholeBinding=s.armhole.offset(-c.bindingHeight).addClass("various help")),s.neckBinding=s.backNeck.offset(-c.bindingHeight).addClass("various help"));return p("pd",{id:"pArmhole",path:s.armhole.reverse(),d:-1*e-15}),p("pd",{id:"pNeck",path:s.backNeck.reverse(),d:-1*e-15}),p("pd",{id:"pShoulder",path:s.shoulder.reverse(),d:-1*e-15}),p("hd",{id:"wAtHem",from:i.cbHem,to:i.hem,y:i.cbHem.y+2.5*e+15}),p("vd",{id:"hHemToNeck",from:i.cbHem,to:i.cbNeck,x:i.cbHem.x-e-15}),p("vd",{id:"hShoulderToArmhole",from:i.shoulder,to:i.armhole,x:i.armhole.x+e+15}),p("vd",{id:"hSide",from:i.armhole,to:i.hem,x:i.hem.x+e+15}),p("vd",{id:"hNeckToArmhole",from:i.neck,to:i.armhole,x:i.armhole.x+e+30}),Yt(d,s.sideSeam),d}};const Kt={name:"bibi.front",from:E,measurements:["hips","waist","hpsToWaistBack","chest","hpsToWaistFront","seat","seatBack","waistToSeat","hpsToBust"],optionalMeasurements:["bustSpan","highBust","waistToUnderbust","waistToKnee","waistToFloor"],hide:{from:!0},plugins:[],after:Qt,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:i,Path:a,paths:s,Snippet:n,snippets:r,options:l,absoluteOptions:c,measurements:p,macro:h,complete:d,part:f}){for(const C of Object.keys(s))s[C].hide();let m;i.armholePitchCp1=i.frontArmholePitchCp1,i.armholePitch=i.frontArmholePitch,i.armholePitchCp2=i.frontArmholePitchCp2,delete i.frontArmholePitchCp1,delete i.frontArmholePitch,delete i.frontArmholePitchCp2,delete i.backArmholePitchCp1,delete i.backArmholePitch,delete i.backArmholePitchCp2,delete i.cbHem,delete i.cbNeck,Wt(f),i.originalChest=i.chest,i.originalArmhole=i.armhole,i.originalArmholeCp2=i.armholeCp2,l.draftForHighBust&&p.bustSpan&&p.highBust&&(m=function(t,e,o,i,a){const s=t.dist(e),n=Math.asin((e.x-t.x)/s);let r=Math.asin((e.x-t.x+i)/s);isNaN(r)&&(r=Math.PI/2);const l=new a(t.x+s*Math.sin(r),t.y+s*Math.cos(r)),c=l.y-e.y,p=r-n,h=e=>e.rotate(p/Math.PI*180,t),d=h(o),f=o.translate(i,c),m=f.angle(e)-d.angle(e);return{dx:i,dy:c,rotateUpper:h,rotateLower:t=>t.translate(i,c).rotate(-m,e),bustOffset:l,sideOffset0:d,sideOffset1:f}}(i.neck.shiftFractionTowards(i.shoulder,.5),i.bust,i.armholeHollow,(p.bust*(1+l.bustEase)-p.chest)/2,o),i.bustOffset=m.bustOffset,i.sideOffset0=m.sideOffset0,i.sideOffset1=m.sideOffset1,i.chest=m.rotateLower(i.chest),i.armhole=m.rotateUpper(i.armhole),i.armholeCp2=m.rotateUpper(i.armholeCp2),i.armholeHollowCp1=m.rotateUpper(i.armholeHollowCp1),i.armholeHollow=m.rotateUpper(i.armholeHollow),i.armholeHollowCp2=m.rotateUpper(i.armholeHollowCp2),i.armholePitchCp1=m.rotateUpper(i.armholePitchCp1),i.armholePitch=m.rotateUpper(i.armholePitch),i.armholePitchCp2=m.rotateUpper(i.armholePitchCp2),i.shoulderCp1=m.rotateUpper(i.shoulderCp1),i.shoulder=m.rotateUpper(i.shoulder));Mt(f),Et(f);const u=l.sleeves?0:l.strapWidth;i.neck=i.hps.shiftFractionTowards(i.shoulder,l.necklineWidth*(1-u)),i.cfNeck=new o(0,i.neck.y+l.necklineDepth*i.neck.dy(i.cfBust)),i.cfNeckCp1=i.cfNeck.shift(0,i.neck.x*l.necklineBend),i.neckCp2=i.neck.shiftTowards(i.shoulder,i.neck.dy(i.cfNeck)*(.2+l.necklineBend)).rotate(-90,i.neck),s.frontNeck=(new a).move(i.neck).curve(i.neckCp2,i.cfNeckCp1,i.cfNeck).addClass("fabric"),jt(f,l.useWaistRibbing?-t.get("ribbingHeight"):0),t.set("frontSideSeamLength",s.sideSeam.length());const g=t.get("frontSideSeamLength"),b=t.get("backSideSeamLength")??0,k=g-b,w=((e,o,i)=>{const s=e.length();i=Math.max(0,Math.min(i,s));const n=(t.get("gatherAreaLength")??0)+i;let r=.5*(n-i);const l=s-(t.get("gatherAreaStart")??0)-n,c=e.shiftAlong(l),p=e.shiftAlong(l+r),h=e.shiftAlong(l+r+i),d=e.shiftAlong(l+n);let f=Rt(a,e,c);const m=f[0];f=Rt(a,f[1],d);const u=f[0],g=f[1],b=e.angleAt(c),k=e.angleAt(d),w=c.shift(b,r/3),C=d.shift(k,-r/3),v=Math.max(o.dist(p),o.dist(h)),T=o.shiftTowards(p,v),y=o.shiftTowards(h,v),x=T.shiftFractionTowards(y,.5),B=o.shiftFractionTowards(x,.25),S=B.shiftFractionTowards(x,.25).shiftFractionTowards(T,.25),L=B.shiftFractionTowards(x,.25).shiftFractionTowards(y,.25),P=T.angle(y),R=2*p.angle(h)-P;let F=B.angle(y)-B.angle(T);F<-180&&(F+=360);const W=T.shift(R-F/2,-r/3),H=y.shift(R+F/2,r/3);return{beforeDart:m.clone().curve(w,W,T),dart:(new a).move(T)._curve(S,B).curve_(L,y),afterDart:(new a).move(y).curve(H,C,d).join(g),dartMiddle:(new a).move(x).line(B),startGather:c,endGather:d,startDart:T,endDart:y,dartTip:B,gatherArea:n,gatherPath:u,dartLength:i,offset:l}})(s.sideSeam,i.bust,k);t.set("dart",w),i.startGather=w.startGather,i.endGather=w.endGather,i.startDart=w.startDart,i.endDart=w.endDart,i.dartTip=w.dartTip,s.sideSeamWithDart=s.originalSideSeam=s.sideSeam.clone().hide(),l.dart&&k>w.gatherArea/5&&(s.sideSeam1=w.beforeDart.hide(),s.dart=w.dart.addClass("fabric"),s.sideSeam2=w.afterDart.hide(),d&&(s.dartMiddle=w.dartMiddle.addClass("help")),s.sideSeam=s.sideSeam1.clone().combine(s.sideSeam2).addClass("fabric"),s.sideSeamWithDart=s.sideSeam1.clone().join(s.dart).join(s.sideSeam2).hide());d&&(r.startGather=new n("notch",i.startGather),r.endGather=new n("notch",i.endGather),k>w.gatherArea/10&&!s.dart&&(s.gatherPath=(new a).move(i.startGather).join(w.gatherPath.offset(-20)).line(i.endGather).addClass("dashed various").addText("gather","center various help")));Gt(f,u,l.armholeCurveFront,0),t.set("armholeSizeFront",s.armhole.length()),t.set("neckSizeFront",s.frontNeck.length()),s.centerLine=(new a).move(i.cfNeck).line(i.cfHem).addClass("fabric"),i.title=i.bust.shift(0,5),h("title",{at:i.title,nr:1,title:"front"}),h("cutonfold",{from:i.cfNeck,to:i.cfHem,grainline:!0}),e&&(s.sideSeam1?s.sa=(new a).move(i.cfHem).join(s.hem.offset(e*(l.useWaistRibbing?1:3))).join(s.sideSeam1.offset(e)).join(s.sideSeam2.offset(e)).join(s.armhole.offset(e*(t.separateSleeves?1:0))).join(s.shoulder.offset(e)).line(i.neck).attr("class","fabric sa"):s.sa=(new a).move(i.cfHem).join(s.hem.offset(e*(l.useWaistRibbing?1:3))).join(s.sideSeam.offset(e)).join(s.armhole.offset(e*(t.separateSleeves?1:0))).join(s.shoulder.offset(e)).line(i.neck).attr("class","fabric sa"));d&&(i.hem.y>i.waist.y&&(s.waist=(new a).move(i.cfWaist).line(i.waist).attr("class","help")),t.separateSleeves||(s.armholeBinding=s.armhole.offset(-c.bindingHeight).addClass("various help")),s.neckBinding=s.frontNeck.offset(-c.bindingHeight).addClass("various help"));h("pd",{id:"pArmhole",path:s.armhole.reverse(),d:-1*e-15}),h("pd",{id:"pNeck",path:s.frontNeck.reverse(),d:-1*e-15}),h("pd",{id:"pShoulder",path:s.shoulder.reverse(),d:-1*e-15}),h("hd",{id:"wAtHem",from:i.cfHem,to:i.hem,y:i.hem.y+2.5*e+15}),h("vd",{id:"hHemToNeck",from:i.cfHem,to:i.cfNeck,x:i.cfHem.x-e-15}),h("vd",{id:"hNeckToArmhole",from:i.neck,to:i.armhole,x:i.armhole.x+e+30}),h("vd",{id:"hShoulderToArmhole",from:i.shoulder,to:i.armhole,x:i.armhole.x+e+15}),h("vd",{id:"hSide",from:i.armhole,to:i.hem,x:i.hem.x+e+15}),s.dart&&(h("vd",{id:"hDart",from:i.endDart,to:i.startDart,x:i.endDart.x+e+15}),h("ld",{id:"pDartStart",from:i.dartTip,to:i.startDart,d:-e-15}),h("ld",{id:"pDartEnd",from:i.dartTip,to:i.endDart,d:e+15}));return r.bustPoint=new n("notch",i.bust),Yt(f,s.sideSeamWithDart),f}};const Vt={name:"bibi.armholeBinding",after:[Kt,Qt],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:i}){if(e.separateSleeves)return t.hide();return zt(t,e.armholeSizeBack+e.armholeSizeFront),e.cutlist.setCut({cut:2,from:"ribbing",identical:!0}),i("title",{at:o.title,nr:4,scale:.5,rotation:90,title:"armholeBinding"}),t}};const qt={name:"bibi.neckBinding",after:[Kt,Qt],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:i}){return zt(t,2*(e.neckSizeBack+e.neckSizeFront)),e.cutlist.setCut({cut:1,from:"ribbing"}),i("title",{at:o.title,nr:3,scale:.5,rotation:90,title:"neckBinding"}),t}};const Zt=new s.pT({data:Lt,parts:[Jt,$t,Vt,qt,Xt,Qt,Kt]}),te=(0,s.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:i,utils:a,measurements:s,options:n,macro:r,complete:l,snippets:c,Snippet:p,store:h,units:d,part:f})=>{const m=("head"in s?s.head:360)*n.headSize,u=m*n.neckRatio/4;let g,b=1;do{e.right=new t(b*m/10,0),e.bottom=new t(0,b*m/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),i.neck=(new o).move(e.right).curve(e.rightCp1,e.bottomCp2,e.bottom),g=i.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 k=m*n.widthRatio,w=m*n.lengthRatio;e.topLeft=new t(k/-2,e.top.y-(k/2-e.right.x)),e.topRight=e.topLeft.shift(0,k),e.bottomLeft=e.topLeft.shift(-90,w),e.bottomRight=e.topRight.shift(-90,w),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}${a.capitalize(t)}`]=e[v[x].points[t]].copy();let T=["edgeTopLeftCp","edgeTop","tipRight","tipRightTop","tipRightTopStart","tipRightTopCp1","tipRightTopCp2","tipRightTopEnd","tipRightBottomStart","tipRightBottomCp1","tipRightBottomCp2","tipRightBottomEnd","tipRightBottom","top","topCp2"];for(;e.tipRightBottomStart.x>-1;)for(let t of T)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 y={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 y)for(const t of["start","cp1","cp2","end"])e[`${x}${a.capitalize(t)}`]=e[y[x].points[t]].copy();return i.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"),h.flag.note({msg:"bob:biasTapeLength",replace:{l:d(i.seam.length())}}),h.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&&(i.bias=i.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}),f}},ie={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"}}}')},ae=new s.pT({data:ee,parts:[oe]}),se=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 ne=(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,s.Wx)("biceps"),menu:"fit"},shoulderDartSize:{pct:7,min:4,max:10,menu:ne},shoulderDartLength:{pct:85,min:60,max:100,menu:ne},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,s.Wx)("shoulderToShoulder"),menu:"fit"},collarEase:{pct:3.5,min:0,max:10,...(0,s.Wx)("neck"),menu:"fit"},chestEase:{pct:10,min:5,max:20,...(0,s.Wx)("chest"),menu:"fit"},waistEase:{pct:10,min:5,max:20,...(0,s.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:i,options:a,utils:s,part:n}){return e.hps=new o(i.neck*(1+a.collarEase)/a.collarFactor,0),t.set("shoulderEase",i.shoulderToShoulder*a.shoulderEase/2),e.shoulder=s.beamsIntersect(e.hps,e.hps.shift(-1*i.shoulderSlope,100),new o(i.shoulderToShoulder/2+t.get("shoulderEase"),-100),new o(i.shoulderToShoulder/2+t.get("shoulderEase"),100)),e.cbHps=new o(0,0),e.cbNeck=new o(0,a.backNeckCutout*i.neck),e.cbWaist=new o(0,i.hpsToWaistBack*(1+a.verticalEase)),e.cbHips=new o(0,(i.hpsToWaistBack+i.waistToHips)*(1+a.verticalEase)),e.shoulder.y-=(e.shoulder.y-e.cbHps.y)*a.shoulderSlopeReduction,e.shoulder.y<e.cbHps.y&&(e.shoulder=new o(e.shoulder.x,0)),e.shoulderNoEase=e.shoulder.clone(),e.hpsCp2=s.beamIntersectsY(e.hps,e.hps.shiftTowards(e.shoulder,10).rotate(-90,e.hps),e.cbNeck.y),e.waist=e.cbWaist.shift(0,i.waist*(1+a.waistEase)/4),e.armhole=new o((i.highBust-i.highBustFront)*(1+a.chestEase)/2,(e.shoulder.y+i.biceps*a.armholeDepthBase)*a.armholeDepthFactor*(1+a.verticalEase)*(1+a.bicepsEase)),e.armholePitch=new o(e.shoulder.x*a.acrossBackFactor,e.armhole.y/2),e.armholeCp2=s.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),n}};const ce={from:le,name:"breanna.back",draft:function({sa:t,points:e,Path:o,paths:i,Snippet:a,snippets:s,macro:n,Point:r,options:l,utils:c,store:p,part:h}){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))),i.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),i.saBase=i.seam.clone(),l.waistDart){let t=(new o).line(e.waistDart1).line(e.waistDartTip).line(e.waistDart2);i.seam=i.seam.insop("waistDart",t);let a=(new o).line(e.waistDart1).line(e.waistDartEdge).line(e.waistDart2);i.saBase=i.saBase.insop("waistDart",a),i.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);i.seam=i.seam.insop("shoulderDart",t);let a=(new o).line(e.shoulderDart1).line(e.shoulderDartEdge).line(e.shoulderDart2);i.saBase=i.saBase.insop("shoulderDart",a),i.shoulderDartHint=(new o).move(e.shoulderDart1).line(e.shoulderDartEdge).line(e.shoulderDart2).attr("class","fabric dotted stroke-sm")}i.seam.close().attr("class","fabric"),i.saBase.close(),i.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&&(i.sa=i.saBase.offset(t).attr("class","sa")),e.gridAnchor=e.cbNeck.clone();const d=.1*(e.armhole.x-e.cbNeck.x);if(n("grainline",{from:e.cbNeck.shift(0,d),to:e.cbWaist.shift(0,d)}),p.cutlist.addCut({cut:2,from:"fabric",onFold:!0}),e.title=new r(e.armhole.x/4,e.armhole.y-60),n("title",{nr:1,title:"back",at:e.title}),e.logo=new r(e.armhole.x/1.5,e.armhole.y),s.logo=new a("logo",e.logo),s.armholePitch=new a("bnotch",e.armholePitch),n("vd",{id:"hCBackHemToCBackNeck",from:e.cbWaist,to:e.cbNeck,x:-15-t}),l.waistDart){let o=e.waist.y+15+t;n("hd",{id:"wCBackHemToWaistDartInner",from:e.cbWaist,to:e.waistDart1,y:o}),n("hd",{id:"wCBackHemToWaistDartCenter",from:e.cbWaist,to:e.waistDartEdge,y:o+15}),n("hd",{id:"wCBackHemToWaistDartOuter",from:e.cbWaist,to:e.waistDart2,y:o+30}),n("hd",{id:"wHemFull",from:e.cbWaist,to:e.waist,y:o+45}),n("hd",{id:"wCBackHemToArmhole",from:e.cbWaist,to:e.armhole,y:o+60}),n("vd",{id:"hWaistDart",from:e.waistDart2,to:e.waistDartTip,x:e.waistDart2.x+15})}else{let o=e.waist.y+15+t;n("hd",{id:"wCBackToSide",from:e.cbWaist,to:e.waist,y:e.waist.y+15+t}),n("hd",{id:"wCBackToArmhole",from:e.cbWaist,to:e.armhole,y:o+30})}let f=e.armhole.x+15+t;return n("vd",{id:"hHemToArmhole",from:e.waist,to:e.armhole,x:f}),n("vd",{id:"hHemToArmholePitch",from:e.waist,to:e.armholePitch,x:f+15}),n("vd",{id:"hHemToShoulder",from:e.waist,to:e.shoulder,x:f+30}),n("vd",{id:"hHemToHps",from:e.waist,to:e.hps,x:f+45}),n("hd",{id:"wCBackToArmholePitch",from:e.cbNeck,to:e.armholePitch,y:e.armholePitch.y+25}),n("hd",{id:"wCBackToHps",from:e.cbNeck,to:e.hps,y:e.hps.y-t-15}),n("hd",{id:"wCBacktoShoulder",from:e.cbNeck,to:e.shoulder,y:e.hps.y-t-30}),h}};const pe={name:"breanna.frontBase",hide:{self:!0},from:le,after:ce,draft:function({points:t,Path:e,paths:o,Point:i,measurements:a,options:s,utils:n,store:r,part:l}){if(t.cfHps=t.cbHps.clone(),t.cfNeck=t.hps.rotate(-90,t.cfHps),s.breannaFitCollar){let o=0,i=0,l=r.get("backCollarLength"),
1c=a.neck*(1+s.collarEase);do{t.cfNeck=t.cfNeck.shift(90,o/1.5),t.hpsCp2=n.beamIntersectsY(t.hps,t.hps.shiftTowards(t.shoulder,10).rotate(-90,t.hps),t.cfNeck.y),i=2*(new e).move(t.hps).curve_(t.hpsCp2,t.cfNeck).length(),o=i+l-c}while(Math.abs(o)>1)}else t.hpsCp2=n.beamIntersectsY(t.hps,t.hps.shiftTowards(t.shoulder,10).rotate(-90,t.hps),t.cfNeck.y);if(s.frontArmholeDeeper>0)for(let h of["armholePitch","armholePitchCp1","armholePitchCp2"])t[h].x-=a.shoulderToShoulder*s.frontArmholeDeeper/2;t.cfBust=new i(0,a.hpsToBust*(1+s.verticalEase)),t.bustSide=new i(a.bustFront*(1+s.chestEase)/2,t.cfBust.y),t.bustPoint=t.cfBust.shift(0,a.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 i(0,a.hpsToWaistFront*(1+s.verticalEase)),t.waist=n.beamIntersectsY(t.armhole,t.bustSide,t.cfWaist.y),t.waist=t.armhole.shiftTowards(t.waist,r.get("backSideSeamLength"));for(let h of["Center","Tip","Target","Left"])delete t["waistDart"+h];t.primaryBustDartCenter=n.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),s.frontScyeDart){let e=t.bustPoint.angle(t.armhole),o=t.bustPoint.angle(t.armholePitch),i=t.bustPoint.shift(e+(o-e)/2,6.66*a.highBustFront),r=i.shiftFractionTowards(t.bustPoint,2);t.scyeDart1=n.lineIntersectsCurve(i,r,t.armhole,t.armholeCp2,t.armholePitchCp1,t.armholePitch);let l=(a.bustFront-a.highBustFront)*s.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 a of p)t[a]=t[a].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 he(t,e,o,i){let a=t.bustPoint;switch(o){case 700:return t.cfWaist.clone();case 800:return t.cfBust.clone();case 900:return e.beamIntersectsX(a,t.cfBust.rotate(-.5*i,a),0);case 1e3:return e.beamIntersectsX(a,t.cfBust.rotate(-1*i,a),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(a,t.bustSide.rotate(-.5*i,a),t.armhole,t.waist);case 1600:return e.beamsIntersect(a,t.bustSide.rotate(-1*i,a),t.armhole,t.waist);case 1700:return t.waist.clone();default:return!1}}const de=(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},fe=(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 me(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:i,Path:a,paths:s,sa:n,macro:r,snippets:l,Snippet:c,part:p}){let[h,d]=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",h),e.set("secondaryBustDartLocation",d);let f=e.get("bustDartAngle");if(i.origBustDart1=i.primaryBustDart1.clone(),i.origBustDart2=i.primaryBustDart2.clone(),600!==h){i.primaryBustDart1=he(i,o,h,f),i.primaryBustDart2=i.primaryBustDart1.rotate(f,i.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}(h))i[t]=i[t].rotate(f,i.primaryBustDartTip);if(h>=1100){let t=270-i.cfNeck.angle(i.cfWaist);for(let e in i)i[e]=i[e].rotate(t,i.cfNeck)}}if(0===d||h===d){me(i,t,o);let e=function(t){let{points:e,Path:o,store:i}=t.shorthand();switch(i.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),[n]=de(a,i),[r]=fe(a,i);s.seam=e.insop("primary",n),s.saBase=e.insop("primary",r)}else{f*=1-t.primaryBustDartShaping,i.secondaryBustDart1=he(i,o,d,f),i.secondaryBustDart2=i.secondaryBustDart1.rotate(f,i.primaryBustDartTip),i.secondaryBustDartTip=i.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}(h,d))i[t]=i[t].rotate(f,i.secondaryBustDartTip);me(i,t,o);let e,n=270-i.cfNeck.angle(700===h?i.primaryBustDart1:i.cfWaist);for(let t in i)i[t]=i[t].rotate(n,i.cfNeck);e=h<=600?function(t){let{points:e,Path:o,store:i}=t.shorthand();switch(i.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):h<=700?function(t){let{points:e,Path:o,store:i}=t.shorthand();switch(i.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):h<=1e3?function(t){let{points:e,Path:o,store:i}=t.shorthand();switch(i.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):h<=1100?function(t){let{points:e,Path:o,store:i}=t.shorthand();switch(i.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):h<=1130?function(t){let{points:e,Path:o,store:i}=t.shorthand();switch(i.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):h<=1230?function(t){let{points:e,Path:o,store:i}=t.shorthand();switch(i.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):h<=1300?function(t){let{points:e,Path:o,store:i}=t.shorthand();switch(i.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):h<=1330?function(t){let{points:e,Path:o,store:i}=t.shorthand();switch(i.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:i}=t.shorthand();switch(i.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]=de(a,i),[c,m]=fe(a,i);s.seam=e.insop("primary",r).insop("secondary",l),s.saBase=e.insop("primary",c).insop("secondary",m),s.secondaryBustDartHint=(new a).move(i.secondaryBustDart1).line(i.secondaryBustDartEdge).line(i.secondaryBustDart2).attr("class","fabric dotted stroke-sm")}s.primaryBustDartHint=(new a).move(i.primaryBustDart1).line(i.primaryBustDartEdge).line(i.primaryBustDart2).attr("class","fabric dotted stroke-sm"),n&&(s.sa=s.saBase.offset(n).attr("class","sa")),s.seam.close().attr("class","fabric"),s.saBase.close().hide(),i.gridAnchor=i.cfNeck.clone(),r("cutonfold",{from:i.cfNeck,to:i.cfWaist,grainline:!0}),e.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),i.logo=i.cfNeck.shift(-60,70),l.logo=new c("logo",i.logo),i.title=i.logo.shift(-90,70),r("title",{nr:2,title:"front",at:i.title}),l.bustNotch=new c("notch",i.bustPoint),l.armholePitch=new c("notch",i.armholePitch);let m=s.seam.edge("topLeft"),u=s.seam.edge("bottomRight");return r("vd",{id:"hHemToBustPoint",from:i.cfWaist,to:i.bustPoint,x:m.x-15-n}),r("vd",{id:"hHemToNeckOpeningBottom",from:i.cfWaist,to:i.cfNeck,x:m.x-30-n}),r("vd",{id:"hHemToHps",from:i.cfWaist,to:i.hps,x:m.x-45-n}),r("vd",{id:"hHemToBustDartTip",from:i.waist,to:i.armhole,x:u.x+15+n}),r("vd",{id:"hHemToArmholePitch",from:i.waist,to:i.armholePitch,x:u.x+30+n}),r("vd",{id:"hHemToShoulder",from:i.waist,to:i.shoulder,x:u.x+45+n}),r("vd",{id:"hFull",from:i.waist,to:i.hps,x:u.x+60+n}),r("hd",{id:"wCFrontToHps",from:i.cfNeck,to:i.hps,y:m.y-15-n}),r("hd",{id:"wCFrontToShoulder",from:i.cfNeck,to:i.shoulder,y:m.y-30-n}),r("hd",{id:"wFull",from:i.cfNeck,to:i.armhole,y:m.y-45-n}),r("hd",{id:"wCFrontToWaistDartCenter",from:i.cfWaist,to:i.bustPoint,y:u.
1y+15+n}),r("hd",{id:"wHemFull",from:i.cfWaist,to:i.waist,y:u.y+30+n}),r("ld",{id:"wWaistDart",from:i.primaryBustDart1,to:i.primaryBustDart2,d:15}),r("ld",{id:"lWaistDartSide",from:i.primaryBustDart2,to:i.primaryBustDartTip,d:-15}),0!==d&&h!==d&&r("ld",{id:"lBustDartSide",from:i.secondaryBustDartTip,to:i.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 i=ge(t,e,o),a=t.get("sleeveFactor");a*=i>10?.75:i>0?.9:1.05,t.set("sleeveFactor",a)}function ke(t,e){const{store:o,measurements:i,options:a,Point:s,points:n,Path:r,paths:l,part:c}=t;n.centerBiceps=new s(0,0),n.centerCap=n.centerBiceps.shift(90,a.sleevecapTopFactorY*(i.biceps/2*(1+a.bicepsEase)*o.get("sleeveFactor")));let p=i.biceps*(1+a.bicepsEase)/2;n.bicepsLeft=n.centerBiceps.shift(180,p*a.sleeveWidthGuarantee+p*(1-a.sleeveWidthGuarantee)*o.get("sleeveFactor")),n.bicepsRight=n.bicepsLeft.flipX(),n.capLeft=new s(n.bicepsLeft.x,n.centerCap.y),n.capRight=n.capLeft.flipX(),n.centerCap=n.capLeft.shiftFractionTowards(n.capRight,a.sleevecapTopFactorX);let h=n.bicepsRight.x,d=n.centerCap.y;n.backPitch=new s(-1*h*a.sleevecapBackFactorX,d*a.sleevecapBackFactorY),n.frontPitch=new s(h*a.sleevecapFrontFactorX,d*a.sleevecapFrontFactorY),n.capQ1Base=n.frontPitch.shiftFractionTowards(n.bicepsRight,.5),n.capQ2Base=n.frontPitch.shiftFractionTowards(n.centerCap,.5),n.capQ3Base=n.backPitch.shiftFractionTowards(n.centerCap,.5),n.capQ4Base=n.backPitch.shiftFractionTowards(n.bicepsLeft,.5);let f=i.biceps*(1+a.bicepsEase);if(n.capQ1=n.capQ1Base.shift(n.bicepsRight.angle(n.frontPitch)+90,f*a.sleevecapQ1Offset),n.capQ2=n.capQ2Base.shift(n.centerCap.angle(n.frontPitch)+90,f*a.sleevecapQ2Offset),n.capQ3=n.capQ3Base.shift(n.centerCap.angle(n.backPitch)-90,f*a.sleevecapQ3Offset),n.capQ4=n.capQ4Base.shift(n.bicepsLeft.angle(n.backPitch)-90,f*a.sleevecapQ4Offset),n.capQ1Cp1=n.capQ1.shift(n.frontPitch.angle(n.bicepsRight),f*a.sleevecapQ1Spread1),n.capQ1Cp2=n.capQ1.shift(n.frontPitch.angle(n.bicepsRight),f*a.sleevecapQ1Spread2*-1),n.capQ2Cp1=n.capQ2.shift(n.centerCap.angle(n.frontPitch),f*a.sleevecapQ2Spread1),n.capQ2Cp2=n.capQ2.shift(n.centerCap.angle(n.frontPitch),f*a.sleevecapQ2Spread2*-1),n.capQ3Cp1=n.capQ3.shift(n.backPitch.angle(n.centerCap),f*a.sleevecapQ3Spread1),n.capQ3Cp2=n.capQ3.shift(n.backPitch.angle(n.centerCap),f*a.sleevecapQ3Spread2*-1),n.capQ4Cp1=n.capQ4.shift(n.bicepsLeft.angle(n.backPitch),f*a.sleevecapQ4Spread1),n.capQ4Cp2=n.capQ4.shift(n.bicepsLeft.angle(n.backPitch),f*a.sleevecapQ4Spread2*-1),l.sleevecap=(new r).move(n.bicepsRight)._curve(n.capQ1Cp1,n.capQ1).curve(n.capQ1Cp2,n.capQ2Cp1,n.capQ2).curve(n.capQ2Cp2,n.capQ3Cp1,n.capQ3).curve(n.capQ3Cp2,n.capQ4Cp1,n.capQ4).curve_(n.capQ4Cp2,n.bicepsLeft),o.set("sleevecapLength",l.sleevecap.length()),0===e){let t,e;t=2*o.get("backArmholeLength"),e=t*a.sleevecapEase,o.set("sleevecapEase",e),o.set("sleevecapTarget",t+e)}return c}function we(t,e){let{store:o,points:i,Path:a,paths:s}=t,n=i.bicepsRight.x;for(let r of["bicepsRight","capQ1Cp1","capQ1","capQ1Base","capQ1Cp2","frontPitch","capQ2Cp1","capQ2","capQ2Base","capQ2Cp2"])i[r].x+=i[r].x/n*e*-1;s.sleevecap=(new a).move(i.bicepsRight)._curve(i.capQ1Cp1,i.capQ1).curve(i.capQ1Cp2,i.capQ2Cp1,i.capQ2).curve(i.capQ2Cp2,i.capQ3Cp1,i.capQ3).curve(i.capQ3Cp2,i.capQ4Cp1,i.capQ4).curve_(i.capQ4Cp2,i.bicepsLeft),o.set("sleevecapLength",s.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:i,points:a,paths:s,part:n}=t;e.set("sleeveFactor",1);let r=0;do{ke(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{we(t,ge(e)),be(e),r++}while(!0===o.breannaFitSleeve&&r<50&&Math.abs(ge(e))>2);return s.sleevecap.attr("class","fabric"),a.gridAnchor=new i(0,0),n}};const ve={name:"breanna.sleeve",from:Ce,after:[ue,pe,ce],measurements:["shoulderToWrist","wrist"],options:{cuffEase:{pct:20,min:0,max:50,...(0,s.Wx)("wrist"),menu:"fit"},sleeveLengthBonus:{pct:0,min:-40,max:10,menu:"style"}},draft:function(t){const{store:e,sa:o,measurements:i,options:a,Point:s,points:n,Path:r,paths:l,Snippet:c,snippets:p,macro:h,part:d}=t;let f=l.sleevecap.edge("topLeft").y;n.centerWrist=new s(0,f+i.shoulderToWrist*(1+a.sleeveLengthBonus)*(1+a.verticalEase)),n.wristRight=n.centerWrist.shift(0,i.wrist*(1+a.cuffEase)/2),n.wristLeft=n.wristRight.rotate(180,n.centerWrist),n.sleeveTip=l.sleevecap.shiftFractionAlong(.5),n.wristRight=n.bicepsRight.shiftTowards(n.wristRight,n.bicepsLeft.dist(n.wristLeft)),l.sleevecap.hide(),l.seam=(new r).move(n.bicepsLeft).line(n.wristLeft).line(n.wristRight).line(n.bicepsRight).join(l.sleevecap).close().attr("class","fabric"),o&&(l.sa=l.seam.offset(o).attr("class","fabric sa")),n.gridAnchor=new s(0,0),h("grainline",{from:n.centerWrist,to:n.centerBiceps}),e.cutlist.addCut({cut:2,from:"fabric"}),n.logo=n.centerBiceps.shiftFractionTowards(n.centerWrist,.3),p.logo=new c("logo",n.logo),h("title",{at:n.centerBiceps,nr:3,title:"sleeve"}),n.scaleboxAnchor=n.scalebox=n.centerBiceps.shiftFractionTowards(n.centerWrist,.5),h("scalebox",{at:n.scalebox});let m=(new r).move(n.bicepsRight)._curve(n.capQ1Cp1,n.capQ1),u=m.length(),g=e.get("frontArmholeToArmholePitch");if(u===g)n.frontNotch=n.capQ1.clone();else if(u>g)n.frontNotch=m.shiftAlong(g);else{let t=(new r).move(n.capQ1).curve(n.capQ1Cp2,n.capQ2Cp1,n.capQ2).curve(n.capQ2Cp2,n.capQ3Cp1,n.capQ3);n.frontNotch=t.shiftAlong(g-u)}let b=(new r).move(n.bicepsLeft)._curve(n.capQ4Cp2,n.capQ4),k=b.length(),w=e.get("backArmholeToArmholePitch");if(k===w)n.backNotch=n.capQ4.clone();else if(k>w)n.backNotch=b.shiftAlong(w);else{let t=(new r).move(n.capQ4).curve(n.capQ4Cp1,n.capQ3Cp2,n.capQ3).curve(n.capQ3Cp1,n.capQ2Cp2,n.capQ2);n.backNotch=t.shiftAlong(w-k)}return p.frontNotch=new c("notch",n.frontNotch),p.backNotch=new c("bnotch",n.backNotch),h("vd",{id:"hWristToArmholeLeft",from:n.wristLeft,to:n.bicepsLeft,x:n.bicepsLeft.x-o-15}),h("vd",{id:"hFull",from:n.wristLeft,to:n.sleeveTip,x:n.bicepsLeft.x-o-30}),h("hd",{id:"wFull",from:n.bicepsLeft,to:n.bicepsRight,y:n.sleeveTip.y-o-30}),h("hd",{id:"wCuf",from:n.wristLeft,to:n.wristRight,y:n.wristLeft.y+o+30}),h("pd",{id:"lSleevecap",path:l.sleevecap.reverse(),d:-1*o-15}),d}},Te={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"}}}')},ye=new s.pT({data:se,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:i,utils:a}=t.shorthand();if(e.setIfUnset("init",!1),!0!==e.get("init")||t.context.settings.sample){e.set("yScale",1);const t=i.waistToUpperLeg-i.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",a.stretchToScale(o.stretch)),e.set("xScaleLegs",a.stretchToScale(o.legStretch)),e.set("hips",i.hips*e.get("xScale")),e.set("hipsFront",e.get("hips")*o.hipRatioFront);let s=(1-(o.hipRatioFront+o.hipRatioBack))/2;e.set("hipsSide",e.get("hips")*s),e.set("hipsBack",e.get("hips")*o.hipRatioBack),e.set("leg",i.upperLeg*e.get("xScaleLegs")),e.set("legInset",e.get("leg")*o.legRatioInset);let n=1-o.legRatioInset-o.legRatioBack;e.set("legSide",e.get("leg")*n),e.set("legBack",e.get("leg")*o.legRatioBack),e.set("gusset",i.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:i,Path:a,paths:s,Snippet:n,snippets:r,complete:l,macro:c,utils:p,part:h}){Be(h),i.zero=new o(0,0),i.center=i.zero.shift(90,t.get("rise")),i.sideRight=new o(t.get("hipsBack")/2,i.center.y),i.gussetTop=i.center.shift(-90,t.get("riseLength")),i.gussetBottom=i.gussetTop.shift(-90,t.get("gusset")+t.get("legBonus")),i.gussetRight=i.gussetBottom.shift(0,t.get("gusset")*t.get("xScale")/2),i.gussetCpRight=new o(i.gussetRight.x,i.gussetTop.y);let d=p.circlesIntersect(i.gussetRight,t.get("legBack"),i.sideRight,t.get("fullLength"));if(i.legRight=d[1],i.legLeft=i.legRight.flipX(i.center),t.set("backSeamLength",i.sideRight.dist(i.legRight)),t.set("crotchSeamLength",(new a).move(i.gussetTop).curve(i.gussetCpRight,i.gussetRight,i.gussetRight).length()),i.center=i.center.shift(90,t.get("backRise")),i.sideRight=i.sideRight.shift(90,t.get("sideRise")),i.centerCpRight=new o(i.sideRight.x/2,i.center.y),i.centerCpLeft=i.centerCpRight.flipX(),s.seam=(new a).move(i.gussetTop).curve(i.gussetCpRight,i.gussetRight,i.gussetRight).line(i.legRight).line(i.sideRight).curve(i.sideRight,i.centerCpRight,i.center).line(i.gussetTop).close().attr("class","fabric"),e){let t=(new a).move(i.legRight).line(i.sideRight).curve(i.sideRight,i.centerCpRight,i.center).offset(e),o=(new a).move(i.gussetTop).curve(i.gussetCpRight,i.gussetRight,i.gussetRight).offset(e),n=(new a).move(i.gussetRight).line(i.legRight).offset(2*e);s.sa=(new a).move(i.gussetTop).line(o.start()).join(o).join(n).join(t).line(i.center).attr("class","fabric sa")}return t.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),i.title=new o(.6*i.sideRight.x,.6*i.gussetTop.y),c("title",{at:i.title,nr:1,title:"back"}),c("cutonfold",{from:i.center,to:i.gussetTop,grainline:!0}),r.logo=new n("logo",i.title.shift(90,50)),r.backNotch=new n("bnotch",i.sideRight.shiftFractionTowards(i.legRight,.5)),l&&(s.sideNote=(new a).move(i.legRight).line(i.sideRight).addClass("hidden"),c("banner",{id:"side",path:s.sideNote,text:"&",classes:"text-sm fill-note center"}),s.gussetNote=(new a).move(i.gussetTop).curve_(i.gussetCpRight,i.gussetRight).addClass("hidden"),c("banner",{id:"gusset",path:s.gussetNote,text:"*",classes:"text-sm fill-note center"})),c("vd",{id:"hCbCrotchToCbWaist",from:i.gussetTop,to:i.center,x:i.center.x-15}),c("vd",{id:"hFull",from:i.gussetRight,to:i.center,x:i.center.x-30}),c("vd",{id:"hSideHemToSideWaist",from:i.legRight,to:i.sideRight,x:i.legRight.x+15+e}),c("vd",{id:"hSideHemToCbWaist",from:i.legRight,to:i.center,x:i.legRight.x+30+e}),c("hd",{id:"wCbWaistToSideWaist",from:i.center,to:i.sideRight,y:i.center.y-15-e}),c("hd",{id:"wCbCrotchToInnerLeg",from:i.gussetTop,to:i.gussetRight,y:i.gussetRight.y+15+2*e}),c("hd",{id:"wFull",from:i.gussetTop,to:i.legRight,y:i.gussetRight.y+30+2*e}),c("ld",{id:"lLegOpening",from:i.gussetRight,to:i.legRight,d:-15-2*e}),h}};const Le={name:"bruce.inset",after:Se,draft:function({store:t,sa:e,Point:o,points:i,Path:a,paths:s,complete:n,macro:r,Snippet:l,snippets:c,part:p}){return Be(p),i.topLeft=new o(0,0),i.bottomLeft=i.topLeft.shift(-90,t.get("heightInset")),i.bottomRight=new o(t.get("legInset"),i.bottomLeft.y),i.tip=new o(1.111*i.bottomRight.x,i.bottomRight.y-t.get("gusset")),i.tip=i.bottomRight.shiftTowards(i.tip,t.get("crotchSeamLength")-t.get("gusset")*(1-t.get("gussetInsetRatio"))),i.tipCpTop=new o(1.2*t.get("gusset"),0),i.tipCpBottom=i.tip.shift(i.bottomRight.angle(i.tip)+90,1.5*t.get("gusset")),t.set("curve",(new a).move(i.tip).curve(i.tipCpBottom,i.tipCpTop,i.topLeft).length()),s.saBase=(new a).move(i.bottomRight).line(i.tip).curve(i.tipCpBottom,i.tipCpTop,i.topLeft).line(i.bottomLeft).hide(),s.hemBase=(new a).move(i.bottomLeft).line(i.bottomRight).hide(),s.seam=s.saBase.join(s.hemBase).close().attr("class","fabric"),e&&(s.sa=s.saBase.offset(e).join(s.hemBase.offset(2*e)).close().attr("class","fabric sa")),t.cutlist.addCut({cut:2,from:"fabric"}),i.title=i.topLeft.shiftFractionTowards(i.bottomRight,.5),r("title",{at:i.title.shift(-90,15),nr:4,title:"inset"}),r("grainline",{from:i.bottomLeft.shift(0,15),to:i.topLeft.shift(0,15)}),c.notch=new l("notch",(new a).move(i.tip).curve(i.tipCpBottom,i.tipCpTop,i.topLeft).shiftFractionAlong(.5)),n&&(s.sideNote=(new a).move(i.bottomLeft).line(i.topLeft).addClass("hidden"),s.gussetNote=(new a).move(i.bottomRight).line(i.tip).addClass("hidden"),s.curveNote=(new a).move(i.tip).curve(i.tipCpBottom,i.tipCpTop,i.topLeft).addClass("hidden"),r("banner",{id:"side",path:s.sideNote,text:"#",dy:7,classes:"text-sm fill-note center"}),r("banner",{id:"gusset",path:s.gussetNote,text:"*",classes:"text-sm fill-note center"}),r("banner",{id:"curve",path:s.curveNote,text:"~",classes:"text-sm fill-note center"})),r("vd",{id:"hFull",from:i.bottomLeft,to:i.topLeft,x:i.topLeft.x-15-e}),r("vd",{id:"hGusset",from:i.bottomRight,to:i.tip,x:i.tip.x+15+e}),r("hd",{id:"wLeg",from:i.bottomLeft,to:i.bottomRight,y:i.bottomRight.y+15+e}),r("hd",{id:"wFull",from:i.bottomLeft,to:i.tip,y:i.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:i,Path:a,paths:s,options:n,complete:r,macro:l,snippets:c,Snippet:p,log:h,part
1:d}){let f=!1;Be(d),i.topRight=new o(t.get("hipsFront")/2,0),i.topLeft=i.topRight.flipX(),i.midMid=new o(0,t.get("heightFront")),i.midRight=new o(i.topRight.x+.05*t.get("heightFront"),i.midMid.y),i.midLeft=i.midRight.flipX(),t.set("frontNotch",i.topRight.dist(i.midRight)),i.bottomMid=new o(0,t.get("riseLength")),i.rightTuskRight=new o(t.get("gusset")*t.get("xScale")*(1-t.get("gussetInsetRatio")),i.bottomMid.y),i.rightTuskLeft=i.bottomMid.clone(),i.curveRightCpTop=new o(i.midRight.x-1.3*t.get("gusset"),i.midRight.y),i.curveRightCpBottom=new o(i.rightTuskRight.x,i.rightTuskRight.y-1.3*t.get("gusset"));let m,u=Pe(a,i,t);const g=["rightTuskRight","rightTuskLeft","curveRightCpBottom"];let b=[],k=!1;Math.abs(u)<=1&&(k=!0);let w=0;for(;!k;){for(const t of g)b[t]=i[t];if(m=u,Re(u,i),u=Pe(a,i,t),w++,Math.abs(u)<=1)k=!0;else if((Math.abs(u)>Math.abs(m)||w>=150)&&(k=!0,h.warn("Unable to adjust the front tusk length to fit the given measurements, after "+w+" iterations."),f=!0,Math.abs(u)>Math.abs(m)))for(const t of g)i[t]=b[t]}if(i.bottomMid=new o(0,i.rightTuskLeft.y),n.bulge>0){for(let t of["curveRightCpTop","curveRightCpBottom","rightTuskRight","rightTuskLeft"])i[t]=i[t].rotate(n.bulge,i.midRight);i.dartJoin=new o(0,i.midMid.y+.65*i.midMid.dist(i.bottomMid)),i.dartCpRight=new o(0,i.dartJoin.y+i.dartJoin.dist(i.bottomMid)*(n.bulge/30)),i.dartCpRight=i.dartCpRight.rotate(n.bulge,i.dartJoin),i.dartCpLeft=i.dartCpRight.flipX()}else i.dartJoin=i.rightTuskLeft;if(i.leftTuskRight=i.rightTuskLeft.flipX(),i.leftTuskLeft=i.rightTuskRight.flipX(),i.curveLeftCpBottom=i.curveRightCpBottom.flipX(),i.curveLeftCpTop=i.curveRightCpTop.flipX(),i.topMid=new o(0,i.topLeft.y),i.topLeft=i.topLeft.shift(90,t.get("frontRise")),i.topRight=i.topRight.shift(90,t.get("frontRise")),i.topMidCpRight=new o(i.topRight.x/2,i.topMid.y),i.topMidCpLeft=i.topMidCpRight.flipX(),n.bulge>0?(s.trimBase=(new a).move(i.rightTuskLeft).curve(i.rightTuskLeft,i.dartCpRight,i.dartJoin).curve(i.dartCpLeft,i.leftTuskRight,i.leftTuskRight),s.seamStart=(new a).move(i.midLeft).line(i.topLeft).curve(i.topLeft,i.topMidCpLeft,i.topMid).curve(i.topMidCpRight,i.topRight,i.topRight).line(i.midRight).curve(i.curveRightCpTop,i.curveRightCpBottom,i.rightTuskRight).line(i.rightTuskLeft),s.seamEnd=(new a).move(i.leftTuskRight).line(i.leftTuskLeft).curve(i.curveLeftCpBottom,i.curveLeftCpTop,i.midLeft),s.seamStart.hide(),s.trimBase.hide(),s.seamEnd.hide(),s.seam=s.seamStart.join(s.trimBase).join(s.seamEnd)):s.seam=(new a).move(i.midLeft).line(i.topLeft).curve(i.topLeft,i.topMidCpLeft,i.topMid).curve(i.topMidCpRight,i.topRight,i.topRight).line(i.midRight).curve(i.curveRightCpTop,i.curveRightCpBottom,i.rightTuskRight).line(i.leftTuskLeft).curve(i.curveLeftCpBottom,i.curveLeftCpTop,i.midLeft),s.seam.close().attr("class","fabric"),e)if(n.bulge>0){let t=s.seamStart.offset(-1*e),o=s.trimBase.offset(-1*e).trim(),i=s.seamEnd.offset(-1*e);s.sa=t.join(o).join(i).close().attr("class","fabric sa")}else s.sa=s.seam.offset(-1*e).trim().close().attr("class","fabric sa");return t.cutlist.addCut({cut:2,from:"fabric"}),l("title",{at:i.midMid,nr:2,title:"front"}),l("grainline",{from:i.dartJoin,to:i.topMid}),c.sideNotch=new p("notch",i.midRight),i.curveNotch=(new a).move(i.midRight).curve(i.curveRightCpTop,i.curveRightCpBottom,i.rightTuskRight).shiftFractionAlong(.5),c.curveNotch1=new p("notch",i.curveNotch),c.curveNotch2=new p("notch",i.curveNotch.flipX()),r&&(s.sideNoteLeft=(new a).move(i.midLeft).line(i.topLeft).addClass("hidden"),s.sideNoteRight=(new a).move(i.topRight).line(i.midRight).addClass("hidden"),s.tuskNoteLeft=(new a).move(i.leftTuskLeft).line(i.leftTuskRight).addClass("hidden"),s.tuskNoteRight=(new a).move(i.rightTuskLeft).line(i.rightTuskRight).addClass("hidden"),s.curveNoteRight=(new a).move(i.rightTuskRight).curve(i.curveRightCpBottom,i.curveRightCpTop,i.midRight).addClass("hidden"),s.curveNoteLeft=(new a).move(i.midLeft).curve(i.curveLeftCpTop,i.curveLeftCpBottom,i.leftTuskLeft).addClass("hidden"),l("banner",{id:"sideLeft",path:s.sideNoteLeft,text:"#",dy:7,classes:"text-sm fill-note center"}),l("banner",{id:"sideRight",path:s.sideNoteRight,text:"#",dy:7,classes:"text-sm fill-note center"}),l("banner",{id:"tuskLeft",path:s.tuskNoteLeft,text:"*",spaces:2,classes:"text-sm fill-note center"}),l("banner",{id:"tuskRight",path:s.tuskNoteRight,text:"*",spaces:2,classes:"text-sm fill-note center"}),l("banner",{id:"curveLeft",path:s.curveNoteLeft,text:"~",classes:"text-sm fill-note center"}),l("banner",{id:"curveRight",path:s.curveNoteRight,text:"~",classes:"text-sm fill-note center"})),l("hd",{id:"wWaist",from:i.topLeft,to:i.topRight,y:i.topLeft.y-15-e}),l("hd",{id:"wFull",from:i.midLeft,to:i.midRight,y:i.topLeft.y-30-e}),l("vd",{id:"hInsetPointToCfWaist",from:i.midLeft,to:i.topMid,x:i.midLeft.x-15-e}),l("vd",{id:"hInsetPointToTop",from:i.midLeft,to:i.topLeft,x:i.midLeft.x-30-e}),0===n.bulge?(l("hd",{id:"wTusk",from:i.leftTuskLeft,to:i.rightTuskRight,y:i.leftTuskLeft.y+15+e}),l("vd",{id:"hFull",from:i.leftTuskLeft,to:i.topLeft,x:i.midLeft.x-45-e})):(l("vd",{id:"hTuskOuterToTop",from:i.leftTuskLeft,to:i.topLeft,x:i.midLeft.x-45-e}),l("vd",{id:"hFull",from:i.leftTuskRight,to:i.topLeft,x:i.midLeft.x-60-e}),i.narrowRight=(new a).move(i.midRight).curve(i.curveRightCpTop,i.curveRightCpBottom,i.rightTuskRight).edge("left"),i.narrowLeft=(new a).move(i.midLeft).curve(i.curveLeftCpTop,i.curveLeftCpBottom,i.leftTuskLeft).attr("class","various stroke-xl lashed").edge("right"),l("hd",{id:"wBetweenInsets",from:i.narrowLeft,to:i.narrowRight,y:i.narrowLeft.y}),l("hd",{id:"wBetweenTustInnerTips",from:i.leftTuskRight,to:i.rightTuskLeft,y:i.rightTuskLeft.y+15+e}),l("hd",{id:"wBetweenTustOuterTips",from:i.leftTuskLeft,to:i.rightTuskRight,y:i.rightTuskLeft.y+30+e}),l("ld",{id:"lTustBottom",from:i.rightTuskLeft,to:i.rightTuskRight,d:-15-e}),l("vd",{id:"hInflectionToTop",from:i.narrowRight,to:i.topRight,x:i.topRight.x+15+e}),l("vd",{id:"hTustJointToTop",from:i.dartJoin,to:i.topRight,x:i.topRight.x+30+e})),f&&h.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."),d}};const We={name:"bruce.side",after:[Se,Fe],draft:function({store:t,sa:e,Point:o,points:i,Path:a,paths:s,complete:n,macro:r,utils:l,snippets:c,Snippet:p,log:h,part:d}){let f=!1;Be(d),i.zero=new o(0,0),i.topLeft=i.zero.shift(90,t.get("rise")),i.topRight=new o(t.get("hipsSide"),i.topLeft.y),i.bottomRight=i.topRight.shift(-90,t.get("fullLength"));let m=l.circlesIntersect(i.bottomRight,t.get("legSide"),i.topLeft,t.get("backSeamLength"));return m?i.bottomLeft=m[0]:(h.warn("Unable to calculate a correct bottom left point on the side part."),f=!0,i.bottomLeft=i.bottomRight.shiftFractionTowards(i.topLeft,.5)),t.set("sideSeamLength",i.topRight.dist(i.bottomRight)),i.topLeft=i.topLeft.shift(90,t.get("sideRise")),i.topRight=i.topRight.shift(90,t.get("frontRise")),s.saBase=(new a).move(i.bottomLeft).line(i.topLeft).line(i.topRight).line(i.bottomRight),s.hemBase=(new a).move(i.bottomRight).line(i.bottomLeft),s.saBase.hide(),s.hemBase.hide(),s.seam=s.saBase.join(s.hemBase).close().attr("class","fabric"),e&&(s.sa=s.saBase.offset(-1*e).join(s.hemBase.offset(-2*e)).close().attr("class","fabric sa")),t.cutlist.addCut({cut:2,from:"fabric"}),i.anchor=i.topLeft,i.title=i.topLeft.shiftFractionTowards(i.bottomRight,.5),r("title",{at:i.title.shift(90,30),nr:3,title:"side"}),r("grainline",{from:new o(i.bottomRight.x/2,i.bottomRight.y),to:new o(i.bottomRight.x/2,i.topRight.y)}),r("scalebox",{at:i.title.shift(-90,40)}),c.frontNotch=new p("notch",i.topRight.shiftTowards(i.bottomRight,t.get("frontNotch"))),c.backNotch=new p("bnotch",i.topLeft.shiftFractionTowards(i.bottomLeft,.5)),n&&(s.backNote=(new a).move(i.bottomLeft).line(i.topLeft).addClass("hidden"),s.frontNote=(new a).move(i.bottomRight).line(i.topRight).addClass("hidden"),r("banner",{id:"back",path:s.backNote,text:"&",dy:7,classes:"text-sm fill-note center"}),r("banner",{id:"front",path:s.frontNote,text:"#",classes:"text-sm fill-note center"})),r("vd",{id:"hBack",from:i.bottomLeft,to:i.topLeft,x:i.topLeft.x-15-e}),r("vd",{id:"hFront",from:i.bottomRight,to:i.topRight,x:i.topRight.x+15+e}),r("hd",{id:"wWaist",from:i.topLeft,to:i.topRight,y:i.topLeft.y-15-e}),r("hd",{id:"wHem",from:i.bottomLeft,to:i.bottomRight,y:i.bottomLeft.y+15+e}),f&&h.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."),d}},He={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."}}}')},Ae=new s.pT({data:xe,parts:[Se,We,Fe,Le]}),Oe=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}'),De=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}'),Ee={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 Ie(t){let{store:e,measurements:o,options:i}=t.shorthand();e.set("chest",o.chest*(1+i.chestEase)),e.set("waist",o.waist*(1+i.waistEase)),e.set("seat",o.seat*(1+i.seatEase)),e.set("waistReduction",e.get("chest")-e.get("waist"))}const Ne={name:"carlton.front",from:N,hide:s.V9.HIDE_TREE,measurements:["waist","waistToFloor","waistToSeat","seat"],options:{chestEase:{pct:10,min:5,max:20,...(0,s.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,s.Wx)("waist"),menu:"fit"},seatEase:{pct:14,min:8,max:25,...(0,s.Wx)("seat"),menu:"fit"},innerPocketWeltHeight:{pct:3.5,min:2.5,max:5,menu:"pockets"}},draft:function({sa:t,snippets:e,Snippet:o,utils:i,store:a,complete:s,points:n,measurements:r,options:l,macro:c,Point:p,paths:h,Path:d,part:f}){Ie(f),n.waist=n.cfWaist.shift(0,a.get("chest")/4-a.get("waistReduction")/8),n.waistCp1=n.waist.shift(-90,n.waist.dy(n.hips)/2),n.waistCp2=n.waist.shift(90,n.armhole.dy(n.waist)/2),n.cfSeat=n.cfWaist.shift(-90,r.waistToSeat),n.seat=n.cfSeat.shift(0,a.get("seat")/4),n.seatCp2=n.seat.shift(90,n.waist.dy(n.seat)/3),n.cfHem=n.cfWaist.shift(-90,r.waistToFloor*l.length),n.hem=new p(n.seat.x,n.cfHem.y),a.set("waistToHem",n.cfHem.y-n.waist.y);let m=n.waist.x*l.buttonSpacingHorizontal,u=n.waist.dy(n.hips)/1.5;n.button1Left=n.cfHips.shift(180,m/2),n.button1Right=n.cfHips.shift(0,m/2),n.button2Left=n.button1Left.shift(90,u),n.button2Right=n.button2Left.shift(0,m),n.button3Left=n.button2Left.shift(90,u),n.button3Right=n.button3Left.shift(0,m),n.c
1ollarEdge=new p(n.button1Left.x-r.waist*l.frontOverlap,n.cfNeck.y),n.hemEdge=new p(n.collarEdge.x,n.hem.y),n.collarTip=n.collarEdge.shiftFractionTowards(n.cfNeck,l.lapelReduction),n.lapelStraightEnd=new p(n.collarEdge.x,n.armhole.y),n.lapelStraightEndCp1=n.lapelStraightEnd.shiftFractionTowards(n.collarEdge,.7),n.pocketTopLeft=new p(n.button1Right.x+n.button1Right.dx(n.hips)*l.pocketPlacementHorizontal,n.button1Right.y+n.button1Right.dy(n.button3Right)*l.pocketPlacementVertical);let g=n.button1Right.dx(n.hips)*l.pocketWidth,b=g*(1+l.pocketHeight);if(n.pocketTopRight=n.pocketTopLeft.shift(0,g),n.pocketBottomLeft=n.pocketTopLeft.shift(-90,b),n.pocketBottomRight=n.pocketTopRight.shift(-90,b),l.pocketRadius>0){let t=g*l.pocketRadius;const e={pocketRoundLeft:c("round",{id:"pocketRoundLeft",from:n.pocketTopLeft,to:n.pocketBottomRight,via:n.pocketBottomLeft,radius:t}),pocketRoundRight:c("round",{id:"pocketRoundRight",from:n.pocketBottomLeft,to:n.pocketTopRight,via:n.pocketBottomRight,radius:t})};for(const o in e)for(const t of["start","cp1","cp2","end"])n[`${o}${i.capitalize(t)}
1`]=n[e[o].points[t]].copy();a.set("pocketRadius",t)}a.set("pocketWidth",g),a.set("pocketHeight",b),n.pocketFlapMid=n.pocketTopLeft.shift(0,g/2);let k=.3*b;if(a.set("pocketFlapHeight",k),n.pocketFlapTopLeft=new p(n.pocketTopLeft.x-.005*g,n.pocketTopLeft.y-k/4),n.pocketFlapBottomLeft=new p(n.pocketFlapTopLeft.x,n.pocketTopLeft.y+.75*k),n.pocketFlapTopRight=n.pocketFlapTopLeft.flipX(n.pocketFlapMid),n.pocketFlapBottomRight=n.pocketFlapBottomLeft.flipX(n.pocketFlapMid),l.pocketFlapRadius>0){let t=g*l.pocketFlapRadius;const e={pocketFlapRoundLeft:c("round",{id:"pocketFlapRoundLeft",from:n.pocketFlapTopLeft,to:n.pocketFlapBottomRight,via:n.pocketFlapBottomLeft,radius:t}),pocketFlapRoundRight:c("round",{id:"pocketFlapRoundRight",from:n.pocketFlapBottomLeft,to:n.pocketFlapTopRight,via:n.pocketFlapBottomRight,radius:t})};for(const o in e)for(const t of["start","cp1","cp2","end"])n[`${o}${i.capitalize(t)}`]=n[e[o].points[t]].copy();a.set("pocketFlapRadius",t)}n.chestPocketAnchor=new p(n.waist.x*l.chestPocketPlacement,n.button2Right.shiftFractionTowards(n.button3Right,.2).y);let w=n.armhole.dy(n.chestPocketAnchor)*l.chestPocketHeight,C=w*l.chestPocketWidth;a.set("chestPocketHeight",w),a.set("chestPocketWidth",C),n.chestPocketBottomLeft=n.chestPocketAnchor.shift(180,C/2),n.chestPocketTopLeft=n.chestPocketBottomLeft.shift(90,w),n.chestPocketBottomRight=n.chestPocketBottomLeft.flipX(n.chestPocketAnchor),n.chestPocketTopRight=n.chestPocketTopLeft.flipX(n.chestPocketAnchor);for(let y of["chestPocketTopLeft","chestPocketBottomLeft","chestPocketTopRight","chestPocketBottomRight"])n[y]=n[y].rotate(l.chestPocketAngle,n.chestPocketAnchor);a.set("chestPocketBagDepth",n.button3Left.dx(n.chestPocketBottomLeft)),n.innerPocketAnchor=new p(n.waist.x*l.innerPocketPlacement,n.button2Right.shiftFractionTowards(n.button3Right,1.5).y);let v=n.waist.x*l.innerPocketWidth,T=v*l.innerPocketWeltHeight;if(a.set("innerPocketWeltHeight",T),a.set("innerPocketWidth",v),n.innerPocketTop=n.innerPocketAnchor.shift(90,T),n.innerPocketBottom=n.innerPocketAnchor.shift(-90,T),n.innerPocketLeft=n.innerPocketAnchor.shift(180,v/2),n.innerPocketRight=n.innerPocketLeft.flipX(n.innerPocketAnchor),n.innerPocketTopLeft=n.innerPocketLeft.shift(90,T),n.innerPocketTopRight=n.innerPocketTopLeft.flipX(n.innerPocketAnchor),n.innerPocketBottomLeft=n.innerPocketLeft.shift(-90,T),n.innerPocketBottomRight=n.innerPocketBottomLeft.flipX(n.innerPocketAnchor),n.rollLineEdge=n.shoulder.shiftFractionTowards(n.neck,1.15),n.rollLineStart=new p(n.collarEdge.x,n.button3Left.y),n.rollLineEnd=i.lineIntersectsCurve(n.rollLineStart,n.rollLineEdge,n.cfNeck,n.cfNeckCp1,n.neckCp2Front,n.neck),n.flbX=n.button1Right.shift(0,n.button1Right.dx(n.pocketTopLeft)/2),n.flbHem=new p(n.flbX.x,n.hemEdge.y),n.flbHem.x<=n.cfNeck.x)n.flbTop=new p(n.flbX.x,n.cfNeck.y);else if(n.flbHem.x<n.neck.x)n.flbTop=i.lineIntersectsCurve(n.flbHem,n.flbX.shift(90,2*n.flbHem.y),n.cfNeck,n.cfNeckCp1,n.neckCp2Front,n.neck);else{if(!(n.flbHem.x<n.shoulder.x))throw new Error("Could not find intersection of facing/lining boundary with neckline");n.flbTop=i.beamsIntersect(n.flbHem,n.flbX,n.neck,n.shoulder)}a.set("frontCollarLength",(new d).move(n.cfNeck).curve(n.cfNeckCp1,n.neckCp2Front,n.neck).length()),a.set("library.twoPartSleeve.frontArmholePitchToShoulder",(new d).move(n.armholePitch).curve(n.armholePitchCp2,n.shoulderCp1,n.shoulder).length());for(let y in h)-1===["frontArmhole","frontCollar","chest","waist"].indexOf(y)&&delete h[y];for(let y in e)delete e[y];return h.saBase=(new d).move(n.hem).line(n.seat).curve(n.seatCp2,n.waistCp1,n.waist).curve_(n.waistCp2,n.armhole).curve(n.armholeCp2,n.armholeHollowCp1,n.armholeHollow).curve(n.armholeHollowCp2,n.armholePitchCp1,n.armholePitch).join(h.frontArmhole).line(n.s3CollarSplit).join(h.frontCollar).line(n.collarTip)._curve(n.lapelStraightEndCp1,n.lapelStraightEnd).line(n.hemEdge).line(n.flbHem),h.hemBase=(new d).move(n.flbHem).line(n.hem),h.saBase.hide(),h.hemBase.hide(),h.seam=h.saBase.join(h.hemBase).close().addClass("fabric"),t&&(h.sa=h.saBase.offset(t).join(h.hemBase.offset(3*t)).close().addClass("fabric sa")),s&&(h.rollLine=(new d).move(n.rollLineStart).line(n.rollLineEnd).addClass("note help"),h.chestPiece=(new d).move(n.rollLineStart).curve(n.button3Right,n.waistCp2,n.armhole).addClass("note help"),h.flb=(new d).move(n.flbHem).line(n.flbTop
1).addClass("note help"),c("banner",{id:"flbFacing",path:h.flb,text:"carlton:flbFacingSide",classes:"text-sm fill-fabric center",repeat:66}),c("banner",{id:"flbLining",path:h.flb,text:"carlton:flbLiningSide",dy:7,classes:"text-sm fill-lining center",repeat:66}),h.pocket=(new d).move(n.pocketTopLeft),l.pocketRadius>0?h.pocket=h.pocket.line(n.pocketRoundLeftStart).curve(n.pocketRoundLeftCp1,n.pocketRoundLeftCp2,n.pocketRoundLeftEnd).line(n.pocketRoundRightStart).curve(n.pocketRoundRightCp1,n.pocketRoundRightCp2,n.pocketRoundRightEnd):h.pocket=h.pocket.line(n.pocketBottomLeft).line(n.pocketBottomRight),h.pocket=h.pocket.line(n.pocketTopRight).line(n.pocketTopLeft).close().addClass("note help"),h.pocketFlap=(new d).move(n.pocketFlapTopLeft),l.pocketFlapRadius>0?h.pocketFlap=h.pocketFlap.line(n.pocketFlapRoundLeftStart).curve(n.pocketFlapRoundLeftCp1,n.pocketFlapRoundLeftCp2,n.pocketFlapRoundLeftEnd).line(n.pocketFlapRoundRightStart).curve(n.pocketFlapRoundRightCp1,n.pocketFlapRoundRightCp2,n.pocketFlapRoundRightEnd):h.pocketFlap=h.pocketFlap.line(n.pocketFlapBottomLeft).line(n.pocketFlapBottomRight),h.pocketFlap=h.pocketFlap.line(n.pocketFlapTopRight).line(n.pocketFlapTopLeft).close().addClass("note help"),h.chestPocket=(new d).move(n.chestPocketTopLeft).line(n.chestPocketBottomLeft).line(n.chestPocketBottomRight).line(n.chestPocketTopRight).line(n.chestPocketTopLeft).close().addClass("note help"),h.innerPocket=(new d).move(n.innerPocketTopLeft).line(n.innerPocketBottomLeft).line(n.innerPocketBottomRight).line(n.innerPocketTopRight).line(n.innerPocketTopLeft).close().addClass("note help"),c("banner",{id:"chestLine",classes:"center contrast help",path:h.chest,text:"carlton:chestLine"}),c("banner",{id:"waistLine",classes:"center contrast help",path:h.waist,text:"carlton:waistLine"}),h.hip=(new d).move(n.cfHips).line(n.hips).addClass("help contrast"),c("banner",{id:"hipLine",classes:"center contrast help",path:h.hip,text:"carlton:hipLine"}),h.seat=(new d).move(n.cfSeat).line(n.seat).addClass("help contrast"),c("banner",{id:"seatLine",classes:"center contrast help",path:h.seat,text:"carlton:seatLine"})),a.cutlist.removeCut(),a.cutlist.addCut({cut:2,from:"fabric"}),c("title",{at:n.title,nr:1,title:"front"}),e.button1Left=new o("button",n.button1Left).attr("data-scale",2),e.button1Right=new o("button",n.button1Right).attr("data-scale",2),e.button2Left=new o("button",n.button2Left).attr("data-scale",2),e.button2Right=new o("button",n.button2Right).attr("data-scale",2),e.button3Left=new o("button",n.button3Left).attr("data-scale",2),e.button3Right=new o("button",n.button3Right).attr("data-scale",2),c("sprinkle",{snippet:"notch",on:["shoulder","cfNeck","rollLineStart","waist","seat","frontArmholePitch"]}),n.logo=new p(n.chestPocketTopRight.x,n.armhole.y),e.logo=new o("logo",n.logo),c("grainline",{from:n.cfHem,to:n.cfNeck}),c("ld",{id:"wHemClosureToLining",from:n.hemEdge,to:n.flbHem,d:15}),c("ld",{id:"wLiningToHemSide",from:n.flbHem,to:n.hem,d:15}),c("hd",{id:"wHemFull",from:n.hemEdge,to:n.hem,y:n.hem.y+15+3*t}),c("hd",{id:"wClosureToPocketLeft",from:n.rollLineStart,to:n.pocketTopLeft,y:n.pocketFlapBottomLeft.y}),c("vd",{id:"hPocketFlapTopToWaist",from:n.pocketFlapTopRight,to:n.waist,x:n.pocketTopRight.x-15}),c("vd",{id:"hPocketTopToWaist",from:n.pocketTopRight,to:n.waist,x:n.pocketTopRight.x-30}),c("vd",{id:"hChestPocketBottomToWaist",from:n.chestPocketBottomLeft,to:n.waist,x:n.chestPocketBottomLeft.x-15}),c("hd",{id:"wClosureToChestPocketBottomLeft",from:n.rollLineStart,to:n.chestPocketBottomLeft,y:n.chestPocketBottomLeft.y+15}),c("hd",{id:"wClosureToButtonLeft",from:n.rollLineStart,to:n.button3Left,y:n.button3Left.y+15}),c("hd",{id:"wClosureToButtonRight",from:n.button3Left,to:n.button3Right,y:n.button3Left.y+15}),c("vd",{id:"hHemToSeat",from:n.hem,to:n.seat,x:n.hem.x+t+15}),c("vd",{id:"hHemToWaist",from:n.hem,to:n.waist,x:n.hem.x+t+30}),c("vd",{id:"hHemToArmhole",from:n.hem,to:n.armhole,x:n.hem.x+t+45}),c("vd",{id:"hArmholeToArmholePitch",from:n.armhole,to:n.armholePitch,x:n.armhole.x+t+15}),c("vd",{id:"hArmholetoShoulder",from:n.armhole,to:n.s3ArmholeSplit,x:n.armhole.x+t+30}),c("vd",{id:"hArmholeToHps",from:n.armhole,to:n.s3CollarSplit,x:n.armhole.x+t+45}),c("vd",{id:"hTopButtonToClosureTop",from:n.rollLineStart,to:n.collarTip,x:n.rollLineStart.x-t-15}),c("vd",{id:"hTopButtonToButtonBelow",from:n.button2Left,to:n.rollLineStart,x:n.rollLineStart.x-t-15}),c("vd",{id:"hMiddleButtonToBottomButton",from:n.button1Left,to:n.button2Left,x:n.rollLineStart.x-t-15}),c("vd",{id:"hHemToClosureTop",from:n.hemEdge,to:n.collarTip,x:n.rollLineStart.x-t-30}),c("vd",{id:"hFull",from:n.hemEdge,to:n.s3CollarSplit,x:n.rollLineStart.x-t-45}),c("hd",{id:"wLapelCurve",from:n.lapelStraightEnd,to:n.collarTip,y:n.collarTip.y-t-15}),c("hd",{id:"wClosureTopToCf",from:n.lapelStraightEnd,to:n.cfNeck,y:n.collarTip.y-t-30}),c("hd",{id:"wClosureTopToLapelFoldTop",from:n.lapelStraightEnd,to:n.rollLineEnd,y:n.collarTip.y-t-45}),c("hd",{id:"wClosureTopToHps",from:n.lapelStraightEnd,to:n.neck,y:n.s3CollarSplit.y-t-15}),c("hd",{id:"wClosureTopToArmholePitchPoint",from:n.lapelStraightEnd,to:n.armholePitch,y:n.s3CollarSplit.y-t-30}),c("hd",{id:"wClosureTopToShoulder",from:n.lapelStraightEnd,to:n.s3ArmholeSplit,y:n.s3CollarSplit.y-t-45}),c("hd",{id:"wFull",from:n.lapelStraightEnd,to:n.armhole,y:n.s3CollarSplit.y-t-60}),f}};const Me={name:"carlton.frontFacing",from:Ne,draft:function({sa:t,snippets:e,Snippet:o,store:i,points:a,macro:s,expand:n,paths:r,Path:l,part:c}){if(!n)return i.flag.note({msg:"carlton:cutFrontFacing",notes:"flag:partHiddenByExpand",suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),i.flag.preset("expandIsOff"),c.hide();i.flag.preset("expandIsOn"),r.seam=(new l).move(a.hemEdge).line(a.flbHem).line(a.flbTop).join(r.frontCollar.split(a.flbTop)[1]).line(a.collarTip)._curve(a.lapelStraightEndCp1,a.lapelStraightEnd).line(a.hemEdge).close().addClass("fabric"),t&&(r.sa=r.seam.offset(t).addClass("fabric sa")),s("rmad");for(const p in r)["seam","sa"].includes(p)||delete r[p];for(const p in e)delete e[p];return i.cutlist.removeCut(),i.cutlist.addCut({cut:2,from:"fabric"}),a.title=a.cfNeck.shift(-90,180),s("title",{at:a.title,nr:"1a",title:"frontFacing",align:"center"}),a.logo=a.title.shift(-90,100),e.logo=new o("logo",a.logo),s("grainline",{from:a.cfHem,to:a.cfNeck}),s("hd",{id:"wTop",from:a.collarTip,to:a.flbTop,y:a.flbTop.y-t-15}),s("hd",{id:"wFull",from:a.rollLineStart,to:a.flbTop,y:a.flbTop.y-t-30}),s("vd",{id:"hHemToCollar",from:a.hemEdge,to:a.collarTip,x:a.hemEdge.x-t-15}),s("vd",{id:"hFull",from:a.hemEdge,to:a.flbTop,x:a.hemEdge.x-t-30}),c}};const _e={name:"carlton.frontLining",from:Ne,draft:function({sa:t,snippets:e,Snippet:o,store:i,points:a,macro:s,Point:n,expand:r,paths:l,Path:c,part:p}){if(!r)return i.flag.note({msg:"carlton:cutFrontLining",notes:"flag:partHiddenByExpand",suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),i.flag.preset("expandIsOff"),p.hide();i.flag.preset("expandIsOn"),l.seam=(new c).move(a.flbHem).line(a.hem).line(a.seat).curve(a.seatCp2,a.waistCp1,a.waist).curve_(a.waistCp2,a.armhole).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.armholePitchCp1,a.armholePitch).join(l.frontArmhole).line(a.s3CollarSplit).join(l.frontCollar.split(a.flbTop)[0]).line(a.flbHem).close().addClass("lining"),t&&(l.sa=l.seam.offset(t).addClass("lining sa")),s("rmad"),s("rmbanner","flbFacing"),s("rmbanner","flbLining");for(const h in l)["seam","sa"].includes(h)||delete l[h];for(const h in e)delete e[h];return i.cutlist.removeCut(),i.cutlist.addCut({cut:2,from:"lining"}),a.title=a.flbTop.shiftFractionTowards(a.seat,.5),s("rmtitle"),s("title",{at:a.title,nr:"1b",title:"frontLining",align:"center"}),a.logo=a.title.shift(-90,100),e.logo=new o("logo",a.logo),a.grainlineTop=a.flbTop.shift(0,30),a.grainlineBottom=new n(a.grainlineTop.x,a.hemEdge.y),s("grainline",{from:a.grainlineBottom,to:a.grainlineTop}),s("hd",{id:"wToHps",from:a.flbTop,to:a.s3CollarSplit,y:a.s3CollarSplit.y-t-15}),s("hd",{id:"wToHps",from:a.flbTop,to:a.s3CollarSplit,y:a.s3CollarSplit.y-t-15}),s("hd",{id:"wToShoulder",from:a.flbTop,to:a.s3ArmholeSplit,y:a.s3CollarSplit.y-t-30}),s("hd",{id:"wToArmhole",from:a.flbTop,to:a.armhole,y:a.s3CollarSplit.y-t-45}),s("hd",{id:"wToSeat",from:a.flbTop,to:a.seat,y:a.s3CollarSplit.y-t-60}),s("vd",{id:"hToCollar",from:a.flbHem,to:a.flbTop,x:a.flbTop.x-t-15}),s("vd",{id:"hFull",from:a.flbHem,to:a.s3CollarSplit,x:a.flbTop.x-t-30}),p}};const je={name:"carlton.back",from:I,hide:s.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,s.Wx)("waist"),menu:"fit"},seatEase:{pct:14,min:8,max:25,...(0,s.Wx)("seat"),menu:"fit"}},draft:function({sa:t,snippets:e,Snippet:o,store:i,complete:a,points:s,measurements:n,options:r,macro:l,Point:c,paths:p,Path:
1h,part:d}){Ie(d);let f=n.hpsToWaistBack*r.beltWidth;i.set("beltWidth",f),s.bpStart=new c(0,s.armholePitch.y),s.bpTop=new c(n.chest*r.backPleat*-1,s.armholePitch.y),s.bpBottom=new c(s.bpTop.x,s.cbWaist.y-f/2),s.bpTriangleEdge=s.bpStart.shift(0,.6*s.bpTop.dx(s.bpStart)),s.bpTriangleTip=s.bpStart.shift(90,s.bpStart.dx(s.bpTriangleEdge)),s.waist=new c(i.get("chest")/4-i.get("waistReduction")/8,s.bpBottom.y),s.waistCp2=s.waist.shift(90,s.armhole.dy(s.waist)/3),s.cbWaist=new c(0,s.bpBottom.y),s.dartCenter=s.cbWaist.shiftFractionTowards(s.waist,.4),s.dartTip=s.dartCenter.shift(90,.85*s.armhole.dy(s.dartCenter)),s.dartRight=s.dartCenter.shift(0,i.get("waistReduction")/8),s.dartLeft=s.dartRight.flipX(s.dartCenter),s.dartLeftCp=s.dartLeft.shift(90,.6*s.dartTip.dy(s.dartCenter)),s.dartRightCp=s.dartLeftCp.flipX(s.dartCenter),i.set("cbToDart",s.dartLeft.x),i.set("dartToSide",s.dartRight.dx(s.waist)),s.bpEnd=(new h).move(s.armhole)._curve(s.waistCp2,s.waist).shiftFractionAlong(.1),s.bsCp1=s.bpStart.shiftFractionTowards(s.armholePitch,.5),s.bsCp2=s.bpEnd.shiftFractionTowards(s.cbArmhole,.3),i.set("backCollarLength",(new h).move(s.cbNeck)._curve(s.neckCp2,s.neck).length()),i.set("library.twoPartSleeve.backArmholePitchToShoulder",(new h).move(s.armholePitch).curve(s.armholePitchCp2,s.shoulderCp1,s.shoulder).length());for(let m in p)-1===["backArmhole","backCollar"].indexOf(m)&&delete p[m];for(let m in e)delete e[m];return p.seam1=(new h).move(s.cbNeck).line(s.bpStart).line(s.bpTop).line(s.bpBottom),p.dart=(new h).move(s.dartLeft).curve_(s.dartLeftCp,s.dartTip)._curve(s.dartRightCp,s.dartRight),p.seam2=(new h).move(s.waist).curve_(s.waistCp2,s.armhole).curve(s.armholeCp2,s.armholeHollowCp1,s.armholeHollow).curve(s.armholeHollowCp2,s.armholePitchCp1,s.armholePitch).join(p.backArmhole).line(s.s3CollarSplit).join(p.backCollar),p.seam=p.seam1.join(p.dart).join(p.seam2).close().attr("class","fabric"),t&&(p.sa=p.seam1.line(s.waist).offset(t).join(p.seam2.offset(t)).close().trim().close().addClass("fabric sa")),a&&(p.backStay=(new h).move(s.bpStart).curve(s.bsCp1,s.bsCp2,s.bpEnd).addClass("canvas help"),p.triangle=(new h).move(s.bpTriangleTip).line(s.bpTriangleEdge).line(s.bpStart).addClass("dashed"),p.chest=(new h).move(s.cbChest).line(s.chest).addClass("help contrast"),l("banner",{id:"chestLine",classes:"center contrast help",path:p.chest,text:"carlton:chestLine"})),i.cutlist.removeCut("fabric"),i.cutlist.addCut([{cut:2,from:"fabric"},{cut:2,from:"lining"}]),l("title",{at:s.title,nr:"2",title:"back"}),l("sprinkle",{snippet:"bnotch",on:["shoulder","bpTriangleTip","backArmholePitch"]}),l("grainline",{from:s.cbWaist,to:s.bpStart}),s.logo=new c(.7*s.armhole.x,s.dartTip.y),e.logo=new o("logo",s.logo),l("hd",{id:"wFold",from:s.bpBottom,to:s.bpStart,y:s.bpBottom.y+15+t}),l("hd",{id:"wCbWaistToWaistDartInner",from:s.cbWaist,to:s.dartLeft,y:s.cbWaist.y+15+t}),l("hd",{id:"wWaistDart",from:s.dartLeft,to:s.dartRight,y:s.cbWaist.y+15+t}),l("hd",{id:"wWaistDartOuterToWaistSide",from:s.dartRight,to:s.waist,y:s.cbWaist.y+15+t}),l("hd",{id:"hTriangle",from:s.cbWaist,to:s.waist,y:s.cbWaist.y+30+t}),l("hd",{id:"wWaist",from:s.bpBottom,to:s.waist,y:s.cbWaist.y+45+t}),l("vd",{id:"hWaistToArmhole",from:s.waist,to:s.armhole,x:s.armhole.x+15+t}),l("vd",{id:"hArmholeToArmpit",from:s.armhole,to:s.armholePitch,x:s.armhole.x+15+t}),l("vd",{id:"hArmpitToShoulder",from:s.armhole,to:s.s3ArmholeSplit,x:s.armhole.x+30+t}),l("vd",{id:"hWaistToShoulder",from:s.waist,to:s.s3ArmholeSplit,x:s.armhole.x+45+t}),l("vd",{id:"hDart",from:s.dartRight,to:s.dartTip,x:s.dartRight.x+15}),l("vd",{id:"hWaistToFoldTop",from:s.bpBottom,to:s.bpTop,x:s.bpTop.x-15-t}),l("vd",{id:"hFoldTopToNeckOpening",from:s.bpTop,to:s.cbNeck,x:s.bpTop.x-15-t}),l("vd",{id:"hFull",from:s.bpBottom,to:s.s3CollarSplit,x:s.bpTop.x-30-t}),l("vd",{id:"hTriangle",from:s.bpStart,to:s.bpTriangleTip,x:s.bpTriangleEdge.x+15}),l("hd",{id:"wTriangle",from:s.bpStart,to:s.bpTriangleEdge,y:s.bpTriangleEdge.y+15}),l("hd",{id:"wNeckOpening",from:s.cbNeck,to:s.s3CollarSplit,y:s.s3CollarSplit.y-15-t}),l("hd",{id:"wCbToArmholePitch",from:s.cbNeck,to:s.armholePitch,y:s.s3CollarSplit.y-30-t}),l("hd",{id:"wCbToShoulder",from:s.cbNeck,to:s.shoulder,y:s.s3CollarSplit.y-45-t}),l("hd",{id:"wFull",from:s.cbNeck,to:s.armhole,y:s.s3CollarSplit.y-60-t}),d}};const Ge={name:"carlton.backStay",from:je,draft:function({sa:t,snippets:e,Snippet:o,store:i,points:a,macro:s,expand:n,Point:r,paths:l,Path:c,part:p}){if(!n)return i.flag.note({msg:"carlton:cutBackStay",notes:"flag:partHiddenByExpand",suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),i.flag.preset("expandIsOff"),p.hide();i.flag.preset("expandIsOn"),l.seam=(new c).move(a.bpStart).curve(a.bsCp1,a.bsCp2,a.bpEnd).line(a.armhole).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.armholePitchCp1,a.armholePitch).join(l.backArmhole).line(a.s3CollarSplit).join(l.backCollar).line(a.bpStart).close().addClass("canvas"),t&&(l.sa=l.seam.offset(t).addClass("canvas sa")),s("rmad");for(const h in l)["seam","sa"].includes(h)||delete l[h];for(const h in e)delete e[h];return i.cutlist.removeCut(),i.cutlist.addCut({cut:1,from:"canvas",onFold:!0}),s("rmtitle"),s("title",{at:a.title,nr:"2a",title:"backStay"}),s("cutonfold",{from:a.cbNeck,to:a.bpStart,grainline:!0,reverse:!0}),a.logo=new r(a.s3CollarSplit.x,a.title.y/2),e.logo=new o("logo",a.logo),s("vd",{id:"hBottomToArmhole",from:a.bpEnd,to:a.armhole,x:a.armhole.x+15+t}),s("vd",{id:"hBottomToShoulder",from:a.bpEnd,to:a.s3ArmholeSplit,x:a.armhole.x+30+t}),s("vd",{id:"hFull",from:a.bpEnd,to:a.s3CollarSplit,x:a.armhole.x+45+t}),s("hd",{id:"wNeckOpening",from:a.cbNeck,to:a.s3CollarSplit,y:a.s3CollarSplit.y-15-t}),s("hd",{id:"wCbToArmholePitch",from:a.cbNeck,to:a.armholePitch,y:a.s3CollarSplit.y-30-t}),s("hd",{id:"wCbToShoulder",from:a.cbNeck,to:a.shoulder,y:a.s3CollarSplit.y-45-t}),s("hd",{id:"wFull",from:a.cbNeck,to:a.armhole,y:a.s3CollarSplit.y-60-t}),s("vd",{id:"hToCenter",from:a.bpEnd,to:a.bpStart,x:a.bpStart.x-15+t}),s("vd",{id:"hToNeck",from:a.bpEnd,to:a.cbNeck,x:a.bpStart.x-30+t}),p}};const Ye={name:"carlton.tail",after:[Ne,je],draft:function({units:t,sa:e,store:o,c
1omplete:i,points:a,macro:s,Point:n,paths:r,Path:l,expand:c,part:p}){const h=o.get("waistToHem")-o.get("beltWidth")/2;if(!c){const i=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")+i),l:t(h+2*i)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),o.flag.preset("expandIsOff"),p.hide()}o.flag.preset("expandIsOn"),a.cbTop=new n(0,0),a.fold1Top=a.cbTop.shift(0,o.get("cbToDart")/2),a.fold2Top=a.cbTop.shift(0,o.get("cbToDart")),a.fold3Top=a.cbTop.shift(0,2*o.get("cbToDart")),a.fold4Top=a.fold3Top.shift(0,o.get("cbToDart")/2),a.fold5Top=a.fold4Top.shift(0,o.get("cbToDart")/2),a.waistTop=a.fold5Top.shift(0,o.get("dartToSide"));for(let d of["cb","fold1","fold2","fold3","fold4","fold5","waist"])a[d+"Mid"]=a[d+"Top"].shift(-90,h/2),a[d+"Bottom"]=a[d+"Top"].shift(-90,h);if(r.seam=(new l).move(a.cbTop).line(a.cbBottom).line(a.waistBottom).line(a.waistTop).line(a.cbTop).addClass("fabric"),i&&(r.folds=(new l).move(a.fold1Top).line(a.fold1Bottom).move(a.fold2Top).line(a.fold2Bottom).move(a.fold3Top).line(a.fold3Bottom).move(a.fold4Top).line(a.fold4Bottom).addClass("fabric help"),r.foldEdge=(new l).move(a.fold5Top).line(a.fold5Bottom).addClass("fabric dashed stroke-sm")),e){const t=(new l).move(a.waistBottom).line(a.waistTop).line(a.cbTop).line(a.cbBottom),o=(new l).move(a.cbBottom).line(a.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"}]),a.title=a.cbTop.shiftFractionTowards(a.waistBottom,.2),s("title",{at:a.title,nr:5,title:"tail"}),s("banner",{path:(new l).move(a.cbBottom).line(a.cbTop),text:"carlton:centerBack",classes:"text-sm center fill-note",dy:7,repeat:66}),s("sewtogether",{id:"fold1",from:a.cbMid,to:a.fold2Mid,text:"foldUnderToAlign"}),s("pleat",{id:"fold1",from:a.fold2Mid,to:a.cbMid,classes:{from:"stroke-lg note",to:"stroke-lg note"}}),s("sewtogether",{id:"fold2",from:a.fold3Mid,to:a.fold5Mid,text:"foldUnderToAlign"}),s("pleat",{id:"fold2",from:a.fold3Mid,to:a.fold5Mid,margin:-35,classes:{from:"stroke-lg note",to:"stroke-lg note"}}),s("sprinkle",{snippet:"bnotch",on:["fold1Top","fold2Top","fold3Top","fold4Top","fold5Top","fold1Bottom","fold2Bottom","fold3Bottom","fold4Bottom","fold5Bottom","cbMid","fold2Mid","fold3Mid","fold5Mid"]}),s("grainline",{from:a.fold5Bottom.shiftFractionTowards(a.waistBottom,.5),to:a.fold5Top.shiftFractionTowards(a.waistTop,.5)}),s("hd",{id:"wFold1",from:a.cbBottom,to:a.fold1Bottom,y:a.cbBottom.y+3*e+15}),s("hd",{id:"wFold2",from:a.cbBottom,to:a.fold2Bottom,y:a.cbBottom.y+3*e+30}),s("hd",{id:"wFold3",from:a.cbBottom,to:a.fold3Bottom,y:a.cbBottom.y+3*e+45}),s("hd",{id:"wFold4",from:a.cbBottom,to:a.fold4Bottom,y:a.cbBottom.y+3*e+60}),s("hd",{id:"wFull",from:a.cbBottom,to:a.waistBottom,y:a.cbBottom.y+3*e+75}),s("vd",{from:a.waistBottom,to:a.waistTop,x:a.waistTop.x+e+15}),p}};const Ue={name:"carlton.topsleeve",from:B,after:[N,Ne,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,s.Wx)("biceps"),menu:"fit"},cuffEase:{pct:60,min:30,max:100,...(0,s.Wx)("wrist"),menu:"fit"},shoulderEase:{pct:0,min:-2,max:6,...(0,s.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:i,measurements:a,options:s,macro:n,utils:r,Point:l,paths:c,Path:p,Snippet:h,snippets:d,part:f}){let m=a.shoulderToWrist*s.cuffLength,u=i.tsWristRight.angle(i.tsWristLeft);i.cuffBottomRight=i.tsWristRight.shift(u+90,m),i.cuffBottomLeft=i.tsWristLeft.shift(u+90,m);
1const g=n("round",{id:"round",to:i.tsWristRight,from:i.cuffBottomLeft,via:i.cuffBottomRight,radius:m/3});for(const v of["start","cp1","cp2","end"])i[`round${r.capitalize(v)}`]=i[g.points[v]].copy();e.set("topCuffWidth",i.tsWristLeft.dist(i.tsWristRight)),e.set("cuffLength",m),e.set("cuffRadius",m/3);for(let v in c)delete c[v];c.seam=(new p).move(i.tsLeftEdge)._curve(i.tsElbowLeftCpTop,i.tsElbowLeft).line(i.tsWristLeft).line(i.cuffBottomLeft).line(i.roundStart).curve(i.roundCp1,i.roundCp2,i.roundEnd).line(i.tsWristRight).line(i.elbowRight).curve(i.elbowRightCpTop,i.tsRightEdgeCpBottom,i.tsRightEdge).curve_(i.tsRightEdgeCpTop,i.backPitchPoint)._curve(i.topCpRight,i.top).curve(i.topCpLeft,i.frontPitchPointCpTop,i.frontPitchPoint).curve(i.frontPitchPointCpBottom,i.tsLeftEdgeCpRight,i.tsLeftEdge).close().attr("class","fabric"),t&&(c.sa=c.seam.offset(t).attr("class","fabric sa")),o&&(c.cuff=(new p).move(i.tsWristLeft).line(i.usWristRight).addClass("note help")),e.cutlist.removeCut(),e.cutlist.addCut([{cut:2,from:"fabric"},{cut:2,from:"lining"}]),n("rmtitle"),n("title",{at:i.armCenter,nr:3,title:"topsleeve",align:"center"}),n("grainline",{from:i.boxBottom,to:i.top}),n("scalebox",{at:new l(i.top.x,.666*i.elbowRight.y)}),i.logo=new l(i.top.x,1.1*i.elbowRight.y),d.logo=new h("logo",i.logo),d.sleeveTop=new h("notch",i.top);const b=(new p).move(i.top).curve(i.topCpLeft,i.frontPitchPointCpTop,i.frontPitchPoint).length(),k=e.get("library.twoPartSleeve.frontArmholePitchToShoulder")+e.get("sleevecapEase")/2;i.sleeveNotchFront=k===b?i.frontPitchPoint.copy():k>b?(new p).move(i.frontPitchPoint).curve(i.frontPitchPointCpBottom,i.tsLeftEdgeCpRight,i.tsLeftEdge).shiftAlong(k-b):(new p).move(i.top).curve(i.topCpLeft,i.frontPitchPointCpTop,i.frontPitchPoint).shiftAlong(k),d.frontSleeveNotch=new h("notch",i.sleeveNotchFront);const w=(new p).move(i.top).curve_(i.topCpRight,i.backPitchPoint).length(),C=e.get("library.twoPartSleeve.backArmholePitchToShoulder")+e.get("sleevecapEase")/2;return C===w?(i.sleeveNotchBack=i.backPitchPoint.copy(),d.backSleeveNotch=new h("bnotch",i.sleeveNotchBack)):C<w?(i.sleeveNotchBack=(new p).move(i.top).move(i.top).curve_(i.topCpRight,i.backPitchPoint).shiftAlong(C),d.backSleeveNotch=new h("bnotch",i.sleeveNotchBack)):e.set("undersleeveTipToNotch",C-w),n("ld",{id:"lCuff",from:i.tsWristLeft,to:i.tsWristRight,d:-15}),n("vd",{id:"hCuffToElbowFront",from:i.tsWristLeft,to:i.tsElbowLeft,x:i.tsLeftEdge.x-t-15}),n("vd",{id:"hCuffToArmholeFront",from:i.tsWristLeft,to:i.tsLeftEdge,x:i.tsLeftEdge.x-t-30}),n("ld",{id:"lCuffFoldover",from:i.cuffBottomLeft,to:i.tsWristLeft,d:15+t}),n("vd",{id:"hCuffFoldover",from:i.cuffBottomRight,to:i.usWristRight,x:i.usWristRight.x+15+t}),n("vd",{id:"hCuffToElbowBack",from:i.usWristRight,to:i.elbowRight,x:i.elbowRight.x+15+t}),n("vd",{id:"hCuffBackToArmholeFront",from:i.usWristRight,to:i.tsRightEdge,x:i.elbowRight.x+30+t}),n("vd",{id:"hCuffToArmholeBack",from:i.usWristRight,to:i.backPitchPoint,x:i.elbowRight.x+45+t}),n("vd",{id:"hCuffToTop",from:i.usWristRight,to:i.top,x:i.elbowRight.x+60+t}),n("vd",{id:"hCuffToTop",from:i.cuffBottomRight,to:i.top,x:i.elbowRight.x+75+t}),n("ld",{id:"wElbow",from:i.tsElbowLeft,to:i.elbowRight}),n("ld",{id:"wAtArmholeFront",from:i.tsLeftEdge,to:i.tsRightEdge}),n("hd",{id:"wArmholeFrontToTop",from:i.tsLeftEdge,to:i.top,y:i.top.y-t-15}),n("hd",{id:"wArmholeFrontToArmholeBack",from:i.tsLeftEdge,to:i.backPitchPoint,y:i.top.y-t-30}),n("hd",{id:"wFull",from:i.tsLeftEdge,to:i.tsRightEdge,y:i.top.y-t-45}),f}};const ze={name:"carlton.undersleeve",from:S,after:N,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,s.Wx)("biceps"),menu:"fit"},cuffEase:{pct:60,min:30,max:100,...(0,s.Wx)("wrist"),menu:"fit"},shoulderEase:{pct:0,min:-2,max:6,...(0,s.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:i,utils:a,measurements:s,options:n,macro:r,Point:l,paths:c,Path:p,Snippet:h,snippets:d,part:f}){let m=s.shoulderToWrist*n.cuffLength,u=i.usWristRight.angle(i.usWristLeft);i.cuffBottomRight=i.usWristRight.shift(u+90,m),i.cuffBottomLeft=i.usWristLeft.shift(u+90,m);
1const g=r("round",{id:"round",to:i.usWristRight,from:i.cuffBottomLeft,via:i.cuffBottomRight,radius:m/3});for(const k of["start","cp1","cp2","end"])i[`round${a.capitalize(k)}`]=i[g.points[k]].copy();e.set("underCuffWidth",i.usWristLeft.dist(i.usWristRight));for(let k in c)delete c[k];c.seam=(new p).move(i.usLeftEdge)._curve(i.usElbowLeftCpTop,i.usElbowLeft).line(i.usWristLeft).line(i.cuffBottomLeft).line(i.roundStart).curve(i.roundCp1,i.roundCp2,i.roundEnd).line(i.usWristRight).line(i.elbowRight).curve(i.elbowRightCpTop,i.usRightEdgeCpBottom,i.usRightEdge).curve_(i.usRightEdgeCpTop,i.usTip).curve(i.usTipCpBottom,i.usLeftEdgeCpRight,i.usLeftEdgeRight).line(i.usLeftEdge).close().addClass("fabric"),t&&(c.sa=c.seam.offset(t).addClass("fabric sa")),o&&(c.cuff=(new p).move(i.usWristLeft).line(i.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&&(d.backSleeveNotch=new h("bnotch",(new p).move(i.usTip).curve(i.usTipCpBottom,i.usLeftEdgeCpRight,i.usLeftEdge).shiftAlong(b))),r("title",{at:new l(i.armCenter.x,.666*i.elbowLeft.y),nr:4,title:"undersleeve",align:"center"}),r("grainline",{from:i.boxBottom,to:new l(i.top.x,i.usLeftEdge.y)}),r("ld",{id:"lWrist",from:i.usWristLeft,to:i.usWristRight,d:-15}),r("vd",{id:"hWristToElbow",from:i.usWristLeft,to:i.usElbowLeft,x:i.usLeftEdge.x-t-15}),r("vd",{id:"hWristToArmholeFront",from:i.usWristLeft,to:i.usLeftEdge,x:i.usLeftEdge.x-t-30}),r("ld",{id:"lCuffFoldOver",from:i.cuffBottomLeft,to:i.usWristLeft,d:15+t}),r("vd",{id:"hCuffFoldOver",from:i.cuffBottomRight,to:i.usWristRight,x:i.usWristRight.x+15+t}),r("vd",{id:"hCuffToElbowBack",from:i.usWristRight,to:i.elbowRight,x:i.elbowRight.x+15+t}),r("vd",{id:"wristToTipBack",from:i.usWristRight,to:i.usTip,x:i.elbowRight.x+30+t}),r("vd",{id:"hFull",from:i.cuffBottomRight,to:i.usTip,x:i.elbowRight.x+45+t}),r("ld",{id:"wAtElbow",from:i.usElbowLeft,to:i.elbowRight}),r("ld",{id:"wAtTopFront",from:i.usLeftEdge,to:i.usRightEdge,d:-15}),r("hd",{id:"wAtTop",from:i.usLeftEdge,to:i.usTip,y:i.usTip.y-t-15}),r("vd",{id:"hSleevecap",from:i.usLeftEdge,to:i.usTip,x:i.usLeftEdge.x-t-15}),f}};const Je={name:"carlton.belt",after:je,draft:function({sa:t,snippets:e,Snippet:o,store:i,points:a,macro:s,utils:n,Point:r,paths:l,Path:c,part:p}){const h=1.6*(i.get("cbToDart")+i.get("dartToSide")),d=i.get("beltWidth");a.topLeft=new r(0,0),a.topRight=new r(h,0),a.bottomLeft=new r(0,d),a.bottomRight=new r(h,d),a.button=new r(d/2,d/2);const f={roundTop:s("round",{id:"roundTop",from:a.topRight,to:a.bottomLeft,via:a.topLeft,radius:d/4}),roundBottom:s("round",{id:"roundBottom",from:a.topLeft,to:a.bottomRight,via:a.bottomLeft,radius:d/4})};for(const m in f)for(const t of["start","cp1","cp2","end"])a[`${m}${n.capitalize(t)}`]=a[f[m].points[t]].copy();return l.seam=(new c).move(a.roundTopStart).curve(a.roundTopCp1,a.roundTopCp2,a.roundTopEnd).line(a.roundBottomStart).curve(a.roundBottomCp1,a.roundBottomCp2,a.roundBottomEnd).line(a.bottomRight).line(a.topRight).line(a.roundTopStart).close().attr("class","fabric"),t&&(l.sa=l.seam.offset(t).attr("class","fabric sa")),i.cutlist.addCut({cut:4,from:"fabric"}),e.button=new o("button",a.button).attr("data-scale",2),e.buttonhole=new o("buttonhole",a.button).scale(2).rotate(90),a.title=new r(a.bottomRight.x/2,a.bottomRight.y/2),s("title",{at:a.title,nr:6,title:"belt"}),a.logo=new r(.75*a.bottomRight.x,.65*a.bottomRight.y),e.logo=new o("logo",a.logo),e.waistNotch=new o("notch",a.bottomRight.shiftFractionTowards(a.topRight,.5)),s("hd",{id:"wRoundedCorner",from:a.roundBottomStart,to:a.roundBottomEnd,y:a.roundBottomEnd.y+t+15}),s("hd",{id:"wToButton",from:a.roundBottomStart,to:a.button,y:a.roundBottomEnd.y+t+30}),s("hd",{id:"wFull",from:a.roundBottomStart,to:a.bottomRight,y:a.roundBottomEnd.y+t+45}),s("vd",{id:"hFull",from:a.bottomRight,to:a.topRight,x:a.topRight.x+t+15}),p}};const $e={name:"carlton.collarStand",after:[Ne,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:i,options:a,macro:s,Point:n,paths:r,Path:l,part:c}){const p=i.chest*a.collarHeight,h=e.get("frontCollarLength")+e.get("backCollarLength");o.topLeft=new n(0,0),o.bottomLeft=new n(0,p),o.topRight=new n(h,-1*p*a.collarFlare),o.bottomRight=new n(h,p),o.bottomLeftCp=o.bottomLeft.shift(0,.4*o.bottomRight.x),o.standTop=o.bottomLeft.shiftFractionTowards(o.topLeft,.25),o.standTip=new n(.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 d of["standTopCp","standTip","standTipCp","bottomLeftCp"])o[d+"Left"]=o[d].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(),s("title",{at:o.title,nr:7,title:"collarStand",scale:.8}),s("grainline",{from:o.bottomLeft,to:o.standTop}),s("hd",{id:"wFull",from:o.standTipLeft,to:o.standTip,y:o.standTip.y+t+15}),s("vd",{id:"hCenter",from:o.bottomLeft,to:o.standTop,x:o.standTip.x+t+15}),s("vd",{id:"hFull",from:o.standTip,to:o.standTop,x:o.standTip.x+t+30}),c}};const Xe={name:"carlton.collar",from:$e,options:{collarSpread:{deg:4,min:2,max:6,menu:"collar"}},draft:function({sa:t,points:e,options:o,macro:i,paths:a,Path:s,part:n,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 s).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 h={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 d=-1*o.collarSpread,f=[];for(let u of[4,3,2,1]){let t=h[u],o=t.pivot,i=!1;for(let a of t.points){!1===i&&(i=a);let t=`rot${u}${a}`;
1e[t]=e[a].rotate(d,e[o]),f.push(t)}if(u<4)for(let a of f)e[a]=e[a].rotate(d,e[o])}d=e.cutBottom2.angle(e.rot1cutBottom2)+180;let m=-1*e.cutBottom2.dist(e.rot1cutBottom2);for(let u of["cutBottom2","rot2cutTop2","rot2cutTop3","rot2cutBottom3","rot2q3Cp1","rot2q3Cp2"])e[u]=e[u].shift(d,m);d=e.cutBottom3.angle(e.rot2cutBottom3)+180,m=-1*e.cutBottom3.dist(e.rot2cutBottom3);for(let u of["cutBottom3","rot3cutTop3","rot3cutTop4","rot3standTip","rot3q4Cp1"])e[u]=e[u].shift(d,m);d=e.standTip.angle(e.rot3standTip)+180,m=-1*e.standTip.dist(e.rot3standTip);for(let u of["standTip","rot4cutTop4","rot4topRight","rot4bottomRight"])e[u]=e[u].shift(d,m);return e.topLeftCp=e.topLeft.shift(0,.6*e.rot4topRight.x),a.saBase=(new s).move(e.standTop).curve_(e.standTopCp,e.rot3standTip).line(e.rot4bottomRight).line(e.rot4topRight)._curve(e.topLeftCp,e.topLeft),a.seam=a.saBase.clone().line(e.standTop).close().attr("class","fabric"),t&&(a.sa=a.saBase.offset(t).line(e.topLeft),a.sa.move(e.standTop).line(a.sa.start()).addClass("fabric sa")),r.cutlist.removeCut(),r.cutlist.addCut([{cut:2,from:"fabric"},{cut:1,from:"canvas"}]),i("rmgrainline"),i("cutonfold",{from:e.topLeft,to:e.standTop,grainline:!0}),e.title=e.standTopCp.clone(),i("title",{at:e.title,nr:8,title:"collar"}),i("hd",{id:"wCenterToTipInner",from:e.standTop,to:e.rot3standTip,y:e.rot4bottomRight.y+t+15}),i("hd",{id:"wCenterToTipOuter",from:e.standTop,to:e.rot4bottomRight,y:e.rot4bottomRight.y+t+30}),i("hd",{id:"wFull",from:e.standTop,to:e.rot4topRight,y:e.rot4bottomRight.y+t+45}),i("vd",{id:"hCenter",from:e.standTop,to:e.topLeft,x:e.topLeft.x-15}),i("vd",{id:"hFromTipInner",from:e.rot3standTip,to:e.topLeft,x:e.topLeft.x-30}),i("vd",{id:"hFromTipTop",from:e.rot4topRight,to:e.topLeft,x:e.rot4topRight.x+t+15}),i("vd",{id:"hFull",from:e.rot4bottomRight,to:e.topLeft,x:e.rot4topRight.x+t+30}),i("ld",{id:"lCollarHeight",from:e.rot4bottomRight,to:e.rot4topRight,d:-1*t-15}),i("ld",{id:"lCollarBottom",from:e.rot3standTip,to:e.rot4bottomRight,d:-1*t-15}),n}};const Qe={name:"carlton.cuffFacing",after:[Ue,ze],draft:function({sa:t,store:e,utils:o,points:i,macro:a,Point:s,paths:n,Path:r,part:l}){i.topLeft=new s(0,0),i.bottomRight=new s(e.get("topCuffWidth")+e.get("underCuffWidth"),1.5*e.get("cuffLength")),i.bottomLeft=new s(i.topLeft.x,i.bottomRight.y),i.topRight=new s(i.bottomRight.x,i.topLeft.y);const c={roundLeft:a("round",{id:"roundLeft",from:i.topLeft,to:i.bottomRight,via:i.bottomLeft,radius:e.get("cuffRadius")}),roundRight:a("round",{id:"roundRight",from:i.bottomLeft,to:i.topRight,via:i.bottomRight,radius:e.get("cuffRadius")})};for(const p in c)for(const t of["start","cp1","cp2","end"])i[`${p}${o.capitalize(t)}`]=i[c[p].points[t]].copy();return n.seam=(new r).move(i.topLeft).line(i.roundLeftStart).curve(i.roundLeftCp1,i.roundLeftCp2,i.roundLeftEnd).line(i.roundRightStart).curve(i.roundRightCp1,i.roundRightCp2,i.roundRightEnd).line(i.topRight).line(i.topLeft).close().attr("class","fabric"),t&&(n.sa=n.seam.offset(t).attr("class","fabric sa")),e.cutlist.addCut({cut:2,from:"fabric"}),e.cutlist.addCut({cut:2,from:"canvas"}),i.title=i.topLeft.shiftFractionTowards(i.bottomRight,.5),a("title",{at:i.title,nr:9,title:"cuffFacing"}),a("grainline",{from:i.bottomLeft.shift(0,10+e.get("cuffRadius")),to:i.topLeft.shift(0,10+e.get("cuffRadius"))}),a("vd",{id:"hRoundedCorner",from:i.roundRightStart,to:i.roundRightEnd,x:i.topRight.x+t+15}),a("vd",{id:"hFull",from:i.roundRightStart,to:i.topRight,x:i.topRight.x+t+30}),a("hd",{id:"wRoundedCorner",from:i.roundRightStart,to:i.roundRightEnd,y:i.bottomRight.y+t+15}),a("hd",{id:"wFull",from:i.roundLeftStart,to:i.roundRightEnd,y:i.bottomRight.y+t+30}),l}};const Ke={name:"carlton.pocket",after:Ne,draft:function({sa:t,store:e,complete:o,utils:i,points:a,options:s,macro:n,Point:r,paths:l,Path:c,part:p}){if(a.topLeft=new r(0,0),a.bottomRight=new r(e.get("pocketWidth"),e.get("pocketHeight")),a.bottomLeft=new r(a.topLeft.x,a.bottomRight.y),a.topRight=new r(a.bottomRight.x,a.topLeft.y),a.edgeLeft=a.bottomLeft.shiftFractionTowards(a.topLeft,1.25),a.edgeRight=new r(a.topRight.x,a.edgeLeft.y),s.pocketRadius>
10){const t={roundLeft:n("round",{id:"roundLeft",from:a.topLeft,to:a.bottomRight,via:a.bottomLeft,radius:e.get("pocketRadius")}),roundRight:n("round",{id:"roundRight",from:a.bottomLeft,to:a.topRight,via:a.bottomRight,radius:e.get("pocketRadius")})};for(const e in t)for(const o of["start","cp1","cp2","end"])a[`${e}${i.capitalize(o)}`]=a[t[e].points[o]].copy();l.seam=(new c).move(a.edgeLeft).line(a.roundLeftStart).curve(a.roundLeftCp1,a.roundLeftCp2,a.roundLeftEnd).line(a.roundRightStart).curve(a.roundRightCp1,a.roundRightCp2,a.roundRightEnd)}else l.seam=(new c).move(a.edgeLeft).line(a.bottomLeft).line(a.bottomRight);return l.seam=l.seam.line(a.edgeRight).line(a.edgeLeft).close().attr("class","fabric"),t&&(l.sa=l.seam.offset(t).attr("class","fabric sa")),o&&(l.fold=(new c).move(a.topLeft).line(a.topRight).addClass("class","fabric help")),e.cutlist.addCut({cut:2,from:"fabric"}),a.title=a.topLeft.shiftFractionTowards(a.bottomRight,.5),n("title",{at:a.title,nr:10,title:"pocket"}),n("grainline",{from:a.bottomLeft.shift(0,10+(e.get("pocketRadius")||0)),to:a.edgeLeft.shift(0,10+(e.get("pocketRadius")||0))}),n("vd",{id:"hToFold",from:a.bottomRight,to:a.topRight,x:a.topRight.x+t+15}),n("vd",{id:"hFull",from:a.bottomRight,to:a.edgeRight,x:a.topRight.x+t+30}),n("hd",{id:"wFull",from:a.edgeLeft,to:a.edgeRight,y:a.edgeRight.y-t-15}),s.pocketRadius>0&&n("hd",{id:"wRoundedCorner",from:a.roundRightStart,to:a.roundRightEnd,y:a.bottomRight.y+t+15}),p}};const Ve={name:"carlton.pocketFlap",after:Ne,draft:function({sa:t,store:e,utils:o,points:i,options:a,macro:s,Point:n,paths:r,Path:l,part:c}){if(i.topLeft=new n(0,0),i.bottomRight=new n(e.get("pocketWidth"),e.get("pocketFlapHeight")),i.bottomLeft=new n(i.topLeft.x,i.bottomRight.y),i.topRight=new n(i.bottomRight.x,i.topLeft.y),a.pocketFlapRadius>0){const t={roundLeft:s("round",{id:"roundLeft",from:i.topLeft,to:i.bottomRight,via:i.bottomLeft,radius:e.get("pocketFlapRadius")}),roundRight:s("round",{id:"roundRight",from:i.bottomLeft,to:i.topRight,via:i.bottomRight,radius:e.get("pocketFlapRadius")})};for(const e in t)for(const a of["start","cp1","cp2","end"])i[`${e}${o.capitalize(a)}`]=i[t[e].points[a]].copy();r.seam=(new l).move(i.topLeft).line(i.roundLeftStart).curve(i.roundLeftCp1,i.roundLeftCp2,i.roundLeftEnd).line(i.roundRightStart).curve(i.roundRightCp1,i.roundRightCp2,i.roundRightEnd)}else r.seam=(new l).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight);return r.seam=r.seam.line(i.topRight).line(i.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"}),i.title=i.topLeft.shiftFractionTowards(i.bottomRight,.5),s("title",{at:i.title,nr:11,title:"pocketFlap",scale:.8}),s("grainline",{from:i.bottomLeft.shift(0,i.topRight.x/5),to:i.topLeft.shift(0,i.topRight.x/5)}),s("hd",{from:i.topLeft,to:i.topRight,y:i.topLeft.y-t-15}),a.pocketFlapRadius>0?(s("vd",{id:"hRoundedCorner",from:i.roundRightStart,to:i.roundRightEnd,x:i.topRight.x+t+15}),s("vd",{id:"hFull",from:i.roundRightStart,to:i.topRight,x:i.topRight.x+t+30})):s("vd",{id:"hFull",from:i.bottomRight,to:i.topRight,x:i.topRight.x+t+15}),c}};const qe={name:"carlton.pocketLining",from:Ke,draft:function({sa:t,utils:e,store:o,points:i,options:a,macro:s,Point:n,paths:r,Path:l,part:c}){if(delete r.fold,i.topLeft=i.bottomLeft.shiftFractionTowards(i.topLeft,.75),i.topRight=new n(i.bottomRight.x,i.topLeft.y),a.pocketRadius>0){const t={roundLeft:s("round",{id:"roundLeft",from:i.topLeft,to:i.bottomRight,via:i.bottomLeft,radius:o.get("pocketRadius")}),roundRight:s("round",{id:"roundRight",from:i.bottomLeft,to:i.topRight,via:i.bottomRight,radius:o.get("pocketRadius")})};for(const o in t)for(const a of["start","cp1","cp2","end"])i[`${o}${e.capitalize(a)}`]=i[t[o].points[a]].copy();r.seam=(new l).move(i.topLeft).line(i.roundLeftStart).curve(i.roundLeftCp1,i.roundLeftCp2,i.roundLeftEnd).line(i.roundRightStart).curve(i.roundRightCp1,i.roundRightCp2,i.roundRightEnd)}else r.seam=(new l).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight);return r.seam=r.seam.line(i.topRight).line(i.topLeft).close().attr("class","lining"),t&&(r.sa=r.seam.offset(t).attr("class","lining sa")),o.cutlist.addCut({cut:2,from:"lining"}),i.title=i.topLeft.shiftFractionTowards(i.bottomRight,.5),s("title",{at:i.title,nr:16,title:"pocketLining"}),s("grainline",{from:i.bottomLeft.shift(0,10+(o.get("pocketRadius")||0)),to:i.topLeft.shift(0,10+(o.get("pocketRadius")||0))}),s("rmad"),s("vd",{id:"hFull",from:i.bottomRight,to:i.topRight,x:i.topRight.x+t+15}),s("hd",{id:"wFull",from:i.bottomLeft,to:i.bottomRight,y:i.bottomRight.y+t+15}),a.pocketRadius>0&&s("hd",{from:i.roundRightStart,to:i.roundRightEnd,y:i.roundRightEnd.y}),c}};const Ze={name:"carlton.chestPocketWelt",after:Ne,draft:function({sa:t,store:e,complete:o,points:i,macro:a,Point:s,paths:n,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("
1chestPocketWidth")+o),l:c(e.get("chestPocketHeight")+o)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),e.flag.preset("expandIsOff"),p.hide()}return e.flag.preset("expandIsOn"),i.topLeft=new s(0,0),i.bottomRight=new s(2*e.get("chestPocketWidth"),e.get("chestPocketHeight")),i.bottomLeft=new s(i.topLeft.x,i.bottomRight.y),i.topRight=new s(i.bottomRight.x,i.topLeft.y),i.topMid=new s(e.get("chestPocketWidth"),i.topRight.y),i.bottomMid=new s(i.topMid.x,i.bottomRight.y),n.seam=(new r).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).line(i.topLeft).close().attr("class","fabric"),t&&(n.sa=n.seam.offset(t).attr("class","fabric sa")),o&&(n.fold=(new r).move(i.topMid).line(i.bottomMid).addClass("fabric help")),e.cutlist.addCut({cut:2,from:"fabric"},{cut:2,from:"canvas"}),i.title=new s(i.bottomRight.x/4,i.bottomRight.y/2),a("title",{at:i.title,nr:12,title:"chestPocketWelt",scale:.8}),a("hd",{id:"wFull",from:i.bottomLeft,to:i.bottomRight,y:i.bottomLeft.y+t+15}),a("vd",{id:"hFull",from:i.bottomRight,to:i.topRight,x:i.topRight.x+t+15}),p}};const to={name:"carlton.chestPocketBag",after:Ne,draft:function({units:t,sa:e,store:o,points:i,macro:a,Point:s,paths:n,Path:r,expand:l,part:c}){if(!l){const i=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")+i),l:t(2*o.get("chestPocketBagDepth")+i)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),o.flag.preset("expandIsOff"),c.hide()}return o.flag.preset("expandIsOn"),i.topLeft=new s(0,0),i.bottomRight=new s(o.get("chestPocketHeight"),2*o.get("chestPocketBagDepth")),i.bottomLeft=new s(i.topLeft.x,i.bottomRight.y),i.topRight=new s(i.bottomRight.x,i.topLeft.y),n.seam=(new r).move(i.topRight).line(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).close().addClass("lining"),e&&(n.sa=n.seam.offset(e).attr("class","lining sa")),o.cutlist.addCut({material:"lining"}),i.title=i.topLeft.shiftFractionTowards(i.bottomRight,.2),a("title",{at:i.title,nr:17,title:"chestPocketBag"}),a("grainline",{from:i.bottomLeft.shift(0,10),to:i.topLeft.shift(0,10)}),a("vd",{id:"hFull",from:i.bottomRight,to:i.topRight,x:i.topRight.x+e+15}),a("hd",{id:"wFull",from:i.bottomLeft,to:i.bottomRight,y:i.bottomLeft.y+e+15}),c}};const eo={name:"carlton.innerPocketWelt",after:Ne,draft:function({sa:t,store:e,complete:o,points:i,macro:a,expand:s,units:n,Point:r,paths:l,Path:c,part:p}){if(!s){const o=t?2*t:0;return e.flag.note({msg:"carlton:cutInnerPocketWelt",notes:[t?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:n(1.4*e.get("innerPocketWidth")+o),l:n(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"),i.topLeft=new r(0,0),i.bottomRight=new r(1.4*e.get("innerPocketWidth"),6*e.get("innerPocketWeltHeight")),i.bottomLeft=new r(i.topLeft.x,i.bottomRight.y),i.topRight=new r(i.bottomRight.x,i.topLeft.y),i.leftMid=new r(0,i.bottomRight.y/2),i.rightMid=new r(i.bottomRight.x,i.bottomRight.y/2),i.realTopLeft=new r(.2*e.get("innerPocketWidth"),2*e.get("innerPocketWeltHeight")),i.realTopRight=new r(1.2*e.get("innerPocketWidth"),i.realTopLeft.y),i.realBottomLeft=new r(i.realTopLeft.x,4*e.get("innerPocketWeltHeight")),i.realBottomRight=new r(i.realTopRight.x,i.realBottomLeft.y),l.seam=(new c).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).line(i.topLeft).close().attr("class","fabric"),t&&(l.sa=l.seam.offset(t).attr("class","fabric sa")),o&&(l.fold=(new c).move(i.leftMid).line(i.rightMid).addClass("fabric help"),l.welt=(new c).move(i.realTopLeft).line(i.realBottomLeft).line(i.realBottomRight).line(i.realTopRight).line(i.realTopLeft).close().addClass("note dashed stroke-sm")),e.cutlist.addCut({cut:2,from:"fabric"}),e.cutlist.addCut({cut:2,from:"canvas"}),i.title=i.topLeft.shiftFractionTowards(i.bottomRight,.5),a("title",{at:i.title,nr:13,title:"innerPocketWelt"}),a("grainline",{from:i.bottomLeft.shift(0,10),to:i.topLeft.shift(0,10)}),a("vd",{id:"hWelt",from:i.realBottomRight,to:i.realTopRight,x:i.topRight.x+t+15}),a("vd",{id:"hFull",from:i.bottomRight,to:i.topRight,x:i.topRight.x+t+30}),a("hd",{id:"wWelt",from:i.realBottomLeft,to:i.realBottomRight,y:i.bottomLeft.y+t+15}),a("hd",{id:"wFull",from:i.bottomLeft,to:i.bottomRight,y:i.bottomLeft.y+t+30}),p}};
1const oo={name:"carlton.innerPocketBag",after:Ne,options:{innerPocketDepth:{pct:110,min:75,max:140,menu:"pockets"}},draft:function({units:t,sa:e,store:o,points:i,options:a,macro:s,Point:n,paths:r,Path:l,expand:c,part:p}){if(!c){const i=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")+i),l:t(o.get("innerPocketWidth")*a.innerPocketDepth*2+i)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),o.flag.preset("expandIsOff"),p.hide()}return o.flag.preset("expandIsOn"),i.topLeft=new n(0,0),i.bottomRight=new n(o.get("innerPocketWidth"),o.get("innerPocketWidth")*a.innerPocketDepth*2),i.bottomLeft=new n(i.topLeft.x,i.bottomRight.y),i.topRight=new n(i.bottomRight.x,i.topLeft.y),r.seam=(new l).move(i.topRight).line(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).close().addClass("lining"),e&&(r.sa=r.seam.offset(e).attr("class","lining sa")),o.cutlist.addCut({cut:2,from:"lining"}),i.title=i.topLeft.shiftFractionTowards(i.bottomRight,.2),s("rmtitle"),s("title",{at:i.title,nr:14,title:"innerPocketBag"}),s("grainline",{from:i.bottomLeft.shift(0,10),to:i.topLeft.shift(0,10)}),s("vd",{from:i.bottomRight,to:i.topRight,x:i.topRight.x+e+15}),s("hd",{from:i.bottomLeft,to:i.bottomRight,y:i.bottomLeft.y+e+15}),p}};const io={name:"carlton.innerPocketTab",after:Ne,draft:function({sa:t,store:e,complete:o,points:i,macro:a,Point:s,paths:n,Path:r,part:l}){return i.topLeft=new s(0,0),i.topRight=new s(1.2*e.get("innerPocketWidth"),0),i.bottom=new s(.6*e.get("innerPocketWidth"),.6*e.get("innerPocketWidth")),i.top=new s(.6*e.get("innerPocketWidth"),0),n.seam=(new r).move(i.topLeft).line(i.bottom).line(i.topRight).line(i.topLeft).close().attr("class","lining"),t&&(n.sa=n.seam.offset(t).attr("class","lining sa")),o&&(n.hint=(new r).move(i.top).line(i.bottom).attr("class","lining help")),e.cutlist.addCut({cut:1,material:"lining"}),i.title=i.top.shiftFractionTowards(i.bottom,.5),a("title",{at:i.title,nr:15,title:"innerPocketTab",scale:.7}),a("grainline",{from:i.top,to:i.top.shift(-45,.7*i.top.x)}),a("hd",{from:i.topLeft,to:i.top,y:i.topLeft.y-t-15}),a("hd",{from:i.topLeft,to:i.topRight,y:i.topLeft.y-t-30}),a("vd",{from:i.bottom,to:i.topRight,x:i.topRight.x+t+15}),l}},ao=new s.pT({data:De,parts:[Ne,Me,_e,je,Ge,Ye,Ue,ze,Je,$e,Xe,Qe,Ke,Ve,qe,Ze,to,eo,oo,io]}),so=(0,s.D4)([f,_,Ee],{o:{keep:[...Object.keys(I.options),...Object.keys(ao.patternConfig.options),...Object.keys(B.options)]}});const no={name:"carlita.front",from:Ne,hide:s.V9.HIDE_TREE,measurements:["highBust","bustSpan","hpsToBust"],plugins:[D],options:{draftForHighBust:!0,contour:{pct:50,min:25,max:75,menu:"advanced"},chestPocketAngle:0},draft:function({sa:t,snippets:e,Snippet:o,utils:i,store:a,complete:s,points:n,measurements:r,options:l,macro:c,Point:p,paths:h,Path:d,part:f}){n.bustPoint=new p(r.bustSpan/2+r.bustSpan/r.bust*l.chestEase/4,n.neck.y+r.hpsToBust),n.psHem=new p(n.bustPoint.x,n.hem.y),n.bustPointCp1=n.bustPoint.shift(90,n.armholePitch.dy(n.bustPoint)/2);let m=["bustPoint","bustPointCp1","psHem","hem","seat","seatCp2","waistCp1","waist","waistCp2","armhole","armholeCp2","armholeHollowCp1","armholeHollow","armholeHollowCp2","armholePitchCp1","armholePitch"];a.set("side",m);let u=r.bust-r.highBust,g=0,b=10,k=1;for(;Math.abs(b)>.5&&k<50;){for(let t of m)n[t+"Rot1"]=n[t].rotate(b/5,n.armholePitch);g=n.bustPoint.dx(n.bustPointRot1),b=u-g,k++}let w=-1*(n.bustPointRot1.angle(n.psHemRot1)-270);for(let y of m)n[y+"Rot2"]=n[y+"Rot1"].rotate(w,n.bustPointRot1);n.bustPointRot2=n.bustPoint.rotate(w,n.bustPointRot1),n.bustPointCp1Rot2=n.bustPointCp1.rotate(w,n.bustPointRot1),n.bustPointCp2=n.bustPointCp1Rot2.rotate(180,n.bustPointRot2).shiftFractionTowards(n.bustPointRot2,.5),n.psWaist=new p(n.psHemRot2.x,n.waistRot2.y),n.psWaistCp1=n.psWaist.shift(90,n.bustPointRot2.dy(n.psWaist)*l.contour);let C=(new d).move(n.armholePitch)._curve(n.bustPointCp1,n.bustPoint).line(new p(n.psHem.x,n.waist.y)).length(),v=(new d).move(n.armholePitchRot2)._curve(n.bustPointCp1Rot2,n.bustPointRot2).curve(n.bustPointCp2,n.psWaistCp1,n.psWaist).length()-C,T=["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 y of T)void 0!==n[y]&&(n[y]=n[y].shift(-90,v));n.chestPocketBottomLeft=new p(n.bustPoint.x,n.button2Right.y-n.button3Right.dy(n.button2Right)/10),n.chestPocketTopLeft=n.chestPocketBottomLeft.shift(90,a.get("chestPocketHeight")),n.chestPocketTopRight=n.chestPocketTopLeft.shift(0,a.get("chestPocketWidth")),n.chestPocketBottomRight=n.chestPocketBottomLeft.shift(0,a.get("chestPocketWidth"));for(let y in h)-1===["frontArmhole","frontCollar"].indexOf(y)&&delete h[y];for(let y in e)delete e[y];if(h.saBase=(new d).move(n.psHem).line(n.bustPoint).curve_(n.bustPointCp1,n.armholePitch).join(h.frontArmhole).line(n.s3CollarSplit).join(h.frontCollar).line(n.collarTip)._curve(n.lapelStraightEndCp1,n.lapelStraightEnd).line(n.hemEdge).line(n.flbHem),h.seam=h.saBase.clone().line(n.psHem).close().attr("class","fabric"),t){const e=(new d).move(n.flbHem).line(n.psHem);h.sa=h.saBase.offset(t).join(e.offset(3*t)).line(n.psHem.shift(-90,3*t).shift(0,t)).close().attr("class","fabric sa")}return s&&(h.rollLine=(new d).move(n.rollLineStart).line(n.rollLineEnd).addClass("fabric help"),h.flb=(new d).move(n.flbHem).line(n.flbTop
1).addClass("note help"),c("banner",{id:"flbFacing",path:h.flb,text:"carlton:flbFacingSide",classes:"text-sm fill-fabric center",repeat:66}),c("banner",{id:"flbLining",path:h.flb,text:"carlton:flbLiningSide",dy:7,classes:"text-sm fill-lining center",repeat:66}),h.pocket=(new d).move(i.beamsIntersect(n.pocketTopLeft,n.pocketTopRight,n.bustPoint,n.psHem)).line(n.pocketTopLeft).attr("class","fabric help"),l.pocketRadius>0?h.pocket=h.pocket.line(n.pocketRoundLeftStart).curve(n.pocketRoundLeftCp1,n.pocketRoundLeftCp2,n.pocketRoundLeftEnd):h.pocket=h.pocket.line(n.pocketBottomLeft).line(i.beamsIntersect(n.pocketBottomLeft,n.pocketBottomRight,n.bustPoint,n.psHem)),h.pocketFlap=(new d).move(i.beamsIntersect(n.pocketFlapTopLeft,n.pocketFlapTopRight,n.bustPoint,n.psHem)).line(n.pocketFlapTopLeft).attr("class","fabric help"),l.pocketFlapRadius>0?h.pocketFlap=h.pocketFlap.line(n.pocketFlapRoundLeftStart).curve(n.pocketFlapRoundLeftCp1,n.pocketFlapRoundLeftCp2,n.pocketFlapRoundLeftEnd):h.pocketFlap=h.pocketFlap.line(n.pocketFlapBottomLeft).line(i.beamsIntersect(n.pocketFlapBottomLeft,n.pocketFlapBottomRight,n.bustPoint,n.psHem)),h.chestPocket=(new d).move(n.chestPocketTopLeft).line(n.chestPocketBottomLeft).line(n.chestPocketBottomRight).line(n.chestPocketTopRight).line(n.chestPocketTopLeft).close().attr("class","fabric help"),h.innerPocket=(new d).move(n.innerPocketTopLeft).line(n.innerPocketBottomLeft).line(n.innerPocketBottomRight).line(n.innerPocketTopRight).line(n.innerPocketTopLeft).close().attr("class","fabric help")),n.frontChest=new p(n.hemEdge.x,n.cbChest.y),n.sideSeamChest=new p(n.psHem.x,n.cbChest.y),n.frontWaist=new p(n.hemEdge.x,n.cfWaist.y),n.sideSeamWaist=new p(n.psHem.x,n.cfWaist.y),n.sideSeamHips=new p(n.psHem.x,n.cfHips.y),n.frontHips=new p(n.hemEdge.x,n.cfHips.y),n.frontSeat=new p(n.hemEdge.x,n.cfSeat.y),n.sideSeamSeat=new p(n.sideSeamWaist.x,n.cfSeat.y),s&&(h.chest=(new d).move(n.frontChest).line(n.sideSeamChest).addClass("contrast help"),c("banner",{id:"chestLine",classes:"center contrast help",path:h.chest,text:"carlita:chestLine"}),h.waist=(new d).move(n.frontWaist).line(n.sideSeamWaist).addClass("contrast help"),c("banner",{id:"waistLine",classes:"center contrast help",path:h.waist,text:"carlita:waistLine"}),h.hips=(new d).move(n.frontHips).line(n.sideSeamHips).addClass("contrast help"),c("banner",{id:"hipLine",classes:"center contrast help",path:h.hips,text:"carlita:hipLine"}),h.seat=(new d).move(n.frontSeat).line(n.sideSeamSeat).addClass("contrast help"),c("banner",{id:"seatLine",classes:"center contrast help",path:h.seat,text:"carlita:seatLine"})),a.cutlist.setCut([{cut:2,from:"fabric"},{cut:2,from:"lining"}]),e.button1Left=new o("button",n.button1Left).attr("data-scale",2),e.button1Right=new o("button",n.button1Right).attr("data-scale",2),e.button2Left=new o("button",n.button2Left).attr("data-scale",2),e.button2Right=new o("button",n.button2Right).attr("data-scale",2),e.button3Left=new o("button",n.button3Left).attr("data-scale",2),e.button3Right=new o("button",n.button3Right).attr("data-scale",2),c("sprinkle",{snippet:"notch",on:["cfNeck","rollLineStart","bustPoint","chestPocketTopLeft","chestPocketBottomLeft","sideSeamWaist","sideSeamHips"]}),n.logo=n.cfSeat.shiftFractionTowards(n.cfHem,.5),e.logo=new o("logo",n.logo),c("title",{at:n.title,nr:"1a",title:"front"}),c("grainline",{from:n.cfHem,to:n.cfNeck}),c("ld",{id:"wHemClosureToFlb",from:n.hemEdge,to:n.flbHem,d:15}),c("hd",{id:"wHem",from:n.hemEdge,to:n.psHem,y:n.psHem.y+15+3*t}),c("hd",{id:"wClosureToPocketLeft",from:n.rollLineStart,to:n.pocketTopLeft,y:n.pocketFlapBottomLeft.y}),c("vd",{id:"hTopButtonToPocketFlapTop",from:n.pocketFlapTopLeft,to:n.button3Right,x:n.bustPoint.x+t+15}),c("vd",{id:"hTopButtonToPocketTop",from:n.pocketTopLeft,to:n.button3Right,x:n.bustPoint.x+t+30}),c("vd",{id:"hTopButtonToChestPocketBottom",from:n.chestPocketBottomLeft,to:n.button3Right,x:n.bustPoint.x-15}),c("hd",{id:"wClosureToChestPocket",from:n.rollLineStart,to:n.chestPocketBottomLeft,y:n.chestPocketBottomLeft.y+15}),c("hd",{id:"wClosureToFirstButton",from:n.rollLineStart,to:n.button3Left,y:n.button3Left.y+1
15}),c("hd",{id:"wBetweenButtons",from:n.button3Left,to:n.button3Right,y:n.button3Left.y+15}),c("vd",{id:"hHemToStartBustCurve",from:n.psHem,to:n.bustPoint,x:n.bustPoint.x+t+45}),c("vd",{id:"hHemTOPrinceSeamEnd",from:n.psHem,to:n.armholePitch,x:n.armholePitch.x+t+15}),c("vd",{id:"hPrincessSeamEndToShoulder",from:n.armholePitch,to:n.s3ArmholeSplit,x:n.s3ArmholeSplit.x+t+15}),c("vd",{id:"hPrincessSeamEndToHps",from:n.armholePitch,to:n.s3CollarSplit,x:n.s3ArmholeSplit.x+t+30}),c("vd",{id:"hTopButtonToTopClosure",from:n.rollLineStart,to:n.collarTip,x:n.rollLineStart.x-t-15}),c("vd",{id:"HTopButtonToMiddleButton",from:n.button2Left,to:n.rollLineStart,x:n.rollLineStart.x-t-15}),c("vd",{id:"hBottomButtonToMiddleButton",from:n.button1Left,to:n.button2Left,x:n.rollLineStart.x-t-15}),c("vd",{id:"hHemToTopClosure",from:n.hemEdge,to:n.collarTip,x:n.rollLineStart.x-t-30}),c("hd",{id:"wClosureBend",from:n.lapelStraightEnd,to:n.collarTip,y:n.collarTip.y-t-15}),c("hd",{id:"wClosureToCf",from:n.lapelStraightEnd,to:n.cfNeck,y:n.collarTip.y-t-30}),c("hd",{id:"wClosureToTopRollLine",from:n.lapelStraightEnd,to:n.rollLineEnd,y:n.collarTip.y-t-45}),c("hd",{id:"wClosureToHps",from:n.lapelStraightEnd,to:n.s3CollarSplit,y:n.s3CollarSplit.y-t-15}),c("hd",{id:"wClosureToTopPrincessSeam",from:n.lapelStraightEnd,to:n.armholePitch,y:n.armholePitch.y-15}),c("hd",{id:"wFull",from:n.lapelStraightEnd,to:n.s3ArmholeSplit,y:n.s3CollarSplit.y-t-30}),f}};const ro={name:"carlita.side",from:no,draft:function({sa:t,snippets:e,Snippet:o,store:i,points:a,macro:s,Point:n,paths:r,Path:l,part:c}){for(let p of i.get("side"))a[p]=a[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 a.anchor=a.armholePitchRot2.clone(),r.saBase=(new l).move(a.hem).line(a.seat).curve(a.seatCp2,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.bustPointCp1,a.bustPoint).curve(a.bustPointCp2,a.psWaistCp1,a.psWaist).line(a.psHem),r.seam=r.saBase.clone().line(a.hem).close().attr("class","fabric"),t&&(r.sa=r.saBase.offset(t).line(a.psHem.shift(-90,3*t).shift(180,t)).line(a.hem.shift(-90,3*t).shift(0,t)).close().addClass("fabric sa")),a.title=a.bustPoint.shiftFractionTowards(a.waist,.5),s("title",{at:a.title,nr:"1b",title:"side"}),a.logo=a.psHem.shiftFractionTowards(a.seat,.5),e.logo=new o("logo",a.logo),a.grainlineFrom=a.psHem.shiftFractionTowards(a.hem,.5),a.grainlineTo=new n(a.grainlineFrom.x,a.armholePitchCp1.y),s("grainline",{from:a.grainlineFrom,to:a.grainlineTo}),a.sideSeamWaist=new n(a.psHemRot2.x,a.cfWaist.y),a.sideSeamHips=new n(a.psHemRot2.x,a.cfHips.y),e.bust=new o("notch",a.bustPoint),e.sideSeamWaist=new o("notch",a.sideSeamWaist),e.sideSeamHips=new o("notch",a.sideSeamHips),s("vd",{id:"hHemToWaist",from:a.psHem,to:a.psWaist,x:a.psWaist.x-t-15}),s("vd",{id:"hHemToBustPoint",from:a.psHem,to:a.bustPoint,x:a.bustPoint.x-t-15}),s("vd",{id:"hHemToSeat",from:a.hem,to:a.seat,x:a.hem.x+t+15}),s("vd",{id:"hHemToPrincessSeamEnd",from:a.hem,to:a.armhole,x:a.hem.x+t+30}),s("vd",{id:"hFull",from:a.hem,to:a.armholePitch,x:a.hem.x+t+45}),s("hd",{id:"wAtWaist",from:a.psWaist,to:a.waist}),s("hd",{id:"wBustToWaist",from:a.bustPoint,to:a.waist,y:a.bustPoint.y}),s("hd",{id:"wBustToPrincessSeamTip",from:a.bustPoint,to:a.armholePitch,y:a.armholePitch.y-t-15}),s("hd",{id:"wFull",from:a.bustPoint,to:a.armhole,y:a.armholePitch.y-t-30}),s("hd",{id:"wHem",from:a.psHem,to:a.hem,y:a.hem.y+3*t+15}),c}};const lo={name:"carlita.back",from:je,hide:s.V9.HIDE_TREE,draft:function({complete:t,macro:e,part:o,paths:i}){return t&&e("banner",{id:"chestLine",classes:"center contrast help",path:i.chest,text:"carlita:chestLine"}),o}},co={name:"carlita.frontFacing",from:Me,draft:({points:t,macro:e,expand:o,store:i,part:a})=>o?(i.flag.preset("expandIsOn"),e("title",{at:t.title,nr:"1c",title:"frontFacing",align:"center"}),a):(i.flag.note({msg:"carlton:cutFrontFacing",suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),i.flag.preset("expandIsOff"),a.hide()),hide:{from:!0,inherited:!0}};const po={name:"carlita.frontLining",from:no,draft:function({sa:t,snippets:e,Snippet:o,store:i,points:a,macro:s,expand:n,paths:r,Path:l,part:c}){if(!n)return i.flag.note({msg:"carlton:cutFrontLining",suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),i.flag.preset("expandIsOff"),c.hide();i.flag.preset("expandIsOn");const p=r.frontCollar.split(a.flbTop),h=r.frontArmhole;s("rmad");for(const d in r)["frontCollar"].includes(d)||delete r[d];for(const d in e)delete e[d];return r.seam=(new l).move(a.psHem).line(a.bustPoint).curve_(a.bustPointCp1,a.armholePitch).join(h).line(a.s3CollarSplit).join(p[0]).line(a.flbHem).line(a.psHem).close().addClass("lining"),t&&(r.sa=r.seam.offset(t).addClass("sa lining")),i.cutlist.setCut({cut:2,from:"lining"}),a.title=a.s3CollarSplit.shiftFractionTowards(a.bustPointRot2,.5),s("rmtitle"),s("title",{at:a.title,nr:"1d",title:"frontLining"}),a.logo=a.s3CollarSplit.shiftFractionTowards(a.armholePitchRot1,.5),e.logo=new o("logo",a.logo),a.grainlineFrom=a.flbHem.shift(0,10),a.grainlineTo=a.flbTop.shift(0,10),s("grainline",{from:a.grainlineFrom,to:a.grainlineTo}
1),e.bust=new o("notch",a.bustPoint),s("hd",{id:"wHem",from:a.flbHem,to:a.psHem,y:a.psHem.y+t+15}),s("hd",{id:"wFull",from:a.flbTop,to:a.s3ArmholeSplit,y:a.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."}}}')},fo=new s.pT({data:Oe,parts:[no,co,po,ro,lo,Ge,Ye,Je,Ue,ze,$e,Xe,Qe,Ke,Ve,qe,Ze,to,eo,oo,io]}),mo=(0,s.D4)([so,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:i,paths:a,Point:s,Path:n,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 i.underbustCF=new s(0,0),i.hipsCF=new s(0,l),i.hipsCB=new s(c,l),i.underbustCB=new s(c,0),i.topSide=i.underbustCF.shiftFractionTowards(i.underbustCB,.5),i.bottomSide=i.hipsCF.shiftFractionTowards(i.hi
1psCB,.5),i.waistCF=i.underbustCF.shift(-90,t.waistToUnderbust),i.waistCB=new s(i.hipsCB.x,i.waistCF.y),i.topCF=i.underbustCF.shift(90,o.get("frontRise")),i.frontRiseStart=i.underbustCF.shift(0,.15*c),i.frontRiseStartCp2=i.underbustCF.shift(0,.11*c),i.topCFCp1=i.topCF.shift(0,.11*c),i.bottomCF=i.hipsCF.shift(-90,o.get("frontDrop")),i.bottomCFCp2=i.bottomCF.shift(0,.11*c),i.hipRise=i.bottomSide.shift(90,o.get("hipRise")),i.hipRiseCp1=i.hipRise.shift(180,.3*c),i.hipRiseCp2=i.hipRise.shift(0,.2*c),i.backDrop=i.hipsCB.shift(-90,o.get("backDrop")),i.backDropCp1=i.backDrop.shift(180,.3*c),i.backRise=i.underbustCB.shift(90,o.get("backRise")),i.backRiseCp1=i.backRise.shift(180,.4*c),i.topSideCp1=i.topSide.shift(0,.2*c),a.help1=(new n).move(i.underbustCF).line(i.hipsCF).line(i.hipsCB).line(i.underbustCB).close(),a.help2=(new n).move(i.topSide).line(i.bottomSide).line(i.waistCF).line(i.waistCB),a.help1.hide(),a.help2.hide(),a.outline=(new n).move(i.bottomCF).curve(i.bottomCFCp2,i.hipRiseCp1,i.hipRise).curve(i.hipRiseCp2,i.backDropCp1,i.backDrop).line(i.backRise).curve(i.backRiseCp1,i.topSideCp1,i.topSide).line(i.frontRiseStart).curve(i.frontRiseStartCp2,i.topCFCp1,i.topCF).line(i.bottomCF).close(),r}};const bo={name:"cathrin.panels",from:go,hide:{self:!0},draft:function({measurements:t,options:e,store:o,points:i,paths:a,Point:s,Path:n,part:r}){let l=1,c=(new n).move(i.bottomCF).curve(i.bottomCFCp2,i.hipRiseCp1,i.hipRise).curve(i.hipRiseCp2,i.backDropCp1,i.backDrop).attr("class","lashed various stroke-xl");for(let f of o.get("gaps"))i[`underbustGap${l}`]=new s(o.get("width")*f,0),i[`underbustGap${l}Right`]=i[`underbustGap${l}`].shift(0,.1*o.get("bustIntake")),i[`underbustGap${l}Left`]=i[`underbustGap${l}`].shift(180,.1*o.get("bustIntake")),i[`underbustGap${l}RightCp`]=i[`underbustGap${l}Right`].shift(-90,.15*t.waistToUnderbust),i[`underbustGap${l}LeftCp`]=i[`underbustGap${l}Left`].shift(-90,.15*t.waistToUnderbust),i[`waistGap${l}`]=new s(o.get("width")*f,i.waistCF.y),i[`waistGap${l}Right`]=i[`waistGap${l}`].shift(0,.1*o.get("waistIntake")),i[`waistGap${l}Left`]=i[`waistGap${l}`].shift(180,.1*o.get("waistIntake")),i[`waistGap${l}RightCp1`]=i[`waistGap${l}Right`].shift(90,.2*t.waistToUnderbust),i[`waistGap${l}LeftCp2`]=i[`waistGap${l}Left`].shift(90,.2*t.waistToUnderbust),i[`waistGap${l}RightCp2`]=i[`waistGap${l}Right`].shift(-90,.2*t.waistToHips),i[`waistGap${l}LeftCp1`]=i[`waistGap${l}Left`].shift(-90,.2*t.waistToHips),i[`hipsGap${l}`]=new s(o.get("width")*f,i.hipsCF.y),i[`hipsGap${l}`]=c.intersectsX(i[`waistGap${l}`].x).pop(),i[`hipsGap${l}Cp`]=i[`hipsGap${l}`].shiftFractionTowards(i[`waistGap${l}`],.2),l++;a.panel1=c.split(i.hipsGap1)[0].curve(i.hipsGap1Cp,i.waistGap1LeftCp1,i.waistGap1Left).curve(i.waistGap1LeftCp2,i.underbustGap1LeftCp,i.underbustGap1Left).curve(i.frontRiseStartCp2,i.topCFCp1,i.topCF).line(i.bottomCF).close().attr("class","fabric"),a.panel2=c.split(i.hipsGap2)[0].split(i.hipsGap1)[1].curve(i.hipsGap2Cp,i.waistGap2LeftCp1,i.waistGap2Left).curve(i.waistGap2LeftCp2,i.underbustGap2LeftCp,i.underbustGap2Left).line(i.underbustGap1Right).curve(i.underbustGap1RightCp,i.waistGap1RightCp1,i.waistGap1Right).curve(i.waistGap1RightCp2,i.hipsGap1Cp,i.hipsGap1).close().attr("class","fabric");let p=(new n).move(i.bottomCF).curve(i.bottomCFCp2,i.hipRiseCp1,i.hipRise).split(i.hipsGap2)[1];"11"===e.panels&&(p=p.split(i.hipsGap3)[0]),a.panel3=p.curve(i.hipsGap3Cp,i.waistGap3LeftCp1,i.waistGap3Left).curve(i.waistGap3LeftCp2,i.underbustGap3LeftCp,i.underbustGap3Left).line(i.underbustGap2Right).curve(i.underbustGap2RightCp,i.waistGap2RightCp1,i.waistGap2Right).curve(i.waistGap2RightCp2,i.hipsGap2Cp,i.hipsGap2).close().attr("class","fabric");let h=(new n).move(i.backRise).curve(i.backRiseCp1,i.topSideCp1,i.topSide);i.underbustGap4Left=h.intersectsX(i.underbustGap4Left.x).pop(),a.panel4=(new n).move(i.hipRise).curve(i.hipRiseCp2,i.backDropCp1,i.backDrop).split(i.hipsGap4)[0].curve(i.hipsGap4Cp,i.waistGap4LeftCp1,i.waistGap4Left).curve(i.waistGap4LeftCp2,i.underbustGap4LeftCp,i.underbustGap4Left).join(h.split(i.underbustGap4Left)[1]),"11"===e.panels&&a.panel4.line(i.underbustGap3Right),a.panel4.curve(i.underbustGap3RightCp,i.waistGap3RightCp1,i.waistGap3Right).curve(i.waistGap3RightCp2,i.hipsGap3Cp,i.hipsGap3),"11"===e.panels&&a.panel4.line(i.hipRise),a.panel4.close().attr("class","fabric"),i.underbustGap4Right=h.intersectsX(i.underbustGap4Right.x).pop(),i.underbustGap5Left=h.intersectsX(i.underbustGap5Left.x).pop();let d=h.split(i.underbustGap5Left)[1].split(i.underbustGap4Right)[0];return a.panel5=c.split(i.hipsGap5)[0].split(i.hipsGap4)[1].curve(i.hipsGap5Cp,i.waistGap5LeftCp1,i.waistGap5Left).curve(i.waistGap5LeftCp2,i.underbustGap5LeftCp,i.underbustGap5Left).curve(d.ops[1].cp1,d.ops[1].cp2,d.ops[1].to).curve(i.underbustGap4RightCp,i.waistGap4RightCp1,i.waistGap4Right).curve(i.waistGap4RightCp2,i.hipsGap4Cp,i.hipsGap4).close().attr("class","fabric"),i.underbustGap5Right=h.intersectsX(i.underbustGap5Right.x).pop(),a.panel6=c.split(i.hipsGap5)[1].line(i.backRise).join(h.split(i.underbustGap5Right)[0]).curve(i.underbustGap5RightCp,i.waistGap5RightCp1,i.waistGap5Right).curve(i.waistGap5RightCp2,i.hipsGap5Cp,i.hipsGap5).close().attr("class","fabric"),a.outline.hide(),r}};const ko={name:"cathrin.panel1",from:bo,draft:function(t){const{macro:e,sa:o,store:i,paths:a,points:s,options:n,Point:r,Path:l,complete:c,part:p}=t;return s.anchor=s.topCF.clone(),delete a.outline,delete a.panel2,delete a.panel3,delete a.panel4,delete a.panel5,delete a.panel6,"13"===n.panels?function({macro:t,utils:e,sa:o,points:i,paths:a,Point:s,Path:n,store:r,complete:l,part:c}){i.anchor=i.topCF.clone();let p=(new n).move(i.underbustGap1Left).curve(i.frontRiseStartCp2,i.topCFCp1,i.topCF);i.topABsplit=p.shiftFractionAlong(.3);let h=(new n).move(i.bottomCF).curve(a.panel1.ops[1].cp1,a.panel1.ops[1].cp2,a.panel1.ops[1].to);i.bottomABsplit=h.shiftFractionAlong(.3),a.panel1a_nonfold=(new n).move(i.bottomCF).join(h.split(i.bottomABsplit)[0]).line(i.topABsplit).join(p.split(i.topABsplit)[1]).hide(),a.panel1a=a.panel1a_nonfold.clone().close().attr("class","fabric").unhide(),a.panel1b=h.split(i.bottomABsplit)[1].curve(i.hipsGap1Cp,i.waistGap1LeftCp1,i.waistGap1Left).curve(i.waistGap1LeftCp2,i.underbustGap1LeftCp,i.underbustGap1Left).join(p.split(i.topABsplit)[0]).line(i.bottomABsplit).close().attr("class","fabric");let d=5;return o&&(d=2*o+5),a.panel1b=a.panel1b.translate(d,0),delete a.panel1,o&&(a.saA=a.panel1a_nonfold.offset(o).attr("class","fabric sa"),a.saA.line(i.topCF).move(i.bottomCF).line(a.saA.start()),a.saB=a.panel1b.offset(o).attr("class","fabric sa")),r.cutlist.setCut([{cut:1,from:"interfacing"},{cut:1,from:"fabric"}]),t("cutonfold",{to:i.bottomCF,from:i.topCF,grainline:!0}),t("grainline",{to:i.topABsplit.translate(d,0),from:new s(i.topABsplit.translate(d,0).x,i.hipsGap1.translate(d,0).y)}),i.midwayAB=i.topABsplit.shiftFractionTowards(i.bottomABsplit,.5),i.titleA=i.underbustCF.shiftFractionTowards(i.midwayAB,.5),t("title",{id:"1a",nr:"1a",title:"panel1a",at:i.titleA,align:"center",scale:.7}),r.cutlist.setCut([{cut:2,from:"interfacing"},{cut:2,from:"fabric"}]),i.titleB=i.hipsGap1.translate(d,0).shiftFractionTowards(i.midwayAB,.5),t("title",{id:"1b",nr:"1b",title:"panel1b",at:i.titleB,align:"center",scale:.7}),t("vd",{id:"hCfBottomToWaist1a",from:i.bottomCF,to:i.waistCF,x:i.topCF.x-o-30}),t("vd",{id:"hCfWaistToTop1a",from:i.waistCF,to:i.topCF,x:i.topCF.x-o-30}),i.waistAB=e.beamsIntersect(i.topABsplit,i.bottomABsplit,i.waistCF,i.waistGap1),t("vd",{id:"hSideBottomToWaist1a",from:i.bottomABsplit,to:i.waistAB,x:i.topCF.x-o-15}),t("vd",{id:"hSideWaistToTop1a",from:i.waistAB,to:i.topABsplit,x:i.topCF.x-o-15}),t("hd",{id:"wBottom1a",from:i.bottomCF,to:i.bottomABsplit,y:i.bottomCF.y+o+15}),t("ld",{id:"wAtWaist1a",from:i.waistCF,to:i.waistAB}),t("hd",{id:"wAtTop1a",from:i.topCF,to:i.topABsplit,y:i.topCF.y-o-15}),t("vd",{id:"hSideBottomToWaist1b",from:i.hipsGap1.translate(d,0),to:i.waistGap1Left.translate(d,0),x:i.underbustGap1Left.translate(d,0).x+o+15}),t("vd",{id:"hSideWaistToTop1b",from:i.waistGap1Left.translate(d,0),to:i.underbustGap1Left.translate(d,0),x:i.underbustGap1Left.translate(d,0).x+o+15}),t("vd",{id:"hCenterBottomToWaist1b",from:i.bottomABsplit.translate(d,0),to:i.waistAB.translate(d,0),x:i.underbustGap1Left.translate(d,0).x+o+30}),t("vd",{id:"hCenterwaistTotop",from:i.waistAB.translate(d,0),to:i.topABsplit.translate(d,0),x:i.underbustGap1Left.translate(d,0).x+o+30}),t("hd",{id:"wBottom1b",from:i.bottomABsplit.translate(d,0),to:i.hipsGap1.translate(d,0),y:i.bottomABsplit.y+o+15}),t("ld",{id:"wAtWaist1b",from:i.waistAB.translate(d,0),to:i.waistGap1Left.translate(d,0)}),t("hd",{id:"wAtTop1b",from:i.topABsplit.translate(d,0),to:i.underbustGap1Left.translate(d,0),y:i.topABsplit.y-o-15}
1),l&&(i.waistGap0Left=new s(i.topCF.x,i.waistCF.y),a.panel1aWaist=(new n).move(i.waistGap0Left).line(i.waistAB).attr("class","dashed mark stroke-sm").addText("cathrin:waistLine","text-xs mark"),a.panel1bWaist=(new n).move(i.waistAB).line(i.waistGap1Left).attr("class","dashed mark stroke-sm").addText("cathrin:waistLine","text-xs mark"),a.panel1bWaist=a.panel1bWaist.translate(d,0)),c}(t):(o&&(a.sa=a.panel1.offset(o).attr("class","fabric sa")),i.cutlist.setCut([{cut:1,from:"interfacing"},{cut:1,from:"fabric"}]),e("cutonfold",{to:s.bottomCF,from:s.topCF,grainline:!0}),s.title=s.waistCF.shiftFractionTowards(s.underbustGap1Left,.5),e("title",{nr:1,title:"",at:s.title,align:"center",scale:.7}),e("vd",{id:"hCfBottomToWais",from:s.bottomCF,to:s.waistCF,x:s.topCF.x-o-15}),e("vd",{id:"hCfWaistToTop",from:s.waistCF,to:s.topCF,x:s.topCF.x-o-15}),e("vd",{id:"hSideBottomToWaist",from:s.hipsGap1,to:s.waistGap1Left,x:s.hipsGap1.x+o+15}),e("vd",{id:"hSideWaistToTop",from:s.waistGap1Left,to:s.underbustGap1Left,x:s.hipsGap1.x+o+15}),e("hd",{id:"wBottom",from:s.bottomCF,to:s.hipsGap1,y:s.bottomCF.y+o+15}),e("hd",{id:"wTop",from:s.topCF,to:s.underbustGap1Left,y:s.topCF.y-o-15}),e("ld",{id:"wAtWaist",from:s.waistCF,to:s.waistGap1Left}),c&&(s.waistGap0Left=new r(s.topCF.x,s.waistCF.y),a.panel1Waist=(new l).move(s.waistGap1Left).line(s.waistGap0Left).attr("class","dashed mark stroke-sm").addText("cathrin:waistLine","text-xs mark")),p)}};const wo={name:"cathrin.panel2",from:bo,draft:function({macro:t,sa:e,points:o,paths:i,Point:a,store:s,complete:n,Path:r,part:l}){return o.anchor=o.underbustGap1Right.clone(),delete i.outline,delete i.panel1,delete i.panel3,delete i.panel4,delete i.panel5,delete i.panel6,e&&(i.sa=i.panel2.offset(e).attr("class","fabric sa")),s.cutlist.setCut([{cut:2,from:"interfacing"},{cut:2,from:"fabric"}]),o.grainlineTop=new a(o.waistGap1Right.shiftFractionTowards(o.waistGap2Left,.5).x,o.underbustGap1Right.y),o.grainlineBottom=new a(o.grainlineTop.x,o.hipsGap2.y),t("grainline",{from:o.grainlineBottom,to:o.grainlineTop}),n&&(i.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:i,Point:a,store:s,Path:n,complete:r,part:l}){return o.anchor=o.underbustGap2Right.clone(),delete i.outline,delete i.panel1,delete i.panel2,delete i.panel4,delete i.panel5,delete i.panel6,e&&(i.sa=i.panel3.offset(e).attr("class","fabric sa")),s.cutlist.setCut([{cut:2,from:"interfacing"},{cut:2,from:"fabric"}]),o.grainlineTop=new a(o.waistGap2Right.shiftFractionTowards(o.waistGap3Left,.5).x,o.underbustGap2Right.y),o.grainlineBottom=new a(o.grainlineTop.x,o.hipsGap3.y),t("grainline",{from:o.grainlineBottom,to:o.grainlineTop}),r&&(i.panel3Waist=(new n).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:i,points:a,paths:s,Point:n,store:r,Path:l,complete:c,part:p}){return a.anchor=a.underbustGap3Right.clone(),delete s.outline,delete s.panel1,delete s.panel2,delete s.panel3,delete s.panel5,delete s.panel6,e&&(s.sa=s.panel4.offset(e).attr("class","fabric sa")),r.cutlist.setCut([{cut:2,from:"interfacing"},{cut:2,from:"fabric"}]),a.grainlineTop=new n(a.waistGap3Right.shiftFractionTowards(a.waistGap4Left,.5).x,a.underbustGap3Right.y),a.grainlineBottom=new n(a.grainlineTop.x,a.hipsGap4.y),t("grainline",{from:a.grainlineBottom,to:a.grainlineTop}),c&&(s.panel4Waist=(new l).move(a.waistGap3Right).line(a.waistGap4Left).attr("class","dashed mark stroke-sm").addText("cathrin:waistLine","text-xs mark")),a.title=a.grainlineTop.shift(-90,a.grainlineTop.dy(a.waistGap4Left)/2),t("title",{nr:4,title:"",at:a.title,scale:.7,align:"center"}),a.logo=a.grainlineTop.shiftFractionTowards(a.grainlineBottom,.8),o.logo=new i("logo",a.logo).attr("data-scale",.8),t("hd",{id:"wBottom",from:a.hipsGap3,to:a.hipsGap4,y:a.hipsGap3.y+e+15}),t("ld",{id:"wAtWaist",from:a.waistGap3Right,to:a.waistGap4Left}),t("hd",{id:"wAtTop",from:a.underbustGap3Right,to:a.underbustGap4Left,y:a.underbustGap4Left.y-e-15}),t("vd",{id:"hLeftBottomToWaist",from:a.hipsGap3,to:a.waistGap3Right,x:a.hipsGap3.x-e-15}),t("vd",{id:"hLeftWaistToTop",from:a.waistGap3Right,to:a.underbustGap3Right,x:a.hipsGap3.x-e-15}),t("vd",{id:"hRightBottomToWaist",from:a.hipsGap4,to:a.waistGap3Right,x:a.hipsGap4.x+e+15}),t("vd",{id:"hRightWaistToTop",from:a.waistGap3Right,to:a.underbustGap4Left,x:a.hipsGap4.x+e+15}),p}};const To={name:"cathrin.panel5",from:bo,draft:function({macro:t,sa:e,points:o,paths:i,Point:a,store:s,Path:n,complete:r,part:l}){return o.anchor=o.underbustGap4Right.clone(),delete i.outline,delete i.panel1,delete i.panel2,delete i.panel3,delete i.panel4,delete i.panel6,e&&(i.sa=i.panel5.offset(e).attr("class","fabric sa")),s.cutlist.setCut([{cut:2,from:"interfacing"},{cut:2,from:"fabric"}]),o.grainlineTop=new a(o.waistGap4Right.shiftFractionTowards(o.waistGap5Left,.5).x,o.underbustGap4Right.y),o.grainlineBottom=new a(o.grainlineTop.x,o.hipsGap5.y),t("grainline",{from:o.grainlineBottom,to:o.grainlineTop}),r&&(i.panel5Waist=(new n).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 yo={name:"cathrin.panel6",from:bo,draft:function({macro:t,sa:e,points:o,paths:i,Point:a,store:s,Path:n,complete:r,part:l}){return o.anchor=o.backRise.clone(),delete i.outline,delete i.panel1,delete i.panel2,delete i.panel3,delete i.panel4,delete i.panel5,e&&(i.sa=i.panel6.offset(e).attr("class","fabric sa")),s.cutlist.setCut([{cut:2,from:"interfacing"},{cut:2,from:"fabric"}]),o.grainlineTop=new a(o.waistGap5Right.shiftFractionTowards(o.waist
1CB,.5).x,o.underbustGap5Right.y),o.grainlineBottom=new a(o.grainlineTop.x,o.hipsGap5.y),t("grainline",{from:o.grainlineBottom,to:o.grainlineTop}),r&&(i.panel6Waist=(new n).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 a(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 s.pT({data:uo,parts:[ko,wo,Co,vo,To,yo]}),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,s.Wx)("waist"),menu:"fit"},seatEase:{pct:2,min:0,max:10,...(0,s.Wx)("seat"),menu:"fit"},kneeEase:{pct:6,min:1,max:25,...(0,s.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,s.Wx)("waistToFloor"),menu:"advanced"}},draft:function({points:t,Point:e,paths:o,Path:i,measurements:a,options:s,complete:n,store:r,macro:l,utils:c,snippets:p,Snippet:h,sa:d,absoluteOptions:f,log:m,units:u,part:g}){const b=()=>s.fitKnee?(new i).move(t.fork).curve(t.forkCp2,t.kneeInCp1,t.kneeIn).line(t.floorIn):(new i).move(t.fork).curve(t.forkCp2,t.kneeInCp1,t.floorIn),k=()=>{let e=t.styleWaistOut||t.waistOut;return s.fitKnee?t.waistOut.x>t.seatOut.x?(new i).move(t.floorOut).line(t.kneeOut).curve(t.kneeOutCp2,t.seatOut,e):(new i).move(t.floorOut).line(t.kneeOut).curve(t.kneeOutCp2,t.seatOutCp1,t.seatOut).curve_(t.seatOutCp2,e):t.waistOut.x>t.seatOut.x?(new i).move(t.floorOut).curve(t.kneeOutCp2,t.seatOut,e):(new i).move(t.floorOut).curve(t.kneeOutCp2,t.seatOutCp1,t.seatOut).curve_(t.seatOutCp2,e)},w=()=>(new i).move(t.waistIn).line(t.crossSeamCurveStart).curve(t.crossSeamCurveCp1,t.crossSeamCurveCp2,t.fork).length()-a.crossSeamBack,C=()=>{t.crossSeamCurveStart=t.waistIn.shiftFractionTowards(t.cbSeat,s.crossSeamCurveStart),t.crossSeamCurveMax=c.beamsIntersect(t.waistIn,t.cbSeat,t.fork,t.fork.shift(0,666)),t.crossSeamCurveCp1=t.crossSeamCurveStart.shiftFractionTowards(t.crossSeamCurveMax,s.crossSeamCurveBend),t.crossSeamCurveCp2=t.fork.shiftFractionTowards(t.crossSeamCurveMax,s.crossSeamCurveBend).rotate(s.crossSeamCurveAngle,t.fork)};t.waistX=new e(-1*a.waistBackArc*(1+s.waistEase),0),t.upperLegY=new e(0,a.waistToUpperLeg),t.seatX=new e(-1*a.seatBackArc*(1+s.seatEase),0),t.seatY=new e(0,a.waistToSeat),t.seatOut=t.seatY,t.cbSeat=new e(t.seatX.x,t.seatY.y),t.fork=new e(a.seatBackArc*(1+s.seatEase)*-1.25,t.upperLegY.y*(1+s.crotchDrop)),t.grainlineTop=t.upperLegY.shiftFractionTowards(t.fork,s.grainlinePosition),t.knee=ne
1w e(t.grainlineTop.x,a.waistToKnee),t.floor=new e(t.grainlineTop.x,a.waistToFloor*(1+s.lengthBonus)),t.grainlineBottom=t.floor;let v=a.knee*(1+s.kneeEase);if(!s.fitKnee){let t=a.seatFront;t>v&&(v=t)}r.set("kneeTotal",v),r.set("kneeBack",v*s.legBalance),r.set("kneeFront",v*(1-s.legBalance));let T=r.get("kneeBack")/2;if(t.kneeOut=t.knee.shift(0,T),t.kneeIn=t.kneeOut.flipX(t.knee),t.floorOut=t.floor.shift(0,T),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-s.waistBalance))}else t.waistIn=t.waistX;let y=t.waistX.x;if(t.waistOut=t.waistIn.shift(180,y),C(),s.fitCrossSeam&&s.fitCrossSeamBack){let e,o=["waistIn","waistOut"],i=[],a=w(),s=0;do{e=a,s++;for(const e of o)i[e]=t[e],t[e]=t[e].rotate(a/15,t.seatOut);i.fork=t.fork,t.fork=t.fork.shift(0,a/5),i.forkCp2=t.forkCp2,t.forkCp2=t.crossSeamCurveCp2.rotate(-90,t.fork),C(),a=w()}while(Math.abs(a)>1&&s<15&&Math.abs(a)<Math.abs(e));if(Math.abs(a)>Math.abs(e)){for(const e of o)t[e]=i[e];t.fork=i.fork,t.forkCp2=i.forkCp2}(Math.abs(a)>1||Math.abs(a)>Math.abs(e))&&(m.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",k().length()),s.waistHeight<1||f.waistbandWidth>0?(t.styleWaistOut=k().reverse().shiftAlong(a.waistToHips*(1-s.waistHeight)+f.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!==s.waistAngle&&("both"===s.useWaistAngleFor||"backOnly"===s.useWaistAngleFor)){let e,o;e=t.fork.dx(t.crossSeamCurveStart),o=Math.tan(s.waistAngle*Math.PI/180)*e,t.styleWaistIn=t.crossSeamCurveStart.shiftOutwards(t.styleWaistIn,o),m.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(k()).line(e).line(t.crossSeamCurveStart).curve(t.crossSeamCurveCp1,t.crossSeamCurveCp2,t.fork).close()})().attr("class","fabric"),d&&(o.saBase=k().join((new i).move(t.styleWaistOut).line(t.styleWaistIn).line(t.crossSeamCurveStart).curve(t.crossSeamCurveCp1,t.crossSeamCurveCp2,t.fork)).join(b()),o.hemBase=(new i).move(t.floorIn).line(t.floorOut),o.sa=o.hemBase.offset(3*d).join(o.saBase.offset(d)).close().attr("class","fabric sa"),o.saBase.hide(),o.hemBase.hide()),n&&(o.hint=(new i).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 h("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)+d+15}),l("vd",{id:"hHemToFork",from:t.floorIn,to:t.fork,x:t.fork.x-d-15}),l("vd",{id:"hForkToCbWaist",from:t.fork,to:t.styleWaistIn,x:t.fork.x-d-15}),l("vd",{id:"hFull",from:t.floorIn,to:t.styleWaistIn,x:t.fork.x-d-30}),l("vd",{id:"hStartCrotchCurveToCbWaist",from:t.crossSeamCurveStart,to:t.styleWaistIn,x:t.crossSeamCurveStart.x-d-15}),l("hd",{id:"wCbWaistToPleat",from:t.styleWaistIn,to:t.grainlineTop,y:t.styleWaistIn.y-d-15}),l("hd",{id:"wStartCrotchCurveToPleat",from:t.crossSeamCurveStart,to:t.grainlineTop,y:t.styleWaistIn.y-d-30}),l("hd",{id:"wForkProjectionToPleat",from:t.crossSeamCurveMax,to:t.grainlineTop,y:t.styleWaistIn.y-d-45}),l("hd",{id:"wForkToPleat",from:t.fork,to:t.grainlineTop,y:t.styleWaistIn.y-d-60}),l("hd",{id:"wPleatToSideWaist",from:t.grainlineTop,to:t.styleWaistOut,y:t.styleWaistIn.y-d-15}),t.seatOut.x>t.styleWaistOut.x&&l("hd",{id:"wPleatToSideWaistAlt",from:t.grainlineTop,to:t.seatOut,y:t.styleWaistIn.y-d-30}),g}};const Wo={name:"titan.front",after:Fo,draft:function({points:t,Point:e,paths:o,Path:i,measurements:a,options:s,complete:n,store:r,macro:l,utils:c,snippets:p,Snippet:h,sa:d,absoluteOptions:f,log:m,units:u,part:g}){const b=()=>s.fitKnee?(new i).move(t.floorIn).line(t.kneeIn).curve(t.kneeInCp2,t.forkCp1,t.fork):(new i).move(t.floorIn).curve(t.kneeInCp2,t.forkCp1,t.fork),k=()=>{let e=t.styleWaistOut||t.waistOut;return s.fitKnee?t.waistOut.x<t.seatOut.x?(new i).move(e).curve(t.seatOut,t.kneeOutCp1,t.kneeOut).line(t.floorOut):(new i).move(e)._curve(t.seatOutCp1,t.seatOut).curve(t.seatOutCp2,t.kneeOutCp1,t.kneeOut).line(t.floorOut):t.waistOut.x<t.seatOut.x?(new i).move(e).curve(t.seatOut,t.kneeOutCp1,t.floorOut):(new i).move(e)._curve(t.seatOutCp1,t.seatOut).curve(t.seatOutCp2,t.kneeOutCp1,t.floorOut)},w=()=>(new i).move(t.waistIn).line(t.crotchSeamCurveStart).curve(t.crotchSeamCurveCp2,t.crotchSeamCurveCp1,t.fork).length()-a.crossSeamFront,C=()=>{t.crotchSeamCurveStart=t.waistIn.shiftFractionTowards(t.cfSeat,s.crotchSeamCurveStart),t.crotchSeamCurveMax=c.beamsIntersect(t.waistIn,t.cfSeat,t.fork,t.fork.shift(0,666)),t.crotchSeamCurveCp1=t.fork.shiftFractionTowards(t.crotchSeamCurveMax,s.crotchSeamCurveBend).rotate(-1*s.crotchSeamCurveAngle,t.fork),t.crotchSeamCurveCp2=t.crotchSeamCurveStart.shiftFractionTowards(t.crotchSeamCurveMax,s.crotchSeamCurveBend),t.forkCp1=t.crotchSeamCurveCp1.rotate(90,t.fork)},v=()=>b().length()-r.get("inseamBack"),T=()=>k().length()-r.get("outseamBack"),y=()=>{let t=v(),e=T();return Math.abs(t)>Math.abs(e)?e:t},x=e=>{const o="out"===e;let i=["cfSeat","crotchSeamCurveCp1","crotchSeamCurveCp2","crotchSeamCurveStart","waistIn","cfWaist","waistOut"];i.push(o?"seatOut":"fork");const a=o?T:v;let s=0,n=a();do{for(const e of i)t[e]=t[e].rotate(n/10*(o?1:-1),t[o?"fork":"seatOut"]);s++,n=a()}while(Math.abs(n)>1&&s<20)},B=()=>x("out"),S=()=>x("in");t.waistX=new e(a.waistFrontArc*(1+s.waistEase),0),t.upperLegY=new e(0,a.waistToUpperLeg),t.seatX=new e(a.seatFrontArc*(1+s.seatEase),0),t.seatY=new e(0,a.waistToSeat),t.seatOut=t.seatY,t.cfSeat=new e(t.seatX.x,t.seatY.y),t.fork=new e(a.seatFrontArc*(1+s.seatEase)*1.25,t.upperLegY.y*(1+s.crotchDrop)),t.grainlineTop=t.upperLegY.shiftFractionTowards(t.fork,s.grainlinePosition),t.knee=ne
1w e(t.grainlineTop.x,a.waistToKnee),t.floor=new e(t.grainlineTop.x,a.waistToFloor*(1+s.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,a.waistToHips*s.waistHeight+f.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*s.waistBalance,0),t.waistIn=t.waistOut.shift(0,R),t.cfWaist=t.waistIn,C(),s.fitCrossSeam&&s.fitCrossSeamFront){let e,o=w(),i=["waistIn","waistOut","cfWaist"],a=[],s=0;do{e=o,s++;for(const e of i)a[e]=t[e],t[e]=t[e].rotate(o/-15,t.seatOut);a.fork=t.fork,t.fork=t.fork.shift(180,o/5),C(),o=w()}while(Math.abs(o)>1&&s<15&&Math.abs(o)<Math.abs(e));if(Math.abs(o)>Math.abs(e)){for(const e of i)t[e]=a[e];t.fork=a.fork}(Math.abs(o)>1||Math.abs(o)>Math.abs(e))&&(m.warn("Unable to adjust the front crotch seam to fit the given measurements, after "+s+" iterations."),r.flag.warn({msg:"titan:crossSeamFitFailedFront"}))}if((v()<0&&T()<0||v()>0&&T()>0)&&(()=>{let e=["kneeInCp2","kneeOutCp1","kneeIn","kneeOut","knee","floorIn","floorOut","floor","grainlineBottom"],o=y(),i=0;do{i++;for(const i of e)t[i]=t[i].shift(90,o);o=y()}while(Math.abs(o)>1&&i<10)})(),B(),S(),B(),S(),s.waistHeight<1||f.waistbandWidth>0?(t.styleWaistOut=k().shiftAlong(a.waistToHips*(1-s.waistHeight)+f.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!=s.waistAngle&&("both"===s.useWaistAngleFor||"frontOnly"===s.useWaistAngleFor)){let e,o;e=t.fork.dx(t.crotchSeamCurveStart),o=Math.tan(s.waistAngle*Math.PI/180)*e,t.styleWaistIn=t.crotchSeamCurveStart.shiftOutwards(t.styleWaistIn,o),m.info(["heightReductionCenterFront",u(-o)])}return o.seam=(()=>{let e=t.styleWaistIn||t.waistIn,o=t.styleWaistOut||t.waistOut;return k().line(t.floorIn).join(b()).curve(t.crotchSeamCurveCp1,t.crotchSeamCurveCp2,t.crotchSeamCurveStart).line(e).line(o).close()})().attr("class","fabric"),n&&(o.hint=(new i).move(t.crotchSeamCurveStart).line(t.crotchSeamCurveMax).line(t.fork).addClass("note help")),d&&(o.saBase=b().join((new i).move(t.fork).curve(t.crotchSeamCurveCp1,t.crotchSeamCurveCp2,t.crotchSeamCurveStart).line(t.styleWaistIn).line(t.styleWaistOut)).join(k()),o.hemBase=(new i).move(t.floorOut).line(t.floorIn),o.sa=o.hemBase.offset(3*d).join(o.saBase.offset(d)).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 h("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+d+15}),l("vd",{id:"hForkToCfWaist",from:t.fork,to:t.styleWaistIn,x:t.fork.x+d+15}),l("vd",{id:"hHemToSideWaist",from:t.floorIn,to:t.styleWaistOut,x:(t.seatOut.x<t.styleWaistOut.x?t.seatOut.x:t.styleWaistOut.x)-d-15}),l("vd",{id:"hStartCrotchCurveToCfWaist",from:t.crotchSeamCurveStart,to:t.styleWaistIn,x:t.crotchSeamCurveStart.x+d+15}),l("hd",{id:"wSideWaistToPleat",from:t.seatOut,to:t.grainlineTop,y:t.styleWaistIn.y-d-15}),t.styleWaistOut.x<t.seatOut.x&&l("hd",{id:"wSideWaistToPleatAlt",from:t.styleWaistOut,to:t.grainlineTop,y:t.styleWaistIn.y-d-30}),l("hd",{id:"wPleatToCfWaist",from:t.grainlineTop,to:t.styleWaistIn,y:t.styleWaistIn.y-d-15}),l("hd",{id:"wPleastToStartCrotchCurve",from:t.grainlineTop,to:t.crotchSeamCurveStart,y:t.styleWaistIn.y-d-30}),l("hd",{id:"wPleastToCrotchProjection",from:t.grainlineTop,to:t.crotchSeamCurveMax,y:t.styleWaistIn.y-d-45}),l("hd",{id:"wPleastToFork",from:t.grainlineTop,to:t.fork,y:t.styleWaistIn.y-d-60}),g}},Ho=new s.pT({data:Lo,parts:[Fo,Wo]}),Ao={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 Oo={name:"charlie.front",from:Wo,hide:s.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,s.Wx)("waist"),menu:"fit"},seatEase:{pct:5,min:0,max:10,...(0,s.Wx)("seat"),menu:"fit"},kneeEase:{pct:15,min:10,max:30,...(0,s.Wx)("knee"),menu:"fit"},waistHeight:{pct:-4,min:-15,max:40,menu:"style"},waistbandWidth:{pct:3,min:1,max:6,snap:Ro.HJ,...(0,s.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:i,options:a,complete:s,measurements:n,store:r,macro:l,utils:c,snippets:p,Snippet:h,sa:d,log:f,part:m}){const u=()=>(new i).move(t.slantTop).line(t.slantCurveStart).curve(t.slantCurveCp1,t.slantCurveCp2,t.slantCurveEnd).join(b.split(t.slantCurveEnd).pop()),g=()=>{let t=u();return k.clone().join(w).join(t)},b=t.waistOut.x<t.seatOut.x?(new i).move(t.styleWaistOut).curve(t.seatOut,t.kneeOutCp1,t.kneeOut).line(t.floorOut):(new i).move(t.styleWaistOut)._curve(t.seatOutCp1,t.seatOut).curve(t.seatOutCp2,t.kneeOutCp1,t.kneeOut).line(t.floorOut),k=(new i).move(t.floorIn).line(t.kneeIn).curve(t.kneeInCp2,t.forkCp1,t.fork),w=(new i).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,a.flyLength).y);C?t.flyBottom=C:f.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*a.flyLength).y),t.flyTop=t.styleWaistOut.shiftFractionTowards(t.styleWaistIn,1-a.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,a.flyCurve),t.flyCurveCp2=t.flyCurveStart.shiftFractionTowards(t.flyCorner,a.flyCurve);let v=8*(1-a.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 i).move(t.flyTop).line(t.flyCurveStart).curve(t.flyCurveCp2,t.flyCurveCp1,t.flyBottom).setClass("lining dashed");let T=o.flyFacingLine.offset(-v);if(n.waist>500){const e=T.split(t.flyBottomSeamLine)[0];e&&(o.completeJseam=e.clone().setClass("dashed").addText("jseamStitchLine","center text-sm"),o.flyRightLegExtension=w.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-a.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()*a.frontPocketSlantDepth),t.slantBottom=b.shiftAlong(r.get("slantLength")),t.slantCurveStart=t.slantBottom.shiftFractionTowards(t.slantTop,a.frontPocketSlantRound),t.slantCurveEnd=b.shiftAlong(t.slantBottom.dist(t.slantCurveStart)+r.get("slantLength")),t.slantCurveCp1=t.slantBottom.shiftFractionTowards(t.slantCurveStart,a.frontPocketSlantBend),t.slantCurveCp2=b.shiftAlong(t.slantBottom.dist(t.slantCurveCp1)+r.get("slantLength")),t.pocketbagTopRight=t.slantTop.shiftFractionTowards(t.styleWaistIn,a.frontPocketWidth),t.pocketbagBottomRight=t.pocketbagTopRight.shift(t.slantTop.angle(t.pocketbagTopRight)-90,t.styleWaistIn.dy(t.fork)*a.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,a.frontPocketFacing),t.facingDirection=t.slantCurveStart.shift(0,t.slantTop.dist(t.pocketFacingTop)),t.pocketFacingBottom=(new i).move(t.pocketFacingTop).line(t.pocketFacingTop.shiftFractionTowards(t.facingDirection,4)).intersects((new i).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"),d&&(o.sa=g().offset(d).join((new i).move(t.floorOut).line(t.floorIn).offset(6*d)).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",k.length()),r.set("frontOutseamLength",u().length());const y=(new i).move(t.flyCurveStart).curve(t.flyCurveCp2,t.flyCurveCp1,t.flyBottom);if(s&&(t.titleAnchor=new e(t.knee.x,t.fork.y),l("title",{at:t.titleAnchor,nr:2,title:"front"}),p.logo=new h("logo",t.titleAnchor.shiftFractionTowards(t.knee,.666)),t.topPleat=c.beamsIntersect(t.styleWaistIn,t.styleWaistOut,t.knee,t.grainlineBottom),t.slantBottomNotch=(new i).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 i).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:d?d/1.5:7.5,suffix:"slantTop"}),l("bartack",{anchor:t.slantBottomNotch,length:d?d/2:5,suffix:"slantBottom"}),n.waist>200&&l("bartackFractionAlong",{path:T.reverse(),start:.02,end:.05,suffix:"stom"}),d&&(o.sa=g().offset(d).join((new i).move(t.floorOut).line(t.floorIn).offset(6*d)).close().trim().setClass("fabric sa"),n.waist>500))){let t=o.flyRightLegExtension.offset(d);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 h("logo",t.titleAnchor.shiftFractionTowards(t.knee,.666)),t.topPleat=c.beamsIntersect(t.styleWaistIn,t.styleWaistOut,t.knee,t.grainlineBottom),t.slantBottomNotch=(new i).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:d?d/1.5:7.5,suffix:"slantTop"}),l("bartack",{anchor:t.slantBottomNotch,length:d?d/2:5,suffix:"slantBottom"}),n.waist>200&&l("bartackFractionAlong",{path:y.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-d;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+d;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}),m}};const Do={name:"charlie.back",from:Fo,after:Oo,hide:s.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:i,options:a,complete:s,store:n,macro:r,snippets:l,Snippet:c,sa:p,log:h,units:d,utils:f,part:m}){const u=()=>(new i).move(t.slantOut).line(t.slantCurveStart).curve(t.slantCurveCp1,t.slantCurveCp2,t.slantCurveEnd).join(w.split(t.slantCurveEnd).pop()).reverse();let g=t.styleWaistIn.dist(t.styleWaistOut),b=t.styleWaistIn.angle(t.styleWaistOut);n.set("backPocketToWaistband",g*a.backPocketVerticalPlacement),n.set("backPocketWidth",g*a.backPocketWidth),n.set("backPocketDepth",g*a.backPocketDepth),t.waistPocketCenter=t.styleWaistIn.shiftFractionTowards(t.styleWaistOut,a.backPocketHorizontalPlacement),t.pocketCenter=t.waistPocketCenter.shift(b-90,n.get("backPocketToWaistband")),t.pocketRight=t.pocketCenter.shift(b,n.get("backPocketWidth")/2),t.pocketLeft=t.pocketCenter.shift(b,n.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 k=g-(t.styleWaistIn.dist(t.backDartLeft)+t.styleWaistOut.dist(t.backDartRight));for(let H of["styleWaistIn","crossSeamCurveStart","crossSeamCurveCp1"])t[H]=t[H].shift(b+180,k/2);t.styleWaistOut=t.styleWaistOut.shift(b,k/2);const w=t.waistOut.x>t.seatOut.x?(new i).move(t.floorOut).line(t.kneeOut).curve(t.kneeOutCp2,t.seatOut,t.styleWaistOut).reverse():(new i).move(t.floorOut).line(t.kneeOut).curve(t.kneeOutCp2,t.seatOutCp1,t.seatOut).curve_(t.seatOutCp2,t.styleWaistOut).reverse(),C=(new i).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=w.shiftAlong(n.get("slantLength")),t.slantOut=t.styleWaistIn.shiftOutwards(t.styleWaistOut,n.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),n.set("waistbandBack",(new i).move(t.styleWaistIn).curve(t.cbCp,t.backDartLeftCp,t.backDartLeft).length()+(new i).move(t.backDartRight).curve_(t.backDartRightCp,t.slantOut).length()),n.set("legWidthBack",t.floorIn.dist(t.floorOut)),t.slantCurveStart=t.slantBottom.shiftFractionTowards(t.slantOut,a.frontPocketSlantRound),t.slantCurveEnd=w.shiftAlong(t.slantBottom.dist(t.slantCurveStart)+n.get("slantLength")),t.slantCurveCp1=t.slantBottom.shiftFractionTowards(t.slantCurveStart,a.frontPocketSlantBend),t.slantCurveCp2=w.shiftAlong(t.slantBottom.dist(t.slantCurveCp1)+n.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 i).line(t.pocketCenter)).close().attr("class","fabric"),o.saBase.hide(),p&&(o.sa=o.saBase.offset(p).join((new i).move(t.floorIn).line(t.floorOut).offset(6*p)).close().addClass("fabric sa")),s&&(o.pocketLine=(new i).move(t.pocketLeft).line(t.pocketRight).attr("class","fabric dashed"));const T=C.length(),y=n.get("frontInseamLength"),x=y-T;let B="Charlie back inseam is longer than front";x>0&&(B="Charlie front inseam is longer than back"),Math.abs(x)>1&&(h.warn(B+" by "+f.round(Math.abs(x))+" mm"),h.debug("Charlie frontInseam: "+f.round(y).toString()),h.debug("Charlie backInseam: "+f.round(T).toString()));const S=u().length(),L=n.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&&(h.warn(R+" by "+f.round(Math.abs(P))+" mm"),h.debug("Charlie frontOutseam: "+f.round(L).toString()),h.debug("Charlie backOutseam: "+f.round(S).toString())),n.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 i).move(t.slantCurveStart).curve(t.slantCurveCp1,t.slantCurveCp2,t.slantCurveEnd).intersectsY(t.slantBottom.y).pop(),t.slantTopNotch=t.slantOut.shiftTowards(t.slantCurveStart,n.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"}),h.info(`Inseam height: ${d(t.fork.dy(t.floorIn))} | Waist: ${d(2*(n.get("waistbandBack")+n.get("waistbandFront")))} | Bottom leg width: ${d((n.get("legWidthBack")+n.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 W=t.fork.x-p;return r("vd",{id:"hForkToDartTip",from:t.fork,to:t.pocketCenter,x:W-15}),r("vd",{id:"hForkToDartMid",from:t.fork,to:t.waistPocketCenter,x:W-30}),r("vd",{id:"hForkToCbWaist",from:t.fork,to:t.styleWaistIn,x:W-45}),W=t.slantOut.x+p,r("vd",{id:"hHemToPocketSlantStart",from:t.floorOut,to:t.slantBottomNotch,x:W+15}),r("vd",{id:"wHemToSideWaist",from:t.floorOut,to:t.slantOut,x:W+30}),m}};const Eo={name:"charlie.waistband",after:[Fo,Wo,Do,Oo],options:{waistbandCurve:{pct:0,min:0,max:35,menu:"fit"}},draft:function({points:t,Point:e,paths:o,Path:i,units:a,options:s,complete:n,store:r,macro:l,expand:c,snippets:p,Snippet:h,sa:d,absoluteOptions:f,part:m}){if(r.set("waistbandWidth",f.waistbandWidth),s.waistbandCurve>0)return m;if(!c){const t=d?2*d:0;return r.flag.note({msg:"charlie:cutWaistband",notes:[d?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{width:a(2*f.waistbandWidth+1.5*t),length:a(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"),m.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 i).move(t.topLeft).line(t.topRight).line(t.bottomRight).line(t.bottomLeft).hide(),o.seam=o.saBase.clone().close().attr("class","fabric").unhide(),d&&(o.sa=o.saBase.offset(-1*d).join((new i).move(t.bottomLeft).line(t.topLeft).offset(-2*d)).close().addClass("fabric sa")),n&&(o.cf=(new i).move(t.cfLeft).line(t.cfRight).attr("class","dashed").attr("data-text","centerFront").attr("data-text-class","center"),o.cf2=(new i).move(t.bottomLeft).line(t.bottomRight).attr("class","hidden").attr("data-text","centerFront").attr("data-text-class","center"),o.cb=(new i).move(t.cbLeft).line(t.cbRight).attr("class","dashed").attr("data-text","centerBack").attr("data-text-class","center"),o.rs=(new i).move(t.rsLeft).line(t.rsRight).attr("class","dashed").attr("data-text","rightSide").attr("data-text-class","center"),o.ls=(new i).move(t.lsLeft).line(t.lsRight).attr("class","dashed").attr("data-text","leftSide").attr("data-text-class","center"),o.fold=(new i).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 h("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 h("button",t.button).attr("data-scale",u),t.buttonhole=new e(t.button.x,t.bottom.y-.4*t.cfRight.y),p.buttonhole=new h("button
1hole-start",t.buttonhole).attr("data-scale",u),l("hd",{id:"wFull",from:t.bottomLeft,to:t.bottomRight,y:t.bottomLeft.y+d+15}),l("vd",{id:"hFull",from:t.bottomRight,to:t.topRight,x:t.bottomRight.x+d+15}),m}};const Io={name:"charlie.waistbandCurved",after:[Fo,Wo,Oo,Do],draft:function({points:t,Point:e,paths:o,Path:i,options:a,absoluteOptions:s,complete:n,store:r,macro:l,snippets:c,Snippet:p,sa:h,part:d}){if(0==a.waistbandCurve)return d;r.set("waistbandWidth",s.waistbandWidth);const f=2*(r.get("waistbandBack")+r.get("waistbandFront")),m=.5*r.get("waistbandFront")/(r.get("waistbandBack")+r.get("waistbandFront")),u=f/(2*Math.PI*a.waistbandCurve),g=360*a.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*a.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 i).move(t.cfRightTop).curve(t.cfRightTopCp,t.cfLeftTopCp,t.cfLeftTop).hide(),o.waistbandBottom=(new i).move(t.cfRightBottom).curve(t.cfRightBottomCp,t.cfLeftBottomCp,t.cfLeftBottom),t.ssRightBottom=o.waistbandBottom.shiftFractionAlong(m),t.ssLeftBottom=o.waistbandBottom.shiftFractionAlong(1-m),t.ssRightTop=o.waistbandTop.shiftFractionAlong(m),t.ssLeftTop=o.waistbandTop.shiftFractionAlong(1-m),o.saBase=(new i).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(),h&&(o.sa=o.saBase.offset(h).close().attr("class","fabric sa")),n&&(o.cf=(new i).move(t.cfRightTop).line(t.cfRightBottom).attr("class","dashed").attr("data-text","centerFront").attr("data-text-class","center"),o.rs=(new i).move(t.ssRightTop).line(t.ssRightBottom).attr("class","dashed").attr("data-text","rightSide").attr("data-text-class","center"),o.ls=(new i).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 k=r.get("waistbandWidth")/14;return t.button=t.edgeRightBottom.shiftFractionTowards(t.cfRightTop,.6),c.button=new p("button",t.button).attr("data-scale",k),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",k),l("hd",{id:"wFull",from:t.edgeRightBottom,to:t.cfLeftBottom,y:t.edgeRightBottom.y-h-30}),l("vd",{id:"hFull",from:t.edgeRightBottom,to:t.cfLeftBottom,x:t.cfLeftBottom.x+h+30}),l("hd",{id:"wTopToSegment1",from:t.edgeRightBottom,to:t.ssRightBottom,y:t.edgeRightBottom.y-h-15}),l("vd",{id:"hTopToSegment1",from:t.edgeRightBottom,to:t.ssRightBottom,x:t.ssRightBottom.x+h+15}),l("hd",{id:"wSegment1To2",from:t.ssRightBottom,to:t.cbBottom,y:t.ssRightBottom.y-h-15}),l("vd",{id:"hSegment1To2",from:t.ssRightBottom,to:t.cbBottom,x:t.cbBottom.x+h+15}),l("hd",{id:"wSegment2To3",from:t.cbBottom,to:t.ssLeftBottom,y:t.cbBottom.y-h-15}),l("vd",{id:"hSegment2To3",from:t.cbBottom,to:t.ssLeftBottom,x:t.ssLeftBottom.x+h+15}),l("hd",{id:"wToFinalSegment",from:t.ssLeftBottom,to:t.cfLeftBottom,y:t.ssLeftBottom.y-h-15}),l("vd",{id:"hToFinalSegment",from:t.ssLeftBottom,to:t.cfLeftBottom,x:t.cfLeftBottom.x+h+15}),l("hd",{id:"wWaistband",from:t.cfLeftTop,to:t.cfLeftBottom,y:t.cfLeftTop.y+h+15}),l("hd",{id:"horWidthWaistband",from:t.edgeRightBottom,to:t.edgeRightTop,y:t.edgeRightBottom.y-h-15}),l("vd",{id:"verWidthWaistband",from:t.edgeRightBottom,to:t.edgeRightTop,x:t.edgeRightTop.x-h-15}),l("hd",{id:"wInnerCurve",from:t.edgeRightTop,to:t.cfLeftTop,y:t.edgeRightTop.y+h+30}),l("vd",{id:"hInnerCurve",from:t.edgeRightTop,to:t.cfLeftTop,x:t.edgeRightTop.x-h-30}),l("hd",{id:"wInnerTopToSegment1",from:t.edgeRightTop,to:t.ssRightTop,y:t.edgeRightTop.y+h+15}),l("vd",{id:"hInnerTopToSegment1",from:t.edgeRightTop,to:t.ssRightTop,x:t.edgeRightTop.x-h-15}),l("hd",{id:"wInnerSegment1To2",from:t.ssRightTop,to:t.cbTop,y:t.ssRightTop.y+h+15}),l("vd",{id:"hInnerSegment1To2",from:t.ssRightTop,to:t.cbTop,x:t.ssRightBottom.x-h-15}),l("hd",{id:"wInnerSegment2To3",from:t.cbTop,to:t.ssLeftTop,y:t.cbTop.y+h+15}),l("vd",{id:"hInnerSegment3To4",from:t.cbTop,to:t.ssLeftTop,x:t.cbTop.x-h-15}),l("hd",{id:"wInnerSegment4To5",from:t.ssLeftTop,to:t.cfLeftTop,y:t.ssLeftTop.y+h+15}),l("vd",{id:"hInnerSegment4To5",from:t.ssLeftTop,to:t.cfLeftTop,x:t.ssLeftTop.x-h-15}),d}};const No={name:"charlie.frontPocketBag",from:Oo,draft:function({points:t,paths:e,Path:o,store:i,macro:a,snippets:s,Snippet:n,sa:r,part:l}){for(let c in e)delete e[c];for(let c in s)delete s[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")),i.cutlist.setCut({cut:2,from:"lining"}),t.titleAnchor=t.pocketbagTopRight.shiftFractionTowards(t.pocketbagBottomCp2,.5),a("title",{at:t.titleAnchor,nr:7,title:"frontPocketBag",align:"center",scale:.7}),a("cutonfold",{from:t.pocketbagBottomRight,to:t.pocketbagTopRight,grainline:!0}),s.notch=new n("notch",t.facingDirection),a("ld",{id:"hFull",from:t.pocketbagBottomRight,to:t.topPleat,d:-15}),a("hd",{id:"wFull",from:t.pocketFacingBottom,to:t.pocketbagBottomRight,y:t.pocketbagBottomRight.y+r+15}),l}};const Mo={name:"charlie.frontPocketFacing",from:No,draft:function({points:t,Point:e,paths:o,Path:i,store:a,macro:s,snippets:n,sa:r,part:l}){for(let c in o)delete o[c];
1for(let c in n)delete n[c];return t.anchor=t.pocketFacingTop.clone(),o.seam=(new i).move(t.pocketFacingTop).line(t.slantTop).line(t.slantCurveStart).join((new i).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)),a.cutlist.setCut({cut:4,from:"fabric"}),t.titleAnchor=t.slantBottomNotch.shift(0,10),s("title",{at:t.titleAnchor,nr:8,title:"frontPocketFacing"}),s("grainline",{from:t.slantTop,to:new e(t.slantTop.x,t.facingDirection.y)}),s("sprinkle",{snippet:"notch",on:["facingDirection","slantTopNotch","slantBottomNotch"]}),l}};const _o={name:"charlie.backPocketBag",after:Do,draft:function({points:t,Point:e,paths:o,Path:i,complete:a,store:s,macro:n,snippets:r,Snippet:l,sa:c,part:p}){return t.leftNotch=new e(s.get("backPocketWidth")/-2,0),t.rightNotch=t.leftNotch.flipX(),t.waistbandLeft=new e(t.leftNotch.x,-1*s.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,s.get("backPocketToWaistband")/2),t.cpRight=t.cpLeft.flipX(),t.foldLeft=new e(t.curveStartLeft.x,t.leftNotch.y+s.get("backPocketDepth")),t.foldRight=t.foldLeft.flipX(),t.bottomLeft=new e(t.curveStartLeft.x,t.foldLeft.y+s.get("backPocketDepth")),t.bottomRight=t.bottomLeft.flipX(),t.anchor=t.waistbandLeft.shiftFractionTowards(t.waistbandRight,.5),o.seam=(new i).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")),a&&(o.opening=(new i).move(t.leftNotch).line(t.rightNotch).addClass("note dashed"),o.fold=(new i).move(t.foldLeft).line(t.foldRight).addClass("lining help")),s.cutlist.setCut({cut:2,from:"lining"}),t.titleAnchor=t.rightNotch.shiftFractionTowards(t.foldLeft,.5),n("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),n("grainline",{from:t.grainlineTop,to:t.grainlineBottom}),n("hd",{id:"wFull",from:t.bottomLeft,to:t.bottomRight,y:t.bottomLeft.y+15}),n("vd",{id:"hToFold",from:t.bottomRight,to:t.foldRight,x:t.foldRight.x+15}),n("vd",{id:"hToOpenning",from:t.bottomRight,to:t.rightNotch,x:t.foldRight.x+30}),n("vd",{id:"hFull",from:t.bottomRight,to:t.waistbandRight,x:t.foldRight.x+45}),n("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:i,complete:a,store:s,macro:n,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 i).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"),a&&(o.opening=(new i).move(t.leftNotch).line(t.rightNotch).attr("class","dashed")),l&&(o.sa=o.seam.offset(l).attr("class","fabric sa")),s.cutlist.setCut({cut:2,from:"fabric"}),t.titleAnchor=t.rightNotch.shiftFractionTowards(t.leftNotch,.5),n("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),n("grainline",{from:t.grainlineTop,to:t.grainlineBottom}),n("rmad"),n("hd",{id:"wFull",from:t.bottomLeft,to:t.bottomRight,y:t.bottomLeft.y+15}),n("hd",{id:"wTop",from:t.waistbandLeft,to:t.waistbandRight,y:t.waistbandLeft.y-l-15}),n("vd",{id:"hToOpening",from:t.bottomRight,to:t.rightNotch,x:t.bottomRight.x+l+15}),n("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:i,complete:a,macro:s,store:n,units:r,snippets:l,expand:c,part:p}){const h=n.get("backPocketWidth"),d=h/3;if(!c)return n.flag.note({msg:"charlie:cutBackPocketInterfacing",notes:["flag:saUnused","flag:partHiddenByExpand"],replace:{width:r(h),length:r(d)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),n.flag.preset("expandIsOff"),p.hide();n.flag.preset("expandIsOn");for(let f in o)delete o[f];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,d),t.midRight=t.bottomRight.shift(90,d),t.topLeft=t.bottomLeft.shift(90,2*d),t.topRight=t.bottomRight.shift(90,2*d),t.leftNotch=new e(t.leftNotch.x,t.midRight.y),t.rightNotch=t.leftNotch.flipX(),a&&(o.fold=(new i).move(t.leftNotch).line(t.rightNotch).attr("class","interfacing dashed")),t.anchor=t.topLeft.shiftFractionTowards(t.topRight,.5),o.seam=(new i).move(t.topLeft).line(t.bottomLeft).line(t.bottomRight).line(t.topRight).line(t.topLeft).close().addClass("interfacing"),n.cutlist.setCut({cut:2,from:"interfacing"}),t.titleAnchor=t.rightNotch.shiftFractionTowards(t.leftNotch,.5),s("title",{at:t.titleAnchor,nr:3,title:"backPocketInterfacing",align:"center",scale:.7}),s("hd",{id:"width",from:t.bottomLeft,to:t.bottomRight,y:t.bottomLeft.y+1
15}),s("vd",{id:"height",from:t.bottomRight,to:t.topRight,x:t.topRight.x+15}),p}};const Yo={name:"charlie.backPocketWelt",from:jo,draft:function({points:t,Point:e,paths:o,Path:i,complete:a,macro:s,snippets:n,store:r,part:l}){for(let p in o)delete o[p];delete n.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 i).move(t.topLeft).line(t.bottomLeft).line(t.bottomRight).line(t.topRight).line(t.topLeft).close().attr("class","fabric"),a&&(o.fold=(new i).move(t.midLeft).line(t.midRight).attr("class","help")),r.cutlist.setCut({cut:4,from:"fabric"}),t.titleAnchor=t.rightNotch.shiftFractionTowards(t.leftNotch,.5),s("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),s("grainline",{from:t.grainlineTop,to:t.grainlineBottom}),s("hd",{id:"width",from:t.bottomLeft,to:t.bottomRight,y:t.bottomLeft.y+15}),s("vd",{id:"height",from:t.bottomRight,to:t.topRight,x:t.topRight.x+15}),l}};const Uo={name:"charlie.flyFacing",from:Oo,draft:function({points:t,Point:e,paths:o,Path:i,macro:a,snippets:s,store:n,sa:r,part:l}){for(let c in o)delete o[c];for(let c in s)delete s[c];return t.anchor=t.flyTop.clone(),o.saBase=(new i).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")),n.cutlist.setCut({cut:1,from:"fabric"}),t.grainlineTop=t.flyTop.shiftFractionTowards(t.styleWaistIn,.5),t.grainlineBottom=new e(t.grainlineTop.x,t.flyCurveCp2.y),a("grainline",{from:t.grainlineTop,to:t.grainlineBottom}),t.titleAnchor=t.grainlineTop.shiftFractionTowards(t.grainlineBottom,.5),a("title",{at:t.titleAnchor,nr:9,title:"flyFacing",align:"center",scale:.5}),l}};const zo={name:"charlie.flyExtension",from:Uo,draft:function({points:t,paths:e,Path:o,macro:i,store:a,sa:s,part:n}){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"),s&&(e.sa=e.saBase.offset(s).line(t.flyTop).reverse().line(t.flyCorner).addClass("fabric sa")),a.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),i("cutonfold",{from:t.flyTop,to:t.flyCorner,grainline:!0}),t.titleAnchor=t.flyCurveStart,i("title",{at:t.titleAnchor,nr:10,title:"flyExtension"}),n}};const Jo={name:"charlie.beltLoops",after:Eo,options:{beltLoops:{count:8,min:6,max:12,menu:"advanced"}},draft:function({store:t,points:e,Point:o,paths:i,Path:a,options:s,expand:n,units:r,complete:l,macro:c,part:p}){const h=s.beltLoops,d=2.5*t.get("waistbandWidth")*h,f=t.get("waistbandWidth")/4;if(!n)return t.flag.note({msg:"charlie:cutBeltloops",notes:["flag:saUnused","flag:partHiddenByExpand"],replace:{count:h,width:r(4*f),length:r(d/h)},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*f,0),e.bottomLeft=new o(0,d),e.bottomRight=new o(2.8*f,d),e.topFold1=new o(.8*f,0),e.topFold2=new o(1.8*f,0),e.bottomFold1=new o(.8*f,d),e.bottomFold2=new o(1.8*f,d);for(let m=1;m<h;m++)e[`cut${m}a`]=e.topLeft.shiftFractionTowards(e.bottomLeft,m/h),e[`cut${m}b`]=e.topRight.shiftFractionTowards(e.bottomRight,m/h);if(i.seam=(new a).move(e.topLeft).line(e.bottomLeft).line(e.bottomRight).line(e.topRight).line(e.topLeft).close().addClass("fabric"),l){i.fold=(new a).move(e.topFold1).line(e.bottomFold1).move(e.bottomFold2).line(e.topFold2).attr("class","fabric help");for(let t=1;t<h;t++)i[`cut${t}`]=(new a).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(f/2,d/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,d),c("grainline",{from:e.grainlineTop,to:e.grainlineBottom}),c("hd",{id:"wFull",from:e.bottomLeft,to:e.bottomRight,y:e.bottomLeft.y+1
15}),c("vd",{id:"hFull",from:e.bottomRight,to:e.topRight,x:e.bottomRight.x+15}),p}},$o=new s.pT({data:So,parts:[Oo,Do,Eo,Io,No,Mo,_o,jo,Go,Yo,Uo,zo,Jo]}),Xo=(0,s.D4)([Po,Ao]),Qo=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}'),Ko={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},i)=>(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,s.Wx)("waistToHips"),menu:"style"},waistReduction:{pct:1,min:-2,max:10,...(0,s.Wx)("waist"),menu:"fit"},bandBelowKnee:{pct:25,min:15,max:50,...(0,s.Wx)("waistToKnee"),menu:"advanced"}},draft:({options:t,measurements:e,Point:o,Path:i,points:a,paths:s,store:n,log:r,part:l})=>{const c=e.waistToKnee/48,p=e.inseam-(e.waistToFloor-e.waistToKnee),h=e.seat*t.pctSeatAdjustment,d=e.waist*t.pctSeatAdjustment-e.waist*t.waistReduction,f=e.waistToHips*t.waistbandBelowWaist,m=e.waistToKnee-f;n.set("waist",d),n.set("seat",h),n.set("halfInch",c),n.set("ventLength",m*t.bandBelowKnee*t.ventLength);let u=0;e.waist>e.seat&&(u=(e.waist-e.seat)/4),a.pO=new o(0,0),a.pB=a.pO.shift(270,m-f),a.pA=a.pB.shift(90,p),a.pC=a.pB.shift(270,m*t.bandBelowKnee),a.pT=a.pA.shift(90,(m-p)*t.pctAtoT),a.pE=a.pA.shift(180,h/4),a.pF=a.pA.shift(180,h/2),a.pD=a.pO.shift(180,h/4),a.pH=a.pC.shift(180,h/4),a.pG=a.pO.shift(180,h/2),a.pW=a.pG.shift(180,u),a.pV=a.pF.shift(0,c),a.pX=a.pF.shift(180,c);let g=(new i).move(a.pG).line(a.pV),b=g.intersectsY(a.pT.y);null!=b&&b.length>0?a.pS=b[0].clone():r.error("Something is not quite right here!"),g=(new i).move(a.pG).line(a.pX),b=g.intersectsY(a.pT.y),null!=b&&b.length>0?a.pZ=b[0].clone():r.error("Could not find an intersection to create the crotch point Z"),a.pP=a.pE.shift(180,h/3),a.pR=a.pP.shift(180,c+c),a.pJ=a.pH.shift(0,e.knee/4),a.pK=a.pH.shift(180,e.knee/4),a.pU=a.pG.shift(0,d/2),a.pAextra=a.pA.shift(0,c*(1+(t.fullness>.3?t.fullness:0)));const k=a.pA.dist(a.pO)*t.pctAtoO,w=a.pA.dist(a.pC)*t.pctAtoC;return a.pAextraCPu=a.pAextra.shift(90,k),a.pAextraCPj=a.pAextra.shift(270,w),a.pUcpA=a.pU.shiftFractionTowards(a.pAextraCPu,t.pctUtoA),a.pJcpA=a.pJ.shiftFractionTowards(a.pAextraCPj,t.pctJtoA).shift(0,a.pJ.dist(a.pH)*t.fullness),s.sideSeam=(new i).move(a.pJ).curve(a.pJcpA,a.pAextraCPj,a.pAextra).curve(a.pAextraCPu,a.pUcpA,a.pU).hide(),s.waistSeam=(new i).move(a.pU).line(a.pD).line(a.pW).hide(),a.pocketWaist=s.waistSeam.shiftAlong(d/2/4.5),a.pocketFacingTL=s.waistSeam.shiftAlong(d/2/4.5+3*c),a.pocketTL=s.waistSeam.shiftAlong(d/2*.75),a.pocketBL=new o(a.pocketTL.x,a.pF.y),a.pocketSide=s.sideSeam.shiftAlong(s.sideSeam.length()-d/2/4.5*3.5),a.pocketFacingBR=s.sideSeam.shiftAlong(s.sideSeam.length()-d/2/4.5*3.5-3*c),l}},Vo={name:"cornelius.front",from:Ko,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,s.Wx)("waist"),menu:"style"}},draft:({options:t,Path:e,points:o,paths:i,Snippet:a,snippets:s,sa:n,store:r,measurements:l,macro:c,part:p})=>{const h=.551915024494,d=r.get("halfInch"),f=r.get("ventLength"),m=r.get("waist"),u="keystone"==t.cuffStyle,g=t.flyWidth*l.waist;r.set("flyWidth",g),r.set("sideSeam",i.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*h),o.pFBcpZ=o.flyBottom.shift(o.pW.angle(o.pZ),d*g*h),i.fly=(new e).move(o.pW).line(o.flyTop).line(o.flyBottom).curve(o.pFBcpZ,o.pZcpFB,o.pZ).hide(),i.flyFold=(new e).move(o.pW).line(o.pZ).attr("class","fabric dashed").setText("basteHere","text-xs center"),r.set("flyLength",i.flyFold.length()),r.set("frontWaistLength",i.waistSeam.line(o.flyTop).length()),i.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),i.insideSeam=(new e).move(o.pR).curve(o.pRcpK,o.pKcpR,o.pK).hide(),r.set("insideSeam",i.insideSeam.length());let k=o.pH.shift(270,1.5*d);return o.pKcpH=o.pK.shiftFractionTowards(k,t.pctKtoH),o.pJcpH=o.pJ.shiftFractionTowards(k,t.pctKtoH),i.legSeam=(new e).move(o.pK).curve(o.pKcpH,o.pJcpH,o.pJ).hide(),r.set("frontLegSeam",i.legSeam.length()),u&&(o.pSlitBottom=i.legSeam.shiftAlong(i.legSeam.length()-4*d),o.pSlitTop=o.pSlitBottom.shift(90,5*d*t.ventLength),r.set("slitDistance",i.legSeam.length()-4*d)),o.pocketWaist=i.waistSeam.shiftAlong(m/2/4.5),o.pocketSide=i.sideSeam.shiftAlong(i.sideSeam.length()-m/2/4.5*3.5),i.pocketSeam=(new e).move(o.pocketSide).line(o.pocketWaist).hide(),i.waistSeam=i.waistSeam.split(o.pocketWaist)[1],i.sideSeam=i.sideSeam.split(o.pocketSide)[0],i.seam=i.waistSeam.join(i.fly).join(i.crotchSeam).join(i.insideSeam).join(i.legSeam).join(i.sideSeam).join(i.pocketSeam).close().attr("class","fabric"),o.topOfVent=i.sideSeam.shiftAlong(f),s.n1=new a("notch",o.pK),s.n2=ne
1w a("notch",o.pJ),s.n3=new a("notch",o.pocketWaist),s.n4=new a("notch",o.pocketSide),s.n5=new a("notch",o.pZ),u?(i.slit=(new e).move(o.pSlitBottom).line(o.pSlitTop).attr("class","fabric").attr("data-text","vent").attr("data-text-class","text-xs center"),s.n6=new a("notch",o.pSlitBottom)):(k=i.sideSeam.shiftAlong(f),i.vent=i.sideSeam.split(k)[0].attr("data-text","vent").attr("data-text-class","text-xs center")),s.n5=new a("notch",o.topOfVent),o.gridAnchor=o.pO.clone(),r.cutlist.addCut({cut:2,from:"fabric"}),o.logo=o.pE.clone(),s.logo=new a("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}),n&&(i.sa=i.seam.offset(n).attr("class","fabric sa")),c("ld",{id:1,from:o.topOfVent,to:o.pJ,d:n+15}),c("hd",{id:2,from:o.pocketWaist,to:o.pocketSide,y:o.pocketWaist.y-n-15}),c("hd",{id:3,from:o.pW,to:o.pocketWaist,y:o.pocketWaist.y-n-15}),c("hd",{id:4,from:o.flyTop,to:o.pW,y:o.pocketWaist.y-n-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-n-15}),c("vd",{id:11,from:o.pK,to:o.pR,x:o.pR.x-n-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:Ko,after:Vo,draft:({options:t,Path:e,points:o,paths:i,Snippet:a,snippets:s,sa:n,store:r,macro:l,part:c})=>{let p=null;const h=r.get("waist"),d=r.get("seat"),f=r.get("halfInch"),m=r.get("ventLength"),u="traditional"==t.cuffStyle;o.p2=o.pD.shift(90,d/12+f),o.p10=o.pK.shiftTowards(o.pH,-f),function(t,e,o,i){const{options:a,Path:s,points:n,paths:r,store:l,log:c}=t.shorthand(),p=l.get("insideSeam"),h=e.dist(i);let d,f,m,u=Math.atan(o/h)*(180/Math.PI),g=o/h*-3,b=0,k=0;do{n.p3=e.rotate(u,i),n.p3cp10=n.p3.shiftFractionTowards(n.pF,a.pctRtoKin/2).shiftFractionTowards(n.p10,a.pctRtoKdown),n.p10cp3=n.p10.shiftFractionTowards(n.pH,-1*(a.pctKtoRout+a.fullness)).shiftFractionTowards(n.p3,a.pctKtoRup),r.insideSeam=(new s).move(n.p3).curve(n.p3cp10,n.p10cp3,n.p10),m=r.insideSeam.length(),d=e.dist(n.p3),f=o-d,b=m-p,b>.1?e=e.shiftTowards(i,-.9*b):b<-.1?e=e.shiftTowards(i,.8*b):(g*=f>0?g>0?.8:-.8:g>0?-.9:.9,u+=g),k++}while((f>.1||f<-.1||b<-.1||b>.1)&&k<100);k>=100&&c.error('Could not find a point for "3" within 100 iterations')}(c,o.pR.clone(),2*f,o.pK),o.p11=o.pJ.shiftTowards(o.pH,-f),function(t,e,o,i,a){const{options:s,Path:n,points:r,paths:l,store:c,log:p}=t.shorthand();let h,d,f=null;const m=c.get("sideSeam"),u=c.get("halfInch");let g,b,k,w,C,v,T=0;const y=e.dist(i);let x=1,B=Math.atan(Math.abs(o)/y)*(180/Math.PI);o<0&&(B=360-B,o*=-1,x=-1);let S=e.rotate(B,i),L=a.dist(S)/y*-3,P=0;do{S=e.rotate(B,i),r.p4=S.clone(),w=r.pJ.angle(r.p4),C=r.pJ.angle(r.pU),v=C-w,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*s.fullness*2),r.p7=r.p7.shift(r.pJ.angle(r.pA)-v-90,u*s.fullness*2),h=r.p7.dist(r.p4)*s.pctAtoO,d=r.p7.dist(r.p11)*s.pctAtoC,f=r.p4.angle(r.p11),r.p7cp4=r.p7.shift(f+180+5*s.fullness,h),r.p7cp11=r.p7.shift(f,d),r.p4cp7=r.p4.shiftFractionTowards(r.p7cp4,s.pctUtoA),r.p11cp7=r.p11.shiftFractionTowards(r.p7cp11,s.pctJtoA).shift(0,r.p11.dist(r.pH)*s.fullness),l.sideSeam=(new n).move(r.p11).curve(r.p11cp7,r.p7cp11,r.p7).curve(r.p7cp4,r.p4cp7,r.p4),g=l.sideSeam.length(),k=a.dist(r.p4),T=o-k,b=g-m,b>.1?e=e.shiftTowards(i,.9*b):b<-.1?e=e.shiftTowards(i,.8*b):(L*=T>0?L>0?.8:-.9:L>0?-.9:.9,B+=L*x),P++}while((T>.1||T<-.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*(h/2+f),o.p11,o.p2),o.p2a=o.p2.shiftTowards(o.p4,f),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),i.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*f):o.pH.shift(90,1*f),o.p10cpH=o.p10.shiftFractionTowards(p,t.pctKtoH),o.p11cpH=o.p11.shiftFractionTowards(p,t.pctKtoH),i.legSeam=(new e).move(o.p10).curve(o.p10cpH,o.p11cpH,o.p11),r.set("backLegSeam",i.legSeam.length()),i.waistSeam=(new e).move(o.p4).line(o.p2),r.set("backWaistLength",i.waistSeam.length()),i.seam=i.waistSeam.join(i.crotchSeam).join(i.insideSeam).join(i.legSeam).join(i.sideSeam).close().attr("class","fabric"),o.topOfVent=i.sideSeam.shiftAlong(m),s.n1=new a("notch",o.p10),s.n2=ne
1w a("notch",o.p11),s.n3=new a("notch",o.topOfVent),i.vent=i.sideSeam.split(o.topOfVent)[0],i.vent.attr("data-text","Vent").attr("data-text-class","center").attr("class","fabric sa"),o.gridAnchor=o.pO.clone(),o.logo=o.pE.clone(),s.logo=new a("logo",o.logo),o.title=o.logo.shift(270,80),l("title",{nr:6,at:o.title,title:"Back",align:"center"});const k=o.p11.angle(o.p4),w=o.p11.dist(o.p4);return l("grainline",{from:o.pA.shift(k,.35*w),to:o.pA.shift(k+180,.35*w)}),r.cutlist.addCut({cut:2,from:"fabric"}),n&&(i.sa=i.seam.offset(n).attr("class","fabric sa")),p=i.sideSeam.intersectsY(o.p3.y)[0],l("hd",{id:1,from:o.p2,to:o.p4,y:o.p2.y-n-25}),l("hd",{id:2,from:o.p10,to:o.p11,y:o.p10.y+n+15}),l("vd",{id:3,from:o.p3,to:o.p2,x:o.p3.x-n-15}),l("vd",{id:4,from:o.p4,to:o.p2,x:o.p2.x-n-15}),l("vd",{id:5,from:o.p10,to:o.p3,x:o.p3.x-n-15}),l("ld",{id:6,from:o.topOfVent,to:o.p11,d:n+15}),l("ld",{id:7,from:o.p2,to:o.p4,d:n+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:+n+20}),l("ld",{id:11,from:o.p4,to:o.p11,d:-15}),l("ld",{id:12,from:p,to:o.p4,d:-n-20}),c}};const Zo={name:"cornelius.legband",after:[qo,Vo],options:{kneeToBelow:{pct:94,min:85,max:110,menu:"advanced"},cuffWidth:{pct:0,min:-50,max:150,toAbs:(t,{options:e,measurements:o},i)=>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:i,paths:a,Snippet:s,snippets:n,sa:r,store:l,macro:c,part:p})=>{if("keystone"==t.cuffStyle)return p;const h=.551915024494,d="traditional"==t.cuffStyle,f=l.get("halfInch"),m=l.get("backLegSeam")*(d?t.kneeToBelow:1),u=l.get("frontLegSeam")*(d?t.kneeToBelow:1),g=4*f*(1+t.cuffWidth),b=3*f/m;if(i.pA=new e(0,0),i.pB=i.pA.shift(270,u),i.pE=i.pB.shift(0,g),i.pF=i.pA.shift(0,g),d){const t=function(t,e,o){let{log:i}=t.shorthand(),a=0,s=.5,n=s*e/(1-Math.cos(s/2))-o;do{s*=n<0?.995+n/1e3:1.003+n/1e3,n=s*e/(1-Math.cos(s/2))-o,a++}while((n<-1||n>1)&&a<50);return a>=500&&i.error("Could not find the radius for the legband within 500 iterations"),s*(180/Math.PI)}(p,f/4*5,m),e=t/(180/Math.PI),o=m/e;i.pC=i.pB.shift(270-t/2,2*o*Math.sin(e/2)),i.pBcpC=i.pB.shift(270,o*h/2),i.pCcpB=i.pC.shift(90-t,o*h/2),i.pD=i.pC.shift(0-t,g),i.pDcpE=i.pD.shift(90-t,(o+g)*h/2),i.pEcpD=i.pE.shift(270,(o+g)*h/2),i.pAout=i.pA.shift(90+t/2*b,2*o*Math.sin(e/2)*b),i.pAcpAout=i.pA.shift(90,o*b*h/2),i.pAoutcpA=i.pAout.shift(270+t*b,o*h/2*b),i.pFout=i.pAout.shift(0+t*b,g),i.pFoutcpF=i.pFout.shift(270+t*b,(o+g)*h/2*b),i.pFcpFout=i.pF.shift(90,(o+g)*h/2*b)}else i.pC=i.pB.shift(270,m),i.pBcpC=i.pB.shift(270,10),i.pCcpB=i.pC.shift(90,10),i.pD=i.pC.shift(0,g),i.pDcpE=i.pD.shift(90,10),i.pEcpD=i.pE.shift(270,10),i.pAout=i.pA.shift(90,m*b),i.pAcpAout=i.pA.shift(90,1),i.pAoutcpA=i.pAout.shift(270,1),i.pFout=i.pAout.shift(0,g),i.pFoutcpF=i.pFout.shift(270,1),i.pFcpFout=i.pF.shift(90,1);return i.pG=i.pAout.shift(i.pAout.angle(i.pFout)+45,Math.sqrt(g/2*2*(g/2))),a.seam=(new o).move(i.pA).line(i.pB).curve(i.pBcpC,i.pCcpB,i.pC).line(i.pD).curve(i.pDcpE,i.pEcpD,i.pE).line(i.pF).curve(i.pFcpFout,i.pFoutcpF,i.pFout).line(i.pG).line(i.pAout).curve(i.pAoutcpA,i.pAcpAout,i.pA).close().attr("class","fabric"),a.mark=(new o).move(i.pA).line(i.pF).attr("class","fabric"),i.buttonHole=i.pAout.shiftFractionTowards(i.pFout,.5),i.button=i.pC.shiftFractionTowards(i.pD,.5).shift(i.pC.angle(i.pD)+90,m*b),n.bh=new s("buttonhole",i.buttonHole),n.b=new s("button",i.button),n.n1=new s("notch",i.pA),n.n2=new s("notch",i.pB),n.n3=new s("notch",i.pC),i.gridAnchor=(d?i.pF:i.pG).clone(),l.cutlist.addCut({cut:4,from:"fabric"}),i.logo=i.pA.shiftFractionTowards(i.pE,.5),n.logo=new s("logo",i.logo).attr("data-scale",.7),i.title=i.logo.shift(270,70),c("title",{nr:7,at:i.title,title:"LegBand",align:"center",rotation:90,scale:.5}),r&&(a.sa=a.seam.offset(r).attr("class","fabric sa")),c("hd",{id:1,from:i.pA,to:i.pF,y:i.pA.y}),d&&c("hd",{id:2,from:i.pC,to:i.pB,y:i.pB.y}),c("ld",{id:3,from:i.pC,to:i.pD,d:-r-15}),c("ld",{id:4,from:i.pA,to:i.pAout,d:+r+15}),c("vd",{id:5,from:i.pB,to:i.pA,x:i.pA.x-r-15}),c("vd",{id:6,from:i.pC,to:i.pB,x:i.pC.x-(d?0:r+15)}),p}},ti={name:"cornelius.legbandKeystone",after:[qo,Vo],draft:({options:t,measurements:e,Point:o,Path:i,points:a,paths:s,Snippet:n,snippets:r,sa:l,store:c,macro:p,part:h})=>{if("keystone"!=t.cuffStyle)return h;let d=c.get("halfInch"),f=c.get("slitDistance");return a.pA=new o(0,0),a.pD=a.pA.shift(270,8*d),a.pO=a.pA.shift(180,1.5*d),a.pB=a.pA.shift(180,f),a.pE=a.pB.shift(270,d),a.pF=a.pE.shift(180,d),a.pC=a.pA.shift(180,e.knee+3*d),a.pG=a.pD.shift(0,d),a.p
1H=a.pG.shift(180,e.knee+5*d),a.pJ=a.pE.shift(180,d/2).shift(270,a.pA.dist(a.pG)),a.pAcpE=a.pA.shift(a.pA.angle(a.pG)-90,.5*a.pA.dist(a.pE)),a.pEcpA=a.pE.shift(0,.2*a.pE.dist(a.pA)),a.pCcpF=a.pC.shift(a.pC.angle(a.pH)+90,.5*a.pC.dist(a.pF)),a.pFcpC=a.pF.shift(180,.15*a.pF.dist(a.pC)),a.pGcpJ=a.pG.shift(a.pG.angle(a.pA)+90,.5*a.pG.dist(a.pJ)),a.pJcpG=a.pJ.shift(0,.25*a.pJ.dist(a.pG)),a.pHcpJ=a.pH.shift(a.pH.angle(a.pC)-90,.5*a.pH.dist(a.pJ)),a.pJcpH=a.pJ.shift(180,.25*a.pJ.dist(a.pH)),a.pCout=a.pCcpF.shiftOutwards(a.pC,2*d),a.pHout=a.pHcpJ.shiftOutwards(a.pH,2*d),s.top=(new i).move(a.pA).curve(a.pAcpE,a.pEcpA,a.pE).line(a.pF).curve(a.pFcpC,a.pCcpF,a.pC).line(a.pCout),s.left=(new i).move(a.pCout).line(a.pHout),s.bottom=(new i).move(a.pHout).line(a.pH).curve(a.pHcpJ,a.pJcpH,a.pJ).curve(a.pJcpG,a.pGcpJ,a.pG),s.right=(new i).move(a.pG).line(a.pA),s.seam=s.top.join(s.left).join(s.bottom).join(s.right).close().attr("class","fabric"),s.dart=(new i).move(a.pF).line(a.pJ).line(a.pE).attr("class","fabric").attr("data-text","dart").attr("data-text-class","text-xs"),a.buttonsTop=s.top.shiftAlong(1.5*d),a.buttonsBottom=s.bottom.shiftAlong(s.bottom.length()-1.5*d),a.pBH1=a.buttonsTop.shiftFractionTowards(a.buttonsBottom,.2),a.pBH2=a.buttonsTop.shiftFractionTowards(a.buttonsBottom,.5),a.pBH3=a.buttonsTop.shiftFractionTowards(a.buttonsBottom,.8),a.pB1=a.pC.shiftFractionTowards(a.pH,.2),a.pB2=a.pC.shiftFractionTowards(a.pH,.5),a.pB3=a.pC.shiftFractionTowards(a.pH,.8),r.bh1=new n("buttonhole",a.pBH1),r.bh2=new n("buttonhole",a.pBH2),r.bh3=new n("buttonhole",a.pBH3),r.b1=new n("button",a.pB1),r.b2=new n("button",a.pB2),r.b3=new n("button",a.pB3),r.n1=new n("notch",a.pA),r.n2=new n("notch",a.pC.shiftTowards(a.pCcpF,1.5*d)),a.gridAnchor=a.pA.clone(),c.cutlist.addCut({cut:2,from:"fabric"}),a.logo=a.pA.shiftFractionTowards(a.pH,.5).shift(180,70).shift(270,30),r.logo=new n("logo",a.logo),a.title=a.logo.shift(0,70),p("title",{nr:7,at:a.title,title:"LegBand"}),l&&(s.sa=s.seam.offset(l).attr("class","fabric sa")),p("hd",{id:1,from:a.pCout,to:a.pF,y:a.pA.y-l-15}),p("hd",{id:2,from:a.pF,to:a.pE,y:a.pA.y-l-15,noStartMarker:!0,noEndMarker:!0}),p("hd",{id:3,from:a.pE,to:a.pA,y:a.pA.y-l-15}),p("hd",{id:4,from:a.pHout,to:a.pG,y:a.pG.y+l+15}),p("ld",{id:5,from:a.pC,to:a.pB1,d:15,noStartMarker:!0,noEndMarker:!0}),p("ld",{id:6,from:a.pB1,to:a.pB2,d:15,noStartMarker:!0,noEndMarker:!0}),p("ld",{id:7,from:a.pB2,to:a.pB3,d:15,noStartMarker:!0,noEndMarker:!0}),p("ld",{id:8,from:a.pB3,to:a.pH,d:15,noStartMarker:!0,noEndMarker:!0}),p("ld",{id:9,from:a.pA,to:a.pG,d:15+l}),p("vd",{id:10,from:a.pE,to:a.pJ,x:a.pJ.x-15}),p("vd",{id:11,from:a.pF,to:a.pA,x:a.pF.x-15,noStartMarker:!0,noEndMarker:!0}),h}},ei={name:"cornelius.waistband",after:[qo,Vo],draft:({Point:t,Path:e,points:o,paths:i,Snippet:a,snippets:s,sa:n,store:r,expand:l,units:c,macro:p,part:h})=>{const d=r.get("halfInch"),f=r.get("flyWidth"),m=r.get("frontWaistLength")+r.get("backWaistLength")+f*d/2;return l?(o.pA=new t(0,0),o.pB=o.pA.shift(270,m),o.pC=o.pB.shift(180,3.5*d),o.pD=o.pA.shift(180,3.5*d),i.seam=(new e).move(o.pB).line(o.pA).line(o.pD).line(o.pC).attr("class","fabric"),i.seam2=(new e).move(o.pC).line(o.pB).attr("class","fabric"),o.button=o.pA.shift(270,d*(f/2)).shift(180,1.75*d),o.foldLeft=o.pD.shift(270,f*d),o.foldRight=o.pA.shift(270,f*d),i.fold=(new e).move(o.foldLeft).line(o.foldRight).addClass("fabric dashed"),s.bh=new a("buttonhole",o.button),s.b=new a("button",o.button),s.n1=new a("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),s.logo=new a("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}),n&&(i.sa=(new e).move(o.pC).line(o.pC.shift(180,n)).join(i.seam.offset(n)).line(o.pB).attr("class","fabric sa")),p("hd",{id:1,from:o.pD,to:o.pA,y:o.pA.y-n-15}),p("vd",{id:2,from:o.pC,to:o.pD,x:o.pC.x-n-15}),p("vd",{id:3,from:o.foldRight,to:o.pA,x:o.pA.x+n+15}),h):(r.flag.note({msg:"cornelius:cutWaistband",replace:{width:c(3.5*d*2),length:c(2*m)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),r.flag.preset("expand"),h.hide())}},oi={name:"cornelius.pocketFacing",from:Ko,draft:({Path:t,Point:e,points:o,paths:i,Snippet:a,snippets:s,sa:n,store:r,macro:l,part:c})=>{const p=r.get("halfInch"),h=r.get("waist");return i.waistSeam=i.waistSeam.split(o.pocketFacingTL)[0].hide(),o.pocketFacingBR=i.sideSeam.shiftAlong(i.sideSeam.length()-h/2/4.5*3.5-3*p+n),o.pocketFacingBR.sitsOn(o.pAextra)?i.sideSeam=(new t).move(o.pAextra).curve(o.pAextraCPu,o.pUcpA,o.pU).hide():i.sideSeam=i.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),i.facingInside=(new t).move(o.pocketFacingTL).curve(o.tlCPbr,o.brCPtl,o.pocketFacingBR).hide(),i.seam=i.waistSeam.join(i.facingInside).join(i.sideSeam).close().attr("class","fabric"),s.n1=new a("notch",o.pocketWaist),s.n2=new a("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),s.logo=new a("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"}),n&&(i.sa=i.seam.offset(n).attr("class","fabric sa")),l("hd",{id:0,from:o.pocketSide,to:o.pocketFacingBR,y:o.pU.y-n-15,noStartMarker:!0,noEndMarker:!0}),l("hd",{id:1,from:o.pU,to:o.pocketSide,y:o.pU.y-n-15}),l("hd",{id:2,from:o.pocketWaist,to:o.pU,y:o.pU.y-n-15}),l("hd",{id:3,from:o.pocketFacingTL,to:o.pocketWaist,y:o.pU.y-n-15}),l("vd",{id:4,from:o.pU,to:o.pocketSide,x:o.pocketSide.x+n+15}),l("vd",{id:5,from:o.pocketSide,to:o.pocketFacingBR,x:o.pocketSide.x+n+15}),c}},ii={name:"cornelius.pocket",from:Ko,draft:({Path:t,points:e,paths:o,Snippet:i,snippets:a,sa:s,store:n,macro:r,part:l})=>{const c=n.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"),a.n1=new i("notch",e.pocketWaist),a.n2=new i("notch",e.pocketSide),a.n3=new i("notch",e.mpocketWaist),a.n4=new i("notch",e.mpocketSide),e.gridAnchor=e.pocketTL.clone(),n.cutlist.addCut({cut:2,from:"lining"}),e.logo=e.pocketSide.shiftFractionTowards(e.pocketTL,.5),a.logo=new i("logo",e.logo),e.title=e.logo.shift(270,80),r("title",{nr:2,at:e.title,title:"Pocket",align:"center"}),s&&(o.sa=o.seam.offset(s).attr("class","fabric sa")),r("hd",{id:1,from:e.mpocketFacingBR,to:e.mpocketWaist,y:e.pU.y-s-15}),r("hd",{id:2,from:e.mpocketWaist,to:e.pocketTL,y:e.pU.y-s-15}),r("hd",{id:3,from:e.pocketTL,to:e.pocketWaist,y:e.pU.y-s-15}),r("hd",{id:4,from:e.pocketWaist,to:e.pU,y:e.pU.y-s-15}),r("hd",{id:5,from:e.pU,to:e.pocketFacingBR,y:e.pU.y-s-15}),r("hd",{id:6,from:e.pocketFacingTL,to:e.pocketWaist,y:e.pU.y-s-15}),r("vd",{id:7,from:e.pU,to:e.pocketSide,x:e.pocketSide.x+s+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+s+15}),r("vd",{id:10,from:e.pocketSide,to:e.pocketFacingBR,x:e.pocketSide.x+s+15}),r("vd",{id:11,from:e.mpocketWaist,to:e.mpocketSide,x:e.mpocketSide.x-s-15}),r("vd",{id:12,from:e.mpocketSide,to:e.mpocketFacingBR,x:e.mpocketSide.x-s-15}),l}},ai={name:"cornelius.zipperguard",after:Vo,draft:({Point:t,Path:e,points:o,paths:i,Snippet:a,snippets:s,sa:n,store:r,macro:l,part:c})=>{const p=.551915024494,h=r.get("flyConst"),d=r.get("flyWidth")*h,f=r.get("flyLength");return o.pA=new t(0,0),o.pB=o.pA.shift(180,d),o.pC=o.pB.shift(270,f-d),o.pD=o.pA.shift(270,f),o.pDcpC=o.pD.shift(180,d*p),o.pCcpD=o.pC.shift(270,d*p),i.seam=(new e).move(o.pA).line(o.pB).line(o.pC).curve(o.pCcpD,o.pDcpC,o.pD).attr("class","fabric"),i.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),s.logo=new a("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}
1),n&&(i.sa=(new e).move(o.pA).line(o.pA.shift(90,n)).join(i.seam.offset(n)).line(o.pD).attr("class","fabric sa")),l("hd",{id:1,from:o.pB,to:o.pA,y:o.pA.y-n-15}),l("vd",{id:2,from:o.pA,to:o.pD,x:o.pA.x+15}),c}},si={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"},"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"}}}')},ni=new s.pT({data:Qo,parts:[Vo,qo,Zo,ti,ei,oi,ii,ai]}),ri=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 li(t,e){let{macro:o,points:i,sa:a}=t.shorthand();e.forEach((t=>{const e=t[0]+t[1]+t[2],s=a*(t[4]>0?1:-1);o(t[0]+"d",{id:e,from:i[t[1]],to:i[t[2]],y:i[t[3]].y+s+t[4],x:i[t[3]].x+s+t[4],d:s+t[4]})}))}function ci(t,e,o){const{utils:i}=t.shorthand();let a=e.ops[0].to;for(const s of e.ops){switch(s.type){case"line":if(i.pointOnLine(a,s.to,o))return!0;break;case"curve":if(i.pointOnCurve(a,s.cp1,s.cp2,s.to,o))return!0}a=s.to}return!1}function pi(t,e,o,i,a,s,n){t[e]=i.shift(o,a*s*(o>60&&o<120||o>240&&o<300?1+(n<0?-1*n:0):1+(n>0?n:0)))}function hi(t,e,o,i,a,s,n,r){t[e]=t[o].shift(i,s*n*a*(i>60&&i<120||i>240&&i<300?1+(r<0?-1*r:0):1+(r>0?r:0)))}const di={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}},fi={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 mi(t,e,o,i,a,s=!1){const{options:n,macro:r}=t.shorthand();let l;if(i>e.length())return null;o<i/1.9&&(o=i/2.1),e.length()-o<i&&(o=e.length()-i/1.95);const c=e.shiftAlong(o),p=e.split(c);if(p[0].length()<i/2||p[1].length()<i/2)return null;const h=p[0].reverse().shiftAlong(i/2),d=p[1].shiftAlong(i/2),f=.0015,m=Math.max(p[0].length()*f,p[0].ops[1].to.dist(p[0].ops[1].cp2)),u=Math.max(p[1].length()*f,p[1].ops[0].to.dist(p[1].ops[1].cp1)),g=c.shift(h.angle(d)-90,a),b=h.shift(h.angle(g)+90,m),k=d.shift(d.angle(g)-90,u),w=(new t.Path).move(p[0].ops[0].to).curve(p[0].ops[1].cp1,b,h).hide(),C=(new t.Path).move(d).curve(k,p[1].ops[1].cp2,p[1].ops[1].to).hide();let v=null;if(n.curvedDarts)if(Math.abs(g.angle(h)-g.angle(d))<2*n.curvedDartControlAngle)v=(new t.Path).move(h).line(g).line(d).hide();else{const e=g.shiftFractionTowards(c,n.curvedDartBottomControlOffset).rotate(n.curvedDartControlAngle,g),o=g.shiftFractionTowards(c,n.curvedDartBottomControlOffset).rotate(360-n.curvedDartControlAngle,g),i=h.shiftFractionTowards(g,n.curvedDartTopControlOffset),a=d.shiftFractionTowards(g,n.curvedDartTopControlOffset);v=(new t.Path).move(h).curve(i,e,g).curve(o,a,d).hide()}else v=(new t.Path).move(h).line(g).line(d).hide();if(s){const e=c.shiftFractionTowards(h,2),o=c.shiftFractionTowards(d,2),i=w.intersectsBeam(g,e)[0],a=C.intersectsBeam(g,o)[0];void 0!==i&&(t.paths.dartFoldLeft=w.split(i)[1],r("mirror",{clone:!1,mirror:[g,h],paths:["dartFoldLeft"]}),l=t.paths.dartFoldLeft.reverse().hide(),delete t.paths.dartFoldLeft),void 0!==a&&(t.paths.dartFoldRight=C.split(a)[0],r("mirror",{clone:!1,mirror:[g,d],paths:["dartFoldRight"]}),l=void 0!==i?l.join(t.paths.dartFoldRight.reverse()).hide():t.paths.dartFoldRight.reverse().hide(),delete t.paths.dartFoldRight)}return{left:w,dart:v,right:C,sa:l}}const ui={bool:!0,menu:"style",order:"180"},gi=2,bi=.2,ki=.4,wi=.55,Ci=.25,vi=.7,Ti=0,yi=.35,xi=.75,Bi=.25,Si=2,Li=.5,Pi=.08,Ri=.2,Fi=.7,Wi=.22,Hi={pct:3.8,min:2,max:6,...(0,s.Wx)("waist"),menu:"advanced",order:"902"},Ai={pct:0,min:0,max:25,menu:"fit",order:"240"},Oi={pct:0,min:-10,max:10,...(0,s.Wx)("hips"),menu:"fit",order:"250"},Di={dflt:"standard",list:["standard","elastic","ribknit"],menu:"style",order:"140"},Ei={pct:80,min:0,max:100,...(0,s.Wx)("waistToHips"),menu:"style",order:"142"},Ii={pct:3.2,min:1,max:10,...(0,s.Wx)("waistToFloor"),menu:"style",order:"144"},Ni={pct:0,min:0,max:10,menu:"fit",order:"202"},Mi={dflt:"long",list:["long","capris","shorts","custom"],menu:"style",order:"110"},_i={pct:95,min:40,max:100,...(0,s.Wx)("waistToFloor"),menu:(t,e)=>"custom"===e.legLength&&"style",order:"112"},ji={dflt:"hem",list:["hem","ribknit"],menu:(t,e)=>"long"===e.legLength&&"style",order:"160"},Gi={pct:3,min:1,max:10,...(0,s.Wx)("waistToFloor"),menu:(t,e)=>"capris"!==e.legLength&&"style",order:"162"},Yi={bool:!0,menu:(t,e)=>
1"shorts"!==e.legLength&&(("custom"===e.legLength&&t.measurements.waistToKnee/(t.measurements.waistToFloor*e.legLengthCustom))<.9&&"style"),order:"150"},Ui=.15,zi=.026,Ji=70,$i={pct:0,min:0,max:100,menu:"fit.gusset",order:"222"},Xi={pct:20,min:5,max:25,menu:"fit.gusset",order:"224"},Qi={pct:25,min:20,max:50,menu:"fit.gusset",order:"226"},Ki={pct:15,min:5,max:20,menu:"fit.gusset",order:"228"},Vi={dflt:"standard",list:["standard","hole","square","diamond"],menu:"style.pockets",order:"130"},qi={bool:!1,menu:(t,e)=>"square"!==e.backPocketType&&"style.pockets",order:"132"},Zi={bool:!1,menu:(t,e)=>!e.backPocketInside&&"style.pockets",order:"134"},ta={pct:2,min:.3,max:5,...(0,s.Wx)("waistToFloor"),menu:(t,e)=>!!e.backPocketCargo&&"style.pockets",order:"136"},ea={dflt:"standard",list:["standard","hole","square","diamond"],menu:"style.pockets",order:"120"},oa={bool:!1,menu:"style.pockets",order:"122"},ia={bool:!1,menu:(t,e)=>!e.frontPocketInside&&"style.pockets",order:"124"},aa={pct:2,min:.3,max:5,...(0,s.Wx)("waistToFloor"),menu:(t,e)=>!!e.frontPocketCargo&&"style.pockets",order:"126"},sa={name:"crux.basepoints",from:Ko,hide:{self:!0,from:!0,inherited:!0},measurements:["waist","waistBack","hips","inseam","seat","seatBack","waistToKnee","waistToHips","waistToSeat","waistToFloor","knee","heel"],options:i,draft:({options:t,measurements:e,Point:o,Path:i,points:a,paths:n,store:r,log:l,macro:c,utils:p,part:h})=>{const d=.5*e.hips+t.hipsShift*e.hips,f=.5*e.hips-t.hipsShift*e.hips,m=e.waist-e.waistBack-d,u=e.waistBack-f,g="long"===t.legLength?.97-("ribknit"===t.hemType?t.hemLength:0):"capris"===t.legLength?.725:"shorts"===t.legLength?.47:t.legLengthCustom,b=m*(1-t.waistbandLower)+.5*d*(1-t.waistReduction),k=u*(1-t.waistbandLower)+.5*f*(1-t.waistReduction)*("standard"===t.waistbandType?1:"ribknit"===t.waistbandType?1.025:1.05);r.set("waistbandTargetFront",b),r.set("waistbandTargetBack",k),r.set("hipsFront",d),r.set("hipsBack",f),r.set("legLength",g);const w=e.waistToHips*t.waistbandLower,C=e.waistToFloor-w,v=e.seat-e.seatBack;r.set("waistDown",w),a.pE=a.pA.shift(180,v/4),a.pF=a.pA.shift(180,v/2),a.pD=a.pO.shift(180,v/4),a.pH=a.pC.shift(180,v/4),a.pG=a.pO.shift(180,v/2),a.wHips=a.pE.shift(90,e.waistToFloor-e.inseam-e.waistToHips),a.newWaistBand=a.wHips.shift(90,e.waistToHips*(1-t.waistbandLower)),a.floorMiddle=a.pD.shift(270,e.waistToFloor),a.floorSide=a.floorMiddle.shift(0,e.heel/4),a.floorIn=a.floorMiddle.shift(180,e.heel/4),a.floorSideCpA=a.floorSide.shiftFractionTowards(a.pAextraCPj,t.pctJtoA).shift(0,a.pJ.dist(a.pH)*t.fullness);let T,y=0,x=0,B=a.pU.shift(180,y);do{B=B.shift(180,y),T=B.shiftFractionTowards(a.pAextraCPu,t.pctUtoA),n.sideSeamFront=(new i).move(a.floorSide).curve(a.floorSideCpA,a.pAextraCPj,a.pAextra).curve(a.pAextraCPu,T,B).hide(),a.frontWaistSide=n.sideSeamFront.intersectsY(a.newWaistBand.y)[0],a.frontWaistCenter=p.beamIntersectsY(a.pW,a.pZ,a.newWaistBand.y),y=a.frontWaistSide.dist(a.frontWaistCenter)-b,x++}while(x<100&&(y>.1||y<-.1));x>=100&&l.error("Could not create the sdie seam"),a.frontWaistMiddle=new o(a.pD.x,a.newWaistBand.y),n.sideSeamFront=n.sideSeamFront.split(a.frontWaistSide)[0].hide();const S=r.get("halfInch"),L=r.get("waist"),P=t.flyWidth*e.waist;r.set("flyWidth",P),a.pZcpR=a.pZ.shiftFractionTowards(a.pX,t.pctZtoR),a.pRcpZ=a.pR.shiftFractionTowards(a.pF,t.pctRtoZin).shiftFractionTowards(a.pZ,t.pctRtoZup);let R=Math.abs(a.pW.angle(a.pD)-a.pW.angle(a.pZ));R>180&&(R-=180),n.waistSeamFront=(new i).move(a.frontWaistSide).line(a.frontWaistCenter).hide().addText("target: "+b,"note center"),a.flyTop=a.frontWaistCenter.shift(2*(a.frontWaistCenter.angle(a.pZ)-270)+180,P),a.flyBottom=a.flyTop.shift(a.frontWaistCenter.angle(a.pZ),a.frontWaistCenter.dist(a.pZ)-P),a.pZcpFB=a.pZ.shift(a.frontWaistCenter.angle(a.pZ)-R,P*s.Qr),a.pFBcpZ=a.flyBottom.shift(a.frontWaistCenter.angle(a.pZ),P*s.Qr),a.flyTopCenter=a.frontWaistCenter.clone(),n.fly=(new i).move(a.flyTopCenter).line(a.flyTop).line(a.flyBottom).curve(a.pFBcpZ,a.pZcpFB,a.pZ).hide(),n.flyFold=(new i).move(a.frontWaistCenter).line(a.pZ).hide(),r.set("flyLength",n.flyFold.length()),n.crotchSeamFront=(new i).move(a.pZ).curve(a.pZcpR,a.pRcpZ,a.pR).hide(),a.pRcpK=a.pR.shiftFractionTowards(a.pF,t.pctRtoKin).shiftFractionTowards(a.pK,t.pctRtoKdown),a.pKcpR=a.pK.shiftFractionTowards(a.pH,-1*(t.pctKtoRout+t.fullness)).shiftFractionTowards(a.pR,t.pctKtoRup),a.floorInCpR=a.floorIn.shiftFractionTowards(a.pH,-1*(t.pctKtoRout+t.fullness)).shiftFractionTowards(a.pR,t.pctKtoRup),n.insideSeamFront=(new i).move(a.pR).curve(a.pRcpK,a.floorInCpR,a.floorIn).hide(),r.set("insideSeamFront",n.insideSeamFront.length()),n.insideSeamFrontTemp=n.insideSeamFront.clone().unhide().setClass("lining").hide();const F=.7*(r.get("insideSeamFront")-e.inseam);n.sideSeamFrontTemp=n.sideSeamFront.clone().unhide().setClass("lining"),c("transform",{transform:"translate",x:0,y:-1*F,clone:!1,paths:["sideSeamFrontTemp"]}),a.frontWaistCenterTemp=n.sideSeamFrontTemp.end(),n.waistSeamFrontTemp=(new i).move(a.frontWaistCenter).curve(a.frontWaistCenter.shiftFractionTowards(a.frontWaistSide,.8),a.frontWaistCenterTemp,a.frontWaistCenterTemp).addClass("lining"),y=n.waistSeamFrontTemp.length()-b,x=0;const W=a.floorSide.angle(a.frontWaistCenterTemp);do{const t=a.floorSide.angle(a.frontWaistCenterTemp);a.frontWaistCenterTemp=a.frontWaistCenterTemp.shift(t+90,y),n.waistSeamFrontTemp=(new i).move(a.frontWaistCenter).curve(a.frontWaistCenter.shiftFractionTowards(a.frontWaistSide,.8),a.frontWaistCenterTemp,a.frontWaistCenterTemp).addClass("lining").hide(),y=n.waistSeamFrontTemp.length()-b,x++}while(x<100&&(y>.1||y<-.1));x>=100&&l.error("Could not find the waist center point within 100 iterations"),n.sideSeamFrontTemp=n.sideSeamFrontTemp.rotate(a.floorSide.angle(a.frontWaistCenterTemp)-W,a.floorSide),a.frontWaistCenter=a.frontWaistCenterTemp.clone(),a.floorSide=n.sideSeamFrontTemp.start(),n.sideSeamFront=n.sideSeamFrontTemp.clone(),n.waistSeamFront=n.waistSeamFrontTemp.clone().reverse().hide(),n.waistSeamFrontTemp.hide(),n.sideSeamFrontTemp.hide(),a.waistSeamFrontStart=n.waistSeamFront.start(),r.set("waistLengthFront",n.waistSeamFront.length()),r.set("sideSeamFront",n.sideSeamFront.length()),a.hemSide=n.sideSeamFront.reverse().shiftAlong(C*g),n.sideSeamFront=n.sideSeamFront.split(a.hemSide)[1].hide(),r.set("sideSeamFrontHem",n.sideSeamFront.length()),a.hemIn=n.insideSeamFront.intersectsY(a.hemSide.y)[0],n.insideSeamFront=n.insideSeamFront.split(a.hemIn)[0].hide(),r.set("insideSeamFrontHem",n.insideSeamFront.length()),n.legSeamFront=(new i).move(a.hemIn).line(a.hemSide).hide(),r.set("legSeamFront",n.legSeamFront.length()),a.gussetFront=n.crotchSeamFront.shiftFractionAlong(1-t.gussetWidthFront),a.gussetFrontLeg=n.insideSeamFront.shiftAlong(r.get("insideSeamFront")*t.gussetDepth),a.gussetFrontCp=a.gussetFront.shift(n.crotchSeamFront.angleAt(a.gussetFront)+90,r.get("insideSeamFront")*t.gussetDepth*.5*(1-t.gussetWidthFront)),n.gussetFront=(new i).move(a.gussetFront).curve(a.gussetFrontCp,a.gussetFrontLeg,a.gussetFrontLeg).hide();const H=n.crotchSeamFront.split(a.gussetFront);n.crotchSeamFront=H[0].hide(),n.gussetCrotchFront=H[1].hide();const A=n.insideSeamFront.split(a.gussetFrontLeg);n.insideSeamFront=A[1].hide(),n.gussetLegFront=A[0].hide();let O=null;const D=e.seatBack;a.p2=a.frontWaistMiddle.shift(90,D/12),a.p10=a.floorIn.shiftTowards(a.floorMiddle,-S),function(t,e,o,i){const{options:a,Path:s,points:n,paths:r,store:l,log:c}=t.shorthand(),p=l.get("insideSeamFront"),h=e.dist(i);let d,f,m,u=Math.atan(o/h)*(180/Math.PI),g=o/h*-3,b=0,k=0;
1do{n.p3=e.rotate(u,i),n.p3cp10=n.p3.shiftFractionTowards(n.pF,a.pctRtoKin).shiftFractionTowards(n.p10,a.pctRtoKdown),n.p10cp3=n.p10.shiftFractionTowards(n.floorMiddle,-1*(a.pctKtoRout+a.fullness)).shiftFractionTowards(n.p3,a.pctKtoRup),r.insideSeamBack=(new s).move(n.p3).curve(n.p3cp10,n.p10cp3,n.p10).hide(),m=r.insideSeamBack.length(),d=e.dist(n.p3),f=o-d,b=m-p,b>.1?e=e.shiftTowards(i,.9*b):b<-.1?e=e.shiftTowards(i,.8*b):(g*=f>0?g>0?.8:-.8:g>0?-.9:.9,u+=g),k++}while((f>.1||f<-.1||b<-.1||b>.1)&&k<100);k>=100&&c.error('Could not find a point for "3" within 100 iterations')}(h,a.pR.clone(),2*S,a.floorIn),a.p11=a.floorSide.shiftTowards(a.pH,-S),function(t,e,o,i){const{options:a,Path:s,points:n,paths:r,store:l,utils:c,measurements:p,log:h}=t.shorthand();let d,f,m=null;const u=l.get("waistbandTargetBack"),g=l.get("sideSeamFront"),b=l.get("halfInch");let k,w,C;const v=e.dist(i);let T=Math.atan(Math.abs(o)/v)*(180/Math.PI);o<0&&(T=360-T,o*=-1);let y,x=g,B=0,S=u+.6*(.5*p.seatBack-u),L=g,P=S,R=0,F=0;n.p4=c.circlesIntersect(n.p2,S,i,x)[1],n.p4orig=c.circlesIntersect(n.p2,u,i,x)[1],n.p2cp4=n.p2.shift(n.p2.angle(n.pX)+90,.2*n.p2.dist(n.pX));do{n.p4=n.p4.shiftTowards(i,R),n.p4=n.p4.shiftTowards(n.p2,F),n.p4orig=n.p4orig.shiftTowards(i,R),n.p4orig=n.p4orig.shiftTowards(n.p2,F),k=n.floorSide.angle(n.p4orig),w=n.floorSide.angle(n.pU),C=w-k,n.p6=n.floorSide.shift(n.floorSide.angle(n.pT)-C,n.floorSide.dist(n.pT)),n.p7=n.floorSide.shift(n.floorSide.angle(n.pA)-C,n.floorSide.dist(n.pA)),n.p6=n.p6.shift(n.floorSide.angle(n.pT)-C-90,b*a.fullness*2),n.p7=n.p7.shift(n.floorSide.angle(n.pA)-C-90,b*a.fullness*2),d=n.p7.dist(n.p4)*a.pctAtoO,f=n.p7.dist(n.p11)*a.pctAtoC,m=n.p4.angle(n.p11),n.p7cp4=n.p7.shift(m+180+5*a.fullness,d),n.p7cp11=n.p7.shift(m,f),n.p4cp7=n.p4.shiftFractionTowards(n.p7cp4,a.pctUtoA),n.p11cp7=n.p11.shiftFractionTowards(n.p7cp11,a.pctJtoA).shift(0,n.p11.dist(n.pH)*a.fullness),n.p4cp2=n.p4.shift(n.p4.angle(n.p4cp7)-90,n.p4.dist(n.p4cp7)),r.sideSeamBack=(new s).move(n.p11).curve(n.p11cp7,n.p7cp11,n.p7).curve(n.p7cp4,n.p4cp7,n.p4).hide(),r.waistBandBack=(new s).move(n.p4).curve(n.p4cp2,n.p2cp4,n.p2).hide(),y=mi(t,r.waistBandBack,r.waistBandBack.length()*a.dartPosition,.8*(.5*p.seatBack-u)*1,-.65*(p.waistToSeat-l.get("waistDown")),!0),L=r.sideSeamBack.length(),P=y.left.length()+y.right.length(),R=L-g,F=P-u,B++}while((R>.1||R<-.1||F>.1||F<-.1)&&B<100);B>=100&&h.error('Could not find a point for "4" within 100 iterations'),r.curveLeftOfDart=y.right.clone().hide(),r.curveRightOfDart=y.left.clone().hide(),r.curveDart=y.dart.clone().hide(),r.curveDartSA=y.sa,n.dartOpeningLeft=r.curveLeftOfDart.start(),n.dartOpeningRight=r.curveRightOfDart.end()}(h,a.pU,-1*(L/2+S),a.p11,a.p2),a.hemInBack=n.insideSeamBack.shiftAlong(r.get("insideSeamFrontHem")),a.hemSideBack=n.sideSeamBack.shiftAlong(r.get("sideSeamFront")-r.get("sideSeamFrontHem")),n.insideSeamBackTemp=n.insideSeamBack.clone().addClass("canvas").hide(),r.set("insideSeamBack",n.insideSeamBack.length()),n.sideSeamBack=n.sideSeamBack.split(a.hemSideBack)[1].hide(),n.insideSeamBack=n.insideSeamBack.split(a.hemInBack)[0].hide(),a.p2a=a.p2.shiftTowards(a.p4,S),O=a.p6.shiftTowards(a.pT,1e3);const E=(new i).move(a.pF).line(a.p2a),I=(new i).move(a.p6).line(O);a.p5=I.intersects(E)[0],a.p5cp3=a.p5.shiftFractionTowards(a.pF,2*t.pctZtoR),a.p3cp5=a.p3.shiftFractionTowards(a.pF,t.pctRtoZin).shiftFractionTowards(a.p5,t.pctRtoZup/4),a.p2cp5=a.p2.shiftFractionTowards(a.p5,t.pctZtoR),a.p5cp2=a.p5.shift(a.p5.angle(a.p5cp3)+180,a.p2.dist(a.p5)*t.pctZtoR),n.crotchSeamBack=(new i).move(a.p2).curve(a.p2cp5,a.p5cp2,a.p5).curve(a.p5cp3,a.p3cp5,a.p3).hide(),O=a.pH.shift(90,1*S),a.p10cpH=a.p10.shiftFractionTowards(O,t.pctKtoH),a.p11cpH=a.p11.shiftFractionTowards(O,t.pctKtoH),n.legSeamBack=(new i).move(a.hemInBack).line(a.hemSideBack).hide(),r.set("legSeamBack",n.legSeamBack.length()),n.waistSeamBackSA=(new i).move(a.p4).join(n.curveRightOfDart).join(n.curveDartSA).join(n.curveLeftOfDart).hide(),n.waistSeamBack=(new i).move(a.p4).join(n.curveRightOfDart).join(n.curveDart).join(n.curveLeftOfDart).hide(),r.set("waistLengthBack",n.curveLeftOfDart.length()+n.curveRightOfDart.length()),a.gussetBack=n.crotchSeamBack.shiftFractionAlong(1-t.gussetWidthBack),a.gussetBackLeg=n.insideSeamBack.shiftAlong(r.get("insideSeamBack")*t.gussetDepth),a.gussetBackCp=a.gussetBack.shift(n.crotchSeamBack.angleAt(a.gussetBack)+90,r.get("insideSeamBack")*t.gussetDepth*.75*(1-4*t.gussetWidthBack)),n.gussetBack=(new i).move(a.gussetBack).curve(a.gussetBackCp,a.gussetBackLeg,a.gussetBackLeg).hide();const N=n.crotchSeamBack.split(a.gussetBack);n.crotchSeamBack=N[0].hide(),n.gussetCrotchBack=N[1].hide();const M=n.insideSeamBack.split(a.gussetBackLeg);return n.insideSeamBack=M[1].hide(),n.gussetLegBack=M[0].hide(),h}},na={name:"crux.backpocketpoints",from:sa,hide:{self:!0,from:!0,inherited:!0},draft:({options:t,measurements:e,Path:o,points:i,paths:a,store:n,part:r})=>{const l=di[t.backPocketType],c=l.backPocketWidth,p=l.backPocketHeight,h=l.backPocketCurve,d=l.backPocketOpening,f
1=l.backPocketOpeningSquareness,m=l.backPocketOpeningAspect,u=l.backPocketOpeningOffset;n.set("backPocketHeight",e.waistToKnee*p),i.backPocketTopLeft=a.curveLeftOfDart.shiftFractionAlong(4*c),i.backPocketTopRight=a.curveRightOfDart.shiftFractionAlong(1-4*c),i.backPocketTopMiddle=i.backPocketTopLeft.shiftFractionTowards(i.backPocketTopRight,.5);const g=i.backPocketTopRight.angle(i.backPocketTopLeft);n.set("backAngle",g),i.backPocketBottomLeft=i.backPocketTopLeft.shift(g+90,e.waistToKnee*p),i.backPocketBottomRight=i.backPocketTopRight.shift(g+90,e.waistToKnee*p),i.backPocketBottomMiddle=i.backPocketBottomLeft.shiftFractionTowards(i.backPocketBottomRight,.5);const b=i.backPocketBottomLeft.dist(i.backPocketBottomRight),k=h*b*.5,w=k*s.Qr;i.backPocketBottomLeftUp=i.backPocketBottomLeft.shift(g-90,k),i.backPocketBottomRightUp=i.backPocketBottomRight.shift(g-90,k),i.backPocketBottomLeftRight=i.backPocketBottomLeft.shift(g-180,k),i.backPocketBottomRightLeft=i.backPocketBottomRight.shift(g,k),i.backPocketBottomLeftToUpCp=i.backPocketBottomLeft.shift(g-90,w),i.backPocketBottomLeftToRightCp=i.backPocketBottomLeft.shift(g-180,w),i.backPocketBottomRightToUpCp=i.backPocketBottomRight.shift(g-90,w),i.backPocketBottomRightToLeftCp=i.backPocketBottomRight.shift(g,w),a.backPocketLeftBottomCurve=(new o).move(i.backPocketBottomLeftUp).curve(i.backPocketBottomLeftToUpCp,i.backPocketBottomLeftToRightCp,i.backPocketBottomLeftRight).hide(),a.backPocketRightBottomCurve=(new o).move(i.backPocketBottomRightLeft).curve(i.backPocketBottomRightToLeftCp,i.backPocketBottomRightToUpCp,i.backPocketBottomRightUp).hide();if(function(t,e,o,i,a,s,n){const{Path:r,points:l,paths:c}=t.shorthand();l.bpM=l.backPocketTopMiddle.shift(e+90,o*s),s*=.95,pi(l,"bpT",e-90,l.bpM,o,a,n),pi(l,"bpB",e+90,l.bpM,o,a,n),pi(l,"bpL",e,l.bpM,o,a,n),pi(l,"bpR",e+180,l.bpM,o,a,n),hi(l,"bpT2R","bpT",e+180,i,o,a,n),hi(l,"bpT2L","bpT",e,i,o,a,n),hi(l,"bpB2R","bpB",e+180,i,o,a,n),hi(l,"bpB2L","bpB",e,i,o,a,n),hi(l,"bpR2T","bpR",e-90,i,o,a,n),hi(l,"bpR2B","bpR",e+90,i,o,a,n),hi(l,"bpL2T","bpL",e-90,i,o,a,n),hi(l,"bpL2B","bpL",e+90,i,o,a,n),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,s.Qr*(1-f),d,u,m),a.waistSeamPocketPart=a.waistSeamBack.split(i.backPocketTopLeft)[0].split(i.backPocketTopRight)[1],"square"===t.backPocketType?(i.backPocketTopLeft=i.backPocketTopLeft.shiftTowards(i.backPocketBottomLeft,i.backPocketTopMiddle.dist(i.bpB)),i.backPocketTopRight=i.backPocketTopRight.shiftTowards(i.backPocketBottomRight,i.backPocketTopMiddle.dist(i.bpB)),a.backPocketSeamMarker=(new o).move(i.backPocketTopLeft).line(i.backPocketBottomLeftUp).join(a.backPocketLeftBottomCurve).line(i.backPocketBottomRightLeft).join(a.backPocketRightBottomCurve).line(i.backPocketTopRight).hide(),a.backPocketSeam=(new o).move(i.backPocketTopLeft).join(a.backPocketSeamMarker).line(i.backPocketTopLeft).close().hide(),a.backPocketSeamOutline=a.backPocketSeam.clone().hide()):(a.backPocketSeamMarker=(new o).move(i.backPocketTopLeft).line(i.backPocketBottomLeftUp).join(a.backPocketLeftBottomCurve).line(i.backPocketBottomRightLeft).join(a.backPocketRightBottomCurve).line(i.backPocketTopRight).hide(),a.backPocketSeam=a.waistSeamPocketPart.clone().join(a.backPocketSeamMarker).close().hide(),a.backPocketSeamOutline=a.waistSeamBackSA.clone().split(i.backPocketTopLeft)[0].split(i.backPocketTopRight)[1].line(i.backPocketBottomLeftUp).join(a.backPocketLeftBottomCurve).line(i.backPocketBottomRightLeft).join(a.backPocketRightBottomCurve).line(i.backPocketTopRight).close().hide()),n.set("backPocketSeamCargoLength",a.backPocketSeamMarker.length()),"standard"===t.backPocketType)a.waistSeamPocketPart.hide(),a.backPocketSeamOutline.hide(),i.backOpeningLeft=a.waistSeamPocketPart.reverse().shiftFractionAlong(.06),i.backOpeningRight=a.waistSeamPocketPart.shiftFractionAlong(.06),i.bpT2L=i.backOpeningLeft.shift(250,.3*i.backOpeningLeft.dist(i.bpL)),i.bpT2R=i.backOpeningRight.shift(290,.3*i.backOpeningRight.dist(i.bpR)),i.bpL=i.bpL.shiftFractionTowards(i.bpL2B,.3),i.bpR=i.bpR.shiftFractionTowards(i.bpR2B,.3),i.bpL2T=i.bpL2T.shiftFractionTowards(i.bpL,.75),i.bpR2T=i.bpR2T.shiftFractionTowards(i.bpR,.75);else if("hole"===t.backPocketType||"diamond"===t.backPocketType){let t=a.waistSeamPocketPart.intersectsBeam(i.bpT2L,i.bpT2R);i.backOpeningLeft=t[1],i.backOpeningRight=t[0]}if("square"!==t.backPocketType){"diamond"===t.backPocketType&&(i.bpT2L=i.backOpeningLeft.clone());let e=a.waistSeamPocketPart.split(i.backOpeningLeft);a.waistSeamPocketPartLeft=e[1].hide(),e=e[0].split(i.backOpeningRight),a.waistSeamPocketPartRight=e[0].hide(),e="standard"===t.backPocketType?a.waistSeamBackSA.split(i.backOpeningLeft):a.waistSeamBack.split(i.backOpeningLeft),a.waistSeamLeft=e[1].hide(),e=e[0].split(i.backOpeningRight),a.waistSeamRight=e[0].hide(),a.opening=(new o).move(i.backOpeningRight).curve(i.bpT2R,i.bpR2T,i.bpR).curve(i.bpR2B,i.bpB2R,i.bpB).curve(i.bpB2L,i.bpL2B,i.bpL).curve(i.bpL2T,i.bpT2L,i.backOpeningLeft).hide(),a.backPocketSeam=a.waistSeamPocketPartLeft.clone().line(i.backPocketBottomLeftUp).join(a.backPocketLeftBottomCurve).line(i.backPocketBottomRightLeft).join(a.backPocketRightBottomCurve).line(i.backPocketTopRight).join(a.waistSeamPocketPartRight).join(a.opening).close().hide()}else a.waistSeamPocketPart.hide();return r}};function ra(t,e){const{Path:o,points:i,paths:a,measurements:s}=t.shorthand();i.markerKneeSide=a.sideSeamBack.reverse().shiftAlong(s.waistToKnee-e),i.indicatorKneeInside=i.markerKneeSide.shift(i.hemSideBack.angle(i.hemInBack),2e3),i.markerKneeInside=a.insideSeamBack.intersectsBeam(i.indicatorKneeInside,i.markerKneeSide)[0],a.kneeLine=(new o).move(i.markerKneeInside).line(i.markerKneeSide).hide()}const la={name:"crux.back",from:na,draft:({options:t,measurements:e,Path:o,points:i,paths:a,Snippet:s,snippets:n,sa:r,store:l,macro:c,complete:p,part:h})=>{i.mWaist=a.waistSeamBack.shiftFractionAlong(.5);const d=l.get("waistDown"),f=l.get("waistbandTargetBack");if("hem"===t.hemType||"elastic"===t.hemType){const s=e.waistToFloor*t.hemLength,n=i.hemInBack.angle(i.hemSideBack),r=i.hemInBack.shift(n+90,s).shift(n+180,400),l=i.hemSideBack.shift(n+90,s).shift(n,400);i.hemInUp=a.insideSeamBack.intersectsBeam(r,l)[0],i.hemSideUp=a.sideSeamBack.intersectsBeam(r,l)[0],a.hemIn=a.insideSeamBack.split(i.hemInUp)[1].hide(),a.hemSide=a.sideSeamBack.split(i.hemSideUp)[0].hide(),c("mirror",{clone:!1,mirror:[i.hemInBack,i.hemSideBack],paths:["hemIn","hemSide"],points:["hemInUp","hemSideUp"]}),a.legSeamBack=a.hemIn.reverse().clone().unhide().line(a.hemSide.end()).join(a.hemSide.reverse()),a.fold=(new o).move(i.hemInBack).line(i.hemSideBack).attr("class","fabric dashed").setText("fold","text-s center")}if(t.backPocketInside&&"square"!==t.backPocketType?(a.waistSeamPocketPart.hide(),a.seam=a.waistSeamRight.join(a.opening).join(a.waistSeamLeft).join(a.crotchSeamBack).join(a.gussetBack).join(a.insideSeamBack).join(a.legSeamBack).join(a.sideSeamBack).close().attr("class","fabric"),a.seamSA=a.seam.clone()):(a.seam=a.waistSeamBack.join(a.crotchSeamBack).join(a.gussetBack).join(a.insideSeamBack).join(a.legSeamBack).join(a.sideSeamBack).close().attr("class","fabric"),a.seamSA=a.waistSeamBackSA.join(a.crotchSeamBack).join(a.gussetBack).join(a.insideSeamBack).join(a.legSeamBack).join(a.sideSeamBack).close().hide()),t.articulatedKnee&&e.waistToKnee/(e.waistToFloor*l.get("legLength"))<.9){ra(h,d);const s=e.knee*t.articulatedKneeSize,n=e.knee*t.articulatedKneeDartSize,r=i.markerKneeSide.angle(i.markerKneeInside);i.artKneeInside=i.markerKneeInside.shiftTowards(i.markerKneeSide,1.5*s).shift(r+90,.25*s),i.artKneeSide=i.markerKneeSide.shiftTowards(i.markerKneeInside,1.5*s).shift(r+90,.25*s),i.artKneeMiddle=i.artKneeSide.shiftFractionTowards(i.artKneeInside,.5),i.artKneeMiddleUp=i.artKneeMiddle.shift(r-90,.5*n),i.artKneeMiddleDown=i.artKneeMiddle.shift(r+90,.5*n),i.artKneeMiddleUpCpInside=i.artKneeMiddleUp.shift(r,.5*s),i.artKneeMiddleUpCpSide=i.artKneeMiddleUp.shift(r+180,.5*s),i.artKneeMiddleDownCpInside=i.artKneeMiddleDown.shift(r,.5*s),i.artKneeMiddleDownCpSide=i.artKneeMiddleDown.shift(r+180,.5*s),a.kneeDart=(new o).move(i.artKneeInside).curve(i.artKneeInside,i.artKneeMiddleDownCpInside,i.artKneeMiddleDown).curve(i.artKneeMiddleDownCpSide,i.artKneeSide,i.artKneeSide).
1curve(i.artKneeSide,i.artKneeMiddleUpCpSide,i.artKneeMiddleUp).curve(i.artKneeMiddleUpCpInside,i.artKneeInside,i.artKneeInside).addClass("dotted").close()}n.gussetBack=new s("notch",i.gussetBack),n.gussetBackLeg=new s("notch",i.gussetBackLeg),n.backPocketTopLeft=new s("notch",ci(h,a.backPocketSeam,i.backPocketTopLeft)?i.backPocketTopLeft:i.waistSeamBackStart),n.backPocketTopRight=new s("notch",ci(h,a.backPocketSeam,i.backPocketTopRight)?i.backPocketTopRight:i.backPocketBackOpeningSeam),n.backPocketBottomMiddle=new s("notch",i.backPocketBottomMiddle),p&&(i.indicatorWaistbandSide=a.waistSeamBackSA.shiftFractionAlong(.2),i.indicatorWaistbandInside=a.waistSeamBackSA.shiftFractionAlong(.8),e.waistToHips/d>1.1&&(i.indicatorHipsSide=i.indicatorWaistbandSide.shift(a.waistSeamBackSA.angleAt(i.indicatorWaistbandSide)+90,e.waistToHips-d),i.indicatorHipsInside=i.indicatorWaistbandInside.shift(a.waistSeamBackSA.angleAt(i.indicatorWaistbandInside)+90,e.waistToHips-d),i.markerHipsSide=a.sideSeamBack.intersectsBeam(i.indicatorHipsInside,i.indicatorHipsSide)[0],i.markerHipsInside=a.crotchSeamBack.intersectsBeam(i.indicatorHipsInside,i.indicatorHipsSide)[0],a.hipsLine=(new o).move(i.markerHipsInside).line(i.markerHipsSide).attr("class","contrast help"),c("banner",{id:"hipsLine",classes:"center contrast help",path:a.hipsLine,text:"hipsLine"})),i.indicatorSeatSide=i.indicatorWaistbandSide.shift(a.waistSeamBackSA.angleAt(i.indicatorWaistbandSide)+90,e.waistToSeat-d),i.indicatorSeatInside=i.indicatorWaistbandInside.shift(a.waistSeamBackSA.angleAt(i.indicatorWaistbandInside)+90,e.waistToSeat-d),i.markerSeatSide=a.sideSeamBack.intersectsBeam(i.indicatorSeatInside,i.indicatorSeatSide)[0],i.markerSeatInside=a.crotchSeamBack.intersectsBeam(i.indicatorSeatInside,i.indicatorSeatSide)[0],a.seatLine=(new o).move(i.markerSeatInside).line(i.markerSeatSide).attr("class","contrast help"),c("banner",{id:"seatLine",classes:"center contrast help",path:a.seatLine,text:"seatLine"}),e.waistToKnee/(e.waistToFloor*l.get("legLength"))<.97&&(void 0===a.kneeLine?ra(h,d):a.kneeLine=(new o).move(i.markerKneeInside).line(i.markerKneeSide),a.kneeLine.unhide().attr("class","contrast help"),c("banner",{id:"kneeLine",classes:"center contrast help",path:a.kneeLine,text:"kneeLine"})),t.backPocketInside?a.backPocketSeamMarker.unhide().addClass("lining"):a.backPocketSeam.unhide().addClass("lining")),i.gridAnchor=i.pO.clone(),i.logo=i.pE.shift(180,.25*f),n.logo=new s("logo",i.logo),i.scaleboxAnchor=i.logo.shift(270,.25*f),c("scalebox",{at:i.scaleboxAnchor,rotation:180-l.get("backAngle")}),i.title=i.pE.shift(270,.7*f).shift(0,.3*f),c("title",{nr:2,at:i.title,title:"back",align:"center",rotation:180-l.get("backAngle")});const m=i.p11.angle(i.p4),u=.7*i.p11.dist(i.p4);return c("grainline",{from:i.p4orig.shift(m+180,.05*u),to:i.p4orig.shift(m+180,.6*u)}),l.cutlist.addCut({cut:2,from:"fabric"}),r&&(a.sa=a.seamSA.offset(r).attr("class","fabric sa")),li(h,[["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?li(h,[["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]]):li(h,[["h","hemSideBack","p4","hemSideBack",15],["h","hemInBack","hemSideBack","hemSideBack",15],["h","gussetBackLeg","hemInBack","hemSideBack",15]]),h}},ca={name:"crux.backpocket",from:na,options:{},draft:({options:t,points:e,Path:o,paths:i,Snippet:a,snippets:s,sa:n,store:r,macro:l,log:c,part:p})=>{const h=r.get("backAngle");return l("transform",{transform:"rotate",c:e.backPocketTopMiddle,angle:180-h,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"]}),i.backPocketOpening.hide(),i.backPocketLeftBottomCurve.hide(),i.backPocketRightBottomCurve.hide(),i.curveRightOfDart.hide(),i.curveDart.hide(),i.curveDartSA.hide(),i.curveLeftOfDart.hide(),i.backPocketSeamOutline.hide(),i.waistSeamPocketPart.hide(),"square"!==t.backPocketType&&i.opening.hide(),t.backPocketInside&&"square"!==t.backPocketType?(i.backPocketSeam=i.curveRightOfDart.clone().join(i.curveDart).join(i.curveLeftOfDart).split(e.backPocketTopLeft)[0].split(e.backPocketTopRight)[1].line(e.backPocketBottomLeftUp).join(i.backPocketLeftBottomCurve).line(e.backPocketBottomRightLeft).join(i.backPocketRightBottomCurve).line(e.backPocketTopRight).close(),i.backPocketSeamSA=i.curveRightOfDart.clone().join(i.curveDartSA).join(i.curveLeftOfDart).split(e.backPocketTopLeft)[0].split(e.backPocketTopRight)[1].line(e.backPocketBottomLeftUp).join(i.backPocketLeftBottomCurve).line(e.backPocketBottomRightLeft).join(i.backPocketRightBottomCurve).line(e.backPocketTopRight).close().hide()):("hole"===t.backPocketType||"diamond"===t.backPocketType?i.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")),i.backPocketSeam=(new o).move(e.backPocketTopLeftHem).line(e.backPocketBottomLeft).line(e.backPocketBottomRight).line(e.backPocketTopRightHem).line(e.backPocketTopLeftHem).close().hide(),i.backPocketFold=(new o).move(e.backPocketTopLeft).line(e.backPocketTopRight).attr("class","fabric dashed").setText("fold","text-s center")),i.backPocketSeamSA=i.backPocketSeam.clone().hide()),i.backPocketSeam.unhide(),void 0===i.backPocketSeam?(c.error("Pocket seam is missing!"),p.hide()):(e.gridAnchor=e.backPocketTopLeft.clone(),r.cutlist.addCut({cut:2,from:"fabric"}),s.backPocketTopLeft=new a("notch",ci(p,i.backPocketSeam,e.backPocketTopLeft)?e.backPocketTopLeft:e.waistSeamBackStart),s.backPocketTopRight=new a("notch",ci(p,i.backPocketSeam,e.backPocketTopRight)?e.backPocketTopRight:e.backPocketBackOpeningSeam),s.backPocketBottomMiddle=new a("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)}),n&&(i.sa=i.backPocketSeamSA.offset(n).attr("class","fabric sa"),void 0!==i.backPocketOpening&&void 0!==i.backPocketOpeningFront&&(i.backPocketOpeningSA=i.backPocketOpening.reverse().offset(n).attr("class","fabric sa"))),"square"!==t.backPocketType?(e.bpOstart=i.opening.start(),e.bpOstop=i.opening.end(),li(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&&li(p,[["h","bpL","bpR","bpB",15],["v","backPocketBottomMiddle","bpB","bpB",20]])):li(p,[["h","backPocketTopLeftHem","backPocketTopRightHem","backPocketTopRightHem",-15],["v","backPocketBottomRightLeft","backPocketTopRightHem","backPocketTopRightHem",25],["v","backPocketBottomRightUp","backPocketTopRight","backPocketTopRight",15]]),p)}},pa={name:"crux.backpocketfacing",from:ca,options:{},draft:({options:t,points:e,Path:o,paths:i,snippets:a,sa:s,store:n,macro:r,part:l})=>
1{if("square"===t.backPocketType)return l.hide();const c=-1*(s?Math.min(4*s,e.bpL.x-e.backPocketTopLeft.x):e.bpL.x-e.backPocketTopLeft.x);return"standard"===t.backPocketType?(i.facingOpening=(new o).move(e.bpR).curve(e.bpR2B,e.bpB2R,e.bpB).curve(e.bpB2L,e.bpL2B,e.bpL).hide(),i.openingOffset=i.facingOpening.offset(c).reverse().addText("Finish","center text-sm"),i.backPocketFacing=i.waistSeamPocketPartRight.clone().join(i.opening).join(i.waistSeamPocketPartLeft).join(i.openingOffset).line(i.waistSeamPocketPartRight.start()).close()):(i.openingOffset=i.opening.clone().offset(c).reverse(),i.backPocketFacing=i.opening.clone().line(i.openingOffset.start()).join(i.openingOffset).line(i.opening.start()).close()),i.backPocketSeam.hide(),i.waistSeamPocketPartLeft.hide(),i.waistSeamPocketPartRight.hide(),delete a.backPocketTopLeft,delete a.backPocketTopRight,delete a.backPocketBottomMiddle,s&&(i.sa=i.backPocketFacing.offset(s).attr("class","fabric sa")),r("rmgrainline"),r("rmahd"),r("rmavd"),s&&(i.backPocketFacingSA=i.backPocketFacing.offset(s).attr("class","fabric sa")),e.gridAnchor=e.backPocketTopLeft.clone(),n.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=i.opening.start(),e.bpOstop=i.opening.end(),e.offBottom=i.openingOffset.edge("bottom"),li(l,[["h","backPocketTopLeft","backPocketTopRight","backPocketTopRight",-25],["h","bpOstop","bpOstart","bpOstop",-15],["v","offBottom","backPocketTopRight","backPocketTopRight",15]])),l}},ha={name:"crux.backpocketcargo",after:[ca],options:{},draft:({options:t,Point:e,points:o,Path:i,paths:a,sa:s,store:n,measurements:r,macro:l,part:c})=>{if(!t.backPocketCargo)return c.hide();const p=n.get("backPocketSeamCargoLength"),h=r.waistToFloor*t.backPocketCargoWidth;o.top=new e(0,0),o.topLeft=o.top.shift(270,2*h).shift(180,.5*h),o.topRight=o.top.shift(270,2*h).shift(0,.5*h),o.topCpDownLeft=o.top.shift(270,.5*h).shift(180,.5*h),o.topCpDownRight=o.top.shift(270,.5*h).shift(0,.5*h),o.bottom=o.top.shift(270,p);let d=0;do{o.bottom=o.bottom.shift(90,d),o.bottomLeft=o.bottom.shift(90,2*h).shift(180,.5*h),o.bottomCpUpLeft=o.bottom.shift(90,.5*h).shift(180,.5*h),a.left=(new i).move(o.top).curve(o.top,o.topCpDownLeft,o.topLeft).line(o.bottomLeft).curve(o.bottomCpUpLeft,o.bottom,o.bottom),d=a.left.length()-p}while(d>.1||d<-.1);return o.bottomRight=o.bottom.shift(90,2*h).shift(0,.5*h),o.bottomCpUpRight=o.bottom.shift(90,.5*h).shift(0,.5*h),a.right=(new i).move(o.bottom).curve(o.bottom,o.bottomCpUpRight,o.bottomRight).line(o.topRight).curve(o.topCpDownRight,o.top,o.top),a.seam=a.left.join(a.right).close(),n.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"}}),s&&(a.sa=a.seam.offset(s).attr("class","fabric sa")),li(c,[["h","topLeft","topRight","top",-15],["v","bottom","top","topRight",15]]),c}},da={name:"crux.flyshield",from:sa,draft:({points:t,Path:e,paths:o,sa:i,store:a,macro:s,part:n})=>{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(s("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,i?(t.flyTopCenter=t.flyTopCenter.shift(90,i).shift(0,i),t.flyTop=t.flyTop.shift(90,i),t.pZextra=t.pZ.shift(0,i)):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(),a.cutlist.addCut({cut:1,onFold:!0,from:"fabric"}),t.title=t.pZ.shiftFractionTowards(t.flyTop.shiftFractionTowards(t.flyTopCenter,.6),.5),s("title",{nr:11,at:t.title,title:"flyshield",align:"center",scale:.5,rotation:90,classes:{nr:"text-xl note font-bold"}}),s("cutonfold",{from:t.flyTop,to:t.flyBottom,offset:7}),i){o.sa=o.seam.offset(i);const a=o.sa.intersectsBeam(t.flyTop,t.flyBottom);o.sa=(new e).move(t.flyBottom).join(o.sa.split(a[1])[1].join(o.sa.split(a[0])[0])).line(t.flyTop).attr("class","fabric sa")}return li(n,[["h","flyTop","flyTopCenter","flyTopCenter",-15],["h","flyBottom","pZ","pZ",15],["v","pZextra","flyTopCenter","flyTopCenter",15],["v","pZ","flyBottom","flyBottom",
1-15]]),n}},fa={name:"crux.frontpocketpoints",from:sa,hide:{self:!0,from:!0,inherited:!0},draft:({options:t,measurements:e,Point:o,Path:i,points:a,paths:n,store:r,part:l})=>{const c=fi[t.frontPocketType],p=c.frontPocketWidth,h=c.frontPocketHeight,d=c.frontPocketCurve,f=c.frontPocketOpening,m=c.frontPocketOpeningSquareness,u=c.frontPocketOpeningAspect,g=c.frontPocketOpeningOffset;let b;n.sideSeamFrontOriginal=n.sideSeamFront.clone().hide(),a.frontPocketBottomRight=n.sideSeamFront.reverse().shiftAlong(e.waistToKnee*h),a.frontPocketBottomRightStart=a.frontPocketBottomRight.clone(),a.frontPocketTopLeft=n.waistSeamFront.shiftFractionAlong(4*p),b=n.waistSeamFront.split(a.frontPocketTopLeft),n.waistSeamFrontInside=b[1].hide(),n.waistSeamFrontOutside=b[0].hide(),a.frontPocketBottomLeft=new o(a.frontPocketTopLeft.x,a.frontPocketBottomRight.y);const k=a.frontPocketBottomRight.x-a.frontPocketBottomLeft.x;let w=a.frontPocketBottomLeft.dist(a.frontPocketBottomRight);const C=a.frontPocketBottomLeft.dist(a.frontPocketTopLeft);C/w<1.35&&(w=C/1.35);const v=Math.min(w*d,.52*k),T=v*s.Qr,y=s.Qr*(1-m);a.frontPocketBottomLeftUp=a.frontPocketBottomLeft.shift(90,v),a.frontPocketBottomLeftRight=a.frontPocketBottomLeft.shift(0,v),a.frontPocketBottomLeftToUpCp=a.frontPocketBottomLeft.shift(90,T),a.frontPocketBottomLeftToRightCp=a.frontPocketBottomLeft.shift(0,T);const x=new o(a.frontPocketBottomRight.x+10,a.frontPocketBottomRight.y);return a.frontPocketBottomRightUp=x.shift(90,v),a.frontPocketBottomRightLeft=x.shift(180,v),a.frontPocketBottomRightToLeftCp=x.shift(180,T),a.frontPocketBottomRightToLeftCp.x>a.frontPocketBottomRight.x&&(a.frontPocketBottomRightUp=a.frontPocketBottomRight.copy(),a.frontPocketBottomRightLeft=a.frontPocketBottomRight.copy(),a.frontPocketBottomRightToLeftCp=a.frontPocketBottomRight.copy()),n.frontPocketLeftBottomCurve=(new i).move(a.frontPocketBottomLeftUp).curve(a.frontPocketBottomLeftToUpCp,a.frontPocketBottomLeftToRightCp,a.frontPocketBottomLeftRight).hide(),function(t,e,o,i,a,s){const{points:n}=t.shorthand();n.fpM=n.frontWaistSide.shift(225,e*a),pi(n,"fpT",90,n.fpM,e,i,s),pi(n,"fpB",270,n.fpM,e,i,s),pi(n,"fpL",180,n.fpM,e,i,s),pi(n,"fpR",0,n.fpM,e,i,s),hi(n,"fpT2R","fpT",0,o,e,i,s),hi(n,"fpT2L","fpT",180,o,e,i,s),hi(n,"fpB2R","fpB",0,o,e,i,s),hi(n,"fpB2L","fpB",180,o,e,i,s),hi(n,"fpR2T","fpR",90,o,e,i,s),hi(n,"fpR2B","fpR",270,o,e,i,s),hi(n,"fpL2T","fpL",90,o,e,i,s),hi(n,"fpL2B","fpL",270,o,e,i,s)}(l,w,y,f,g,u),a.frontPocketBottomRight=n.sideSeamFront.reverse().shiftAlong(e.waistToKnee*h-.45*w),b=n.sideSeamFront.split(a.frontPocketBottomRight),n.sideSeamFrontLower=b[0].hide(),n.sideSeamFrontUpper=b[1].hide(),a.frontPocketTopMiddle=n.waistSeamFrontOutside.shiftFractionAlong("square"===t.frontPocketType?.7:.5),"standard"===t.frontPocketType||"square"===t.frontPocketType?("square"===t.frontPocketType&&(a.frontPocketTopMiddle.x=a.fpL.x),b=n.waistSeamFrontOutside.split(a.frontPocketTopMiddle),n.waistSeamFrontOutside=b[0].hide(),n.waistSeamFrontMiddle=b[1].hide(),a.frontPocketTopMiddleCp=a.frontPocketTopMiddle.shift(195,w*g*y*.5),a.frontPocketOpeningSideSeam=n.sideSeamFront.reverse().shiftAlong((a.fpR2B.y-a.fpT2R.y)*("square"===t.frontPocketType?.74:.85)),a.frontPocketOpeningSideSeamCp=a.frontPocketOpeningSideSeam.shift(245,w*g*y*.5),b=n.sideSeamFrontUpper.split(a.frontPocketOpeningSideSeam),n.sideSeamFrontUpper=b[1].hide(),n.sideSeamFrontMiddle=b[0].hide()):(n.sideSeamFrontMiddle=n.sideSeamFrontUpper.clone(),n.waistSeamFrontMiddle=n.waistSeamFrontOutside.clone(),a.frontPocketTopMiddle=a.waistSeamFrontStart.clone()),a.frontPocketBottomRightToUpCp=a.frontPocketBottomRight.shift(270,T*y),"diamond"===t.frontPocketType||"square"===t.frontPocketType?(b=n.sideSeamFrontLower.split(a.frontPocketBottomRightStart),n.frontPocketRightBottomCurve=b[1].clone().hide()):n.frontPocketRightBottomCurve=(new i).move(a.frontPocketBottomRightLeft).curve(a.frontPocketBottomRightToLeftCp,a.frontPocketBottomRightToUpCp,a.frontPocketBottomRight).hide(),n.frontPocketSeamMarker=(new i).move(a.frontPocketTopLeft).line(a.frontPocketBottomLeftUp).join(n.frontPocketLeftBottomCurve).line(a.frontPocketBottomRightLeft).join(n.frontPocketRightBottomCurve).hide(),n.frontPocketSeam=(new i).move(a.frontPocketTopMiddle).join(n.waistSeamFrontMiddle).join(n.frontPocketSeamMarker).join(n.sideSeamFrontMiddle).hide(),"standard"===t.frontPocketType?n.frontPocketOpening=(new i).move(a.frontPocketTopMiddle).curve(a.frontPocketTopMiddleCp,a.fpL2T,a.fpL).curve(a.fpL2B,a.fpB2L,a.fpB).curve(a.fpB2R,a.frontPocketOpeningSideSeamCp,a.frontPocketOpeningSideSeam).hide():"square"===t.frontPocketType?n.frontPocketOpening=(new i).move(a.frontPocketTopMiddle).line(a.fpL).curve(a.fpL2B,a.fpB2L,a.fpB).curve(a.fpB.shift(0,.5*a.fpB.dist(a.frontPocketOpeningSideSeam)),a.frontPocketOpeningSideSeam,a.frontPocketOpeningSideSeam).hide():"hole"!==t.frontPocketType&&"diamond"!==t.frontPocketType||(n.frontPocketOpening=(new i).move(a.fpT).curve(a.fpT2L,a.fpL2T,a.fpL).curve(a.fpL2B,a.fpB2L,a.fpB).curve(a.fpB2R,a.fpR2B,a.fpR).curve(a.fpR2T,a.fpT2R,a.fpT).hide()),r.set("frontPocketSeamCargoLength",
1n.frontPocketSeamMarker.length()),l}},ma={name:"crux.front",from:fa,draft:({options:t,Path:e,points:o,paths:i,Snippet:a,snippets:s,sa:n,store:r,measurements:l,complete:c,macro:p,part:h})=>{i.flyFold.unhide().attr("class","fabric dashed").setText("basteHere","text-xs center");const d=r.get("waistDown"),f=l.waistToKnee-d,m=i.sideSeamFront.length()-f;if(t.articulatedKnee&&l.waistToKnee/(l.waistToFloor*r.get("legLength"))<.8){const a=i.sideSeamFront.reverse(),s=l.knee*t.articulatedKneeSize,n=l.knee*t.articulatedKneeDartSize;o.artKneeSideUp=a.shiftAlong(l.waistToKnee-d),o.artKneeSideUpDart=a.shiftAlong(l.waistToKnee-d+n),o.artKneeSideDown=a.shiftAlong(l.waistToKnee-d+2*s),o.artKneeSideDownDart=a.shiftAlong(l.waistToKnee-d-n+2*s),o.artKneeSideInUp=o.artKneeSideUp.shift(a.angleAt(o.artKneeSideUp)-t.articulatedKneeAngle,s),o.artKneeSideUpDart=o.artKneeSideInUp.shiftTowards(o.artKneeSideUpDart,s),o.artKneeSideInDown=o.artKneeSideDown.shift(a.angleAt(o.artKneeSideDown)-(180-t.articulatedKneeAngle),s),o.artKneeSideDownDart=o.artKneeSideInDown.shiftTowards(o.artKneeSideDownDart,s);const r=i.insideSeamFront.reverse();o.artKneeInsideUp=r.shiftAlong(m),o.artKneeInsideUpDart=r.shiftAlong(m-n),o.artKneeInsideDown=r.shiftAlong(m-2*s),o.artKneeInsideDownDart=r.shiftAlong(m+n-2*s),o.artKneeInsideInUp=o.artKneeInsideUp.shift(r.angleAt(o.artKneeInsideUp)+t.articulatedKneeAngle+180,s),o.artKneeInsideUpDart=o.artKneeInsideInUp.shiftTowards(o.artKneeInsideUpDart,s),o.artKneeInsideInDown=o.artKneeInsideDown.shift(r.angleAt(o.artKneeInsideDown)+(180-t.articulatedKneeAngle)+180,s),o.artKneeInsideDownDart=o.artKneeInsideInDown.shiftTowards(o.artKneeInsideDownDart,s),i.artSideSeamUp=i.sideSeamFront.split(o.artKneeSideUp)[1].hide(),!t.frontPocketInside||"standard"!==t.frontPocketType&&"square"!==t.frontPocketType||(i.artSideSeamUp=i.artSideSeamUp.split(o.frontPocketOpeningSideSeam)[0].hide()),i.artSideSeamDown=i.sideSeamFront.split(o.artKneeSideDown)[0].hide(),i.artInsideSeamUp=i.insideSeamFront.split(o.artKneeInsideUp)[0].hide(),i.artInsideSeamDown=i.insideSeamFront.split(o.artKneeInsideDown)[1].hide(),p("transform",{transform:"translate",clone:!1,x:0,y:.96*n*2,paths:["artInsideSeamDown","artSideSeamDown","legSeamFront"],points:["artKneeSideDown","artKneeSideInDown","artKneeSideDownDart","artKneeInsideDown","artKneeInsideInDown","artKneeInsideDownDart","hemIn","hemSide"]}),i.sideSeamFront=(new e).move(o.hemSide).join(i.artSideSeamDown).line(o.artKneeSideDownDart).line(o.artKneeSideUpDart).line(o.artKneeSideUp).join(i.artSideSeamUp),i.insideSeamFront=(new e).move(o.gussetFrontLeg).join(i.artInsideSeamUp).line(o.artKneeInsideUpDart).line(o.artKneeInsideDownDart).line(o.artKneeInsideDown).join(i.artInsideSeamDown),i.darts1=(new e).move(o.artKneeSideUp).line(o.artKneeSideInUp).line(o.artKneeSideUpDart).addClass("dotted"),i.darts2=(new e).move(o.artKneeSideDown).line(o.artKneeSideInDown).line(o.artKneeSideDownDart).addClass("dotted"),i.darts3=(new e).move(o.artKneeInsideUp).line(o.artKneeInsideInUp).line(o.artKneeInsideUpDart).addClass("dotted"),i.darts4=(new e).move(o.artKneeInsideDown).line(o.artKneeInsideInDown).line(o.artKneeInsideDownDart).addClass("dotted")}if(i.sideSeamFrontFull=i.sideSeamFront.clone().hide(),"hem"===t.hemType||"elastic"===t.hemType){const a=l.waistToFloor*t.hemLength,s=o.hemIn.angle(o.hemSide),n=o.hemIn.shift(s+90,a).shift(s+180,400),r=o.hemSide.shift(s+90,a).shift(s,400);o.hemInUp=i.insideSeamFront.intersectsBeam(n,r)[0],o.hemSideUp=i.sideSeamFront.intersectsBeam(n,r)[0],i.hemIn=i.insideSeamFront.split(o.hemInUp)[1].hide(),i.hemSide=i.sideSeamFront.split(o.hemSideUp)[0].hide(),p("mirror",{clone:!1,mirror:[o.hemIn,o.hemSide],paths:["hemIn","hemSide"],points:["hemInUp","hemSideUp"]}),i.legSeamFront=i.hemIn.reverse().clone().unhide().line(i.hemSide.end()).join(i.hemSide.reverse()),i.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?(i.sideSeamFront=i.sideSeamFront.split(o.frontPocketOpeningSideSeam)[0],i.seam=(new e).move(o.frontPocketTopMiddle).join(i.waistSeamFrontMiddle).join(i.waistSeamFrontInside).join(i.fly).join(i.crotchSeamFront).join(i.gussetFront).join(i.insideSeamFront).join(i.legSeamFront).join(i.sideSeamFront).join(i.frontPocketOpening.reverse()).close().attr("class","fabric")):(i.seam=(new e).move(o.waistSeamFrontStart).join(i.waistSeamFront).join(i.fly).join(i.crotchSeamFront).join(i.gussetFront).join(i.insideSeamFront).join(i.legSeamFront).join(i.sideSeamFront).close().attr("class","fabric"),i.frontPocketOpening.unhide().attr("class","fabric")):i.seam=i.waistSeamFront.join(i.fly).join(i.crotchSeamFront).join(i.gussetFront).join(i.insideSeamFront).join(i.legSeamFront).join(i.sideSeamFront).close().attr("class","fabric"),s.n5=new a("notch",o.pZ),s.gussetFront=new a("notch",o.gussetFront),s.gussetFrontLeg=new a("notch",o.gussetFrontLeg),c){const a=i.flyFold.join(i.crotchSeamFront).join(i.gussetFront);o.indicatorWaistbandSide=i.waistSeamFront.shiftFractionAlong(.2),o.indicatorWaistbandInside=i.waistSeamFront.shiftFractionAlong(.8),l.waistToHips/d>1.1&&(o.indicatorHipsSide=o.indicatorWaistbandSide.shift(i.waistSeamFront.angleAt(o.indicatorWaistbandSide)+90,l.waistToHips-d),o.indicatorHipsInside=o.indicatorWaistbandInside.shift(i.waistSeamFront.angleAt(o.indicatorWaistbandInside)+90,l.waistToHips-d),!t.frontPocketInside||"standard"!==t.frontPocketType&&"square"!==t.frontPocketType?o.markerHipsSide=i.sideSeamFrontFull.intersectsBeam(o.indicatorHipsInside,o.indicatorHipsSide)[0]:o.markerHipsSide=i.frontPocketOpening.intersectsBeam(o.indicatorHipsInside,o.indicatorHipsSide)[0],o.markerHipsInside=a.intersectsBeam(o.indicatorHipsInside,o.indicatorHipsSide)[0],i.hipsLine
1=(new e).move(o.markerHipsInside).line(o.markerHipsSide).attr("class","contrast help"),p("banner",{id:"hipsLine",classes:"center contrast help",path:i.hipsLine,text:"hipsLine"})),o.indicatorSeatSide=o.indicatorWaistbandSide.shift(i.waistSeamFront.angleAt(o.indicatorWaistbandSide)+90,l.waistToSeat-d),o.indicatorSeatInside=o.indicatorWaistbandInside.shift(i.waistSeamFront.angleAt(o.indicatorWaistbandInside)+90,l.waistToSeat-d),o.markerSeatSide=i.sideSeamFront.intersectsBeam(o.indicatorSeatInside,o.indicatorSeatSide)[0],o.markerSeatInside=a.intersectsBeam(o.indicatorSeatInside,o.indicatorSeatSide)[0],i.seatLine=(new e).move(o.markerSeatInside).line(o.markerSeatSide).attr("class","contrast help"),p("banner",{id:"seatLine",classes:"center contrast help",path:i.seatLine,text:"seatLine"}),l.waistToKnee/(l.waistToFloor*r.get("legLength"))<.97&&(o.markerKneeSide=i.sideSeamFrontOriginal.reverse().shiftAlong(l.waistToKnee-d+(t.articulatedKnee?l.knee*t.articulatedKneeDartSize*.96:0)),o.indicatorKneeInside=o.markerKneeSide.shift(o.hemSide.angle(o.hemIn),2e3),o.markerKneeInside=i.insideSeamFront.intersectsBeam(o.indicatorKneeInside,o.markerKneeSide)[0],i.kneeLine=(new e).move(o.markerKneeInside).line(o.markerKneeSide).attr("class","contrast help"),p("banner",{id:"kneeLine",classes:"center contrast help",path:i.kneeLine,text:"kneeLine"}))}return c&&(void 0!==i.frontPocketSeamMarker&&i.frontPocketSeamMarker.unhide().addClass("lining stroke-l"),0==t.frontPocketInside&&void 0!==i.frontPocketOpening&&(i.pocketOpeningMarker=i.frontPocketOpening.clone().unhide().addClass("lining"))),o.gridAnchor=o.pO.clone(),r.cutlist.addCut({cut:2,from:"fabric"}),o.logo=o.pE.clone(),s.logo=new a("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)}),n&&(i.sa=i.seam.offset(n).attr("class","fabric sa"),t.frontPocketInside&&(i.frontPocketOpeningSA=i.frontPocketOpening.reverse().offset(n).attr("class","fabric sa"))),o.seamRight=i.seam.edge("right"),li(h,[["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?li(h,[["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]]):li(h,[["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&&li(h,[["v","hemIn","artKneeInsideUpDart","artKneeInsideUpDart",-25],["v","hemIn","artKneeInsideDownDart","artKneeInsideDownDart",-15],["v","hemSide","artKneeSideUpDart","artKneeSideUpDart",25],["v","hemSide","artKneeSideDownDart","artKneeSideDownDart",15]]),h}},ua={name:"crux.frontpocket",from:fa,options:{},draft:({options:t,points:e,paths:o,sa:i,store:a,macro:s,log:n,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 n.error("Pocket seam is missing!"),r.hide();switch(e.gridAnchor=e.frontPocketTopLeft.clone(),a.cutlist.addCut({cut:2,from:"fabric"}),e.logo=e.frontPocketTopLeft.shiftFractionTowards(e.frontPocketBottomRight,.6).shiftFractionTowards(e.frontPocketBottomRightLeft,.5),e.title=e.logo.clone(),s("title",{nr:4,at:e.title,title:"frontpocket",align:"center",scale:.5}),s("grainline",{from:e.frontPocketBottomLeftUp.shift(0,10),to:e.frontPocketTopLeft.shift(0,10)}),i&&(o.sa=o.frontPocketSeam.offset(i).attr("class","fabric sa"),0==t.frontPocketInside&&(o.frontPocketOpeningSA=o.frontPocketOpening.reverse().offset(i).attr("class","fabric sa"))),t.frontPocketType){case"standard":li(r,[["h","frontPocketTopLeft","frontPocketOpeningSideSeam","frontPocketTopLeft",-35]]);case"hole":case"diamond":li(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&&li(r,[["v","frontPocketBottomRightLeft","fpB","fpB",20]]);break;case"square":li(r,[["h","frontPocketTopLeft","frontPocketBottomRight","frontPocketTopLeft",-25],["h","frontPocketTopLeft","frontPocketTopMiddle","frontPocketTopLeft",-15],["v","frontPocketBottomRightLeft","fpB","fpB",40],["v","frontPocketBottomLeftRight","frontPocketTopLeft","frontPocketTopLeft",-15]])}return r}},ga={name:"crux.frontpocketfacing",from:ua,options:{},draft:({options:t,points:e,Path:o,paths:i,sa:a,store:s,macro:n,part:r})=>{const l=-1*(a?Math.min(4*a,e.fpL.x-e.frontPocketTopLeft.x):e.fpL.x-e.frontPocketTopLeft.x);if(i.frontPocketSeam.hide(),"standard"===t.frontPocketType||"square"===t.frontPocketType){i.frontPocketOpeningFacing=i.frontPocketOpening.offset(-1*l);let t=i.frontPocketSeam.intersects(i.frontPocketOpeningFacing);t.length>0&&(i.frontPocketOpeningFacing=i.frontPocketOpeningFacing.split(t[0])[
11].hide()),t.length>1&&(i.frontPocketOpeningFacing=i.frontPocketOpeningFacing.split(t[t.length-1])[0].hide()),e.fpof0=i.frontPocketOpeningFacing.start().clone(),e.fpof1=i.frontPocketOpeningFacing.end().clone(),i.frontPocketOpeningFacing.unhide().addText("Finish","center text-sm"),i.frontPocketFacing=(new o).move(e.fpof0).join(i.frontPocketOpeningFacing).line(e.frontPocketOpeningSideSeam).join(i.frontPocketOpening.reverse()).line(e.fpof0).close()}else i.frontPocketFacing=i.frontPocketOpening.reverse().offset(l).reverse().close(),i.frontPocketOpening.unhide(),t.frontPocketInside&&(i.frontPocketOpeningSA=i.frontPocketOpening.reverse().offset(a).attr("class","fabric sa"));switch(a&&(i.sa=i.frontPocketFacing.offset(a).attr("class","fabric sa")),e.gridAnchor=e.frontPocketTopLeft.clone(),s.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)),n("title",{nr:5,at:e.title,title:"frontpocketfacing",align:"center",scale:"diamond"===t.frontPocketType?.15:.25,rotation:40}),n("rmgrainline"),n("rmahd"),n("rmavd"),t.frontPocketType){case"standard":e.frontFacingLeftEdge=i.frontPocketOpeningFacing.edge("left"),e.frontFacingBottomEdge=i.frontPocketOpeningFacing.edge("bottom"),li(r,[["h","frontFacingLeftEdge","fpof1","frontPocketTopLeft",-35]]),li(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=i.frontPocketFacing.edge("left"),e.frontFacingRightEdge=i.frontPocketFacing.edge("right"),e.frontFacingTopEdge=i.frontPocketFacing.edge("top"),e.frontFacingBottomEdge=i.frontPocketFacing.edge("bottom"),li(r,[["h","fpL","fpR","frontFacingTopEdge",-15],["h","frontFacingLeftEdge","frontFacingRightEdge","frontFacingTopEdge",-25],["v","fpB","fpT","frontFacingRightEdge",15],["v","frontFacingBottomEdge","frontFacingTopEdge","frontFacingRightEdge",25]]);break;case"square":li(r,[["h","fpof0","frontPocketOpeningSideSeamCp","fpof0",-25],["h","fpof0","frontPocketTopMiddle","fpof0",-15],["v","fpof1","fpB","fpof1",15],["v","fpof1","fpof0","fpof0",-15]])}return r}},ba={name:"crux.frontpocketcargo",after:[ua],options:{},draft:({options:t,Point:e,points:o,Path:i,paths:a,sa:s,store:n,measurements:r,macro:l,part:c})=>{if(!t.frontPocketCargo)return c.hide();const p=n.get("frontPocketSeamCargoLength"),h=r.waistToFloor*t.frontPocketCargoWidth;o.top=new e(0,0),o.topLeft=o.top.shift(270,2*h).shift(180,.5*h),o.topRight=o.top.shift(270,2*h).shift(0,.5*h),o.topCpDownLeft=o.top.shift(270,.5*h).shift(180,.5*h),o.topCpDownRight=o.top.shift(270,.5*h).shift(0,.5*h),o.bottom=o.top.shift(270,p);let d=0;do{o.bottom=o.bottom.shift(90,d),o.bottomLeft=o.bottom.shift(90,2*h).shift(180,.5*h),o.bottomCpUpLeft=o.bottom.shift(90,.5*h).shift(180,.5*h),a.left=(new i).move(o.top).curve(o.top,o.topCpDownLeft,o.topLeft).line(o.bottomLeft).curve(o.bottomCpUpLeft,o.bottom,o.bottom),d=a.left.length()-p}while(d>.1||d<-.1);return o.bottomRight=o.bottom.shift(90,2*h).shift(0,.5*h),o.bottomCpUpRight=o.bottom.shift(90,.5*h).shift(0,.5*h),a.right=(new i).move(o.bottom).curve(o.bottom,o.bottomCpUpRight,o.bottomRight).line(o.topRight).curve(o.topCpDownRight,o.top,o.top),a.seam=a.left.join(a.right).close(),n.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"}}),s&&(a.sa=a.seam.offset(s).attr("class","fabric sa")),li(c,[["h","topLeft","topRight","top",-15],["v","bottom","top","topRight",15]]),c}};function ka(t,e,o,i,a,s){const{Path:n,points:r,paths:l,log:c}=t.shorthand();let p=0,h=0;do{r[e+"Cp"]=r[e].shift(a,s),l[e]=(new n).move(r[o]).curve(r[o],r[e+"Cp"],r[e]).hide(),h=i-l[e].length(),s+=.7*h,r[e]=r[e].shift(a+180,.3*h),p++}while(p<100&&(h>.1||h<-.1));p>=100&&c.error('Could not find a point for "gussetTopRight" within 100 iterations')}const wa={name:"crux.gusset",from:sa,draft:({options:t,Path:e,points:o,paths:i,Snippet:a,snippets:s,sa:n,store:r,measurements:l,complete:c,macro:p,part:h})=>{const d=o.gussetFrontLeg.x-o.gussetBackLeg.x,f=o.gussetFrontLeg.y-o.gussetBackLeg.y;o.gussetBackToP3cp=i.gussetCrotchBack.ops[1].cp1,o.gussetP3ToBackcp=i.gussetCrotchBack.ops[1].cp2,o.gussetP3ToBackLeg=i.gussetLegBack.ops[1].cp1,o.gussetBackLegToP3=i.gussetLegBack.ops[1].cp2,i.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(),i.gussetF1=(new e).move(o.gussetFrontLeg).curve(o.gussetFrontLeg,o.gussetFrontCp,o.gussetFront).join(i.gussetCrotchFront).join(i.gussetLegFront).close().addClass("various").hide(),p("mirror",{clone:!1,mirror:[o.gussetBackLeg,o.p3],points:["gussetBackCp","gussetBack","gussetBackToP3cp","gussetP3ToBackcp","gussetP3ToBackLeg","gussetBackLegToP3"]}),i.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:d,y:f,clone:!1,points:["p3","gussetBackCp","gussetBack","gussetBackLeg","gussetBackToP3cp","gussetP3ToBackcp","gussetP3ToBackLeg","gussetBackLegToP3"]}),i.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 m=(i.gussetCrotchFront.length()+i.gussetCrotchBack.length())*t.gussetExtraSpace,u=o.pR.shiftTowards(o.gussetFront,-1*m);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=i.gussetFront.length(),b=i.gussetBack.length();let k=o.gussetRight.dist(o.gussetFrontCp),w=o.gussetLeft.dist(o.gussetBackCp),C=o.gussetRight.angle(o.gussetLeft)+90;ka(h,"gussetRight","gussetBottom",g,C,k),C=o.gussetRight.angle(o.gussetLeft)+90,ka(h,"gussetLeft","gussetBottom",b,C,w),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"]}),i.mirroredGussetRight=i.mirroredGussetRight.reverse().hide(),i.mirroredGussetLeft=i.mirroredGussetLeft.reverse().hide(),i.seam=(new e).move(o.gussetBottom).join(i.gussetRight).join(i.mirroredGussetRight).join(i.mirroredGussetLeft.reverse()).join(i.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),i.gussetLeft=i.gussetLeft.reverse(),i.mirroredGussetLeft=i.mirroredGussetLeft.reverse(),c&&(i.gussetRight.addText("front","center"),i.mirroredGussetRight.addText("front","center").unhide(),i.gussetLeft.addText("back","center"),i.mirroredGussetLeft.addText("back","center").unhide()),s.right=new a("notch",o.gussetRight),s.left=new a("notch",o.gussetLeft),s.top=new a("notch",o.mirroredGussetBottom),s.bottom=new a("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}),n&&(i.sa=i.seam.offset(n).attr("class","fabric sa"),i.sa=(new e).move(o.gussetBottom.shiftOutwards(o.mirroredGussetBottom,2*n)).join(i.mirroredGussetLeft.offset(n)).join(i.gussetLeft.offset(n)).line(o.mirroredGussetBottom.shiftOutwards(o.gussetBottom,2*n)).join(i.gussetRight.offset(n)).join(i.mirroredGussetRight.offset(n)).close().attr("class","fabric sa")),li(h,[["h","gussetLeft","mirroredGussetBottom","mirroredGussetBottom",-15],["h","mirroredGussetBottom","gussetRight","mirroredGussetBottom",-15],["v","gussetBottom","gussetRight","gussetRight",15],["v","gussetRight","mirroredGussetBottom","gussetRight",15]]),h}},Ca={name:"crux.waistband",after:[ma,la],draft:({options:t,Path:e,Point:o,points:i,paths:a,Snippet:s,snippets:n,sa:r,expand:l,units:c,store:p,measurements:h,macro:d,part:f})=>{const m=p.get("waistLengthBack"),u=p.get("waistLengthFront"),g=p.get("flyWidth"),b=m+u+.5*g+.5*r,k=h.waistToFloor*t.waistBandWidth,w=Math.max(g,k);if(!l)return p.flag.note({msg:"devon:cutWaistband",replace:{width:c(2*k),length:c("ribknit"===t.waistbandType?w+g:2*b)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),p.flag.preset("expand"),f.hide();switch(i.topLeft=new o(0,0),t.waistbandType){case"standard":case"elastic":i.topMiddle=new o(k,0),i.topRight=new o(2*k,0),i.bottomLeft=i.topLeft.shift(270,b),i.bottomMiddle=i.topMiddle.shift(270,b),i.bottomRight=i.topRight.shift(270,b),i.flyMiddle=i.topMiddle.shift(270,g+r),i.flyRight=i.topRight.shift(270,g+r),i.sideLeft=i.topLeft.shift(270,u),n.sideLeft=new s("notch",i.sideLeft),i.backLeft=i.topLeft.shift(270,u+m),n.backLeft=new s("notch",i.backLeft),i.sideRight=i.topRight.shift(270,u+g+r),n.sideRight=new s("notch",i.sideRight),i.logo=i.topMiddle.shiftFractionTowards(i.bottomMiddle,.3),n.logo=new s("logo",i.logo),d("cutonfold",{from:i.bottomLeft,to:i.bottomRight});break;case"ribknit":i.topMiddle=new o(k,0),i.topRight=new o(2*k,0),i.bottomLeft=i.topLeft.shift(270,w+g
1+r),i.bottomMiddle=i.topMiddle.shift(270,w+g+r),i.bottomRight=i.topRight.shift(270,w+g+r),i.flyMiddle=i.topMiddle.shift(270,g+r),i.flyRight=i.topLeft.shift(270,g+r)}return a.seamSA=(new e).move(i.bottomRight).line(i.topRight).line(i.topLeft).line(i.bottomLeft),a.seam=a.seamSA.clone().line(i.bottomRight).close().attr("class","fabric"),a.fold=(new e).move(i.topMiddle).line(i.bottomMiddle).attr("class","fabric dashed").setText("fold","text-s center"),a.fly=(new e).move(i.flyMiddle).line(i.flyRight).attr("class","fabric dashed"),i.gridAnchor=i.topMiddle.clone(),p.cutlist.addCut({cut:1,from:"fabric",onFold:"ribknit"!==t.waistbandType}),n.flyRight=new s("notch",i.flyRight),i.title=i.topMiddle.shiftFractionTowards(i.topLeft,.7).shiftFractionTowards(i.bottomMiddle,.5),d("title",{nr:10,at:i.title,title:"waistband",align:"center",rotation:90,scale:.4}),r&&(a.sa=(new e).move(i.bottomRight).join(a.seamSA.offset(r)).line(i.bottomLeft).attr("class","fabric sa")),d("rmahd"),d("rmavd"),li(f,[["h","topLeft","topRight","topRight",-15]]),"ribknit"===t.waistbandType?li(f,[["v","bottomRight","topRight","topRight",15],["v","bottomLeft","flyRight","topLeft",-15]]):li(f,[["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]]),f}},va={name:"crux.waistbanda",after:Ca,draft:({options:t,Path:e,Point:o,points:i,paths:a,sa:s,store:n,expand:r,units:l,measurements:c,macro:p,part:h})=>{if("ribknit"!==t.waistbandType)return h.hide();const d=n.get("flyWidth"),f=c.waistToFloor*t.waistBandWidth,m=Math.max(d,f);return r?(i.topLeft=new o(0,0),i.topMiddle=new o(f,0),i.topRight=new o(2*f,0),i.bottomLeft=i.topLeft.shift(270,m),i.bottomMiddle=i.topMiddle.shift(270,m),i.bottomRight=i.topRight.shift(270,m),a.seam=(new e).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).line(i.topLeft).close().attr("class","fabric"),a.fold=(new e).move(i.topMiddle).line(i.bottomMiddle).attr("class","fabric dashed").setText("fold","text-s center"),i.gridAnchor=i.topMiddle.clone(),n.cutlist.addCut({cut:1,from:"fabric"}),i.title=i.topMiddle.shiftFractionTowards(i.topLeft,.7).shiftFractionTowards(i.bottomMiddle,.5),p("title",{nr:"10a",at:i.title,title:"waistbanda",align:"center",rotation:90,scale:.35}),s&&(a.sa=a.seam.offset(s).attr("class","fabric sa")),li(h,[["h","topLeft","topRight","topRight",-15],["v","bottomRight","topRight","topRight",15]]),h):(n.flag.note({msg:"devon:cutWaistbanda",replace:{width:l(2*f),length:l(m)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),n.flag.preset("expand"),h.hide())}},Ta={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.square":{"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"}}}')},ya=new s.pT({data:ri,parts:[ma,la,wa,sa,da,fa,ua,ba,ga,na,ca,ha,pa,Ca,va]}),xa={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."}}}')},Ba=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}'),Sa={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"}}}')},La=.995,Pa=1,Ra=.9,Fa=0,Wa=1e-6,Ha=1,Aa={pct:0,min:-5,max:20,...(0,s.Wx)("bustSpan"),menu:"fit"},Oa={deg:2.5,min:0,max:5,menu:"advanced"},Da={pct:90,min:80,max:95,menu:"darts"},Ea={dflt:"shoulder",list:["shoulder","armhole"],menu:"darts"},Ia={pct:0,min:-100,max:100,menu:"darts"},Na={pct:0,min:-5,max:2.5,menu:(t,e)=>"shoulder"===e.dartPosition&&"darts"},Ma={pct:50,min:10,max:90,menu:(t,e)=>"shoulder"===e.dartPosition&&"darts"},_a={pct:50,min:10,max:90,menu:(t,e)=>"armhole"===e.dartPosition&&"darts"},ja={bool:!0,menu:(t,e)=>"armhole"===e.dartPosition&&"darts"},Ga={pct:20,min:-20,max:90,menu:(t,e)=>"armhole"===e.dartPosition&&(!e.armholeDartCurved&&"darts")},Ya={pct:70,min:10,max:90,menu:(t,e)=>"armhole"===e.dartPosition&&(!e.armholeDartCurved&&"darts")},Ua={name:"noble.backPoints",from:at,hide:s.V9.HIDE_ALL,options:a,draft:({points:t,Path:e,paths:o,options:i,snippets:a,log:s,part:n})=>{for(const p of Object.keys(o))o[p].hide();for(const p in a)delete a[p];if(delete t.bustDartLeft,delete t.bustDartLeftCp,"shoulder"==i.dartPosition)t.
1shoulderDart=t.hps.shiftFractionTowards(t.shoulder,i.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(i.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"==i.dartPosition?50:400);if("shoulder"==i.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 i=0,a=0,n=0;do{o.o&&(n=a/(o.i/1300)*(o.o>o.i?-.1:.1)),t.dartBottomRight=t.dartBottomRight.rotate(n,t.waistSide),o.o=(new e).move(t.shoulderDart).curve(t.shoulderDart,t.shoulderDartCpUp,t.dartTip).curve(t.shoulderDartCpDown,t.dartRightCp,t.dartBottomRight).length(),a=o.o-o.i,i++}while(a<-.5||a>.5&&i<100);i>=100&&s.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 i=0,a=0,n=0;do{o.o&&(n=a/(o.i/1300)*(o.o>o.i?-.1:.1)),t.dartBottomRight=t.dartBottomRight.rotate(n,t.waistSide),o.o=(new e).move(t.shoulderDart).curve(t.shoulderDart,t.shoulderDartCpUp,t.dartTip).curve(t.shoulderDartCpDown,t.dartRightCp,t.dartBottomRight).length(),a=o.o-o.i,i++}while(a<-.5||a>.5&&i<100);i>=100&&s.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),n}},za={name:"noble.backInside",from:Ua,draft:({sa:t,Point:e,points:o,Path:i,paths:a,Snippet:s,snippets:n,options:r,macro:l,store:c,part:p})=>{for(let h of Object.keys(a))a[h].hide();for(let h in n)delete n[h];return a.princess=(new i).move(o.dartBottomLeft).curve(o.dartLeftCp,o.shoulderDartCpDown,o.dartTip).curve(o.shoulderDartCpUp,o.shoulderDart,o.shoulderDart),"shoulder"===r.dartPosition?a.armhole=(new i).move(o.shoulderDart):a.armhole=a.armhole.split(o.shoulderDart)[1],a.insideSeam=(new i).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(a.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}),n.dartTip=new s("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&&(a.sa=a.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}},Ja={name:"noble.backOutside",from:Ua,draft:({sa:t,Point:e,points:o,Path:i,paths:a,Snippet:s,snippets:n,options:r,macro:l,store:c,part:p})=>{a.dart=(new i).move(o.shoulderDart).curve(o.shoulderDart,o.shoulderDartCpUp,o.dartTip).curve(o.shoulderDartCpDown,o.dartRightCp,o.dartBottomRight).hide(),"shoulder"!==r.dartPosition&&(a.armhole=a.armhole.split(o.shoulderDart)[0]),a.outsideSeam=(new i).move(o.dartBottomRight).line(o.waistSide).curve_(o.waistSideCp2,o.armhole).join(a.armhole).line(o.shoulderDart).join(a.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}),n.dartTip=new s("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&&(a.sa=a.outsideSeam.offset(t).attr("class","fabric sa"));let h=a.dart.edge("left");return l("hd",{from:h,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:h,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:h,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}},$a=(t,e,o,i,a,n)=>{const r=t.waistDartRight.dist(t.sideHemInitial);t.waistDartRight=t.waistDartRight.rotate(a.rad2deg(Math.atan(i/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*s.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 i=(new e).move(t.waistUpDartRight).curve(t.waistUpDartRightCpUp,t.shoulderDartTipCpDownOutside,t.shoulderDartOutside),a=i.shiftFractionAlong(.15+-1*o.shoulderDartCurvature),s=i.shiftFractionAlong(.5+-1*o.shoulderDartCurvature),n=i.shiftFractionAlong(.9+-.5*o.shoulderDartCurvature),r=i.split(a),l=r[1].split(s),c=l[1].split(n),p=r[0].clone(),h=l[0].clone(),d=c[0].clone(),f=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=h.ops[0].to.copy(),t.shoulderDartPart2cp1=h.ops[1].cp1.copy(),t.shoulderDartPart2cp2=h.ops[1].cp2.copy(),t.shoulderDartPart2to=h.ops[1].to.copy(),t.shoulderDartPart3from=d.ops[0].to.copy(),t.shoulderDartPart3cp1=d.ops[1].cp1.copy(),t.shoulderDartPart3cp2=d.ops[1].cp2.copy(),t.shoulderDartPart3to=d.ops[1].to.copy(),t.shoulderDartPart4from=f.ops[0].to.copy(),t.shoulderDartPart4cp1=f.ops[1].cp1.copy(),t.shoulderDartPart4cp2=f.ops[1].cp2.copy(),t.shoulderDartPart4to=f.ops[1].to.copy();const m=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(m,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,n)).reverse().hide(),o.princessSeam.length()},Xa=(t,e,o,i)=>{const a=t.armholeDartTipInside.dist(t.armholeDartTipCpDownInside);t.waistCircleOutsideCp1=t.waistCircleOutsideCp1.shiftTowards(t.waistUpDartRight,i),t.armholeDartTipCpDownInside=t.waistCircleInsideCp1.shiftOutwards(t.armholeDartTipInside,a),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()},Qa={name:"noble.frontPoints",from:st,hide:s.V9.HIDE_ALL,options:a,draft:({log:t,points:e,Path:o,paths:i,snippets:a,options:n,macro:r,part:l,utils:c})=>{for(const s of Object.keys(i))i[s].hide();for(const s in a)delete a[s];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"==n.dartPosition?.5:n.armholeDartPosition),e.armholeDartOutside=e.armholeDartInside.clone();const h=p.split(e.armholeDartInside),d=h[0].clone().hide(),f=h[1].clone().hide();e.armholeInsidePitch=d.ops[1].to.clone(),e.armholeInsidePitchCp2=d.ops[1].cp2.clone(),e.shoulderCp1=d.ops[1].cp1.clone(),2==d.ops.length?(e.armholeInsidePitchCp1=e.armholeDartInside.clone(),e.armholeDartInsideCp2=e.armholeDartInside.clone()):(e.armholeInsidePitchCp1=d.ops[2].cp1.clone(),e.armholeDartInsideCp2=d.ops[2].cp2.clone()),e.armholeDartOutsideCp1=f.o
1ps[1].cp1.clone(),e.armholeOutsidePitch=f.ops[1].to.clone(),e.armholeOutsidePitchCp2=f.ops[1].cp2.clone(),2==f.ops.length?(e.armholeOutsidePitchCp1=f.ops[1].cp1.clone(),e.armholeCp2=f.ops[1].cp2.clone()):(e.armholeOutsidePitchCp1=f.ops[2].cp1.clone(),e.armholeCp2=f.ops[2].cp2.clone()),e.armholeDartInside.sitsRoughlyOn(e.armholeInsidePitch)?i.armholeInside=(new o).move(e.armholeDartInside).curve(e.armholeInsidePitchCp2,e.shoulderCp1,e.shoulder).hide():i.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,n.upperDartLength);const m=e.waistDartLeft.dist(e.waistDartRight)/2*n.waistdartposition;if(e.waistDartLeft=e.waistDartLeft.shiftTowards(e.cfHem,-1*m),e.waistDartLeftCp=e.waistDartLeftCp.shift(270,2*m),e.waistDartRight=e.waistDartRight.shiftTowards(e.sideHemInitial,m),e.shoulderDartInside=e.hps.shiftFractionTowards(e.shoulder,"shoulder"==n.dartPosition?n.shoulderDartPosition:.5),n.armholeDartCurved){const t=d.reverse().shiftAlong(1).angle(f.shiftAlong(1))-90;e.armholeCircleInsideCp1=e.armholeDartInside.shift(t,s.Qr*e.armholeDartInside.dist(e.armholeDartTip)),e.armholeCircleOutsideCp1=e.armholeCircleInsideCp1.clone()}else e.aboveBustPointInside=e.bust.shiftFractionTowards(e.waistDartLeft,-1*n.armholeDartCurvePoint),e.armholeToBustInside=e.armholeDartInside.shiftFractionTowards(e.aboveBustPointInside,n.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,n.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-n.upperDartLength+(1-n.waistDartLength)*b),e.shoulderDartTipCpDownOutside=e.shoulderDartOutside.shiftFractionTowards(e.bust,1-n.upperDartLength+1+(1-n.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),n.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)?i.armholeOutside=(new o).move(e.armholeDartOutside).curve(e.armholeDartOutsideCp1,e.armholeOutsidePitchCp2,e.armhole).hide():i.armholeOutside=(new o).move(e.armholeDartOutside).curve(e.armholeDartOutsideCp1,e.armholeOutsidePitchCp2,e.armholeOutsidePitch).curve(e.armholeOutsidePitchCp1,e.armholeCp2,e.armhole).hide(),i.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-n.upperDartLength+1+(1-n.waistDartLength)*b),e.bustAcp=e.waistDartRight.shiftOutwards(e.bustA,10),i.shoulderInsideSeam=(new o).move(e.waistDartLeft).curve(e.waistDartLeftCp,e.shoulderDartTipCpDownInside,e.shoulderDartTip).line(e.shoulderDartInside).hide(),i.armholeInsideSeam=(new o).move(e.waistDartLeft).curve(e.waistDartLeftCp,e.armholeDartTipCpDownInside,e.armholeDartTip).hide(),i.sOutsideSeam=(new o).move(e.waistDartRight).curve(e.bustAcp,e.shoulderDartTipCpDownOutside,e.shoulderDartOutside).hide(),e.waistDartRightCp=e.bustAcp.clone();const k=(new o).move(e.waistDartLeft).curve(e.waistDartLeftCp,e.shoulderDartTipCpDownInside,e.shoulderDartTip).line(e.shoulderDartInside).hide();if(n.armholeDartCurved){e.waistUpDartLeft=i.armholeInsideSeam.shiftAlong(.5*e.waistDartLeft.dist(e.armholeDartTip)),e.waistCircleInsideCp1=e.waistUpDartLeft.shiftTowards(e.waistDartLeft,-.5*s.Qr*e.armholeDartOutside.dist(e.armholeDartTip)),e.shoulderDartTipCpDownOutside=e.shoulderDartTipCpDownOutside.rotate(2.5,e.shoulderDartOutside).shiftFractionTowards(e.shoulderDartOutside,.2);let a=1,r=0,l=$a(e,o,i,r,c,n);do{l=$a(e,o,i,r,c,n),r=k.length()-l,a++}while((r>1||r<-1)&&a<100);a>=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*s.Qr*e.armholeDartOutside.dist(e.armholeDartTip)),Xa(e,i,o,0),r=i.armholeTempCircleOutside.length()-i.armholeTempCircleInside.length(),a=0;do{Xa(e,i,o,r),r=i.armholeTempCircleOutside.length()-i.armholeTempCircleInside.length(),a++}while((r<-1||r>1)&&a<100);a>=100&&t.error("Something is not quite right here too!")}else{let a=1,r=0,l=$a(e,o,i,r,c,n);e.waistCircleOutsideCp1=e.waistUpDartRight.shiftTowards(e.waistDartRight,-1*s.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=$a(e,o,i,r,c,n);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(),a++}while((r>1||r<-1)&&a<3);a>=100&&t.error("Something is not quite right here!"),e.waistCircleOutsideCp1=e.waistUpDartRight.shiftTowards(e.waistDartRight,-1*s.Qr*e.armholeDartOutside.dist(e.armholeDartTip))}return l}},Ka={name:"noble.frontInside",from:Qa,draft:({store:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,options:l,macro:c,part:p})=>{delete i.waistDartHem,delete i.waistDartRight,delete i.waistDartRightCp,delete i.waistDartCpBottom,delete i.bustDartBottom,delete i.bustDartCpBottom,delete i.bustDartTip,delete i.bustDartTop,delete i.shoulderDartTipCpDownOutside,delete i.ex,delete i.bustB,delete i.shoulder,delete i.shoulderDartShoulder,delete i.shoulderDartOutside,delete i.pitchMax,delete i.armholeCpTarget,delete i.armholePitch,delete i.armholePitchCp1,delete i.armholePitchCp2,delete i.armhole,delete i.armholeCp2,delete i.bustDartCpTop,delete i.bustSide,delete i.bustDartMiddle,delete i.bustDartEdge,"
1shoulder"===l.dartPosition?(s.insideSeam=(new a).move(i.cfHem).line(i.waistDartLeft).curve(i.waistDartLeftCp,i.shoulderDartTipCpDownInside,i.shoulderDartTip).line(i.shoulderDartInside).line(i.hps).curve(i.hpsCp2,i.cfNeckCp1,i.cfNeck),s.seam=s.insideSeam.join((new a).move(i.cfNeck).line(i.cfHem)).close().attr("class","fabric"),t.set("shoulderDartTipNotch",(new a).move(i.waistDartLeft).curve(i.waistDartLeftCp,i.shoulderDartTipCpDownInside,i.shoulderDartTip).length())):l.armholeDartCurved?(s.insideSeam=(new a).move(i.cfHem).line(i.waistDartLeft).curve(i.waistDartLeftCp,i.armholeDartTipCpDownInside,i.armholeDartTipInside).curve(i.waistCircleInsideCp1,i.armholeCircleInsideCp1,i.armholeDartInside).join(s.armholeInside).line(i.hps).curve(i.hpsCp2,i.cfNeckCp1,i.cfNeck),s.seam=s.insideSeam.join((new a).move(i.cfNeck).line(i.cfHem)).close().attr("class","fabric"),t.set("shoulderDartTipNotch",(new a).move(i.waistDartLeft).curve(i.waistDartLeftCp,i.armholeDartTipCpDownInside,i.armholeDartTipInside).length())):(s.insideSeam=(new a).move(i.cfHem).line(i.waistDartLeft).line(i.waistToBustInside).curve(i.aboveBustPointInside,i.aboveBustPointInside,i.armholeToBustInside).line(i.armholeDartInside).join(s.armholeInside).line(i.hps).curve(i.hpsCp2,i.cfNeckCp1,i.cfNeck),s.seam=s.insideSeam.join((new a).move(i.cfNeck).line(i.cfHem)).close().attr("class","fabric"),t.set("shoulderDartTipNotch",(new a).move(i.waistDartLeft).line(i.waistToBustInside).curve(i.aboveBustPointInside,i.aboveBustPointInside,i.armholeToBustInside).length())),c("cutonfold",{from:i.cfNeck,to:i.cfHem,grainline:!0}),"shoulder"===l.dartPosition?r.shoulderDartTip=new n("notch",i.shoulderDartTip):l.armholeDartCurved?r.shoulderDartTip=new n("notch",i.armholeDartTipInside):r.shoulderDartTip=new n("notch",i.armholeToBustInside),i.titleAnchor=new o(.75*i.hpsCp2.x,1.5*i.cfNeckCp1.y),c("title",{at:i.titleAnchor,nr:1,title:"frontInside"}),i.gridAnchor=i.hps.clone(),i.scaleboxAnchor=i.titleAnchor.shift(-90,90).shift(0,10),c("scalebox",{at:i.scaleboxAnchor,rotate:270}),e&&(s.sa=s.insideSeam.offset(e).line(i.cfNeck).attr("class","fabric sa"),s.sa=s.sa.move(i.cfHem).line(s.sa.start()));let h=0;return"shoulder"===l.dartPosition?(c("hd",{from:i.cfNeck,to:i.shoulderDartInside,y:i.hps.y-25,id:"hpsToDart"}),c("vd",{from:i.cfHem,to:i.shoulderDartInside,x:-30,id:"hemToDart"}),c("vd",{from:i.cfHem,to:i.shoulderDartTip,x:-10,id:"hemToDartTip"}),c("hd",{from:i.cfBust,to:i.shoulderDartTip,y:i.cfHem.y+e+25,id:"middleToDartTip"})):(c("hd",{from:i.cfBust,to:i.armholeDartArmhole,y:i.cfHem.y+e+35,id:"middleToDartArmhole"}),h=10,c("hd",{from:i.hps,to:i.shoulderCp1,y:i.hps.y-35,id:"hpsToShoulder"}),c("hd",{from:i.hps,to:i.armholeDartInsideCp2,y:i.hps.y-25,id:"hpsToDart"}),c("vd",{from:i.cfHem,to:i.armholeDartArmhole,x:-20,id:"hemToDart"}),c("vd",{from:i.cfHem,to:i.shoulderCp1,x:-40,id:"hemToShoulder"}),l.armholeDartCurved&&(c("vd",{from:i.cfHem,to:i.armholeDartTipInside,x:-10,id:"hemToDartTip"}),c("hd",{from:i.cfBust,to:i.armholeDartTipInside,y:i.cfHem.y+e+25,id:"middleToDartTip"}))),c("vd",{from:i.cfHem,to:i.cfNeck,x:-20-h,id:"hemToNeck"}),c("vd",{from:i.cfHem,to:i.hps,x:-40-h,id:"hemToHps"}),c("hd",{from:i.cfHem,to:i.waistDartLeft,y:i.cfHem.y+e+15,id:"middleToDart"}),c("hd",{from:i.cfNeck,to:i.hps,y:i.hps.y-e-15,id:"middleToHps"}),p}},Va={name:"noble.frontOutside",from:Qa,after:Ka,draft:({store:t,sa:e,points:o,Path:i,paths:a,Snippet:s,snippets:n,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?(a.armhole=(new i).move(o.armhole).curve(o.armholeCp2,o.armholePitchCp1,o.armholePitch).curve_(o.armholePitchCp2,o.shoulder).hide(),a.seam=(new i).move(o.waistDartRight).line(o.sideHem).line(o.armhole).join(a.armhole).line(o.shoulderDartOutside).join(a.princessSeam).close().attr("class","fabric")):r.armholeDartCurved?(a.princessSeam=(new i).move(o.armholeDartOutside).curve(o.armholeCircleOutsideCp1,o.waistCircleOutsideCp1,o.waistUpDartRight).curve(o.waistUpDartRightCpDown,o.waistCpUp,o.waistDartRight).hide(),a.seam=(new i).move(o.waistDartRight).line(o.sideHem).line(o.armhole).join(a.armholeOutside.reverse()).join(a.princessSeam).close().attr("class","fabric")):(a.princessSeam=(new i).move(o.armholeDartOutside).line(o.armholeToBustOutside).curve(o.aboveBustPointOutside,o.waistCircleOutsideCp1,o.waistUpDartRight).curve(o.waistUpDartRightCpDown,o.waistCpUp,o.waistDartRight).hide(),a.seam=(new i).move(o.waistDartRight).line(o.sideHem).line(o.armhole).join(a.armholeOutside.reverse()).join(a.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=a.princessSeam.shiftAlong(a.princessSeam.length()-t.get("shoulderDartTipNotch")),n.shoulderDartTip=new s("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&&(a.sa=a.seam.offset(e).attr("class","fabric sa"));let p=a.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=a.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=a.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}},qa=new s.pT({data:Ba,parts:[Ua,za,Ja,Qa,Ka,Va]}),Za=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}'),ts={name:"devon.base",from:E,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:i,macro:a,part:s})=>{for(const n in o)delete o[n];a("rmtitle"),e.cbYoke=e.cbNeck.shiftFractionTowards(e.cbWaist,t.yokeDrop);for(let n of["Shoulder","Armhole","Chest","Waist","Hips","Hem","Yoke"])e[`cf${n}`]=new i(e[`cb${n}`].x,e[`cb${n}`].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)),s}},es={name:"devon.back",from:ts,hide:{self:!0,from:!0,inherited:!0},options:{backYokePanelWidth:.66,backHemPanelWidth:.33},draft:({measurements:t,options:e,store:o,points:i,Path:a,paths:s,utils:n,part:r})=>{let l=Math.max(t.hips/2,t.waistBack)/2;l*=1+e.hemEase,i.hemBackOriginal=i.hem.copy(),i.hemBack=i.hem.copy();let c=n.circlesIntersect(i.cbHem,l,i.armhole,i.armhole.dist(i.hem));return c[0].x>c[1].x?i.hemBack=c[0]:i.hemBack=c[1],e.s3Collar<.1&&e.s3Collar>-.1?(i.s3CollarSplit=i.hps,s.backCollar=(new a).move(i.hps).curve_(i.neckCp2,i.cbNeck).hide()):e.s3Collar>0?(i.s3CollarSplit=n.curveIntersectsY(i.hps,i.mirroredNeckCp2Front,i.mirroredCfNeckCp1,i.mirroredCfNeck,-1*o.get("s3CollarMaxFront")*e.s3Collar),s.backCollarS3=(new a).move(i.hps)._curve(i.mirroredNeckCp2Front,i.mirroredCfNeckCp1,i.mirroredCfNeck).split(i.s3CollarSplit)[0].reverse().hide(),s.backCollar=(new a).move(i.hps).join((new a).move(i.hps).curve_(i.neckCp2,i.cbNeck)).hide(),o.set("sss",s.backCollarS3.length())):e.s3Collar<0&&(i.s3CollarSplit=n.curveIntersectsY(i.hps,i.neckCp2,i.cbNeck,i.cbNeck,-1*o.get("s3CollarMaxBack")*e.s3Collar),s.backCollar=(new a).move(i.cbNeck)._curve(i.neckCp2,i.neck).split(i.s3CollarSplit)[0].reverse().hide()),e.s3Armhole<.1&&e.s3Armhole>-.1?(i.s3ArmholeSplit=i.shoulder,s.backArmhole=(new a).move(i.armholePitch).curve(i.armholePitchCp2,i.shoulderCp1,i.shoulder).hide()):e.s3Armhole>0?(i.s3ArmholeSplit=n.curveIntersectsY(i.shoulder,i.mirroredShoulderCp1,i.mirroredFrontArmholePitchCp2,i.mirroredFrontArmholePitch,-1*o.get("s3ArmholeMax")*e.s3Armhole+i.shoulder.y),s.backArmhole=(new a).move(i.armholePitch).curve(i.armholePitchCp2,i.shoulderCp1,i.shoulder).join((new a).move(i.shoulder).curve(i.mirroredShoulderCp1,i.mirroredFrontArmholePitchCp2,i.mirroredFrontArmholePitch).split(i.s3ArmholeSplit)[0]).hide()):e.s3Armhole<0&&(i.s3ArmholeSplit=n.curveIntersectsY(i.shoulder,i.shoulderCp1,i.armholePitchCp2,i.armholePitch,-1*o.get("s3ArmholeMax")*e.s3Armhole+i.shoulder.y),s.backArmhole=(new a).move(i.armholePitch).curve(i.armholePitchCp2,i.shoulderCp1,i.shoulder).split(i.s3ArmholeSplit)[0].hide()),s.backArmholeComplete=(new a).move(i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.armholePitchCp1,i.armholePitch).join(s.backArmhole).hide(),i.backArmholeYoke=s.backArmholeComplete.intersectsY(i.cbYoke.y)[0],i.backYokePanel=i.cbYoke.shiftFractionTowards(i.backArmholeYoke,e.backYokePanelWidth),i.backHemPanel=i.cbHem.shiftFractionTowards(i.hemBack,e.backHemPanelWidth),o.set("armholeYokeBack",s.backArmholeComplete.split(i.backArmholeYoke)[0].length()),o.set("library.twoPartSleeve.backArmholeLength",s.backArmholeComplete.length()),r}};function os(t,e){let{macro:o,points:i,sa:a}=t.shorthand();e.forEach((t=>{const e=t[0]+t[1]+t[2],s=a*(t[4]>0?1:-1);o(t[0]+"d",{id:e,from:i[t[1]],to:i[t[2]],y:i[t[3]].y+s+t[4],x:i[t[3]].x+s+t[4],d:s+t[4]})}
1))}const is={name:"devon.backPanel",from:es,hide:{self:!1,from:!0,inherited:!0},options:{},draft:({points:t,Path:e,paths:o,macro:i,sa:a,store:s,part:n})=>{i("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(),a&&(o.sa=(new e).move(t.cbHem).join(o.seamBase.offset(a)).line(t.cbYoke).attr("class","fabric sa")),i("cutonfold",{from:t.cbYoke,to:t.cbHem,grainline:!0}),s.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),t.title=t.backYokePanel.shiftFractionTowards(t.cbChest,.6),i("title",{nr:1,title:"backPanel",at:t.title,rotation:90,scale:.75}),os(n,[["h","cbYoke","backYokePanel","cbYoke",-15],["h","cbHem","backHemPanel","cbHem",15],["v","cbHem","cbYoke","cbYoke",-15]]),n}},as={name:"devon.backSide",from:es,hide:{self:!1,from:!0,inherited:!0},options:{backArmholeShift:.02},draft:({points:t,Path:e,paths:o,options:i,macro:a,sa:s,store:n,part:r})=>{a("rmcutonfold");for(const p in o)-1===["backArmholeComplete"].indexOf(p)&&delete o[p];const l=i.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(i.waistAdjustment?t.hemBack:t.hemBackOriginal).join(o.backYokeArmhole).close().attr("class","fabric"),s&&(o.sa=o.seam.offset(s).attr("class","fabric sa")),n.cutlist.addCut({cut:2,from:"fabric",onFold:!1}),t.title=t.backYokePanel.shiftFractionTowards(t.hem,.3),a("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.y),a("grainline",{from:t.bsGrainFrom,to:t.bsGrainTo}),os(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]]),i.waistAdjustment?os(r,[["h","backHemPanel","hemBack","backHemPanel",15],["h","hemBack","backYokeArmhole","hemBack",15]]):os(r,[["h","backHemPanel","hemBackOriginal","backHemPanel",15],["h","hemBackOriginal","backYokeArmhole","hemBackOriginal",15]]),n.set("hemBackLength",t.cbHem.dist(i.waistAdjustment?t.hemBack:t.hemBackOriginal)),r}},ss={name:"devon.backYoke",from:es,hide:{self:!1,from:!0,inherited:!0},options:{},draft:({points:t,Path:e,paths:o,macro:i,sa:a,store:s,part:n})=>{i("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(),a&&(o.sa=(new e).move(t.cbYoke).join(o.seamBase.offset(a)).line(t.cbNeck).attr("class","fabric sa")),i("cutonfold",{from:t.cbNeck,to:t.cbYoke,grainline:!0}),s.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),t.title=t.backArmholeYoke.shiftFractionTowards(t.cbNeck,.7).shiftFractionTowards(t.cbYoke,.2),i("title",{nr:3,title:"backYoke",at:t.title}),os(n,[["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]]),n}},ns={name:"devon.front",from:es,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:i,points:a,Path:s,paths:n,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 h=Math.max(t.hips/2,t.waistFront)/2;h*=1+e.hemEase,a.hemOriginal=a.hem.copy();let d=r.circlesIntersect(a.cfHem,h,a.armhole,a.armhole.dist(a.hem));d[0].x>d[1].x?a.hem=d[0]:a.hem=d[1],e.s3Collar<.1&&e.s3Collar>-.1?(a.s3CollarSplit=a.hps,n.frontCollar=(new s).move(a.hps).curve(a.neckCp2Front,a.cfNeckCp1,a.cfNeck).hide()):e.s3Collar>0?(a.s3CollarSplit=r.curveIntersectsY(a.hps,a.neckCp2Front,a.cfNeckCp1,a.cfNeck,o.get("s3CollarMaxFront")*e.s3Collar),n.frontCollar=(new s).move(a.hps).curve(a.neckCp2Front,a.cfNeckCp1,a.cfNeck).split(a.s3CollarSplit)[1].hide()):e.s3Collar<0&&(a.s3CollarSplit=r.curveIntersectsY(a.mirroredCbNeck,a.mirroredCbNeck,a.mirroredNeckCp2,a.hps,o.get("s3CollarMaxBack")*e.s3Collar),n.frontCollar=(new s).move(a.hps).curve_(a.mirroredNeckCp2,a.mirroredCbNeck).split(a.s3CollarSplit)[0].reverse().join((new s).move(a.hps).curve(a.neckCp2Front,a.cfNeckCp1,a.cfNeck)).hide()),e.s3Armhole<.1&&e.s3Armhole>-.1?(a.s3ArmholeSplit=a.shoulder,n.frontArmhole=(new s).move(a.armholePitch).curve(a.armholePitchCp2,a.shoulderCp1,a.shoulder).hide()):e.s3Armhole>0?(a.s3ArmholeSplit=r.curveIntersectsY(a.shoulder,a.shoulderCp1,a.armholePitchCp2,a.armholePitch,o.get("s3ArmholeMax")*e.s3Armhole+a.shoulder.y),n.frontArmhole=(new s).move(a.armholePitch).curve(a.armholePitchCp2,a.shoulderCp1,a.shoulder).split(a.s3ArmholeSplit)[0].hide()):e.s3Armhole<0&&(a.s3ArmholeSplit=r.curveIntersectsY(a.shoulder,a.mirroredShoulderCp1,a.mirroredFrontArmholePitchCp2,a.mirroredFrontArmholePitch,o.get("s3ArmholeMax")*e.s3Armhole+a.shoulder.y),n.frontArmhole=(new s).move(a.armholePitch).curve(a.armholePitchCp2,a.shoulderCp1,a.shoulder).join((new s).move(a.shoulder).curve(a.mirroredShoulderCp1,a.mirroredFrontArmholePitchCp2,a.mirroredFrontArmholePitch).split(a.s3ArmholeSplit)[0]).hide()),n.saBase=(new s).move(a.cfHem).line(e.waistAdjustment?a.hem:a.hemOriginal).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 s).move(a.cfNeck).line(a.cfHem).join(n.saBase).attr("class","fabric"),n.frontArmholeComplete=(new s).move(a.armhole).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.armholePitchCp1,a.armholePitch).join(n.frontArmhole).hide(),o.set("library.twoPartSleeve.frontArmholeLength",n.frontArmholeComplete.length()),a.frontArmholeYoke=n.frontArmholeComplete.intersectsY(a.cfYoke.y)[0];a.cfYoke.dist(a.frontArmholeYoke);a.frontYokePanel=a.cfYoke.shiftFractionTowards(a.frontArmholeYoke,e.frontYokePanelWidth),a.frontYokeSidePanel=a.frontArmholeYoke.shiftFractionTowards(a.cfYoke,e.frontYokeSidePanelWidth);const f=a.frontYokePanel.dist(a.frontYokeSidePanel);a.frontYokePanelMiddle=a.frontYokePanel.shiftFractionTowards(a.frontYokeSidePanel,.5),a.frontHemPanelMiddle=new i(a.frontYokePanelMiddle.x,a.cfHem.y),a.frontHemPanel=a.frontHemPanelMiddle.shiftTowards(a.cfHem,e.frontHemPanelWidthRatio*(.5*f)),a.frontHemSidePanel=a.frontHemPanelMiddle.shiftTowards(a.cfHem,e.frontHemPanelWidthRatio*(-.5*f)),n.frontTempYoke=(new s).move(a.cfYoke).line(a.frontArmholeYoke),n.frontPanel=(new s).move(a.frontYokePanel).line(a.frontHemPanel),n.frontSidePanel=(new s).move(a.frontYokeSidePanel).line(a.frontHemSidePanel),a.frontBustPanel=r.beamIntersectsY(a.frontYokeSidePanel,a.frontHemSidePanel,a.cfChest.y);let m=r.circlesIntersect(a.frontBustPanel,p,a.shoulder,a.shoulder.dist(a.frontBustPanel));m[0].x>m[1].x?a.bustFBA=m[0]:a.bustFBA=m[1],o.set("frontSidePanelUpshift",a.bustFBA.y-a.frontBustPanel.y),n.frontSidePanelArmhole=n.frontArmholeComplete.split(a.frontArmholeYoke)[0].attr("class","note"),a.frontSideBust=r.beamIntersectsY(a.armhole,a.hem,a.frontBustPanel.y),m=r.circlesIntersect(a.frontBustPanel,p,a.frontArmholeYoke,a.frontArmholeYoke.dist(a.frontBustPanel)),m[0].x>m[1].x?a.bustFBA2=m[0].copy():a.bustFBA2=m[1].copy();let u=a.frontArmholeYoke.angle(a.bustFBA2)-a.frontArmholeYoke.angle(a.frontBustPanel);const g=["frontArmholeYoke","frontYokeSidePanel","frontBustPanel","frontSideBust","armhole"];for(let y of g)a["step1"+y]=a[y].rotate(u,a.frontArmholeYoke);let b=a.bustFBA2.x-a.frontBustPanel.x,k=a.bustFBA2.y-a.frontBustPanel.y;if(a.step1frontHemSidePanel=a.frontHemSidePanel.translate(b,k),a.step1hem=a.hem.translate(b,k),a.step1frontSideBust2=a.frontSideBust.translate(b,k),a.step1frontSidePanelBustPoint1=r.beam
1sIntersect(a.bustFBA2,a.step1frontSideBust,a.frontYokeSidePanel,a.frontHemSidePanel),a.step1frontSidePanelBustPoint2=r.beamsIntersect(a.bustFBA2,a.step1frontSideBust2,a.frontYokeSidePanel,a.frontHemSidePanel),a.step2hem=a.step1armhole.shiftOutwards(a.step1frontSideBust,a.step1frontSideBust2.dist(a.step1hem)),a.step2frontHemSidePanel=a.step1frontSidePanelBustPoint1.shiftTowards(a.frontHemSidePanel,a.frontBustPanel.dist(a.frontHemSidePanel)).translate(b,k).rotate(u,a.step1frontSidePanelBustPoint1),a.step1frontYokeSidePanel.dist(a.step1frontSidePanelBustPoint1)+a.step1frontSidePanelBustPoint1.dist(a.step2frontHemSidePanel)-a.frontYokeSidePanel.dist(a.frontHemSidePanel)>9){o.set("useFBA",!0),o.set("sidePanelLength",a.step1frontYokeSidePanel.dist(a.step1frontSidePanelBustPoint1)+a.step1frontSidePanelBustPoint1.dist(a.step2frontHemSidePanel));let t=a.frontYokeSidePanel.shiftTowards(a.frontHemSidePanel,o.get("sidePanelLength")).y,e=a.frontHemPanel.copy(),i=a.cfHem.copy();e.y=t,i.y=t,o.set("panelLength",a.frontYokePanel.dist(e)),o.set("frontLength",a.cfYoke.dist(i))}else o.set("useFBA",!1),o.set("sidePanelLength",a.frontYokeSidePanel.dist(a.frontHemSidePanel)),o.set("panelLength",a.frontYokePanel.dist(a.frontHemPanel)),o.set("frontLength",a.cfYoke.dist(a.cfHem));if(o.get("useFBA")){const t=["frontArmholeYoke","frontYokeSidePanel","frontBustPanel","frontSideBust","armhole","frontSidePanelBustPoint1","frontSidePanelBustPoint2"];for(let o of t)a[o]=a["step1"+o].rotate(-1*u,a.frontArmholeYoke);const e=["hem","frontHemSidePanel"];for(let o of e)a[o]=a["step2"+o].rotate(-1*u,a.frontArmholeYoke)}a.frontHemSidePanelSaved=a.frontHemSidePanel,a.frontHemPanel=a.frontYokePanel.shiftTowards(a.frontHemPanel,o.get("panelLength")),a.frontHemSidePanel=a.frontYokeSidePanel.shiftTowards(a.frontHemSidePanel,o.get("sidePanelLength")),a.cfHem=a.cfYoke.shiftTowards(a.cfHem,o.get("frontLength"));const w=a.frontYokePanel.dist(a.frontYokeSidePanel)*e.frontPocketWidthRatio;o.set("pocketWidth",w),a.pocketTopLeft=a.frontYokePanel.shiftFractionTowards(a.frontYokeSidePanel,.5).shift(180,w/2),a.pocketTopRight=a.frontYokePanel.shiftFractionTowards(a.frontYokeSidePanel,.5).shift(0,w/2),a.pocketBottomLeft=a.pocketTopLeft.shiftFractionTowards(a.pocketTopRight,1-e.pocketLowerWidthRatio).shift(270,w*e.pocketSideHeightRatio),a.pocketBottomRight=a.pocketTopLeft.shiftFractionTowards(a.pocketTopRight,e.pocketLowerWidthRatio).shift(270,w*e.pocketSideHeightRatio),a.pocketBottomMiddle=a.pocketTopLeft.shiftFractionTowards(a.pocketTopRight,.5).shift(270,w*e.pocketHeightRatio),a.pocketPanelLeft=r.beamsIntersect(a.pocketBottomLeft,a.pocketBottomMiddle,a.frontYokePanel,a.frontHemPanel),a.pocketPanelRight=r.beamsIntersect(a.pocketBottomRight,a.pocketBottomMiddle,a.frontYokeSidePanel,a.frontHemSidePanel),o.set("armholeYokeFront",n.frontArmholeComplete.split(a.frontArmholeYoke)[0].length()),o.set("waistbandWidth",e.waistbandWidth*(void 0===t.bust?t.chest:t.bust));const C=.5*o.get("waistbandWidth");a.frontNeck=a.cfNeck.shift(180,C),a.frontYoke=a.cfYoke.shift(180,C),a.frontHem=a.cfHem.shift(180,C),n.front=(new s).move(a.cfNeck).line(a.frontNeck).line(a.frontHem).line(a.cfHem);const v=a.cfNeck.dist(a.cfHem)/4;a.button1=a.cfNeck.shift(270,C+0*v),a.button2=a.cfNeck.shift(270,C+1*v),a.button3=a.cfNeck.shift(270,C+2*v),a.button4=a.cfNeck.shift(270,C+3*v);const T=n.backCollar.length()+n.backCollarS3.length()+n.frontCollar.length();return o.set("collarLength",T),o.set("collarLengthBack",n.backCollar.length()+n.backCollarS3.length()),o.set("facingLengthFromBack",T*(1-e.collarPoint)),a.frontCollarPoint=n.frontCollar.reverse().shiftAlong(T*e.collarPoint),l("mirror",{clone:!0,mirror:[a.cfNeck,a.cfHem],points:["frontNeck","frontYoke","frontHem"],nameFormat:t=>t.replace("front","facing")}),n.collarFacing=n.frontCollar.split(a.frontCollarPoint)[1].attr("class","note"),a.facingYokeCp1=a.facingYoke.shiftFractionTowards(a.facingNeck,.3),a.facingCollar=a.frontCollarPoint.copy(),a.facingCollarCp2=a.facingCollar.shift(a.facingCollar.angle(n.collarFacing.shiftAlong(2))+90,.33*a.facingYoke.dist(a.facingNeck)),c}},rs={name:"devon.sleeve",from:y,after:ns,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:i,Path:a,paths:s,utils:n,sa:r,part:l})=>{const c=e.cuffWidth*t.shoulderToWrist,p=e.sleeveSlit*t.shoulderToWrist;o.set("cuffWidth",c),o.set("sleeveSlit",p),i.tsOriginalWristRight=i.tsWristRight.copy(),i.usOriginalWristRight=i.usWristRight.copy(),i.tsWristRight=i.tsWristRight.shift(i.tsWristLeft.angle(i.tsWristRight),.5*c),i.usWristRight=i.usWristRight.shift(i.usWristLeft.angle(i.usWristRight),.5*c);const h=i.tsWristLeft.angle(i.tsWristRight)+90,d=i.usWristLeft.angle(i.usWristRight)+90;return i.tsHelperLeft=i.tsWristLeft.shift(h,c),i.tsHelperRight=i.tsWristRight.shift(h,c),i.usHelperLeft=i.usWristLeft.shift(d,c),i.usHelperRight=i.usWristRight.shift(d,c),i.tsCuffLeft=n.beamsIntersect(i.tsWristLeft,i.tsElbowLeft,i.tsHelperLeft,i.tsHelperRight),i.tsCuffRight=n.beamsIntersect(i.tsOriginalWristRight,i.elbowRight,i.tsHelperLeft,i.tsHelperRight),i.usCuffLeft=n.beamsIntersect(i.usWristLeft,i.usElbowLeft,i.usHelperLeft,i.usHelperRight),i.usCuffRight=n.beamsIntersect(i.usOriginalWristRight,i.elbowRight,i.usHelperLeft,i.usHelperRight),i.usSlit=i.usCuffRight.shiftTowards(i.elbowRight,p),i.tsSlit=i.tsCuffRight.shiftTowards(i.elbowRight,p),r?(i.usSlitRight=i.usSlit.shift(i.usSlit.angle(i.elbowRight)-90,2*r),i.tsSlitRight=i.tsSlit.shift(i.tsSlit.angle(i.elbowRight)-90,r)):(i.usSlitRight=i.usSlit.copy(),i.tsSlitRight=i.tsSlit.copy()),i.usCuffRight=n.beamsIntersect(i.usWristRight,i.usSlit,i.usCuffLeft,i.usCuffRight),i.tsCuffRight=n.beamsIntersect(i.tsWristRight,i.tsSlit,i.tsCuffLeft,i.tsCuffRight),o.set("cuffLength",i.tsCuffLeft.dist(i.tsCuffRight)+i.usCuffLeft.dist(i.usCuffRight)+r),r&&(i.tsCuffRight=i.tsCuffLeft.shiftOutwards(i.tsCuffRight,r),i.usCuffRight=i.usCuffLeft.shiftOutwards(i.usCuffRight,2*r)),s.topSleeve=(new a).move(i.tsCuffRight).line(i.tsSlitRight).line(i.tsSlit).line(i.elbowRight).curve(i.elbowRightCpTop,i.tsRightEdgeCpBottom,i.tsRightEdge).curve_(i.tsRightEdgeCpTop,i.backPitchPoint).curve(i.backPitchPoint,i.topCpRight,i.top).curve(i.topCpLeft,i.frontPitchPointCpTop,i.frontPitchPoint).curve(i.frontPitchPointCpBottom,i.tsLeftEdgeCpRight,i.tsLeftEdge).curve(i.tsLeftEdge,i.tsElbowLeftCpTop,i.tsElbowLeft).line(i.tsCuffLeft).line(i.tsCuffRight).close().attr("class","lining"),s.underSleeve=(new a).move(i.usCuffRight).line(i.usSlitRight).line(i.usSlit).line(i.elbowRight).curve(i.elbowRightCpTop,i.usRightEdgeCpBottom,i.usRightEdge).curve_(i.usRightEdgeCpTop,i.usTip).curve(i.usTipCpBottom,i.usLeftEdgeCpRight,i.usLeftEdgeRight).line(i.usLeftEdge).curve(i.usLeftEdge,i.usElbowLeftCpTop,i.usElbowLeft).line(i.usCuffLeft).line(i.usCuffRight).close().attr("class","interfacing"),l.hide()}},ls={name:"devon.cuff",after:rs,hide:{self:!1,from:!0,inherited:!0},options:{},draft:({Point:t,points:e,Path:o,paths:i,Snippet:a,snippets:s,macro:n,sa:r,complete:l,store:c,units:p,expand:h,part:d})=>{for(const u in i)delete i[u];for(const u in e)delete e[u];const f=c.get("cuffLength"),m=c.get("cuffWidth");return h?(e.topLeft=new t(0,0),e.topRight=new t(.5*f,0),e.bottomLeft=new t(0,2*m),e.bottomRight=new t(.5*f,2*m),i.seamBase=(new o).move(e.topRight).line(e.topLeft).line(e.bottomLeft).line(e.bottomRight).hide(),i.seam=(new o).move(e.topRight).join(i.seamBase).line(e.topRight).close().attr("class","fabric"),r&&(i.sa=(new o).move(e.topRight).join(i.seamBase.offset(r)).line(e.bottomRight).attr("class","fabric sa")),n("cutonfold",{from:e.bottomRight,to:e.topRight,grainline:!1}),e.button=e.topLeft.shift(0,.5*m).shift(270,.5*m),s.button=new a("button",e.button),c.cutlist.addCut({cut:2,from:"fabric",onFold:!0}),e.title=e.topLeft.shiftFractionTowards(e.bottomRight,.5),n("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),n("grainline",{from:e.cGrainFrom,to:e.cGrainTo}),l&&(e.midLeft=e.topLeft.shift(270,m),e.midRight=e.topRight.shift(270,m),i.foldLine=(new o).move(e.midLeft).line(e.midRight).attr("class","note dashed").attr("data-text","foldLine").attr("data-text-class","
1note")),os(d,[["h","topLeft","topRight","topLeft",-15],["v","bottomLeft","topLeft","topLeft",-15]]),d):(c.flag.note({msg:"devon:cutCuff",replace:{width:p(f),length:p(2*m)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),c.flag.preset("expand"),d.hide())}},cs={name:"devon.frontFacing",from:ns,hide:{self:!1,from:!0,inherited:!0},options:{},draft:({points:t,Path:e,paths:o,macro:i,sa:a,store:s,part:n})=>{i("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"),a&&(o.sa=o.seam.offset(a).attr("class","fabric sa")),s.cutlist.addCut({cut:2,from:"fabric",onFold:!1}),t.title=t.frontNeck.shiftFractionTowards(t.facingYoke,.5),i("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),i("grainline",{from:t.ffGrainFrom,to:t.ffGrainTo}),os(n,[["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]]),n}},ps={name:"devon.frontInside",from:ns,hide:{self:!1,from:!0,inherited:!0},options:{},draft:({points:t,Path:e,paths:o,Snippet:i,snippets:a,macro:s,store:n,sa:r,complete:l,part:c})=>{s("rmcutonfold");for(const h in o)delete o[h];const p=n.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")),n.cutlist.addCut({cut:2,from:"fabric",onFold:!1}),a.button2=new i("button",t.button2),a.button3=new i("button",t.button3),a.button4=new i("button",t.button4),r&&(t.pocketSnip=t.pocketTopLeft.shiftFractionTowards(t.frontYokePanel,.5).shift(270,.5*r),a.pocketSnip=new i("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"),os(c,[["h","stitchTop","frontYokePanel","frontYoke",-25]])),t.title=t.stitchTop.shiftFractionTowards(t.stitchBottom,.25),s("title",{nr:4,title:"frontInside",at:t.title,rotation:90,scale:.75}),s("grainline",{from:t.frontYoke.shiftFractionTowards(t.stitchTop,.25),to:t.frontHem.shiftFractionTowards(t.stitchBottom,.25)}),os(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}},hs={name:"devon.frontPanel",from:ns,hide:{self:!1,from:!0,inherited:!0},options:{},draft:({points:t,Path:e,paths:o,Snippet:i,snippets:a,macro:s,options:n,sa:r,store:l,complete:c,part:p})=>{s("rmcutonfold");for(const h in o)delete o[h];return t.panelPocketTop=t.frontHemSidePanel.shiftFractionTowards(t.frontYokeSidePanel,n.pocketHeight),t.cfPocketBottom=t.cfHem.copy(),t.cfPocketTop=t.cfPocketBottom.shiftFractionTowards(t.cfYoke,n.pocketHeight),s("mirror",{clone:!0,mirror:[t.frontHemSidePanel,t.frontYokeSidePanel],points:["cfPocketBottom","cfPocketTop"]}),n.frontPocket?(c&&(t.frontPocketTopSnippet=t.panelPocketTop.copy(),t.frontPocketBottomSnippet=t.panelPocketTop.shiftFractionTowards(t.frontHemSidePanelSaved,n.frontPocketOpening),a.frontPocketTop=new i("notch",t.frontPocketTopSnippet),a.frontPocketBottom=new i("notch",t.frontPocketBottomSnippet),os(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),s("title",{nr:5,title:"frontPanel",at:t.title,rotation:90,scale:.75}),s("grainline",{from:t.frontYokePanelMiddle,to:t.frontHemPanelMiddle}),t.frontPanelSnippet=t.frontHemSidePanelSaved.copy(),a.frontPanel=new i("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")),os(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]]),n.frontPocket&&os(p,[["l","frontHemSidePanel","mirroredCfPocketBottom","mirroredCfPocketBottom",15],["l","mirroredCfPocketBottom","mirroredCfPocketTop","mirroredCfPocketBottom",-15],["l","panelPocketTop","mirroredCfPocketTop","panelPocketTop",-15]]),p}},ds={name:"devon.frontSidePanel",from:ns,after:[hs,as],hide:{self:!1,from:!0,inherited:!0},options:{},draft:({points:t,Path:e,paths:o,Snippet:i,snippets:a,macro:s,store:n,options:r,utils:l,sa:c,complete:p,part:h})=>{s("rmcutonfold");for(const w in o)-1===["frontSidePanelArmhole"].indexOf(w)&&delete o[w];const d=n.get("frontSidePanelUpshift"),f=n.get("sidePanelLength"),m=n.get("useFBA");let u=0;t.frontYokeSidePanelCP1=t.frontYokeSidePanel.shift(0,.5*t.frontYokeSidePanel.dist(t.frontArmholeYoke)),m&&(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,d),t.armhole=t.armhole.translate(0,d),t.hem=t.hem.translate(0,d),t.frontArmholeYoke=t.frontArmholeYoke.translate(0,d);let g=0,b=0,k=1.5;do{t.frontYokeSidePanel=t.frontYokeSidePanel.rotate(k,t.hem),b=m?f
1-(new e).move(t.frontYokeSidePanel).curve(t.frontYokeSidePanelCp2,t.frontHemSidePanelCp1,t.frontHemSidePanelSaved).length():f-t.frontYokeSidePanel.dist(t.frontHemSidePanelSaved),k=b>0?-.7*Math.abs(k):.6*Math.abs(k)}while(g++<100&&(b>1||b<-1));if(m){o.sidePanelHem=(new e).move(t.frontYokeSidePanel).curve(t.frontYokeSidePanelCp2,t.frontHemSidePanelCp1,t.frontHemSidePanelSaved).hide();const i=t.pocketPanelRight.dist(t.frontYokeSidePanel);t.pocketPanelRight=o.sidePanelHem.shiftFractionAlong(i/t.frontYokeSidePanel.dist(t.frontHemSidePanel));let a=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,a)[0],t.panelPocketTop=o.sidePanelHem.reverse().shiftAlong(r.pocketHeight*f),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")),n.cutlist.addCut({cut:2,from:"fabric",onFold:!1}),t.title=t.frontYokeSidePanel.shiftFractionTowards(t.hem,.3),s("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.y-t.frontYokeSidePanel.y),s("grainline",{from:t.fsGrainFrom,to:t.fsGrainTo}),t.frontPanelSnippet=t.frontHemSidePanelSaved.copy(),a.frontPanel=new i("notch",t.frontPanelSnippet),c&&(t.pocketSnip=t.pocketTopRight.shiftFractionTowards(t.frontYokeSidePanel,.5).shift(270,.5*c),a.pocketSnip=new i("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")),os(h,[["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?(os(h,[["h","frontHemSidePanelSaved","hem","frontHemSidePanelSaved",15],["h","hem","armhole","frontHemSidePanelSaved",15],["v","hem","armhole","armhole",15],["v","frontHemSidePanelSaved","hem","armhole",15]]),n.set("hemLength",t.frontHemSidePanelSaved.dist(t.hem)+t.frontHemSidePanelSaved.dist(t.frontHem)+n.get("hemBackLength"))):(os(h,[["h","frontHemSidePanelSaved","hemOriginal","frontHemSidePanelSaved",15],["v","hemOriginal","armhole","armhole",15]]),n.set("hemLength",t.hemOriginal.dist(t.frontHem)+n.get("hemBackLength"))),r.frontPocket&&(p&&(t.frontPocketTopSnippet=t.panelPocketTop.copy(),t.frontPocketBottomSnippet=t.panelPocketTop.shiftFractionTowards(t.frontHemSidePanelSaved,r.frontPocketOpening),a.frontPocketTop=new i("notch",t.frontPocketTopSnippet),a.frontPocketBottom=new i("notch",t.frontPocketBottomSnippet),os(h,[["l","frontPocketTopSnippet","frontPocketBottomSnippet","frontPocketTopSnippet",15],["l","frontPocketBottomSnippet","frontHemSidePanelSaved","frontPocketTopSnippet",15]])),os(h,[["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]])),m&&os(h,[["h","sidePanelLeft","frontYokeSidePanel","frontYokeSidePanel",-15],["v","frontHemSidePanelSaved","frontYokeSidePanel","sidePanelLeft",-15],["v","frontHemSidePanelSaved","sidePanelLeft","sidePanelLeft",-30]]),h}},fs={name:"devon.frontYoke",from:ns,hide:{self:!1,from:!0,inherited:!0},options:{},draft:({points:t,Path:e,paths:o,macro:i,store:a,options:s,Snippet:n,snippets:r,sa:l,complete:c,part:p})=>{i("rmcutonfold");for(const h in o)-1===["frontArmholeComplete","frontCollar"].indexOf(h)&&delete o[h];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")),a.cutlist.addCut({cut:2,from:"fabric",onFold:!1}),r.button1=new n("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"),os(p,[["h","frontNeck","button1","button1",0]])),t.frontEndOfCollar=o.frontCollar.reverse().shiftAlong(a.get("collarLength")*s.collarLengthRatio),r.frontEndOfCollar=new n("notch",t.frontEndOfCollar),t.title=t.s3CollarSplit.shiftFractionTowards(t.frontArmholeYoke,.4).shiftFractionTowards(t.frontYoke,.45),i("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.
1y-t.s3CollarSplit.y),i("grainline",{from:t.fyGrainFrom,to:t.fyGrainTo}),os(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}},ms={name:"devon.pocket",from:ns,hide:{self:!1,from:!0,inherited:!0},options:{},draft:({Point:t,points:e,Path:o,paths:i,macro:a,options:s,sa:n,store:r,part:l})=>{for(const c in i)delete i[c];for(const c in e)null==c.match("pocket")&&delete e[c];return i.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"),n&&(i.sa=i.seam.offset(n).attr("class","fabric sa")),r.cutlist.addCut({cut:2,from:"fabric",onFold:!1}),e.title=e.pocketTopLeft.shiftFractionTowards(e.pocketBottomMiddle,.3),a("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.y=e.pocketTopLeft.y-(e.pocketBottomLeft.y-e.pocketBottomMiddle.y),a("grainline",{from:e.pGrainFrom,to:e.pGrainTo}),os(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}},us={name:"devon.pocketflap",from:ms,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:i,options:a,store:s,sa:n,part:r})=>{const l=s.get("pocketWidth");return t.pocketflapTopLeft=t.pocketTopRight.shiftFractionTowards(t.pocketTopLeft,a.pocketflapMagnifier),t.pocketflapTopRight=t.pocketTopLeft.shiftFractionTowards(t.pocketTopRight,a.pocketflapMagnifier),t.pocketflapBottomLeft=t.pocketflapTopLeft.shift(270,l*a.pocketflapSideHeightRatio),t.pocketflapBottomRight=t.pocketflapTopRight.shift(270,l*a.pocketflapSideHeightRatio),t.pocketflapBottomMiddle=t.pocketflapTopLeft.shiftFractionTowards(t.pocketflapTopRight,.5).shift(270,l*a.pocketflapHeightRatio*a.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"),n&&(o.sa=o.seam.offset(n).attr("class","fabric sa")),i("rmgrainline"),s.cutlist.removeCut("fabric"),s.cutlist.addCut({cut:4,from:"fabric",onFold:!1}),t.title=t.pocketflapTopLeft.shiftFractionTowards(t.pocketflapBottomMiddle,.4),i("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),i("grainline",{from:t.pfGrainFrom,to:t.pfGrainTo}),i("rmad"),os(r,[["h","pocketflapTopLeft","pocketflapTopRight","pocketflapTopLeft",-15],["v","pocketflapBottomLeft","pocketflapTopLeft","pocketflapTopLeft",-15],["v","pocketflapBottomMiddle","pocketflapTopRight","pocketflapTopRight",15]]),r}},gs={name:"devon.topSleeve",from:rs,after:es,draft:({macro:t,points:e,Path:o,paths:i,snippets:a,Snippet:s,sa:n,store:r,complete:l,part:c})=>(delete i.us,delete i.underSleeve,i.seam=i.topSleeve.clone().attr("class","fabric",!0),delete i.ts,delete i.topSleeve,n&&(i.sa=i.seam.offset(n).addClass("fabric sa")),r.cutlist.addCut({cut:2,from:"fabric"}),t("scalebox",{at:e.elbowCenter}),a.logo=new s("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.tsSl
1itRight.y,t("grainline",{from:e.tsGrainFrom,to:e.tsGrainTo}),l&&(i.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","note center"),e.s3=i.topSleeveText.shiftAlong(r.get("sss")),a.s3=new s("notch",e.s3)),os(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]]),n&&os(c,[["l","tsSlit","tsSlitRight","tsSlitRight",-15],["l","tsCuffRight","tsSlitRight","tsSlitRight",-15]]),c)},bs={name:"devon.underSleeve",from:rs,draft:({macro:t,points:e,paths:o,snippets:i,Snippet:a,sa:s,store:n,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(),s&&(o.sa=o.seam.offset(s).attr("class","fabric sa")),n.cutlist.addCut({cut:2,from:"fabric"}),i.logo=new a("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}),os(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]]),s&&os(r,[["l","usSlit","usSlitRight","usSlitRight",-15],["l","usCuffRight","usSlitRight","usSlitRight",-15]]),r)};function ks(t,e,o,i,a,s,n){o[t+"CollarWaveTop"]=o[t+"CollarTopRight"].shift(270,a),o[t+"CollarWaveBottom"]=o[t+"CollarBottomLeft"].shift(90,a),o[t+"CollarWaveBottomBack"]=o[t+"CollarBottomRight"].shift(90,s*i),o[t+"CollarBackShoulder"]=o[t+"CollarBottomLeft"].shift(0,n);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(n,0),o[t+"CollarTopRight"]=o[t+"CollarWaveTop"].shift(0,.3*s)}const ws={name:"devon.collar",from:ns,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:i,options:a,store:s,part:n})=>{for(const p in i)delete i[p];for(const p in e)delete e[p];const r=s.get("collarLength")*(1-a.collarLengthRatio),l=s.get("collarLengthBack"),c=r*a.collarWidthRatio;return s.set("collarUpperUnderRatio",a.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*a.upperUnderRatio),e.upperCollarBottomLeft=e.boxBottomLeft.shiftFractionTowards(e.boxTopLeft,-1*a.upperUnderRatio),e.upperCollarBottomRight=e.upperCollarBottomLeft.copy(),e.upperCollarBottomRight.x=e.upperCollarTopRight.x,i.underBox=(new o).move(e.underCollarTopLeft).line(e.underCollarBottomLeft).line(e.underCollarBottomRight).line(e.underCollarTopRight).line(e.underCollarTopLeft).close().attr("class","lining").hide(),i.upperBox=(new o).move(e.upperCollarTopLeft).line(e.upperCollarBottomLeft).line(e.upperCollarBottomRight).line(e.upperCollarTopRight).line(e.upperCollarTopLeft).close().attr("class","canvas").hide(),ks("under",t,e,a.underCollarWaveBackRatio,c*a.underCollarWaveRatio,c,l),ks("upper",t,e,a.upperCollarWaveBackRatio,c*a.upperCollarWaveRatio,c,l),n}},Cs={name:"devon.underCollar",from:ws,hide:{self:!1,from:!0,inherited:!0},options:{},draft:({points:t,Path:e,paths:o,macro:i,store:a,sa:s,snippets:n,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"),s&&(o.sa=(new e).move(t.underCollarWaveBottom).join(o.seamBase.offset(s)).line(t.underCollarWaveBottom).attr("class","fabric sa")),i("cutonfold",{from:t.underCollarTopLeft,to:t.underCollarWaveBottom,grainline:!0}),a.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),t.title=t.underCollarTopLeft.shiftFractionTowards(t.underCollarBottomRight,.5),i("title",{nr:16,title:"underCollar",at:t.title,scale:.5}),os(c,[["h","underCollarTopLeft","underCollarTopRight","underCollarTopLeft",-15],["h","underCollarWaveBottom","underCollarWaveBottomBack","underCollarWaveBottomBack",15],["v","underCollarWaveBottom","underCollarTopLeft","underCollarTopLeft",-15]]),t.shoulderMarking=o.seamBase.shiftAlong(a.get("collarLengthBack")),n.shoulderMarking=new r("notch",t.shoulderMarking),t.facingMarking=o.seamBase.shiftAlong(a.get("facingLengthFromBack")),n.facingMarking=new r("bnotch",t.facingMarking),l&&os(c,[["h","underCollarBottomLeft","facingMarking","underCollarWaveBottomBack",25],["h","underCollarBottomLeft","shoulderMarking","underCollarWaveBottomBack",35]]),c)},vs={name:"devon.upperCollar",from:ws,hide:{self:!1,from:!0,inherited:!0},options:{},draft:({points:t,Path:e,paths:o,macro:i,store:a,sa:s,snippets:n,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"),s&&(o.sa=(new e).move(t.upperCollarWaveBottom).join(o.seamBase.offset(s)).line(t.upperCollarWaveBottom).attr("class","fabric sa")),t.title=t.upperCollarTopLeft.shiftFractionTowards(t.upperCollarBottomRight,.5),i("title",{nr:15,title:"upperCollar",at:t.title}),i("cutonfold",{from:t.upperCollarTopLeft,to:t.upperCollarWaveBottom,grainline:!0}),a.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),os(c,[["h","upperCollarTopLeft","upperCollarTopRight","upperCollarTopLeft",-15],["h","upperCollarWaveBottom","upperCollarWaveBottomBack","upperCollarWaveBottomBack",15],["v","upperCollarWaveBottom","upperCollarTopLeft","upperCollarTopLeft",-15]]),t.title=t.upperCollarTopLeft.shiftFractionTowards(t.upperCollarBottomRight,.5),i("title",{nr:15,title:"upperCollar",at:t.title,scale:.5}),t.shoulderMarking=o.seamBase.shiftAlong(a.get("collarLengthBack")*a.get("collarUpperUnderRatio")),n.shoulderMarking=new r("notch",t.shoulderMarking),t.facingMarking=o.seamBase.shiftAlong(a.get("facingLengthFromBack")*a.get("collarUpperUnderRatio")),n.facingMarking=new r("bnotch",t.facingMarking),l&&os(c,[["h","upperCollarBottomLeft","facingMarking","upperCollarWaveBottomBack",25],["h","upperCollarBottomLeft","shoulderMarking","upperCollarWaveBottomBack",35]]),c)},Ts={name:"devon.waistband",after:ds,hide:{self:!1,from:!0,inherited:!0},options:{},draft:({Point:t,points:e,Path:o,paths:i,Snippet:a,snippets:s,macro:n,sa:r,store:l,units:c,complete:p,expand:h,part:d})=>{const f=l.get("hemLength"),m=l.get("waistbandWidth"),u=.5*l.get("waistbandWidth");
1if(!h)return l.flag.note({msg:"devon:cutWaistband",replace:{width:c(2*f),length:c(2*m)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),l.flag.preset("expand"),d.hide();for(const g in i)delete i[g];for(const g in e)delete e[g];return e.midLeft=new t(0,0),e.midRight=new t(f,0),e.topLeft=new t(0,-1*m),e.topRight=new t(f,-1*m),e.bottomLeft=new t(0,m),e.bottomRight=new t(f,m),e.button5=new t(u,-.5*m),i.seamBase=(new o).move(e.topRight).line(e.topLeft).line(e.bottomLeft).line(e.bottomRight).hide(),i.seam=(new o).move(e.topRight).join(i.seamBase).line(e.topRight).close().attr("class","fabric"),r&&(i.sa=(new o).move(e.topRight).join(i.seamBase.offset(r)).line(e.bottomRight).attr("class","fabric sa")),n("cutonfold",{from:e.bottomRight,to:e.topRight,grainline:!1}),p&&(i.foldLine=(new o).move(e.midLeft).line(e.midRight).attr("class","note dashed").attr("data-text","foldLine").attr("data-text-class","note")),s.button5=new a("button",e.button5),l.cutlist.removeCut("fabric"),l.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),e.title=e.topLeft.shiftFractionTowards(e.bottomRight,.5),n("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),n("grainline",{from:e.wbGrainFrom,to:e.wbGrainTo}),os(d,[["h","topLeft","topRight","topLeft",-15],["v","bottomLeft","topLeft","topLeft",-15]]),d}},ys=new s.pT({data:Za,parts:[ts,es,is,as,ss,ls,cs,fs,ds,hs,ps,ms,us,rs,gs,bs,Cs,vs,Ts]}),xs=(0,s.D4)([u,_,Sa,xa],{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"]}}),Bs=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}'),Ss={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 Ls({measurements:t,sa:e,store:o,points:i,Path:a,paths:s,macro:n,options:r,Snippet:l,snippets:c,part:p}){const h=void 0!==i.cfHem;for(let f in s)delete s[f];i.waist.x=t.waist*(1+r.waistEase)/4,i.hips.x=t.hips*(1+r.hipsEase)/4,i.hem.x=i.hips.x,i.hipsCp2=i.hips.shift(90,t.waistToHips/3),i.waistCp1=i.waist.shift(-90,t.waistToHips/3),i.waistCp2=i.waist.shift(90,t.hpsToWaistBack/4);let d=["armholeCp2","armholeHollowCp1","armholeHollow","armholeHollowCp2","armholePitchCp1","armholePitch","armholePitchCp2","shoulderCp1","shoulder","neck"];if(h)for(let f of d)i[f]=i[f].rotate(-r.drapeAngle,i.armhole);return i.neck=i.neck.shiftFractionTowards(i.shoulder,1-r.shoulderSeamLength),i.neckCp2.y=1.2*i.shoulder.y,i.cbNeck.y=1.2*i.shoulder.y,i.neckCp2Front=i.neck.shiftTowards(i.shoulder,-i.shoulder.x/4),i.cfNeck.y=i.neckCp2Front.y+.7*(i.neckCp2Front.y-i.neck.y),i.cfNeckCp1=i.cfNeck.shift(0,i.shoulder.x/4),h?(i.cNeck=i.cfNeck,i.cHem=i.cfHem,i.neckCp2=i.neckCp2Front):(i.cNeck=i.cbNeck,i.cHem=i.cbHem,i.cfNeckCp1=i.cNeck),s.saBase=(new a).move(i.hem).line(i.hips).curve(i.hipsCp2,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.armholePitchCp2,i.shoulderCp1,i.shoulder).line(i.neck).curve(i.neckCp2,i.cfNeckCp1,i.cNeck),s.hemBase=(new a).move(i.cHem).line(i.hem),s.saBase.hide(),s.hemBase.hide(),s.seam=s.hemBase.join(s.saBase).line(i.cHem),e&&(s.sa=s.hemBase.offset(3*e).join(s.saBase.offset(e)),s.sa.line(i.cNeck).move(i.cHem),s.sa.line(s.sa.start()),s.sa.attr("class","fabric sa")),o.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),c.shoulderSeamEndNotch=new l("notch",i.neck),h&&(c.armholePitchNotch=new l("notch",i.armholePitch)),n("rmcutonfold"),n("cutonfold",{from:i.cNeck,to:i.cHem,grainline:!0}),n("pd",{id:"lArmhole",path:(new a).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:e+15}),n("pd",{id:"lArmholePitchToShoulder",path:(new a).move(i.armholePitch).curve(i.armholePitchCp2,i.shoulderCp1,i.shoulder),d:-15}),n("vd",{id:"hHemToWaist",from:i.hips,to:i.waist,x:i.hips.x+e+15}),n("vd",{id:"hHemToArmhole",from:i.hips,to:i.armhole,x:i.hips.x+e+30}),n("vd",{id:"hHemToArmholePitch",from:i.hips,to:i.armholePitch,x:i.hips.x+e+45}),n("vd",{id:"hHemToShoulder",from:i.hips,to:i.shoulder,x:i.hips.x+e+60}),n("vd",{id:"hFull",from:i.hips,to:i.neck,x:i.hips.x+e+75}),n("ld",{id:"lShoulderSeam",from:i.neck,to:i.shoulder,d:e+15}),n("vd",{id:"hHemToCenterTop",from:i.cHem,to:i.cNeck,x:i.cHem.x-15}),n("hd",{id:"wHem",from:i.cHem,to:i.hem,y:i.cHem.y+3*e+15}),n("pd",{id:"lNeckOpening",path:(new a).move(i.cNeck).curve(i.cfNeckCp1,i.neckCp2,i.neck),d:-e-15}),p}const Ps={name:"diana.front",from:N,hide:s.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,s.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,s.Wx)("shoulderToShoulder"),menu:"fit"},waistEase:{pct:0,min:-10,max:20,...(0,s.Wx)("waist"),menu:"fit"},hipsEase:{pct:0,min:-10,max:20,...(0,s.Wx)("hips"),menu:"fit"},chestEase:{pct:0,min:-10,max:20,...(0,s.Wx)("chest"),menu:"fit"},bicepsEase:{pct:0,min:-5,max:50,...(0,s.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:Ls},Rs={name:"diana.back",from:I,hide:s.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,s.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,s.Wx)("shoulderToShoulder"),menu:"fit"},waistEase:{pct:0,min:-10,max:20,...(0,s.Wx)("waist"),menu:"fit"},hipsEase:{pct:0,min:-10,max:20,...(0,s.Wx)("hips"),menu:"fit"},chestEase:{pct:0,min:-10,max:20,...(0,s.Wx)("chest"),menu:"fit"},bicepsEase:{pct:0,min:-5,max:50,...(0,s.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:Ls};const Fs={name:"diana.sleeve",from:T,after:[Ps,Rs],hide:s.V9.HIDE_TREE,draft:function({sa:t,points:e,paths:o,Path:i,macro:a,store:s,part:n}){return o.seam=(new i).move(e.wristRight).line(e.bicepsRight).join(o.sleevecap).line(e.wristLeft).line(e.wristRight).close().addClass("fabric"),t&&(o.saBase=(new i).move(e.wristRight).line(e.bicepsRight).join(o.sleevecap).line(e.wristLeft),o.hemBase=(new i).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")),s.cutlist.setCut({cut:2,from:"fabric"}),a("grainline",{from:e.centerWrist,to:e.sleeveTop}),a("vd",{id:"hWristToSleevecapBottom",from:e.wristLeft,to:e.bicepsLeft,x:e.bicepsLeft.x-t-15}),a("vd",{id:"hFull",from:e.wristLeft,to:e.sleeveTip,x:e.bicepsLeft.x-t-30}),a("hd",{id:"wFull",from:e.bicepsLeft,to:e.bicepsRight,y:e.sleeveTip.y-t-30}),a("hd",{id:"wWrist",from:e.wristLeft,to:e.wristRight,y:e.wristLeft.y+3*t+15}),a("pd",{id:"lSleevecap",path:o.sleevecap.reverse(),d:-1*t-15}),a("rmhd","wCuff"),n}},Ws=new s.pT({data:Bs,parts:[Ps,Rs,Fs]}),Hs=(0,s.D4)([_,Ss]),As=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 Os={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:i,measurements:a,options:s,complete:n,sa:r,Snippet:l,snippets:c,macro:p,utils:h,store:d,part:f}){return t.topLeft=new e(0,0),t.bottomLeft=new e(0,a.head*s.height),t.topRight=new e(a.head*s.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,a.head*s.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(h.beamsIntersect(t.bottomTip,t.bottomTip.shift(15,30),t.tipCenter,t.tipCenterCp1),.75),o.seam=(new i).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")),n&&(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 i).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")),d.cutlist.addCut(),d.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}),f}},Ds={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"}}}')},Es=new s.pT({data:As,parts:[Os]}),Is=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}'),Ns={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 Ms={name:"florent.top",measurements:["head"],options:{topSide:.8,brim:0,headEase:{pct:2,min:0,max:5,...(0,s.Wx)("head"),menu:"fit"}},draft:function({sa:t,points:e,macro:o,Point:i,Path:a,paths:s,snippets:n,Snippet:r,store:l,part:c}){const p=(t,e)=>{const{points:o,options:i,Point:a,Path:s,measurements:n}=t.shorthand(),r=e*n.head*(1+i.headEase);o.midFront=new a(0,0),o.midFrontCp2=o.midFront.shift(-90,.074*r),o.midMid=o.midFront.shift(0,.34*r),o.midBack=new a(.654*r,.124*r),o.midSide=new a(.2525*r,.178*r),o.midSideCp1=o.midSide.shift(180,.185*r),o.midSideCp2=o.midSide.shift(0,.101*r),o.backHollow=new a(.488*r,.136*r),o.backHollowCp1=o.backHollow.shift(180,.033*r),o.backHollowCp2=o.backHollow.shift(0,.033*r),o.backEdge=new a(.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 a(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 a(.411*r,.207*r),o.tipCp1=o.tip.shift(-85,.1*r),o.tipCp2=o.tip.shift(177,.067*r),o.outerTop=new a(.328*r,.337*r),o.outerTopCp1=o.outerTop.shift(180,.05*r),o.outerTopCp2=o.outerTop.shift(0,.05*r),o.outerGuide=new a(.0867*r,.1913*r),o.outerGuideCp1=o.outerGuide.shift(135,.076*r),o.outerGuideCp2=o.outerGuide.shift(-45,.145*r),o.innerGuide=new a(.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 s).move(o.tip).curve(o.tipCp2,o.innerGuideCp1,o.innerGuide).curve(o.innerGuideCp2,o.foldBottomCp2,o.foldBottom).length();return n.head*(1+i.headEase)-(c+p)},h=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 d=1,f=1,m=p(c,d);for(;Math.abs(m)>1&&f<25;)f++,d=m>0?1e3/(1e3-m):1e3/(1e3+m),m=p(c,d);m=h(c),f=1;let u=["outerTop","outerTopCp1","outerTopCp2"],g=["outerGuide","outerGuideCp1","outerGuideCp2"];for(;Math.abs(m)>1&&f<25;){for(let t of u)e[t]=e[t].shift(-90,m/3);for(let t of g)e[t]=e[t].shift(-135,m/3);m=h(c),f++}return s.seam=(new a).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"),s.side=(new a).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&&(s.sa=s.seam.offset(t).addClass("fabric sa")),s.side.hide(),l.cutlist.setCut([{cut:2,from:"fabric"},{cut:2,from:"lining"}]),e.grainlineFrom=new i(e.midSideCp1.x,e.midBack.y),e.grainlineTo=e.midBack.clone(),o("grainline",{from:e.grainlineFrom,to:e.grainlineTo}),e.title=new i(e.midMid.x,e.midFrontCp2.y),o("title",{at:e.title,nr:1,title:"top"}),e.logo=new i(e.title.x/2,e.title.y),n.logo=new r("logo",e.logo).attr("data-scale",.75),o("miniscale",{at:new i(.75*e.title.x,e.title.y)}),o("sprinkle",{snippet:"notch",on:["midMid","backHollow","midSide"]}),l.set("topDistanceToFirstNotch",(new a).move(e.backEdge).line(e.backSide).curve(e.backSideCp1,e.backHollowCp2,e.backHollow).length()),l.set("topDistanceToSecondNotch",(new a).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 _s={name:"florent.side",from:Ms,draft:function({store:t,sa:e,points:o,macro:i,paths:a,Path:s,snippets:n,Snippet:r,part:l}){for(let c of Object.keys(a))"side"!==c&&delete a[c];a.seam=a.side.clone().line(o.foldTop).attr("class","fabric"),a.seam.unhide(),e&&(a.sa=(new s).move(o.foldTop).line(o.foldTop.shift(180,e)).join(a.side.offset(e)).line(o.foldBottom).addClass("fabric sa"));for(let c in n)delete n[c];return t.cutlist.setCut([{cut:1,from:"fabric",onFold:!0},{cut:1,from:"lining",onFold:!0}]),i("cutonfold",{from:o.foldBottom,to:o.foldTop,offset:15,grainline:!0}),o.title=o.innerGuide.shiftFractionTowards(o.outerGuide,.5),i("title",{at:o.title,nr:2,title:"side"}),o.logo=o.tipCp2.shiftFractionTowards(o.outerTopCp1,.5),n.logo=new r("logo",o.logo).attr("data-scale",.75),o.notch1=(new s).move(o.tip).curve(o.tipCp1,o.outerTopCp2,o.outerTop).shiftAlong(t.get("topDistanceToFirstNotch")),o.notch2=(new s).move(o.tip).curve(o.tipCp1,o.outerTopCp2,o.outerTop).curve(o.outerTopCp1,o.outerGuideCp2,o.outerGuide).shiftAlong(t.get("topDistanceToSecondNotch")),i("sprinkle",{snippet:"notch",on:["notch1","notch2"]}),i("vd",{id:"hFoldToTipRight",from:o.tip,to:o.foldBottom,x:o.tip.x+e+15}),i("vd",{id:"hFull",from:o.outerTop,to:o.foldBottom,x:o.tip.x+e+45}),i("hd",{id:"wAtFold",from:o.foldTop,to:o.foldBottom,y:o.foldTop.y-15}),i("hd",{id:"wLeftToBottom",from:o.foldTop,to:o.outerTop,y:o.outerTop.y+e+15}),i("hd",{id:"wFull",from:o.foldTop,to:o.tip,y:o.outerTop.y+e+45}),i("hd",{id:"notch2W",from:o.foldTop,to:o.notch2,y:o.outerTop.y+e}),i("vd",{id:"notch2H",from:o.foldTop,to:o.notch2,x:o.foldTop.x-e-15}),i("hd",{id:"notch1W",from:o.foldTop,to:o.notch1,y:o.outerTop.y+e+30}),i("vd",{id:"notch1H",from:o.notch1,to:o.foldBottom,x:o.tip.x+e+30}),l}};const js={name:"florent.brimBottom",measurements:["head"],options:{topSide:.8,brim:0,headEase:{pct:2,min:0,max:5,...(0,s.Wx)("head"),menu:"fit"}},draft:function({sa:t,store:e,points:o,options:i,macro:a,Point:s,paths:n,Path:r,measurements:l,part:c}){const p=1*l.head*(1+i.headEase);return o.tipRight=new s(.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 s(0,.13*p),o.outerMid=new s(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()),n.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&&(n.sa=n.seam.offset(t).addClass("fabric sa")),e.cutlist.setCut({cut:1,from:"fabric"}),a("grainline",{from:o.outerMid,to:o.innerMid}),o.title=o.innerMid.shiftFractionTowards(o.outerMidCp2,.35),a("title",{at:o.title,nr:3,title:"brimBottom"}),a("sprinkle",{snippet:"notch",on:["innerMid","outerMid"]}),a("hd",{id:"wTipToTip",from:o.tipLeft,to:o.tipRight,y:o.tipLeft.y-t-15}),a("hd",{id:"wFull",from:n.seam.edge("left"),to:n.seam.edge("right"),y:o.tipLeft.y-t-30}),a("vd",{id:"hBrim",from:o.outerMid,to:o.innerMid,x:o.innerMid.x-15}),a("vd",{id:"hFull",from:o.outerMid,to:o.tipRight,x:o.tipRight.x+t+18}),c}};const Gs={name:"florent.brimTop",from:js,draft:function({sa:t,points:e,macro:o,paths:i,Path:a,store:s,part:n}){i.hint=(new a).move(e.tipLeft).curve(e.tipLeftCp2,e.outerMidCp1,e.outerMid).curve(e.outerMidCp2,e.tipRightCp1,e.tipRight).attr("class","dashed stroke-sm"),i.rest=(new a).move(e.tipRight).curve(e.tipRightCp2,e.innerMidCp1,e.innerMid).curve(e.innerMidCp2,e.tipLeftCp1,e.tipLeft).line(i.seam.start()),i.seam=i.hint.offset(3).join(i.rest).close().addClass("fabric"),t&&(i.sa=i.hint.offset(t+3).join(i.rest.offset(t)).close().addClass("fabric sa")),s.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=i.seam.edge("bottom");return o("hd",{id:"wFull",from:i.seam.edge("left"),to:i.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}),n}};
1const Ys={name:"florent.brimInterfacing",from:js,draft:function({sa:t,complete:e,points:o,macro:i,paths:a,Path:s,store:n,part:r}){a.hint=a.seam.clone().attr("class","dashed stroke-sm"),a.outset=(new s).move(o.tipLeft).curve(o.tipLeftCp2,o.outerMidCp1,o.outerMid).curve(o.outerMidCp2,o.tipRightCp1,o.tipRight).attr("class","lining"),o.outsetStart=a.outset.shiftAlong(5),o.outsetEnd=a.outset.reverse().shiftAlong(5),a.outset=a.outset.split(o.outsetStart).pop().split(o.outsetEnd).shift(),a.inset=(new s).move(o.tipLeft).curve(o.tipLeftCp1,o.innerMidCp2,o.innerMid).curve(o.innerMidCp1,o.tipRightCp2,o.tipRight).attr("class","various"),o.insetStart=a.inset.shiftAlong(5),o.insetEnd=a.inset.reverse().shiftAlong(5),a.inset=a.inset.split(o.insetStart).pop().split(o.insetEnd).shift(),a.inset.hide(),a.outset.hide(),e&&(a.hint=a.seam.clone().attr("class","dashed stroke-sm")),a.seam=a.outset.clone().line(a.inset.end()).join(a.inset.reverse()).line(a.outset.start()).close().addClass("interfacing");for(let l of Object.keys(a))-1===["seam","inset","outset"].indexOf(l)&&delete a[l];return n.cutlist.setCut({cut:1,from:"rigidInterfacing"}),i("grainline",{from:o.outerMid,to:o.innerMid}),o.title=o.innerMid.shiftFractionTowards(o.outerMidCp2,.35),i("rmtitle"),i("title",{at:o.title,nr:5,title:"brimInterfacing"}),i("hd",{id:"wFull",from:a.seam.edge("left"),to:a.seam.edge("right"),y:o.tipLeft.y-t-15}),i("vd",{id:"hBrim",text:"BOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBs",from:a.outset.edge("bottom"),to:a.inset.edge("bottom"),x:o.innerMid.x-15}),i("vd",{id:"hFull",from:a.outset.edge("bottom"),to:a.inset.edge("topRight"),x:o.tipRight.x+t+18}),r}},Us=new s.pT({data:Is,parts:[Ms,_s,js,Gs,Ys]}),zs={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":{}}')},Js=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}'),$s={name:"gozer.ghost",measurements:["hpsToWaistBack","waistToFloor","head"],draft:({measurements:t,Point:e,points:o,Snippet:i,snippets:a,sa:s,macro:n,expand:r,store:l,units:c,part:p})=>{const h=t.head*(1/24),d=t.head/2.25,f=t.head*(1/12.7),m=t.hpsToWaistBack+t.waistToFloor+t.head/Math.PI,u=d+3*h;let g=m,b="fabric";return o.middle=new e(0,0),o.eyeLine=o.middle.shift(270,d),o.eyeLeft=o.eyeLine.shift(180,f),o.eyeRight=o.eyeLine.shift(0,f),o.left=new e(-1*g,0),o.right=new e(g,0),o.eyeLeft.addCircle(h),o.eyeRight.addCircle(h),r?l.flag.preset("expandIsOn"):(l.flag.note({msg:"gozer:partialPart",notes:[s?"flag:saIncluded":"flag:saExcluded","flag:partPartiallyShownByExpand"],replace:{radius:c(m+s)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),l.flag.preset("expandIsOff"),g=u,b="help note"),o.middle.addCircle(g,b),a.center=new i("notch",o.middle),a.eyeLeft=new i("notch",o.eyeLeft),a.eyeRight=new i("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(m+s)+".")),o.left=new e(-1*g,0),o.right=new e(g,0),o.title=o.middle.shift(10,.5*g),n("title",{nr:1,at:o.title,title:"Gozer",align:"center"}),o.logo=o.middle.shift(200,.6*g),a.logo=new i("logo",o.logo),s&&r&&(o.sa=new e(0,0).addCircle(g+s,b+" sa")),r&&n("hd",{from:o.left,to:o.right,id:"width",y:o.right.y}),n("hd",{from:o.eyeLeft,to:o.middle,id:"eyeh",y:o.eyeLeft.y}),n("vd",{from:o.eyeLeft,to:o.middle,id:"eyew",x:o.eyeLeft.x}),n("hd",{from:o.eyeRight.shift(180,h),to:o.eyeRight.shift(0,h),id:"eyewidth",y:o.eyeRight.y-1.25*h}),n("ld",{from:o.middle,to:o.eyeLeft,id:"eyeradius"}),p}},Xs=new s.pT({data:Js,parts:[$s]}),Qs=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}'),Ks={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"}}}')},Vs=1e3,qs={name:"hi.body",options:{length:Vs,size:{pct:100,min:5,max:500,menu:"style",toAbs:(t,{options:e})=>e?.length?e.length*t:Vs*t,fromAbs:(t,{options:e})=>e?.length?Math.round(1e4*t/e.length)/1e4:Math.round(1e4*t/Vs)/1e4},nosePointiness:{pct:0,min:-5,max:10,menu:"style"},aggressive:{bool:!1,menu:"style"}}
1,draft:({store:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,complete:l,options:c,macro:p,utils:h,part:d})=>{const f=1*c.size;t.set("multiplier",f);const m=117.67274991262845*f,u=124.91298035032229*f,g=255.92397474640785*f,b=201.01260719168837*f,k=134.89080971660005*f,w=49.0386070356816*f,C=225.86340480918992*f,v=66.84760000179512*f,T=40.7278200374142*f,y=23.78799421977402*f,x=57.68530918700182*f,B=98.0662397820983*f,S=91.32736600274856*f,L=295.1097706682888*f,P=209.4263335058177*f,R=152.51537318250902*f,F=255.15294373571314*f,W=71.90453921693678*f,H=32.13103487929059*f,A=23.72518967258217*f,O=44.99353642469105*f,D=42.33568754608812*f,E=62.59332758369697*f,I=40.89285869195256*f,N=176.21501525125487*f,M=130.11389715553065*f,_=29.56689479806765*f,j=104.66860665930352*f,G=8.03497915367552*f,Y=34.57808908832297*f,U=89.11908088619404*f,z=25.54827831772624*f,J=41.24120086757895*f,$=158.23693200387828*f,X=4.87663090668135*f,Q=25.76988630165065*f,K=4.13950105689086*f,V=13.2750849338149*f,q=17.66659910678904*f,Z=17.66533107530116*f,tt=14.46914569005365*f,et=39.51915145850176*f,ot=35.66832366400192*f,it=48.53828530139895*f,at=77.2603605608982*f,st=37.42741381661305*f,nt=74.89746640634775*f,rt=101.16048880857042*f,lt=36.21092864039804*f,ct=63.69410844026312*f,pt=97.90988675818191*f,ht=62.08991689477443*f,dt=22.74982929606286*f,ft=16.57960183478481*f,mt=23.95674278778315*f,ut=24.49741270011998*f,gt=180.18315182058507*f,bt=2.3629811679317316*f,kt=41.01907104018812*f,wt=170.1382393,Ct=39.2280236;let vt=161.5263465;const Tt=142.8538439,yt=103.9416747;i.body01=new o(0,0),i.body02=i.body01.shift(wt,m),i.body03=i.body02.shift(Ct,u),i.body04=i.body03.shift(159.6914424,g),i.body05=i.body04.shift(147.5949161,b),i.body06=i.body05.shift(128.0581973,k),i.body07=i.body06.shift(253.6604388,w),i.body08=i.body07.shift(225.7462208,C),i.body09=i.body08.shift(157.5894683,v),i.body10=i.body09.shift(125.1280145,T),i.body11=i.body10.shift(242.0485099,y),i.body12=i.body11.shift(211.5926663,x),i.body13=i.body12.shift(171.354716,B),i.body14=i.body13.shift(245.2915054,S),i.body15=i.body14.shift(326.7578209,L),i.body16=i.body15.shift(359.0692249,P),i.body17=i.body16.shift(353.6138832,R),i.body18=i.body17.shift(2.546389668,F),i.body19=i.body18.shift(348.3450181,W),i.body01cp1=i.body01.shift(vt,H),i.body02cp1=i.body02.shift(31.95354992,O),i.body03cp1=i.body03.shift(Tt,E),i.body04cp1=i.body04.shift(169.1071046,N),i.body05cp1=i.body05.shift(105.1596015,_),i.body06cp1=i.body06.shift(221.1852544,G),i.body07cp1=i.body07.shift(267.2041495,U),i.body08cp1=i.body08.shift(177.4386949,J),i.body09cp1=i.body09.shift(119.4140746,X),i.body10cp1=i.body10.shift(219.0878163,K),i.body11cp1=i.body11.shift(251.2799387,q),i.body12cp1=i.body12.shift(175.0877187,tt),i.body13cp1=i.body13.shift(260.2392636,ot),i.body14cp1=i.body14.shift(320.929847,at),i.body15cp1=i.body15.shift(22.55298719,nt),i.body16cp1=i.body16.shift(13.89041491,lt),i.body17cp1=i.body17.shift(11.04287338,pt),i.body18cp1=i.body18.shift(356.968813,dt),i.body19cp1=i.body19.shift(51.33608313,mt),i.body01cp2=i.body01.shift(255.6503959,A),i.body02cp2=i.body02.shift(10,D),i.body03cp2=i.body03.shift(225.3745028,I),i.body04cp2=i.body04.shift(350.7775897,M),i.body05cp2=i.body05.shift(288.5890112,j),i.body06cp2=i.body06.shift(344.141322,Y),i.body07cp2=i.body07.shift(87.03164984,z),i.body08cp2=i.body08.shift(358.5040423,$),i.body09cp2=i.body09.shift(299.4139506,Q),i.body10cp2=i.body10.shift(311.9955535,V),i.body11cp2=i.body11.shift(71.28196954,Z),i.body12cp2=i.body12.shift(355.087783,et),i.body13cp2=i.body13.shift(351.4909474,it),i.body14cp2=i.body14.shift(56.95148863,st),i.body15cp2=i.body15.shift(153.1212844,rt),i.body16cp2=i.body16.shift(141.0219905,ct),i.body17cp2=i.body17.shift(138.4852424,ht),i.body18cp2=i.body18.shift(178.1542839,ft),i.body19cp2=i.body19.shift(158.5586388,ut),i.body02=i.body01.shift(wt-1.7,m),i.body01cp2=i.body01.shift(i.body01.angle(i.body19)+(i.body19.angle(i.body01)-i.body19.angle(i.body19cp1)),A),vt=Math.min(i.body01.angle(i.body01cp2)+90*(-1+c.nosePointiness),i.body01.angle(i.body02)-5),i.body01cp1=i.body01.shift(vt,H),i.body03=i.body02.shift(Ct,m),i.body02cp1=i.body02.shift(i.body02.angle(i.body03)-(i.body02.angle(i.body02cp2)-i.body02.angle(i.body01)),D),i.body03cp2=i.body03.shift(i.body03.angle(i.body02)+(i.body01.angle(i.body02)-i.body01.angle(i.body01cp1)),H),i.body03cp1=i.body03.shift(Tt+Math.max(-10,50*c.nosePointiness),E);let xt=(i.body13.angle(i.body13cp1)-i.body13.angle(i.body14)+(i.body14.angle(i.body13)-i.body14.angle(i.body14cp2)))/2;i.body14cp2=i.body14.shift(i.body14.angle(i.body13)-xt,ot),i.body13cp1=i.body13.shift(i.body13.angle(i.body14)+xt,ot),i.eyeBig=i.body01.shift(184.8499937,gt),i.eyeSmall=i.eyeBig.shift(151.2656912,bt*((c.aggressive?0:1)-.5));
1const Bt=.55191502449351,St=18.7757*f,Lt=11.6262*f;i.eyeBigT=i.eyeBig.shift(90,Lt),i.eyeBigB=i.eyeBig.shift(270,Lt).shift(0,c.aggressive?St/1.5:0),i.eyeBigR=i.eyeBig.shift(0,St).shift(270,c.aggressive?Lt/1.5:0),i.eyeBigL=i.eyeBig.shift(180,St),i.eyeBigTcp1=i.eyeBigT.shift(0,Lt*Bt),i.eyeBigTcp2=i.eyeBigT.shift(180,Lt*Bt),i.eyeBigBcp1=i.eyeBigB.shift(180,Lt*Bt),i.eyeBigBcp2=i.eyeBigB.shift(0,Lt*Bt),i.eyeBigRcp1=i.eyeBigR.shift(270,St/(c.aggressive?1.5:1)*Bt),i.eyeBigRcp2=i.eyeBigR.shift(90,St*Bt),i.eyeBigLcp1=i.eyeBigL.shift(90,St*Bt),i.eyeBigLcp2=i.eyeBigL.shift(270,St*Bt),l&&(s.eyeBig=(new a).move(i.eyeBigT).curve(i.eyeBigTcp2,i.eyeBigLcp1,i.eyeBigL).curve(i.eyeBigLcp2,i.eyeBigBcp1,i.eyeBigB).curve(i.eyeBigBcp2,i.eyeBigRcp1,i.eyeBigR).curve(i.eyeBigRcp2,i.eyeBigTcp1,i.eyeBigT));const Pt=1.87089*f*(c.aggressive?1.5:1),Rt=1.5368*f*(c.aggressive?1.5:1);i.eyeSmallT=i.eyeSmall.shift(270,Rt),i.eyeSmallB=i.eyeSmall.shift(90,Rt),i.eyeSmallR=i.eyeSmall.shift(0,Pt),i.eyeSmallL=i.eyeSmall.shift(180,Pt),i.eyeSmallTcp1=i.eyeSmallT.shift(0,Rt*Bt),i.eyeSmallTcp2=i.eyeSmallT.shift(180,Rt*Bt),i.eyeSmallBcp1=i.eyeSmallB.shift(180,Rt*Bt),i.eyeSmallBcp2=i.eyeSmallB.shift(0,Rt*Bt),i.eyeSmallRcp1=i.eyeSmallR.shift(270,Pt*Bt),i.eyeSmallRcp2=i.eyeSmallR.shift(90,Pt*Bt),i.eyeSmallLcp1=i.eyeSmallL.shift(90,Pt*Bt),i.eyeSmallLcp2=i.eyeSmallL.shift(270,Pt*Bt),l&&(s.eyeSmall=(new a).move(i.eyeSmallT).curve(i.eyeSmallTcp2,i.eyeSmallLcp1,i.eyeSmallL).curve(i.eyeSmallLcp2,i.eyeSmallBcp1,i.eyeSmallB).curve(i.eyeSmallBcp2,i.eyeSmallRcp1,i.eyeSmallR).curve(i.eyeSmallRcp2,i.eyeSmallTcp1,i.eyeSmallT)),s.allButDart=(new a).move(i.body03).curve(i.body03cp1,i.body04cp2,i.body04).curve(i.body04cp1,i.body05cp2,i.body05).curve(i.body05cp1,i.body06cp2,i.body06).curve(i.body06cp1,i.body07cp2,i.body07).curve(i.body07cp1,i.body08cp2,i.body08).curve(i.body08cp1,i.body09cp2,i.body09).curve(i.body09cp1,i.body10cp2,i.body10).curve(i.body10cp1,i.body11cp2,i.body11).curve(i.body11cp1,i.body12cp2,i.body12).curve(i.body12cp1,i.body13cp2,i.body13).curve(i.body13cp1,i.body14cp2,i.body14).curve(i.body14cp1,i.body15cp2,i.body15).curve(i.body15cp1,i.body16cp2,i.body16).curve(i.body16cp1,i.body17cp2,i.body17).curve(i.body17cp1,i.body18cp2,i.body18).curve(i.body18cp1,i.body19cp2,i.body19).curve(i.body19cp1,i.body01cp2,i.body01).hide(),s.seam=(new a).move(i.body01).curve(i.body01cp1,i.body02cp2,i.body02).curve(i.body02cp1,i.body03cp2,i.body03).join(s.allButDart).close();const Ft=(new a).move(i.body17).curve(i.body17cp1,i.body18cp2,i.body18);return i.gill1start=Ft.shiftFractionAlong(.018),i.gill2start=Ft.shiftFractionAlong(.098),i.gill3start=Ft.shiftFractionAlong(.178),i.gill4start=Ft.shiftFractionAlong(.258),i.gill5start=Ft.shiftFractionAlong(.338),i.gill1end=i.gill1start.shift(yt,1*kt),i.gill2end=i.gill2start.shift(yt,1.08*kt),i.gill3end=i.gill3start.shift(yt,1.16*kt),i.gill4end=i.gill4start.shift(yt,1.24*kt),i.gill5end=i.gill5start.shift(yt,1.32*kt),l&&(s.gill1=(new a).move(i.gill1start).line(i.gill1end),s.gill2=(new a).move(i.gill2start).line(i.gill2end),s.gill3=(new a).move(i.gill3start).line(i.gill3end),s.gill4=(new a).move(i.gill4start).line(i.gill4end),s.gill5=(new a).move(i.gill5start).line(i.gill5end)),i.finCurve=h.beamsIntersect(i.body05,i.body05cp2,i.body04,i.body04cp1),t.set("tailWidth",i.body13.dist(i.body14)),t.set("tailCpAngle",i.body13.angle(i.body13cp1)-i.body13.angle(i.body14)),t.set("tailCpDist",ot),t.set("topOfFinOpening",i.body16.dist(i.body17)),t.set("topOfFinOpeningLength",(new a).move(i.body16).curve(i.body16cp1,i.body17cp2,i.body17).length()),t.set("faceTopLength",(new a).move(i.body17).curve(i.body17cp1,i.body18cp2,i.body18).curve(i.body18cp1,i.body19cp2,i.body19).length()),t.set("bellyLength",(new a).move(i.body17).curve(i.body17cp1,i.body18cp2,i.body18).curve(i.body18cp1,i.body19cp2,i.body19).length()),t.set("bellyTailLength",(new a).move(i.body15).curve(i.body15cp1,i.body16cp2,i.body16).length()),t.set("tolerance",f<1?1:100*f),i.grainlineFrom=i.body13.shiftFractionTowards(i.body03,.5),p("grainline",{from:i.grainlineFrom,to:i.body03}),t.cutlist.addCut({cut:2,material:"color1UpperBody"}),i.bodyTailSnippet=(new a).move(i.body13).curve(i.body13cp1,i.body14cp2,
1i.body14).shiftFractionAlong(.25),r.bodyTail=new n("bnotch",i.bodyTailSnippet),s.aboveMouth=(new a).move(i.body17).curve(i.body17cp1,i.body18cp2,i.body18).attr("data-text-class","text-xs"),p("banner",{path:s.aboveMouth,text:"aboveMouth",id:"aboveMouth",dy:0,spaces:0,repeat:1}),s.belly=(new a).move(i.body15).curve(i.body15cp1,i.body16cp2,i.body16).attr("data-text-class","text-xs"),p("banner",{path:s.belly,text:"belly",id:"belly",dy:0,spaces:10,repeat:3}),s.topOfFin=(new a).move(i.body16).curve(i.body16cp1,i.body17cp2,i.body17).attr("class","hidden").attr("data-text-class","text-xs"),p("banner",{path:s.topOfFin,text:"topOfFin",id:"topOfFin",dy:0,spaces:10,repeat:3}),s.tail=(new a).move(i.body13).curve(i.body13cp1,i.body14cp2,i.body14).attr("class","hidden").attr("data-text-class","text-xs"),p("banner",{path:s.tail,text:"tail",id:"tail",dy:0,spaces:14,repeat:3}),p("ld",{from:i.body13,to:i.body01,d:-5,id:"bodyLength",force:l}),i.titleAnchor=i.body04.shiftFractionTowards(i.body17,.4),i.logoAnchor=i.body06.shiftFractionTowards(i.body16,.6),i.gridAnchor=i.logoAnchor.clone(),i.scaleboxAnchor=f<.35?new o(i.body06.x-60-e,i.body11.y-35-e):i.titleAnchor.shiftFractionTowards(i.body14,.5),r.logo=new n("logo",i.logoAnchor).attr("data-scale",f>1?1:f),p("title",{at:i.titleAnchor,nr:1,title:"body",scale:f}),p("hd",{from:i.body14,to:i.body15,y:i.body19.y+e+10,id:"tailToBody"}),p("hd",{from:i.body15,to:i.body16,y:i.body19.y+e+10,id:"bodyWidth"}),p("hd",{from:i.body16,to:i.body17,y:i.body19.y+e+10,id:"finWidth"}),p("hd",{from:i.body17,to:i.body19,y:i.body19.y+e+10,id:"finToMiddle"}),p("hd",{from:i.body19,to:i.body01,y:i.body19.y+e+10,noStartMarker:!0,noEndMarker:!0,id:"middleToTip"}),p("hd",{from:i.gill1start,to:i.gill5start,y:i.body19.y+e+20,id:"gillWidth"}),p("hd",{from:i.eyeBig,to:i.body19,y:i.body19.y+e+20,id:"eyeToMiddle"}),p("hd",{from:i.eyeBigL,to:i.eyeBigR,y:i.eyeBigT.y-10,id:"eyeWidth",noStartMarker:!0,noEndMarker:!0}),p("hd",{from:i.body14,to:i.body13,y:i.body06.y-e-5,id:"tailWidth"}),p("hd",{from:i.body13,to:i.body10,y:i.body06.y-e-5,id:"tailTo1stFin"}),p("hd",{from:i.body10,to:i.body06,y:i.body06.y-e-5,id:"1stFinTo2ndFin"}),p("hd",{from:i.body06,to:i.finCurve,y:i.body06.y-e-5,id:"2ndFinToBody"}),p("hd",{from:i.finCurve,to:i.body03,y:i.body06.y-e-5,id:"2ndFinToTip"}),p("hd",{from:i.body03,to:i.body01,y:i.body06.y-e-5,id:"tipToMiddle",noStartMarker:!0,noEndMarker:!0}),p("hd",{from:i.body02,to:i.body03,y:i.body06.y-e+10,id:"topDartDepth"}),p("hd",{from:i.body02,to:i.body01,y:i.body06.y-e+20,id:"bottomDartDepth"}),p("vd",{from:i.body19,to:i.body14,x:i.body14.x-e-10,id:"heightTail"}),p("vd",{from:i.body15,to:i.body14,x:i.body14.x-e-20,id:"bodyToTail"}),p("vd",{from:i.body14,to:i.body13,x:i.body14.x-e-20,id:"tailHeight"}),p("vd",{from:i.body14,to:i.body10,x:i.body14.x-e-30,id:"tailTo1stFin"}),p("vd",{from:i.body14,to:i.body08,x:i.body14.x-e-10,id:"tailToBetweenFins"}),p("vd",{from:i.body10,to:i.body06,x:i.body14.x-e-30,id:"heightFinToFin"}),p("vd",{from:i.body01,to:i.body19,x:i.body01.x+e+10,id:"middleToDart"}),p("vd",{from:i.body02,to:i.body19,x:i.body01.x+e+20,id:"middleToBackOfDart"}),p("vd",{from:i.body03,to:i.body01,x:i.body01.x+e+10,id:"dartToDart"}),p("vd",{from:i.finCurve,to:i.body02,x:i.body01.x+e+20,id:"dartToFinCurve"}),p("vd",{from:i.body06,to:i.finCurve,x:i.body01.x+e+20,id:"finCurveToFin"}),f>.4&&p("vd",{from:i.gill5end,to:i.gill5start,x:i.gill5start.x+5,id:"gillHeight",noStartMarker:!0,noEndMarker:!0}),p("scalebox",{at:i.scaleboxAnchor}),e&&(s.sa=s.allButDart.close().offset(e).attr("class","fabric sa")),d}},Zs={name:"hi.tail",after:qs,draft:({store:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,macro:l,part:c})=>{const p=t.get("multiplier"),h=192.0129724628*p,d=115.38057785000036*p,f=230.05210782342334*p,m=95.12771141996424*p,u=156.52907796955816*p,g=33.33694275124821*p,b=20.1307852802616*p,k=26.418081118809575*p,w=41.577*p,C=41.575999999999965*p,v=18.83137554720844*p,T=18.830271479721173*p,y=38.59528397356339*p,x=126.7372982195849*p;return i.tail01=new o(0,0),i.tail02=i.tail01.shift(53.242955551234914,h),i.tail03=i.tail01.shift(106.95066736265407,d),i.tail04=i.tail01.shift(138.66344842617497,f),i.tail05=i.tail01.shift(173.38284569091573,m),i.tail01cp1=i.tail01.shift(40.69161792982998,u),i.tail01cp2=i.tail01.shift(150.8191939475001,g),i.tail02cp1=i.tail02.shift(129.66709301725697,b),i.tail02cp2=i.tail02.shift(303.9168409570558,k),i.tail03cp1=i.tail03.shift(180,w),i.tail03cp2=i.tail03.shift(-0,C),i.tail04cp1=i.tail04.shift(218.473541437
177738,v),i.tail04cp2=i.tail04.shift(38.483984913053284,T),i.tail05cp1=i.tail05.shift(14.169822482118544,y),i.tail05cp2=i.tail05.shift(128.3396902984,x),i.tail05=i.tail01.shift(i.tail01.angle(i.tail05),t.get("tailWidth")),i.tail01cp2=i.tail01.shift(i.tail01.angle(i.tail05)-t.get("tailCpAngle"),t.get("tailCpDist")),i.tail05cp1=i.tail05.shift(i.tail05.angle(i.tail01)+t.get("tailCpAngle"),t.get("tailCpDist")),s.seam=(new a).move(i.tail01).curve(i.tail01cp1,i.tail02cp2,i.tail02).curve(i.tail02cp1,i.tail03cp2,i.tail03).curve(i.tail03cp1,i.tail04cp2,i.tail04).curve(i.tail04cp1,i.tail05cp2,i.tail05).curve(i.tail05cp1,i.tail01cp2,i.tail01).close(),t.cutlist.addCut({material:"color1UpperBody"}),i.tailSnippet=(new a).move(i.tail01).curve(i.tail01cp2,i.tail05cp1,i.tail05).shiftFractionAlong(.25),r.tail=new n("bnotch",i.tailSnippet),s.body=(new a).move(i.tail05).curve(i.tail05cp1,i.tail01cp2,i.tail01).attr("class","hidden").attr("data-text-class","text-xs"),i.titleAnchor=i.tail03.shiftFractionTowards(i.tail01,.4),i.logoAnchor=i.tail03.shiftFractionTowards(i.tail05,.5),i.gridAnchor=i.tail03.clone(),i.tailLeft=(new a).move(i.tail03).curve(i.tail03cp1,i.tail04cp2,i.tail04).curve(i.tail04cp1,i.tail05cp2,i.tail05).edge("left"),i.tailRight=(new a).move(i.tail01).curve(i.tail01cp1,i.tail02cp2,i.tail02).curve(i.tail02cp1,i.tail03cp2,i.tail03).edge("right"),i.tailTopLeft=(new a).move(i.tail03).curve(i.tail03cp1,i.tail04cp2,i.tail04).curve(i.tail04cp1,i.tail05cp2,i.tail05).edge("top"),i.tailTopRight=(new a).move(i.tail01).curve(i.tail01cp1,i.tail02cp2,i.tail02).curve(i.tail02cp1,i.tail03cp2,i.tail03).edge("top"),r.logo=new n("logo",i.logoAnchor).attr("data-scale",(p>1?1:p)/2),l("title",{at:i.titleAnchor,nr:3,title:"tail",scale:(p>1?1:p)/2}),l("banner",{path:s.body,text:"body",id:"body",dy:0,spaces:10,repeat:3}),l("hd",{from:i.tailLeft,to:i.tail05,y:i.tail01.y+e+10,id:"leftToBody"}),l("hd",{from:i.tail05,to:i.tail01,y:i.tail01.y+e+10,id:"bodyWidth"}),l("hd",{from:i.tail01,to:i.tailRight,y:i.tail01.y+e+10,id:"bodyToRight"}),l("hd",{from:i.tailLeft,to:i.tail03,y:i.tailTopRight.y-e-10,id:"leftToMid"}),l("hd",{from:i.tail03,to:i.tailRight,y:i.tailTopRight.y-e-10,id:"midToRight"}),l("vd",{from:i.tailTopLeft,to:i.tail03,x:i.tail03.x-20,id:"leftToMid"}),l("vd",{from:i.tail05,to:i.tailTopLeft,x:i.tailLeft.x-e-20,id:"heightLeft"}),l("vd",{from:i.tailTopRight,to:i.tail01,x:i.tailRight.x+e+20,id:"heightRight"}),l("vd",{from:i.tail03,to:i.tail01,x:i.tail01.x+20,id:"rightToMid"}),l("vd",{from:i.tail05,to:i.tail03,x:i.tail05.x-20,id:"leftToMid"}),e&&(s.sa=s.seam.offset(e).attr("class","fabric sa")),c}};function tn(t,e,o,i,a){const{Path:n,points:r,Point:l,options:c}=a.shorthand(),p=new s.wA(...t),h=t[3],d=(new n).move(t[0]),f=(new n).move(t[0].flipX(h)),m=p.getLUT(e+2),u=(i-o)/e;for(const s in m){const t=o+u*(s-1),{x:e,y:i}=m[s];r[`leftTooth${s}`]=new l(e,i),r[`rightTooth${s}`]=r[`leftTooth${s}`].flipX(h);const a=p.normal(m[s].t);r[`leftTooth${s}Cp`]=new l(e-t*a.x,i-t*a.y),r[`rightTooth${s}Cp`]=r[`leftTooth${s}Cp`].flipX(h),s>0&&s%2==0&&(c.aggressive?(r[`leftTooth${s}Tip`]=r[`leftTooth${s-2}Cp`].shiftFractionTowards(r[`leftTooth${s}Cp`],.5),r[`rightTooth${s}Tip`]=r[`leftTooth${s}Tip`].flipX(h),d.curve(r[`leftTooth${s}Tip`],r[`leftTooth${s}Tip`],r[`leftTooth${s}`]),f.curve(r[`rightTooth${s}Tip`],r[`rightTooth${s}Tip`],r[`rightTooth${s}`])):(d.curve(r[`leftTooth${s-2}Cp`],r[`leftTooth${s}Cp`],r[`leftTooth${s}`]),f.curve(r[`rightTooth${s-2}Cp`],r[`rightTooth${s}Cp`],r[`rightTooth${s}`])))}return d.join(f.reverse())}const en={name:"hi.lowerTeeth",after:qs,draft:({store:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,macro:l,part:c})=>{const p=t.get("multiplier"),h=75.74338717643937*p,d=47.74891452755759*p,f=27.774046078481962*p;if(i.lowerTeeth01=new o(0,0),i.lowerTeeth02=i.lowerTeeth01.shift(205.41423660609973,h),i.lowerTeeth01cp2=i.lowerTeeth01.shift(180,f),i.lowerTeeth02cp1=i.lowerTeeth02.shift(42.59332849750379,d),i.lowerTeeth02cp1=i.lowerTeeth02.shiftTowards(i.lowerTeeth02cp1,i.lowerTeeth01cp2.dist(i.lowerTeeth01)),i.lowerTeeth03=i.lowerTeeth02.flipX(),i.lowerTeeth01cp1=i.lowerTeeth01cp2.flipX(),i.lowerTeeth03cp2=i.lowerTeeth02cp1.flipX(),s.seam=(new a).move(i.lowerTeeth02).curve(i.lowerTeeth02cp1,i.lowerTeeth01cp2,i.lowerTeeth01).curve(i.lowerTeeth01cp1,i.lowerTeeth03cp2,i.lowerTeeth03),t.set("lowerTeethLength",s.seam.length()),s.teeth=tn([i.lowerTeeth02,i.lowerTeeth02cp1,i.lowerTeeth01cp2,i.lowerTeeth01],10,8*p,16*p,c),t.cutlist.addCut({cut:1,material:"color4Teeth"}),r.lowerTeeth=new n("bnotch",i.lowerTeeth01),i.titleAnchor=i.lowerTeeth02.shiftFractionTowards(i.lowerTeeth03,.5),i.gridAnchor=i.titleAnchor.clone(),s.bbox=(new a).move(i.lowerTeeth02).move(new o(i.lowerTeeth03.x,1.75*i.lowerTeeth03.y)),l("title",{at:i.titleAnchor,nr:9,title:"lowerTeeth",scale:p/2}),l("hd",{from:i.lowerTeeth01,to:i.lowerTeeth03,y:i.lowerTeeth02.y+e+10,noStartMarker:!0,noEndMarker:!0,id:"right"}),l("hd",{from:i.lowerTeeth02,to:i.lowerTeeth01,y:i.lowerTeeth02.y+e+10,noStartMarker:!0,noEndMarker:!0,id:"left"}),l("vd",{from:i.lowerTeeth02,to:i.lowerTeeth01,x:i.lowerTeeth02.x-e-10,noStartMarker:!0,noEndMarker:!0,id:"height"}),l("vd",{from:i.lowerTeeth01,to:s.teeth.edge("top"),x:i.lowerTeeth02.x-e-10,noStartMarker:!0,noEndMarker:!0,id:"teethHeight"}),e){let t=s.seam.offset(e);s.sa=(new a).move(s.seam.start()).line(t.start()).join(t).line(s.seam.end()).attr("class","fabric sa")}return c}},on={name:"hi.upperTeeth",after:qs,draft:({store:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,macro:l,part:c})=>{const p=t.get("multiplier"),h=131.305041182736*p,d=64.30113337316406*p,f=48.33100000000002*p;if(i.upperTeeth01=new o(0,0),i.upperTeeth02=i.upperTeeth01.shift(34.147056946748805,h),i.upperTeeth01cp2=i.upperTeeth01.shift(0,f),i.upperTeeth02cp1=i.up
1perTeeth02.shift(235.1335930733262,d),i.upperTeeth02cp1=i.upperTeeth02.shiftTowards(i.upperTeeth02cp1,i.upperTeeth01cp2.dist(i.upperTeeth01)),i.upperTeeth03=i.upperTeeth02.flipX(),i.upperTeeth01cp1=i.upperTeeth01cp2.flipX(),i.upperTeeth03cp2=i.upperTeeth02cp1.flipX(),s.seam=(new a).move(i.upperTeeth02).curve(i.upperTeeth02cp1,i.upperTeeth01cp2,i.upperTeeth01).curve(i.upperTeeth01cp1,i.upperTeeth03cp2,i.upperTeeth03),t.set("upperTeethLength",s.seam.length()),s.teeth=tn([i.upperTeeth03,i.upperTeeth03cp2,i.upperTeeth01cp1,i.upperTeeth01],14,9*p,18*p,c),t.cutlist.addCut({cut:1,material:"color4Teeth"}),r.upperTeeth=new n("bnotch",i.upperTeeth01),i.titleAnchor=i.upperTeeth02.shiftFractionTowards(i.upperTeeth03,.5).shiftFractionTowards(i.upperTeeth01,.5),i.gridAnchor=i.upperTeeth01,l("title",{at:i.titleAnchor,nr:8,title:"upperTeeth",scale:p/2}),l("hd",{from:i.upperTeeth03,to:i.upperTeeth01,y:i.upperTeeth02.y-10,noStartMarker:!0,noEndMarker:!0,id:"left"}),l("hd",{from:i.upperTeeth01,to:i.upperTeeth02,y:i.upperTeeth02.y-10,noStartMarker:!0,noEndMarker:!0,id:"right"}),l("vd",{from:i.upperTeeth01,to:s.teeth.edge("top"),x:i.leftTooth0.x-e-10,noStartMarker:!0,noEndMarker:!0,id:"height"}),e){let t=s.seam.reverse().offset(e);s.sa=(new a).move(s.seam.end()).line(t.start()).join(t).line(s.seam.start()).attr("class","fabric sa")}return c}},an={name:"hi.mouth",after:[en,on],draft:({store:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,macro:l,part:c})=>{const p=t.get("multiplier"),h=141.93684055893488*p,d=42.496*p,f=38.6204*p,m=59.58739935676417*p,u=73.53520117766728*p,g=33.142*p;return i.mouth01=new o(0,0),i.mouth02=i.mouth01.shift(312.8254216093024,h),i.mouth03=i.mouth01.shift(270,d),i.mouth01cp1=i.mouth01.shift(0,f),i.mouth02cp1=i.mouth02.shift(128.07726051101747,m),i.mouth02cp2=i.mouth02.shift(95.21339058299296,u),i.mouth03cp2=i.mouth03.shift(0,g),i.mouth04=i.mouth02.flipX(),i.mouth01cp2=i.mouth01cp1.flipX(),i.mouth04cp2=i.mouth02cp1.flipX(),i.mouth04cp1=i.mouth02cp2.flipX(),i.mouth03cp1=i.mouth03cp2.flipX(),s.aboveMouth=(new a).move(i.mouth02).curve(i.mouth02cp2,i.mouth01cp1,i.mouth01).curve(i.mouth01cp2,i.mouth04cp1,i.mouth04).attr("data-text-class","text-xs"),s.belly=(new a).move(i.mouth04).curve(i.mouth04cp2,i.mouth03cp1,i.mouth03).curve(i.mouth03cp2,i.mouth02cp1,i.mouth02).attr("data-text-class","text-xs"),s.seam=(new a).move(i.mouth02).join(s.aboveMouth).join(s.belly).close(),t.set("mouthTopLength",(new a).move(i.mouth01).curve(i.mouth01cp1,i.mouth02cp2,i.mouth02).length()),t.set("mouthBottomLength",(new a).move(i.mouth03).curve(i.mouth03cp1,i.mouth04cp2,i.mouth04).length()),t.cutlist.addCut({cut:1,material:"color3Mouth"}),i.mouthUpperTeeth1=(new a).move(i.mouth01).curve(i.mouth01cp1,i.mouth02cp2,i.mouth02).shiftAlong(t.get("upperTeethLength")/2),i.mouthUpperTeeth2=(new a).move(i.mouth01).curve(i.mouth01cp2,i.mouth04cp1,i.mouth04).shiftAlong(t.get("upperTeethLength")/2),r.mouthUpperTeeth1=new n("bnotch",i.mouthUpperTeeth1),r.mouthUpperTeeth2=new n("bnotch",i.mouthUpperTeeth2),i.mouthlowerTeeth1=(new a).move(i.mouth03).curve(i.mouth03cp1,i.mouth04cp2,i.mouth04).shiftAlong(t.get("lowerTeethLength")/2),i.mouthlowerTeeth2=(new a).move(i.mouth03).curve(i.mouth03cp2,i.mouth02cp1,i.mouth02).shiftAlong(t.get("lowerTeethLength")/2),r.mouthlowerTeeth1=new n("bnotch",i.mouthlowerTeeth1),r.mouthlowerTeeth2=new n("bnotch",i.mouthlowerTeeth2),r.mouthMidTop=new n("bnotch",i.mouth01),r.mouthMidBottom=new n("bnotch",i.mouth03),l("banner",{path:s.aboveMouth,text:"aboveMouth",id:"aboveMouth",dy:0,spaces:4,repeat:6}),l("banner",{path:s.belly,text:"belly",id:"belly",dy:0,spaces:4,repeat:6}),i.titleAnchor=i.mouth01.shiftFractionTowards(i.mouth02,.33),i.logoAnchor=i.mouth01.shiftFractionTowards(i.mouth04,.3),i.gridAnchor=i.mouth03.clone(),r.logo=new n("logo",i.logoAnchor).attr("data-scale",(p>1?1:p)/2),l("title",{at:i.titleAnchor,nr:4,title:"mouth",scale:(p>1?1:p)/2}),l("hd",{from:i.mouth03,to:i.mouth02,y:i.mouth02.y+e+10,id:"right"}),l("hd",{from:i.mouth04,to:i.mouth03,y:i.mouth02.y+e+10,id:"left"}),l("vd",{from:i.mouth04,to:i.mouth03,x:i.mouth04.x-e-10,id:"heightInside"}),l("vd",{from:i.mouth03,to:i.mouth01,x:i.mouth04.x-e-10,id:"heightOutside"}),e&&(s.sa=s.seam.offset(e).attr("class","fabric sa")),c}},sn={name:"hi.aboveMouth",after:[qs,an],draft:({store:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,macro:l,part:c})=>{const p=t.get("multiplier"),h=t.get("faceTopLength");let d=266.7238454769277*p;const f=28.348200101593726*p;let m=57.858419828059574*p;const u=62.927189989701574*p,g=169.53367533325053*p,b=172.36585117998288*p,k=66.94005927693816*p;let w=0,C=0;do{i.aboveMouth01=new o(0,0),i.aboveMouth02=i.aboveMouth01.shift(353.4089695458119,d),i.aboveMouth03=i.aboveMouth02.shift(233.13495309848912,f),i.aboveMouth04=i.aboveMouth01.shift(208.91023166349467,m),i.aboveMouth01cp1=i.aboveMouth01.shift(298.7196048714283,u),i.aboveMouth02cp2=i.aboveMouth02.shift(195.1209034747764,g),i.aboveMouth03cp1=i.aboveMouth03.shift(197.87876803095696,b),i.aboveMouth04cp2=i.aboveMouth04.shift(308.8121959753343,k),w=h-(new a).move(i.aboveMouth03).curve(i.aboveMouth03cp1,i.aboveMouth04cp2,
1i.aboveMouth04).length(),d+=w,m+=w,C++}while(Math.abs(w)>t.get("tolerance")&&C<100);s.aboveMouthAttachment=(new a).move(i.aboveMouth01).line(i.aboveMouth04).attr("data-text-class","text-xs"),s.bodyAttachment=(new a).move(i.aboveMouth04).curve(i.aboveMouth04cp2,i.aboveMouth03cp1,i.aboveMouth03).attr("data-text-class","text-xs"),s.finAttachment=(new a).move(i.aboveMouth03).line(i.aboveMouth02).attr("data-text-class","text-xs"),s.bellyAndMouthAttachment=(new a).move(i.aboveMouth02).curve(i.aboveMouth02cp2,i.aboveMouth01cp1,i.aboveMouth01),s.seam=(new a).move(i.aboveMouth01).join(s.aboveMouthAttachment).join(s.bodyAttachment).join(s.finAttachment).join(s.bellyAndMouthAttachment).close(),t.set("aboveMouthTopLength",s.bodyAttachment.length()),t.set("aboveMouthBottomLength",s.bellyAndMouthAttachment.length()),t.set("aboveMouthFinLength",i.aboveMouth02.dist(i.aboveMouth03)),t.cutlist.addCut({cut:2,material:"color2Belly"}),i.gridAnchor=i.aboveMouth04.clone(),i.aboveMouthSnippet=(new a).move(i.aboveMouth01).curve(i.aboveMouth01cp1,i.aboveMouth02cp2,i.aboveMouth02).shiftAlong(t.get("mouthTopLength")),r.mouth=new n("bnotch",i.aboveMouthSnippet),i.aboveMouthBottom=s.seam.edge("bottom"),i.aboveMouthTop=(new a).move(i.aboveMouth01).curve(i.aboveMouth01cp1,i.aboveMouth02cp2,i.aboveMouth02).edge("bottom"),i.titleAnchor=i.aboveMouth04.shiftFractionTowards(i.aboveMouth01cp1,.5),i.logoAnchor=i.aboveMouth01cp1.shiftFractionTowards(i.aboveMouth02cp2,.5),r.logo=new n("logo",i.logoAnchor).attr("data-scale",(p>1?1:p)/4),l("title",{at:i.titleAnchor,nr:5,title:"aboveMouth",scale:p/2});let v=s.bellyAndMouthAttachment.split(i.aboveMouthSnippet);return s.bellyAttachment=v[0].attr("data-text-class","text-xs"),s.mouthAttachment=v[1].attr("data-text-class","text-xs"),l("banner",{path:s.aboveMouthAttachment,text:"aboveMouth",id:"aboveMouth",dy:-0,spaces:0,repeat:1}),l("banner",{path:s.bodyAttachment,text:"body",id:"body",dy:0,spaces:10,repeat:7}),l("banner",{path:s.finAttachment,text:"+",id:"plus",dy:0,spaces:0,repeat:4}),l("banner",{path:s.bellyAttachment,text:"belly",id:"belly",dy:0,spaces:4,repeat:3}),l("banner",{path:s.mouthAttachment,text:"mouth",id:"mouth",dy:0,spaces:4,repeat:3}),l("hd",{from:i.aboveMouth04,to:i.aboveMouth01,y:i.aboveMouth01.y-e-10,id:"widthCorners"}),l("hd",{from:i.aboveMouth01,to:i.aboveMouth02,y:i.aboveMouth01.y-e-10,id:"cornerToMid"}),l("hd",{from:i.aboveMouthSnippet,to:i.aboveMouth02,y:i.aboveMouth01.y,id:"widthToSnippet"}),l("vd",{from:i.aboveMouth04,to:i.aboveMouth01,x:i.aboveMouth04.x-e-15}),l("vd",{from:i.aboveMouthBottom,to:i.aboveMouth04,x:i.aboveMouth04.x-e-15,id:"bottomToCornerLeft"}),l("vd",{from:i.aboveMouthBottom,to:i.aboveMouthTop,x:i.aboveMouth04.x-e,id:"minimalHeight"}),l("vd",{from:i.aboveMouth02,to:i.aboveMouth03,x:i.aboveMouth02.x+e+10,id:"heightCornersRight"}),l("vd",{from:i.aboveMouth03,to:i.aboveMouthBottom,x:i.aboveMouth02.x+e+10,id:"bottomToCornerRight"}),e&&(s.sa=s.seam.offset(e).attr("class","fabric sa")),c}},nn={name:"hi.belly",after:[qs,sn],options:{hungry:{pct:50,min:0,max:100,menu:"style"}},draft:({store:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,options:l,macro:c,part:p})=>{const h=t.get("multiplier"),d=t.get("bellyTailLength"),f=224.8451041*h,m=108.1988389*h,u=216.7485605*h,g=129.2449198*h,b=231.4386252*h,k=65.65512143*h,w=38.20949996*h,C=37.73513423*h,v=118.6453123*h,T=54.50254779*h,y=40.6827883*h,x=52.08589469*h,B=62.46560129*h,S=48.20828587*h,L=68*h,P=65.42602302*h;i.belly10=new o(0,0),i.belly01=i.belly10.shift(163.4959859,g),i.belly02=i.belly01.shift(25.7020193,f),i.belly03=i.belly02.shift(2.2164353,m),i.belly04=i.belly03.shift(338.0869319,u),i.belly05=i.belly10.shift(0,b),i.belly01.y=i.belly01.y*(1.1-l.hungry/5),i.belly02.y=i.belly02.y*(1.1-l.hungry/5),i.belly03.y=i.belly03.y*(1.1-l.hungry/5),i.belly04.y=i.belly04.y*(1.1-l.hungry/5),i.belly01cp1=i.belly01.shift(60.117233,k),i.belly02cp1=i.belly02.shift(331.7898702,C),i.belly03cp1=i.belly03.shift(349.861397,T),i.belly04cp1=i.belly04.shift(204.8857575,x),i.belly05cp1=i.belly05.shift(8.1545383,S),i.belly01cp2=i.belly01.shift(327.4394109,w),i.belly02cp2=i.belly02.shift(182.9449647,v),i.belly03cp2=i.belly03.shift(200.1533738,y),i.belly04cp2=i.belly04.shift(145.9357065,B),i.belly05cp2=i.belly05.shift(5,L),i.belly10cp1=i.belly10.shift(175.9644604,P);const R=t.get("aboveMouthBottomLength")-t.get("mouthTopLength")+t.get("mouthBottomLength");let F=0,W=0;do{i.belly01.x-=F,i.belly01cp1.x-=F,i.belly01cp2.x-=F,W++,F=R-(new a).move(i.belly01).curve(i.belly01cp1,i.belly02cp2,i.belly02).length()}while(Math.abs(F)>t.get("tolerance")&&W<100);F=0,W=0;do{i.belly04.x+=F,i.belly04cp1.x+=F,i.belly04cp2.x+=F,i.belly05.x+=F,i.belly05cp2.x+=F,W++,F=d-(new a).move(i.belly03).curve(i.belly03cp1,i.belly04cp2,i.belly04).length()}while(Math.abs(F)>t.get("tolerance")&&W<100);i.belly05cp1=i.belly05cp2.flipY(),i.belly06=i.belly04.flipY(),i.belly06cp1=i.belly04cp2.flipY(),i.belly06cp2=i.belly04cp1.flipY(),i.belly07=i.belly03.flipY(),i.belly07cp1=i.belly03cp2.flipY(),i.belly07cp2=i.belly03cp1.flipY(),i.belly08=i.belly02.flipY(),i.belly08cp1=i.belly02cp2.flipY(),i.belly08cp2=i.belly02cp1.flipY(),i.belly09=i.belly01.flipY(),i.belly09cp1=i.belly01cp2.flipY(),i.belly09cp2=i.belly01cp1.flipY(),i.belly10cp2=i.belly10cp1.flipY(),s.body1=(new a).move(i.belly04).curve(i.belly04cp2,i.belly03cp1,i.belly03).attr("data-text-class","text-xs"),s.body2=(new a).move(i.belly07).curve(i.belly07cp2,i.belly06cp1,i.belly06).attr("data-text-class","text-xs"),s.finAttachmentBelly1=(new a).move(i.belly03).curve(i.belly03cp2,i.belly02cp1,i.belly02).attr("data-text-class","text-xs"),s.finAttachmentBelly2=(new a).move(i.belly08).curve(i.belly08cp2,i.belly07cp1,i.belly07).attr("data-text-class","text-xs"),s.mouthAttachment1=(new a).move(i.belly02).curve(i.belly02cp2,i.belly01cp1,i.belly01),s.mouthAttachment2=(new a).move(i.belly09).curve(i.belly09cp2,i.belly08cp1,i.belly08),s.top=(new a).move(i.belly04).join(s.body1).join(s.finAttachmentBelly1).join(s.mouthAttachment1).hide(),s.bottom=(new a).move(i.belly09).join(s.mouthAttachment2).join(s.finAttachmentBelly2).join(s.body2).hide(),s.seam=(new a).move(i.belly01).curve(i.belly01cp2,i.belly10cp1,i.belly10).curve(i.belly10cp2,i.belly09cp1,i.belly09).join(s.bottom).curve(i.belly06cp2,i.belly05cp1,i.belly05).curve(i.belly05cp2,i.belly04cp1,i.belly04).join(s.top).close().unhide(),t.set("bellyFinLength",(new a).move(i.belly02).curve(i.belly02cp1,i.belly03cp2,i.belly03).length()),i.grainlineFrom=new o(i.belly10.x,.7*i.belly02.y),i.grainlineTo=new o(i.belly05.x,.7*i.belly02.y),c("grainline",{from:i.grainlineFrom,to:i.grainlineTo}),t.cutlist.addCut({cut:1,material:"color2Belly"}),i.titleAnchor=i.belly05.shiftFractionTowards(i.belly10,.5),i.logoAnchor=i.belly10.shiftFractionTowards(i.titleAnchor,.5),i.gridAnchor=i.titleAnchor.clone(),r.logo=new n("logo",i.logoAnchor).attr("data-scale",h>
11?1:h),c("title",{at:i.titleAnchor,nr:2,title:"belly",scale:h}),i.bellyMouthSnippet1=s.mouthAttachment1.reverse().shiftAlong(t.get("mouthBottomLength")),i.bellyMouthSnippet2=s.mouthAttachment2.reverse().shiftAlong(t.get("mouthBottomLength")),r.mouth1=new n("bnotch",i.bellyMouthSnippet1),r.mouth2=new n("bnotch",i.bellyMouthSnippet2),c("banner",{path:s.finAttachmentBelly1,text:"-o-",id:"circles1",dy:0,spaces:3,repeat:7}),c("banner",{path:s.finAttachmentBelly2,text:"-o-",id:"circles2",dy:0,spaces:3,repeat:7});const H=s.mouthAttachment1.split(i.bellyMouthSnippet1),A=s.mouthAttachment2.split(i.bellyMouthSnippet2);return s.mouth1=H[1].attr("data-text-class","text-xs"),s.mouth2=A[0].attr("data-text-class","text-xs"),s.aboveMouth1=H[0].attr("data-text-class","text-xs"),s.aboveMouth2=A[1].attr("data-text-class","text-xs"),c("banner",{path:s.mouth1,text:"mouth",id:"mouth1",dy:0,spaces:3,repeat:3}),c("banner",{path:s.mouth2,text:"mouth",id:"mouth2",dy:0,spaces:3,repeat:3}),c("banner",{path:s.body1,text:"body",id:"body1",dy:0,spaces:3,repeat:3}),c("banner",{path:s.body2,text:"body",id:"body2",dy:0,spaces:3,repeat:3}),c("banner",{path:s.aboveMouth1,text:"aboveMouth",id:"aboveMouth1",dy:0,spaces:3,repeat:3}),c("banner",{path:s.aboveMouth2,text:"aboveMouth",id:"aboveMouth2",dy:0,spaces:3,repeat:3}),c("hd",{from:i.belly01,to:i.belly10,y:i.belly01.y,id:"depthLeftDart"}),c("hd",{from:i.belly05,to:i.belly04,y:i.belly04.y,id:"depthRightDart"}),c("hd",{from:i.belly10,to:i.belly05,y:(i.belly04.y+i.belly01.y)/2,id:"widthbetweenDarts"}),c("hd",{from:i.belly01,to:i.belly02,y:i.belly02.y-e-10,id:"leftToFin"}),c("hd",{from:i.belly02,to:i.belly03,y:i.belly02.y-e-10,id:"finWidth"}),c("hd",{from:i.belly03,to:i.belly04,y:i.belly02.y-e-10,id:"rightToFin"}),c("hd",{from:i.bellyMouthSnippet1,to:i.belly02,y:i.bellyMouthSnippet1.y,id:"finToSnippet"}),c("vd",{from:i.belly05,to:i.belly07,x:i.belly03.x,id:"rightFinToMiddle"}),c("vd",{from:i.belly08,to:i.belly10,x:i.belly02.x,id:"leftFinToMiddle"}),c("vd",{from:i.belly09,to:i.belly10,x:i.belly01.x-e-10,id:"heightLeftDart"}),c("vd",{from:i.belly09,to:i.belly08,x:i.belly01.x-e-10,id:"heightLeft"}),c("vd",{from:i.belly05,to:i.belly06,x:i.belly04.x+e+10,id:"heightRightDart"}),c("vd",{from:i.belly06,to:i.belly07,x:i.belly04.x+e+10,id:"heightRight"}),e&&(s.sa=s.bottom.join(s.top).close().offset(e).attr("class","fabric sa")),p}},rn={name:"hi.topOfFin",after:qs,draft:({store:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,macro:l,part:c})=>{const p=t.get("multiplier");let h=t.get("topOfFinOpening");const d=t.get("topOfFinOpeningLength"),f=256.9537569065251*p,m=178.52481158058*p,u=27.240286624072077*p,g=25.871054481794893*p,b=12.154549189501026*p,k=39.024661651837555*p,w=76.08965682877273*p;let C=0,v=0;do{i.topOfFin01=new o(0,0),i.topOfFin02=i.topOfFin01.shift(325.46697637215823,f),i.topOfFin03=i.topOfFin01.shift(275.4353725228365,h),i.topOfFin01cp1=i.topOfFin01.shift(346.31732410079576,m),i.topOfFin01cp2=i.topOfFin01.shift(254.05347154462484,u),i.topOfFin02cp1=i.topOfFin02.shift(236.80010054081936,g),i.topOfFin02cp2=i.topOfFin02.shift(56.66685795767527,b),i.topOfFin03cp1=i.topOfFin03.shift(113.40393219481112,k),i.topOfFin03cp2=i.topOfFin03.shift(22.511206474810457,w),C=d-(new a).move(i.topOfFin03).curve(i.topOfFin03cp1,i.topOfFin01cp2,i.topOfFin01).length(),h+=C,v++}while(Math.abs(C)>t.get("tolerance")&&v<100);s.seam=(new a).move(i.topOfFin01).curve(i.topOfFin01cp2,i.topOfFin03cp1,i.topOfFin03).curve(i.topOfFin03cp2,i.topOfFin02cp1,i.topOfFin02).curve(i.topOfFin02cp2,i.topOfFin01cp1,i.topOfFin01).close(),t.set("topOfFinCircumference",(new a).move(i.topOfFin01).curve(i.topOfFin01cp1,i.topOfFin02cp2,i.topOfFin02).curve(i.topOfFin02cp1,i.topOfFin03cp2,i.topOfFin03).length()),t.cutlist.addCut({cut:2,material:"color1UpperBody"}),s.body=(new a).move(i.topOfFin01).curve(i.topOfFin01cp2,i.topOfFin03cp1,i.topOfFin03).attr("class","hidden").attr("data-text-class","text-xs"),l("banner",{path:s.body,text:"body",dy:0,spaces:10,repeat:3}),i.titleAnchor=i.topOfFin01.shiftFractionTowards(i.topOfFin02,.5).shiftFractionTowards(i.topOfFin03,.1),i.logoAnchor=i.titleAnchor.shiftFractionTowards(i.topOfFin03,.4),i.gridAnchor=i.titleAnchor.clone(),r.logo=new n("logo",i.logoAnchor).attr("data-scale",(p>1?1:p)/2),l("title",{at:i.titleAnchor,nr:7,title:"topOfFin",scale:(p>1?1:p)/2}),i.topOfFinLeft=s.seam.edge("left");const T=(new a).move(i.topOfFin02).curve(i.topOfFin02cp1,i.topOfFin03cp2,i.topOfFin03);i.topOfFinInsideTop=T.edge("top");const y=T.shiftFractionAlong(.5);return i.topOfFinInsideBottom=T.split(y)[0].edge("bottom"),i.topOfFinRight=s.seam.edge("right"),l("hd",{from:i.topOfFin01,to:i.topOfFinRight,y:i.topOfFin01.y-e-10,id:"topWidth"}),l("hd",{from:i.topOfFin03,to:i.topOfFinRight,y:i.topOfFin03.y+e+20,id:"bottomWidth"}),l("hd",{from:i.topOfFinLeft,to:i.topOfFinRight,y:i.topOfFin03.y+e+10,id:"width"}),l("vd",{from:i.topOfFin03,to:i.topOfFin01,x:i.topOfFinLeft.x-e-10,id:"leftHeight"}),l("vd",{from:i.topOfFin01,to:i.topOfFinInsideBottom,x:i.topOfFin02.x+e+10,id:"rightHeight"}),l("vd",{from:i.topOfFinInsideTop,to:i.topOfFin01,x:i.topOfFinLeft.x-e-20,id:"minHeight"}),e&&(s.sa=s.seam.offset(e).attr("class","fabric sa")),c}},ln={name:"hi.bottomOfFin",after:[qs,nn,sn],draft:({store:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,macro:l,part:c})=>{const p=t.get("multiplier");let h=250.63638754690027*p;const d=119.34849371430543;let f=137.70322741678933*p;const m=175.11970494988498,u=133.21819413653674*p,g=51.94197687805115*p,b=95.20910872095476,k=158.66090918215986,w=29.25974733588791*p,C=31.28292571739416*p,v=208.55316756249104,T=28.113642612639804,y=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{i.bottomOfFin01=new o(0,0),i.bottomOfFin02=i.bottomOfFin01.shift(d,h),i.bottomOfFin03=i.bottomOfFin01.shift(m,f),i.bottomOfFin01cp1=i.bottomOfFin01.shift(b,u),i.bottomOfFin01cp2=i.bottomOfFin01.shift(k,g),i.bottomOfFin02cp1=i.bottomOfFin02.shift(v,w),i.bottomOfFin02cp2=i.bottomOfFin02.shift(T,C),i.bottomOfFin03cp1=i.bottomOfFin03.shift(B,y),i.bottomOfFin03cp2=i.bottomOfFin03.shift(S,x),R=L-(new a).move(i.bottomOfFin03).curve(i.bottomOfFin03cp1,i.bottomOfFin01cp2,i.bottomOfFin01).length(),f+=R,F++}while(Math.abs(R)>t.get("tolerance")&&F<100);R=0,F=0;do{i.bottomOfFin01=new o(0,0),i.bottomOfFin02=i.bottomOfFin01.shift(d,h),i.bottomOfFin03=i.bottomOfFin01.shift(m,f),i.bottomOfFin01cp1=i.bottomOfFin01.shift(b,u),i.bottomOfFin01cp2=i.bottomOfFin01.shift(k,g),i.bottomOfFin02cp1=i.bottomOfFin02.shift(v,w),i.bottomOfFin02cp2=i.bottomOfFin02.shift(T,C),i.bottomOfFin03cp1=i.bottomOfFin03.shift(B,y),i.bottomOfFin03cp2=i.bottomOfFin03.shift(S,x),R=P-(new a).move(i.bottomOfFin01).curve(i.bottomOfFin01cp1,i.bottomOfFin02cp2,i.bottomOfFin02).curve(i.bottomOfFin02cp1,i.bottomOfFin03cp2,i.bottomOfFin03).length(),h+=R,F++}while(Math.abs(R)>t.get("tolerance")&&F<100);s.seam=(new a).move(i.bottomOfFin01).curve(i.bottomOfFin01cp1,i.bottomOfFin02cp2,i.bottomOfFin02).curve(i.bottomOfFin02cp1,i.bottomOfFin03cp2,i.bottomOfFin03).curve(i.bottomOfFin03cp1,i.bottomOfFin01cp2,i.bottomOfFin01).close(),t.cutlist.addCut({cut:2,material:"color1UpperBody"});const W=(new a).move(i.bottomOfFin01).curve(i.bottomOfFin01cp2,i.bottomOfFin03cp1,i.bottomOfFin03);i.bottomOfFinSnippet=W.shiftAlong(t.get("aboveMouthFinLength")),r.bottomOfFin=new n("bnotch",i.bottomOfFinSnippet);const H=W.split(i.bottomOfFinSnippet);s.finAttachmentAboveMouth=H[0].reverse().attr("data-text-class","text-xs"),s.finAttachmentBelly=H[1].reverse().attr("data-text-class","text-xs"),l("banner",{path:s.finAttachmentAboveMouth,text:"+",dy:0,spaces:0,repeat:4,id:"plusses"}),l("banner",{path:s.finAttachmentBelly,text:"-o-",dy:0,spaces:4,repeat:7,id:"circles"}),i.titleAnchor=i.bottomOfFin02.shiftFractionTowards(i.bottomOfFin01,.4).shiftFractionTowards(i.bottomOfFin03,.1),i.logoAnchor=i.titleAnchor.shiftFractionTowards(i.bottomOfFin03,.4),i.gridAnchor=i.titleAnchor.clone(),r.logo=new n("logo",i.logoAnchor).attr("data-scale",(p>1?1:p)/2),l("title",{at:i.titleAnchor,nr:6,title:"bottomOfFin",scale:(p>1?1:p)/2}),i.bottomOfFinTop=s.seam.edge("top");let A=(new a).move(i.bottomOfFin03).curve(i.bottomOfFin03cp2,i.bottomOfFin02cp1,i.bottomOfFin02);const O=A.shiftFractionAlong(.8);return i.bottomOfFinInsideLeft=A.split(O)[0].edge("right"),A=(new a).move(i.bottomOfFin01).curve(i.bottomOfFin01cp2,i.bottomOfFin03cp1,i.bottomOfFin03),i.bottomOfFinInsideBottom=A.edge("top"),l("hd",{from:i.bottomOfFin03,to:i.bottomOfFin01,y:i.bottomOfFin01.y+e+20,id:"width"}),l("hd",{from:i.bottomOfFinTop,to:i.bottomOfFin01,y:i.bottomOfFinTop.y-e-10,id:"smallTop"}),l("hd",{from:i.bottomOfFinInsideLeft,to:i.bottomOfFin01,y:i.bottomOfFin03.y+e+20,id:"widthToSmallest"}),l("hd",{from:i.bottomOfFin03,to:i.bottomOfFinSnippet,y:i.bottomOfFin03.y+e+10,id:"widthToSnippet"}),l("vd",{from:i.bottomOfFin03,to:i.bottomOfFinTop,x:i.bottomOfFin03.x-e-10,id:"heightLeft"}),l("vd",{from:i.bottomOfFinTop,to:i.bottomOfFin01,x:i.bottomOfFin01.x+e+20,id:"heightRight"}),l("vd",{from:i.bottomOfFinTop,to:i.bottomOfFinInsideBottom,x:i.bottomOfFin01.x+e+10,id:"heightToSmallest"}),e&&(s.sa=s.seam.offset(e).attr("class","fabric sa")),c}},cn=new s.pT({data:Qs,parts:[qs,Zs,an,sn,nn,rn,ln,en,on]}),pn=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}'),hn={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 dn=o(86063);const fn={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,s.Wx)("head"),menu:"fit"},lengthRatio:{pct:55,min:40,max:60,menu:"style"},gores:{count:6,min:4,max:20,menu:"style"}}
1,plugins:[dn.hk],draft:function({Point:t,points:e,Path:o,paths:i,measurements:a,options:s,macro:n,sa:r,absoluteOptions:l,store:c,part:p}){const h=a.head+l.headEase,d=h/2/Math.PI;return e.p0=new t(0,0),n("gore",{from:e.p0,radius:d,gores:s.gores,extraLength:(s.lengthRatio-.5)*h/2,prefix:"gore_"}),r&&(i.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),i.saBase=(new o).move(e.gore_p3).line(e.p0).offset(2*r).hide(),i.sa=(new o).move(e.gore_p1).line(e.gore_p1.shift(0,r)).line(i.saCurve.start()).join(i.saCurve).line(e.sa1).join(i.saBase).line(e.p0).attr("class","fabric sa")),c.cutlist.setCut([{cut:Number(s.gores),from:"fabric",onFold:!0},{cut:Number(s.gores),from:"lining",onFold:!0}]),n("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),n("title",{at:e.title,nr:1,title:"crown",scale:.5}),n("hd",{id:"wFull",from:e.p0,to:e.gore_p1,y:15-e.p0.x}),n("vd",{id:"hFull",from:e.p0,to:e.gore_p3,x:e.p0.x-15-2*r}),p}};const mn={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,s.Wx)("head"),menu:"fit"},visorAngle:{deg:45,min:10,max:90,menu:"style"},visorWidth:{pct:5,min:1,max:17,snap:5,...(0,s.Wx)("head"),menu:"style"},visorLength:{pct:100,min:80,max:150,menu:"advanced"}},draft:function({Point:t,points:e,Path:o,paths:i,measurements:a,options:s,sa:n,macro:r,absoluteOptions:l,store:c,part:p}){const h=(a.head+l.headEase)/2/Math.PI,d=h/Math.sin(s.visorAngle*Math.PI/180),f=Math.PI/3*s.visorLength*h/d,m=4/3*d*(1-Math.cos(f/2))/Math.sin(f/2);return e.origin=new t(0,0),e.in1=new t(0,0),e.in2=e.in1.shift(90/Math.PI*f,2*d*Math.sin(f/2)),e.in1C=e.in1.shift(0,m),e.in2C=e.in2.shift(180+180/Math.PI*f,m),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(),i.saInner=(new o).move(e.in2).curve(e.in2C,e.in1C,e.in1).curve(e.in1CFlipped,e.in2CFlipped,e.in2Flipped).hide(),i.saOuter=(new o).move(e.in2Flipped).curve(e.ex2CFlipped,e.ex1CFlipped,e.ex1).curve(e.ex1C,e.ex2C,e.in2).hide(),i.seam=i.saOuter.join(i.saInner).close(),n&&(e.sa1=new t(e.in2.x+n,i.saInner.offset(2*n).start().y),e.sa2=e.sa1.flipX(e.in1),i.sa=i.saOuter.offset(n).line(e.sa1).join(i.saInner.offset(2*n)).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+n}),r("vd",{id:"hBrim",from:e.ex1,to:e.in1,x:e.in2Flipped.x-15-n}),r("vd",{id:"hFull",from:e.ex1,to:e.in2Flipped,x:e.in2Flipped.x-30-n}),p}};const un={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,s.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:i,measurements:a,options:s,sa:n,snippets:r,Snippet:l,macro:c,absoluteOptions:p,store:h,part:d}){const f=a.head+p.headEase,m=s.lengthRatio*f/2*s.earLength,u=f/12*s.earWidth;if(e.top=new t(0,0),e.bottom=new t(u,m),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(),i.saBase=(new o).move(e.bottom).curve(e.bottomC,e.topC,e.top).curve(e.topCFlipped,e.bottomCFlipped,e.bottomFlipped).hide(),i.hemBase=(new o).move(e.bottomFl
1ipped).line(e.bottom).hide(),i.seam=i.saBase.join(i.hemBase).close(),n&&(i.sa=i.saBase.offset(n).join(i.hemBase.offset(2*n)).close().attr("class","fabric sa")),h.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)}),s.buttonhole){let o=s.lengthRatio*f/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*n}),c("vd",{id:"hFull",from:e.bottomFlipped,to:e.top,x:e.bottomFlipped.x-15-n}),s.buttonhole&&c("vd",{id:"hToButton",from:e.buttonhole,to:e.bottom,x:e.bottom.x+15+n}),d}},gn=new s.pT({data:pn,parts:[fn,mn,un]}),bn=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}'),kn={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 wn(t,e,o,i,a){const s=.551915024494,n=20*a;t.bottomLeft=e.shift(180,o/2).shift(270,i),t.bottomLeftU=t.bottomLeft.shift(90,n),t.bottomLeftUcp=t.bottomLeftU.shift(270,n*s),t.bottomLeftR=t.bottomLeft.shift(0,n),t.bottomLeftRcp=t.bottomLeftR.shift(180,n*s),t.bottomRight=e.shift(0,o/2).shift(270,i),t.bottomRightU=t.bottomRight.shift(90,n),t.bottomRightUcp=t.bottomRightU.shift(270,n*s),t.bottomRightL=t.bottomRight.shift(180,n),t.bottomRightLcp=t.bottomRightL.shift(0,n*s)}const Cn={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:i,points:a,paths:s,Snippet:n,snippets:r,sa:l,macro:c,part:p})=>{const h=.551915024494,d=1.6180339887,f=new Map([["invisible",0],["#3",4.8],["#4",5.4],["#4.5",5.9],["#5",6.2],["#6",7],["#8",8],["#10",10.6]]),m=e.width*e.size,u=m/230,g=e.height*u,b=g*d,k=.44*g,w=50*u,C=30*u,v=60*u,T=g/d/d/d/d,y=f.get(e.zipperSize),x=T/d;t.set("width",m),t.set("depth",b),t.set("sizeRatio",u),t.set("sideLenght",k),t.set("shoulderCP",w),t.set("topCP",C),t.set("topRadius",v),t.set("sidePanelReinforcementHeight",T),t.set("zipperWidth",y),t.set("zipperPanelWidth",x),a.topCenter=new o(0,0),a.topCircleLeft=a.topCenter.shift(135,v),a.topCircleRight=a.topCenter.shift(45,v),a.topCircleLeftCPu=a.topCircleLeft.shift(45,v*h),a.topCircleRightCPu=a.topCircleRight.shift(135,v*h),a.topMiddle=a.topCenter.shift(90,v),a.topLeft=a.topMiddle.shift(180,m/2),a.topRight=a.topMiddle.shift(0,m/2),a.topMiddleCPL=a.topMiddle.shift(180,C),a.topMiddleCPR=a.topMiddle.shift(0,1.1*C),wn(a,a.topMiddle,m,g,u),a.shoulderLeft=a.bottomLeft.shift(90,k),a.shoulderLeftCP=a.shoulderLeft.shift(90,w),a.shoulderRight=a.bottomRight.shift(90,k),a.shoulderRightCP=a.shoulderRight.shift(90,w),a.topCircleLeftCPd=a.topCircleLeft.shift(225,C),a.topCircleRightCPd=a.topCircleRight.shift(315,C),a.bottomSeamLeft=a.bottomLeft.shift(90,T),a.bottomSeamRight=a.bottomRight.shift(90,T),a.bottomMiddle=a.bottomLeft.shift(0,m/2);let B=(new i).move(a.bottomLeftU).curve(a.bottomLeftUcp,a.bottomLeftRcp,a.bottomLeftR).line(a.bottomRightL).curve(a.bottomRightLcp,a.bottomRightUcp,a.bottomRightU).line(a.bottomRightU),S=(new i).move(a.bottomSeamLeft).join(B).line(a.bottomSeamRight),L=(new i).move(a.topCircleRight).curve(a.topCircleRightCPu,a.topCircleLeftCPu,a.topCircleLeft),P=L.length();a.topZipperRight=L.shiftAlong(P/2-y/2),a.topZipperLeft=L.shiftAlong(P/2+y/2),a.topZipperPanelRight=L.shiftAlong(P/2-x/2),a.topZipperPanelLeft=L.shiftAlong(P/2+x/2),t.set("bottomPanelLength",S.length());let R=(new i).move(a.bottomSeamRight).line(a.shoulderRight).curve(a.shoulderRightCP,a.topCircleRightCPd,a.topCircleRight).join(L).curve(a.topCircleLeftCPd,a.shoulderLeftCP,a.shoulderLeft).line(a.bottomSeamLeft),F=(R.length()-x)/2;return t.set("frontPanelLength",F),s.seam=(new i).move(a.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&&(a.logo=a.topMiddle.shiftFractionTowards(a.bottomMiddle,.4),r.logo=new n("logo",a.logo)),a.title=a.topMiddle.shiftFractionTowards(a.bottomMiddle,.75).attr("data-text-class","center"),a.gridAnchor=a.topMiddle.shiftFractionTowards(a.bottomMiddle,.5),c("title",{at:a.title,nr:1,title:"sidePanel",align:"center"}),r.topNotch=new n("notch",a.topMiddle),r.zipperLeft=new n("notch",a.topZipperLeft),r.zipperRight=new n("notch",a.topZipperRight),r.zipperPanelLeft=new n("notch",a.topZipperPanelLeft),r.zipperPanelRight=new n("notch",a.topZipperPanelRight),r.bottomLeft=new n("notch",a.bottomSeamLeft),r.bottomRight=new n("notch",a.bottomSeamRight),r.bottomMiddle=new n("notch",a.bottomMiddle),l&&(s.sa=s.seam.offset(l).attr("class","fabric sa")),c("hd",{from:a.bottomLeftU,to:a.bottomRightU,y:a.bottomLeft.y+l+15,id:"width"}),c("hd",{from:a.topZipperPanelLeft,to:a.topZipperPanelRight,y:a.topZipperPanelRight.y+15,id:"zipperWidth"}),c("vd",{from:a.bottomRightL,to:a.topMiddle,x:a.topRight.x+l+15,id:"height"}),c("vd",{from:a.bottomRightL,to:a.shoulderRight,x:a.bottomRightL.x,id:"shoulderHeight"}),c("ld",{from:a.topCenter,to:a.topCircleLeft,noStartMarker:!0,id:"circleLeft"}),c("ld",{from:a.topCenter,to:a.topCircleRight,noStartMarker:!0,id:"circleRight"}),c("ld",{from:a.topCenter,to:a.topMiddle,noStartMarker:!0,id:"circleMiddle"}),p}},vn={name:"hortensia.frontPanel",after:Cn,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:i,Path:a,points:s,paths:n,Snippet:r,snippets:l,sa:c,expand:p,units:h,macro:d,part:f})=>{const m=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:h(m+e),length:h(u+e)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),t.flag.preset("expandIsOff"),f.hide()}t.flag.preset("expandIsOn"),s.topLeft=new i(0,0),s.topRight=new i(m,0),s.bottomLeft=new i(0,u),s.bottomRight=new i(m,u),n.bottom=(new a).move(s.topLeft).line(s.bottomLeft),n.top=(new a).move(s.bottomRight).line(s.topRight),n.seam=n.bottom.line(s.bottomRight).join(n.top).line(s.topLeft).close().attr("class","fabric"),o&&(n.bottom.addText("bottom","center text-xs fill-note"),n.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 k=m*(e.pctHandleVert/100);return k+2*g>m&&(k=m-2*g),s.attachPoint1TL=new i(k,0+u/2-b/2),s.attachPoint2TL=new i(k,u-u/2+b/2-g),s.attachPoint2TLtemp=new i(k,u-u/2+b/2),s.attachPoint1BR=new i(k+2*g,0+u/2-b/2+g),s.attachPoint2BR=new i(k+2*g,u-u/2+b/2),d("crossbox",{topLeft:s.attachPoint1TL,bottomRight:s.attachPoint1BR,text:"strapAttachment",id:"att1"}),d("crossbox",{topLeft:s.attachPoint2TL,bottomRight:s.attachPoint2BR,text:"strapAttachment",id:"att2"}),t.cutlist.setCut([{cut:2,from:"fabric"},{cut:2,from:"lining"}]),s.logo=s.topLeft.shiftFractionTowards(s.bottomRight,.5),l.logo=new r("logo",s.logo),s.title=s.logo.shift(-90,u/4).attr("data-text-class","center"),s.gridAnchor=s.logo.clone(),d("title",{at:s.title,nr:2,title:"frontPanel",align:"center"}),c&&(n.sa=n.seam.offset(c).attr("class","fabric sa")),d("hd",{from:s.bottomLeft,to:s.bottomRight,y:s.bottomLeft.y+c+15,id:"width"}),d("hd",{from:s.topLeft,to:s.attachPoint1TL,y:s.attachPoint1TL.y,id:"attachPoint1"}),d("hd",{from:s.topLeft,to:s.attachPoint2TLtemp,y:s.attachPoint2TLtemp.y,id:"attachPoint2"}),d("vd",{from:s.bottomRight,to:s.topRight,x:s.topRight.x+c+15,id:"height"}),d("vd",{from:s.topLeft,to:s.attachPoint1TL,x:s.attachPoint1TL.x,id:"attachPoint1"}),d("vd",{from:s.attachPoint2TLtemp,to:s.bottomLeft,x:s.attachPoint2TLtemp.x,id:"attachPoint2"}),f}},Tn={name:"hortensia.bottomPanel",after:Cn,draft:({store:t,expand:e,units:o,options:i,Point:a,Path:s,points:n,paths:r,Snippet:l,snippets:c,sa:p,macro:h,part:d})=>{const f=t.get("bottomPanelLength"),m=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(f+e),length:o(m+e)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),t.flag.preset("expandIsOff"),d.hide()}t.flag.preset("expandIsOn"),n.topLeft=new a(0,0),n.topRight=new a(f,0),n.bottomLeft=new a(0,m),n.bottomRight=new a(f,m),r.seam=(new s).move(n.topLeft).line(n.bottomLeft).line(n.bottomRight).line(n.topRight).line(n.topLeft).close().attr("class","fabric"),t.cutlist.addCut({cut:1,from:"fabric"}),t.cutlist.addCut({cut:1,material:"lining"}),n.logo=n.topLeft.shiftFractionTowards(n.bottomRight,.5),c.logo=new l("logo",n.logo),n.title=n.logo.shift(-90,m/4).attr("data-text-class","center"),n.gridAnchor=n.logo.clone(),h("title",{at:n.title,nr:3,title:"bottomPanel",align:"center"});const u=180*i.size;return u>50&&f>100&&(n.scaleBox=n.logo.shift(90,u),h("scalebox",{at:n.scaleBox})),p&&(r.sa=r.seam.offset(p).attr("class","fabric sa")),h("hd",{from:n.bottomLeft,to:n.bottomRight,y:n.bottomLeft.y+p+15,id:"width"}),h("vd",{from:n.bottomRight,to:n.topRight,x:n.topRight.x+p+15,id:"height"}),d}},yn={name:"hortensia.zipperPanel",after:Cn,draft:({store:t,Point:e,Path:o,points:i,paths:a,sa:s,macro:n,expand:r,units:l,part:c})=>{const p=t.get("zipperWidth"),h=(t.get("zipperPanelWidth")-p)/2,d=t.get("depth");return r?(t.flag.preset("expandIsOn"),i.topLeft=new e(0,0),i.topRight=new e(h,0),i.bottomLeft=new e(0,d),i.bottomRight=new e(h,d),a.seam=(new o).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).line(i.topLeft).close().attr("class","fabric"),t.cutlist.addCut([{cut:2,from:"fabric"},{cut:2,from:"lining"}]),a.text=(new o).move(i.topLeft).line(i.bottomLeft).attr("data-text","ZipperPanel").attr("data-text-class","center text-xs"),s&&(a.sa=a.seam.offset(s).attr("class","fabric sa")),n("hd",{from:i.bottomLeft,to:i.bottomRight,y:i.bottomLeft.y+s+15,id:"width"}),n("vd",{from:i.bottomRight,to:i.topRight,x:i.topRight.x+s+15,id:"height"}),c):(t.flag.note({msg:"hortensia:cutZipperPanel",replace:{width:l(h),length:l(d)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),t.flag.preset("expandIsOff"),c.hide())}},xn={name:"hortensia.sidePanelReinforcement",after:Cn,draft:({store:t,Point:e,Path:o,points:i,paths:a,sa:s,macro:n,part:r})=>{const l=t.get("width"),c=t.get("sidePanelReinforcementHeight"),p=t.get("sizeRatio");return i.topMiddle=new e(0,0),i.topLeft=i.topMiddle.shift(180,l/2),i.topRight=i.topMiddle.shift(0,l/2),wn(i,i.topMiddle,l,c,p),a.seam=(new o).move(i.topMiddle).line(i.topLeft).line(i.bottomLeftU
1).curve(i.bottomLeftUcp,i.bottomLeftRcp,i.bottomLeftR).line(i.bottomRightL).curve(i.bottomRightLcp,i.bottomRightUcp,i.bottomRightU).line(i.topRight).line(i.topMiddle).close().attr("class","fabric"),t.cutlist.addCut({cut:2,from:"fabric"}),i.title=i.topLeft.shiftFractionTowards(i.bottomRight,.5).attr("data-text-class","center"),n("title",{at:i.title,nr:4,title:"sidePanelReinforcement",scale:.25,align:"center"}),i.gridAnchor=i.title.clone(),s&&(a.sa=a.seam.offset(s).attr("class","fabric sa")),n("hd",{from:i.bottomLeftU,to:i.bottomRightU,y:i.bottomLeft.y+s+15,id:"width"}),n("vd",{from:i.bottomRightL,to:i.topRight,x:i.topRight.x+s+15,id:"height"}),r}},Bn={name:"hortensia.strap",after:Cn,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:i,points:a,paths:s,expand:n,units:r,sa:l,macro:c,part:p})=>{const h=t.get("width")*e.handleWidth,d=t.get("depth")*e.strapLength;let f=!1;if(l>.8*h&&(l=.8*h,f=!0,t.flag.warn({msg:"hortensia:strapSaReduced"})),!n){const e=l?2*l:0;return t.flag.note({msg:f?"hortensia:cutStrapReducedSa":"hortensia:cutStrap",notes:[l?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand",f?"hortensia:strapSaReduced.d":""],replace:{width:r(h+e),length:r(d+e)},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(-h,0),a.topMiddle=new o(0,0),a.topRight=new o(h,0),a.bottomLeft=new o(-h,d),a.bottomMiddle=new o(0,d),a.bottomRight=new o(h,d),s.seam=(new i).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).line(a.topLeft).close().attr("class","fabric"),s.fold=(new i).move(a.topMiddle).line(a.bottomMiddle).attr("data-text","FoldLine").attr("data-text-class","center text-xs").attr("class","lining dashed"),t.cutlist.addCut({cut:2,from:"fabric"}),a.title=a.topMiddle.shiftFractionTowards(a.bottomMiddle,.25),c("title",{at:a.title,nr:5,title:"strap",rotation:90,scale:.25,align:"center"}),l&&(s.sa=s.seam.offset(l).attr("class","fabric sa")),c("hd",{from:a.bottomLeft,to:a.bottomRight,y:a.bottomLeft.y+l+15,id:"width"}),c("vd",{from:a.bottomRight,to:a.topRight,x:a.topRight.x+l+15,id:"height"}),p}},Sn=new s.pT({data:bn,parts:[Cn,vn,Tn,yn,xn,Bn]}),Ln=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}'),Pn={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 Rn(t,e){const{macro:o,Point:i,points:a,sa:s}=t.shorthand();"front"===e?(a.cHem=a.cfHem,a.cNeck=a.cfNeck):(a.cHem=a.cbHem,a.cNeck=a.cbNeck),o("hd",{id:"wHem",from:a.cHem,to:a.hem,y:a.cHem.y+3*s+15}),o("hd",{id:"wAtArmholePitch",from:new i(0,a.armholePitch.y),to:a.armholePitch}),o("hd",{id:"wCfToHps",from:a.cNeck,to:a.neck,y:a.neck.y-s-15}),o("hd",{id:"wCfToShoulder",from:a.cNeck,to:a.shoulder,y:a.neck.y-s-30}),o("hd",{id:"wFull",from:a.cNeck,to:a.armhole,y:a.neck.y-s-45}),o("ld",{id:"lShoulderSeam",from:a.neck,to:a.shoulder,d:-15}),o("vd",{id:"hHemToArmhole",from:a.hem,to:a.armhole,x:a.armhole.x+s+15}),o("vd",{id:"hArmholeToArmholePitch",from:a.armhole,to:a.armholePitch,x:a.armhole.x+s+15}),o("vd",{id:"hArmholePitchToShoulder",from:a.armholePitch,to:a.shoulder,x:a.armhole.x+s+15}
1),o("vd",{id:"hArmholeToShoulder",from:a.armhole,to:a.shoulder,x:a.armhole.x+s+30}),o("vd",{id:"hArmholeToHps",from:a.armhole,to:a.neck,x:a.armhole.x+s+45}),o("vd",{id:"hCfNeckToHps",from:a.cNeck,to:a.neck,x:a.cNeck.x-15}),o("vd",{id:"hHemToCfNeck",from:a.cHem,to:a.cNeck,x:a.cNeck.x-15}),o("vd",{id:"hFull",from:a.cHem,to:a.neck,x:a.cNeck.x-30})}function Fn(t,e){const{store:o,measurements:i,options:a,points:n,paths:r,Path:l,Point:c,expand:p,sa:h,macro:d,units:f}=t.shorthand();(void 0===o.get("ribbingHeight")||t.context.settings.sample)&&o.set("ribbingHeight",(i.hpsToWaistBack+i.waistToHips)*a.ribbingHeight);const m=o.get("ribbingHeight");if(!p){const i=h?2*h:0;return o.flag.note({msg:`huey:cut${(0,s.ZH)(t.name.split(".")[1])}`,notes:[h?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:f(2*m+i),l:f(e+i)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),o.flag.preset("expandIsOff"),t.hide()}o.flag.preset("expandIsOn"),n.topLeft=new c(0,0),n.topRight=new c(2*m,0),n.bottomLeft=new c(0,e),n.bottomRight=new c(n.topRight.x,e),r.seam=(new l).move(n.bottomRight).line(n.topRight).line(n.topLeft).line(n.bottomLeft).line(n.bottomRight).close().addClass("various"),h&&(r.sa=r.seam.offset(h).addClass("various sa")),n.title=new c(n.bottomRight.x/3,n.bottomRight.y/3),d("vd",{id:"hFull",from:n.bottomRight,to:n.topRight,x:n.topRight.x+h+15}),d("hd",{id:"wFull",from:n.topLeft,to:n.topRight,y:n.topRight.y-h-15})}const Wn={name:"huey.back",from:I,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,s.Wx)("hips"),menu:"fit"},lengthBonus:{pct:15,min:-4,max:60,menu:"style"}},draft:function({store:t,macro:e,Path:o,Point:i,points:a,paths:s,sa:n,options:r,measurements:l,part:c,complete:p}){for(let h in s)-1===["backArmhole","backCollar","chest","waist"].indexOf(h)&&delete s[h];if(r.ribbing){let e=r.ribbingHeight*(l.hpsToWaistBack+l.waistToHips);for(let t of["hem","cbHem"])a[t]=a[t].shift(90,e);t.set("ribbingHeight",e)}return a.hips.x=l.hips*(1+r.hipsEase)/4,a.hem.x=a.hips.x,a.hemCp2=new i(a.hips.x,Math.min(a.cbWaist.y,a.hem.y)),t.set("backNeckSeamLength",(new o).move(a.neck).curve_(a.neckCp2,a.cbNeck).length()),s.saBase=(new o).move(a.hem).curve_(a.hemCp2,a.armhole).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.armholePitchCp1,a.armholePitch).join(s.backArmhole).line(a.s3CollarSplit).join(s.backCollar).attr("class","note stroke-xxl"),s.hemBase=(new o).move(a.cbHem).line(a.hem).attr("class","note stroke-xxl"),s.saBase.hide(),s.hemBase.hide(),s.seam=s.saBase.clone().line(a.cbHem).join(s.hemBase).close().attr("class","fabric"),n&&(s.sa=s.hemBase.offset(r.ribbing?n:3*n).join(s.saBase.offset(n)),s.sa.move(s.sa.end()).line(a.cbNeck).move(s.sa.start()).line(a.cbHem).attr("class","fabric sa")),p&&(e("banner",{id:"chestLine",classes:"center contrast help",path:s.chest,text:"huey:chestLine"}),e("banner",{id:"waistLine",classes:"center contrast help",path:s.waist,text:"huey:waistLine"})),t.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),e("cutonfold",{from:a.cbNeck,to:a.cbHem,grainline:!0}),e("scalebox",{at:new i(a.armholePitch.x/2,a.cbWaist.y)}),Rn(c,"back"),c}};const Hn={name:"huey.front",from:N,after:Wn,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:i,Path:a,points:s,paths:n,complete:r,sa:l,options:c,units:p,measurements:h,part:d}){for(let f in n)-1===["frontArmhole","frontCollar","chest","waist"].indexOf(f)&&delete n[f];if(c.ribbing)for(let f of["hem","cfHem"])s[f]=s[f].shift(90,e.get("ribbingHeight"));return s.hips.x=h.hips*(1+c.hipsEase)/4,s.hem.x=s.hips.x,s.hemCp2=new i(s.hips.x,Math.min(s.cfWaist.y,s.hem.y)),s.pocketCfTop=s.cfNeck.shiftFractionTowards(s.cfHem,1-c.pocketHeight),s.pocketTopRight=s.pocketCfTop.shift(0,s.hem.x*c.pocketWidth),s.pocketTip=new i(1.2*s.pocketTopRight.x,s.pocketTopRight.y+(s.hem.y-s.pocketTopRight.y)*c.pocketOpening),s.pocketHem=new i(s.pocketTopRight.x+s.pocketTopRight.dx(s.pocketTip)/2,s.hem.y),s.pocketTipCp2=t.beamsIntersect(s.pocketTopRight,s.pocketTopRight.shift(90,10),s.pocketTip,s.pocketHem.rotate(-90,s.pocketTip)),e.set("frontNeckSeamLength",(new a).move(s.neck).curve(s.neckCp2Front,s.cfNeckCp1,s.cfNeck).length()),n.saBase=(new a).move(s.hem).curve_(s.hemCp2,s.armhole).curve(s.armholeCp2,s.armholeHollowCp1,s.armholeHollow).curve(s.armholeHollowCp2,s.armholePitchCp1,s.armholePitch).join(n.frontArmhole).line(s.s3CollarSplit).join(n.frontCollar).line(s.cfHem).attr("class","note stroke-xxl"),n.hemBase=(new a).move(s.cfHem).line(s.hem).attr("class","note stroke-xxl"),n.saBase.hide(),n.hemBase.hide(),n.seam=n.saBase.clone().join(n.hemBase).close().attr("class","fabric"),r&&c.pocket&&(n.pocket=(new a).move(s.pocketHem).line(s.pocketTip).curve_(s.pocketTipCp2,s.pocketTopRight).line(s.pocketCfTop).attr("class","fabric dashed stroke-sm")),l&&(n.sa=n.hemBase.offset(c.ribbing?l:3*l).join(n.saBase.offset(l)),n.sa=n.sa.line(n.sa.start()).close().attr("class","fabric sa")),r&&(o("banner",{id:"chestLine",classes:"center contrast help",path:n.chest,text:"huey:chestLine"}),o("banner",{id:"waistLine",classes:"center contrast help",path:n.waist,text:"huey:waistLine"})),e.flag.note({msg:"huey:zipperLength",replace:{length:p(h.head*c.hoodClosure+s.cfNeck.dist(s.cfHem)+(c.ribbing?e.get("ribbingHeight"):0))}}),e.cutlist.setCut({cut:2,from:"fabric"}),o("rmtitle"),o("title",{at:s.title,nr:1,title:"front"}),Rn(d,"front"),d}};const An={name:"huey.sleeve",from:T,after:Wn,draft:function({Point:t,Path:e,points:o,paths:i,store:a,options:s,sa:n,macro:r,part:l}){for(let p of Object.keys(i))"sleevecap"!==p&&delete i[p];if(s.ribbing)for(let p of["wristLeft","wristRight"])o[p]=o[p].shift(90,a.get("ribbingHeight"));i.saBase=(new e).move(o.wristRight).line(o.bicepsRight).join(i.sleevecap).line(o.wristLeft).attr("class","various stroke-xxl"),i.hemBase=(new e).move(o.wristLeft).line(o.wristRight).attr("class","various stroke-xxl"),i.saBase.hide(),i.hemBase.hide(),i.seam=i.saBase.join(i.hemBase).close().attr("class","fabric"),n&&(s.ribbing?i.sa=i.seam.offset(n):i.sa=i.saBase.clone().offset(n).join(i.hemBase.offset(3*n)).close(),i.sa.attr("class","fabric sa")),a.cutlist.setCut({cut:2,from:"fabric"}),r("grainline",{from:new t(0,o.wristLeft.y),to:new t(0,o.backPitch.y)});let c=n;return s.ribbing||(c=3*n),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-n-15}),r("vd",{id:"hCuffToSleevecapStart",from:o.wristLeft,to:o.bicepsLeft,x:o.bicepsLeft.x-n-15}),r("vd",{id:"hFull",from:o.wristLeft,to:o.sleeveTip,x:o.bicepsLeft.x-n-30}),l},hide:s.V9.HIDE_TREE,options:{...T.options,libraryFitSleeve:!0}};const On={name:"huey.pocket",from:Hn,draft:function({macro:t,Path:e,points:o,paths:i,snippets:a,Snippet:s,sa:n,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 h of Object.keys(i))delete i[h];for(let h of Object.keys(a))delete a[h];return i.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"),n&&(i.sa=i.seam.offset(n).attr("class","fabric sa")),r.cutlist.setCut({cut:2,from:"fabric"}),o.logo=o.pocketCfTop.shiftFractionTowards(o.pocketHem,.3),a.logo=new s("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+n+15}),t("hd",{id:"WFull",from:o.cfHem,to:o.pocketTip,y:o.cfHem.y+n+30}),t("hd",{id:"wAtTop",from:o.pocketCfTop,to:o.pocketTopRight,y:o.pocketCfTop.y-n-15}),t("vd",{id:"hFull",from:o.cfHem,to:o.pocketCfTop,x:o.cfHem.x-n-15}),t("vd",{id:"hToTip",from:o.pocketHem,to:o.pocketTip,x:o.pocketTip.x+n+15}),p}};const Dn={name:"huey.hood",after:[Hn,Wn],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:i,points:a,paths:s,snippets:n,Snippet:r,sa:l,options:c,measurements:p,part:h}){const d=t.get("frontNeckSeamLength")+t.get("backNeckSeamLength");return a.cfBottom=new o(0,0),a.cbBottom=a.cfBottom.shift(0,d).rotate(c.hoodAngle,a.cfBottom),a.cfHeightLeft=a.cfBottom.shift(90,p.head*c.hoodHeight),a.cfHeightRight=a.cfHeightLeft.shift(0,d),a.cfTop=a.cfBottom.shift(90,p.head*c.hoodClosure).rotate(c.hoodAngle,a.cfBottom),a.frontTop=a.cfHeightLeft.shift(0,p.head*c.hoodCutback),a.frontTopCp2=new o(a.frontTop.x,a.cfTop.y),a.backPitch=new o(a.cbBottom.x+p.head*c.hoodDepth,.6*a.cfHeightRight.y),a.backPitchCp1=a.backPitch.shift(-90,.1*p.head),a.backPitchCp2=a.backPitchCp1.flipY(a.backPitch),s.seam=(new i).move(a.cfBottom).line(a.cbBottom)._curve(a.backPitchCp1,a.backPitch).curve(a.backPitchCp2,a.cfHeightRight,a.frontTop).curve_(a.frontTopCp2,a.cfTop).line(a.cfBottom).close().attr("class","fabric"),l&&(s.sa=s.seam.offset(l).attr("class","fabric sa")),t.cutlist.setCut({cut:4,from:"fabric"}),a.logo=a.frontTop.shiftFractionTowards(a.cbBottom,.7),n.logo=new r("logo",a.logo),a.title=a.frontTop.shiftFractionTowards(a.cbBottom,.3),e("title",{at:a.title,nr:5,title:"hood"}),e("hd",{id:"wAtNeck",from:a.cfBottom,to:a.cbBottom,y:a.cfBottom.y+l+15}),e("hd",{id:"wNeckToHood",from:a.cbBottom,to:a.backPitch,y:a.cfBottom.y+l+15}),e("hd",{id:"wFull",from:a.cfTop,to:a.backPitch,y:a.cfBottom.y+l+30}),e("hd",{id:"wHoodTopToHoodBack",from:a.frontTop,to:a.backPitch,y:a.frontTop.y-l-15}),e("ld",{id:"lHoodRise",from:a.cfBottom,to:a.cfTop,d:-15}),e("ld",{id:"lAtNeck",from:a.cfBottom,to:a.cbBottom,d:15}),e("vd",{id:"hOpening",from:a.cfTop,to:a.frontTop,x:a.cfBottom.x-l-15}),e("vd",{id:"hFull",from:a.cfBottom,to:a.frontTop,x:a.cfBottom.x-l-30}),h}};const En={name:"huey.waistband",options:{ribbingStretch:{pct:15,min:0,max:30,menu:"fit"}},draft:function({points:t,measurements:e,options:o,macro:i,store:a,part:s}){return o.ribbing?(Fn(s,e.hips*(1+o.hipsEase)*(1-o.ribbingStretch)),a.cutlist.setCut({cut:1,from:"ribbing"}),i("title",{at:t.title,nr:6,title:"waistband"}),s):s.hide()}};const In={name:"huey.cuff",options:{ribbingStretch:{pct:15,min:0,max:30,menu:"fit"}},draft:function({points:t,measurements:e,options:o,macro:i,store:a,part:s}){return o.ribbing?(Fn(s,e.wrist*(1+o.cuffEase)*(1-o.ribbingStretch)),a.cutlist.setCut({cut:2,from:"ribbing"}),i("title",{at:t.title,nr:7,title:"cuff"}),s):s.hide()}}
1,Nn=new s.pT({data:Ln,parts:[Wn,Hn,An,On,Dn,En,In]}),Mn=(0,s.D4)([_,Pn]),_n=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}'),jn={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."}}}')},Gn={pct:8,min:4,max:20,menu:"fit"},Yn={pct:20,min:10,max:50,menu:"fit"},Un={pct:5,min:0,max:10,menu:"fit"},zn={pct:10,min:4,max:20,menu:"style"};const Jn={name:"hugo.front",from:N,hide:s.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:Gn,hipsEase:{pct:12,min:4,max:20,menu:"fit"},draftForHighBust:{bool:!1,menu:"fit"},lengthBonus:{pct:10,min:0,max:20,menu:"style"},ribbingHeight:zn,pocketWidth:{pct:50,min:35,max:65,menu:"style"}},draft:function({utils:t,store:e,sa:o,Point:i,points:a,Path:s,paths:n,Snippet:r,snippets:l,options:c,measurements:p,complete:h,paperless:d,macro:f,part:m}){for(const k in n)["chest","waist"].includes(k)||delete n[k];delete l.armholePitchNotch,a.hem.x=p.hips*(1+c.hipsEase)/4,a.hemCp2=new i(a.hem.x,a.cfWaist.y),e.set("lengthBonus",c.lengthBonus*(p.hpsToWaistBack+p.waistToHips)),e.set("ribbing",(p.hpsToWaistBack+p.waistToHips)*c.ribbingHeight),a.cfRibbing=a.cfHem.shift(90,e.get("ribbing")),a.ribbing=a.hem.shift(90,e.get("ribbing"));const u=(new s).move(a.cfNeck).curve(a.cfNeckCp1,a.neckCp2,a.neck),g=2*u.length();e.set("back_neck_len",g),a.raglanTipFront=u.shiftFractionAlong(.8);const b=u.split(a.raglanTipFront);return a.pocketHem=a.cfRibbing.shiftFractionTowards(a.ribbing,c.pocketWidth),a.pocketCf=a.cfHem.shift(90,.33*p.hpsToWaistBack+e.get("ribbing")),a.pocketTop=new i(a.pocketHem.x,a.pocketCf.y),a.pocketTip=a.pocketHem.shift(90,a.pocketTop.dy(a.pocketHem)/3.5).rotate(-30,a.pocketHem),a.pocketTopCp=t.beamsIntersect(a.pocketTop,a.pocketHem,a.pocketTip,a.pocketHem.rotate(90,a.pocketTip)),n.saBase=(new s).move(a.cfRibbing).line(a.ribbing).curve_(a.hemCp2,a.armhole).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow).line(a.raglanTipFront).join(b[0].reverse()),n.saBase.hide(),n.seam=n.saBase.clone().unhide().close().attr("class","fabric"),n.pocket=(new s).move(a.pocketHem).line(a.pocketTip).curve(a.pocketTip,a.pocketTopCp,a.pocketTop).line(a.pocketCf).addClass("note help").setHidden(!h),e.set("shoulderLength",a.neck.dist(a.shoulder)),e.set("neckOpeningPartFront",b[1]),e.set("neckOpeningAnchorFront",a.neck),e.set("shoulderSlopeDeltaY",a.neck.dy(a.shoulder)),e.set("raglen",(new s).move(a.raglanTipFront).line(a.armholeHollow).curve(a.armholeHollowCp1,a.armholeCp2,a.armhole).length()),e.set("neckOpeningLenFront",u.length()),e.set("neckCutoutFront",a.cfNeck.y),o&&(n.sa=n.saBase.offset(o).line(a.cfNeck).attr("class","fabric sa"),n.sa.move(a.cfRibbing).line(n.sa.start())),h&&(f("banner",{id:"chestLine",classes:"center contrast help",path:n.chest,text:"hugo:chestLine"}),f("banner",{id:"waistLine",classes:"center contrast help",path:n.waist,text:"hugo:waistLine"})),e.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),f("cutonfold",{from:a.cfNeck,to:a.cfRibbing,grainline:!0}),a.title=new i(a.armhole.x/2,a.armhole.y),f("title",{at:a.title,nr:1,title:"front"}),e.set("notchFront",a.raglanTipFront.dist(a.armholeHollow)/2),a.sleeveNotch=a.raglanTipFront.shiftTowards(a.armholeHollow,e.get("notchFront")),l.sleeveNotch=new r("notch",a.sleeveNotch),e.set("frontRaglanTipToNotch",a.raglanTipFront.dist(a.sleeveNotch)),a.logo=a.title.shift(-90,70),l.logo=new r("logo",a.logo),d&&(f("vd",{id:"vFrontNeck",from:a.cfRibbing,to:a.cfNeck,x:a.cfNeck.x-15}),f("vd",{id:"vFrontAll",from:a.cfRibbing,to:a.raglanTipFront,x:a.cfNeck.x-30}),f("vd",{id:"vFrontSideSeam",from:a.ribbing,to:a.armhole,x:a.ribbing.x+15+o}),f("hd",{id:"hFrontNeckhole",from:a.cfNeck,to:a.raglanTipFront,y:a.raglanTipFront.y-15-o}),f("hd",{id:"hFrontArmhole",from:a.raglanTipFront,to:a.armhole,y:a.raglanTipFront.y-15-o}),f("hd",{id:"hFrontPocketWidth",from:a.cfRibbing,to:a.pocketTop,y:a.cfRibbing.y+15+o}),f("hd",{id:"hFrontPocketTip",from:a.cfRibbing,to:a.pocketTip,y:a.cfRibbing.y+30+o}),f("hd",{id:"hFrontWidthFull",from:a.cfRibbing,to:a.ribbing,y:a.cfRibbing.y+45+o}),f("vd",{id:"vFrontPocket",from:a.pocketHem,to:a.pocketTop,x:a.pocketTip.x+15}
1)),m}};const $n={name:"hugo.back",from:I,hide:s.V9.HIDE_TREE,measurements:["hips"],after:Jn,draft:function({store:t,measurements:e,options:o,sa:i,Point:a,points:s,Path:n,paths:r,Snippet:l,snippets:c,macro:p,part:h,complete:d}){for(const g in r)["chest","waist"].includes(g)||delete r[g];delete c.armholePitchNotch,s.hem.x=e.hips*(1+o.hipsEase)/4,s.hemCp2=new a(s.hem.x,s.cbWaist.y),s.cbRibbing=s.cbHem.shift(90,t.get("ribbing")),s.ribbing=s.hem.shift(90,t.get("ribbing"));const f=(new n).move(s.cbNeck).curve(s.cbNeck,s.neckCp2,s.neck),m=2*f.length();t.set("front_neck_len",m),s.raglanTipBack=f.shiftFractionAlong(.7);const u=f.split(s.raglanTipBack);return r.saBase=(new n).move(s.cbRibbing).line(s.ribbing).curve_(s.hemCp2,s.armhole).curve(s.armholeCp2,s.armholeHollowCp1,s.armholeHollow).line(s.raglanTipBack).join(u[0].reverse()),r.seam=r.saBase.clone().close().attr("class","fabric"),r.saBase.hide(),i&&(r.sa=r.saBase.offset(i).line(s.cbNeck).attr("class","fabric sa"),r.sa.move(s.cbRibbing).line(r.sa.start())),t.set("neckOpeningPartBack",u[1]),t.set("neckOpeningAnchorBack",s.neck),t.set("neckOpeningLenBack",f.length()),t.set("neckCutoutBack",s.cbNeck.y),d&&(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:s.cbNeck,to:s.cbRibbing,grainline:!0}),s.title=new a(s.armhole.x/2,s.armhole.y),p("title",{at:s.title,nr:2,title:"back"}),t.set("notchBack",s.raglanTipBack.dist(s.armholeHollow)/2),s.sleeveNotch=s.raglanTipBack.shiftTowards(s.armholeHollow,t.get("notchBack")),c.sleeveNotch=new l("bnotch",s.sleeveNotch),t.set("backRaglanTipToNotch",s.raglanTipBack.dist(s.sleeveNotch)),s.logo=s.title.shift(-90,70),c.logo=new l("logo",s.logo),p("vd",{id:"hHemToCfNeck",from:s.cbRibbing,to:s.cbNeck,x:s.cbNeck.x-15}),p("vd",{id:"hFull",from:s.cbRibbing,to:s.raglanTipBack,x:s.cbNeck.x-30}),p("vd",{id:"hHemToRaglanStart",from:s.ribbing,to:s.armhole,x:s.ribbing.x+15+i}),p("hd",{id:"wNeckOpening",from:s.cbNeck,to:s.raglanTipBack,y:s.raglanTipBack.y-15-i}),p("hd",{id:"wRaglan",from:s.raglanTipBack,to:s.armhole,y:s.raglanTipBack.y-15-i}),p("hd",{id:"wHem",from:s.cbRibbing,to:s.ribbing,y:s.cbRibbing.y+15+i}),h}};const Xn={name:"hugo.sleeve",from:T,hide:s.V9.HIDE_TREE,after:[Jn,$n],options:{cuffEase:Yn,sleeveLengthBonus:{pct:2,min:0,max:10,menu:"style"},ribbingHeight:zn,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:i,points:a,Path:s,paths:n,Snippet:r,snippets:l,options:c,measurements:p,macro:h,log:d,units:f,part:m}){a.raglanTop=new i(0,a.sleeveTip.y-e.get("shoulderLength"));let u=e.get("neckOpeningAnchorFront"),g=e.get("neckOpeningPartFront");g=g.translate(u.dx(a.raglanTop),u.dy(a.raglanTop));let b=g.ops[1].cp1,k=g.ops[1].cp2,w=g.ops[0].to,C=a.raglanTop.angle(k);a.raglanTopCp2=k.rotate(180-C,a.raglanTop),a.raglanTipFrontCp1=b.rotate(180-C,a.raglanTop),a.raglanTipFront=w.rotate(180-C,a.raglanTop),u=e.get("neckOpeningAnchorBack");let v=e.get("neckOpeningPartBack");v=v.translate(u.dx(a.raglanTop),u.dy(a.raglanTop)),b=v.ops[1].cp1,k=v.ops[1].cp2,w=v.ops[0].to,a.raglanTopCp1=k.flipX(),a.raglanTipBackCp2=b.flipX(),a.raglanTipBack=w.flipX(),C=a.raglanTop.angle(a.raglanTopCp1),a.raglanTopCp1=a.raglanTopCp1.rotate(360-C,a.raglanTop),a.raglanTipBackCp2=a.raglanTipBackCp2.rotate(360-C,a.raglanTop),a.raglanTipBack=a.raglanTipBack.rotate(360-C,a.raglanTop);let T=0,y=0;do{a.raglanMidFront=a.raglanTipFront.shiftFractionTowards(a.capQ4Base,.5),a.raglanMidBack=t.beamsIntersect(a.raglanTipBack,a.capQ1Base,a.raglanMidFront,a.raglanMidFront.shift(0,100)),a.raglanFrontCp1=a.raglanTipFront.shiftFractionTowards(a.capQ4Base,.25),a.raglanFrontCp2=a.raglanTipFront.shiftFractionTowards(a.capQ4Base,.75),a.raglanBackCp1=a.raglanTipBack.shiftFractionTowards(a.capQ1Base,.8),a.raglanBackCp2=a.raglanTipBack.shiftFractionTowards(a.capQ1Base,.3);let o=e.get("shoulderSlopeDeltaY"),i=a.raglanTipFront.angle(a.capQ4Base),n=a.raglanTipBack.angle(a.capQ1Base);a.slopeFront=a.raglanMidFront.shift(i+90,o/2),a.slopeBack=a.raglanMidBack.shift(n-90,o/2),a.slopeFrontCp1=a.raglanFrontCp1.shift(i+90,o/2),a.slopeFrontCp2=a.raglanFrontCp2.shift(i+90,o/2),a.slopeBackCp1=a.raglanBackCp1.shift(n-90,o/2),a.slopeBackCp2=a.raglanBackCp2.shift(n-90,o/2),a.capQ4BaseCp=t.beamsIntersect(a.slopeFrontCp2,a.capQ4Base,a.bicepsLeft,a.capQ4Cp2),a.capQ1BaseCp=t.beamsIntersect(a.slopeBackCp1,a.capQ1Base,a.bicepsRight,a.capQ1Cp2);let r=(new s).move(a.raglanTipBack).curve(a.raglanTipBackCp2,a.raglanTopCp1,a.raglanTop).curve(a.raglanTopCp2,a.raglanTipFrontCp1,a.raglanTipFront).curve(a.raglanTipFront,a.slopeFrontCp1,a.slopeFront).curve(a.slopeFrontCp2,a.capQ4Base,a.capQ4Base).length();T=e.get("raglen")-r;let l=["raglanTipFront","raglanTipFrontCp1","raglanTopCp2","raglanTop","raglanTopCp1","raglanTipBackCp2","raglanTipBack"];for(let t of l)a[t]=a[t].shift(90,T);let h=e.get("shoulderLength")+p.shoulderToWrist*(1+c.sleeveLengthBonus)-c.ribbingHeight,d=a.raglanTop.dist(a.centerWrist)-h,f=["wristLeft","centerWrist","wristRight"];for(let t of f)a[t]=a[t].shift(90,d);y++}while(Math.abs(T)>5&&y<10);n.seam=(new s).move(a.raglanTipBack).curve(a.raglanTipBackCp2,a.raglanTopCp1,a.raglanTop).curve(a.raglanTopCp2,a.raglanTipFrontCp1,a.raglanTipFront).curve(a.raglanTipFront,a.slopeFrontCp1,a.slopeFront).curve(a.slopeFrontCp2,a.capQ4Cp2,a.bicepsLeft).line(a.wristLeft).line(a.wristRight).line(a.bicepsRight).curve(a.capQ1Cp1,a.slopeBackCp1,a.slopeBack).curve(a.slopeBackCp2,a.raglanTipBack,a.raglanTipBack).close().attr("class","fabric"),o&&(n.sa=n.seam.offset(o).attr("class","fabric sa")),e.cutlist.setCut({cut:2,from:"fabric"}),h("grainline",{from:a.centerWrist,to:a.raglanTop}),h("title",{at:a.gridAnchor,nr:3,title:"sleeve"}),a.logo=a.gridAnchor.shift(-90,70),l.logo=new r("logo",a.logo),a.scalebox=a.logo.shift(-90,70),h("scalebox",{at:a.scalebox}),a.frontNotch=(new s).move(a.raglanTipFront).curve(a.raglanTipFront,a.slopeFrontCp1,a.slopeFront).curve(a.slopeFrontCp2,a.capQ4Cp2,a.bicepsLeft).shiftAlong(e.get("notchFront")),l.frontNotch=new r("notch",a.frontNotch),l.shoulderNot
1ch=new r("notch",a.raglanTop),a.backNotch=(new s).move(a.raglanTipBack).curve(a.raglanTipBack,a.slopeBackCp2,a.slopeBack).curve(a.slopeBackCp1,a.capQ1Cp1,a.bicepsRight).shiftAlong(e.get("notchBack")),l.backNotch=new r("bnotch",a.backNotch),h("rmad"),h("vd",{id:"hCuffToRaglan",from:a.wristLeft,to:a.bicepsLeft,x:a.bicepsLeft.x-15-o}),h("vd",{id:"hRaglanFront",from:a.bicepsLeft,to:a.raglanTipFront,x:a.bicepsLeft.x-15-o}),h("vd",{id:"hRaglanToTip",from:a.bicepsRight,to:a.raglanTop,x:a.bicepsRight.x+15+o}),h("vd",{id:"hRaglanBack",from:a.bicepsRight,to:a.raglanTipBack,x:a.bicepsRight.x+30+o}),h("hd",{id:"wRaglanTopFront",from:a.raglanTipFront,to:a.raglanTop,y:a.raglanTipBack.y-15-o}),h("hd",{id:"wRaglanTopBack",from:a.raglanTop,to:a.raglanTipBack,y:a.raglanTipBack.y-15-o}),h("hd",{id:"wSleeveFrontHalf",from:a.bicepsLeft,to:a.raglanTop,y:a.raglanTipBack.y-30-o}),h("hd",{id:"wFull",from:a.bicepsLeft,to:a.bicepsRight,y:a.raglanTipBack.y-45-o}),h("hd",{id:"wCuff",from:a.wristLeft,to:a.wristRight,y:a.wristLeft.y+15+o});const x=2*(new s).move(a.raglanTipBack).curve(a.raglanTipBackCp2,a.raglanTopCp1,a.raglanTop).curve(a.raglanTopCp2,a.raglanTipFrontCp1,a.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 "),d.info(": "+f(B)+" neck opening is "+f(Math.abs(S))+P+" than "+f(p.head)+" head circumference, with Collar Ease set to "+(100*c.collarEase).toFixed(0)+"%."),L>.04&&e.flag.warn({msg:"hugo:neckCircumference",replace:{opening:f(B),head:f(p.head)}}),m}};const Qn={name:"hugo.pocket",from:Jn,draft:function({utils:t,store:e,sa:o,points:i,Path:a,paths:s,complete:n,macro:r,expand:l,snippets:c,part:p}){for(const d in s)"pocket"!==d&&delete s[d];for(const d in c)delete c[d];s.seam=s.pocket.line(i.cfRibbing).line(i.pocketHem).close().attr("class","fabric",!0),s.seam.unhide(),s.saBase=(new a).move(i.cfRibbing).line(i.pocketHem).line(i.pocketTip)._curve(i.pocketTopCp,i.pocketTop).line(i.pocketCf).hide(),e.set("facingWidth",i.pocketHem.dist(i.pocketTip)/2);let h=(new a).move(i.pocketTip).curve(i.pocketTip,i.pocketTopCp,i.pocketTop).offset(-1*e.get("facingWidth"));return i._tmp=h.shiftAlong(2),i.facingEnd=t.beamsIntersect(i._tmp,h.start(),i.pocketHem,i.pocketTip),s.facing=(new a).move(i.facingEnd).line(h.start()).join(h).attr("class"," fabric help"),s.facing.hide(),l?(e.flag.preset("expandIsOn"),n&&s.facing.unhide().addClass("note dashed"),o&&(s.sa=s.saBase.offset(o).line(i.pocketCf).move(i.cfRibbing),s.sa.line(s.sa.start()).attr("class","fabric sa")),e.cutlist.setCut({cut:2,from:"fabric"}),r("cutonfold",{to:i.cfRibbing,from:i.pocketCf,grainline:!0,reverse:!0}),i.title=i.cfRibbing.shiftFractionTowards(i.pocketTop,.5),r("title",{at:i.title,nr:4,title:"pocket"}),r("hd",{id:"wAtWaist",from:i.cfRibbing,to:i.pocketHem,y:i.cfRibbing.y+15+o}),r("hd",{id:"wFull",from:i.cfRibbing,to:i.pocketTip,y:i.cfRibbing.y+30+o}),r("vd",{id:"hWaistToTip",from:i.pocketHem,to:i.pocketTip,x:i.pocketTip.x+15+o}),r("vd",{id:"hFull",from:i.pocketHem,to:i.pocketTop,x:i.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 Kn={name:"hugo.pocketFacing",from:Qn,draft:function({sa:t,points:e,Path:o,paths:i,macro:a,store:s,part:n}){for(const r in i)"facing"!==r&&delete i[r];return i.seam=i.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,s.get("facingWidth")),t&&(i.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"),i.sa.line(e.facingEnd).move(e.saStart).line(i.sa.start())),s.cutlist.setCut({cut:2,from:"fabric"}),e.title=e.pocketTopCp.clone(),a("title",{at:e.title,nr:5,title:"pocketFacing",scale:.666,align:"center"}),a("hd",{id:"width",from:e.saStart,to:e.pocketTop,y:e.saStart.y-15-t}),n}};const Vn={name:"hugo.hoodSide",measurements:["head"],after:[Jn,$n],draft:function({store:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,measurements:l,macro:c,part:p}){let h=t.get("neckOpeningLenFront")+t.get("neckOpeningLenBack"),d=l.head,f=t.get("neckCutoutFront")-t.get("neckCutoutBack");t.set("hoodCenterWidth",l.head/10);let m=t.get("hoodCenterWidth")/2;i.topLeft=new o(0,0),i.topRight=new o(h,0),i.neckRight=new o(h,(d-m)/2),i.neckLeft=new o(0,i.neckRight.y),i.frontLeft=i.neckLeft.shift(-90,f),i.frontEdge=i.neckRight.shift(-90,f),i.neckEdge=i.neckLeft.shift(0,m),i.neckEdgeCp2=new o(i.neckRight.x/2,i.neckEdge.y),i.frontEdgeCp1=new o(i.neckEdgeCp2.x,i.frontEdge.y),i.shoulderNotch=(new a).move(i.neckEdge).curve(i.neckEdgeCp2,i.frontEdgeCp1,i.frontEdge).shiftAlong(t.get("neckOpeningLenBack")-m),i.hoodTop=new o(i.shoulderNotch.x,i.topLeft.y),i.hoodTopCp2=i.hoodTop.shift(180,.7*i.neckEdge.y),i.hoodRim=new o(i.frontEdge.x,.2*i.neckRight.y),i.hoodTopCp1=i.hoodTop.shift(0,i.hoodTop.dx(i.hoodRim)/2),i.frontEdgeCp2=i.frontEdge.shift(90,m),i._tmp1=(new a).move(i.hoodRim).curve(i.hoodRim,i.hoodTopCp1,i.hoodTop).shiftAlong(2).rotate(90,i.hoodRim),i.hoodRimCp=i.hoodRim.shiftTowards(i._tmp1,i.neckRight.y/3),i.neckRoll=i.neckRight.shift(180,m),i._tmp2=(new a).move(i.neckRoll).curve(i.neckRoll,i.hoodRimCp,i.hoodRim).shiftAlong(2),i.neckRollCp2=i.neckRoll.shiftTowards(i._tmp2,m),i.neckRollCp1=i.neckRollCp2.rotate(180,i.neckRoll),s.seam=(new a).move(i.frontEdge).curve(i.frontEdgeCp2,i.neckRollCp1,i.neckRoll).curve(i.neckRollCp2,i.hoodRimCp,i.hoodRim).curve(i.hoodRim,i.hoodTopCp1,i.hoodTop).curve(i.hoodTopCp2,i.neckEdge,i.neckEdge).curve(i.neckEdgeCp2,i.frontEdgeCp1,i.frontEdge).close().attr("class","fabric"),e&&(s.sa=s.seam.reverse().offset(-1*e).attr("class","fabric sa")),t.set("hoodCenterLength",(new a).move(i.hoodRim).curve(i.hoodRim,i.hoodTopCp1,i.hoodTop).curve(i.hoodTopCp2,i.neckEdge,i.neckEdge).length()),t.cutlist.setCut({cut:4,from:"fabric"}),i.cfNotch=(new a).move(i.neckEdge).curve(i.neckEdgeCp2,i.frontEdgeCp1,i.frontEdge).shiftAlong(h-m),c("sprinkle",{snippet:"notch",on:["shoulderNotch","cfNotch"]}),i.title=new o(i.hoodTop.x,i.neckEdge.y/4),c("title",{at:i.title,nr:6,title:"hoodSide",align:"center"}),i.logo=new o(i.hoodTop.x,.666*i.neckEdge.y),r.logo=new n("logo",i.logo),c("grainline",{from:i.shoulderNotch,to:i.hoodTop});const u=(new a).move(i.neckEdge).curve(i.neckEdgeCp2,i.frontEdgeCp1,i.frontEdge).split(i.shoulderNotch),g=(new a).move(i.hoodRim).curve(i.hoodRim,i.hoodTopCp1,i.hoodTop).curve(i.hoodTopCp2,i.neckEdge,i.neckEdge).reverse(),b=(new a).move(i.neckRoll).curve(i.neckRollCp2,i.hoodRimCp,i.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:i.neckEdge,to:i.frontEdge,y:i.frontEdge.y+e+30}),c("hd",{id:"wFull",from:g.edge("left"),to:i.frontEdge,y:i.frontEdge.y+e+45});const k=b.edge("left");return c("hd",{id:"wOpeningToTip",from:k,to:i.frontEdge,y:k.y}),c("vd",{id:"hTipToOpeningTip",from:i.frontEdge,to:i.hoodRim,x:i.hoodRim.x+e+15}),c("vd",{id:"hFull",from:i.frontEdge,to:i.hoodTop,x:i.hoodRim.x+e+30}),p}};const qn={name:"hugo.hoodCenter",after:Vn,draft:function({store:t,sa:e,Point:o,points:i,Path:a,paths:s,macro:n,expand:r,units:l,part:c}){const p=t.get("hoodCenterWidth"),h=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(h+o)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),t.flag.preset("expandIsOff"),c.hide()}return t.flag.preset("expandIsOn"),i.topLeft=new o(0,0),i.bottomLeft=new o(0,h),i.topRight=new o(p,0),i.bottomRight=new o(p,h),s.seam=(new a).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).close().attr("class","fabric"),e&&(s.sa=s.seam.offset(e).attr("class","fabric sa")),t.cutlist.setCut({cut:2,from:"fabric"}
1),i.title=i.bottomLeft.shiftFractionTowards(i.topRight,.5),n("title",{at:i.title,nr:7,title:"hoodCenter",align:"center"}),n("grainline",{from:i.topLeft.shift(-90,p/2),to:i.topRight.shift(-90,p/2)}),n("hd",{id:"width",from:i.bottomLeft,to:i.bottomRight,y:i.bottomRight.y+e+15}),n("vd",{id:"length",from:i.bottomRight,to:i.topRight,x:i.topRight.x+e+15}),c}};const Zn={name:"hugo.waistband",measurements:["waistToHips"],options:{chestEase:Gn,ribbingStretch:Un,ribbingHeight:zn},draft:function({measurements:t,options:e,sa:o,Point:i,points:a,Path:s,paths:n,macro:r,units:l,expand:c,store:p,part:h}){const d=(t.hpsToWaistBack+t.waistToHips)*e.ribbingHeight*2,f=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(d+t),l:l(f+t)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),p.flag.preset("expandIsOff"),h.hide()}return p.flag.preset("expandIsOn"),a.topLeft=new i(0,0),a.bottomLeft=new i(0,f),a.topRight=new i(d,0),a.bottomRight=new i(d,f),n.seam=(new s).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).close().attr("class","various"),o&&(n.sa=n.seam.offset(o).attr("class","various sa")),p.cutlist.setCut({cut:1,from:"ribbing"}),a.title=a.bottomLeft.shiftFractionTowards(a.topRight,.5),r("title",{at:a.title,nr:8,title:"waistband",align:"center"}),r("grainline",{from:a.topLeft.shift(290,25),to:a.topRight.shift(250,25)}),r("hd",{id:"wFull",from:a.bottomLeft,to:a.bottomRight,y:a.bottomRight.y+o+15}),r("vd",{id:"hFull",from:a.bottomRight,to:a.topRight,x:a.topRight.x+o+15}),h}};const tr={name:"hugo.cuff",measurements:["waistToHips"],options:{cuffEase:Yn,ribbingStretch:Un},draft:function({measurements:t,options:e,sa:o,Point:i,points:a,Path:s,paths:n,macro:r,expand:l,store:c,units:p,part:h}){const d=(t.hpsToWaistBack+t.waistToHips)*e.ribbingHeight*2,f=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(d+t),l:p(f+t)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),c.flag.preset("expandIsOff"),h.hide()}return c.flag.preset("expandIsOn"),a.topLeft=new i(0,0),a.bottomLeft=new i(0,d),a.topRight=new i(f,0),a.bottomRight=new i(f,d),n.seam=(new s).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).line(a.topLeft).close().attr("class","various"),o&&(n.sa=n.seam.offset(o).attr("class","various sa")),c.cutlist.setCut({cut:2,from:"ribbing"}),a.title=a.bottomLeft.shiftFractionTowards(a.topRight,.5),r("title",{at:a.title,nr:9,title:"cuff"}),r("grainline",{from:a.bottomLeft.shift(0,20),to:a.topLeft.shift(0,20)}),r("vd",{id:"hFull",from:a.bottomRight,to:a.topRight,x:a.topRight.x+o+15}),r("hd",{id:"wFull",from:a.bottomLeft,to:a.bottomRight,y:a.bottomRight.y+o+15}),h}};const er={name:"hugo.neckBinding",after:[Jn,$n,qn],draft:function({store:t,sa:e,Point:o,points:i,Path:a,paths:s,macro:n,part:r,expand:l,units:c}){const p=2*t.get("neckOpeningLenFront")+2*t.get("neckOpeningLenBack")+t.get("hoodCenterWidth"),h=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(h+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"),i.topLeft=new o(0,0),i.topRight=new o(p,0),i.bottomRight=new o(p,h),i.bottomLeft=new o(0,h),s.seam=(new a).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).line(i.topLeft).close().attr("class","fabric"),e&&(s.sa=s.seam.offset(e).attr("class","fabric sa")),t.cutlist.setCut({cut:1,from:"fabric"}),n("grainline",{from:i.topLeft.shiftFractionTowards(i.topRight,.15).shiftFractionTowards(i.bottomLeft,.6),to:i.topRight.shiftFractionTowards(i.topLeft,.15).shiftFractionTowards(i.bottomRight,.6)}),i.title=new o(p/2,3*h),n("title",{at:i.title,nr:10,title:"neckBinding",scale:.4}),n("hd",{id:"length",from:i.bottomLeft,to:i.bottomRight,y:i.bottomLeft.y+e+15}),n("vd",{id:"width",from:i.topRight,to:i.bottomRight,x:i.topRight.x+e+15}),r}},or=new s.pT({data:_n,parts:[$n,Jn,Xn,Qn,Kn,Vn,qn,Zn,tr,er]}),ir=(0,s.D4)([_,jn]),ar={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","to
1pSleeve":"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"},"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."}}}')},sr=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}'),nr=(t,e=!1)=>{let{points:o,Point:i,paths:a,Path:s}=t.shorthand();if(o.bsArmholeHollow=o.armholeHollow.clone(),o.bsArmholeHollowCp2=o.armholeHollowCp2.rotate(90,o.armholeHollow),o.bsWaist=new i(o.bsArmholeHollowCp2.x,o.waist.y),o.bsHips=new i(o.bsWaist.x,o.hips.y),o.bsHem=ne
1w i(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)}a.bs=(new s).move(o.bsHem).line(o.bsWaist)._curve(o.bsArmholeHollowCp2,o.bsArmholeHollow).attr("class","stroke-xl lining lashed"),e&&a.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"},hr={count:1,min:0,max:2,menu:"style"},dr={pct:35,min:15,max:100,menu:"style"},fr={pct:6,min:5,max:9,menu:"collar"};const mr={name:"jaeger.backBase",measurements:["hips","waist"],from:I,hide:s.V9.HIDE_ALL,options:{centerBackDart:{pct:.5,min:0,max:1.5,menu:"fit"},hipsEase:pr,waistEase:cr,rollLineCollarHeight:fr,reduceWaistStandardFraction:.08,reduceWaistDartFraction:.05,reduceHipsStandardFraction:.1,lengthBonus:{pct:19,min:10,max:25,menu:"fit"}},draft:function({store:t,points:e,measurements:o,options:i,Point:a,paths:s,Path:n,part:r}){return(t=>{let{store:e,measurements:o,options:i}=t.shorthand();2*i.collarHeight<i.rollLineCollarHeight&&(i.rollLineCollarHeight=2*i.collarHeight),e.set("chest",o.chest*(1+i.chestEase)),e.set("waist",o.waist*(1+i.waistEase)),e.set("hips",o.hips*(1+i.hipsEase)),e.set("waistReduction",e.get("chest")-e.get("waist")),e.set("hipsReduction",e.get("chest")-e.get("hips"))})(r),e.cbChest=new a(0,e.armholePitchCp1.y),i.centerBackDart>0&&(e.cbChestCp1=e.cbChest.shiftFractionTowards(e.cbNeck,.5),e.cbNeck=e.cbNeck.shift(0,o.chest*i.centerBackDart)),e.cbChestCp2=e.cbChest.shift(-90,e.cbChest.dy(e.cbWaist)/3),e.cbWaist=e.cbWaist.shift(0,t.get("waistReduction")*i.reduceWaistStandardFraction),e.cbWaistCp1=e.cbWaist.shift(90,e.cbChest.dy(e.cbWaist)/3),e.cbHips=e.cbHips.shift(0,t.get("hipsReduction")*i.reduceHipsStandardFraction),e.cbHem=e.cbHem.shift(0,t.get("hipsReduction")*i.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),nr(r),e.waist=e.bsWaist.shift(180,t.get("waistReduction")*i.reduceWaistStandardFraction),e.waistCp2=e.waist.shift(90,e.cbChest.dy(e.waist)/3),e.hips=e.bsHips.shift(180,t.get("hipsReduction")*i.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 a(e.hips.x,e.hem.y),t.set("backCollarLength",(new n).move(e.cbNeck)._curve(e.neckCp2,e.neck).length()),s.cb=(new n).move(e.cbNeck),i.centerBackDart>0?s.cb._curve(e.cbChestCp1,e.cbChest):s.cb.line(e.cbChest),s.cb.curve(e.cbChestCp2,e.cbWaistCp1,e.cbWaist).curve(e.cbWaistCp2,e.cbHipsCp1,e.cbHips).line(e.cbHem).attr("class","stroke-xl lining"),s.bss=(new n).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:N,hide:s.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:fr,reduceWaistStandardFraction:.08,reduceWaistDartFraction:.05,reduceHipsStandardFraction:.1,s3Collar:0,s3Armhole:0},draft:function({store:t,points:e,utils:o,options:i,Point:a,paths:s,Path:n,part:r}){nr(r,!0),s.pathToSplit=(new n).move(e.armhole).curve(e.armholeCp2,e.armholeHollowCp1,e.armholeHollow).attr("class","lining stroke-xl"),e.split=s.pathToSplit.shiftFractionAlong(.5);let l=s.pathToSplit.split(e.split);s.split1=l.pop().attr("class","lining stroke-xxl"),s.split2=l.pop().attr("class","canvas stroke-xxl"),e.splitCp2=s.split1.ops[1].cp1,e.armholeHollowCp1=s.split1.ops[1].cp2,e.sideArmholeCp2=s.split2.ops[1].cp1,e.sideSplitCp1=s.split2.ops[1].cp2,e.fsArmhole=e.split.clone(),e.fsWaist=new a(e.waist.x*i.sideFrontPlacement,e.waist.y),e.fsWaistCp2=e.fsWaist.shift(90,e.split.dy(e.waist)/2),e.fsHips=new a(e.fsWaist.x,e.hips.y),e.fsHem=ne
1w a(e.fsWaist.x,e.hem.y),s.fs=(new n).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")*i.reduceWaistStandardFraction),e.waistCp2=new a(e.waist.x,e.fsWaistCp2.y),e.hips=e.fsHips.shift(180,t.get("hipsReduction")*i.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 a(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 n).move(e.hem).line(e.hips).curve(e.hipsCp2,e.waistCp1,e.waist).curve_(e.waistCp2,e.split).length(),p=(new n).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")*i.reduceWaistStandardFraction),e.bsWaistCp2=new a(e.bsWaist.x,e.sideWaistCp2.y),e.bsWaistCp1=new a(e.bsWaist.x,e.sideWaistCp1.y),e.bsHips=e.bsHips.shift(180,t.get("hipsReduction")*i.reduceHipsStandardFraction),e.bsHipsCp2=new a(e.bsHips.x,e.sideHipsCp2.y),e.bsHem=new a(e.bsHips.x,e.sideHem.y),e.cfHem=e.cfHem.shift(-90,e.cfHem.y*i.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 a(e.waist.x*i.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")*i.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 a(e.hips.x*i.frontPocketPlacement,e.dartRightCpBottom.y);let h=e.hips.x*i.frontPocketWidth,d=h*i.frontPocketDepth;return e.frontPocketTopLeft=e.frontPocketAnchor.shift(180,h/2),e.frontPocketTopRight=e.frontPocketTopLeft.flipX(e.frontPocketAnchor),e.frontPocketBottomLeft=e.frontPocketTopLeft.shift(-90,d),e.frontPocketBottomRight=e.frontPocketBottomLeft.flipX(e.frontPocketAnchor),t.set("pocketWidth",h),t.set("pocketDepth",d),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),s.dart=(new n).move(e.dartRight).curve_(e.dartRightCpTop,e.dartTop)._curve(e.dartLeftCpTop,e.dartLeft).curve_(e.dartLeftCpBottom,e.dartBottom)._curve(e.dartRightCpBottom,e.dartRight).close(),s.frontShaping=(new n).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"),s.sideShaping=(new n).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:mr,options:{backVent:hr,backVentLength:dr},draft:function({sa:t,snippets:e,Snippet:o,store:i,utils:a,points:s,measurements:n,options:r,macro:l,paths:c,Path:p,part:h}){if(2===Number(r.backVent)){let t=s.bsHips.y-s.bsWaistCp1.dy(s.bsHips)*r.backVentLength;s.ventStart=a.curveIntersectsY(s.bsHips,s.bsHipsCp2,s.bsWaistCp1,s.bsWaist,t),c.ventBase=(new p).move(s.bsWaist).curve(s.bsWaistCp1,s.bsHipsCp2,s.bsHips).split(s.ventStart).pop().line(s.bsHem),c.vent=c.ventBase.offset(n.neck/-10),s.ventSlopeStart=a.lineIntersectsCurve(c.vent.start(),c.vent.start().shift(170,n.neck/5),s.bsHips,s.bsHipsCp2,s.bsWaistCp1,s.bsWaist),s.ventHem=a.beamIntersectsX(s.sideHem,c.vent.end(),c.vent.end().flipX(s.bsHem).x).flipX(s.bsHem)}for(let d of Object.keys(c))"vent"!==d&&delete c[d];for(let d of Object.keys(e))delete e[d];return s.anchor=s.sideHem.clone(),c.hemBase=(new p).move(s.sideHem).line(s.bsHem),Number(2===r.backVent)?(c.hemBase.line(s.ventHem).line(c.vent.end()),c.saBase=c.vent.clone().reverse().line(s.ventSlopeStart).join((new p).move(s.bsHips).curve(s.bsHipsCp2,s.bsWaistCp1,s.bsWaist).split(s.ventSlopeStart).pop())):c.saBase=(new p).move(s.bsHem).line(s.bsHips).curve(s.bsHipsCp2,s.bsWaistCp1,s.bsWaist),c.saBase=c.saBase.curve_(s.bsWaistCp2,s.bsArmholeHollow).curve(s.bsArmholeHollowCp1,s.bsArmholeCp2,s.sideArmhole).curve(s.sideArmholeCp2,s.sideSplitCp1,s.fsArmhole)._curve(s.sideWaistCp2,s.sideWaist).curve(s.sideWaistCp1,s.sideHipsCp2,s.sideHips).line(s.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")),i.cutlist.setCut([{cut:2,from:"fabric"},{cut:2,from:"lining"}]),s.logo=s.sideHips.shiftFractionTowards(s.bsHips,.5),e.logo=new o("logo",s.logo),e.sideNotchFront=new o("notch",s.sideWaist),e.sideNotchBack=new o("bnotch",s.bsWaist),s.title=s.sideWaistCp2.shiftFractionTowards(s.bsWaistCp2,.5),l("title",{at:s.title,nr:3,title:"side",align:"center"}),l("ld",{id:"wAtWaist",from:s.sideWaist,to:s.bsWaist}),l("hd",{id:"wAtHem",from:s.sideHem,to:s.bsHem,y:s.sideHem.y+3*t+15}),l("hd",{id:"wAtTop",from:s.fsArmhole,to:s.bsArmholeHollow,y:s.bsArmholeHollow.y-t-15}),l("vd",{id:"hBackHemToHips",from:s.bsHem,to:s.bsHips,x:s.bsHips.x+t+15}),l("vd",{id:"hBackHemToWaist",from:s.bsHem,to:s.bsWaist,x:s.bsHips.x+t+30}),l("vd",{id:"hBackHemToArmhole",from:s.bsHem,to:s.bsArmholeHollow,x:s.bsHips.x+t+45}),l("vd",{id:"hFull",from:s.sideHem,to:s.bsArmholeHollow,x:s.bsHips.x+t+60}),l("vd",{from:s.sideHem,id:"hFrontHemToWaist",to:s.sideWaist,x:s.sideHem.x-t-15}),l("vd",{id:"hFrontWaistToArmhole",from:s.sideWaist,to:s.fsArmhole,x:s.sideHem.x-t-15}),h}};const br={name:"jaeger.front",from:ur,after:mr,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:i,store:a,complete:s,points:n,measurements:r,options:l,macro:c,Point:p,paths:h,Path:d,part:f}){n.neckEdge=n.cfNeck.shift(180,r.chest*l.frontOverlap),n.hemEdge=new p(n.neckEdge.x,n.cfHem.y),n.chestPocketAnchor=new p(n.split.x*l.chestPocketPlacement,n.armholePitchCp1.y);let m=n.split.x*l.chestPocketWidth,u=m*l.chestPocketWeltSize;n.chestPocketTop=n.chestPocketAnchor.shift(90,u/2),n.chestPocketBottom=n.chestPocketAnchor.shift(-90,u/2),n.chestPocketTopLeft=n.chestPocketTop.shift(180+l.chestPocketAngle,m/2),n.chestPocketTopRight=n.chestPocketTopLeft.rotate(180,n.chestPocketTop),n.chestPocketBottomLeft=n.chestPocketBottom.shift(180+l.chestPocketAngle,m/2),n.chestPocketBottomRight=n.chestPocketBottomLeft.rotate(180,n.chestPocketBottom),a.set("chestPocketWidth",m),a.set("chestPocketWeltHeight",u),n.innerPocketAnchor=new p(n.hips.x*l.innerPocketPlacement,n.dartTop.y),m=n.hips.x*l.innerPocketWidth;const g=m*l.innerPocketWeltHeight;n.innerPocketTop=n.innerPocketAnchor.shift(90,g),n.innerPocketBottom=n.innerPocketAnchor.shift(-90,g),n.innerPocketLeft=n.innerPocketAnchor.shift(180,m/2),n.innerPocketRight=n.innerPocketLeft.flipX(n.innerPocketAnchor),n.innerPocketTopLeft=n.innerPocketLeft.shift(90,g),n.innerPocketTopRight=n.innerPocketTopLeft.flipX(n.innerPocketAnchor),n.innerPocketBottomLeft=n.innerPocketLeft.shift(-90,g),n.innerPocketBottomRight=n.innerPocketBottomLeft.flipX(n.innerPocketAnchor),a.set("innerPocketWeltHeight",g),a.set("innerPocketWidth",m),n.splitEdge=new p(n.neckEdge.x,n.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)n[L]=n[L].rotate(l.chestShapingMax*l.chestShaping*-1,n.split);n.lapelBreakPoint=new p(n.hemEdge.x,n.dartTop.y*(1+l.lapelStart)),n.cutawayPoint=n.lapelBreakPoint.shift(-90,n.lapelBreakPoint.dy(n.hemEdge)*l.buttonLength);const k=r.neck*l.rollLineCollarHeight;n.shoulderRoll=n.shoulder.shiftOutwards(n.neck,k);const w=r.neck*l.collarHeight;n.shoulderRollCb=n.lapelBreakPoint.shiftOutwards(n.shoulderRoll,a.get("backCollarLength"));let C=n.shoulderRoll.angle(n.shoulderRollCb);n.collarCbHelp=n.shoulderRollCb.shift(C-90,k),n.collarCbBottom=n.collarCbHelp.shift(C-90,k),n.collarCbTop=n.collarCbHelp.shift(C+90,2*w-k),n.notchMax=i.beamsIntersect(n.lapelBreakPoint,n.shoulderRoll,n.neckEdge,n.frontNeckCpEdge),n.lapelTip=i.beamsIntersect(n.hemEdge,n.lapelBreakPoint,n.notchMax,n.cfNeckCp1),n.notchEdge=n.lapelTip.shiftFractionTowards(n.notchMax,l.lapelReduction),n.notch=n.cfNeck.shiftFractionTowards(n.notchMax,l.collarNotchDepth),n.notchTip=n.neckEdge.rotate(-1*l.collarNotchAngle,n.notch),n.notchTip=n.notch.shiftFractionTowards(n.notchTip,l.collarNotchReturn),n.notchTipCp=n.notchTip.shift(n.notch.angle(n.notchTip)-90,n.notchTip.dist(n.collarCbTop)/4),n.collarCbTopCp=n.collarCbTop.shift(n.collarCbBottom.angle(n.collarCbTop)+90,n.notchTip.dist(n.collarCbTop)/4),n.lapelStraightEnd=new p(n.lapelBreakPoint.x,n.splitEdge.y),n.lapelStraightEndCp1=n.lapelStraightEnd.shift(90,.7*n.neckEdge.dy(n.lapelStraightEnd)),C=n.notch.angle(n.neck),n._dir1=n.notch.shift(C/2,50),n._dir2=n.neck.shift(1.5*C+180,50),n.collarCorner=n.notch.shiftFractionTowards(n.notchMax,1.6);const v=i.linesIntersect(n.shoulderRoll,n.lapelBreakPoint,n.notch,n.collarCorner);if(!v)throw new Error("Roll line does not intersect with notch/collarCorner line");n.shoulderRoll=v,n.hemRoundTarget=new p(n.hem.x,n.cfHem.y),n.roundStart=n.cutawayPoint.shiftFractionTowards(n.hemEdge,l.frontCutawayStart).rotate(l.frontCutawayAngle,n.cutawayPoint),n.roun
1dEnd=n.hemDropEnd.shiftFractionTowards(n.cfHem,1-l.frontCutawayEnd),n.roundVia=i.beamsIntersect(n.cutawayPoint,n.roundStart,n.hemDropEnd,n.cfHem),n.roundCp1=n.roundStart.shiftFractionTowards(n.roundVia,l.hemRadius),n.roundCp2=n.roundEnd.shiftFractionTowards(n.roundVia,l.hemRadius);const T=n.cutawayPoint.dy(n.roundStart)/3;n.cutawayPointCp2=n.cutawayPoint.shift(-90,T),n.roundStartCp1=n.roundCp1.shiftOutwards(n.roundStart,T),n.facingTop=n.neck.shiftFractionTowards(n.shoulder,.2),n.facingBottom=(new d).move(n.roundStart).curve(n.roundCp1,n.roundCp2,n.roundEnd).line(n.hem).intersectsX(.7*n.dartLeft.x).pop(),n.ipfeAnchor=i.beamsIntersect(n.facingTop,n.facingBottom,n.innerPocketLeft,n.innerPocketRight);const y=5*n.innerPocketTopRight.dy(n.innerPocketBottomRight);n.ipfeTopRight=n.innerPocketRight.shift(90,y/2),n.ipfeBottomRight=n.ipfeTopRight.flipY(n.innerPocketRight),n.ipfeEdge=n.innerPocketRight.shift(0,y/2),n.ipfeViaTopRight=new p(n.ipfeEdge.x,n.ipfeTopRight.y),n.ipfeViaBottomRight=n.ipfeViaTopRight.flipY(n.innerPocketRight);const x={ipfeBottomRight:c("round",{id:"ipfeBottomRight",from:n.ipfeBottomRight,to:n.ipfeEdge,via:n.ipfeViaBottomRight,radius:y/2}),ipfeTopRight:c("round",{id:"ipfeTopRight",from:n.ipfeTopRight,to:n.ipfeEdge,via:n.ipfeViaTopRight,radius:y/2})};for(const L in x)for(const t of["start","cp1","cp2","end"])n[`${L}${i.capitalize(t)}`]=n[x[L].points[t]].copy();n.ipfeStart=i.beamIntersectsY(n.facingTop,n.facingBottom,n.innerPocketAnchor.y-y),n.ipfeEnd=i.beamIntersectsY(n.facingTop,n.facingBottom,n.innerPocketAnchor.y+y),n.ipfeStartEnd=new p(n.ipfeStart.x+y/2,n.innerPocketAnchor.y-y/2),n.ipfeStartVia=new p(n.ipfeStart.x,n.ipfeStartEnd.y),n.ipfeEndEnd=new p(n.ipfeEnd.x+y/2,n.innerPocketAnchor.y+y/2),n.ipfeEndVia=new p(n.ipfeEnd.x,n.ipfeEndEnd.y);const B={ipfeStart:c("round",{id:"ipfeStart",from:n.ipfeStart,to:n.ipfeStartEnd,via:n.ipfeStartVia,radius:y/2}),ipfeEnd:c("round",{id:"ipfeEnd",from:n.ipfeEnd,to:n.ipfeEndEnd,via:n.ipfeEndVia,radius:y/2})};for(const L in B)for(const t of["start","cp1","cp2","end"])n[`${L}${i.capitalize(t)}`]=n[B[L].points[t]].copy();C=n.facingTop.angle(n.facingBottom)+90,n.ipfeStartCp1=n.ipfeStartCp1.rotate(C,n.ipfeStart),n.ipfeEndCp1=n.ipfeEndCp1.rotate(C,n.ipfeEnd);for(let L of Object.keys(h))delete h[L];for(let L of Object.keys(e))delete e[L];h.saBase=(new d).move(n.hem).line(n.hips).curve(n.hipsCp2,n.waistCp1,n.waist).curve_(n.waistCp2,n.split).curve(n.splitCp2,n.armholeHollowCp1,n.armholeHollow).curve(n.armholeHollowCp2,n.armholePitchCp1,n.armholePitch).curve(n.armholePitchCp2,n.shoulderCp1,n.shoulder).line(n.neck).line(n.collarCorner).line(n.notch).line(n.notchEdge)._curve(n.lapelStraightEndCp1,n.lapelStraightEnd).line(n.cutawayPoint).curve(n.cutawayPointCp2,n.roundStartCp1,n.roundStart).curve(n.roundCp1,n.roundCp2,n.roundEnd),h.saBase.hide(),h.hemBase=(new d).move(n.roundEnd).line(n.hem),h.hemBase.hide(),h.seam=h.saBase.clone().join(h.hemBase).attr("class","fabric"),h.dart=(new d).move(n.dartBottom)._curve(n.dartRightCpBottom,n.dartRight).curve_(n.dartRightCpTop,n.dartTop)._curve(n.dartLeftCpTop,n.dartLeft).curve_(n.dartLeftCpBottom,n.dartBottom).close().attr("class","fabric"),t&&(h.sa=h.saBase.offset(t).join(h.hemBase.offset(3*t)).close().attr("class","fabric sa")),s&&(h.flb=(new d).move(n.facingTop).line(n.ipfeStartStart).curve(n.ipfeStartCp1,n.ipfeStartCp2,n.ipfeStartEnd).line(n.ipfeTopRightStart).curve(n.ipfeTopRightCp1,n.ipfeTopRightCp2,n.ipfeTopRightEnd).curve(n.ipfeBottomRightCp2,n.ipfeBottomRightCp1,n.ipfeBottomRightStart).line(n.ipfeEndEnd).curve(n.ipfeEndCp2,n.ipfeEndCp1,n.ipfeEnd).line(n.facingBottom).attr("class","fabric"),c("banner",{id:"flbLining",path:h.flb.reverse(),text:"facingLiningBoundaryLiningSide",classes:"center text-xs fill-lining",dy:5,repeat:24}),c("banner",{id:"flbFacing",path:h.flb.reverse(),text:"facingLiningBoundaryFacingSide",classes:"center text-xs fill-fabric",repeat:24}),h.chestPocket=(new d).move(n.chestPocketTopRight).line(n.chestPocketTopLeft).line(n.chestPocketBottomLeft).line(n.chestPocketBottomRight).line(n.chestPocketTopRight).close().attr("class","fabric dashed"),h.innerPocket=(new d).move(n.innerPocketTopRight).line(n.innerPocketTopLeft).line(n.innerPocketBottomLeft).line(n.innerPocketBottomRight).line(n.innerPocketTopRight).move(n.innerPocketLeft).line(n.innerPocketRight).close().attr("class","fabric dashed"),h.breakLine=(new d).move(n.lapelBreakPoint).line(n.shoulderRoll).attr("class","fabric help"),h.frontPocket=(new d).move(n.frontPocketTopEnd).line(n.frontPocketTopLeft).line(n.frontPocketBottomLeft).line(n.frontPocketBottomEnd).attr("class","fabric dashed"),h.chestPiece=(new d).move(n.lapelBreakPoint).curve(n.cutawayPoint,n.waist,n.fsArmhole).attr("class","canvas help"),c("banner",{id:"chestPiece",path:h.chestPiece,text:"chestPiece",classes:"center text-xs fill-canvas",repeat:42})),a.cutlist.setCut({cut:2,from:"fabric"}),n.logo=new p(n.dartBottom.x,n.hips.y),e.logo=new o("logo",n.logo),c("sprinkle",{snippet:"notch",on:["neck","shoulder","armholePitch","chestPocketBottomLeft","chestPocketBottomRight","lapelBreakPoint","notchMax","notch","innerPocketLeft","innerPocketRight","frontPocketTopLeft","frontPocketBottomLeft","armholeHollow","waist"]}),n.button1=new p(n.cfWaist.x,n.lapelBreakPoint.y);let S=["button1"];l.buttons>1&&(n.button2=new p(n.cfWaist.x,n.cutawayPoint.y),S.push("button2"),3==l.buttons&&(n.button3=n.button1.shiftFractionTowards(n.button2,.5),S.push("button3")));for(let L of S)e[L]=new o("button",n[L]).attr("data-scale",2);return c("grainline",{from:n.cfHips,to:new p(n.cfArmhole.x,n.collarCorner.y)}),c("vd",{id:"hLapelTipToHps",from:n.notchEdge,to:n.neck,x:n.lapelBreakPoint.x-1
15-t}),c("vd",{id:"hLapelBreakToLapelTip",from:n.lapelBreakPoint,to:n.notchEdge,x:n.lapelBreakPoint.x-15-t}),c("vd",{id:"hBetweenButtons",from:n.cutawayPoint,to:n.lapelBreakPoint,x:n.lapelBreakPoint.x-15-t}),c("vd",{id:"hHemToLapelBreakPoint",from:n.facingBottom,to:n.cutawayPoint,x:n.lapelBreakPoint.x-15-t}),c("vd",{id:"hHemToLapelTip",from:n.facingBottom,to:n.notchEdge,x:n.lapelBreakPoint.x-30-t}),c("vd",{id:"hFull",from:n.facingBottom,to:n.neck,x:n.lapelBreakPoint.x-45-t}),c("hd",{id:"wLapelTipToRollLineTop",from:n.notchEdge,to:n.notchMax,y:n.notchEdge.y-15-t}),c("hd",{id:"hLapelTipToCollarNotch",from:n.notchEdge,to:n.collarCorner,y:n.notchEdge.y-30-t}),c("hd",{id:"wLapelTipToHps",from:n.notchEdge,to:n.neck,y:n.neck.y-15-t}),c("hd",{id:"hLapelStartToHps",from:n.lapelStraightEnd,to:n.neck,y:n.neck.y-30-t}),c("hd",{id:"wLapelStartToArmholePitch",from:n.lapelStraightEnd,to:n.armholePitch,y:n.neck.y-45-t}),c("hd",{id:"wLaperTipToShoulder",from:n.lapelStraightEnd,to:n.shoulder,y:n.neck.y-60-t}),c("hd",{id:"wFull",from:n.lapelStraightEnd,to:n.fsArmhole,y:n.neck.y-75-t}),c("ld",{id:"lShoulderSeam",from:n.neck,to:n.shoulder,d:-15}),c("ld",{id:"lCollarNotchToHps",from:n.collarCorner,to:n.neck,d:-15}),c("ld",{id:"wEdgeToButton",from:n.lapelBreakPoint,to:n.button1,d:-15}),c("hd",{id:"wEdgeToInnerPocket",from:n.lapelBreakPoint,to:n.innerPocketTopLeft,y:n.innerPocketTopLeft.y-35}),c("hd",{id:"wInnerPocket",from:n.innerPocketTopLeft,to:n.innerPocketTopRight,y:n.innerPocketTopLeft.y-35}),c("hd",{id:"wEdgeToFacingEdge",from:n.lapelBreakPoint,to:n.ipfeTopRightEnd,y:n.innerPocketTopLeft.y-50}),c("vd",{from:n.ipfeBottomRightStart,id:"hInnerPocketFacingHeight",to:n.ipfeTopRightStart,x:n.ipfeTopRightEnd.x+15}),c("vd",{id:"hInnerPocketWelt",from:n.innerPocketBottomRight,to:n.innerPocketTopRight,x:n.innerPocketTopRight.x-15}),c("hd",{id:"wEdgeToDartTip",from:n.lapelBreakPoint,to:n.dartTop,y:n.dartTop.y+15}),c("ld",{id:"wDart",from:n.dartLeft,to:n.dartRight}),c("vd",{id:"hDart",from:n.dartBottom,to:n.dartTop,x:n.dartRight.x+15}),c("hd",{id:"wEdgeToFlbBottom",from:n.lapelBreakPoint,to:n.facingBottom,y:n.facingBottom.y+15+t}),c("hd",{id:"EdgeToDart",from:n.lapelBreakPoint,to:n.roundEnd,y:n.facingBottom.y+15+3*t}),c("hd",{id:"wEdgeToHemWaist",from:n.lapelBreakPoint,to:n.hem,y:n.facingBottom.y+30+3*t}),c("vd",{id:"hHemToHip",from:n.hem,to:n.hips,x:n.hem.x+15+t}),c("vd",{id:"hHemToDartBottom",from:n.hem,to:n.dartBottom,x:n.hem.x+30+t}),c("vd",{id:"hHemToWaist",from:n.hem,to:n.waist,x:n.hem.x+45+t}),c("vd",{id:"hHemToInnerPocket",from:n.hem,to:n.innerPocketRight,x:n.hem.x+60+t}),c("vd",{id:"hHemToArmhole",from:n.hem,to:n.fsArmhole,x:n.hem.x+75+t}),c("vd",{id:"hArmholeToArmholePitch",from:n.fsArmhole,to:n.armholePitch,x:n.fsArmhole.x+15+t}),c("vd",{id:"hArmholeToShoulder",from:n.fsArmhole,to:n.shoulder,x:n.fsArmhole.x+30+t}),c("vd",{id:"hArmholeToHps",from:n.fsArmhole,to:n.neck,x:n.fsArmhole.x+45+t}),c("hd",{id:"wEdgeToPocket",from:n.cutawayPoint,to:n.frontPocketTopLeft,y:n.frontPocketTopLeft.y-15}),c("vd",{id:"hPocket",from:n.frontPocketBottomLeft,to:n.frontPocketTopLeft,x:n.frontPocketTopLeft.x-15}),c("vd",{id:"hArmholeToChestPocket",from:n.fsArmhole,to:n.chestPocketBottomLeft,x:n.chestPocketBottomLeft.x-15}),n.cfWaist=new p(n.button1.x,n.waist.y),c("ld",{from:n.cfWaist,to:n.dartLeft,id:"wButtonToDart"}),c("ld",{from:n.dartRight,to:n.waist,id:"wDartToSide"}),f}};const kr={name:"jaeger.back",from:mr,options:{backVent:hr,backVentLength:dr},draft:function({sa:t,snippets:e,Snippet:o,utils:i,store:a,points:s,measurements:n,options:r,macro:l,Point:c,paths:p,Path:h,part:d}){const f=s.cbHips.y-s.cbWaistCp2.dy(s.cbHips)*r.backVentLength;1===Number(r.backVent)?(s.ventStart=i.curveIntersectsY(s.cbHips,s.cbHipsCp1,s.cbWaistCp2,s.cbWaist,f),p.ventBase=(new h).move(s.cbWaist).curve(s.cbWaistCp2,s.cbHipsCp1,s.cbHips).split(s.ventStart).pop().line(s.cbHem),p.vent=p.ventBase.offset(n.neck/10),p.vent.hide(),s.ventSlopeStart=i.lineIntersectsCurve(p.vent.start(),p.vent.start().shift(10,n.neck/5),s.cbHips,s.cbHipsCp1,s.cbWaistCp2,s.cbWaist)):2===Number(r.backVent)&&(s.ventStart=i.curveIntersectsY(s.hips,s.hipsCp2,s.waistCp1,s.waist,f),p.ventBase=(new h).move(s.waist).curve(s.waistCp1,s.hipsCp2,s.hips).split(s.ventStart).pop().line(s.hem),p.vent=p.ventBase.offset(n.neck/-10),p.vent.hide(),s.ventSlopeStart=i.lineIntersectsCurve(p.vent.start(),p.vent.start().shift(170,n.neck/5),s.hips,s.hipsCp2,s.waistCp1,s.waist)),a.set("shoulderSlope",Math.abs(s.neck.angle(s.shoulder)-360));for(let m of Object.keys(p))"vent"!==m&&delete p[m];for(let m of Object.keys(e))delete e[m];return 2===Number(r.backVent)?(p.saBase=p.vent.clone().reverse().line(s.ventSlopeStart).join((new h).move(s.hips).curve(s.hipsCp2,s.waistCp1,s.waist).split(s.ventSlopeStart).pop()),p.saBase.unhide()):p.saBase=(new h).move(s.hem).line(s.hips).curve(s.hipsCp2,s.waistCp1,s.waist),p.saBase.curve(s.waistCp2,s.bsArmholeHollowCp2,s.bsArmholeHollow).curve(s.armholeHollowCp2,s.armholePitchCp1,s.armholePitch).curve(s.armholePitchCp2,s.shoulderCp1,s.shoulder).line(s.neck).curve_(s.neckCp2,s.cbNeck),r.centerBackDart>0?p.saBase=p.saBase._curve(s.cbChestCp1,s.cbChest):p.saBase=p.saBase.line(s.cbChest),p.saBase=p.saBase.curve(s.cbChestCp2,s.cbWaistCp1,s.cbWaist),1===Number(r.backVent)?p.saBase=p.saBase.join((new h).move(s.cbWaist).curve(s.cbWaistCp2,s.cbHi
1psCp1,s.cbHips).line(s.cbHem).split(s.ventSlopeStart).shift()).line(p.vent.start()).join(p.vent):p.saBase.curve(s.cbWaistCp2,s.cbHipsCp1,s.cbHips).line(s.cbHem),p.saBase.hide(),2===Number(r.backVent)?p.hemBase=(new h).move(s.cbHem).line(p.vent.end()):1===Number(r.backVent)?p.hemBase=(new h).move(p.vent.end()).line(s.hem):p.hemBase=(new h).move(s.cbHem).line(s.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")),s.logo=new c(s.title.x,s.armholeHollow.y),e.logo=new o("logo",s.logo),l("sprinkle",{snippet:"notch",on:["neck","shoulder","armholePitch","cbWaist","waist"]}),l("grainline",{from:new c(s.neck.x,s.hips.y),to:s.neck}),l("hd",{id:"wcBNecktoHps",from:s.cbNeck,to:s.neck,y:s.neck.y-15-t}),l("hd",{id:"wcBChesttoHps",from:s.cbChest,to:s.neck,y:s.neck.y-30-t}),l("hd",{id:"wCbChestToArmholePitch",from:s.cbChest,to:s.armholePitch,y:s.neck.y-45-t}),l("hd",{id:"wCbChestToShoulder",from:s.cbChest,to:s.shoulder,y:s.neck.y-60-t}),l("hd",{id:"wCbChestToArmhole",from:s.cbChest,to:s.bsArmholeHollow,y:s.neck.y-75-t}),l("vd",{id:"hArmholeToArmholePitch",from:s.bsArmholeHollow,to:s.armholePitch,x:s.bsArmholeHollow.x+t+15}),l("vd",{id:"hArmholeToShoulder",from:s.bsArmholeHollow,to:s.shoulder,x:s.bsArmholeHollow.x+t+30}),l("vd",{id:"hHemToHips",from:s.hem,to:s.hips,x:s.hem.x+t+15}),l("vd",{id:"hHemToWaist",from:s.hem,to:s.waist,x:s.hem.x+t+30}),l("vd",{id:"hHemToArmhole",from:s.hem,to:s.bsArmholeHollow,x:s.hem.x+t+45}),Number(r.backVent)>0&&(l("hd",{id:"wVent",from:p.vent.start(),to:s.ventSlopeStart,y:s.ventSlopeStart.y+25}),l("hd",{id:"wAtHem",from:p.vent.end(),to:s.hem,y:s.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:s.ventSlopeStart,x:p.vent.end().x-t-30}),l("vd",{id:"hHemToWaist2",from:p.vent.end(),to:s.cbWaist,x:p.vent.end().x-t-45}),l("vd",{id:"hHemToChest",from:p.vent.end(),to:s.cbChest,x:p.vent.end().x-t-60}),l("vd",{id:"hHemToCbNeck",from:p.vent.end(),to:s.cbNeck,x:p.vent.end().x-t-75}),l("vd",{id:"hFull",from:p.vent.end(),to:s.neck,x:p.vent.end().x-t-90})),l("ld",{id:"wAtWaist",from:s.cbWaist,to:s.waist}),l("ld",{id:"lShoulderSeam",from:s.neck,to:s.shoulder,d:-15}),d}};const wr={name:"jaeger.collarStand",from:br,after:kr,options:{collarSpread:{deg:13,min:5,max:35,menu:"collar"}},draft:function({sa:t,store:e,points:o,measurements:i,options:a,macro:s,snippets:n,paths:r,Path:l,part:c}
1){const p=["notch","notchTip","collarCorner","neck","shoulderRoll","shoulderRollCb","collarCbTop","collarCbHelp","collarCbBottom","lapelBreakPoint"];for(const d of Object.keys(o))-1===p.indexOf(d)&&delete o[d];for(const d of Object.keys(r))delete r[d];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,i.neck*a.collarHeight*2);let h=-1*o.collarstandCbBottom.angle(o.neck);for(const d of Object.keys(o))o[d]=o[d].rotate(h,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(a.collarSpread,o.collarCorner),o.notchTip=o.notchTip.rotate(a.collarSpread,o.collarCorner),o.shoulderRoll=o.shoulderRoll.rotate(a.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 d of Object.keys(r))delete r[d];for(const d of Object.keys(n))delete n[d];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"}),s("sprinkle",{snippet:"notch",on:["collarstandCbBottom","collarstandCbTop"]}),o.title=o.collarstandCbTop.shiftFractionTowards(o.collarCbBottom,.5),s("title",{at:o.title,nr:8,title:"collarstand"}),s("grainline",{from:o.collarstandCbTop,to:o.collarstandCbBottom}),s("hd",{id:"wAtTop",from:o.leftCollarCorner,to:o.collarCorner,y:o.collarstandCbBottom.y-t-15}),s("hd",{id:"wFull",from:o.leftCollarstandTip,to:o.collarstandTip,y:o.collarstandTip.y+t+15}),s("vd",{id:"hAtSide",from:o.collarstandTip,to:o.collarCorner,x:o.collarstandTip.x+t+15}),s("vd",{id:"hFull",from:o.collarstandTip,to:o.collarstandCbBottom,x:o.collarstandTip.x+t+30}),s("vd",{id:"hCenter",from:o.collarstandCbTop,to:o.collarstandCbBottom,x:o.collarstandCbTop.x+15}),c}};const Cr={name:"jaeger.collar",from:wr,options:{collarRoll:{pct:5,min:0,max:10,menu:"collar"}},draft:function({sa:t,snippets:e,points:o,options:i,macro:a,paths:s,Path:n,store:r,part:l}){r.set("collarRoll",o.collarstandCbTop.dist(o.collarCbTop)*i.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(s))delete s[p];for(let p of Object.keys(e))delete e[p];return s.seam=(new n).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"),s.roll=(new n).move(o.notchTip)._curve(o.collarCbTopCp,o.collarCbTop).curve_(o.collarCbTopCpLeft,o.notchTipLeft).attr("class","stroke-sm dashed"),t&&(s.sa=s.seam.offset(t).attr("class","fabric sa")),r.cutlist.setCut({cut:1,from:"fabric"}),a("sprinkle",{snippet:"notch",on:["collarstandCbTop","notchTip","notchTipLeft"]}),o.title=o.collarstandCbTopCp.shiftFractionTowards(o.collarCbTopCpRoll,.5),a("title",{at:o.title,nr:7,title:"collar"}),a("grainline",{from:o.collarCbTopRoll,to:o.collarstandCbTop}),a("hd",{id:"wAtTop",from:o.collarstandTipLeft,to:o.collarstandTip,y:o.collarstandCbTop.y-t-15}),a("hd",{id:"Full",from:o.notchLeft,to:o.notch,y:o.collarstandCbTop.y-t-30}),a("hd",{id:"wAtBottom",from:o.notchTipRollLeft,to:o.notchTipRoll,y:o.notchTipRoll.y+t+15}),a("hd",{from:o.notchTipLeft,to:o.notchTip,y:o.notchTipRoll.y+t+30}),a("vd",{id:"hAtCenter",from:o.collarCbTopRoll,to:o.collarstandCbTop,x:o.collarCbTopRoll.x+15}),a("ld",{id:"lTopSide",from:o.notch,to:o.collarstandTip,d:-1*t-15}),a("ld",{id:"lBottomSideNarrow",from:o.notchTip,to:o.notch,d:-15-t}),a("ld",{id:"lBottomSideFull",from:o.notchTipRoll,to:o.notch,d:-30-t}),a("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:i,store:a,paths:s,Path:n,part:r}){for(let l of Object.keys(s))delete s[l];for(let l of Object.keys(e))delete e[l];return s.seam=(new n).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&&(s.partialSa1=(new n).move(o.leftCollarCorner).line(o.notchLeft).line(o.notchTipRollLeft).offset(t).hide(),s.partialSa2=(new n).move(o.notchTipRoll).line(o.notch).line(o.collarCorner).offset(t).hide(),s.sa1=(new n).move(o.leftCollarCorner).join(s.partialSa1).line(o.notchTipRollLeft).attr("class","various sa"),s.sa2=(new n).move(o.notchTipRoll).join(s.partialSa2).line(o.collarCorner).attr("class","various sa")),a.cutlist.setCut([{cut:1,from:"specialty"},{cut:1,from:"canvas"}]),o.title=o.collarCbTopCp.shiftFractionTowards(o.collarstandCbTopCp,.4).shiftFractionTowards(o.collarstandCbTop,.5),i("rmtitle"),i("title",{at:o.title,nr:6,title:"undercollar",scale:.6}),i("rmad"),i("hd",{id:"wAtTop",from:o.leftCollarCorner,to:o.collarCorner,y:o.collarstandCbBottom.y-10}),i("hd",{id:"wFull",from:o.notchLeft,to:o.notch,y:o.collarstandCbBottom.y-25}),i("hd",{id:"wAtBottom",from:o.notchTipRollLeft,to:o.notchTipRoll,y:o.notchTipRoll.y+15}),i("vd",{id:"hAtCb",to:o.collarstandCbBottom,from:o.collarCbTopRoll,x:o.collarCbTop.x-t-15}),i("ld",{id:"lTopSide",to:o.collarCorner,from:o.notch,d:-1*t-15}),i("ld",{id:"lBottomSide",from:o.notchTipRoll,to:o.notch,d:-15-t}),i("vd",{id:"hFull",from:o.notchTipRoll,to:o.collarstandCbBottom,x:o.notch.x+t+40}),r}};const Tr={name:"jaeger.pocket",after:[ur,mr],options:{pocketFoldover:{pct:25,min:15,max:35,menu:"pockets"}},draft:function({sa:t,store:e,utils:o,complete:i,points:a,options:s,macro:n,Point:r,paths:l,Path:c,part:p}){const h=e.get("pocketWidth"),d=e.get("pocketDepth");if(a.topLeft=new r(0,0),a.topRight=new r(h,0),a.bottomLeft=new r(0,d),a.bottomRight=new r(h,d),a.edgeLeft=a.bottomLeft.shiftFractionTowards(a.topLeft,1+s.pocketFoldover),a.edgeRight=new r(a.topRight.x,a.edgeLeft.y),s.frontPocketRadius>
10){const t={left:n("round",{id:"left",from:a.topLeft,to:a.bottomRight,via:a.bottomLeft,radius:h*s.frontPocketRadius}),right:n("round",{id:"right",from:a.bottomLeft,to:a.topRight,via:a.bottomRight,radius:h*s.frontPocketRadius})};for(const e in t)for(const i of["start","cp1","cp2","end"])a[`${e}${o.capitalize(i)}`]=a[t[e].points[i]].copy()}s.frontPocketRadius>0?l.seam=(new c).move(a.edgeLeft).line(a.leftStart).curve(a.leftCp1,a.leftCp2,a.leftEnd).line(a.rightStart).curve(a.rightCp1,a.rightCp2,a.rightEnd).line(a.edgeRight).line(a.edgeLeft).close().attr("class","fabric"):l.seam=(new c).move(a.edgeLeft).line(a.bottomLeft).line(a.bottomRight).line(a.edgeRight).line(a.edgeLeft).close().attr("class","fabric"),i&&(l.fold=(new c).move(a.topLeft).line(a.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"}),a.title=a.topLeft.shiftFractionTowards(a.bottomRight,.5),n("title",{at:a.title,nr:9,title:"pocket",align:"center"}),n("grainline",{from:a.bottomLeft.shift(0,10),to:a.edgeLeft.shift(0,10)}),n("hd",{id:"wFull",from:a.edgeLeft,to:a.edgeRight,y:a.edgeLeft.y-t-15});let f=a.bottomRight;return s.frontPocketRadius>0&&(f=a.rightStart),n("vd",{id:"hToFold",from:f,to:a.topRight,x:a.edgeRight.x+t+15}),n("vd",{id:"hFull",from:f,to:a.edgeRight,x:a.edgeRight.x+t+30}),p}};const yr={name:"jaeger.pocketLining",from:Tr,draft:function({sa:t,snippets:e,store:o,points:i,options:a,macro:s,paths:n,Path:r,part:l}){i.topLeft=i.edgeLeft.flipY(i.topLeft),i.topRight=i.edgeRight.flipY(i.topRight);for(let p of Object.keys(n))delete n[p];for(let p of Object.keys(e))delete e[p];a.frontPocketRadius>0?n.seam=(new r).move(i.topLeft).line(i.leftStart).curve(i.leftCp1,i.leftCp2,i.leftEnd).line(i.rightStart).curve(i.right
1Cp1,i.rightCp2,i.rightEnd).line(i.topRight).line(i.topLeft).close().attr("class","lining"):n.seam=(new r).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).line(i.topLeft).close().attr("class","lining"),t&&(n.sa=n.seam.offset(t).attr("class","lining sa")),o.cutlist.setCut({cut:2,from:"lining"}),i.title=i.topLeft.shiftFractionTowards(i.bottomRight,.5),s("rmtitle"),s("title",{at:i.title,nr:10,title:"pocketLining",align:"center"}),s("grainline",{from:i.bottomLeft.shift(0,10),to:i.topLeft.shift(0,10)}),s("hd",{id:"wFull",from:i.topLeft,to:i.topRight,y:i.topLeft.y-t-15});let c=i.bottomRight;return a.frontPocketRadius>0&&(c=i.rightStart),s("vd",{id:"hFull",from:c,to:i.topRight,x:i.topRight.x+t+15}),l}};const xr={name:"jaeger.chestPocketWelt",after:br,draft:function({sa:t,store:e,complete:o,points:i,options:a,macro:s,Point:n,paths:r,Path:l,part:c}){let p=e.get("chestPocketWidth"),h=e.get("chestPocketWeltHeight"),d=a.chestPocketAngle;return i.anchor=new n(0,0),i.top=i.anchor.shift(90-d,h/2),i.bottom=i.anchor.shift(-90-d,h/2),i.topLeft=i.top.shift(180,p/2),i.topRight=i.topLeft.rotate(180,i.top),i.bottomLeft=i.bottom.shift(180,p/2),i.bottomRight=i.bottomLeft.rotate(180,i.bottom),i.foldLeft=i.bottomLeft.flipY(i.topLeft),i.foldRight=i.bottomRight.flipY(i.topLeft),r.seam=(new l).move(i.foldLeft).line(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).line(i.foldRight).line(i.foldLeft).close().attr("class","fabric"),o&&(r.fold=(new l).move(i.topLeft).line(i.topRight).attr("class","stroke-sm dashed")),t&&(r.sa=r.seam.offset(t).attr("class","fabric sa")),e.cutlist.setCut({cut:2,from:"fabric"}),s("title",{at:i.top,nr:11,title:"chestPocketWelt",scale:.666}),s("grainline",{from:i.bottomLeft.shift(0,10),to:i.bottomLeft.shiftFractionTowards(i.topLeft,2).shift(0,10)}),s("hd",{id:"wNarrow",from:i.topLeft,to:i.foldRight,y:i.foldLeft.y-t-15}),s("hd",{id:"wFull",from:i.foldLeft,to:i.foldRight,y:i.foldLeft.y-t-30}),s("vd",{id:"hFull",from:i.bottomRight,to:i.foldRight,x:i.bottomRight.x+t+15}),c}};const Br={name:"jaeger.chestPocketBag",after:br,draft:function({sa:t,store:e,complete:o,points:i,options:a,macro:s,Point:n,paths:r,Path:l,part:c}){const p=e.get("chestPocketWidth"),h=e.get("chestPocketWeltHeight"),d=p*a.chestPocketDepth,f=a.chestPocketAngle;return i.topLeft=new n(0,0),i.topRight=i.topLeft.shift(f,p),i.foldLeft=i.topLeft.shift(-90,d),i.foldRight=new n(i.topRight.x,i.foldLeft.y),i.bottomLeft=i.topLeft.shift(-90,2*d+h),i.bottomRight=i.bottomLeft.shift(-1*f,p),r.seam=(new l).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).line(i.topLeft).close().attr("class","lining"),o&&(r.fold=(new l).move(i.foldLeft).line(i.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"}),i.title=i.topLeft.shiftFractionTowards(i.foldRight,.5),s("title",{at:i.title,nr:12,title:"chestPocketBag",align:"center",scale:.666}),s("grainline",{from:i.bottomLeft.shift(0,10),to:i.topLeft.shift(0,10)}),s("hd",{id:"wFull",from:i.topLeft,to:i.topRight,y:i.topRight.y-t-15}),s("vd",{id:"hToFold",from:i.bottomRight,to:i.foldRight,x:i.topRight.x+t+15}),s("vd",{id:"hFromFold",from:i.foldRight,to:i.topRight,x:i.topRight.x+t+15}),s("vd",{from:i.bottomRight,id:"hFull",to:i.topRight,x:i.topRight.x+t+30}),s("vd",{id:"hToFoldSmall",from:i.bottomLeft,to:i.foldLeft,x:i.topLeft.x-t-15}),s("vd",{id:"hFromFoldSmall",from:i.foldLeft,to:i.topLeft,x:i.topLeft.x-t-15}),c}};const Sr={name:"jaeger.topsleeve",from:B,hide:s.V9.HIDE_TREE,options:{sleeveVentLength:rr,sleeveVentWidth:lr},draft:function({sa:t,store:e,utils:o,points:i,measurements:a,options:s,macro:n,paths:r,Path:l,part:c}){let p=a.wrist*(1+s.cuffEase)*s.sleeveVentWidth;i.ventFoldRight=i.tsWristLeft.shiftOutwards(i.tsWristRight,p),i.ventHelper=i.tsWristRight.shiftFractionTowards(i.elbowRight,s.sleeveVentLength),i.ventSlopeEnd=i.ventHelper.shiftTowards(i.tsWristRight,p).rotate(90,i.ventHelper),i.ventSlopeStart=o.beamsIntersect(i.tsWristRight,i.elbowRight,i.ventSlopeEnd,i.ventHelper.rotate(-15,i.ventSlopeEnd));let h=t?3*t:30;i.hemHelperLeft=i.tsWristLeft.shiftTowards(i.tsWristRight,h).rotate(90,i.tsWristLeft),i.hemHelperRight=i.tsWristRight.shiftTowards(i.tsWristLeft,h).rotate(-90,i.tsWristRight),i.hemLeftIntersection=o.beamsIntersect(i.hemHelperLeft,i.hemHelperRight,i.tsWristLeft,i.tsElbowLeft),i.hemRightIntersection=o.beamsIntersect(i.hemHelperLeft,i.hemHelperRight,i.tsWristRight,i.elbowRight),i.hemVentIntersection=o.beamsIntersect(i.hemHelperLeft,i.hemHelperRight,i.ventFoldRight,i.ventSlopeEnd),i.hemLeft=i.hemLeftIntersection.rotate(-2*i.tsWristLeft.angle(i.hemLeftIntersection),i.tsWristLeft),i.hemRight=i.hemRightIntersection.rotate(-2*i.tsWristRight.angle(i.hemRightIntersection),i.tsWristRight),i.ventRight=i.hemVentIntersection.rotate(-2*i.ventFoldRight.angle(i.hemVentIntersection),i.ventFoldRight);for(let d of Object.keys(r))delete r[d];return r.seam=(new l).move(i.ventFoldRight).line(i.ventSlopeEnd).line(i.ventSlopeStart).line(i.elbowRight).curve(i.elbowRightCpTop,i.tsRightEdgeCpBottom,i.tsRightEdge).curve_(i.tsRightEdgeCpTop,i.backPitchPoint)._curve(i.topCpRight,i.top).curve(i.topCpLeft,i.frontPitchPointCpTop,i.frontPitchPoint).curve(i.frontPitchPointCpBottom,i.tsLeftEdgeCpRight,i.tsLeftEdge)._curve(i.tsElbowLeftCpTop,i.tsElbowLeft).line(i.tsWristLeft).line(i.hemLeft).line(i.ventRight).line(i.ventFoldRight).close().attr("class","fabric"),r.ventHint=(new l).move(i.ventSlopeStart).line(i.tsWristRight).attr("class","stroke-sm help"),r.hem=(new l).move(i.tsWristLeft).line(i.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"}]),n("scalebox",{at:i.elbowCenter}),n("sprinkle",{snippet:"notch",on:["top","tsElbowLeft","elbowRight"]}),i.title=i.tsLeftEdge.shiftFractionTowards(i.tsRightEdge,.5),n("title",{at:i.title,nr:4,title:"topsleeve"}),n("grainline",{from:i.boxBottom,to:i.top}),n("ld",{id:"lWrist",from:i.tsWristLeft,to:i.tsWristRight,d:15}),n("ld",{id:"lWristPlusVent",from:i.tsWristLeft,to:i.ventFoldRight,d:30}),n("ld",{id:"lFoldoverWristPlusVent",from:i.hemLeft,to:i.ventRight,d:-15-t}),n("ld",{id:"hFoldoverCuff",from:i.hemLeft,to:i.tsWristLeft,d:15+t}),n("ld",{id:"lVent",from:i.tsWristRight,to:i.ventSlopeStart,d:15}),n("ld",{id:"lVentShort",from:i.ventFoldRight,to:i.ventSlopeEnd,d:15}),n("ld",{id:"wVent",from:i.tsWristRight,to:i.ventFoldRight,d:-15}),n("vd",{id:"hFull",from:i.ventRight,to:i.top,x:i.ventSlopeEnd.x+t
1+15}),n("vd",{id:"hInnerWristToElbow",from:i.tsWristLeft,to:i.tsElbowLeft,x:i.tsLeftEdge.x-t-15}),n("vd",{id:"hInnerWristToSleevecap",from:i.tsWristLeft,to:i.tsLeftEdge,x:i.tsLeftEdge.x-t-30}),n("vd",{id:"hSleevecap",from:i.tsLeftEdge,to:i.top,x:i.tsLeftEdge.x-t-30}),n("vd",{id:"hInnerWristToSleevecapTop",from:i.tsWristLeft,to:i.top,x:i.tsLeftEdge.x-t-45}),n("ld",{id:"wSleevecap",from:i.tsLeftEdge,to:i.tsRightEdge}),n("ld",{id:"wAtElbow",from:i.tsElbowLeft,to:i.elbowRight}),n("hd",{id:"wSleevecapLeft",from:i.tsLeftEdge,to:i.top,y:i.top.y-t-15}),n("hd",{id:"wSleevecap",from:i.tsLeftEdge,to:i.backPitchPoint,y:i.top.y-t-30}),n("hd",{id:"wFull",from:i.tsLeftEdge,to:i.tsRightEdge,y:i.top.y-t-45}),c},after:N};const Lr={name:"jaeger.undersleeve",from:S,options:{sleeveVentLength:rr,sleeveVentWidth:lr},hide:s.V9.HIDE_TREE,draft:function({sa:t,utils:e,points:o,store:i,measurements:a,options:s,macro:n,paths:r,Path:l,part:c}){let p=a.wrist*(1+s.cuffEase)*s.sleeveVentWidth;o.ventFoldRight=o.usWristLeft.shiftOutwards(o.usWristRight,p),o.ventHelper=o.usWristRight.shiftFractionTowards(o.elbowRight,s.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 h=t?3*t:30;o.hemHelperLeft=o.usWristLeft.shiftTowards(o.usWristRight,h).rotate(90,o.usWristLeft),o.hemHelperRight=o.usWristRight.shiftTowards(o.usWristLeft,h).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 d of Object.keys(r))delete r[d];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")),i.cutlist.setCut([{cut:2,from:"fabric"},{cut:2,from:"lining"}]),n("sprinkle",{snippet:"notch",on:["top","usElbowLeft","elbowRight"]}),o.title=o.tsLeftEdge.shiftFractionTowards(o.tsRightEdge,.5),n("title",{at:o.title,nr:5,title:"undersleeve"}),n("grainline",{from:o.boxBottom,to:o.armCenter}),n("ld",{id:"lAtWrist",from:o.usWristLeft,to:o.usWristRight,d:15}),n("ld",{id:"lAtWristPlusVent",from:o.usWristLeft,to:o.ventFoldRight,d:30}),n("ld",{id:"lFoldoverCuff",from:o.hemLeft,to:o.ventRight,d:-15-t}),n("ld",{id:"hFoldoverCuff",from:o.hemLeft,to:o.usWristLeft,d:15+t}),n("ld",{id:"lVent",from:o.usWristRight,to:o.ventSlopeStart,d:15}),n("ld",{id:"lVentShort",from:o.ventFoldRight,to:o.ventSlopeEnd,d:15}),n("ld",{id:"wVent",from:o.usWristRight,to:o.ventFoldRight,d:-15}),n("vd",{id:"hWristToElbow",from:o.usWristLeft,to:o.usElbowLeft,x:o.usLeftEdge.x-t-15}),n("vd",{id:"hFrontWristToArmhole",from:o.usWristLeft,to:o.usLeftEdge,x:o.usLeftEdge.x-t-30}),n("vd",{id:"hArmhole",from:o.usLeftEdge,to:o.usTip,x:o.usLeftEdge.x-t-30}),n("vd",{id:"hWristToSleeveTip",from:o.usWristLeft,to:o.usTip,x:o.usLeftEdge.x-t-45}),n("ld",{id:"wAtElbow",from:o.usElbowLeft,to:o.elbowRight}),n("hd",{id:"wArmhole",from:o.usLeftEdge,to:o.usTip,y:o.usTip.y-t-15}),n("hd",{id:"wFull",from:o.usLeftEdge,to:o.elbowRight,y:o.usTip.y-t-30}),c},after:N};const Pr={name:"jaeger.innerPocketBag",after:br,draft:function({sa:t,store:e,complete:o,points:i,options:a,expand:s,units:n,macro:r,Point:l,paths:c,Path:p,part:h}
1){const d=e.get("innerPocketWidth"),f=e.get("innerPocketWeltHeight"),m=d*a.innerPocketDepth;if(!s){const o=t?2*t:0;return e.flag.note({msg:"jaeger:cutInnerPocketBag",notes:[t?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{width:n(d+o),length:n(m+o)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),e.flag.preset("expandIsOff"),h.hide()}return e.flag.preset("expandIsOn"),i.topLeft=new l(0,0),i.topRight=new l(d,0),i.foldLeft=new l(0,m),i.foldRight=new l(d,m),i.bottomLeft=new l(0,2*m+2*f),i.bottomRight=new l(d,2*m+2*f),c.seam=(new p).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).line(i.topLeft).close().attr("class","lining"),o&&(c.fold=(new p).move(i.foldLeft).line(i.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"}),i.title=i.topLeft.shiftFractionTowards(i.foldRight,.5),r("title",{at:i.title,nr:14,title:"innerPocketBag",align:"center"}),r("grainline",{from:i.bottomLeft.shift(0,10),to:i.topLeft.shift(0,10)}),r("hd",{id:"wFull",from:i.topLeft,to:i.topRight,y:i.topRight.y-t-15}),r("vd",{id:"hToFold",from:i.bottomRight,to:i.foldRight,x:i.topRight.x+t+15}),r("vd",{id:"hFromFold",from:i.foldRight,to:i.topRight,x:i.topRight.x+t+15}),r("vd",{id:"hFull",from:i.bottomRight,to:i.topRight,x:i.topRight.x+t+30}),h}};const Rr={name:"jaeger.innerPocketWelt",after:br,draft:function({sa:t,store:e,complete:o,expand:i,units:a,points:s,macro:n,Point:r,paths:l,Path:c,part:p}){const h=e.get("innerPocketWidth"),d=e.get("innerPocketWeltHeight");if(!i){const o=t?2*t:0;return e.flag.note({msg:"jaeger:cutInnerPocketWelt",notes:[t?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{width:a(h+o),length:a(d+o)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),e.flag.preset("expandIsOff"),p.hide()}return e.flag.preset("expandIsOn"),s.topLeft=new r(0,0),s.topRight=new r(h,0),s.foldLeft=new r(0,d),s.foldRight=new r(h,d),s.bottomLeft=new r(0,2*d),s.bottomRight=new r(h,2*d),l.seam=(new c).move(s.topLeft).line(s.bottomLeft).line(s.bottomRight).line(s.topRight).line(s.topLeft).close().attr("class","fabric"),o&&(l.fold=(new c).move(s.foldLeft).line(s.foldRight).addClass("stroke-sm dashed")),t&&(l.sa=l.seam.offset(t).attr("class","fabric sa")),e.cutlist.setCut({cut:2,from:"fabric"}),s.title=s.topLeft.shiftFractionTowards(s.bottomRight,.5),n("rmtitle"),n("title",{at:s.title,nr:13,title:"innerPocketWelt",scale:.666,align:"center"}),n("hd",{from:s.topLeft,to:s.topRight,y:s.topRight.y-t-15}),n("vd",{from:s.bottomRight,to:s.topRight,x:s.topRight.x+t+15}),p}};const Fr={name:"jaeger.chestPiece",from:br,draft:function({sa:t,snippets:e,Snippet:o,store:i,points:a,macro:s,expand:n,Point:r,paths:l,Path:c,part:p}){if(!n)return i.flag.note({msg:"jaeger:cutChestPiece",notes:"flag:partHiddenByExpand",suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),i.flag.preset("expandIsOff"),p.hide();i.flag.preset("expandIsOn");for(const h in l)delete l[h];for(const h in e)delete e[h];return l.seam=(new c).move(a.split).curve(a.splitCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.armholePitchCp1,a.armholePitch).curve(a.armholePitchCp2,a.shoulderCp1,a.shoulder).line(a.neck).line(a.collarCorner).line(a.shoulderRoll).line(a.lapelBreakPoint).curve(a.cutawayPoint,a.waist,a.fsArmhole).close().addClass("canvas"),t&&(l.sa=l.seam.offset(t).attr("class","fabric sa")),i.cutlist.setCut({cut:2,from:"canvas"}),e.logo=new o("logo",a.innerPocketBottomRight),s("grainline",{from:new r(a.collarCorner.x,a.lapelBreakPoint.y),to:a.collarCorner}),s("rmtitle"),s("title",{at:a.title,nr:"1c",title:"chestPiece"}),p}};const Wr={name:"jaeger.frontFacing",from:br,draft:function({sa:t,snippets:e,Snippet:o,store:i,points:a,expand:s,macro:n,Point:r,paths:l,Path:c,part:p}){if(!s)return i.flag.note({msg:"jaeger:cutFrontFacing",notes:"flag:partHiddenByExpand",suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),i.flag.preset("expandIsOff"),p.hide();i.flag.preset("expandIsOn");for(const d in l)delete l[d];for(const d in e)delete e[d];const h=(new c).move(a.ipfeStartStart).curve(a.ipfeStartCp1,a.ipfeStartCp2,a.ipfeStartEnd).line(a.ipfeTopRightStart).curve(a.ipfeTopRightCp1,a.ipfeTopRightCp2,a.ipfeTopRightEnd).curve(a.ipfeBottomRightCp2,a.ipfeBottomRightCp1,a.ipfeBottomRightStart).line(a.ipfeEndEnd).curve(a.ipfeEndCp2,a.ipfeEndCp1,a.ipfeEnd);return l.seam=(new c).move(a.facingTop).line(a.neck).line(a.collarCorner).line(a.notch).line(a.notchEdge)._curve(a.lapelStraightEndCp1,a.lapelStraightEnd).line(a.cutawayPoint).curve(a.cutawayPointCp2,a.roundStartCp1,a.roundStart).join((new c).move(a.roundStart).curve(a.roundCp1,a.roundCp2,a.roundEnd).split(a.facingBottom)[0]).line(a.ipfeEnd).join(h.reverse()).line(a.facingTop).addClass("fabric"),t&&(l.sa=l.seam.offset(t).attr("class","fabric sa")),i.cutlist.setCut({cut:2,from:"fabric"}),a.logo=new r(a.cfNeckCp1.x,a.lapelBreakPoint.y),e.logo=new o("logo",a.logo),a.title=new r(a.cfNeckCp1.x,a.lapelStraightEnd.y),n("title",{at:a.title,nr:"1a",title:"frontFacing",align:"center"}),n("grainline",{from:a.cfHips,to:new r(a.cfArmhole.x,a.collarCorner.y)}),p}};const Hr={name:"jaeger.frontLining",from:br,draft:function({sa:t,snippets:e,Snippet:o,store:i,points:a,expand:s,macro:n,Point:r,paths:l,Path:c,part:p}){if(!s)return i.flag.note({msg:"jaeger:cutFrontLining",notes:"flag:partHiddenByExpand",suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),i.flag.preset("expandIsOff"),p.hide();i.flag.preset("expandIsOn");for(const h in l)delete l[h];for(const h in e)delete e[h];return l.seam=(new c).move(a.roundStart).curve(a.roundCp1,a.roundCp2,a.roundEnd).split(a.facingBottom)[1].line(a.hem).line(a.hips).curve(a.hipsCp2,a.waistCp1,a.waist).curve_(a.waistCp2,a.split).curve(a.splitCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.armholePitchCp1,a.armholePitch).curve(a.armholePitchCp2,a.shoulderCp1,a.shoulder).line(a.facingTop).line(a.facingBottom).close().addClass("lining"),t&&(l.sa=l.seam.offset(t).attr("class","fabric sa")),i.cutlist.setCut({cut:2,from:"lining"}),a.logo=new r(a.chestPocketBottomRight.x,a.lapelBreakPoint.y),e.logo=new o("logo",a.logo),a.title=new r(a.chestPocketBottom.x,a.lapelStraightEnd.y),n("title",{at:a.title,nr:"1b",title:"frontLining"}),n("grainline",{from:new r(a.facingTop.x,a.hem.y),to:a.facingTop}),p}},Ar=new s.pT({data:sr,parts:[mr,ur,Wr,Hr,Fr,gr,wr,Cr,vr,Tr,yr,xr,Br,Sr,Lr,Pr,Rr]}),Or=(0,s.D4)([St,ar]),Dr=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}'),Er={name:"jane.sleeve",measurements:["biceps","shoulderToElbow"],options:{bicepsEase:{pct:18,min:18,max:51,...(0,s.Wx)("biceps"),menu:"fit"},sleeveLength:{pct:80,min:60,max:100,menu:"style"}}
1,draft:function({options:t,Point:e,Path:o,Snippet:i,points:a,paths:s,snippets:n,sa:r,paperless:l,macro:c,measurements:p,part:h,store:d}){const f=p.biceps*(1+t.bicepsEase),m=p.shoulderToElbow*t.sleeveLength;return a.sleeveLeft=new e(0,0),a.sleeveRight=new e(m,0),a.sleeveBottomLeft=new e(0,f),a.sleeveBottomRight=new e(m,f),s.sleeve=(new o).move(a.sleeveRight).line(a.sleeveLeft).line(a.sleeveBottomLeft).line(a.sleeveBottomRight).line(a.sleeveRight).addClass("fabric").close(),d.cutlist.setCut({cut:2,from:"fabric",identical:"true"}),a.title=a.sleeveLeft.shift(300,m/2),c("title",{at:a.title,nr:2,title:"sleeve"}),a.notch=new e(0,f/2).addText("shoulder","center"),a.text1=new e(m/2,10).addText("seam","center"),a.text2=new e(m/2,f).addText("seam","center"),a.text3=a.sleeveRight.shiftTowards(a.sleeveBottomRight,f/2).addText("hem","center"),n.notch=new i("notch",a.notch),r&&(s.sa=s.sleeve.offset(r).setClass("fabric sa").close()),l&&(c("vd",{id:"sleeveLength",from:a.sleeveLeft,to:a.sleeveBottomLeft,x:a.sleeveLeft.x+r+30}),c("hd",{id:"sleeveWidth",from:a.sleeveLeft,to:a.sleeveRight,y:a.sleeveLeft.y+r+30})),h}},Ir={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"}}}')},Nr=new s.pT({data:Dr,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"}},draft:function({options:t,Point:e,Path:o,points:i,paths:a,Snippet:s,snippets:n,sa:r,paperless:l,macro:c,measurements:p,part:h,store:d}){const f=(p.waistToKnee+p.hpsToWaistBack)*(1+t.shiftLength),m=(p.chest>p.hips?p.chest/2:p.hips/2)*(1+t.bodyEase),u=f>p.waistToFloor+p.hpsToWaistBack?p.waistToFloor+p.hpsToWaistBack:f;i.topLeft=new e(0,0),i.topRight=new e(m,0),i.bottomLeft=new e(0,u),i.bottomRight=new e(m,u),i.gorestartLeft=i.bottomLeft.shiftTowards(i.topLeft,u/2),i.gorestartRight=i.bottomRight.shiftTowards(i.topRight,u/2),i.middle=i.topLeft.shiftTowards(i.topRight,m/2),i.leftShoulder=i.middle.shiftTowards(i.topLeft,p.shoulderToShoulder/2),i.rightShoulder=i.middle.shiftTowards(i.topRight,p.shoulderToShoulder/2),a.body=(new o).move(i.topRight).line(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).addClass("fabric").close(),a.leftGore=(new o).move(i.leftShoulder).line(i.gorestartLeft).addClass("fabric dashed").close(),a.rightGore=(new o).move(i.rightShoulder).line(i.gorestartRight).addClass("fabric dashed").close();const g=p.neck*t.neckWidth;return i.neckLeft=i.middle.shiftTowards(i.leftShoulder,g/2),i.neckRight=i.middle.shiftTowards(i.rightShoulder,g/2),i.middleHem=i.bottomLeft.shiftTowards(i.bottomRight,m/2),i.neckFront=i.middle.shiftTowards(i.middleHem,p.hpsToBust*t.neckDepthFront).addText("Front Neckline","center"),i.neckCp1=i.neckRight.shift(90,.8*i.neckFront.dy(i.neckRight)),i.neckCp2=i.neckFront.shift(180,.8*i.neckFront.dy(i.neckRight)),i.neckCp3=i.neckLeft.shift(90,.8*i.neckFront.dy(i.neckLeft)),i.neckCp4=i.neckFront.shift(0,.8*i.neckFront.dy(i.neckLeft)),a.neckLineFront=(new o).move(i.neckRight).curve(i.neckCp1,i.neckCp2,i.neckFront).curve(i.neckCp4,i.neckCp3,i.neckLeft).addClass("fabric"),i.neckBack=i.middle.shiftTowards(i.neckFront,p.hpsToBust*t.neckDepthBack).addText("Back Neckline","center"),i.neckBackCp1=i.neckBack.shift(0,.8*i.neckFront.dy(i.neckLeft)),i.neckBackCp2=i.neckBack.shift(180,.8*i.neckFront.dy(i.neckRight)),i.neckBackCp3=i.neckLeft.shift(90,.8*i.neckBack.dy(i.neckLeft)),i.neckBackCp4=i.neckRight.shift(90,.8*i.neckBack.dy(i.neckRight)),a.necklineBack=(new o).move(i.neckRight).curve(i.neckBackCp4,i.neckBackCp2,i.neckBack).curve(i.neckBackCp1,i.neckBackCp3,i.neckLeft).addClass("fabric"),i.topTopLeft=i.topLeft.shift(90,20),i.topTopRight=i.topRight.shift(90,20),a.extraBoundary=(new o).move(i.topLeft).move(i.topRight).move(i.topTopRight).move(i.topTopLeft).move(i.topLeft).addClass("fabric hidden").close(),i.logo=i.middle.shiftTowards(i.middleHem,u/4),n.logo=new s("logo",i.logo),d.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),i.title=i.logo.shiftTowards(i.middle,u/12),c("title",{at:i.title,nr:1,title:"body"}),r&&(a.sa=a.body.offset(r).setClass("fabric sa")),c("cutonfold",{from:i.topLeft,to:i.topRight,grainline:!1}),i.grainlineFrom=i.leftShoulder,i.grainlineTo=new e(i.grainlineFrom.x,i.bottomLeft.y),c("grainline",{from:i.grainlineFrom,to:i.grainlineTo}),l&&(c("hd",{id:"bodyWidth",from:i.topLeft,to:i.topRight,y:i.topLeft.y+r+10}),c("vd",{id:"bodyLength",from:i.topLeft,to:i.bottomLeft,x:i.topLeft.y+r+30}),c("vd",{id:"goreLength",from:i.topLeft,to:i.gorestartLeft,x:i.topLeft.y+r+40}),c("hd",{id:"goreWidth",from:i.rightShoulder,to:i.topRight,y:i.rightShoulder.y+r+20}),c("vd",{id:"backNeckDepth",from:i.middle,to:i.neckBack,x:i.middle.x+r+15}),c("vd",{id:"frontNeckDepth",from:i.middle,to:i.neckFront,x:i.middle.x+r+35}),c("hd",{id:"neckWidth",from:i.neckLeft,to:i.middle,y:i.leftShoulder.y+r+30})),h}},Er,{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:i,paths:a,sa:s,paperless:n,macro:r,measurements:l,part:c,store:p}){const h=l.biceps*t.gussetSize;return i.gussetLeft=new e(0,0),i.gussetRight=new e(h,0),i.gussetBottomLeft=new e(0,h),i.gussetBottomRight=new e(h,h),a.gusset=(new o).move(i.gussetRight).line(i.gussetLeft).line(i.gussetBottomLeft).line(i.gussetBottomRight).line(i.gussetRight).addClass("fabric").close(),p.cutlist.setCut({cut:2,from:"fabric",identical:"true"}),i.title=i.gussetLeft.shift(300,h/2),r("title",{at:i.title,nr:3,title:"sleeveGusset"}),s&&(a.sa=a.gusset.offset(s).setClass("fabric sa")),n&&(r("hd",{id:"gussetWidth",from:i.gussetLeft,to:i.gussetRight,x:i.gussetLeft.x+s+30}),r("vd",{id:"gussetLength",from:i.gussetLeft,to:i.gussetBottomLeft,x:i.gussetLeft.x+s+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:N,measurements:["chest","highBust","hips","waistToHips","hpsToWaistBack","hpsToWaistFront","bustSpan","hpsToBust","waist"],hide:s.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:i,paths:a,Snippet:s,snippets:n,sa:r,macro:l,part:c,measurements:p,store:h,log:d,utils:f}){if(h.set("Test","test"),l("rmCutOnFold","cutonfold"),i.hem.x=p.hips*(1+t.hipsEase)/4,t.ribbing){const e=t.ribbingHeight*(p.hpsToWaistBack+p.waistToHips);for(let t of["hem","cfHem"])i[t]=i[t].shift(90,e);h.set("ribbingHeight",e)}else h.set("ribbingHeight",0);i.cfNeck=i.cfNeck.shift(-90,p.neck*t.neckShiftForward),i.cfNeckCp1=i.cfNeckCp1.shift(-90,p.neck*t.neckShiftForward),i.frontNeckCpEdge=i.frontNeckCpEdge.shift(-90,p.neck*t.neckShiftForward),i.neckCp2Front=i.neckCp2Front.shift(-90,p.neck*t.neckShiftForward),t.s3Collar<.1&&t.s3Collar>-.1?(i.s3CollarSplit=i.hps,a.frontCollar=(new o).move(i.hps).curve(i.neckCp2Front,i.cfNeckCp1,i.cfNeck).hide()):t.s3Collar>0?(i.s3CollarSplit=f.curveIntersectsY(i.hps,i.neckCp2Front,i.cfNeckCp1,i.cfNeck,h.get("s3CollarMaxFront")*t.s3Collar),a.frontCollar=(new o).move(i.hps).curve(i.neckCp2Front,i.cfNeckCp1,i.cfNeck).split(i.s3CollarSplit)[1].hide()):t.s3Collar<0&&(i.s3CollarSplit=f.curveIntersectsY(i.mirroredCbNeck,i.mirroredCbNeck,i.mirroredNeckCp2,i.hps,h.get("s3CollarMaxBack")*t.s3Collar),a.frontCollar=(new o).move(i.hps).curve_(i.mirroredNeckCp2,i.mirroredCbNeck).split(i.s3CollarSplit)[0].reverse().join((new o).move(i.hps).curve(i.neckCp2Front,i.cfNeckCp1,i.cfNeck)).hide());let m=p.chest*(1+t.chestEase)*t.placketwidth;h.set("placketWidth",m),i.innerPlacketTop=i.cfNeck.shift(0,m/2),i.innerPlacketBottom=i.cfHem.shift(0,m/2),i.centerPlacketTop=i.cfNeck.shift(180,m/2),i.centerPlacketBottom=i.cfHem.shift(180,m/2),i.outerPlacketTop=i.cfNeck.shift(180,1.5*m),i.outerPlacketBottom=i.cfHem.shift(180,1.5*m),a.sideSeam=(new o).move(i.armhole).line(i.hem).hide();let u=a.sideSeam.length(),g=0;if(i.waist.y<i.hem.y?(i.waist=i.waist.shift(0,.2*p.hips),a.waist=(new o).move(i.cfWaist).line(i.waist),i.waist=a.waist.intersects(a.sideSeam)[0],a.waist=(new o).move(i.cfWaist).line(i.waist).setClass("lining").hide()):(i.waist=i.hem,a.waist=(new o).move(i.cfHem).line(i.hem).setClass("lining").hide()),g=i.waist.x,d.info("pre-adjustment waist X: "+g),d.info("pre-adjustment side seam: "+u),t.bustDart&&t.draftForHighBust){i.bustpoint=new e(p.bustSpan/2,p.hpsToBust);let r=i.hem.angle(i.armhole);n.bustpoint=new s("notch",i.bustpoint),a.sideSeam=(new o).move(i.armhole).line(i.hem),i.FBA_cut_A_end=i.bustpoint.shift(r-90*t.sideCutAngle,p.bust/4),a.FBA_
1cut_A=(new o).move(i.bustpoint).line(i.FBA_cut_A_end).setClass("sa lining").hide(),0==a.sideSeam.intersects(a.FBA_cut_A).length?i.sideSeamIntercept=a.sideSeam.shiftFractionAlong(t.bustDartHeight):i.sideSeamIntercept=a.sideSeam.intersects(a.FBA_cut_A)[0],i.FBA_cut_B_end=i.bustpoint.shift(-90,1.1*(p.hpsToWaistFront+p.waistToHips-p.hpsToBust)*(1+t.lengthBonus)),a.FBA_cut_B=(new o).move(i.bustpoint).line(i.FBA_cut_B_end).setClass("sa lining").hide(),i.bottomHemIntercept=a.FBA_cut_B.intersectsY(i.hem.y)[0];const l=i.bustpoint.angle(i.armholeHollow.shiftFractionTowards(i.frontArmholePitch,.5))*t.armCutAngle;i.FBA_cut_C_end=i.bustpoint.shift(l,p.hpsToBust),a.FBA_cut_C=(new o).move(i.bustpoint).line(i.FBA_cut_C_end).setClass("sa lining").hide(),i.armholeIntercept=a.FBA_cut_C.intersects(a.seam)[0],i.bustPointRotated=new e(i.bustpoint.x,i.bustpoint.y);let c=["bottomHemIntercept","hem","sideSeamIntercept","FBA_cut_A_end","armhole","armholeCp2","_tmp1","_tmp2","_tmp3","armholeHollowCp1","armholeHollow","bustPointRotated"],h=p.bust*(1+t.fullBustEase)-p.highBust*(1+t.chestEase),f=0;for(;i.bustpoint.dx(i.bustPointRotated)<h;){for(let t of c)i[t]=i[t].rotate(1,i.armholeIntercept);f+=1}d.info("Angle moved: "+f),a.armCutRotated=(new o).move(i.armholeIntercept).line(i.bustPointRotated).setClass("sa lining").hide(),i.hem=i.hem.rotate(-f,i.bustPointRotated),i.sideSeamInterceptOld=i.sideSeamIntercept,i.sideSeamIntercept=i.sideSeamIntercept.rotate(-f,i.bustPointRotated);let m=["outerPlacketBottom","centerPlacketBottom","cfHem","innerPlacketBottom"];for(let t of m)i[t]=new e(i[t].x,i.hem.y);if(i.dartTopEdge=i.sideSeamInterceptOld,i.dartBottomEdge=i.sideSeamIntercept,i.dartPoint=i.bustpoint.shiftFractionTowards(i.sideSeamIntercept.shiftFractionTowards(i.sideSeamInterceptOld,.5),t.bustDartOffset),t.dartLegsTruing){const t=i.armhole.dist(i.dartTopEdge)/i.hem.dist(i.dartBottomEdge);d.info("side seam ratio is "+t);let e=i.dartPoint.dist(i.dartBottomEdge),o=i.dartPoint.dist(i.dartTopEdge),a=0;for(d.info("Dart bottom length "+e+", dart top length "+o);e>o&&a<30;)d.info("Bust dart bottom leg is longer by "+(e-o)),i.dartTopEdge=i.dartTopEdge.rotate(1-t,i.armhole),i.dartBottomEdge=i.dartBottomEdge.rotate(t,i.hem),o=i.dartPoint.dist(i.dartTopEdge),e=i.dartPoint.dist(i.dartBottomEdge),a+=1;d.info("Dart bottom length "+e+", dart top length "+o)}a.bustDart=(new o).move(i.dartTopEdge).line(i.dartPoint).line(i.dartBottomEdge),a.sideSeam=(new o).move(i.hem).line(i.dartBottomEdge).line(i.dartTopEdge).line(i.armhole).hide()}else d.info("No bust adjustment"),a.sideSeam=(new o).move(i.hem).line(i.armhole).hide();if(t.useBellyAdjustment){d.info("Full belly adjustment is enabled");let e=(p.waist*(1+t.waistEase)-2*g)/2,r=i.waist.y;i.sideSeamIntercept?i.rotatePoint=i.sideSeamIntercept:i.rotatePoint=i.armhole;let l=i.rotatePoint.angle(i.hem);i.sideSeamExtension=i.hem.shift(l,.1*i.hem.y),n.extension_button=new s("button",i.sideSeamExtension),a.sideTarget=(new o).move(i.rotatePoint).line(i.sideSeamExtension).hide(),i.waistIntersect=a.sideTarget.intersectsY(r)[0],d.info("Waist front target is "+e+", waist front current is "+i.waistIntersect.x+". starting rotation");let c=0;for(i.bellyEdge=i.cfHem.shiftFractionTowards(i.hem,t.bellyAdjustmentX);e>i.waistIntersect.x&&c<30;)d.info("Rotation loop "+c),i.hem=i.hem.rotate(1,i.rotatePoint),i.sideSeamExtension=i.sideSeamExtension.rotate(1,i.rotatePoint),i.bellyEdge=i.bellyEdge.rotate(1,i.rotatePoint),c++,a.sideTarget=(new o).move(i.rotatePoint).line(i.sideSeamExtension).hide(),i.waistIntersect=a.sideTarget.intersectsY(r)[0];d.info("Waist front target is "+e+", waist front current is "+i.waistIntersect.x+", angle "+c),i.outerPlacketBottom.y=i.bellyEdge.y,i.cfHem.y=i.bellyEdge.y,t.bustDart?a.sideSeam=(new o).move(i.hem).line(i.dartBottomEdge).line(i.dartTopEdge).line(i.armhole).hide():a.sideSeam=(new o).move(i.hem).line(i.armhole).hide()}a.innerPlacketLine=(new o).move(i.innerPlacketTop).line(i.innerPlacketBottom).setClass("sa"),a.centerPlacketLine=(new o).move(i.centerPlacketTop).line(i.centerPlacketBottom).setClass("sa").setClass("lining"),a.edgePlacketLine=(new o).move(i.outerPlacketTop).line(i.outerPlacketBottom).setClass("sa"),a.centerLine=(new o).move(i.cfNeck).line(i.cfHem).setClass("sa").hide();let b=t.closureCount;b--;let k=[];i.topButton=i.cfNeck.shiftTowards(i.cfHem,m/2),n.top_button=new s("button",i.topButton);for(let C=1;C<b;C++)k.push(i.topButton.shiftFractionTowards(i.cfHem,C/b));for(let C in k)n[C+"_button"]=new s("button",k[C]);if(a.saBase=(new o).move(i.outerPlacketBottom),t.useBellyAdjustment&&(a.saBase=a.saBase.line(i.bellyEdge)),a.saBase=a.saBase.line(i.hem).join(a.sideSeam).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow),t.bustDart&&t.draftForHighBust?a.saBase=a.saBase.line(i.armholeIntercept):a.saBase=a.saBase.curve(i.armholeHollowCp2,i.armholePitchCp1,i.armholePitch),a.saBase=a.saBase.join(a.frontArmhole).line(i.s3CollarSplit).join(a.frontCollar).line(i.outerPlacketTop).line(i.outerPlacketBottom).close(),r&&(a.sa=a.saBase.offset(r).setClass("fabric sa"),a.sa.line(a.sa.start())),a.seam=a.saBase,t.frontWeltPockets){i.pocketBottom=i.cfHem.shiftFractionTowards(i.hem,t.pocketBottomX),i.pocketBottom.y=i.pocketBottom.shiftFractionTowards(i.hps,t.pocketBottomY).y,i.pocketTop=i.cfHem.shiftFractionTowards(i.hem,t.pocketTopX),i.pocketTop.y=i.pocketTop.shiftFractionTowards(i.hps,t.pocketTopY).y;let e=-(i.pocketBottom.y-i.pocketTop.y)/(i.pocketBottom.x-i.pocketTop.x),s=180*Math.atan(e)/3.14159;a.pocketLine=(new o).move(i.pocketTop).line(i.pocketBottom).hide();let n=t.pocketWeltWidth*p.hips/10;h.set("pocketLength",a.pocketLine.length()),d.info("Pocket length is "+a.pocketLine.length()),h.set("pocketWidth",2*n),i.pocketTopInner=i.pocketTop.shift(s-90,n),i.pocketTopOuter=i.pocketTop.shift(s+90,n),i.pocketBottomInner=i.pocketBottom.shift(s-90,n),i.pocketBottomOuter=i.pocketBottom.shift(s+90,n),a.pocketOutline=(new o).move(i.pocketTopInner).line(i.pocketTopOuter).line(i.pocketBottomOuter).line(i.pocketBottomInner).close().setClass("sa"),d.info("Pocket angle is "+s)}h.set("frontWaistLength",i.cfHem.dist(i.hem)),l("rmtitle"),h.cutlist.addCut({cut:!1}),h.cutlist.addCut({cut:2,from:"fabric",identical:!1}),h.cutlist.addCut({cut:2,from:"lining",identical:!1}),i.title=i.outerPlacketTop.shiftFractionTowards(i.hem,.5),i.title.y=i.title.shiftFractionTowards(i.hem,.5).y,l("title",{at:i.title,nr:1,title:"front"}),l("rmVd","hTotal"),l("rmVd","hHemToArmholePitch"),l("rmVd","hHemToShoulder"),l("rmVd","hHemToArmhole"),l("rmVd","hHemToWaist"),l("rmVd","hHemToNeckOpeningBottom");const w=i.armhole.x>i.hem.x?i.armhole.x:i.hem.x;return l("hd",{id:"wHem",from:i.cfHem,to:i.hem,y:i.cfHem.y+r+15}),l("hd",{id:"wChest",from:i.cfHem,to:i.armhole,y:i.armhole.y}),l("hd",{id:"wArmhole",from:i.cfHem,to:i.frontArmholePitch,y:i.frontArmholePitch.y}),l("hd",{id:"wPlacket",from:i.outerPlacketTop,to:i.cfNeck,y:i.cfNeck.y-r-15}),l("hd",{id:"wGreen",from:i.outerPlacketTop,to:i.centerPlacketTop,y:i.cfNeck.y+15}),l("hd",{id:"wGreenOffset",from:i.centerPlacketTop,to:i.innerPlacketTop,y:i.cfNeck.y+15}),l("hd",{id:"wGreenBottom",from:i.outerPlacketTop,to:i.centerPlacketTop,y:i.cfHem.y-15}),l("vd",{id:"hNeck",from:i.cfNeck,to:i.s3CollarSplit,x:i.cfNeck.x}),l("vd",{id:"hTotal",from:i.cfHem,to:i.s3CollarSplit,x:w+r+30}),l("vd",{id:"hHemToWaist",from:i.hem,to:i.armhole,x:w+r+15}),t.bustDart&&0!=t.draftForHighBust?(l("ld",{id:"sideSeamTop",from:i.armhole,to:i.dartTopEdge,d:-10}),l("ld",{id:"sideSeamBottom",from:i.dartBottomEdge,to:i.hem,d:-10}),l("vd",{id:"bustDartHeight",from:i.hem,to:i.sideSeamIntercept,x:i.sideSeamIntercept.x-30}),l("vd",{id:"dartPointHeight",from:i.dartPoint,to:i.armhole,x:i.dartPoint.x}),l("hd",{id:"bustDartWidth",from:i.cfHem,to:i.sideSeamIntercept,y:i.sideSeamIntercept.y}),l("hd",{id:"bustPointWidth",from:i.cfHem,to:i.dartPoint,y:i.dartPoint.y}),l("ld",{id:"bustDartEdges",from:i.dartTopEdge,to:i.dartBottomEdge})):l("ld",{id:"sideSeam",from:i.armhole,to:i.hem,d:-10}),l("vd",{id:"hChestToArmHollow",from:i.armhole,to:i.backArmholePitch,x:i.armhole.x+r+15}),l("vd",{id:"hArmHollowToShoulder",from:i.backArmholePitch,to:i.s3ArmholeSplit,x:i.armhole.x+r+15}),l("vd",{id:"hShoulderSlope",from:i.s3ArmholeSplit,to:i.s3CollarSplit,x:i.s3ArmholeSplit.x+r+15}),l("pd",{id:"lArmhole",path:(new o).move(i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.armholePitchCp1,i.armholePitch).reverse(),d:r+15}),t.frontWeltPockets&&(l("ld",{id:"pocketLength",from:i.pocketTopOuter,to:i.pocketBottomOuter}),l("ld",{id:"pocketWidth",to:i.pocketTopOuter.shiftFractionTowards(i.pocketBottomOuter,.5),from:i.pocketTopInner.shiftFractionTowards(i.pocketBottomInner,.5)}),l("vd",{id:"pocketBottomHeight",to:i.cfHem,from:i.pocketBottom,x:i.pocketBottom.x}),l("hd",{id:"pocketBottomX",from:i.cfHem,to:i.pocketBottom,y:i.pocketBottom.y}),l("vd",{id:"pocketTopHeight",to:i.cfHem,from:i.pocketTop,x:i.pocketTop.x-15}),l("hd",{id:"pocketTopX",from:i.cfHem,to:i.pocketTop,y:i.pocketTop.y})),c}};const Gr={name:"jett.back",from:I,after:jr,hide:s.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:i,paths:a,Snippet:s,snippets:n,sa:r,macro:l,part:c,measurements:p,store:h,log:d}){if(t.ribbing){let t=h.get("ribbingHeight");for(let e of["cbHips","hem","cbHem"])i[e]=i[e].shift(90,t)}return i.hem.x=p.hips*(1+t.hipsEase)/4,t.yoke?(i.armholesplit=a.backArmhole.shiftFractionAlong(t.yokesplit),i.centertop=new e(0,i.armholesplit.y),delete a.saBase,a.saBase=(new o).move(i.cbHem).line(i.hem).line(i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.armholePitchCp1,i.armholePitch).line(i.armholesplit).line(i.centertop).hide(),a.seam=(new o).move(i.centertop).line(i.cbHips).join(a.saBase).setClass("fabric").unhide(),r&&(a.sa=a.saBase.offset(r).setClass("fabric sa").move(i.cbHips),a.sa.line(a.sa.start())),l("cutonfold",{from:i.centertop,to:i.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 a.waist,l("hd",{id:"wHem",from:i.cbHem,to:i.hem,y:i.hem.y+r+15}),l("hd",{id:"wTop",from:i.centertop,to:i.armholesplit,y:i.centertop.y-r-15}),l("hd",{id:"wChest",from:i.centertop,to:i.armhole,y:i.armhole.y}),l("hd",{id:"armholeHoriz",from:i.armholesplit,to:i.armhole,y:i.centertop.y}),l("vd",{id:"hHemToWaist",from:i.cbHem,to:i.cbWaist,x:i.cbHips.x-15}),l("vd",{id:"hWaistToChest",from:i.cbWaist,to:i.cbArmhole,x:i.cbHips.x-15}),l("vd",{id:"hChestToTop",from:i.cbArmhole,to:i.centertop,x:i.cbHips.x-15}),l("vd",{id:"hTotal",from:i.cbHem,to:i.centertop,x:i.cbHips.x-30}),i.title=i.centertop.shiftFractionTowards(i.hem,.5)):(l("vd",{id:"hTotal",from:i.s3CollarSplit,to:i.hem,x:i.cbHem.x-30}),l("vd",{id:"hHemToNeckOpeningBottom",from:i.cbNeck,to:i.hem,x:i.cbHem.x-15}),l("vd",{id:"hHemToWaist",from:i.cbHem,to:i.cbWaist,x:i.cbHem.x+30}),l("vd",{id:"hHemToArmhole",from:i.hem,to:i.armhole,x:i.armhole.x+15}),l("vd",{id:"hHemToArmholePitch",from:i.hem,to:i.armholePitch,x:i.armhole.x+30}),l("vd",{id:"hHemToShoulder",from:i.hem,to:i.s3ArmholeSplit,x:i.armhole.x+45}),l("hd",{id:"wHem",from:i.cbHem,to:i.hem,y:i.hem.y+r+15}),l("hd",{id:"wArmhole",from:i.cbHem,to:i.armhole,y:i.armhole.y}),l("hd",{id:"wArmholeHollow",from:i.cbHem,to:i.backArmholePitch,y:i.backArmholePitch.y}),l("cutonfold",{from:i.cbNeck,to:i.cbHem,grainline:!0}),delete a.waist,i.title=i.cbNeck.shiftFractionTowards(i.hem,.5),a.saBase=(new o).move(i.cbHem).line(i.hem).line(i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.armholePitchCp1,i.armholePitch).join(a.backArmhole).line(i.s3CollarSplit).join(a.backCollar).hide(),a.seam=(new o).move(i.cbNeck).line(i.cbHips).join(a.saBase).setClass("fabric")),l("rmtitle"),h.cutlist.addCut({cut:!1}),h.cutlist.addCut({cut:!1,from:"lining"}),h.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),h.cutlist.addCut({cut:1,from:"lining",onFold:!0}),l("ld",{id:"sideSeamLength",from:i.armhole,to:i.hem,d:-15-r}),l("title",{at:i.title,nr:2,title:"back"}),c}};const Yr={name:"jett.yoke",from:I,after:Gr,hide:s.V9.HIDE_TREE,options:{},draft:function({options:t,Point:e,Path:o,points:i,paths:a,Snippet:s,snippets:n,sa:r,macro:l,part:c,store:p}){if(!t.yoke)return c.hide();i.armholesplit=a.backArmhole.shiftFractionAlong(t.yokesplit),i.centerbottom=new e(0,i.armholesplit.y),delete a.saBase,delete a.waist,delete a.chest,delete n.logo,l("rmbanner","chestLine"),l("rmbanner","waistLine");let h=i.frontArmholePitchCp1.y;for(const d in i)i[d].y>h&&delete i[d];return a.saBase=(new o).move(i.centerbottom).line(i.armholesplit).join(a.backArmhole).line(i.s3CollarSplit).join(a.backCollar).trim().hide(),a.seam=(new o).move(i.cbNeck).line(i.centerbottom).join(a.saBase).setClass("fabric"),r&&(a.sa=(new o).move(i.centerbottom).line(i.armholesplit).join(a.saBase).offset(r).setClass("fabric sa"),a.sa.line(a.sa.start())),p.cutlist.addCut({cut:!1}),l("cutonfold",{from:i.cbNeck,to:i.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 n.armholePitchNotch,l("hd",{id:"wHem",from:i.centerbottom,to:i.armholesplit,y:i.centerbottom.y+r+15}),l("hd",{id:"wTop",from:i.centerbottom,to:i.s3ArmholeSplit,y:i.s3CollarSplit.y-r-30}),l("hd",{id:"wCollar",from:i.centerbottom,to:i.s3CollarSplit,y:i.s3CollarSplit.y-r-15}),l("hd",{id:"wShoulder",from:i.s3CollarSplit,to:i.s3ArmholeSplit,y:i.s3CollarSplit.y-r-15}),l("vd",{id:"hInner",from:i.centerbottom,to:i.cbShoulder,x:i.centerbottom.x-r-15}),l("vd",{id:"hCollar",from:i.cbShoulder,to:i.cbHps,x:i.centerbottom.x-r-15}),l("vd",{id:"hTotal",from:i.centerbottom,to:i.cbHps,x:i.centerbottom.x-r-30}),i.title=i.cbShoulder.shiftFractionTowards(i.armholesplit,.5),i.title=i.title.shift(180,i.s3ArmholeSplit.x/4),l("title",{at:i.title,nr:4,title:"yoke",scale:.7}),c}};const Ur={name:"jett.sleeve",from:T,after:jr,hide:s.V9.HIDE_TREE,options:{cuffEase:{pct:60,min:-8,max:100,menu:"fit"},libraryFitSleeve:!0},draft:function({options:t,Point:e,Path:o,points:i,paths:a,Snippet:s,snippets:n,sa:r,macro:l,part:c,measurements:p,store:h}
1){if(t.ribbing){let t=h.get("ribbingHeight");for(let e of["wristLeft","centerWrist","wristRight"])i[e]=i[e].shift(90,t);a.seam=(new o).move(i.bicepsLeft).move(i.wristLeft).move(i.wristRight).line(i.bicepsRight).join(a.sleevecap).close().setClass("fabric"),r&&(a.sa=a.seam.offset(r).setClass("fabric sa"))}return l("rmHd","wCuff"),l("rmVd","hCuffToArmhole"),l("rmVd","hFull"),l("rmGrainline","grainline"),l("vd",{id:"hTotal",from:i.sleeveTop,to:i.centerWrist,x:i.bicepsLeft.x-r-30}),l("vd",{id:"hSleeve",from:i.bicepsLeft,to:i.centerWrist,x:i.bicepsLeft.x-r-15}),l("vd",{id:"hSleeveCap",from:i.sleeveTop,to:i.bicepsLeft,x:i.bicepsLeft.x-r-15}),l("hd",{id:"wWrist",from:i.wristLeft,to:i.wristRight,y:i.centerWrist.y+r+15}),l("grainline",{from:i.sleeveTop,to:i.centerWrist}),l("rmtitle"),h.cutlist.addCut({cut:!1}),h.cutlist.addCut({cut:!1,from:"lining"}),h.cutlist.addCut({cut:2,from:"fabric",identical:!1}),h.cutlist.addCut({cut:2,from:"lining",identical:!1}),l("title",{at:i.title,nr:3,title:"sleeve"}),c}};function zr(t,e){const{store:o,measurements:i,options:a,points:n,paths:r,Path:l,Point:c,expand:p,sa:h,macro:d,units:f}=t.shorthand();(void 0===o.get("ribbingHeight")||t.context.settings.sample)&&o.set("ribbingHeight",(i.hpsToWaistBack+i.waistToHips)*a.ribbingHeight);const m=o.get("ribbingHeight");if(!p){const i=h?2*h:0;return o.flag.note({msg:`huey:cut${(0,s.ZH)(t.name.split(".")[1])}`,notes:[h?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:f(2*m+i),l:f(e+i)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),o.flag.preset("expandIsOff"),t.hide()}o.flag.preset("expandIsOn"),n.topLeft=new c(0,0),n.topRight=new c(2*m,0),n.bottomLeft=new c(0,e),n.bottomRight=new c(n.topRight.x,e),r.seam=(new l).move(n.bottomRight).line(n.topRight).line(n.topLeft).line(n.bottomLeft).line(n.bottomRight).close().addClass("various"),h&&(r.sa=r.seam.offset(h).addClass("various sa")),n.title=new c(n.bottomRight.x/3,n.bottomRight.y/3),d("vd",{id:"hFull",from:n.bottomRight,to:n.topRight,x:n.topRight.x+h+15}),d("hd",{id:"wFull",from:n.topLeft,to:n.topRight,y:n.topRight.y-h-15})}const Jr={name:"jett.cuff",options:{ribbingStretch:{pct:15,min:0,max:30,menu:"construction"}},draft:function({points:t,measurements:e,options:o,macro:i,store:a,part:s}){return o.ribbing?(zr(s,e.wrist*(1+o.cuffEase)*(1-o.ribbingStretch)),a.cutlist.setCut({cut:2,from:"ribbing",identical:!0}),i("rmTitle","title_notes"),i("title",{at:t.title,nr:6,title:"cuff"}),s):s.hide()}};const $r={name:"jett.waistband",after:jr,cuff:Jr,options:{ribbingEndsPercentage:{pct:5,min:0,max:20,menu:"construction"}},draft:function({points:t,measurements:e,options:o,macro:i,store:a,part:s}){return o.ribbing?(zr(s,((1+o.hipsEase)*e.hips/2+2*a.get("frontWaistLength"))*(1-o.ribbingStretch)*(1-o.ribbingEndsPercentage)),a.cutlist.setCut({cut:1,from:"ribbing"}),i("title",{at:t.title,nr:7,title:"waistband"}),s):s.hide()}};const Xr={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:i,paths:a,Snippet:s,snippets:n,sa:r,macro:l,part:c,measurements:p,store:h}
1){if(!t.ribbing)return c.hide();let d=2*h.get("ribbingHeight"),f=p.hips*(1+t.hipsEase)*t.ribbingEndsPercentage;i.topLeft=new e(0,0),i.topRight=new e(f,0),i.bottomRight=new e(f,d),i.bottomLeft=new e(0,d),i.centerLeft=new e(0,d/2),i.centerRight=new e(f,d/2),a.seam=(new o).move(i.topLeft).line(i.topRight).line(i.bottomRight).line(i.bottomLeft).line(i.topLeft).reverse(),r&&(a.sa=a.seam.offset(r).setClass("fabric sa"),a.sa.line(a.sa.start())),a.foldMark=(new o).move(i.centerLeft).line(i.centerRight).setClass("fabric sa"),h.cutlist.setCut({cut:2,from:"fabric"}),i.title=i.topLeft.shiftFractionTowards(i.bottomRight,.5),i.title=i.title.shift(180,f/4),l("title",{at:i.title,nr:8,title:"waistband_ends",scale:.6}),l("hd",{id:"wTotal",from:i.topLeft,to:i.topRight,y:i.bottomLeft.y+r+15}),l("vd",{id:"hTotal",from:i.topLeft,to:i.bottomLeft,x:i.bottomLeft.x-r-15});let m=h.get("placketWidth");return i.buttonPoint=new e(m/2,3*d/4),n.bottom_button=new s("button",i.buttonPoint),c}};const Qr={name:"jett.pocket_welt",after:jr,options:{},draft:function({options:t,Point:e,Path:o,points:i,paths:a,Snippet:s,snippets:n,sa:r,macro:l,part:c,measurements:p,store:h,log:d}){if(!t.frontWeltPockets)return c.hide(),c;d.info("Pocket length is "+h.get("pocketLength"));const f=h.get("pocketLength"),m=2*h.get("pocketWidth");return i.topLeft=new e(0,0),i.topRight=new e(f,0),i.bottomRight=new e(f,m),i.bottomLeft=new e(0,m),a.seam=(new o).move(i.topLeft).line(i.topRight).line(i.bottomRight).line(i.bottomLeft).line(i.topLeft).reverse(),r&&(a.sa=a.seam.offset(r).setClass("fabric sa"),a.sa.line(a.sa.start())),h.cutlist.setCut({cut:2,from:"fabric"}),i.title=i.topLeft.shiftFractionTowards(i.bottomRight,.5),l("title",{at:i.title,nr:10,title:"pocket_welt",scale:.3}),l("hd",{id:"wTotal",from:i.topLeft,to:i.topRight,y:i.bottomLeft.y+r+15}),l("vd",{id:"hTotal",from:i.topLeft,to:i.bottomLeft,x:i.bottomLeft.x-r-15}),c}};const Kr={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:i,paths:a,Snippet:s,snippets:n,sa:r,macro:l,part:c,log:p,measurements:h,store:d}){let f=h.neck*(1+t.collarEase),m=f*t.ribbedCollarWidth;return i.centerTop=new e(0,0),i.centerBottom=new e(0,m),i.outerCenter=new e(f/2,m/2),i.outerControlTop=new e(f/2,m/4),i.outerControlBottom=new e(f/2,3*m/4),i.halfTop=new e(t.ribbedCollarCurve*f*.5,0),i.halfControlTop=new e(t.ribbedCollarCurve*f,0),i.halfBottom=new e(t.ribbedCollarCurve*f*.5,m),i.halfControlBottom=new e(t.ribbedCollarCurve*f,m),a.saBase=(new o).move(i.centerTop).line(i.halfTop).curve(i.halfControlTop,i.outerControlTop,i.outerCenter).curve(i.outerControlBottom,i.halfControlBottom,i.halfBottom).line(i.centerBottom).reverse().hide(),a.seam=a.saBase.unhide().close(),r&&(a.sa=a.saBase.offset(r).setClass("fabric sa"),a.sa.line(a.sa.start())),l("hd",{id:"wTotal",from:i.centerTop,to:i.outerCenter,y:i.centerTop.y-r-30}),l("hd",{id:"wCurve",from:i.centerTop,to:i.halfTop,y:i.centerTop.y-r-15}),l("vd",{id:"hTotal",from:i.centerTop,to:i.centerBottom,x:i.centerTop.x-r-15}),l("cutonfold",{from:i.centerTop,to:i.centerBottom,grainline:!0}),d.cutlist.setCut({cut:1,from:"ribbing",onFold:"true"}),i.title=i.centerTop.shiftFractionTowards(i.halfBottom,.5),l("title",{at:i.title,nr:5,title:"collar_ribbing",scale:.6}),c}};const Vr={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:i,paths:a,Snippet:s,snippets:n,sa:r,macro:l,part:c,measurements:p,store:h,log:d}){if(!t.frontWeltPockets)return c.hide(),c;let f=p.hips*(1+t.hipsEase)/4,m=p.hpsToWaistBack+p.waistToHips-h.get("ribbingHeight"),u=p.chest*(1+t.chestEase)*t.placketwidth/2;i.pocketBottom=new e(f*t.pocketBottomX,-1*m*t.pocketBottomY),i.pocketTop=new e(f*t.pocketTopX,-1*m*t.pocketTopY);let g=-(i.pocketBottom.y-i.pocketTop.y)/(i.pocketBottom.x-i.pocketTop.x),b=180*Math.atan(g)/3.14159,k=t.pocketWeltWidth*p.hips/10;i.pocketTopInner=i.pocketTop.shift(b-90,k),i.pocketTopOuter=i.pocketTop.shift(b+90,k),i.pocketBottomInner=i.pocketBottom.shift(b-90,k),i.pocketBottomOuter=i.pocketBottom.shift(b+90,k);let w=k+p.hips*t.pocketCornerOffset;return i.bagTopLeft=new e(-u,i.pocketTop.y-w),i.bagBottomLeft=new e(-u,0),i.bagBottomRight=new e(i.pocketBottom.x+w,0),i.bagTopCorner=new e(i.pocketTop.x+w,i.pocketTop.y-w),i.bagBottomCorner=new e(i.pocketBottom.x+w,i.pocketBottom.y-w),a.saBase=(new o).move(i.bagTopLeft).line(i.bagTopCorner).line(i.bagBottomCorner).line(i.bagBottomRight).line(i.bagBottomLeft).reverse().close(),r&&(a.sa=a.saBase.offset(r).setClass("fabric sa"),a.sa.line(a.sa.start())),a.pocketOutline=(new o).move(i.pocketTopInner).line(i.pocketTopOuter).line(i.pocketBottomOuter).line(i.pocketBottomInner).close().setClass("sa"),i.placketMarkTop=i.bagTopLeft.shift(0,2*u),i.placketMarkBottom=i.bagBottomLeft.shift(0,2*u),a.placketMark=(new o).move(i.placketMarkTop).line(i.placketMarkBottom).setClass("sa"),h.cutlist.addCut({cut:2,from:"fabric",identical:!1}),h.cutlist.addCut({cut:2,from:"lining",identical:!1}),i.title=i.bagBottomLeft.shiftFractionTowards(i.bagTopCorner,.4),l("title",{at:i.title,nr:9,title:"pocket_bag_front"}),l("vd",{id:"hTotal",from:i.bagTopLeft,to:i.bagBottomLeft,x:i.bagTopLeft.x-15}),l("hd",{id:"wBottom",from:i.bagBottomLeft,to:i.bagBottomRight,y:i.bagBottomLeft.y+r+15}),l("hd",{id:"wTop",from:i.bagTopLeft,to:i.bagTopCorner,y:i.bagTopLeft.y-r-15}),l("vd",{id:"hLower",from:i.bagBottomCorner,to:i.bagBottomRight,x:i.bagBottomRight.x+r+15}),l("hd",{id:"placketMark",from:i.bagTopLeft,to:i.placketMarkTop,y:i.bagTopLeft.y+15}),l("ld",{id:"pocketDiagonal",to:i.bagTopCorner,from:i.pocketTopOuter}),l("ld",{id:"pocketLength",to:i.pocketBottomOuter,from:i.pocketTopOuter}),l("ld",{id:"pocketWidth",from:i.pocketTopInner,to:i.pocketTopOuter}),c}}
1,qr=(0,s.D4)([_,_r]),Zr=new s.pT({data:Mr,parts:[jr,Gr,Yr,Ur,$r,Xr,Qr,Kr,Vr,Jr]}),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","design":"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,s.Wx)("waist"),menu:"fit"},seatEase:{pct:-4,min:-20,max:0,...(0,s.Wx)("seat"),menu:"fit"},kneeEase:{pct:-4,min:-20,max:0,...(0,s.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:i,measurements:a,options:s,complete:n,paperless:r,store:l,macro:c,utils:p,snippets:h,Snippet:d,sa:f,absoluteOptions:m,part:u,log:g,units:b}){const k=-s.fabricStretch/10,w=.005;(Math.abs(s.waistEase-k)>w||Math.abs(s.seatEase-k)>w||Math.abs(s.kneeEase-k)>w)&&l.flag.note({msg:"lily:adjustEase",replace:{stretch:b(s.fabricStretch),ease:k},suggest:{text:"adjustEase",icon:"options",update:{settings:["options",{...s,waistEase:k,seatEase:k,kneeEase:k}]}}});const C=()=>(new i).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 i).move(t.floorOut).curve(t.floorOutCp2,t.kneeOutCp1,t.kneeOut).curve(t.kneeOutCp2,t.seatOut,e):(new i).move(t.floorOut).curve(t.floorOutCp2,t.kneeOutCp1,t.kneeOut).curve(t.kneeOutCp2,t.seatOutCp1,t.seatOut).curve_(t.seatOutCp2,e)},T=()=>(new i).move(t.waistIn).line(t.crossSeamCurveStart).curve(t.crossSeamCurveCp1,t.crossSeamCurveCp2,t.fork).length()-a.crossSeamBack,y=()=>{t.crossSeamCurveStart=t.waistIn.shiftFractionTowards(t.cbSeat,s.crossSeamCurveStart),t.crossSeamCurveMax=p.beamsIntersect(t.waistIn,t.cbSeat,t.fork,t.fork.shift(0,1)),t.crossSeamCurveCp1=t.crossSeamCurveStart.shiftFractionTowards(t.crossSeamCurveMax,s.crossSeamCurveBend),t.crossSeamCurveCp2=t.fork.shiftFractionTowards(t.crossSeamCurveMax,s.crossSeamCurveBend).rotate(s.crossSeamCurveAngle,t.fork)},x=a.ankle*(1+s.fabricStretch)>a.heel?(1-s.fabricStretch/10)*(a.ankle/4):a.heel/4/(1+s.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),y(),s.fitCrossSeam&&s.fitCrossSeamBack){let e=T(),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),y(),e=T()}while(Math.abs(e)>1&&o<15)}l.set("inseamBack",C().length()),l.set("outseamBack",v().length()),l.set("waistbandWidth",m.waistbandWidth),s.waistHeight<1||m.waistbandWidth>0?(t.styleWaistOutLily=v().reverse().shiftAlong(a.waistToHips*(1-s.waistHeight)+m.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(s.lengthReduction>0){let e=(1-s.lengthReduction)*a.waistToFloor;const n=t.waistX.dy(t.fork);let r,c;n>=.99*e&&(g.warn("length reduction capped; cutting off at fork"),e=1.01*n),.999<e/a.waistToKnee&&e/a.waistToKnee<1.001&&(e=1.001*a.waistToKnee),t.bottom=t.waistX.shift(270,e),e<a.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 i).move(t.bottomIn).line(t.bottomOut);const h=o.seam.split(t.bottomIn);o.upperInseam=h[0];const d=h[1].split(t.bottomOut);o.upperOutseam=d[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 i).move(t.bottomIn).line(t.bottomOut),o.upperInseam=C(),o.upperOutseam=v().join((new i).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),h.logo=new d("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}),s.fitGuides&&(t.waistMid=t.waistOut.shiftFractionTowards(t.waistIn,.5),t.seatMid=t.waistMid.shiftTowards(t.waistIn,a.waistToSeat).rotate(90,t.waistMid),t.seatInTarget=t.seatOut.shiftOutwards(t.seatMid,a.seat/4),t.seatOutTarget=t.seatMid.shiftTowards(t.seatOut,a.seat/4),t.hipsInTarget=t.waistIn.shiftTowards(t.waistOut,a.waistToHips).rotate(-90,t.waistIn),t.hipsOutTarget=t.waistOut.shiftTowards(t.waistIn,a.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"]}),n&&(o.seatline=(new i).move(t.seatIn).line(t.seatOutNotch).addClass("fabric help").addText("Seat Line","center"),a.waistToHips*(1-s.waistHeight)+m.waistbandWidth<a.waistToHips&&(h.hipsIn=new d("bnotch",t.hipsIn),h.hipsOut=new d("notch",t.hipsOut),o.hipline=(new i).move(t.hipsIn).line(t.hipsOut).addClass("fabric help").addText("Hip Line","center")))),f&&(o.saBase=o.upperOutseam.join(o.upperInseam).hide(),o.hemBase=o.bottom.hide(),o.sa=o.hemBase.offset(3*f).join(o.saBase.offset(f)).close().addClass("fabric sa")),r&&(o.hint=(new i).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)+f+15}),c("vd",{id:"hHemToFork",from:t.bottomIn,to:t.fork,x:t.fork.x-f-15}),c("vd",{id:"hForkToCbWaist",from:t.fork,to:t.styleWaistInLily,x:t.fork.x-f-15}),c("vd",{id:"hFull",from:t.bottomIn,to:t.styleWaistInLily,x:t.fork.x-f-30}),c("vd",{id:"hStartCrotchCurveToCbWaist",from:t.crossSeamCurveStart,to:t.styleWaistInLily,x:t.crossSeamCurveStart.x-f-15}),c("hd",{id:"wCbWaistToPleat",from:t.styleWaistInLily,to:t.grainlineTop,y:t.styleWaistInLily.y-f-15}),c("hd",{id:"wStartCrotchCurveToPleat",from:t.crossSeamCurveStart,to:t.grainlineTop,y:t.styleWaistInLily.y-f-30}),c("hd",{id:"wForkProjectionToPleat",from:t.crossSeamCurveMax,to:t.grainlineTop,y:t.styleWaistInLily.y-f-45}),c("hd",{id:"wForkToPleat",from:t.fork,to:t.grainlineTop,y:t.styleWaistInLily.y-f-60}),c("hd",{id:"wPleatToSideWaist",from:t.grainlineTop,to:t.styleWaistOutLily,y:t.styleWaistInLily.y-f-15}),t.seatOut.x>t.styleWaistOutLily.x&&c("hd",{id:"wPleatToSideWaistAlt",from:t.grainlineTop,to:t.seatOut,y:t.styleWaistInLily.y-f-30})),u}};const il={name:"lily.front",from:Wo,after:ol,hide:"HIDE_TREE",draft:function({points:t,Point:e,paths:o,Path:i,measurements:a,options:s,complete:n,paperless:r,store:l,macro:c,utils:p,snippets:h,Snippet:d,sa:f,absoluteOptions:m,log:u,part:g}){const b=()=>(new i).move(t.floorIn).curve(t.floorInCp2,t.kneeInCp1,t.kneeIn).curve(t.kneeInCp2,t.forkCp1,t.fork),k=()=>{const e=t.styleWaistOutLily||t.waistOut;return t.waistOut.x<t.seatOut.x?(new i).move(e).curve(t.seatOut,t.kneeOutCp1,t.kneeOut).curve(t.kneeOutCp2,t.floorOutCp2,t.floorOut):(new i).move(e)._curve(t.seatOutCp1,t.seatOut).curve(t.seatOutCp2,t.kneeOutCp1,t.kneeOut).curve(t.kneeOutCp2,t.floorOutCp2,t.floorOut)},w=()=>(new i).move(t.waistIn).line(t.crotchSeamCurveStart).curve(t.crotchSeamCurveCp2,t.crotchSeamCurveCp1,t.fork).length()-a.crossSeamFront,C=()=>{t.crotchSeamCurveStart=t.waistIn.shiftFractionTowards(t.cfSeat,s.crotchSeamCurveStart),t.crotchSeamCurveMax=p.beamsIntersect(t.waistIn,t.cfSeat,t.fork,t.fork.shift(0,666)),t.crotchSeamCurveCp1=t.fork.shiftFractionTowards(t.crotchSeamCurveMax,s.crotchSeamCurveBend).rotate(-1*s.crotchSeamCurveAngle,t.fork),t.crotchSeamCurveCp2=t.crotchSeamCurveStart.shiftFractionTowards(t.crotchSeamCurveMax,s.crotchSeamCurveBend),t.forkCp1=t.crotchSeamCurveCp1.rotate(90,t.fork)},v=()=>b().length()-l.get("inseamBack"),T=()=>k().length()-l.get("outseamBack"),y=()=>{const t=v(),e=T();return Math.abs(t)>Math.abs(e)?e:t},x=e=>{const o="out"===e,i=["cfSeat","crotchSeamCurveCp1","crotchSeamCurveCp2","crotchSeamCurveStart","waistIn","cfWaist","waistOut"];i.push(o?"seatOut":"fork");const a=o?T:v;let s=0,n=a();do{for(const e of i)t[e]=t[e].rotate(n/10*(o?1:-1),t[o?"fork":"seatOut"]);s++,n=a()}while(Math.abs(n)>1&&s<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(),s.fitCrossSeam&&s.fitCrossSeamFront){let e=w(),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=w()}while(Math.abs(e)>1&&o<15)}(v()<0&&T()<0||v()>0&&T()>0)&&(()=>{const e=["kneeInCp1","kneeInCp2","kneeOutCp1","kneeOutCp2","kneeIn","kneeOut","knee","floorInCp2","floorIn","floorOutCp2","floorOut","floor","grainlineBottom"];let o=y(),i=0;do{i++;for(const i of e)t[i]=t[i].shift(90,o);o=y()}while(Math.abs(o)>1&&i<10)})(),B(),S(),B(),S(),s.waistHeight<1||m.waistbandWidth>0?(t.styleWaistOutLily=k().shiftAlong(a.waistToHips*(1-s.waistHeight)+m.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;
1return k().line(t.floorIn).join(b()).curve(t.crotchSeamCurveCp1,t.crotchSeamCurveCp2,t.crotchSeamCurveStart).line(e).line(o).close()})().attr("class","fabric");let L=1;if(s.lengthReduction>0){let e,a,s=l.get("requestedLength"),n=t.waistX.dy(t.fork),r=t.waistX.dy(t.knee);n>s&&(s=1.01*n),.999<s/r&&s/r<1.001&&(s=1.001*r),t.bottom=t.waistX.shift(270,s),s<r?(L=0,t.waistOut.x<t.seatOut.x?(e=t.styleWaistOutLily,a=t.seatOut):(e=t.seatOut,a=t.seatOutCp2),t.bottomOut=p.lineIntersectsCurve(t.bottom.shift(0,999),t.bottom.shift(180,999),t.kneeOut,t.kneeOutCp1,a,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 i).move(t.bottomOut).line(t.bottomIn);const c=o.seam.split(t.bottomOut);o.upperOutseam=c[0];const h=c[1].split(t.bottomIn);o.upperInseam=h[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 i).move(t.bottomOut).line(t.bottomIn),o.upperInseam=b().curve(t.crotchSeamCurveCp1,t.crotchSeamCurveCp2,t.crotchSeamCurveStart).line(t.styleWaistInLily).line(t.styleWaistOutLily),o.upperOutseam=k(),o.bottom.hide(),o.upperInseam.hide(),o.upperOutseam.hide();return n&&(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),h.logo=new d("logo",t.logoAnchor),t.titleAnchor=t.logoAnchor.shift(-90,60),c("title",{nr:2,title:"front",at:t.titleAnchor}),s.fitGuides&&(t.waistMid=t.waistOut.shiftFractionTowards(t.waistIn,.5),t.seatMid=t.waistMid.shiftTowards(t.waistOut,a.waistToSeat).rotate(90,t.waistMid),t.seatInTarget=t.seatOut.shiftOutwards(t.seatMid,a.seat/4),t.seatOutTarget=t.seatMid.shiftTowards(t.seatOut,a.seat/4),t.hipsInTarget=t.waistIn.shiftTowards(t.waistOut,a.waistToHips).rotate(90,t.waistIn),t.hipsOutTarget=t.waistOut.shiftTowards(t.waistIn,a.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 i).move(t.seatOutNotch).line(t.seatIn).addClass("fabric help").addText("Seat Line","center"),a.waistToHips*(1-s.waistHeight)+m.waistbandWidth<a.waistToHips&&(c("sprinkle",{snippet:"notch",on:["hipsIn","hipsOut"]}),o.hipline=(new i).move(t.hipsOut).line(t.hipsIn).addClass("fabric help").addText("Hip Line","center"))),f&&(o.saBase=o.upperInseam.join(o.upperOutseam).hide(),o.hemBase=o.bottom.hide(),o.sa=o.hemBase.offset(3*f).join(o.saBase.offset(f)).close().addClass("fabric sa")),r&&(o.hint=(new i).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+f+15}),c("vd",{id:"hForkToCfWaist",from:t.fork,to:t.styleWaistInLily,x:t.fork.x+f+15}),c("vd",{id:"hHemToSideWaist",from:t.bottomIn,to:t.styleWaistOutLily,x:(t.seatOut.x<t.styleWaistOutLily.x?t.seatOut.x:t.styleWaistOutLily.x)-f-15}),c("vd",{id:"hStartCrotchCurveToCfWaist",from:t.crotchSeamCurveStart,to:t.styleWaistInLily,x:t.crotchSeamCurveStart.x+f+15}),c("hd",{id:"wSideWaistToPleat",from:t.seatOut,to:t.grainlineTop,y:t.styleWaistInLily.y-f-15}),t.styleWaistOutLily.x<t.seatOut.x&&c("hd",{id:"wSideWaistToPleatAlt",from:t.styleWaistOutLily,to:t.grainlineTop,y:t.styleWaistInLily.y-f-30}),c("hd",{id:"wPleatToCfWaist",from:t.grainlineTop,to:t.styleWaistInLily,y:t.styleWaistInLily.y-f-15}),c("hd",{id:"wPleatToStartCrotchCurve",from:t.grainlineTop,to:t.crotchSeamCurveStart,y:t.styleWaistInLily.y-f-30}),c("hd",{id:"wPleatToCrotchProjection",from:t.grainlineTop,to:t.crotchSeamCurveMax,y:t.styleWaistInLily.y-f-45}),c("hd",{id:"wPleatToFork",from:t.grainlineTop,to:t.fork,y:t.styleWaistInLily.y-f-60}))),g}},al=JSON.parse('{"id":"paco","name":"Paco pants","code":"Joost De Cock","description":"A FreeSewing pattern for summer pants","de
1sign":"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}'),sl={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 nl={name:"paco.back",from:Fo,hide:s.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,s.Wx)("waist"),menu:"fit"},seatEase:{pct:5,min:0,max:15,...(0,s.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,s.Wx)("waistToFloor"),menu:"elastic"},ankleElastic:{pct:5,min:1,max:13,snap:Ro.HJ,...(0,s.Wx)("waistToFloor"),menu:"elastic"},heelEase:{pct:5,min:0,max:50,...(0,s.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,s.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:i,paths:a,options:s,measurements:n,complete:r,macro:l,absoluteOptions:c,part:p}){const h=()=>(new i).move(o.fork).curve(o.forkCp2,o.kneeInCp1,o.floorIn),d=(t=!1)=>{let e=o.styleWaistOut||o.waistOut,a=(new i).move(o.floorOut).curve(o.kneeOutCp2,o.seatOut,e);if(!s.frontPockets||t)return a;{let t=a.split(o.pocketFlapBottomIn);return t[0].join((new i).move(o.pocketFlapBottomIn).line(o.pocketFlapBottomOut).line(o.pocketFlapTopOut).line(o.pocketFlapTopIn)).join(t[1].split(o.pocketFlapTopIn).pop())}};let f=n.heel*(1+s.heelEase)*s.legBalance/2;if(o.floorOut=o.floor.shift(0,f),o.floorIn=o.floor.shift(180,f),o.kneeOut=o.knee.shift(0,f),o.kneeOutCp2=o.kneeOut,o.kneeIn=o.knee.shift(180,f),o.kneeInCp1=o.kneeIn,t.set("ankleElastic",c.ankleElastic),s.elasticatedCuff)for(const g of["floor","floorIn","floorOut"])o[g]=o[g].shift(90,t.get("ankleElastic"));let m=n.seat*s.legBalance/2-o.styleWaistIn.dist(o.styleWaistOut),u=o.styleWaistInNoAngle.angle(o.styleWaistOut);
1if(o.styleWaistOut=o.styleWaistOut.shift(u,m),o.seatOut=o.seatOut.shift(u,m),t.set("waistbandWidth",c.waistbandWidth),o.styleWaistOut=d(!0).end(),s.frontPockets){let t=d(!0).reverse();o.pocketFlapTopIn=t.shiftAlong(c.frontPocketFlapSize),o.pocketFlapBottomIn=t.shiftAlong(c.frontPocketFlapSize+n.heel*s.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(s.backPockets){const t=()=>o.styleWaistOut.dist(o.styleWaistIn)*s.backPocketWidthRatio;let e=o.styleWaistOut.angle(o.styleWaistIn);o.pocketWaistCenter=o.styleWaistIn.shiftFractionTowards(o.styleWaistOut,s.backPocketWaistRatio),o.pocketCenter=o.pocketWaistCenter.shift(e+90,o.styleWaistIn.dist(o.crossSeamCurveStart)*s.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(a.seam=(()=>
1{let t=o.styleWaistIn||o.waistIn;return h().line(o.floorOut).join(d()).line(t).line(o.crossSeamCurveStart).curve(o.crossSeamCurveCp1,o.crossSeamCurveCp2,o.fork).close()})(),t.set("pacoInseamBack",h().length()),t.set("pacoOutseamBack",d(!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,n=s.elasticatedCuff?e:4*e;a.sa=h().offset(e).line(o.floorIn.shift(180,e).shift(-90,n)).line(o.floorOut.shift(0,e).shift(-90,n)).join(d().offset(e).trim()).join((new i).move(o.styleWaistOut).line(t).line(o.crossSeamCurveStart).curve(o.crossSeamCurveCp1,o.crossSeamCurveCp2,o.fork).offset(e)).close().attr("class","fabric sa")}return r&&(a.hint=(new i).move(o.crossSeamCurveStart).line(o.crossSeamCurveMax).line(o.fork).attr("class","note lashed"),s.backPockets&&(a.pocket=(new i).move(o.pocketLeft).line(o.pocketRight).attr("class","fabric lashed"),a.pocketBag=(new i).move(o.pocketBagWaistLeft).line(o.pocketBagBottomLeft).line(o.pocketBagBottomRight).line(o.pocketBagWaistRight).attr("class","lining lashed"))),t.cutlist.setCut({cut:2,from:"fabric"}),s.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}),s.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})),s.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:Wo,hide:s.V9.HIDE_TREE,after:nl,draft:function({utils:t,store:e,sa:o,Point:i,points:a,Path:s,paths:n,options:r,measurements:l,complete:c,macro:p,absoluteOptions:h,part:d}){const f=()=>(new s).move(a.floorIn).curve(a.kneeInCp2,a.forkCp1,a.fork),m=(t=!1)=>{let e=a.styleWaistOut||a.waistOut,o=(new s).move(e).curve(a.seatOut,a.kneeOutCp1,a.floorOut);if(!r.frontPockets||t)return o;{let t=o.split(a.pocketFlapTopIn);return t[0].join((new s).move(a.pocketFlapTopIn).line(a.pocketFlapTopOut).line(a.pocketFlapBottomOut).line(a.pocketFlapBottomIn)).join(t[1].split(a.pocketFlapBottomIn)[1])}};let u=l.heel*(1+r.heelEase)*(1-r.legBalance)/2;if(a.floorOut=a.floor.shift(180,u),a.floorIn=a.floor.shift(0,u),a.kneeOut=a.knee.shift(180,u),a.kneeOutCp1=a.kneeOut,a.kneeIn=a.knee.shift(0,u),a.kneeInCp2=a.kneeIn,r.elasticatedCuff)for(const w of["floor","floorIn","floorOut"])a[w]=a[w].shift(90,r.ankleElastic);let g=l.seat*(1-r.legBalance)/2-a.styleWaistIn.dist(a.styleWaistOut),b=a.styleWaistInNoAngle.angle(a.styleWaistOut);a.styleWaistOut=a.styleWaistOut.shift(b,g),a.seatOut=a.seatOut.shift(b,g),a.styleWaistOut=m(!0).start();let k=f().length()-e.get("pacoInseamBack");if(a.floor=a.floor.shift(90,k),a.floorIn=a.floorIn.shift(90,k),a.floorOut=a.floorOut.shift(90,k),a.styleWaistOut=a.floorOut.shiftOutwards(a.styleWaistOut,-1*(m(!0).length()-e.get("pacoOutseamBack"))),r.frontPockets){let e=m(!0);a.pocketFlapTopIn=e.shiftAlong(h.frontPocketFlapSize),a.pocketFlapBottomIn=e.shiftAlong(h.frontPocketFlapSize+l.heel*r.frontPocketHeelRatio),a.pocketFlapTopOut=a.pocketFlapTopIn.shiftTowards(a.pocketFlapBottomIn,h.frontPocketFlapSize).rotate(-90,a.pocketFlapTopIn),a.pocketFlapBottomOut=a.pocketFlapBottomIn.shiftTowards(a.pocketFlapTopIn,h.frontPocketFlapSize).rotate(90,a.pocketFlapBottomIn),a.pocketFlapBottomOut=a.pocketFlapTopOut.shiftOutwards(a.pocketFlapBottomOut,h.frontPocketFlapSize),a.flapTopLeft=a.pocketFlapTopOut.shiftTowards(a.pocketFlapTopIn,2*h.frontPocketFlapSize),a.flapBottomLeft=a.pocketFlapBottomOut.translate(a.pocketFlapTopOut.dx(a.flapTopLeft),a.pocketFlapTopOut.dy(a.flapTopLeft)),a.topLeft=t.beam
1sIntersect(a.flapBottomLeft,a.flapTopLeft,a.styleWaistOut,a.styleWaistIn),a.topRight=a.topLeft.shiftFractionTowards(a.styleWaistIn,.6),a.bottomRight=a.topRight.shift(a.flapTopLeft.angle(a.flapBottomLeft),1.75*a.flapTopLeft.dist(a.flapBottomLeft)).rotate(5,a.topRight),a.bottom=new i(a.flapBottomLeft.x+a.flapBottomLeft.dx(a.bottomRight)/2,a.bottomRight.y),a.bottomCp1=new i(a.flapBottomLeft.x,a.bottom.y),a.bottomCp2=t.beamIntersectsY(a.topRight,a.bottomRight,a.bottom.y)}if(e.set("frontWaist",a.styleWaistIn.dist(a.styleWaistOut)),e.set("frontAnkle",a.floorIn.dist(a.floorOut)),n.seam=(()=>{let t=a.styleWaistIn||a.waistIn,e=a.styleWaistOut||a.waistOut;return m().line(a.floorIn).join(f()).curve(a.crotchSeamCurveCp1,a.crotchSeamCurveCp2,a.crotchSeamCurveStart).line(t).line(e).close()})(),o){const t=a.styleWaistIn||a.waistIn,e=a.styleWaistOut||a.waistOut,i=r.elasticatedCuff?o:4*o;n.sa=m().offset(o).line(a.floorOut.shift(180,o).shift(-90,i)).line(a.floorIn.shift(0,o).shift(-90,i)).join(f().offset(o)).join((new s).move(a.fork).curve(a.crotchSeamCurveCp1,a.crotchSeamCurveCp2,a.crotchSeamCurveStart).line(t).line(e).offset(o).trim()).close().attr("class","fabric sa")}return c&&(n.hint=(new s).move(a.crotchSeamCurveStart).line(a.crotchSeamCurveMax).line(a.fork).attr("class","note lashed"),r.frontPockets&&(n.pocket=(new s).move(a.topLeft).line(a.flapBottomLeft)._curve(a.bottomCp1,a.bottom).line(a.bottomRight).line(a.topRight).line(a.topLeft).close().attr("class","lining help"),n.pocketFlap=(new s).move(a.pocketFlapTopIn).line(a.flapTopLeft).move(a.pocketFlapBottomIn).line(a.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:a.floorOut,to:a.floor,y:a.floorIn.y-15}),p("hd",{id:"wHemRight",from:a.floor,to:a.floorIn,y:a.floorIn.y-15}),p("hd",{id:"wHem",from:a.floorOut,to:a.floorIn,y:a.floorIn.y-30}),p("vd",{id:"hHemToFork",from:a.floorOut,to:a.fork,x:a.fork.x+o+15}),p("vd",{id:"hForkToCfWaist",from:a.fork,to:a.styleWaistIn,x:a.fork.x+o+15}),p("vd",{id:"hHemToSideWaist",from:a.floorIn,to:a.styleWaistOut,x:(a.seatOut.x<a.styleWaistOut.x?a.seatOut.x:a.styleWaistOut.x)-o-30}),p("hd",{id:"wSideWaistToPleat",from:a.styleWaistOut,to:a.grainlineTop,y:a.styleWaistIn.y-o-30}),a.styleWaistOut.x<a.seatOut.x&&p("hd",{id:"wWaistOut",from:a.styleWaistOut,to:a.grainlineTop,y:a.styleWaistIn.y-o-30}),p("hd",{id:"wPleatToCfWaist",from:a.grainlineTop,to:a.styleWaistIn,y:a.styleWaistIn.y-o-30}),p("hd",{id:"wPleatToCrotchCurveProjection",from:a.grainlineTop,to:a.crotchSeamCurveMax,y:a.styleWaistIn.y-o-45}),p("hd",{from:a.grainlineTop,id:"wPleatToFork",to:a.fork,y:a.styleWaistIn.y-o-60}),r.frontPockets&&(p("ld",{id:"hWaistToPocketStart",from:a.pocketFlapTopIn,to:a.styleWaistOut,d:-15}),p("ld",{id:"hPocket",from:a.pocketFlapTopIn,to:a.pocketFlapBottomIn,d:-15}),p("ld",{id:"wPocketTab",from:a.pocketFlapTopOut,to:a.pocketFlapTopIn,d:15}),p("ld",{id:"wSideToStartPocketBag",from:a.styleWaistOut||a.waistOut,to:a.topLeft,d:10+o}),p("ld",{id:"wPocketBagAtWaist",from:a.topLeft,to:a.topRight,d:10+o})),d}};const ll={name:"paco.cuff",after:rl,draft:function({store:t,sa:e,Point:o,points:i,Path:a,paths:s,options:n,complete:r,expand:l,units:c,macro:p,part:h}){if(!n.elasticatedCuff)return h.hide();const d=t.get("frontAnkle")+t.get("backAnkle"),f=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*f+2*o),l:c(d+o)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),t.flag.preset("expandIsOff"),h.hide()}return t.flag.preset("expandIsOn"),i.topLeft=new o(0,0),i.topMid=new o(f,0),i.topRight=new o(2*f,0),i.bottomLeft=new o(0,d),i.bottomMid=new o(f,d),i.bottomRight=new o(2*f,d),s.seam=(new a).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).line(i.topLeft).close().attr("class","fabric"),r&&(s.fold=(new a).move(i.topMid).line(i.bottomMid).attr("class","help")),e&&(s.sa=(new a).move(i.topLeft.shift(180,2*e)).line(i.bottomLeft.shift(180,2*e)).line(i.bottomRight).line(i.topRight).line(i.topLeft.shift(180,2*e)).close().offset(e).attr("class","fabric sa")),t.cutlist.setCut({cut:2,from:"fabric"}),i.title=i.topLeft.shiftFractionTowards(i.bottomRight,.5),p("title",{at:i.title,nr:4,title:"cuff",align:"center"}),p("grainline",{from:i.topMid.shift(0,15),to:i.bottomMid.shift(0,15)}),p("vd",{id:"hfull",from:i.bottomRight,to:i.topRight,x:i.topRight.x+15+e}),p("hd",{id:"wfull",from:i.bottomLeft,to:i.bottomRight,y:i.bottomRight.y+15+e}),h}};const cl={name:"paco.frontPocketBag",from:rl,draft:function({sa:t,points:e,Path:o,paths:i,store:a,snippets:s,options:n,macro:r,part:l}){if(!n.frontPockets)return l.hide();for(const h in i)delete i[h];for(const h in s)delete s[h];const c=["topLeft","flapTopLeft","flapBottomLeft","bottomCp1","bottom","bottomRight"],p=-90-e.topRight.angle(e.bottomRight);for(const h in e)-1!==c.indexOf(h)&&(e[h]=e[h].rotate(p,e.topRight));return i.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&&(i.sa=(new o).move(e.topRight).line(e.topLeft).line(e.flapBottomLeft)._curve(e.bottomCp1,e.bottom).line(e.bottomRight).offset(t),i.sa=(new o).move(e.topRight).join(i.sa).line(e.bottomRight).attr("class","lining sa")),a.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:nl,draft:function({sa:t,points:e,Path:o,paths:i,snippets:a,store:s,options:n,complete:r,expand:l,units:c,macro:p,part:h}){for(const m in i)delete i[m];for(const m in a)delete a[m];if(p("rmscalebox"),p("rmtitle"),!n.backPockets)return h.hide();if(!l){const o=t?2*t:0;return s.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]}}}),s.flag.preset("expandIsOff"),h.hide()}s.flag.preset("expandIsOn");const d=["pocketBagWaistLeft","pocketBagWaistRight","pocketBagBottomLeft","pocketBagBottomRight","pocketLeft","pocketRight"],f=-1*e.pocketLeft.angle(e.pocketRight);for(const m in e)-1!==d.indexOf(m)&&(e[m]=e[m].rotate(f,e.pocketBagWaistLeft));return i.seam=(new o).move(e.pocketBagWaistLeft).line(e.pocketBagBottomLeft).line(e.pocketBagBottomRight).line(e.pocketBagWaistRight).line(e.pocketBagWaistLeft).close().attr("class","lining"),r&&(i.cut=(new o).move(e.pocketLeft).line(e.pocketRight).attr("class","lining lashed")),t&&(i.sa=(new o).move(e.pocketBagBottomRight).line(e.pocketBagWaistRight).line(e.pocketBagWaistLeft).line(e.pocketBagBottomLeft).offset(t),i.sa=(new o).move(e.pocketBagBottomRight).join(i.sa).line(e.pocketBagBottomLeft).attr("class","lining sa")),s.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}),h}};const hl={name:"paco.backPocketWelt",from:pl,options:{weltFactor:.15},draft:function({sa:t,Point:e,points:o,Path:i,paths:a,snippets:s,options:n,expand:r,store:l,units:c,macro:p,part:h}){for(const m in a)delete a[m];for(const m in s)delete s[m];if(p("rmscalebox"),p("rmtitle"),!n.backPockets)return h.hide();const d=o.pocketBagWaistLeft.dist(o.pocketBagWaistRight),f=o.pocketLeft.dist(o.pocketRight)*n.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*f),o.bottomRight=o.topRight.shift(-90,2*f),!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(f+e),l:c(d+e)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),l.flag.preset("expandIsOff"),h.hide()}return l.flag.preset("expandIsOn"),a.seam=(new i).move(o.topLeft).line(o.bottomLeft).line(o.bottomRight).line(o.topRight).line(o.topLeft).close().attr("class","fabric"),t&&(a.sa=a.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}),h}};const dl={name:"paco.backPocketWeltInterfacing",from:hl,draft:function({points:t,Path:e,paths:o,snippets:i,options:a,expand:s,store:n,units:r,macro:l,part:c}){for(const p in o)delete o[p];for(const p in i)delete i[p];return l("rmscalebox"),l("rmtitle"),a.backPockets?s?(n.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"),n.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):(n.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]}}}),n.flag.preset("expandIsOff"),c.hide()):c.hide()}};const fl={name:"paco.waistband",after:rl,draft:function({store:t,sa:e,Point:o,points:i,Path:a,paths:s,complete:n,expand:r,macro:l,units:c,part:p}){const h=2*(t.get("frontWaist")+t.get("backWaist")),d=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*d+2*o),l:c(h+o)},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(0,0),i.topMid=new o(d,0),i.topRight=new o(2*d,0),i.bottomLeft=new o(0,h),i.bottomMid=new o(d,h),i.bottomRight=new o(2*d,h),i.eyeletTop=new o(1.5*d,h/2-d/2),i.eyeletBottom=new o(1.5*d,h/2+d/2),s.seam=(new a).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).line(i.topLeft).close().addClass("fabric"),n&&(s.fold=(new a).move(i.topMid).line(i.bottomMid).attr("class","help")),e&&(s.sa=(new a).move(i.topLeft.shift(180,2*e)).line(i.bottomLeft.shift(180,2*e)).line(i.bottomRight).line(i.topRight).line(i.topLeft.shift(180,2*e)).close().offset(e).setClass("fabric sa")),t.cutlist.setCut({cut:1,from:"fabric"}),i.title=i.topLeft.shiftFractionTowards(i.bottomRight,.4),l("title",{at:i.title,nr:3,title:"waistband"}),l("grainline",{from:i.topLeft.shift(0,15),to:i.bottomLeft.shift(0,15)}),l("sprinkle",{snippet:"eyelet",on:["eyeletTop","eyeletBottom"]}),l("hd",{id:"wFull",from:i.topLeft,to:i.topRight,y:i.bottomRight.y+e+15}),l("hd",{id:"wEyeletTop",from:i.eyeletTop,to:i.topRight,y:i.topLeft.y-e-15}),l("vd",{id:"hEyeletTop",from:i.eyeletTop,to:i.topRight,x:i.topRight.x+e+15}),l("vd",{from:i.bottomRight,to:i.topRight,x:i.topLeft.x-15-3*e}),p}},ml=new s.pT({data:al,parts:[nl,rl,ll,cl,pl,hl,dl,fl]}),ul=(0,s.D4)([Po,sl]),gl={name:"lily.waistband",after:[ol,il],hide:"HIDE_TREE",draft:t=>{const{snippets:e,part:o}=t;fl.draft(t);for(let i in e)delete e[i];return o}},bl=new s.pT({data:el,parts:[il,ol,gl]}),kl=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}'),wl={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:i,paths:a,Snippet:s,snippets:n,complete:r,sa:l,macro:c,store:p,part:h}){const d=800*t.length,f=500*t.width,m=t.edge;return i.topLeft=new e(0,0),i.topRight=new e(f,0),i.bottomLeft=new e(0,d),i.bottomRight=new e(f,d),i.center=new e(f/2,0),i.middle=i.center.shift(270,.525*d),i.centerRight=i.center.shift(0,f*m),i.centerLeft=i.center.shift(180,f*m),i.taperRight=new e(f,.4375*d),i.taperLeft=new e(0,.4375*d),i.leftCp1=i.bottomLeft.shiftFractionTowards(i.taperLeft,2/7),i.leftCp2=i.bottomLeft.shiftFractionTowards(i.bottomRight,.2),i.rightCp1=i.bottomRight.shiftFractionTowards(i.taperRight,2/7),i.rightCp2=i.bottomRight.shiftFractionTowards(i.bottomLeft,.2),a.seam=(new o).move(i.centerLeft).line(i.taperLeft).line(i.leftCp1).curve_(i.bottomLeft,i.leftCp2).line(i.rightCp2).curve_(i.bottomRight,i.rightCp1).line(i.taperRight).line(i.centerRight).line(i.centerLeft).close(),l&&(a.sa=a.seam.offset(l).attr("class","fabric sa")),r&&(a.slit=(new o).move(i.center).line(i.middle).addClass("fabric dashed")),p.cutlist.setCut({cut:2,from:"fabric"}),i.title=new e(i.middle.x,i.middle.y/2),c("title",{at:i.title,nr:1,title:"pocket",align:"center"}),i.logo=i.title.shift(-90,90),n.logo=new s("logo",i.logo),i.scalebox=i.middle.shift(270,f/5),c("scalebox",{at:i.scalebox}),c("hd",{id:"wFull",from:i.leftCp1,to:i.rightCp1,y:i.bottomLeft.y+l+30}),c("vd",{id:"hCut",to:i.center,from:i.middle,x:i.topRight.x+l+15}
1),c("vd",{id:"hFull",from:i.rightCp2,to:i.centerRight,x:i.topRight.x+l+30}),c("vd",{id:"hRound",from:i.rightCp2,to:new e(i.rightCp2.x,i.rightCp1.y),x:i.topRight.x+l+15}),c("hd",{id:"wAtTop",from:i.centerLeft,to:i.centerRight,y:i.topLeft.y-l-15}),c("hd",{id:"wRound",from:new e(i.rightCp2.x,i.rightCp1.y),to:i.rightCp1,y:i.bottomLeft.y+l+15}),h}},vl=new s.pT({data:kl,parts:[Cl]}),Tl={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)."}}}')},yl=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":"C
1ould 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 leggings 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,i=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(),i)),Ll=(t,e,o,i)=>{let a;a=void 0===t?e.angle(o)+180:void 0===o?e.angle(t):Math.abs(e.angle(t)-e.angle(o))/2;let s=void 0!==o?e.shift(e.angle(o)-a+90,e.dist(o)/i):null,n=void 0!==t?e.shift(e.angle(t)+a-90,e.dist(t)/i):null;return void 0!==t&&e.sitsRoughlyOn(t)?{cp1:t.clone(),cp2:n}:void 0!==o&&e.sitsRoughlyOn(o)?{cp1:s,cp2:o.clone()}:{cp1:s,cp2:n}},Pl=(t,e,o)=>{for(let i=0;i<o.length;i++){let a=Ll(t[o[i-1]],t[o[i]],t[o[i+1]],e);a.cp1&&(t[o[i]+"Cp1"]=a.cp1),a.cp2&&(t[o[i]+"Cp2"]=a.cp2)}},Rl=(t,e,o,i,a,s,n)=>{const r=Sl(e,t[a],100,0),l=r.shiftAlong(n+100);if(l.sitsRoughlyOn(o[a+"Waist"]))return;o[a+s]=l;const c=r.split(o[a+s]);2==c.length?t[a]=c[1].hide():i.info("lumira:couldNotreduceWaist")},Fl=(t,e,o,i,a,s,n)=>{t[a+"GussetCp"]=t[a+"Gusset"].shiftFractionTowards(t.centerUpperLeg,.1);const r="front"==a?t[a+"GussetJoin"].x:t[a+"Gusset"].x,l="front"==a?t[a+"Gusset"].x:t[a+"GussetJoin"].x;t[a+"GussetCp"].x<r&&(t[a+"GussetCp"].x=t[a+"GussetJoin"].x),t[a+"GussetCp"].x>l&&(t[a+"GussetCp"].x=t[a+"Gusset"].x);const c=(new o).move(t[a+"GussetJoin"])._curve(t[a+"GussetCp"],t[a+"Gusset"]).hide().shiftAlong(1),p=(new o).move(t[a+"Waist"])._curve(t[a+"UpperLegCp2"],t[a+"UpperLeg"]).hide().shiftAlong(1),h="front"==a?t[a+"GussetJoin"].angle(c):p.angle(t[a+"GussetJoin"]),d="front"==a?p.angle(t[a+"GussetJoin"]):t[a+"GussetJoin"].angle(c);t[a+"GussetJoinCp"]=h>d?t[a+"GussetJoin"].shift(p.angle(t[a+"GussetJoin"]),n-s):t[a+"GussetJoin"].clone(),e[a+"Gusset"]=(new o).move(t[a+"GussetJoin"]).curve(t[a+"GussetJoinCp"],t[a+"GussetCp"],t[a+"Gusset"]).hide();const f=e[a].reverse().shiftAlong(Math.min(n,e[a].length())-1),m=e[a].shiftAlong(1),u=Math.abs(t[a+"GussetJoin"].angle(m)-f.angle(t[a+"GussetJoin"]));i.set(a+"GussetAngle",2*u);const g=e[a].split(t[a+"GussetJoin"]);void 0!==g[0].ops?e[a+"Top"]=g[0].hide():e[a+"Top"]=e[a].clone(),e[a]=e[a+"Top"].clone().join(e[a+"Gusset"]).hide()},Wl={name:"lumira.shape",measurements:["waist","waistBack","hips","
1seat","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,s.Wx)("inseam"),menu:"style"},waistlowering:{pct:35,min:-10,max:60,...(0,s.Wx)("waistToHips"),menu:"style"},gussetwidth:{pct:16,min:5,max:30,...(0,s.Wx)("crossSeamFront"),menu:(t,e)=>!e?.cyclingchamois&&"style"},backgussetwidth:{pct:50,min:20,max:75,...(0,s.Wx)("hips"),menu:(t,e)=>!!e?.backgusset&&"fit"},frontgussetlength:{pct:12.5,min:0,max:30,...(0,s.Wx)("crossSeamFront"),menu:(t,e)=>!e?.frontbulge&&"style"},waistbandsize:{pct:90,min:0,max:150,...(0,s.Wx)("waistToHips"),menu:(t,e)=>!!e?.waistband&&"style"},waistreduction:{pct:4,min:0,max:10,...(0,s.Wx)("waist"),menu:(t,e)=>!!e?.waistband&&"style"}},draft:({measurements:t,store:e,Point:o,points:i,Path:a,paths:s,options:n,utils:r,log:l,part:c})=>{const p=!!n.cyclingchamois||n.backgusset,h=t.waistToHips*n.waistlowering,d=n.waistband?t.waist*n.waistreduction:0,f=n.waistband?t.waistToHips*(n.waistlowering+n.waistbandsize>(p?.9:1.5)?(p?.9:1.5)-n.waistlowering:n.waistbandsize):0,m=t.crossSeamFront*(n.cyclingchamois?.075:.5*n.gussetwidth),u=2.34*n.backgussetwidth,g=t.crossSeamFront*n.frontgussetlength,b=!!n.cyclingchamois||n.frontbulge,k=t.crossSeamFront*n.frontgussetlength;e.set("waistLowering",h),e.set("waistReduction",d),e.set("waistbandSize",f),e.set("gussetWidth",m),e.set("frontGussetLength",g),e.set("backGussetLength",k);const w=t.seatBack/t.seatFront,C=t.crossSeamBack/t.crossSeamFront,v=t.waistToFloor-t.inseam,T=1+n.ease,y=t.inseam*n.leglength;i.centerWaist=new o(0,0),i.centerFloor=new o(0,t.waistToFloor),i.centerAnkle=new o(0,t.waistToFloor-t.heel/Math.PI),i.centerKnee=new o(0,t.waistToKnee),i.centerUpperLeg=new o(0,t.waistToUpperLeg),i.centerInseam=new o(0,v),i.centerHips=new o(0,t.waistToHips),i.centerSeat=new o(0,t.waistToSeat),i.frontAnkle=i.centerAnkle.shift(0,t.ankle/2*T),i.backAnkle=i.centerAnkle.shift(180,t.ankle/2*T),i.frontKnee=i.centerKnee.shift(0,t.knee/2*T),i.backKnee=i.centerKnee.shift(180,t.knee/2*T),i.frontUpperLeg=i.centerUpperLeg.shift(0,t.upperLeg/2*T),i.backUpperLeg=i.centerUpperLeg.shift(180,t.upperLeg/2*T);const x=r.rad2deg(Math.asin(t.waistToUpperLeg*w*(C-1)/t.waistBack*.5*T)),B=r.rad2deg(Math.asin(t.waistToUpperLeg*w*(C-1)/t.waistFront*.5*T));if(i.backWaist=i.centerWaist.shift(180-x,.5*t.waistBack*T),i.frontWaist=i.centerWaist.shift(360-B,.5*t.waistFront*T),i.backHips=i.centerHips.shift(180-x,.25*t.hips*T),i.frontHips=i.centerHips.shift(360-B,.25*t.hips*T),i.backSeat=i.centerSeat.shift(180-x,.5*t.seatBack*T),i.frontSeat=i.centerSeat.shift(360-B,.5*t.seatFront*T),Pl(i,3.5,["frontWaist","frontSeat","frontUpperLeg"]),Pl(i,3.5,["backWaist","backSeat","backUpperLeg"]),i.frontUpperLegCp2=i.frontUpperLeg.shiftFractionTowards(i.centerUpperLeg,.5),i.frontUpperLegCp2Temp=i.frontUpperLeg.shiftFractionTowards(i.centerUpperLeg,.5),i.backUpperLegCp2=i.backUpperLeg.shiftFractionTowards(i.centerUpperLeg,.4),s.center=(new a).move(i.centerWaist).line(i.centerAnkle).hide(),s.front=(new a).move(i.frontWaist)._curve(i.frontUpperLegCp2,i.frontUpperLeg).hide(),s.back=(new a).move(i.backWaist)._curve(i.backUpperLegCp2,i.backUpperLeg).hide(),["center","front","back"].forEach((t=>{Rl(s,a,i,l,t,"Waist",h)})),i.frontHips=s.front.shiftAlong(t.waistToHips-h),i.backHips=s.back.shiftAlong(t.waistToHips-h),s.frontTop=s.front.split(i.frontHips)[0].hide(),s.backTop=s.back.split(i.backHips)[0].hide(),["center","front","back"].forEach((t=>{i[t+"Waistband"]=i[t+"Waist"].clone(),Rl(s,a,i,l,t,"Waistband",f)})),i.backWaistbandTemp=i.backWaistband,!p&&n.waistband&&Rl(s,a,i,l,"back","Waistband",.1*t.crossSeamBack),i.backWaistband,i.centerWaistbandCp=i.frontWaistband.shiftFractionTowards(i.centerWaistband,1.2),i.backWaistbandCp2=i.backWaistband.shiftFractionTowards(i.centerWaistbandCp,.7),i.frontWaistbandCp=s.frontTop.shiftAlong(Math.min(f/2,.95*s.frontTop.length())),i.frontWaist=i.frontWaist.shiftTowards(i.centerWaist,d/4),s.frontTop=(new a).move(i.frontWaist)._curve(i.frontWaistbandCp,i.frontWaistband).hide(),i.backWaistbandCp1=s.backTop.shiftAlong(Math.min(f/2,.95*s.backTop.length())),i.backWaist=i.backWaist.shiftTowards(i.centerWaist,d/4),s.backTop=(new a).move(i.backWaist)._curve(i.backWaistbandCp1,i.backWaistband).hide(),i.frontGusset=s.front.offset(m).intersects(Sl(a,(new a).move(i.frontUpperLeg).line(i.frontKnee)))[0],i.backGusset=s.back.offset(-1*m).intersects(Sl(a,(new a).move(i.backUpperLeg).line(i.backKnee)))[0],i.frontGussetJoin=s.front.reverse().shiftAlong(Math.min(g,s.front.length())),i.backGussetJoin=s.back.reverse().shiftAlong(Math.min(k,s.back.length())),b){s.front=Sl(a,s.front.offset(m)).hide();const t=(new a).move(i.frontWaistband).line(i.centerWaistband);i.frontWaistband=s.front.intersects(t)[0],!1===i.frontWaistband.sitsRoughlyOn(s.front.start())&&(s.frontTemp=Sl(a,s.front).hide(),i.frontWaistband=s.frontTemp.intersects(t)[0],s.front=s.frontTemp.split(i.frontWaistband)[1].hide(),s.front=s.front.split(i.frontWaistband)[1].hide());const e=(new a).move(i.frontUpperLeg).line(i.frontKnee);i.frontGusset=s.front.intersects(e)[0],0==i.frontGusset.sitsRoughlyOn(s.front.end())&&(s.front=s.front.split(i.frontGusset)[0].hide())}else Fl(i,s,a,e,"front",m,g);if(p){s.backTempGusset=s.back.offset(-1*m).hide();const n=s.back.shiftFractionAlong(.99),r=i.backHips.angle(n)+90;i.backUpperLegToHips=new o(i.backHips.x,i.backUpperLeg.y),i.backCircleMiddle=i.backHips.shiftFractionTowards(i.backUpperLegToHips,.5),i.backCircleHipsCp1=i.backHips.shift(r,.25*t.hips*.5*T*u),i.backCircleUpperLegCp1=i.backUpperLegToHips.shift(0,.25*t.upperLeg*T*u),s.backTempCircle=(new a).move(i.backHips).curve(i.backCircleHipsCp1,i.backCircleUpperLegCp1,i.backUpperLeg).hide(),i.backCircleGusset=s.backTempCircle.intersects(s.backTempGusset)[1];const l=s.backTempGusset.split(i.backCircleGusset);void 0!==l[1].ops?s.backGusset=l[1].hide():s.backGusset=s.backTempGusset.clone().hide(),s.backCircle=s.backTempCircle.split(i.backCircleGusset)[0].hide(),s.backGusset=s.backGusset.split(i.backGusset)[0].hide(),s.back=(new a).move(i.backWaistband).line(i.backHips).join(s.backCircle).join(s.backGusset).hide(),s.backTop=(new a).move(i.backWaistband).line(i.backHips).hide(),e.set("backGussetLength",s.backGusset.length()),e.set("backCircleLength",s.backCircle.length())}else Fl(i,s,a,e,"back",m,k);e.set("frontLength",s.front.length()),["front","back"].forEach((t=>{Pl(i,3.5,[t+"UpperLeg",t+"Knee",t+"Ankle"])})),s.frontLeg=(new a).move(i.frontGusset)._curve(i.frontKneeCp2,i.frontKnee).curve_(i.frontKneeCp1,i.frontAnkle).hide(),s.backLeg=(new a).move(i.backGusset)._curve(i.backKneeCp2,i.backKnee).curve_(i.backKneeCp1,i.backAnkle).hide(),i.centerBottom=i.centerInseam.shift(270,y),i.centerBottom.y>i.centerAnkle.y&&(i.centerBottom.y=i.centerAnkle.y);const S=(new a).move(i.centerBottom.shift(180,t.seat)).line(i.centerBottom.shift(0,t.seat)),L=Sl(a,s.frontLeg),P=Sl(a,s.backLeg);i.frontBottom=L.intersects(S)[0],i.backBottom=P.intersects(S)[0],i.backBottom.name="backBottom";const R=s.frontLeg.split(i.frontBottom);!1===i.frontBottom.sitsRoughlyOn(i.frontAnkle)&&void 0!==R[0].ops&&(s.frontLeg=R[0].hide());const F=s.backLeg.split(i.backBottom);
1return!1===i.backBottom.sitsRoughlyOn(i.backAnkle)&&void 0!==F[0].ops&&(s.backLeg=F[0].hide()),s.waist=(new a).move(i.frontWaistband).line(i.centerWaistband).curve(i.centerWaistbandCp,i.backWaistbandCp2,i.backWaistband).hide(),s.ankle=(new a).move(i.backAnkle).line(i.centerAnkle).line(i.frontAnkle).hide(),s.bottom=(new a).move(i.backBottom).line(i.frontBottom).hide(),e.set("waistLength",s.waist.length()),e.set("waistLengthFront",i.frontWaistband.dist(i.centerWaistband)),e.set("waistLengthBack",e.get("waistLength")-e.get("waistLengthFront")),c.hide()}},Hl={name:"lumira.leg",from:Wl,draft:({store:t,sa:e,points:o,Path:i,paths:a,Snippet:s,snippets:n,options:r,macro:l,part:c})=>{const p=!!r.cyclingchamois||r.backgusset;if(a.backAnnotated=a.backTop.clone().addClass("hidden").unhide(),r.frontbulge||r.cyclingchamois?n.front=new s("notch",a.front.shiftFractionAlong(.5)):(a.frontAnnotated=a.frontTop.clone().addClass("hidden").unhide().reverse(),l("banner",{path:a.frontAnnotated,text:"-",id:"front"})),l("banner",{path:a.backAnnotated,text:"+",id:"back"}),a.front=(new i).move(o.frontWaistband).join(a.front).join(a.frontLeg).hide(),a.back=(new i).move(o.backWaistband).join(a.back).join(a.backLeg).hide(),a.seam=(new i).move(o.backWaistband).join(a.back).join(a.bottom).join(a.front.reverse()).join(a.waist).close(),e&&(a.sa=a.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),n.logo=new s("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}),n.circle6=new s("notch",o.frontGusset),n.circle7=new s("notch",o.backGusset),p){n.circle1=new s("notch",a.backCircle.shiftFractionAlong(.25)),n.circle2=new s("notch",a.backCircle.shiftFractionAlong(.5)),n.circle3=new s("notch",a.backCircle.shiftFractionAlong(.75)),n.circle4=new s("notch",o.backHips),n.circle5=new s("notch",o.backCircleGusset);const t=a.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}},Al=(t,e,o,i,a)=>{const s=.5*t.get(a+"GussetAngle")*("front"==a?1:-1),n=t.get(a+"GussetLength");e[a+"Center"]=e.centerCenter.shift("front"==a?270:90,n),e[a+"CenterCp"]=e[a+"Center"].shift(("front"==a?90:270)-s,n/3),e[a+"OutsideCenterCp"]=e.outsideCenter.shift("front"==a?270:90,n/3),o[a]=(new i).move(e[a+"Center"]).curve(e[a+"CenterCp"],e[a+"OutsideCenterCp"],e.outsideCenter).hide()},Ol={name:"lumira.gusset",from:Wl,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,s.Wx)("crossSeamFront"),menu:(t,e)=>1==e?.frontbulge&&0==e?.cyclingchamois&&"style"}},draft:({measurements:t,store:e,sa:o,Point:i,points:a,Path:n,paths:r,Snippet:l,snippets:c,options:p,macro:h,utils:d,log:f,units:m,part:u})=>{const g=e.get("waistLowering"),b=e.get("waistbandSize"),k=e.get("gussetWidth"),w=e.get("backGussetLength"),C=e.get("frontGussetLength"),v=1+p.ease,T=!!p.cyclingchamois||p.frontbulge,y=!!p.cyclingchamois||p.backgusset;p.frontbulgesize>.9*p.gussetwidth&&(p.frontbulgesize=.9*p.gussetwidth,e.flag.note({msg:"lumira:bulgeToLarge",replace:{width:m(1),length:m(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(a.centerCenter=new i(0,0),a.outsideCenter=a.centerCenter.shift(0,k),y){const o=e.get("backCircleLength");a.outsideBackCircleStart=a.outsideCenter.shift(90,w),a.centerBackCircleEnd=a.outsideBackCircleStart.shift(90,t.crossSeamBack-t.waistToHips-g-w).shift(180,k),a.centerBackCircleStart=new i(0,a.outsideBackCircleStart.y),a.backInsertCenterSeat=a.centerBackCircleEnd.shift(270,t.waistToSeat-g),a.centerBackCircleEndC
1p1=a.centerBackCircleEnd.shift(p.backinserttopcpangle,.25*t.hips*v*p.backinserttopcp),a.outsideBackCircleStartCp1=a.outsideBackCircleStart.shift(B,.25*t.upperLeg*v*p.backinsertgussetcp);let s=0,h=0;do{a.centerBackCircleEndCp1=a.centerBackCircleEndCp1.shift(p.backinserttopcpangle,s*(p.backinserttopcp/p.backinsertgussetcp)),a.outsideBackCircleStartCp1=a.outsideBackCircleStartCp1.shift(B,s*(p.backinsertgussetcp/p.backinserttopcp)),r.backInsertCircle=(new n).move(a.centerBackCircleEnd).curve(a.centerBackCircleEndCp1,a.outsideBackCircleStartCp1,a.outsideBackCircleStart).hide(),s=o-r.backInsertCircle.length()}while(h++<50&&(s>1||s<-1));h>=50&&f.info("lumira:couldNotFitCircle");const d=(new n).move(a.centerBackCircleEnd).curve(a.centerBackCircleEndCp1,a.outsideBackCircleStartCp1,a.outsideBackCircleStart);r.back=(new n).move(a.centerBackCircleEnd).join(d).line(a.outsideCenter).hide(),a.title=d.shiftFractionAlong(.75).shiftFractionTowards(a.centerBackCircleEnd,.5),c.circle4=new l("notch",a.outsideBackCircleStart),c.circle3=new l("notch",d.shiftFractionAlong(.25)),c.circle2=new l("notch",d.shiftFractionAlong(.5)),c.circle1=new l("notch",d.shiftFractionAlong(.75)),c.circle0=new l("notch",a.centerBackCircleEnd),a.backCenter=a.centerBackCircleEnd.clone()}else Al(e,a,r,n,"back"),a.title=a.centerCenter.shiftFractionTowards(a.outsideCenter,.5);if(T){const o=t.crossSeamFront*p.frontbulgeforwardpercentage,i=e.get("frontLength");let h=d.rad2deg(Math.asin(.5*x/k))*(.6+p.gussetwidth);h>90&&(e.flag.note({msg:"lumira:bulgeToLarge",replace:{width:m(1),length:m(1)}}),h=90),a.frontOutsideSplit=a.outsideCenter.shift(270,o),a.frontCenterSplit=a.frontOutsideSplit.shift(180,k),a.frontOutside=a.frontOutsideSplit.shift(270+h,i);const u=.75*s.Qr;a.frontOutsideSplitCp1=a.frontOutsideSplit.shift(270,u*i);let v=0,T=0;do{a.frontOutside=a.frontOutside.shiftTowards(a.frontOutsideSplit,v),a.frontOutsideCp=a.frontOutside.shift(90+2*h,u*i),r.frontOutside=(new n).move(a.frontOutside).curve(a.frontOutsideCp,a.frontOutsideSplitCp1,a.frontOutsideSplit).hide(),v=r.frontOutside.length()-i}while(T++<100&&(v>1||v<-1));T>=100&&f.info("lumira:couldNotFitFrontOutside"),a.frontOutsideHips=r.frontOutside.shiftAlong(t.waistToHips-g-b);const y=a.frontOutside.angle(a.frontOutsideHips)-90;a.frontoutsideCenter=a.frontOutside.shift(180+y,k),a.frontCenterHips=a.frontOutsideHips.shift(180+y,k),a.outsideBackCircleStart=a.outsideCenter.shift(90,w);const B=C;a.centerCenterCp=a.centerCenter.shift(270,1*B),a.frontCenterSplitCp=a.frontCenterSplit.shift(270,1*B),a.frontCenterHipsCp=a.frontCenterHips.shift(y+90,.5*B),a.frontCenterMiddle=a.frontCenterHipsCp.shiftFractionTowards(a.frontCenterSplitCp,p.frontbulgemiddleshift),v=0,T=0;do{a.frontCenterMiddle=a.frontCenterMiddle.shift(y,v),a.frontCenterMiddleCp1=a.frontCenterMiddle.shift(90+.5*y,.2*B),a.frontCenterMiddleCp2=a.frontCenterMiddle.shift(270+.5*y,.5*B),a.frontCenterMiddle.x<0&&(a.frontCenterMiddle.x=0,a.frontCenterMiddleCp1.x=0,a.frontCenterMiddleCp2.x=0),a.frontCenterMiddleCp1.x<0&&(a.frontCenterMiddleCp1.x=0);v=(new n).move(a.frontoutsideCenter).line(a.frontCenterHips).curve(a.frontCenterHipsCp,a.frontCenterMiddleCp2,a.frontCenterMiddle).curve(a.frontCenterMiddleCp1,a.frontCenterSplitCp,a.frontCenterSplit).length()-(i+x)}while(T++<50&&(v>1||v<-1));T>=50&&f.info("lumira:couldNotFitFrontGussetPath"),r.frontBulge=(new n).move(a.frontCenterSplit).curve(a.frontCenterSplitCp,a.frontCenterMiddleCp1,a.frontCenterMiddle).curve(a.frontCenterMiddleCp2,a.frontCenterHipsCp,a.frontCenterHips).hide(),r.front=(new n).move(a.frontCenterSplit).join(r.frontBulge).line(a.frontoutsideCenter).join(r.frontOutside).line(a.outsideCenter).hide(),a.frontCenter=a.frontCenterSplit.clone(),c.frontCenter=new l("notch",a.frontCenter)}else Al(e,a,r,n,"front");if(r.seamSA=(new n).move(a.frontCenter).join(r.front).join(r.back.reverse()).hide(),r.seam=(new n).move(a.backCenter).line(a.frontCenter).join(r.seamSA).close(),o){if(T){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=y?(new n).move(a.frontCenter).line(a.frontCenter.shift(270,o)).move(r.saOffset.start()).join(r.saOffset).line(a.centerBackCircleEnd.shift(90,o)).line(a.centerBackCircleEnd).attr("class","fabric sa"):(new n).move(a.frontCenter).line(a.frontCenter.shift(270,o)).move(r.saOffset.start()).join(r.saOffset).line(a.backCenter.shift(90,o)).line(a.backCenter).attr("class","fabric sa")}
1if(h("title",{at:a.title,nr:2,title:"lumira:gusset",align:"center",scale:y?1:.25}),c.middle=new l("notch",a.outsideCenter),e.cutlist.addCut({cut:1,from:"fabric",onFold:!0}),h("cutonfold",y?{from:a.centerBackCircleEnd,to:a.centerCenter}:{from:a.backCenter,to:a.frontCenter}),h("vd",{id:"insertBottom",from:a.outsideCenter,to:a.frontCenter,x:a.outsideCenter.x+o+15}),h("hd",{id:"insertBottom",from:a.frontCenter,to:a.outsideCenter,y:a.frontCenter.y+o+15}),y){h("vd",{id:"insertOutsideGusset",from:a.outsideBackCircleStart,to:a.frontCenter,x:a.outsideCenter.x+o+25});const t=r.seam.edge("right");h("vd",{id:"rightGusset",from:t,to:a.frontCenter,x:t.x+o+15}),h("vd",{id:"rightGusset",from:t,to:a.frontCenter,x:t.x+o+15}),h("vd",{id:"top",from:a.centerBackCircleEnd,to:a.frontCenter,x:t.x+o+25}),h("hd",{id:"right",from:a.frontCenter,to:t,y:a.frontCenter.y+o+25})}else h("vd",{id:"insertTop",from:a.outsideCenter,to:a.backCenter,x:a.outsideCenter.x+o+15});return T&&(h("vd",{id:"bulgeLength",from:a.frontCenter,to:a.frontoutsideCenter,x:a.frontOutside.x+o+25}),h("hd",{id:"bulgeWidth",from:a.frontCenter,to:a.frontOutside,y:a.frontOutside.y+o+25}),h("ld",{id:"width",from:a.frontoutsideCenter,to:a.frontOutside,d:15})),u}},Dl={name:"lumira.waistband",from:Wl,draft:({store:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,options:l,measurements:c,macro:p,log:h,part:d})=>{if(!1===l.waistband)return d.hide();const f=!!l.cyclingchamois||l.backgusset,m=t.get("waistLength"),u=t.get("waistbandSize"),g=l.frontbulge||l.cyclingchamois?t.get("gussetWidth"):0,b=i.backWaist.dist(i.frontWaist),k=m+g,w=.35;i.topFront=new o(Math.min(b,k)/2,0),i.topBack=new o(Math.min(b,k)/2*-1,0);let C=i.frontWaist.angle(i.backWaist)-i.backWaistband.angle(i.backWaist)-90+(90-(i.frontWaist.angle(i.backWaist)-s.frontTop.end().angle(i.frontWaist)))/2,v=0,T=0;do{i.topFront=i.topFront.shift(180,T/2.5),i.topBack=i.topBack.shift(0,T/1.5),i.topFrontCp=i.topFront.shift(180+C,i.topBack.dist(i.topFront)*w),i.topBackCp=i.topBack.shift(0-C,i.topBack.dist(i.topFront)*w),s.top=(new a).move(i.topFront).curve(i.topFrontCp,i.topBackCp,i.topBack),T=s.top.length()-b}
1while(v++<100&&(T<-1||T>1));v>=100&&h.info("lumira:couldNotCreateWaistCircle"),i.bottomFront=i.topFront.shift(270+C,u),i.bottomBack=i.topBack.shift(270-C,u),v=0,T=0;do{i.bottomFront=i.bottomFront.shift(180,T/2.5),i.bottomBack=i.bottomBack.shift(0,T/1.5),i.bottomFrontCp=i.bottomFront.shift(180+C,i.bottomBack.dist(i.bottomFront)*w),i.bottomBackCp=i.bottomBack.shift(0-C,i.bottomBack.dist(i.bottomFront)*w),s.bottom=(new a).move(i.bottomFront).curve(i.bottomFrontCp,i.bottomBackCp,i.bottomBack).hide(),T=s.bottom.length()-k}while(v++<100&&(T<-1||T>1));v>=100&&h.info("lumira:couldNotCreateWaistCircle"),i.bottomCenter=s.bottom.shiftAlong(t.get("waistLengthFront")),i.bottomCenterCp=s.bottom.shiftAlong(1.1*t.get("waistLengthFront")),s.bottomFront=s.bottom.split(i.bottomCenter)[0],i.bottomBackTT=i.topBack.shift(270-C,u+(f?0:.1*c.crossSeamBack)),i.bottomBack=i.topBack.shift(270-C,u+(f?0:.1*c.crossSeamBack)),v=0,T=0;do{i.bottomBack=i.bottomBack.shift(0,T),i.bottomBackCp=i.bottomBack.shiftFractionTowards(i.bottomCenterCp,.7),s.bottomBack=(new a).move(i.bottomCenter).curve(i.bottomCenterCp,i.bottomBackCp,i.bottomBack),T=s.bottomFront.length()+s.bottomBack.length()-k}while(v++<100&&(T<-1||T>1));if(v>=100&&h.info("lumira:couldNotCreateWaistBack"),s.seamSA=(new a).move(i.topFront).join(s.top).line(i.bottomBack).join(s.bottomBack.reverse()).join(s.bottomFront.reverse()).hide(),s.seam=(new a).move(i.topFront).join(s.seamSA).line(i.topFront).close().attr("class","fabric"),e){const t=s.seamSA.offset(e);s.sa=(new a).move(i.topFront).line(t.start()).join(t).line(i.bottomFront).attr("class","fabric sa")}i.title=i.bottomFront.shiftFractionTowards(i.topBack,.5),p("title",{at:i.title,nr:3,title:"waistband",align:"center",scale:.3}),p("cutonfold",{from:i.bottomFront,to:i.topFront}),t.cutlist.addCut({cut:2,from:"fabric",onFold:!0}),g>0&&(r.gusset=new n("notch",s.bottom.shiftAlong(g)));let y=s.top.edge("top");y.y==i.topFront.y&&(y=s.top.edge("bottom"));let x=s.bottom.edge("bottom");return x.y==i.bottomFront.y&&(x=s.bottom.edge("top")),p("hd",{id:"top",from:i.topBack,to:i.topFront,y:Math.min(i.topFront.y,y.y)-e-15}),p("hd",{id:"bottom",from:i.bottomBack,to:i.bottomFront,y:Math.max(i.bottomFront.y,x.y)+e+15}),p("vd",{id:"top",from:i.bottomBack,to:y,x:y.x-15}),p("vd",{id:"bottom",from:i.topFront,to:x,x:y.x+15}),p("ld",{id:"back",from:i.topBack,to:i.bottomBack,d:15}),d}},El=new s.pT({data:Bl,parts:[Wl,Ol,Hl,Dl]}),Il=(t,e,o,i,a)=>{let s;for(t[i]=(new e).move(o[a[0]])._curve(o[a[1]+"Cp2"],o[a[1]]),s=2;s<a.length-1;s++)t[i].curve(o[a[s-1]+"Cp1"],o[a[s]+"Cp2"],o[a[s]]);return t[i].curve_(o[a[s-1]+"Cp1"],o[a[s]]),t[i]},Nl=(t,e,o,i,a,s,n)=>{const r=Sl(e,t[s],100,0),l=r.shiftAlong(a+100);if(l.sitsRoughlyOn(o[s+n]))return;o[s+n]=l;const c=r.split(o[s+n]);2!=c.length&&i.info("lumina:couldNotLowerWaist"),t[s]=c[1].hide()},Ml=(t,e,o,i,a,s,n)=>{const r=i.middleCrossSeam.shiftFractionTowards(i.middleKnee,t.crotchToKnee),l=90+(n?t.crossSeamAngle*(e.waistBack/e.waist):-1*t.crossSeamAngle*(1-e.waistBack/e.waist)),c=n?e.crossSeamFront:e.crossSeam-e.crossSeamFront;let p=r.shift(l,e.waistToKnee);const h=i.middleCrossSeam.shiftFractionTowards(a.beamIntersectsY(r,p,i.middleCrossSeam.y),t.crotchPointsCP);let d=p.shiftFractionTowards(i.middleKnee,t.waistToKneeCP);const f=.75*e.waistToKnee;let m=0,u=0,g=999,b={};do{p=r.shift(l,f+1.03*m),d=p.shiftFractionTowards(i.middleKnee,t.waistToKneeCP);m=c-(new o).move(i.middleCrossSeam).curve(h,d,p).length(),Math.abs(m)<g&&(b={waist:p.copy(),waistCp:d.copy()},g=Math.abs(m))}while(++u<100&&(m>1||m<-1));u>=100&&(g>5?s.error("lumina:cantFitTheWaistPoint"):(p=b.waist,d=b.waistCp)),n?(i.frontWaist=p.clone(),i.frontWaistband=p.clone(),i.frontWaistCp=d.clone(),i.frontCrossSeamCp=h.clone()):(i.backWaist=p.clone(),i.backWaistband=p.clone(),i.backWaistCp=d.clone(),i.backCrossSeamCp=h.clone())},_l=({measurements:t,points:e,utils:o,prefix:i,postfix:a,names:s,ratio:n,ratioFixed:r,ease:l,waistReduction:c,distanceCompensation:p,fixedSidePanel:h})=>{let d,f=0;for(let m=0;m<s.length;m++){let u=0,g=0;"Waist"!=s[m]&&(u=t["waistTo"+s[m]]),"Waist"!=s[f]&&(g=t["waistTo"+s[f]]);let b,k=g-u;switch(s[m]){case"UpperLeg":{d=t.upperLeg;const a=o.beamIntersectsCurve(e[i+s[m]],e[i+s[m]].shift("front"==i?180:0,100*r),e.middleCrossSeam,e[i+"CrossSeamCp"],e[i+"WaistCp"],e[i+"Waist"]);!1!==a&&(a.constructor===Array?d+=a[0].dist(e[i+s[m]]):d+=a.dist(e[i+s[m]]));break}case"Waist":d=("front"==i?t.waist-t.waistBack:t.waistBack)-.5*c;break;case"Seat":d="front"==i?t.seat-t.seatBack:t.seatBack,k*=p;break;default:d=t[s[m].toLowerCase()],l>1&&("Ankle"==s[m]||"Knee"==s[m])&&(d*=1.2)}d/=2,d*=l;const w=d*n,C=0==n?d:h>0&&w<d-h?d-h:w;if(0==m)e[i+a+s[m]]=e[i+s[m]].shift("front"==i?180:0,C);else{let t=0;do{b=o.circlesIntersect(e[i+s[m]],C*(1+.02*t),e[i+a+s[f]],k),!1!==b&&(e[i+a+s[m]]=b["front"==i?0:1])}while(t++<100&&(0==b||isNaN(b["front"==i?0:1].x)));t>=100?e[i+a+s[m]]=e[i+a+s[f]].clone():f=m}}},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,s.Wx)("waistToHips"),menu:(t,e)=>!!e?.waistband&&"style"},waistlowering:{pct:35,min:-10,max:60,...(0,s.Wx)("waistToHips"),menu:"style"},waistreduction:{pct:4,min:0,max:10,...(0,s.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:i,points:a,paths:s,utils:n,store:r,units:l,log:c,part:p})=>{const h=t.inseam>t.waistToFloor-t.waistToUpperLeg?t.waistToFloor-t.waistToUpperLeg:t.inseam,d=t.waistToFloor-h,f=t.waistToHips*e.waistlowering,m=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,k=t.waistToFloor-t.heel/Math.PI;r.set("waistbandSize",u),r.set("waistLowering",f),t.waistToAnkle=t.waistToFloor-t.heel/Math.PI;const w=(t.waist-t.waistBack)*b/2*g,C=(t.waist-t.waistBack-m)*b/2*e.sidepanel;a.middleWaist=new o(0,0),a.middleHips=a.middleWaist.shift(270,t.waistToHips),a.middleSeat=a.middleWaist.shift(270,t.waistToSeat),a.frontCrossSeam=a.backCrossSeam=a.middleCrossSeam=a.middleWaist.shift(270,d),a.frontUpperLeg=a.backUpperLeg=a.middleUpperLeg=a.middleWaist.shift(270,t.waistToUpperLeg),a.frontKnee=a.backKnee=a.middleKnee=a.middleWaist.shift(270,t.waistToKnee),a.frontAnkle=a.backAnkle=a.middleAnkle=a.middleWaist.shift(270,k),a.frontFloor=a.backFloor=a.middleFloor=a.middleWaist.shift(270,t.waistToFloor),Ml(e,t,i,a,n,c,!0),Ml(e,t,i,a,n,c,!1);const v=(new i).move(a.frontWaist).curve(a.frontWaistCp,a.frontCrossSeamCp,a.middleCrossSeam),T=(new i).move(a.backWaist).curve(a.backWaistCp,a.backCrossSeamCp,a.middleCrossSeam);a.frontSeat=v.shiftAlong(t.waistToSeat*(t.crossSeamFront/t.waistToUpperLeg)*.8),a.frontHips=v.shiftAlong(t.waistToHips*(t.crossSeamFront/t.waistToUpperLeg)),a.backSeat=T.shiftAlong(t.waistToSeat*(t.waistToSeat/t.waistToUpperLeg)),a.backHips=T.shiftAlong(t.waistToHips*(t.waistToSeat/t.waistToUpperLeg)),["front","back"].forEach((e=>{_l({measurements:t,points:a,utils:n,prefix:e,postfix:"Side",names:["Ankle","Knee","UpperLeg","Seat","Waist"],ratio:0,ratioFixed:.1,ease:b,waistReduction:m,distanceCompensation:1,fixedSidePanel:0}),a[e+"SideWaistband"]=a[e+"SideWaist"].clone()})),a.middleWaistband=a.middleWaist.clone(),["front","back"].forEach((o=>{_l({measurements:t,points:a,utils:n,prefix:o,postfix:"Split",names:["Ankle","Knee","UpperLeg","Seat","Waist"],ratio:g,ratioFixed:w,ease:b,waistReduction:m,distanceCompensation:(a.frontAnkle.dist(a.frontCrossSeam)+v.length())/(t.waistToFloor-t.heel/Math.PI),fixedSidePanel:e.fixedsidepanel?C:0}),a[o+"SplitWaistband"]=a[o+"SplitWaist"].clone()})),a.backHipsCp1=a.backWaistCp.clone(),a.backWaistCp=a.backWaist.shift(a.backWaist.angle(a.backSplitWaist)-90,a.backWaist.dist(a.backHips)/3),a.backHipsCp2=a.backSeat.shiftOutwards(a.backHips,a.backWaist.dist(a.backHips)/4),a.frontHipsCp1=a.frontWaistCp.clone(),a.frontWaistCp=a.frontWaist.shift(a.frontWaist.angle(a.frontSplitWaist)+90,a.frontWaist.dist(a.frontHips)/3),a.frontHipsCp2=a.frontSeat.shiftOutwards(a.frontHips,a.frontWaist.dist(a.frontHips)/4),s.front=(new i).move(a.frontWaist).curve(a.frontWaistCp,a.frontHipsCp2,a.frontHips).curve(a.frontHipsCp1,a.frontCrossSeamCp,a.middleCrossSeam),s.back=(new i).move(a.backWaist).curve(a.backWaistCp,a.backHipsCp2,a.backHips).curve(a.backHipsCp1,a.backCrossSeamCp,a.middleCrossSeam),["front","back"].forEach((t=>{["Side","Split"].forEach((o=>{((t,e,o,i,a)=>{let s;for(let n=0;n<i.length-2;n++)if(s=!1,s="front"==e?t[e+o+i[n]].angle(t[e+o+i[n+1]])>t[e+o+i[n]].angle(t[e+o+i[n+2]]):t[e+o+i[n]].angle(t[e+o+i[n+1]])<t[e+o+i[n]].angle(t[e+o+i[n+2]]),s){const s=t[e+o+i[n]].angle(t[e+o+i[n+2]])-t[e+o+i[n]].angle(t[e+o+i[n+1]]);t[e+o+i[n+1]]=t[e+o+i[n]].shift(t[e+o+i[n]].angle(t[e+o+i[n+1]])+a*s,t[e+o+i[n]].dist(t[e+o+i[n+1]]))}})(a,t,o,["Ankle","Knee","UpperLeg","Seat","Waist"],e.smoothing)}))})),s.middle=(new i).move(a.middleWaist).line(a.middleFloor).setHidden(),["front","back"].forEach((t=>{["Side","Split"].forEach((e=>{Pl(a,3,[t+e+"Waist",t+e+"Seat",t+e+"UpperLeg",t+e+"Knee",t+e+"Ankle"])}))})),["front","back"].forEach((t=>{["Side","Split"].forEach((e=>{Il(s,i,a,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=>{a[t+"Panel"+e]=a["middle"+e].shift("front"==t?0:180,a[t+"Side"+e].dist(a[t+"Split"+e]))}))})),["front","back"].forEach((t=>{Pl(a,3,[t+"PanelWaist",t+"PanelSeat",t+"PanelUpperLeg",t+"PanelKnee",t+"PanelAnkle"])})),["front","back"].forEach((t=>{Il(s,i,a,t+"Panel",[t+"PanelWaist",t+"PanelSeat",t+"PanelUpperLeg",t+"PanelKnee",t+"PanelAnkle"])}));const y=s.frontSplit.length();for(;Math.abs(y-s.frontPanel.length())>1;)["front","back"].forEach((t=>{const e=s[t+"Split"].length()/s[t+"Panel"].length(),o=["Waist","Seat","UpperLeg","Knee","Ankle"];for(let i=0;i<o.length-1;i++)a[t+"Panel"+o[i]]=a[t+"Panel"+o[i+1]].shiftFractionTowards(a[t+"Panel"+o[i]],e)})),["front","back"].forEach((t=>{Pl(a,3,[t+"PanelWaist",t+"PanelSeat",t+"PanelUpperLeg",t+"PanelKnee",t+"PanelAnkle"])})),["front","back"].forEach((t=>{Il(s,i,a,t+"Panel",[t+"PanelWaist",t+"PanelSeat",t+"PanelUpperLeg",t+"PanelKnee",t+"PanelAnkle"])}));if(e.length<1){const o=(1-e.length)*(h-(t.waistToFloor-k));["front","back"].forEach((t=>{["Side","Split","Panel"].forEach((e=>{a[t+e+"Hem"]=s[t+e].reverse().shiftAlong(o),s[t+e]=s[t+e].split(a[t+e+"Hem"])[0]}))}))}else["front","back"].forEach((t=>{["Side","Split","Panel"].forEach((e=>{a[t+e+"Hem"]=a[t+e+"Ankle"]}))}));return Nl(s,i,a,c,f,"middle","Waist"),["front","back"].forEach((t=>{["Side","Split","Panel"].forEach((e=>{Nl(s,i,a,c,f,t+e,"Waist")})),Nl(s,i,a,c,f,t,"Waist")})),["front","back"].forEach((t=>{["Side","Split","Panel"].forEach((e=>{Nl(s,i,a,c,u,t+e,"Waistband")})),Nl(s,i,a,c,u,t,"Waistband")})),r.set("waistLength",a.backWaist.dist(a.backSideWaist)+a.frontWaist.dist(a.frontSideWaist)),["front","back"].forEach((t=>{const e=a[t+"Waistband"].dist(a[t+"SplitWaistband"]),o="front"==t?90:-90;let n=s[t].shiftAlong(1).angle(a[t+"Waistband"]);a[t+"WaistbandCp"]=a[t+"Waistband"].shift(n+o,.35*e),n=s[t+"Split"].shiftAlong(1).angle(a[t+"SplitWaistband"]),a[t+"SplitWaistbandCp"]=a[t+"SplitWaistband"].shift(n+-1*o,.35*e),s[t+"Waistband"]=(new i).move(a[t+"Waistband"]).curve(a[t+"WaistbandCp"],a[t+"SplitWaistbandCp"],a[t+"SplitWaistband"]).hide()})),r.set("waistbandLength",s.backWaistband.length()+s.frontWaistband.length()+a.frontPanelWaistband.dist(a.backPanelWaistband)),e.waistband&&e.lowerwaistbandback&&(Nl(s,i,a,c,.5*(f+u),"back","Waistband"),s.backWaistband=(new i).move(a.backWaistband)._curve(a.backSplitWaistbandCp,a.backSplitWaistband).hide()),r.set("waistbandBackLength",s.backWaistband.length()),r.set("waistbandFrontLength",s.frontWaistband.length()),r.set("waistbandPanelLength",a.frontPanelWaistband.dist(a.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")+a.frontPanelWaistband.dist(a.frontPanelHem))}}),p.hide()}},Gl={name:"lumina.panel",from:jl,draft:({sa:t,Point:e,points:o,Path:i,paths:a,Snippet:s,snippets:n,macro:r,store:l,part:c})=>{a.panelWaistband=(new i).move(o.frontPanelWaistband).line(o.backPanelWaistband).setText("top","note center").setClass("hidden"),a.panelHem=(new i).move(o.backPanelHem).line(o.frontPanelHem).setText("bottom","note center").setClass("hidden"),a.frontPanel.reverse().setText("front","note center").setClass("hidden"),a.backPanel=a.backPanel.unhide().setText("back","note center").setClass("hidden"),a.seam=(new i).move(o.backPanelHem).join(a.backPanel.reverse()).join(a.panelWaistband.reverse()).join(a.frontPanel).join(a.panelHem.reverse()).reverse().close().addClass("fabric"),t&&(a.sa=a.seam.offset(t).attr("class","fabric sa")),n.front1=new s("notch",a.frontPanel.shiftFractionAlong(.2)),n.front2=new s("notch",a.frontPanel.shiftFractionAlong(.4)),n.front3=new s("notch",a.frontPanel.shiftFractionAlong(.6)),n.front4=new s("notch",a.frontPanel.shiftFractionAlong(.8)),n.back1=new s("notch",a.backPanel.shiftFractionAlong(.25)),n.back2=new s("notch",a.backPanel.shiftFractionAlong(.5)),n.back3=new s("notch",a.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,t
1itle:"panel",align:"center"});const p=o.frontPanelWaistband.shiftFractionTowards(o.backPanelWaistband,.5),h=new e(p.x,o.frontPanelHem.y),d=a.backPanel.edge("left"),f=a.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:h,to:f,y:h.y+t+25}),r("hd",{id:"middleBack",from:d,to:h,y:h.y+t+25}),r("hd",{id:"bottomFront",from:h,to:o.frontPanelHem,y:h.y+t+15}),r("hd",{id:"bottomBack",from:o.backPanelHem,to:h,y:h.y+t+15}),r("vd",{id:"front",from:o.frontPanelWaistband,to:o.frontPanelHem,x:f.x+t+15}),r("vd",{id:"back",from:o.backPanelWaistband,to:o.backPanelHem,x:d.x-t-15}),c}},Yl={name:"lumina.leg",from:jl,draft:({sa:t,points:e,Path:o,paths:i,Snippet:a,snippets:s,macro:n,store:r,complete:l,part:c})=>{i.front=i.front.reverse().unhide().addText("front","note center").setClass("hidden"),i.frontSplit.unhide().addText("front","note center").setClass("hidden"),i.back.unhide().addText("back","note center").setClass("hidden"),i.backSplit=i.backSplit.reverse().unhide().addText("back","note center").setClass("hidden"),i.seam=(new o).move(e.frontSplitHem).join(i.backSplit).join(i.backWaistband.reverse()).join(i.back).join(i.front).join(i.frontWaistband).join(i.frontSplit).close().addClass("fabric"),t&&(i.sa=i.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),s.logo=new a("logo",e.logo),e.title=e.middleUpperLeg.shiftFractionTowards(e.backSplitUpperLeg,.6),n("title",{at:e.title,nr:1,title:"leg",align:"center"}),e.scalebox=e.middleUpperLeg.shift(270,50),n("scalebox",{at:e.scalebox}),s.middle=new a("notch",e.frontUpperLeg),s.front0=new a("notch",i.front.shiftFractionAlong(.5)),s.front1=new a("notch",i.frontSplit.shiftFractionAlong(.2)),s.front2=new a("notch",i.frontSplit.shiftFractionAlong(.4)),s.front3=new a("notch",i.frontSplit.shiftFractionAlong(.6)),s.front4=new a("notch",i.frontSplit.shiftFractionAlong(.8)),s.back0=new a("notch",i.back.shiftFractionAlong(.5)),s.back1=new a("notch",i.backSplit.shiftFractionAlong(.25)),s.back2=new a("notch",i.backSplit.shiftFractionAlong(.5)),s.back3=new a("notch",i.backSplit.shiftFractionAlong(.75)),l&&(i.frontWaistband=i.frontWaistband.unhide().addText("waistband","note center"),i.backWaistband=i.backWaistband.unhide().reverse().addText("waistband","note center"));const p=e.frontSplitHem.shiftFractionTowards(e.backSplitHem,.5);p.x=0;const h=i.seam.edge("top");h.x=0;const d=i.seam.edge("right"),f=i.seam.edge("left");return e.frontSplitWaistband.sitsRoughlyOn(f)||n("hd",{id:"middleToFront",from:f,to:e.middleUpperLeg,y:h.y-t-35}),e.backSplitWaistband.sitsRoughlyOn(d)||n("hd",{id:"middleToBack",from:e.middleUpperLeg,to:d,y:h.y-t-35}),n("hd",{id:"middleToFrontSplitWaistband",from:e.frontSplitWaistband,to:e.middleUpperLeg,y:h.y-t-25}),n("hd",{id:"middleToBackSplitWaistband",from:e.middleUpperLeg,to:e.backSplitWaistband,y:h.y-t-25}),n("hd",{id:"middleToFrontWaistband",from:e.frontWaistband,to:e.middleUpperLeg,y:h.y-t-15}),n("hd",{id:"middleToBackWaistband",from:e.middleUpperLeg,to:e.backWaistband,y:h.y-t-15}),n("hd",{id:"bottomFront",from:e.frontSplitHem,to:p,y:p.y+t+15}),n("hd",{id:"bottomBack",from:p,to:e.backSplitHem,y:p.y+t+15}),n("vd",{id:"middle",from:e.middleUpperLeg,to:p,x:0}),n("vd",{id:"front",from:e.frontWaistband,to:e.middleUpperLeg,x:-15}),n("vd",{id:"back",from:e.backWaistband,to:e.middleUpperLeg,x:15}),n("vd",{id:"frontSplit",from:e.frontSplitWaistband,to:e.frontSplitHem,x:f.x-t-15}),n("vd",{id:"backSplit",from:e.backSplitWaistband,to:e.backSplitHem,x:d.x+t+15}),c}},Ul={name:"lumina.pocket",after:Gl,from:jl,options:{pocket:{bool:!0,menu:"style"},pocketdepth:{pct:90,min:20,max:120,...(0,s.Wx)("waistToSeat"),menu:(t,e)=>!!e?.pocket&&"style"}},draft:({measurements:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,options:l,macro:c,store:p,log:h,part:d})=>{if(!l.pocket)return d.hide();const f=t.waistToSeat*l.pocketdepth;s.pocketWaistband=(new a).move(i.frontPanelWaistband).line(i.backPanelWaistband).addText("top","note center").setClass("hidden"),i.frontPocketHem=s.frontPanel.shiftAlong(f),i.backPocketHem=s.backPanel.shiftAlong(f),s.pocketHem=(new a).move(i.backPocketHem).line(i.frontPocketHem).addText("bottom","note center").setClass("hidden");const m=s.frontPanel.split(i.frontPocketHem);if(!m)return h.info("lumina:couldNotCreatePocket"),d.hide();s.frontPocket=m[0].reverse().unhide().addText("front","note center").setClass("hidden");const u=s.backPanel.split(i.backPocketHem);if(!u)return h.info("lumina:couldNotCreatePocket"),d.hide();s.backPocket=u[0].unhide().addText("back","note center").setClass("hidden"),s.seam=(new a).move(i.frontPocketHem).join(s.pocketHem.reverse()).join(s.backPocket.reverse()).join(s.pocketWaistband.reverse()).join(s.frontPocket.reverse()).close().reverse().addClass("fabric"),e&&(s.sa=s.seam.offset(e).attr("class","fabric sa"));for(var g=1;g<4;g++)s.frontPanel.length()*(.2*g)<f&&(r["front"+g]=new n("notch",s.frontPanel.shiftFractionAlong(.2*g))),s.backPanel.length()*(.25*g)<f&&(r["back"+g]=new n("notch",s.backPanel.shiftFractionAlong(.25*g)));p.cutlist.addCut({cut:2,from:"fabric"}),i.gridAnchor=i.middleSeat.clone(),i.title=i.frontPocketHem.shiftFractionTowards(i.backPanelWaistband,.5),c("title",{at:i.title,nr:4,title:"pocket",align:"center"});const b=i.frontPanelWaistband.shiftFractionTowards(i.backPanelWaistband,.5),k=new o(b.x,i.frontPocketHem.y),w=s.backPocket.edge("left"),C=s.frontPocket.edge("right");return c("hd",{id:"topFront",from:b,to:i.frontPanelWaistband,y:b.y-e-15}),c("hd",{id:"topBack",from:i.backPanelWaistband,to:b,y:b.y-e-15}),c("hd",{id:"bottomFront",from:k,to:C,y:k.y+e+15}),c("hd",{id:"bottomBack",from:w,to:k,y:k.y+e+15}),c("vd",{id:"front",from:i.frontPanelWaistband,to:i.frontPocketHem,x:i.frontPocketHem.x+e+15}),c("vd",{id:"back",from:i.backPanelWaistband,to:i.backPocketHem,x:i.backPocketHem.x-e-15}),d}},zl={name:"lumina.waistband",after:jl,draft:({store:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,options:l,macro:c,log:p,utils:h,part:d})=>{if(!1===l.waistband)return d.hide();const f=t.get("waistLength"),m=t.get("waistbandFrontLength"),u=t.get("waistbandPanelLength"),g=t.get("waistbandLength"),b=t.get("waistbandSize"),k=t.get("waistLowering");if(b<=0)return d.hide();i.origin=new o(0,0);const w=Math.asin(.5*Math.abs(g-f)/b),C=.5*f/Math.sin(w),v=f<g?270:90;let T=h.rad2deg(w);if(isNaN(T))return p.info("lumina:couldNoFitWaistband"),t.flag.note({msg:"lumina:couldNoFitWaistband"}),d.hide();let y,x,B=0,S=0;do{T+=.025*B,y=360/T,x=4/3*Math.tan(Math.PI/(2*y))*C,i.waistFront=i.origin.shift(v+T,C),i.waistBack=i.origin.shift(v-T,C),i.waistFrontCP=i.waistFront.shift(v-90+T,x),i.waistBackCP=i.waistBack.shift(v+90-T,x),s.waist=(new a).move(i.waistBack).curve(i.waistBackCP,i.waistFrontCP,i.waistFront),B=f-s.waist.length()}while(S++<100&&(B<-.5||B>.5));if(S>=100)return p.info("lumina:couldNoFitWaistband"),d.hide();i.waistbandFront=i.waistFront.shift(270+T,b),i.waistbandBack=i.waistBack.shift(270-T,b),x=4/3*Math.tan(Math.PI/(2*y))*(C+b*(f<g?1:-1)),i.waistbandFrontCP=i.waistbandFront.shift(v-90+T,x),i.waistbandBackCP=i.waistbandBack.shift(v+90-T,x),s.waistband=(new a).move(i.waistbandBack).curve(i.waistbandBackCP,i.waistbandFrontCP,i.waistbandFront),B=g-s.waistband.length();const L=s.waistband.reverse();i.snippetPanelBack=L.shiftAlong(m+u),r.panelBack=new n("notch",i.snippetPanelBack),i.snippetPanelFront=L.shiftAlong(m),r.panelFront=new n("notch",i.snippetPanelFront),l.lowerwaistbandback&&(s.waistband=L.split(i.snippetPanelBack)[0],i.waistbandBackPanel=i.snippetPanelBack.copy(),i.waistbandBackPanelCP=i.snippetPanelFront.shiftFractionTowards(i.waistbandBackPanel,1.4),i.waistbandBack=i.waistBack.shiftOutwards(i.waistbandBack,.5*(k+b)),s.waistband=(new a).move(i.waistbandBack)._curve(i.waistbandBackPanelCP,i.waistbandBackPanel).join(s.waistband.reverse())),i.anchor=i.waistFront,s.front=(new a).move(i.waistbandFront).line(i.waistFront).setText("front","note center").setClass("hidden"),s.back=(new a).move(i.waistBack).line(i.waistbandBack).setText("back","note center").setClass("hidden");let P=s.waist.edge("top");P.y==i.waistBack.y&&(P=s.waist.edge("bottom"));let R=s.waistband.shiftFractionAlong(.5);if(R.y==i.waistbandFront.y&&(R=s.waistband.edge("top")),c("cutonfold",{from:i.waistbandFront,to:i.waistFront}),t.cutlist.addCut({cut:2,from:"fabric",onFold:!0}),i.title=i.snippetPanelFront.shiftFractionTowards(i.snippetPanelBack,.5),i.title.y=P.y+20,c("title",{at:i.title,nr:3,title:"waistband",align:"center",scale:.35}),s.seamSA=(new a).move(i.waistFront).join(s.waist.reverse()).line(i.waistbandBack).join(s.waistband).hide(),s.seam=(new a).move(i.waistbandFront).line(i.waistFront).join(s.seamSA).addClass("fabric"),e){const t=s.seamSA.offset(e);s.sa=(new a).move(i.waistFront).line(t.start()).join(t).line(i.waistbandFront).attr("class","fabric sa")}return c("hd",{id:"top",from:i.waistBack,to:i.waistFront,y:Math.min(i.waistFront.y,P.y)-e-15}),c("hd",{id:"bottom",from:i.waistbandBack,to:i.waistbandFront,y:Math.max(i.waistbandFront.y,Math.max(R.y,i.waistbandBack.y))+e+15}),c("vd",{id:"top",from:i.waistBack,to:P,x:P.x-15,noStartMarker:!0,noEndMarker:!0}),c("vd",{id:"bottom",from:i.waistFront,to:R,x:P.x+15}),c("ld",{id:"front",from:i.waistFront,to:i.waistbandFront,d:15}),c("ld",{id:"back",from:i.waistBack,to:i.waistbandBack,d:-15}),d}},Jl=new s.pT({data:yl,parts:[jl,Gl,Yl,zl,Ul]}),$l=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}'),Xl={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 Ql={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:i,measurements:a,options:s,macro:n,snippets:r,Snippet:l,sa:c,store:p,utils:h,part:d}){return p.set("length",(a.hpsToWaistBack+("toBelowKnee"===s.length?1.3*a.waistToKnee:a[`waist${h.capitalize(s.length)}`]))*s.lengthRatio),p.set("width",(.6*a.shoulderToShoulder+1.8*a.shoulderToElbow)*s.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,a.hpsToWaistBack+a.waistToHips),e.middleLeft.y>e.bottomLeft.y&&(e.middleLeft.y=e.bottomLeft.y),e.topShoulder=e.top.shift(180,p.get("width")-1.2*a.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),i.fold=(new o).move(e.bottom).line(e.top).hide(),i.hem=(new o).move(e.topLeft).line(e.middleLeft).curve(e.bottomShoulderCp1,e.bottomShoulderCp2,e.bottomShoulder).line(e.bottom).hide(),i.saBase=(new o).move(e.top).line(e.topLeft).hide(),i.seam=i.saBase.join(i.hem).join(i.fold).attr("class","fabric"),c&&(i.sa=i.saBase.offset(c).join(i.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),n("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),n("title",{at:e.title,nr:1,title:"Lacerna",align:"center"}),e.scalebox=e.title.shift(90,e.bottom.dy(e.top)/5),n("scalebox",{at:e.scalebox}),n("hd",{id:"wFull",from:e.topLeft,to:e.top,y:e.top.y-c-15}),n("vd",{id:"hFull",from:e.bottom,to:e.top,x:e.top.x+15}),n("hd",{id:"wToNeck",from:e.topLeft,to:e.topShoulder,y:e.top.y-c-15}),n("hd",{id:"wNeck",from:e.topShoulder,to:e.top,y:e.top.y-c-15}),n("hd",{id:"wToRoundStart",from:e.bottomShoulder,to:e.bottom,y:e.bottom.y+c+15}),n("hd",{id:"wRound",from:e.bottomLeft,to:e.bottomShoulder,y:e.bottom.y+c+15}),n("vd",{id:"hFromRound",from:e.middleLeft,to:e.topLeft,x:e.topLeft.x-c-15}),["toHips","toUpperLeg"].includes(s.length)||n("ld",{id:"lRoundDiag",from:e.middleLeft,to:e.bottomShoulder,d:0}),n("vd",{id:"hRound",from:e.bottomLeft,to:e.middleLeft,x:e.bottomLeft.x-10}),d}},Kl=new s.pT({data:$l,parts:[Ql]}),Vl=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:i,points:a,paths:s,Snippet:n,snippets:r,sa:l,macro:c,utils:p,store:h,complete:d,part:f}){if(t>("squid"==e.type?1:0))return f.hide(),f;const m=.55191502449351,u=e.sizeConstant*e.size,g=e.sizeConstant*e.size*.5,b="squid"==e.type?10:8,k=2*u/b,w=k*e.neckWidth,C=u*e.armWidth*e.bottomTopArmRatio*Math.PI,v=C*e.bottomTopArmRatio;let T=2*u/Math.PI*e.armLength;"octopus"==e.type&&(T*=2),"squid"==e.type&&(T*=1.8,1==t&&(T*=1.2)),a.topLeft=new o(-1*u,-1*g),a.topRight=new o(u,-1*g),a.bottomLeft=new o(-1*u,g),a.bottomRight=new o(u,g),a.left
1=new o(-1*u,0),a.right=new o(u,0),a.sectionTop=new o(0,-1*g),a.sectionBottom=new o(0,g),a.sectionLeft=new o(-1*k/2,0);const y=a.sectionLeft.shiftFractionTowards(a.sectionTop,.5),x=y.angle(a.sectionTop),B=y.shift(x-90,1e3);a.circleCenter=p.beamIntersectsY(y,B,0);const S=a.circleCenter.dist(a.sectionTop);a.sectionLeftCp2=a.sectionLeft.shift(90,S*m),a.sectionLeftCp1=a.sectionLeft.shift(270,S*m),a.circleTop=a.circleCenter.shift(90,S),a.sectionTopCp1=a.circleTop.shift(180,S*m),a.circleBottom=a.circleCenter.shift(270,S),a.sectionBottomCp2=a.circleBottom.shift(180,S*m),s.circle=(new i).move(a.circleTop).curve(a.sectionTopCp1,a.sectionLeftCp2,a.sectionLeft).curve(a.sectionLeftCp1,a.sectionBottomCp2,a.circleBottom).unhide();let L=0,P=0,R=4;do{a.lowerLeft=a.bottomLeft.shift(90,g/R),a.lowerRight=a.bottomRight.clone(),a.sectionBottomLeft=p.curveIntersectsY(a.sectionLeft,a.sectionLeftCp1,a.sectionBottomCp2,a.circleBottom,a.lowerLeft.y);const t=2*(a.sectionTop.x-a.sectionBottomLeft.x);P=w-t,R*=t/w,L++}while((P<-1||P>1)&&L<100);s.circle=(new i).move(a.circleTop).curve(a.sectionTopCp1,a.sectionLeftCp2,a.sectionLeft).curve(a.sectionLeftCp1,a.sectionBottomCp2,a.circleBottom).hide(),a.sectionBottomLeft=p.curveIntersectsY(a.sectionLeft,a.sectionLeftCp1,a.sectionBottomCp2,a.circleBottom,a.lowerLeft.y);const F=s.circle.split(a.sectionTop)[1].split(a.sectionBottomLeft)[0];if(a.sectionTop=F.ops[0].to.clone(),a.sectionTopCp1=F.ops[1].cp1.clone(),a.sectionLeftCp2=F.ops[1].cp2.clone(),a.sectionLeft=F.ops[1].to.clone(),a.sectionLeftCp1=F.ops[2].cp1.clone(),a.sectionBottomLeftCp2=F.ops[2].cp2.clone(),a.sectionBottomLeft=F.ops[2].to.clone(),a.sectionBottomLeftCp1=a.sectionBottomLeft.shiftFractionTowards(a.sectionBottomLeftCp2,-.5),a.skirtTopMiddle=a.sectionBottomLeft.shift(0,w/2).shift(270,w/3),a.skirtBottomLeft2=a.skirtTopMiddle.shift(270-360/b/2,u*e.armWidth*e.bottomTopArmRatio/2/Math.sin(p.deg2rad(360/b/2))),a.skirtBottomLeft3=new o(a.sectionTop.x-v/2,a.skirtBottomLeft2.y),"octoplushy"==e.type&&(a.skirtBottomLeft3=a.skirtBottomLeft3.shift(270,(a.skirtTopMiddle.y-a.skirtBottomLeft3.y)/2)),a.skirtBottomLeft=a.skirtBottomLeft3.clone(),a.armTopLeft=p.beamIntersectsX(a.skirtBottomLeft,a.skirtBottomLeft.shift(300,100),a.sectionTop.x-v/2),a.armTopLeftCp2=a.armTopLeft.shift(90,a.skirtBottomLeft.dist(a.armTopLeft)/2),a.armTopLeftCp1=a.armTopLeft.shift(270,T/10),a.armBottom=a.armTopLeft.shift(270,T+v/4).shift(0,v/2),a.armBottomLeft=a.armBottom.shift(90,v/2*(1-e.armTaper)).shift(180,v/2*(1-e.armTaper)),a.armBottomLeftCp2=a.armBottomLeft.shift(90,T/10),a.armBottomLeftCp1=a.armBottomLeft.shift(270,v/2*(1-e.armTaper)*m),a.armBottomCp2=a.armBottom.shift(180,v/2*(1-e.armTaper)*m),"octopus"==e.type){const t=.7,e=a.sectionBottom.dist(a.sectionTop);a.sectionTop=a.sectionTop.shift(90,e*t),a.sectionTopCp1=a.sectionTopCp1.shift(90,e*t),a.sectionLeft=a.sectionLeft.shift(90,e*t/1.1),a.sectionLeftCp1=a.sectionLeftCp1.shift(90,e*t/1.1),a.sectionLeftCp2=a.sectionLeftCp2.shift(90,e*t/1.1);const o=(new i).move(a.skirtBottomLeft).curve(a.skirtBottomLeft,a.sectionBottomLeftCp1,a.sectionBottomLeft);a.skirtBottomLeft=a.skirtBottomLeft.shift(o.shiftAlong(.1).angle(a.skirtBottomLeft),C),a.armTopLeft=a.armTopLeft.shift(270,1.6*C),a.armTopLeftCp1=a.armTopLeft.shift(270,C/2),a.armTopLeftCp2=a.armTopLeft.shift(90,C/2)}if("squid"==e.type){a.skirtBottomLeft=a.armTopLeft.clone(),a.armTopLeftCp2=a.armTopLeft.clone();let e=a.sectionBottom.dist(a.sectionTop);if(a.sectionTop=a.sectionTop.shift(90,e),a.sectionTopCp1=a.sectionTopCp1.shift(90,e),a.sectionLeft=a.sectionLeft.shift(90,e/3),a.sectionLeftCp1=a.sectionLeftCp1.shift(90,e/3),a.sectionLeftCp2=a.sectionLeftCp2.shift(90,e/3),a.tentacleLeft=p.beamIntersectsX(a.armBottomLeft,a.armBottomLeft.shift(250,100),-1.2*v),a.tentacleLeftCp2=a.tentacleLeft.shift(90,a.armBottomLeft.dist(a.tentacleLeft)/3),a.tentacleLeftCp1=a.tentacleLeft.shift(270,a.armBottomLeft.dist(a.tentacleLeft)/3),1==t){a.armBottomLeftCp1=a.armBottomLeft.shift(270,v*m),a.armBottom=a.armBottom.flipY(a.tentacleLeft),a.armBottomCp2=a.armBottomCp2.flipY(a.tentacleLeft);const t=(new i).move(a.sectionLeft).curve(a.sectionLeftCp2,a.sectionTopCp1,a.sectionTop);a.finSection=t.shiftFractionAlong(.45);const e=t.split(a.finSection);a.sectionLeftCp2=e[0].ops[1].cp1.clone(),a.finSectionCp1=e[0].ops[1].cp2.clone(),a.finFold=a.finSection.rotate(-20,a.sectionTop),a.finSeam=a.finSection.rotate(-40,a.sectionTop);const o=a.sectionTop.angle(a.finFold),s=a.sectionTop.angle(e[1].ops[1].cp1)-o,n=a.sectionTop.angle(e[1].ops[1].cp2)-o;a.finSeamCp2=a.sectionTop.shift(o-s,a.sectionTop.dist(e[1].ops[1].cp1)),a.finTopCp1=a.sectionTop.shift(o-n,a.sectionTop.dist(e[1].ops[1].cp2))}a.sectionMidLeft=a.sectionBottomLeft.shift(90,e/3),a.sectionMidLeftCp2=a.sectionMidLeft.shift(a.sectionBottomLeft.angle(a.sectionBottomLeftCp2),a.sectionBottomLeft.dist(a.sectionBottomLeftCp2)),a.sectionMidLeftCp1=a.sectionMidLeftCp2.flipY(a.sectionMidLeft)}a.sectionTopCp2=a.sectionTopCp1.flipX(a.sectionTop),a.sectionRightCp1=a.sectionLeftCp2.flipX(a.sectionTop),a.sectionRight=a.sectionLeft.flipX(a.sectionTop),a.sectionRightCp2=a.sectionLeftCp1.flipX(a.sectionTop),a.sectionBottomRightCp1=a.sectionBottomLeftCp2.flipX(a.sectionTop),a.sectionBottomRight=a.sectionBottomLeft.flipX(a.sectionTop),a.sectionBottomRightCp2=a.sectionBottomLeftCp1.flipX(a.sectionTop),a.skirtBottomRight=a.skirtBottomLeft.flipX(a.sectionTop),a.armTopRightCp1=a.armTopLeftCp2.flipX(a.sectionTop),a.armTopRight=a.armTopLeft.flipX(a.sectionTop),a.armTopRightCp2=a.armTopLeftCp1.flipX(a.sectionTop),a.armBottomRightCp1=a.armBottomLeftCp2.flipX(a.sectionTop),a.armBottomRight=a.armBottomLeft.flipX(a.sectionTop),a.armBottomRightCp2=a.armBottomLeftCp1.flipX(a.sectionTop),a.armBottomCp1=a.armBottomCp2.flipX(a.sectionTop),"squid"==e.type&&(a.sectionMidRightCp1=a.sectionMidLeftCp2.flipX(a.sectionTop),a.sectionMidRight=a.sectionMidLeft.flipX(a.sectionTop),a.sectionMidRightCp2=a.sectionMidLeftCp1.flipX(a.sectionTop),a.tentacleRight=a.tentacleLeft.flipX(a.sectionTop),a.tentacleRightCp1=a.tentacleLeftCp2.flipX(a.sectionTop),a.tentacleRightCp2=a.tentacleLeftCp1.flipX(a.sectionTop)),0==t&&(h.set("sectionWidth",k),h.set("armSkirtWidth",a.skirtBottomLeft.dist(a.skirtBottomRight)),h.set("armSkirtRadius",a.skirtBottomLeft.y-a.skirtTopMiddle.y),h.set("armSkirtToTopAngle",a.skirtBottomLeft.angle(a.armTopLeft))),s.armBottom=(new i).move(a.armBottomLeft).curve(a.armBottomLeftCp1,a.armBottomCp2,a.armBottom).curve(a.armBottomCp1,a.armBottomRightCp2,a.armBottomRight).hide(),"squid"==e.type?(s.sectionLeft=(new i).move(a.sectionTop).curve(a.sectionTopCp1,a.sectionLeftCp2,a.sectionLeft).curve(a.sectionLeftCp1,a.sectionMidLeftCp2,a.sectionMidLeft).curve(a.sectionMidLeftCp1,a.sectionBottomLeftCp2,a.sectionBottomLeft).hide(),s.sectionRight=(new i).move(a.sectionBottomRight).curve(a.sectionBottomRightCp1,a.sectionMidRightCp2,a.sectionMidRight).curve(a.sectionMidRightCp1,a.sectionRightCp2,a.sectionRight).hide(),s.skirtLeft=(new i).move(a.sectionBottomLeft).curve(a.sectionBottomLeftCp1,a.armTopLeftCp2,a.armTopLeft).hide(),s.skirtRight=(new i).move(a.armTopRight).curve(a.armTopRightCp1,a.sectionBottomRightCp2,a.sectionBottomRight).hide(),1==t&&(s.sectionLeft=(new i).move(a.sectionTop).curve(a.finTopCp1,a.finSeamCp2,a.finSeam).line(a.finFold).line(a.finSection).curve(a.finSectionCp1,a.sectionLeftCp2,a.sectionLeft).curve(a.sectionLeftCp1,a.sectionMidLeftCp2,a.sectionMidLeft).curve(a.sectionMidLeftCp1,a.sectionBottomLeftCp2,a.sectionBottomLeft).hide(),s.armBottom=(new i).move(a.armBottomLeft).curve(a.armBottomLeftCp1,a.tentacleLeftCp2,a.tentacleLeft).curve(a.tentacleLeftCp1,a.armBottomCp2,a.armBottom).curve(a.armBottomCp1,a.tentacleRightCp2,a.tentacleRight).curve(a.tentacleRightCp1,a.armBottomRightCp2,a.armBottomRight).hide())):(s.sectionLeft=(new i).move(a.sectionTop).curve(a.sectionTopCp1,a.sectionLeftCp2,a.sectionLeft).curve(a.sectionLeftCp1,a.sectionBottomLeftCp2,a.sectionBottomLeft).hide(),s.sectionRight=(new i).move(a.sectionBottomRight).curve(a.sectionBottomRightCp1,a.sectionRightCp2,a.sectionRight).hide(),a.skirtBottomLeft.sitsRoughlyOn(a.armTopLeft)?(s.skirtLeft=(new i).move(a.sectionBottomLeft).curve(a.sectionBottomLeftCp1,a.skirtBottomLeft,a.skirtBottomLeft).hide(),s.skirtRight=(new i).move(a.armTopRight).curve(a.skirtBottomRight,a.sectionBottomRightCp2,a.sectionBottomRight).hide()):(s.skirtLeft=(new i).move(a.sectionBottomLeft).curve(a.sectionBottomLeftCp1,a.skirtBottomLeft,a.skirtBottomLeft).curve(a.skirtBottomLeft,a.armTopLeftCp2,a.armTopLeft).hide(),s.skirtRight=(new i).move(a.armTopRight).curve(a.armTopRightCp1,a.skirtBottomRight,a.skirtBottomRight).curve(a.skirtBottomRight,a.sectionBottomRightCp2,a.sectionBottomRight).hide())),s.section=(new i).move(a.sectionTop).join(s.sectionLeft).join(s.skirtLeft).curve(a.armTopLeftCp1,a.armBottomLeftCp2,a.armBottomLeft).join(s.armBottom).curve(a.armBottomRightCp1,a.armTopRightCp2,a.armTopRight).join(s.skirtRight).join(s.sectionRight).curve(a.sectionRightCp1,a.sectionTopCp2,a.sectionTop).close().attr("class","fabric"),a.logo=a.sectionTop.shiftFractionTowards(a.sectionBottom,"octoplushy"==e.type?.3:.5),r.logo=new n("logo",a.logo).attr("data-scale",.4),a.gridAnchor=a.skirtTopMiddle.clone(),1==t?h.cutlist.addCut({cut:2,from:"fabric",identical:!0}):h.cutlist.addCut({cut:8,from:"fabric",identical:!0}),a.titleAnchor=a.sectionBottom.shiftFractionTowards(a.sectionTop,"octoplushy"==e.type?.3:.4).shift(180,.2*k),c("title",{at:a.titleAnchor,nr:1+3*t,title:"head"+(0==t?"":" (a)"),rotation:90,scale:"octoplushy"==e.type?.35:.5}),"octoplushy"==e.type&&(a.eyeLeft=s.sectionLeft.shiftFractionAlong(.465),a.eyeRight=a.eyeLeft.flipX(a.sectionTop),d&&(a.eyeLeft.addText("octoplushy:eye","center"),a.eyeRight.addText("octoplushy:eye","center")),r.eyeLeft=new n("button",a.eyeLeft),r.eyeRight=new n("button",a.eyeRight),a.mouthMiddle=a.sectionBottom.shiftFractionTowards(a.sectionTop,.45),a.mouthLeft=a.mouthMiddle.shift(180,k/4),a.mouthRight=a.mouthMiddle.shift(0,k/4),a.mouthBottom=a.mouthMiddle.shift(270,k/4),a.mouthLeftCp1=a.mouthLeft.shift(270,k/4*m),a.mouthRightCp2=a.mouthRight.shift(270,k/4*m),a.mouthBottomCp2=a.mouthBottom.shift(180,k/4*m),a.mouthBottomCp1=a.mouthBottom.shift(0,k/4*m),s.mouth=(new i).move(a.mouthLeft).curve(a.mouthLeftCp1,a.mouthBottomCp2,a.mouthBottom).curve(a.mouthBottomCp1,a.mouthRightCp2,a.mouthRight).attr("class","stroke-lg"),d&&s.mouth.addText("octoplushy:mouth","text-xs center")),"squid"==e.type&&1==t&&d&&(s.fold=(new i).move(a.sectionTop).line(a.finFold).addClass("hint dotted").addText("octoplushy:foldLine","center")),"octopus"==e.type&&(a.skirtArmLeft=p.curveIntersectsX(a.sectionBottomLeft,a.sectionBottomLeftCp1,a.skirtBottomLeft,a.skirtBottomLeft,a.armTopLeft.x),a.skirtArmRight=a.skirtArmLeft.flipX(a.sectionTop),d&&(s.armLeftLine=(new i).move(a.skirtArmLeft).line(a.armTopLeft).addClass("class","hint dotted").addText("octoplushy:stitchLine","center"),s.armRightLine=(new i).move(a.armTopRight).line(a.skirtArmRight).addClass("class","hint dotted").addText("octoplushy:stitchLine","center"))),d&&(a.sectionTop.addText("A","center"),a.armTopLeft.addText("B","center"),a.armTopRight.addText("B","center")),r.left=new n("notch",a.sectionLeft),r.right=new n("notch",a.sectionRight),r.bottomLeft=new n("notch",a.sectionBottomLeft),r.bottomRight=new n("notch",a.sectionBottomRight);for(var W=0;W<4;W++)r[`armLeft${W}`]=new n("notch",a.armTopLeft.shiftFractionTowards(a.armBottomLeft,W/4)),r[`armRight${W}`]=new n("notch",a.armTopRight.shiftFractionTowards(a.armBottomRight,W/4));return l&&(s.sa=s.section.offset(l).attr("class","fabric sa")),c("hd",{from:a.sectionLeft,to:a.sectionRight,y:a.sectionTop.y-l,id:"headWidth"}),c("hd",{from:a.armTopLeft,to:a.armTopRight,y:a.armTopRight.y,id:"topArmWidth"}),c("hd",{from:a.armBottomLeft,to:a.armBottomRight,y:a.armBottom.y+l+10,id:"bottomArmWidth"}),c("vd",{from:a.sectionTop,to:a.sectionRight,x:a.skirtBottomRight.x+l+10,id:"headMidHeight"}),c("vd",{from:a.sectionTop,to:a.sectionBottomRight,x:a.skirtBottomRight.x+l+20,id:"topToNeckHeight"}),c("vd",{from:a.sectionTop,to:a.skirtBottomRight,x:a.skirtBottomRight.x+l+30,id:"topToArmHeight"}),c("vd",{from:a.sectionTop,to:a.armBottom,x:a.skirtBottomRight.x+l+40,id:"totalHeight"}),"octopus"==e.type&&(c("hd",{from:a.skirtBottomLeft,to:a.skirtBottomRight,y:a.skirtBottomRight.y,id:"skirtWidth"}),c("vd",{from:a.skirtBottomRight,to:a.armTopRight,x:a.skirtBottomRight.x+l+30,id:"skirtHeight"})),"squid"==e.type&&(c("vd",{from:a.armTopLeft,to:a.sectionBottomLeft,x:a.armTopLeft.x-l-10,id:"neckToArm"}),c("vd",{from:a.sectionBottomLeft,to:a.sectionMidLeft,x:a.armTopLeft.x-l-10,id:"sectionHeight"}),1==t&&(c("hd",{from:a.tentacleLeft,to:a.tentacleRight,y:a.tentacleRight.y,id:"tentacleWidth"}),c("hd",{from:a.finSeam,to:a.sectionTop,y:a.sectionTop.y,id:"finWidth"}),c("hd",{from:a.finSeam,to:a.finSection,y:a.finSection.y,id:"finToHead"}),c("hd",{from:a.finFold,to:a.finSection,y:a.finFold.y,id:"foldToHead"}),c("vd",{from:a.armBottom,to:a.tentacleLeft,x:a.tentacleLeft.x-l-10,id:"tentacleHeight"}),c("vd",{from:a.finSeam,to:a.sectionTop,x:a.finSeam.x-l,id:"finHeight"}),c("vd",{from:a.finFold,to:a.sectionTop,x:a.finSeam.x-l-10,id:"finFoldHeight"}),c("vd",{from:a.finSection,to:a.sectionTop,x:a.finSeam.x-l-20,id:"finToHeadHeight"}))),f}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 ic(t,{options:e,Point:o,Path:i,points:a,paths:s,Snippet:n,snippets:r,sa:l,macro:c,utils:p,store:h,complete:d,part:f}){if(t>("squid"==e.type?1:0))return f.hide(),f;const m=.55191502449351,u=e.sizeConstant*e.size,g="squid"==e.type?10:8,b=2*u/g,k=u*e.armWidth*(1-e.bottomTopArmRatio)*Math.PI,w=k*(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}a.armMiddle=new o(0,0),a.skirtLeft2=a.armMiddle.shift(270-360/g/2,u*e.armWidth*e.bottomTopArmRatio/2/Math.sin(p.deg2rad(360/g/2))),"octoplushy"==e.type&&(a.skirtLeft2=a.skirtLeft2.shift(90,a.skirtLeft2.y-a.armMiddle.y-h.get("armSkirtRadius"))),"squid"==e.type&&(a.skirtLeft2=a.skirtLeft2.shift(90,(a.skirtLeft2.y-a.armMiddle.y)/2)),a.armMiddleCp1=a.armMiddle.shiftFractionTowards(a.skirtLeft2,m),a.skirtLeft3=ne
1w o(-1*w/2,a.skirtLeft2.y),a.skirtLeft=a.skirtLeft3.clone();const v=a.skirtLeft.shift(h.get("armSkirtToTopAngle"),10);if(Math.round(1e3*v.x)<=Math.round(w/-2*1e3)?a.armTopLeft=a.skirtLeft.clone():a.armTopLeft=p.beamIntersectsX(a.skirtLeft,a.skirtLeft.shift(h.get("armSkirtToTopAngle"),10),w/-2),a.armTopLeftCp2=a.armTopLeft.shift(90,(a.armTopLeft.y-a.skirtLeft.y)*m),a.armTopLeftCp1=a.armTopLeft.shift(270,C/10),a.armBottomLeft=a.armTopLeft.shift(270,C).shift(0,w/4),a.armBottom=a.armTopLeft.shift(270,C+w/4).shift(0,w/2),a.armBottomLeft=a.armBottom.shift(90,w/2*(1-e.armTaper)).shift(180,w/2*(1-e.armTaper)),a.armBottomLeftCp2=a.armBottomLeft.shift(90,C/10),a.armBottomLeftCp1=a.armBottomLeft.shift(270,w/2*(1-e.armTaper)*m),a.armBottomCp2=a.armBottom.shift(180,w/2*(1-e.armTaper)*m),"octopus"==e.type){const t=(new i).move(a.armTopLeft).curve(a.armTopLeftCp2,a.armMiddleCp1,a.armMiddle);a.skirtLeft=a.armTopLeft.shift(t.shiftAlong(.1).angle(a.armTopLeft),k),a.armTopLeft=a.armTopLeft.shift(270,1.6*k),a.armTopLeftCp1=a.armTopLeft.shift(270,k/2),a.armTopLeftCp2=a.armTopLeft.shift(90,k/2)}"squid"==e.type&&(a.tentacleLeft=p.beamIntersectsX(a.armBottomLeft,a.armBottomLeft.shift(250,100),-1.2*w),a.tentacleLeftCp2=a.tentacleLeft.shift(90,a.armBottomLeft.dist(a.tentacleLeft)/3),a.tentacleLeftCp1=a.tentacleLeft.shift(270,a.armBottomLeft.dist(a.tentacleLeft)/3),1==t&&(a.armBottomLeftCp1=a.armBottomLeft.shift(270,w*m),a.armBottom=a.armBottom.flipY(a.tentacleLeft),a.armBottomCp2=a.armBottomCp2.flipY(a.tentacleLeft))),a.armMiddleCp2=a.armMiddleCp1.flipX(a.armMiddle),a.skirtRight=a.skirtLeft.flipX(a.armMiddle),a.armTopRight=a.armTopLeft.flipX(a.armMiddle),a.armTopRightCp1=a.armTopLeftCp2.flipX(a.armMiddle),a.armTopRightCp2=a.armTopLeftCp1.flipX(a.armMiddle),a.armBottomRight=a.armBottomLeft.flipX(a.armMiddle),a.armBottomRightCp1=a.armBottomLeftCp2.flipX(a.armMiddle),a.armBottomRightCp2=a.armBottomLeftCp1.flipX(a.armMiddle),a.armBottom=a.armBottom.flipX(a.armMiddle),a.armBottomCp1=a.armBottomCp2.flipX(a.armMiddle),"squid"==e.type&&(a.tentacleRight=a.tentacleLeft.flipX(a.sectionTop),a.tentacleRightCp1=a.tentacleLeftCp2.flipX(a.sectionTop),a.tentacleRightCp2=a.tentacleLeftCp1.flipX(a.sectionTop)),s.armBottom=(new i).move(a.armBottomLeft).curve(a.armBottomLeftCp1,a.armBottomCp2,a.armBottom).curve(a.armBottomCp1,a.armBottomRightCp2,a.armBottomRight).hide(),"squid"==e.type&&1==t&&(s.armBottom=(new i).move(a.armBottomLeft).curve(a.armBottomLeftCp1,a.tentacleLeftCp2,a.tentacleLeft).curve(a.tentacleLeftCp1,a.armBottomCp2,a.armBottom).curve(a.armBottomCp1,a.tentacleRightCp2,a.tentacleRight).curve(a.tentacleRightCp1,a.armBottomRightCp2,a.armBottomRight).hide()),a.skirtLeft.sitsRoughlyOn(a.armTopLeft)?s.topLeft=(new i).move(a.armMiddle).curve(a.armMiddleCp1,a.skirtLeft,a.skirtLeft):s.topLeft=(new i).move(a.armMiddle).curve(a.armMiddleCp1,a.skirtLeft,a.skirtLeft).curve(a.skirtLeft,a.armTopLeftCp2,a.armTopLeft),a.skirtRight.sitsRoughlyOn(a.armTopRight)?s.topRight=(new i).move(a.armTopRight).curve(a.skirtRight,a.armMiddleCp2,a.armMiddle):s.topRight=(new i).move(a.armTopRight).curve(a.armTopRightCp1,a.skirtRight,a.skirtRight).curve(a.skirtRight,a.armMiddleCp2,a.armMiddle),s.section=(new i).move(a.armMiddle).join(s.topLeft).curve(a.armTopLeftCp1,a.armBottomLeftCp2,a.armBottomLeft).join(s.armBottom).curve(a.armBottomRightCp1,a.armTopRightCp2,a.armTopRight).join(s.topRight).close(),a.logo=a.armMiddle.shiftFractionTowards(a.armBottom,.08),r.logo=new n("logo",a.logo).attr("data-scale",.4),a.gridAnchor=a.logo.clone(),d&&(a.armMiddle.addText("C","center"),a.armTopLeft.addText("D","center"),a.armTopRight.addText("D","center")),a.titleAnchor=a.armMiddle.shiftFractionTowards(a.armBottom,.2).shift(180,.1*b),c("title",{at:a.titleAnchor,nr:2+3*t,title:"arm"+(0==t?"":" (a)"),rotation:90,scale:.3}),1==t?h.cutlist.addCut({cut:2,from:"undersideFabric",identical:!0}):h.cutlist.addCut({cut:8,from:"undersideFabric",identical:!0});for(var T=0;T<4;T++)r[`armLeft${T}`]=new n("notch",a.armTopLeft.shiftFractionTowards(a.armBottomLeft,T/4)),r[`armRight${T}`]=new n("notch",a.armTopRight.shiftFractionTowards(a.armBottomRight,T/4));return"octopus"==e.type&&(a.skirtArmLeft=p.curveIntersectsX(a.skirtLeft,a.skirtLeft,a.armMiddleCp1,a.armMiddle,a.armTopLeft.x),a.skirtArmRight=a.skirtArmLeft.flipX(a.sectionTop),d&&(s.armLeftLine=(new i).move(a.skirtArmLeft).line(a.armTopLeft).addClass("hint dotted").addText("octoplushy:stitchLine","center"),s.armRightLine=(new i).move(a.armTopRight).line(a.skirtArmRight).addClass("hint dotted").addText("octoplushy:stitchLine","center"))),l&&(s.sa=s.section.offset(l).attr("class","fabric sa")),c("hd",{from:a.armTopLeft,to:a.armTopRight,y:a.armMiddle.y-l,id:"topWidth"}),c("hd",{from:a.armBottomLeft,to:a.armBottomRight,y:a.armBottom.y+l+10,id:"bottomWidth"}),c("vd",{from:a.armBottom,to:a.armMiddle,x:a.skirtLeft.x-l-20,id:"height"}),"octopus"==e.type?(c("hd",{from:a.skirtLeft,to:a.skirtRight,y:a.skirtRight.y,id:"skirtWidth"}),c("vd",{from:a.skirtLeft,to:a.armMiddle,x:a.skirtLeft.x-l-10,id:"skirtHeight"}),c("vd",{from:a.armTopLeft,to:a.skirtLeft,x:a.skirtLeft.x-l-10,id:"skirtToArm"})):c("vd",{from:a.armTopLeft,to:a.armMiddle,x:a.skirtLeft.x-l-10,id:"topToArm"}),"squid"==e.type&&1==t&&(c("hd",{from:a.tentacleLeft,to:a.tentacleRight,y:a.tentacleRight.y,id:"tentacleWidth"}),c("vd",{from:a.armBottom,to:a.tentacleLeft,x:a.tentacleLeft.x-l-10,id:"tentacleHeight"})),f}const ac={name:"octoplushy.armSection1",after:ec,draft:t=>ic(0,t)},sc={name:"octoplushy.armSection2",after:[oc,ec],draft:t=>ic(1,t)};function nc(t,{options:e,Point:o,Path:i,points:a,paths:s,Snippet:n,snippets:r,sa:l,macro:c,expand:p,units:h,store:d,part:f}){if("octoplushy"==e.type)return f;if(t>("squid"==e.type?1:2))return f.hide();const m=.55191502449351,u=d.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,i=("squid"==e.type?"squid":"octopus")+(2==t?"Eyebrow":1==t?"Pupil":"Eye");return d.flag.note({msg:i,notes:[l?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{width:h(b+o),length:h(2*g+o)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),d.flag.preset("expandIsOff"),f.hide()}return d.flag.preset("expandIsOn"),t<2?(a.top=new o(0,u/2*-1),a.left=new o(u/2*-1,0),a.bottom=new o(0,u/2),a.right=new o(u/2,0),a.topCp1=a.top.shift(180,u/2*m),a.topCp2=a.top.shift(0,u/2*m),a.leftCp1=a.left.shift(270,u/2*m),a.leftCp2=a.left.shift(90,u/2*m),a.bottomCp1=a.bottom.shift(0,u/2*m),a.bottomCp2=a.bottom.shift(180,u/2*m),a.right
1Cp1=a.right.shift(90,u/2*m),a.rightCp2=a.right.shift(270,u/2*m),s.eye=(new i).move(a.top).curve(a.topCp1,a.leftCp2,a.left).curve(a.leftCp1,a.bottomCp2,a.bottom).curve(a.bottomCp1,a.rightCp2,a.right).curve(a.rightCp1,a.topCp2,a.top).close().attr("class","fabric"),a.logo=a.top.shiftFractionTowards(a.bottom,.3),a.titleAnchor=a.bottom.shiftFractionTowards(a.top,.25).shift(180,u/10)):(a.tl=new o(0,0),a.tr=a.tl.shift(0,b),a.bl=a.tl.shift(270,2*g),a.br=a.bl.shift(0,b),s.eye=(new i).move(a.tl).line(a.bl).line(a.br).line(a.tr).line(a.tl).close().attr("class","fabric"),a.logo=a.tl.shiftFractionTowards(a.bl,.5).shiftFractionTowards(a.br,.3),a.titleAnchor=a.tr.shiftFractionTowards(a.br,.5).shiftFractionTowards(a.bl,.3)),a.gridAnchor=a.logo.clone(),r.logo=new n("logo",a.logo).attr("data-scale",.35),c("title",{at:a.titleAnchor,nr:3+3*t,title:2==t?"eyebrow":1==t?"pupil":"eye",scale:.25}),d.cutlist.addCut({cut:2,from:2==t?"fabric":1==t?"pupilFabric":"eyeFabric"}),l&&(s.sa=s.eye.offset(Math.min(l,6)).attr("class","fabric sa")),t<2?c("hd",{from:a.left,to:a.right,y:a.top.y-l,id:"width"}):(c("hd",{from:a.tl,to:a.tr,y:a.tl.y-l,id:"width"}),c("vd",{from:a.bl,to:a.tl,x:a.tl.x-l,id:"height"})),f}const rc={name:"octoplushy.eye1",after:ec,draft:t=>nc(0,t)},lc={name:"octoplushy.eye2",after:ec,draft:t=>nc(1,t)},cc={name:"octoplushy.eye3",after:ec,draft:t=>nc(2,t)},pc=new s.pT({data:Vl,parts:[ec,oc,ac,sc,rc,lc,cc]}),hc=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}'),dc={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 fc={name:"onyx.base",plugins:[O],draft:function({utils:t,Path:e,Point:o,paths:i,points:a,measurements:s,options:n,absoluteOptions:r,part:l,store:c,sa:p,macro:h,snippets:d,Snippet:f,scale:m}){const u=s.biceps*n.armholeTweakFactor*(1+n.sleeveEase)/Math.PI,g=(s.hpsToWaistBack+s.hpsToWaistFront)/2+s.waistToArmpit*n.outseamEase,b=g+s.waistToHips*(1+n.outseamEase),k=g+s.waistToSeat*(1+n.outseamEase),w=g+s.waistToUpperLeg*(1+n.outseamEase),C=s.waistToArmpit*(1+n.outseamEase),v=(s.hpsToWaistFront+s.hpsToWaistBack+s.crossSeam)*(1+n.centerSeamEase);c.set("verticalTrunk",v);const T=.22*s.upperLeg*n.crotchGussetWidth;c.set("crotchGussetWidth",T);const y=T/4,x=y,B=w+n.legLength*s.inseam,S=g-C+u*n.armpitEase;let L=s.chest*(1+n.chestEase);L-=n.raglanScoopMagnitude*S*4;const P=s.neck*(1+n.neckEase)/(2*Math.PI),R=s.upperLeg*(1+n.upperLegEase),F=s.seat*(1+n.seatEase),W=s.hips*(1+n.hipsEase),H=s.waist*(1+n.waistEase),A=Math.min(1,n.legLength/.91);let O=(1+n.legHemEase)*(A*s.ankle+(1-A)*s.upperLeg);c.set("legWidth",O),O-=T,c.set("neckRadius",P),a.raglanCenter=new o(0,0),a.neckCenter=a.raglanCenter.shift(270,n.neckBalance*P),a.armpitCorner=new o(L/4,S).translate(0,Math.max(0,s.biceps*n.armholeTweakFactor*n.sleeveEase/(2*Math.PI))),a.neckShoulderCorner=t.beamIntersectsCircle(a.neckCenter,P,a.raglanCenter,a.armpitCorner)[1],a.cfNeck=a.neckCenter.shift(270,P),a.cfCrotch=new o(0,(v-T)/2),a.crotchEnd=new o(y,a.cfCrotch.y+x),a.upperLeg=new o(R/2-T/4,w);const D=(a.upperLeg.x-a.crotchEnd.x-O/2)*(1-n.legTaperPosition);a.inseamHem=new o(a.upperLeg.x-O/2-D,B),a.outseamHem=new o(a.upperLeg.x-D,B),a.seat=new o(F/4,k),a.hips=new o(W/4,b),a.waist=new o(H/4,g);const E=a.neckShoulderCorner.angle(a.armpitCorner);c.set("raglanAngle",E);const I=a.raglanCenter.dist(a.armpitCorner);c.set("raglanLength",I),a.armpitCornerScooped=a.armpitCorner.shift(E+90,n.raglanScoopMagnitude*I),a.cfCrotchCp2=a.cfCrotch.shift(0,y/2),a.crotchEndCp1=a.crotchEnd.shift(a.inseamHem.angle(a.crotchEnd),x/2);const N=a.outseamHem.angle(a.seat);a.upperLegCp1=a.upperLeg.shift(N+180,a.upperLeg.dist(a.seat)/3),a.upperLegCp2=a.upperLeg.shift(N,a.upperLeg.dist(a.seat)/3);const M=a.upperLeg.angle(a.hips);a.seatCp1=a.seat.shift(M+180,a.seat.dist(a.upperLeg)/3),a.seatCp2=a.seat.shift(M,a.seat.dist(a.hips)/3);const _=a.seat.angle(a.waist);a.hipsCp1=a.hips.shift(_+180,a.hips.dist(a.seat)/3),a.hipsCp2=a.hips.shift(_,a.hips.dist(a.waist)/3);const j=a.hips.angle(a.armpitCornerScooped);a.waistCp1=a.waist.shift(j+180,a.waist.dist(a.hips)/3),a.waistCp2=a.waist.shift(j,a.waist.dist(a.armpitCornerScooped)/3);const G=2*a.cfNeck.angle(a.neckShoulderCorner),Y=t.deg2rad(G)*P;a.neckCp1=a.neckShoulderCorner.shift(G+180,Y/3),a.neckCp2=a.cfNeck.shift(0,Y/3);const U=E-(G+180);c.set("frontNecklineToRaglanAngle",U),a.armpitScoopCp1=a.armpitCorner.shift(E+180,1/3*n.raglanScoopLength*I),a.armpitScoopCp2=a.armpitCorner.shift(E+180,2/3*n.raglanScoopLength*I),a.armpitScoopEnd=a.armpitCorner.shift(E+180,n.raglanScoopLength*I),i.saBase=(new e).move(a.outseamHem)._curve(a.upperLegCp1,a.upperLeg).curve(a.upperLegCp2,a.seatCp1,a.seat).curve(a.seatCp2,a.hipsCp1,a.hips).curve(a.hipsCp2,a.waistCp1,a.waist).curve(a.waistCp2,a.armpitCornerScooped,a.armpitCornerScooped).curve(a.armpitScoopCp1,a.armpitScoopCp2,a.armpitScoopEnd).line(a.neckShoulderCorner).
1curve(a.neckCp1,a.neckCp2,a.cfNeck),n.frontOnFold?(i.saBase.hide(),i.foldBase=(new e).move(a.cfNeck).line(a.cfCrotch).hide(),i.inseamBase=(new e).move(a.cfCrotch).curve(a.cfCrotchCp2,a.crotchEndCp1,a.crotchEnd).line(a.inseamHem).hide()):i.saBase.line(a.cfCrotch).curve(a.cfCrotchCp2,a.crotchEndCp1,a.crotchEnd).line(a.inseamHem).hide(),i.hemBase=(new e).move(a.inseamHem).line(a.outseamHem).hide();const z=2*(new e).move(a.cfCrotch).curve(a.cfCrotchCp2,a.crotchEndCp1,a.crotchEnd).line(a.inseamHem).hide().length();return c.set("crotchGussetLength",z),n.frontOnFold?i.seam=i.saBase.join(i.foldBase).join(i.inseamBase).join(i.hemBase).close().addClass("fabric"):i.seam=i.saBase.join(i.hemBase).close().addClass("fabric"),h("hd",{id:"wCrotch",from:a.cfCrotch,to:a.inseamHem,y:a.outseamHem.y+(p+15)}),h("hd",{id:"wLegHem",from:a.inseamHem,to:a.outseamHem,y:a.outseamHem.y+(p+15)}),h("hd",{id:"wCenterToOutseam",from:a.cfCrotch,to:a.outseamHem,y:a.outseamHem.y+(p+30)}),h("hd",{id:"wTotalWidth",from:a.cfCrotch,to:i.seam.edge("right"),y:a.outseamHem.y+(p+45)}),h("vd",{id:"hInseam",from:a.cfCrotch,to:a.inseamHem,x:0-(p+15)}),h("vd",{id:"hOutseam",from:a.outseamHem,to:a.armpitCornerScooped,x:Math.max(a.outseamHem.x,a.armpitCornerScooped.x)+(p+15)}),h("vd",{id:"hArmpitScoop",from:a.armpitCornerScooped,to:a.armpitScoopEnd,x:a.armpitCornerScooped.x+(p+30)}),h("hd",{id:"wArmpitScoop",from:a.armpitScoopEnd,to:a.armpitCornerScooped,y:0-(p+0)}),a.title=new o(a.armpitCorner.x/4,(a.cfCrotch.y+a.armpitCornerScooped.y/2)/2),h("title",{at:a.title,nr:5,title:"base"}),a.logo=a.title.translate(32*m,-40*m),d.logo=new f("logo",a.logo),p&&(i.sa=(new e).move(a.inseamHem.shift(270,n.legRibbing?p:r.legHem)).join(i.hemBase.offset(n.legRibbing?p:r.legHem)).join(i.saBase.offset(p)).addClass("fabric sa"),n.frontOnFold?(i.sa.line(a.cfNeck),i.sa2=(new e).move(a.cfCrotch).join(i.inseamBase.offset(p)).line(a.inseamHem.shift(270,n.legRibbing?p:r.legHem)).addClass("fabric sa")):i.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"},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 mc={name:"onyx.front",draft:function({utils:t,Path:e,Point:o,paths:i,points:a,measurements:s,options:n,absoluteOptions:r,part:l,store:c,complete:p,sa:h,expand:d,units:f,macro:m,snippets:u,Snippet:g,scale:b}){const k=c.get("neckRadius");a.neckShoulderCorner=t.beamIntersectsCircle(a.neckCenter,k,a.raglanCenter,a.armpitCorner)[1];const w=a.raglanCenter.dist(a.neckShoulderCorner);c.set("frontNeckRadius",w),a.cfNeck=a.neckCenter.shift(270,k);const C=2*a.cfNeck.angle(a.neckShoulderCorner),v=t.deg2rad(C)*k;a.neckCp1=a.neckShoulderCorner.shift(C+180,v/3),a.neckCp2=a.cfNeck.shift(0,v/3);const T=c.get("raglanAngle")-(C+180);if(c.set("frontNecklineToRaglanAngle",T),c.set("neckLengthFront",(new e).move(a.neckShoulderCorner).
1curve(a.neckCp1,a.neckCp2,a.cfNeck).length()),m("vd",{id:"hCenterSeam",from:a.cfNeck,to:a.cfCrotch,x:-(h+15)}),m("vd",{id:"hNeck",from:a.neckShoulderCorner,to:a.cfNeck,x:-(h+15),noStartMarker:!0,noEndMarker:!0}),m("vd",{id:"hTotal",from:a.neckShoulderCorner,to:a.inseamHem,x:-(h+30)}),m("vd",{id:"hRaglanSeam",from:a.armpitCornerScooped,to:a.neckShoulderCorner,x:a.armpitCornerScooped.x+(h+15)}),m("hd",{id:"wRaglanSeamStraightPortion",from:a.neckShoulderCorner,to:a.armpitScoopEnd,y:0-(h+0)}),m("hd",{id:"wRaglanSeam",from:a.neckShoulderCorner,to:a.armpitCornerScooped,y:0-(h+15)}),m("hd",{id:"wNeck",from:a.cfNeck,to:a.neckShoulderCorner,y:0-(h+15),noStartMarker:!0,noEndMarker:!0}),m("hd",{id:"wCenterToArmpit",from:a.cfNeck,to:a.armpitCornerScooped,y:0-(h+30)}),a.cutonfoldFrom=a.cfNeck.shift(0,a.armpitCornerScooped.x/8),a.cutonfoldTo=a.cfCrotch.shift(0,a.armpitCornerScooped.x/8),n.frontOnFold?(a.cutonfoldFrom.x=0,a.cutonfoldTo.x=0,m("cutonfold",{from:a.cutonfoldFrom,to:a.cutonfoldTo,grainline:!0}),c.cutlist.addCut({cut:1,from:"fabric"})):(m("grainline",{from:a.cutonfoldFrom,to:a.cutonfoldTo}),c.cutlist.addCut({cut:2,from:"fabric"})),p&&"front"===n.zipperPosition){const t=c.get("verticalTrunk")*n.zipperLength;t>0&&(a.zipperUpperLeft=a.cfNeck.shift(180,Math.max(h,5)),a.zipperLowerLeft=a.zipperUpperLeft.shift(270,t),a.zipperLowerRight=a.zipperLowerLeft.shift(0,2*Math.max(h,5)),a.zipperUpperRight=a.zipperLowerRight.shift(90,t),i.zipper=(new e).move(a.zipperUpperLeft).line(a.zipperLowerLeft).line(a.zipperLowerRight).line(a.zipperUpperRight).close().setText("onyx:zipper").addClass("various dashed"))}if(u.armpitScoopEnd=new g("notch",a.armpitScoopEnd),a.title=new o(a.armpitCorner.x/4,a.armpitCornerScooped.y+50*b),m("title",{at:a.title,nr:1,title:"onyx:front"}),a.logo=a.title.translate(32*b,-40*b),u.logo=new g("logo",a.logo),p&&!d){a.skirtInstructions=a.title.translate(0,35*b-30),n.skirt&&(a.skirtInstructions=a.skirtInstructions.translate(0,50).attr("data-text","onyx:cutOneSkirt").attr("data-text",":\n").attr("data-text",`${f(2*h+s.waist*Math.max(n.waistEase,n.skirtWidth))} x ${f(s.waistToUpperLeg*n.skirtLength+r.skirtHem+r.skirtWaistband)}`)),a.legRibbingInstructions=a.skirtInstructions,n.legRibbing&&(a.legRibbingInstructions=a.legRibbingInstructions.translate(0,50).attr("data-text","onyx:cutTwoLegRibbing").attr("data-text",":\n").attr("data-text",`${f(2*h+c.get("legWidth")*n.legRibbingLength)} x ${f(2*(h+r.legRibbingWidth))}
1`)),a.crotchGussetInstructions=a.legRibbingInstructions,a.crotchGussetInstructions=a.crotchGussetInstructions.translate(0,50).attr("data-text","onyx:cutOneCrotchGusset").attr("data-text",":\n").attr("data-text",`${f(2*h+c.get("crotchGussetWidth"))} x ${f((n.legRibbing?2*h:2*r.legHem)+c.get("crotchGussetLength"))}`),a.zipperGuardInstructions=a.crotchGussetInstructions;const t=r.zipperGuardWidth,e="neckband"==n.neckStyle?c.get("verticalTrunk")*n.neckGuardLength:n.zipperGuardTapeCoverMaterial*t,o=r.zipperLength+e+t*n.zipperGuardTapeCoverMaterial;a.zipperGuardInstructions=a.zipperGuardInstructions.translate(0,50).attr("data-text","onyx:cutOneZipperGuard").attr("data-text",":\n").attr("data-text",`${f(2*(h+t))} x ${f(2*h+o)}`)}return"front"===n.zipperPosition&&n.frontOnFold&&c.flag.note({msg:"onyx:frontOnFoldZipper"}),l},from:fc};const uc={name:"onyx.back",draft:function({utils:t,Path:e,Point:o,paths:i,points:a,options:s,absoluteOptions:n,part:r,store:l,complete:c,sa:p,macro:h,snippets:d,Snippet:f}){const m=l.get("neckRadius");a.neckCenter=a.raglanCenter.shift(270,-s.neckBalance*m),a.neckShoulderCorner=t.beamIntersectsCircle(a.neckCenter,m,a.raglanCenter,a.armpitCorner)[1];const u=a.raglanCenter.dist(a.neckShoulderCorner);l.set("backNeckRadius",u),a.cfNeck=a.neckCenter.shift(270,m);const g=2*a.cfNeck.angle(a.neckShoulderCorner),b=t.deg2rad(g)*m;a.neckCp1=a.neckShoulderCorner.shift(g+180,b/3),a.neckCp2=a.cfNeck.shift(0,b/3);const k=l.get("raglanAngle")-(g+180);if(l.set("backNecklineToRaglanAngle",k),i.saBase=(new e).move(a.outseamHem).curve(a.outseamHem,a.upperLegCp1,a.upperLeg).curve(a.upperLegCp2,a.seatCp1,a.seat).curve(a.seatCp2,a.hipsCp1,a.hips).curve(a.hipsCp2,a.waistCp1,a.waist).curve(a.waistCp2,a.armpitCornerScooped,a.armpitCornerScooped).curve(a.armpitScoopCp1,a.armpitScoopCp2,a.armpitScoopEnd).line(a.neckShoulderCorner).curve(a.neckCp1,a.neckCp2,a.cfNeck),s.backOnFold?(i.saBase.hide(),i.foldBase=(new e).move(a.cfNeck).line(a.cfCrotch).hide(),i.inseamBase=(new e).move(a.cfCrotch).curve(a.cfCrotchCp2,a.crotchEndCp1,a.crotchEnd).line(a.inseamHem).hide()):i.saBase.line(a.cfCrotch).curve(a.cfCrotchCp2,a.crotchEndCp1,a.crotchEnd).line(a.inseamHem).hide(),i.hemBase=(new e).move(a.inseamHem).line(a.outseamHem).hide(),s.backOnFold?i.seam=i.saBase.join(i.foldBase).join(i.inseamBase).join(i.hemBase).close().addClass("fabric"):i.seam=i.saBase.join(i.hemBase).close().addClass("fabric"),h("vd",{id:"hCenterSeam",from:a.cfNeck,to:a.cfCrotch,x:-(p+15)}),h("vd",{id:"hNeck",from:a.neckShoulderCorner,to:a.cfNeck,x:-(p+15),noStartMarker:!0,noEndMarker:!0}),h("vd",{id:"hTotal",from:a.neckShoulderCorner,to:a.inseamHem,x:-(p+30)}),h("vd",{id:"hRaglanSeam",from:a.armpitCornerScooped,to:a.neckShoulderCorner,x:a.armpitCornerScooped.x+(p+15)}),h("hd",{id:"wRaglanSeamStraightPortion",from:a.neckShoulderCorner,to:a.armpitScoopEnd,y:0-(p+0)}),h("hd",{id:"wRaglanSeam",from:a.neckShoulderCorner,to:a.armpitCornerScooped,y:0-(p+15)}),h("hd",{id:"wNeck",from:a.cfNeck,to:a.neckShoulderCorner,y:0-(p+15),noStartMarker:!0,noEndMarker:!0}),h("hd",{id:"wCenterToArmpit",from:a.cfNeck,to:a.armpitCornerScooped,y:0-(p+30)}),a.cutonfoldFrom=a.cfNeck.shift(0,a.armpitCornerScooped.x/8),a.cutonfoldTo=a.cfCrotch.shift(0,a.armpitCornerScooped.x/8),s.backOnFold?(a.cutonfoldFrom.x=0,a.cutonfoldTo.x=0,h("cutonfold",{from:a.cutonfoldFrom,to:a.cutonfoldTo,grainline:!0}),l.cutlist.addCut({cut:1,from:"fabric"})):(h("grainline",{from:a.cutonfoldFrom,to:a.cutonfoldTo}),l.cutlist.addCut({cut:2,from:"fabric"})),c&&"back"===s.zipperPosition){const t=l.get("verticalTrunk")*s.zipperLength;t>0&&(a.zipperUpperLeft=a.cfNeck.shift(180,Math.max(p,5)),a.zipperLowerLeft=a.zipperUpperLeft.shift(270,t),a.zipperLowerRight=a.zipperLowerLeft.shift(0,2*Math.max(p,5)),a.zipperUpperRight=a.zipperLowerRight.shift(90,t),i.zipper=(new e).move(a.zipperUpperLeft).line(a.zipperLowerLeft).line(a.zipperLowerRight).line(a.zipperUpperRight).close().setText("onyx:zipper").addClass("various dashed"))}d.armpitScoopEnd=new f("bnotch",a.armpitScoopEnd),a.title=new o(a.armpitCorner.x/4,(a.cfCrotch.y+a.armpitCornerScooped.y/2)/2),h("title",{at:a.title,nr:2,t
1itle:"onyx:back"}),p&&(i.sa=(new e).move(a.inseamHem.shift(270,s.legRibbing?p:n.legHem)).join(i.hemBase.offset(s.legRibbing?p:n.legHem)).join(i.saBase.offset(p)).attr("class","fabric sa"),s.backOnFold?(i.sa.line(a.cfNeck),i.sa2=(new e).move(a.cfCrotch).join(i.inseamBase.offset(p)).line(a.inseamHem.shift(270,s.legRibbing?p:n.legHem)).addClass("fabric sa")):i.sa.close()),"back"===s.zipperPosition&&s.backOnFold&&l.flag.note({msg:"onyx:backOnFoldZipper"});const w=(new e).move(a.neckShoulderCorner).curve(a.neckCp1,a.neckCp2,a.cfNeck);return l.set("neckLengthBack",w.length()),r},from:fc};const gc={name:"onyx.raglanSleeve",after:[mc,uc],draft:function({utils:t,Path:e,Point:o,paths:i,points:a,measurements:s,options:n,absoluteOptions:r,part:l,store:c,sa:p,complete:h,expand:d,macro:f,snippets:m,Snippet:u,scale:g,units:b}){const k=n.armholeTweakFactor-n.raglanScoopMagnitude,w=n.bicepsPosition,C=c.get("neckRadius"),v=s.biceps*(1+n.sleeveEase),T=s.wrist*(1+n.wristEase);a.raglanCenter=new o(0,0),a.neckCenter=a.raglanCenter.shift(180,n.neckBalance*C);const y=c.get("raglanLength"),x=n.raglanScoopMagnitude*y,B=n.raglanScoopLength*y,S=v/2*k,L=function(t,e){return Math.sqrt(t*t-e*e)}(y,S),P=n.sleeveLength*s.shoulderToWrist;let R;if(n.sleeveLength<w){R=((k-1)*(1-n.sleeveLength/w)+1)*v}else{const t=Math.min((n.sleeveLength-w)/(1-w),1);R=v*(1-t)+T*t}c.set("sleeveWidth",R),R/=2;const F=L+P;a.frontArmhole=new o(-S,L),a.backArmhole=new o(S,L);const W=a.raglanCenter.angle(a.frontArmhole),H=a.raglanCenter.angle(a.backArmhole);if(a.frontSleeve=new o(-R,F),a.backSleeve=new o(R,F),n.sleeveLength<w){const t=1-n.sleeveLength/w;a.frontSleeve=a.frontSleeve.shift(W-90,t*x),a.backSleeve=a.backSleeve.shift(H+90,t*x)}a.frontNeck=a.raglanCenter.shiftTowards(a.frontArmhole,c.get("frontNeckRadius")),a.backNeck=a.raglanCenter.shiftTowards(a.backArmhole,c.get("backNeckRadius"));const A=a.neckCenter.angle(a.frontNeck),O=a.neckCenter.angle(a.backNeck),D=t.deg2rad(O-A)*C,E=W+(180-c.get("frontNecklineToRaglanAngle")),I=H-(180-c.get("backNecklineToRaglanAngle"));return a.neckCp1=a.backNeck.shift(I,D*(1/3)),a.neckCp2=a.frontNeck.shift(E,D*(1/3)),a.frontArmholeScooped=a.frontArmhole.shift(W-90,x),a.frontArmholeScoopCp1=a.frontArmhole.shift(W+180,1/3*B),a.frontArmholeScoopCp2=a.frontArmhole.shift(W+180,2/3*B),a.frontArmholeScoopEnd=a.frontArmhole.shift(W+180,B),a.backArmholeScooped=a.backArmhole.shift(H+90,x),a.backArmholeScoopCp1=a.backArmhole.shift(H+180,1/3*B),a.backArmholeScoopCp2=a.backArmhole.shift(H+180,2/3*B),a.backArmholeScoopEnd=a.backArmhole.shift(H+180,B),i.saBase=(new e).move(a.backSleeve).line(a.backArmholeScooped).curve(a.backArmholeScoopCp1,a.backArmholeScoopCp2,a.backArmholeScoopEnd).line(a.backNeck).curve(a.neckCp1,a.neckCp2,a.frontNeck).line(a.frontArmholeScoopEnd).curve(a.frontArmholeScoopCp2,a.frontArmholeScoopCp1,a.frontArmholeScooped).line(a.frontSleeve).hide(),i.hemBase=(new e).move(a.frontSleeve).line(a.backSleeve).hide(),i.seam=i.saBase.join(i.hemBase).close().addClass("fabric"),c.set("neckLengthSide",(new e).move(a.backNeck).curve(a.neckCp1,a.neckCp2,a.frontNeck).length()),f("vd",{id:"hFrontRaglanSleeveStraightPortion",from:a.frontNeck,to:a.frontArmholeScoopEnd,x:a.frontArmholeScooped.x-(p+15)}),f("vd",{id:"hFrontRaglanSleeveCurvedPortion",from:a.frontArmholeScoopEnd,to:a.frontArmholeScooped,x:a.frontArmholeScooped.x-(p+15)}),f("vd",{id:"hFrontRaglanSleeve",from:a.frontNeck,to:a.frontArmholeScooped,x:a.frontArmholeScooped.x-(p+30)}),f("vd",{id:"hFrontSleeve",from:a.frontArmholeScooped,to:a.frontSleeve,x:a.frontArmholeScooped.x-(p+15)}),f("vd",{id:"hFrontTotal",from:a.frontNeck,to:a.frontSleeve,x:a.frontArmholeScooped.x-(p+45)}),f("vd",{id:"hBackRaglanSleeveStraightPortion",from:a.backNeck,to:a.backArmholeScoopEnd,x:a.backArmholeScooped.x+(p+15)}),f("vd",{id:"hBackRaglanSleeveCurvedPortion",from:a.backArmholeScoopEnd,to:a.backArmholeScooped,x:a.backArmholeScooped.x+(p+15)}),f("vd",{id:"hBackRaglanSleeve",from:a.backNeck,to:a.backArmholeScooped,x:a.backArmholeScooped.x+(p+30)}),f("vd",{id:"hBackSleeve",from:a.backArmholeScooped,to:a.backSleeve,x:a.backArmholeScooped.x+(p+15)}),f("vd",{id:"hBackTotal",from:a.backNeck,to:a.backSleeve,x:a.backArmholeScooped.x+(p+45)}),f("hd",{id:"wFrontSleeve",from:a.frontArmholeScooped,to:a.frontSleeve,y:a.frontSleeve.y+(p+15),noStartMarker:!0,noEndMarker:!0}),f("hd",{id:"wSleeveHem",from:a.frontSleeve,to:a.backSleeve,y:a.frontSleeve.y+(p+15)}),f("hd",{id:"wBackSleeve",from:a.backSleeve,to:a.backArmholeScooped,y:a.backSleeve.y+(p+15),noStartMarker:!0,noEndMarker:!0}),f("hd",{id:"wWidthAtArmpit",from:a.frontArmholeScooped,to:a.backArmholeScooped,y:a.frontSleeve.y+(p+30)}),f("hd",{id:"wWidthAtArmpit2",from:a.frontArmholeScooped,to:a.backArmholeScooped,y:Math.min(a.frontNeck.y,a.backNeck.y)-(p+45)}),f("hd",{id:"wFrontRaglanSleeveCurvedPortion",from:a.frontArmholeScooped,to:a.frontArmholeScoopEnd,y:Math.min(a.frontNeck.y,a.backNeck.y)-(p+15)}),f("hd",{id:"wFrontRaglanSleeveStraightPortion",from:a.frontArmholeScoopEnd,to:a.frontNeck,y:Math.min(a.frontNeck.y,a.backNeck.y)-(p+15)}),f("hd",{id:"wNeck",from:a.frontNeck,to:a.backNeck,y:Math.min(a.frontNeck.y,a.backNeck.y)-(p+15)}),f("hd",{id:"wBackRaglanSleeveStraightPortion",from:a.backNeck,to:a.backArmholeScoopEnd,y:Math.min(a.frontNeck.y,a.backNeck.y)-(p+15)}),f("hd",{id:"wBackRaglanSleeveCurvedPortion",from:a.backArmholeScoopEnd,to:a.backArmholeScooped,y:Math.min(a.frontNeck.y,a.backNeck.y)-(p+15)}),f("hd",{id:"wBackRaglanSleeve",from:a.backNeck,to:a.backArmholeScooped,y:Math.min(a.frontNeck.y,a.backNeck.y)-(p+30)}),f("hd",{id:"wFrontRaglanSleeve",from:a.frontArmholeScooped,to:a.frontNeck,y:Math.min(a.frontNeck.y,a.backNeck.y)-(p+30)}),a.grainlineBottom=a.backSleeve.shiftFractionTowards(a.frontSleeve,.5),a.grainlineTop=a.raglanCenter.shift(270,C),f("grainline",{from:a.grainlineTop,to:a.grainlineBottom}),c.cutlist.addCut({cut:2,from:"fabric"}),m.frontArmholeScoopEnd=new u("notch",a.frontArmholeScoopEnd),m.backArmholeScoopEnd=new u("bnotch",a.backArmholeScoopEnd),a.title=new o(0,a.backSleeve.y/3),f("title",{at:a.title,nr:3,title:"onyx:raglanSleeve"}),a.logo=a.title.translate(-20*g,70*g),m.logo=new u("logo",a.logo),a.scalebox=new o(a.frontArmholeScooped.x/2,a.frontArmholeScooped.y+20*g),f("scalebox",{at:a.scalebox}
1),h&&!d&&(a.sleeveRibbingInstructions=a.title.translate(5,35*g-30),n.sleeveRibbing&&(a.sleeveRibbingInstructions=a.sleeveRibbingInstructions.translate(0,50).attr("data-text","onyx:cutTwoSleeveRibbing").attr("data-text",":\n").attr("data-text",`${b(2*p+c.get("sleeveWidth")*n.sleeveRibbingLength)} x ${b(2*(p+r.sleeveRibbingWidth))}`)),a.neckbandInstructions=a.sleeveRibbingInstructions,"neckband"===n.neckStyle&&(a.neckbandInstructions=a.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"))*n.neckbandLength))} x ${b(2*(p+r.neckbandWidth))}`))),p&&(i.sa=i.saBase.offset(p).join(i.hemBase.offset(n.sleeveRibbing?p:r.sleeveHem)).close().addClass("fabric sa")),l},measurements:["wrist","shoulderToWrist"],options:{bicepsPosition:.2,wristEase:{pct:0,min:-30,max:50,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:i,options:a,absoluteOptions:s,part:n,store:r,complete:l,expand:c,sa:p,macro:h}){if(!c||"neckband"!==a.neckStyle)return n.hide();const d=(r.get("neckLengthFront")+r.get("neckLengthBack")+r.get("neckLengthSide"))*a.neckbandLength,f=2*s.neckbandWidth;return i.topLeftCorner=new e(0,0),i.bottomLeftCorner=new e(0,f),i.bottomRightCorner=new e(d,f),i.topRightCorner=new e(d,0),i.leftCenter=new e(0,f/2),i.rightCenter=new e(d,f/2),o.saBase=(new t).move(i.bottomLeftCorner).line(i.bottomRightCorner).line(i.topRightCorner).line(i.topLeftCorner).addClass("fabric").hide(),o.foldBase=(new t).move(i.topLeftCorner).line(i.bottomLeftCorner).hide(),l&&(o.foldLine=(new t).move(i.leftCenter).line(i.rightCenter).addClass("various dashed").addText("onyx:foldLine","center")),o.seam=o.saBase.join(o.foldBase).close().addClass("fabric"),h("vd",{id:"vdNeckBand",from:i.topLeftCorner,to:i.bottomLeftCorner,x:-(p+15)}),h("hd",{id:"hdNeckBand",from:i.topLeftCorner,to:i.topRightCorner,y:-(p+15)}),i.cutonfoldFrom=i.topLeftCorner,i.cutonfoldTo=i.bottomLeftCorner,h("cutonfold",{from:i.cutonfoldFrom,to:i.cutonfoldTo,grainline:!0}),r.cutlist.addCut({cut:1,from:"fabric"}),i.title=new e(d/4,f/2),h("title",{at:i.title,nr:4,title:"onyx:neckband"}),p&&(o.sa=(new t).move(i.bottomLeftCorner).line(i.bottomLeftCorner.translate(0,p)).line(i.bottomRightCorner.translate(p,p)).line(i.topRightCorner.translate(p,-p)).line(i.topLeftCorner.translate(0,-p)).line(i.topLeftCorner).addClass("fabric sa")),n},after:[gc]};const kc={name:"onyx.zipperGuard",plugins:[],draft:function({Path:t,Point:e,paths:o,points:i,options:a,absoluteOptions:s,expand:n,part:r,store:l,sa:c,macro:p}){if(!n||"none"===a.zipperPosition)return r.hide();const h=s.zipperGuardWidth,d="neckband"==a.neckStyle?l.get("verticalTrunk")*a.neckGuardLength:a.zipperGuardTapeCoverMaterial*h,f=s.zipperLength+d+h*a.zipperGuardTapeCoverMaterial;return i.topLeftCorner=new e(0,0),i.bottomLeftCorner=new e(0,f),i.bottomRightCorner=new e(h,f),i.topRightCorner=new e(h,0),o.saBase=(new t).move(i.bottomLeftCorner).line(i.bottomRightCorner).line(i.topRightCorner).line(i.topLeftCorner).addClass("fabric").hide(),o.foldBase=(new t).move(i.topLeftCorner).line(i.bottomLeftCorner).hide(),o.seam=o.saBase.join(o.foldBase).close().addClass("fabric"),p("vd",{id:"hZipperGuard",from:i.topLeftCorner,to:i.bottomLeftCorner,x:-(c+15)}),p("hd",{id:"wZipperGuard",from:i.topLeftCorner,to:i.topRightCorner,y:-(c+15)}),i.cutonfoldFrom=i.topLeftCorner,i.cutonfoldTo=i.bottomLeftCorner,p("cutonfold",{from:i.cutonfoldFrom,to:i.cutonfoldTo,grainline:!0}),l.cutlist.addCut({cut:1,from:"fabric"}),i.title=new e(h/2,f/2),p("title",{at:i.title,nr:6,title:"onyx:zipperGuard"}),c&&(o.sa=(new t).move(i.bottomLeftCorner).line(i.bottomLeftCorner.translate(0,c)).line(i.bottomRightCorner.translate(c,c)).line(i.topRightCorner.translate(c,-c)).line(i.topLeftCorner.translate(0,-c)).line(i.topLeftCorner).addClass("fabric sa")),r},after:[fc]};const wc={name:"onyx.crotchGusset",draft:function({Path:t,Point:e,paths:o,points:i,options:a,absoluteOptions:s,part:n,store:r,sa:l,expand:c,macro:p,snippets:h,Snippet:d,scale:f}){if(!c)return n.hide();const m=r.get("crotchGussetLength"),u=r.get("crotchGussetWidth");return i.topLeftCorner=new e(0,0),i.bottomLeftCorner=new e(0,u),i.bottomRightCorner=new e(m/2,u),i.topRightCorner=new e(m/2,0),o.saBase1=(new t).move(i.bottomLeftCorner).line(i.bottomRightCorner).addClass("fabric").hide(),o.hemBase=(new t).move(i.bottomRightCorner).line(i.topRightCorner).addClass("fabric").hide(),o.saBase2=(new t).move(i.topRightCorner).line(i.topLeftCorner).addClass("fabric").hide(),o.foldBase=(new t).move(i.topLeftCorner).line(i.bottomLeftCorner).hide(),o.seam=o.saBase1.join(o.hemBase).join(o.saBase2).join(o.foldBase).close().addClass("fabric"),p("vd",{id:"hCrotchGusset",from:i.topLeftCorner,to:i.bottomLeftCorner,x:-(l+15)}),p("hd",{id:"wCrotchGusset",from:i.topLeftCorner,to:i.topRightCorner,y:-(l+15)}),i.cutonfoldFrom=i.topLeftCorner,i.cutonfoldTo=i.bottomLeftCorner,p("cutonfold",{from:i.cutonfoldFrom,to:i.cutonfoldTo,grainline:!1}),i.grainlineFrom=i.topLeftCorner.shiftFractionTowards(i.bottomLeftCorner,.95),i.grainlineTo=i.topRightCorner.shiftFractionTowards(i.bottomRightCorner,.95),p("grainline",{from:i.grainlineFrom,to:i.grainlineTo}),r.cutlist.addCut({cut:1,from:"fabric"}),i.title=new e(m/4,u/2),p("title",{at:i.title,nr:5,title:"onyx:crotchGusset"}),i.logo=i.title.translate(-50*f,40*f),h.logo=new d("logo",i.logo),l&&(o.sa=(new t).move(i.bottomLeftCorner).line(i.bottomLeftCorner.translate(0,l)).line(i.bottomRightCorner.translate(a.legRibbing?l:s.legHem,l)).line(i.topRightCorner.translate(a.legRibbing?l:s.legHem,-l)).line(i.topLeftCorner.translate(0,-l)).line(i.topLeftCorner).addClass("fabric sa")),n},after:[mc,uc]};const Cc={name:"onyx.hood",draft:function({Path:t,Point:e,paths:o,points:i,measurements:a,options:n,absoluteOptions:r,part:l,store:c,sa:p,macro:h,snippets:d,Snippet:f,scale:m}){if("hood"!==n.neckStyle)return l.hide();const u=c.get("neckLengthFront")+c.get("neckLengthBack")+c.get("neckLengthSide"),g=c.get("neckRadius")*n.neckBalance,b=.4*a.head*n.hoodHeight,k=.6*a.head*n.hoodHeight,w=(.6-n.hoodFrontDip)*a.head*n.hoodHeight,C=2*n.hoodFrontPieceSize-1,v=C*Math.PI/2;let T=u;for(let s=0;s<10;s++){i.frontNeck=new e(-T/2,g),i.backNeck=new e(T/2,-g),i.frontNeckCp2=new e(-T/6,g),i.backNeckCp1=new e(T/6,-g);const o=u/(new t).move(i.frontNeck).curve(i.frontNeckCp2,i.backNeckCp1,i.backNeck).length();if(T*=o,Math.abs(o-1)<1e-5)break}return i.frontNeck=new e(T/2*C,-g*Math.sin(v)),i.backNeck=new e(T/2,-g),i.backHead=new e(a.head/4*n.hoodDepth,-b),i.centerTop=new e(0,-k),i.frontTop=new e(T/2*C,C*C*(k-w)-k),n.hoodFrontPieceSize<.001&&(i.frontTop.x-=a.head*n.hoodFrontBonus),i.frontNeckCp2=i.frontNeck.translate(T*(1-n.hoodFrontPieceSize)/3,g*(1-n.hoodFrontPieceSize)/3*Math.PI*-Math.cos(v)),i.backNeckCp1=i.backNeck.translate(-T*(1-n.hoodFrontPieceSize)/3,0),i.backNeckCp2=new e(T/2,2*-g/3+1*-b/3),i.backHeadCp1=new e(a.head/4*n.hoodDepth,(1*-g+2*-b)/3),i.backHeadCp2=new e(a.head/4*n.hoodDepth,i.backHead.y*(1-s.Qr)+i.centerTop.y*s.Qr),i.centerTopCp1=new e(a.head/4*s.Qr*n.hoodDepth,-k),i.centerTopCp2=new e(2*i.centerTop.x/3+2*i.frontTop.x/5,i.centerTop.y),i.frontTopCp1=new e(1*i.centerTop.x/6+5*i.frontTop.x/6,1*i.centerTop.y/3+2*i.frontTop.y/3),o.saBase=(new t).move(i.frontNeck).curve(i.frontNeckCp2,i.backNeckCp1,i.backNeck).curve(i.backNeckCp2,i.backHeadCp1,i.backHead).curve(i.backHeadCp2,i.centerTopCp1,i.centerTop).curve(i.centerTopCp2,i.frontTopCp1,i.frontTop).addClass("fabric").hide(),o.hemBase=(new t).move(i.frontTop).line(i.frontNeck).hide(),o.seam=o.saBase.join(o.hemBase).close().attr("class","fabric"),h("vd",{id:"hBackToTop",from:i.backHead,to:i.centerTop,x:i.backHead.x+(p+15)}),h("vd",{id:"hNeckToBack",from:i.backNeck,to:i.backHead,x:i.backHead.x+(p+15)}),h("vd",{id:"hNeck",from:i.frontNeck,to:i.backNeck,x:i.backHead.x+(p+15)}),h("vd",{id:"hBackNeckToTop",from:i.backNeck,to:i.centerTop,x:i.backHead.x+(p+30)}),h("vd",{id:"hTotalHeight",from:i.frontNeck,to:i.centerTop,x:i.backHead.x+(p+45)}),h("vd",{id:"hFront",from:i.frontNeck,to:i.frontTop,x:i.frontTop.x-(p+15)}),h("hd",{id:"wTopToBack",from:i.centerTop,to:i.backHead,y:i.centerTop.y-(p+15)}),h("hd",{id:"wFrontToTop",from:i.frontTop,to:i.centerTop,y:i.centerTop.y-(p+15)}),h("hd",{id:"wFrontToBack",from:i.frontTop,to:i.backHead,y:i.centerTop.y-(p+30)}),h("hd",{id:"wNeck",from:i.frontNeck,to:i.backNeck,y:i.frontNeck.y+(p+15)}),h("pd",{id:"lNeck",path:(new t).move(i.frontNeck).curve(i.frontNeckCp2,i.backNeckCp1,i.backNeck),d:15}),i.grainlineBottom=new e(0,-.03*a.head).shift(0,.03*u),i.grainlineTop=i.centerTop.shift(270,.03*a.head).shift(0,.03*u),h("grainline",{from:i.grainlineTop,to:i.grainlineBottom}),c.cutlist.addCut({cut:2,from:"fabric"}),i.title=new e(u/6,.3*-a.head),h("title",{at:i.title,nr:7,title:"onyx:hood"}),i.logo=i.title.translate(20*m,-70*m),d.logo=new f("logo",i.logo),p&&(o.sa=o.saBase.offset(p).join(o.hemBase.offset(n.hoodFrontPieceSize>0?p:r.hoodHem)).close().addClass("fabric sa")),n.hoodFrontPieceSize>0&&(c.set("hoodFrontPieceBackTop",i.frontTop),c.set("hoodFrontPieceFrontTop",new e(-T/2,-w)),c.set("hoodFrontPieceFrontBottom",new e(-T/2,g)),c.set("hoodFrontPieceBackBottom",i.frontNeck),c.set("hoodFrontPieceCurve",(g+(k-w))*n.hoodFrontPieceSize*n.hoodFrontPieceSize*4/3),c.set("hoodFrontPieceNeckLength",u*n.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:i,measurements:a,options:s,absoluteOptions:n,part:r,
1store:l,sa:c,macro:p,snippets:h,Snippet:d,scale:f}){if("hood"!==s.neckStyle||s.hoodFrontPieceSize<.001)return r.hide();const m=l.get("hoodFrontPieceCurve"),u=l.get("hoodFrontPieceNeckLength");i.hoodFrontPieceBackTop=l.get("hoodFrontPieceBackTop"),i.hoodFrontPieceFrontTop=l.get("hoodFrontPieceFrontTop"),i.hoodFrontPieceFrontBottom=l.get("hoodFrontPieceFrontBottom"),i.hoodFrontPieceBackBottom=l.get("hoodFrontPieceBackBottom");let g=u;for(let b=0;b<10;b++){i.backTop=new e(i.hoodFrontPieceBackTop.x,0),i.frontTop=i.backTop.translate(-g,0),i.backBottom=new e(i.hoodFrontPieceBackBottom.x,i.hoodFrontPieceBackBottom.y-i.hoodFrontPieceBackTop.y),i.frontBottom=i.backBottom.translate(-g,0),i.frontBottom.y=i.hoodFrontPieceFrontBottom.y-i.hoodFrontPieceFrontTop.y,i.frontBottomCp2=new e(2*i.frontBottom.x/3+1*i.backBottom.x/3,2*i.frontBottom.y/3+1*i.backBottom.y/3+m),i.backBottomCp1=new e(1*i.frontBottom.x/3+2*i.backBottom.x/3,1*i.frontBottom.y/3+2*i.backBottom.y/3+m);const o=u/(new t).move(i.frontBottom).curve(i.frontBottomCp2,i.backBottomCp1,i.backBottom).length();if(g*=o,Math.abs(o-1)<1e-5)break}return i.backTop=new e(i.hoodFrontPieceBackTop.x,0),i.frontTop=new e(i.hoodFrontPieceFrontTop.x-a.head*s.hoodFrontBonus,0),i.frontTop.x=Math.min(i.frontTop.x,i.backTop.x),i.frontBottom=new e(i.hoodFrontPieceFrontBottom.x,i.hoodFrontPieceFrontBottom.y-i.hoodFrontPieceFrontTop.y),i.backBottom=new e(i.hoodFrontPieceBackBottom.x,i.hoodFrontPieceBackBottom.y-i.hoodFrontPieceBackTop.y),i.frontTopCp2=i.frontTop.translate(0,1*(i.frontBottom.y-i.frontTop.y)/3),i.frontBottomCp1=i.frontBottom.translate(0,1*(i.frontTop.y-i.frontBottom.y)/3),i.frontBottomCp2=ne
1w e(2*i.frontBottom.x/3+1*i.backBottom.x/3,2*i.frontBottom.y/3+1*i.backBottom.y/3+m),i.backBottomCp1=new e(1*i.frontBottom.x/3+2*i.backBottom.x/3,1*i.frontBottom.y/3+2*i.backBottom.y/3+m),o.saBase=(new t).move(i.frontBottom).curve(i.frontBottomCp2,i.backBottomCp1,i.backBottom).line(i.backTop).addClass("fabric").hide(),o.saHem=(new t).move(i.frontTop).curve(i.frontTopCp2,i.frontBottomCp1,i.frontBottom).addClass("fabric").hide(),o.foldBase=(new t).move(i.backTop).line(i.frontTop).hide(),o.seam=o.saBase.join(o.foldBase).join(o.saHem).attr("class","fabric"),p("vd",{id:"hFrontHeight",from:i.frontTop,to:i.frontBottom,x:i.frontTop.x-(c+15)}),p("vd",{id:"hTotalHeight",from:i.frontTop,to:o.saBase.edge("bottom"),x:i.frontTop.x-(c+30)}),p("vd",{id:"hBackHeight",from:i.backTop,to:i.backBottom,x:i.backTop.x+(c+15)}),p("hd",{id:"wTopWidth",from:i.frontTop,to:i.backTop,y:i.frontTop.y-(c+15)}),p("pd",{id:"lNeck",path:(new t).move(i.frontBottom).curve(i.frontBottomCp2,i.backBottomCp1,i.backBottom),d:15}),i.cutonfoldFrom=i.frontTop,i.cutonfoldTo=i.backTop,p("cutonfold",{from:i.cutonfoldTo,to:i.cutonfoldFrom,grainline:!1,reverse:!0}),i.grainlineFrom=i.backTop.shiftFractionTowards(i.frontTop,.05),i.grainlineTo=new e(i.grainlineFrom.x,i.backBottom.y),p("grainline",{from:i.grainlineFrom,to:i.grainlineTo}),l.cutlist.addCut({cut:1,from:"fabric"}),i.title=new e(7*i.frontBottom.x/8,i.frontBottom.y/2),p("title",{at:i.title,nr:8,title:"onyx:hoodFront"}),i.logo=i.title.translate(40*f,-40*f),h.logo=new d("logo",i.logo),c&&(o.sa=o.saHem.offset(n.hoodHem).join(o.saBase.offset(c)).line(i.frontTop.translate(-n.hoodHem,0)).addClass("fabric sa")),r},after:[Cc]};const Tc={name:"onyx.skirt",draft:function({Path:t,Point:e,paths:o,points:i,measurements:a,options:s,absoluteOptions:n,part:r,store:l,sa:c,expand:p,macro:h,snippets:d,Snippet:f,scale:m}){if(!s.skirt||!p)return r.hide();const u=a.waist*Math.max(s.waistEase,s.skirtWidth),g=a.waistToUpperLeg*s.skirtLength;return i.topLeftCorner=new e(0,0),i.bottomLeftCorner=new e(0,g),i.bottomRightCorner=new e(u/2,g),i.topRightCorner=new e(u/2,0),o.hemBase=(new t).move(i.bottomLeftCorner).line(i.bottomRightCorner).addClass("fabric").hide(!0),o.saBase=(new t).move(i.bottomRightCorner).line(i.topRightCorner).addClass("fabric").hide(),o.waistBase=(new t).move(i.topRightCorner).line(i.topLeftCorner).addClass("fabric").hide(),o.foldBase=(new t).move(i.topLeftCorner).line(i.bottomLeftCorner).hide(),o.seam=o.hemBase.join(o.saBase).join(o.waistBase).join(o.foldBase).close().addClass("fabric"),h("vd",{id:"hSkirt",from:i.topLeftCorner,to:i.bottomLeftCorner,x:-(c+15)}),h("hd",{id:"wSkirt",from:i.topLeftCorner,to:i.topRightCorner,y:-(c+15)}),i.cutonfoldFrom=i.topLeftCorner,i.cutonfoldTo=i.bottomLeftCorner,h("cutonfold",{from:i.cutonfoldFrom,to:i.cutonfoldTo,grainline:!0}),l.cutlist.addCut({cut:1,from:"fabric"}),i.title=new e(u/4,g/2),h("title",{at:i.title,nr:9,title:"onyx:skirt"}),i.logo=i.title.shift(180,50*m),d.logo=new f("logo",i.logo),c&&(o.sa=(new t).move(i.bottomLeftCorner).line(i.bottomLeftCorner.translate(0,n.skirtHem)).line(i.bottomRightCorner.translate(c,n.skirtHem)).line(i.topRightCorner.translate(c,-n.skirtWaistband)).line(i.topLeftCorner.translate(0,-n.skirtWaistband)).line(i.topLeftCorner).addClass("fabric sa")),r},measurements:["waist"]};const yc={name:"onyx.sleeveRibbing",draft:function({Path:t,Point:e,paths:o,points:i,options:a,absoluteOptions:s,part:n,store:r,complete:l,expand:c,sa:p,macro:h}){if(!c||!a.sleeveRibbing)return n.hide();const d=r.get("sleeveWidth")*a.sleeveRibbingLength,f=2*s.sleeveRibbingWidth;return i.topLeftCorner=new e(0,0),i.bottomLeftCorner=new e(0,f),i.bottomRightCorner=new e(d/2,f),i.topRightCorner=new e(d/2,0),i.leftCenter=new e(0,f/2),i.rightCenter=new e(d/2,f/2),o.saBase=(new t).move(i.bottomLeftCorner).line(i.bottomRightCorner).line(i.topRightCorner).line(i.topLeftCorner).addClass("fabric").hide(),o.foldBase=(new t).move(i.topLeftCorner).line(i.bottomLeftCorner).hide(),l&&(o.foldLine=(new t).move(i.leftCenter).line(i.rightCenter).addClass("various dashed").addText("onyx:foldLine","center")),o.seam=o.saBase.join(o.foldBase).close().addClass("fabric"),h("vd",{id:"vdSleeveRibbing",from:i.topLeftCorner,to:i.bottomLeftCorner,x:-(p+15)}),h("hd",{id:"hdSleeveRibbing",from:i.topLeftCorner,to:i.topRightCorner,y:-(p+15)}),i.cutonfoldFrom=i.topLeftCorner,i.cutonfoldTo=i.bottomLeftCorner,h("cutonfold",{from:i.cutonfoldFrom,to:i.cutonfoldTo,grainline:!0}),r.cutlist.addCut({cut:2,from:"ribbing"}),i.title=new e(d/4,f/2),h("title",{at:i.title,nr:10,title:"onyx:sleeveRibbing"}),p&&(o.sa=(new t).move(i.bottomLeftCorner).line(i.bottomLeftCorner.translate(0,p)).line(i.bottomRightCorner.translate(p,p)).line(i.topRightCorner.translate(p,-p)).line(i.topLeftCorner.translate(0,-p)).line(i.topLeftCorner).addClass("fabric sa")),n},after:gc};const xc={name:"onyx.legRibbing",draft:function({Path:t,Point:e,paths:o,points:i,options:a,absoluteOptions:s,part:n,store:r,complete:l,expand:c,sa:p,macro:h}){if(!c||!a.legRibbing)return n.hide();const d=r.get("legWidth")*a.legRibbingLength,f=2*s.legRibbingWidth;return i.topLeftCorner=new e(0,0),i.bottomLeftCorner=new e(0,f),i.bottomRightCorner=new e(d/2,f),i.topRightCorner=new e(d/2,0),i.leftCenter=new e(0,f/2),i.rightCenter=new e(d/2,f/2),o.saBase=(new t).move(i.bottomLeftCorner).line(i.bottomRightCorner).line(i.topRightCorner).line(i.topLeftCorner).addClass("fabric").hide(),o.foldBase=(new t).move(i.topLeftCorner).line(i.bottomLeftCorner).hide(),l&&(o.foldLine=(new t).move(i.leftCenter).line(i.right
1Center).addClass("various dashed").addText("onyx:foldLine","center")),o.seam=o.saBase.join(o.foldBase).close().addClass("fabric"),h("vd",{id:"vdLegRibbing",from:i.topLeftCorner,to:i.bottomLeftCorner,x:-(p+15)}),h("hd",{id:"hdLegRibbing",from:i.topLeftCorner,to:i.topRightCorner,y:-(p+15)}),i.cutonfoldFrom=i.topLeftCorner,i.cutonfoldTo=i.bottomLeftCorner,h("cutonfold",{from:i.cutonfoldFrom,to:i.cutonfoldTo,grainline:!0}),r.cutlist.addCut({cut:2,from:"ribbing"}),i.title=new e(d/4,f/2),h("title",{at:i.title,nr:11,title:"onyx:legRibbing"}),p&&(o.sa=(new t).move(i.bottomLeftCorner).line(i.bottomLeftCorner.translate(0,p)).line(i.bottomRightCorner.translate(p,p)).line(i.topRightCorner.translate(p,-p)).line(i.topLeftCorner.translate(0,-p)).line(i.topLeftCorner).attr("class","fabric sa")),n},after:[fc]},Bc=new s.pT({data:hc,parts:[mc,uc,gc,bc,kc,wc,Cc,vc,Tc,yc,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:i,Path:a,points:s,paths:n,Snippet:r,snippets:l,sa:c,complete:p,macro:h,part:d,store:f,utils:m,scale:u}){s.cfWaist=new i(-t.waistFrontArc*(1+e.waistEase)*(1-e.waistBalance),0),s.cfSeat=new i(-t.seatFrontArc*(1+e.seatEase)*(1-e.seatBalance),t.waistToSeat),s.crossSeamCurveStart=s.cfWaist.shiftFractionTowards(s.cfSeat,e.crotchSeamCurveStart),s.fork=new i(-t.upperLeg/2*e.thighShape*(1+e.crotchEase-e.crotchForkBalance),t.waistToUpperLeg*(1+e.crotchDrop)),s.crossSeamCurveMax=m.beamsIntersect(s.cfWaist,s.cfSeat,s.fork,s.fork.shift(0,1337)),s.crossSeamCurveCp1=s.crossSeamCurveStart.shiftFractionTowards(s.crossSeamCurveMax,e.crotchSeamCurveBend),s.crossSeamCurveCp2=s.fork.shiftFractionTowards(s.crossSeamCurveMax,e.crotchSeamCurveBend).rotate(e.crotchSeamCurveAngle,s.fork),f.set("forkYCoordinate",s.fork.y);const g=(t.waistToFloor-s.fork.y)*e.legLength,b=Math.min(1,e.legLength/e.anklePosition),k=t.upperLeg*(1-b)+t.ankle*b;s.inseamHem=new i(-(1+e.legHemEase)*k/2*(1-e.legBalance),s.fork.y+g),s.outseamHem=new i(0,s.fork.y+g),s.waist=new i(0,0),s.cfWaist=s.cfWaist.shiftFractionTowards(s.cfSeat,-e.waistPosition),s.waist.y=s.cfWaist.y;const w=s.waist.dist(s.cfWaist);return s.slashTop=s.waist.shiftTowards(s.cfWaist,w*e.pocketSlashOpeningWidth),s.slashSide=s.waist.shiftTowards(s.outseamHem,w*e.pocketSlashOpeningHeight),s.slashOutlineTopOutside=s.waist,s.slashOutlineTopInside=s.waist.shiftTowards(s.cfWaist,w*e.pocketSlashWidth),s.slashOutlineBottomOutside=s.waist.shiftTowards(s.outseamHem,w*e.pocketSlashHeight),s.slashOutlineBottomInside=new i(s.slashOutlineTopInside.x,s.slashOutlineBottomOutside.y),s.forkCp2=s.crossSeamCurveCp2.rotate(-90,s.fork),s.inseamHemCp1=s.inseamHem.shiftFractionTowards(s.forkCp2,2/3),s.slashMax=new i(s.slashTop.x,s.slashSide.y),s.slashSideCp2=s.slashSide.shiftFractionTowards(s.slashM
1ax,e.pocketSlashOpeningCurve),s.slashTopCp1=s.slashTop.shiftFractionTowards(s.slashMax,e.pocketSlashOpeningCurve),f.set("waistYCoordinate",s.cfWaist.y),f.set("cfWaist",s.cfWaist),f.set("waist",s.waist),f.set("waistDist",w),e.pocketSlash&&(n.slashPocketOutline=(new a).move(s.slashOutlineTopOutside).line(s.slashOutlineTopInside).line(s.slashOutlineBottomInside).line(s.slashOutlineBottomOutside).line(s.slashOutlineTopOutside).close().addClass("lining dashed")),e.pocketSlash?n.seam=(new a).move(s.outseamHem).line(s.slashSide).curve(s.slashSideCp2,s.slashTopCp1,s.slashTop).line(s.cfWaist).line(s.crossSeamCurveStart).curve(s.crossSeamCurveCp1,s.crossSeamCurveCp2,s.fork).curve(s.forkCp2,s.inseamHemCp1,s.inseamHem).addClass("fabric"):n.seam=(new a).move(s.outseamHem).line(s.waist).line(s.cfWaist).line(s.crossSeamCurveStart).curve(s.crossSeamCurveCp1,s.crossSeamCurveCp2,s.fork).curve(s.forkCp2,s.inseamHemCp1,s.inseamHem).addClass("fabric"),n.hem=(new a).move(s.inseamHem).line(s.outseamHem).addClass("fabric"),c&&(s.inseamHemAllowance=s.inseamHem.translate(-c,o.legHemAllowance),s.outseamHemAllowance=s.outseamHem.translate(c,o.legHemAllowance),n.sa=n.seam.offset(c).line(s.inseamHemAllowance).line(s.outseamHemAllowance).close().addClass("fabric sa")),p&&(n.hint=(new a).move(s.crossSeamCurveStart).line(s.crossSeamCurveMax).line(s.fork).addClass("note help")),e.pocketSlash&&h("hd",{id:"wWaistSlash",from:s.cfWaist,to:s.slashTop,y:s.waist.y-(c+15)}),e.pocketSlash&&h("hd",{id:"wWaistExSlash",from:s.slashTop,to:s.waist,y:s.waist.y-(c+15)}),h("hd",{id:"wWaistTotal",from:s.cfWaist,to:s.waist,y:s.waist.y-(c+30)}),h("hd",{id:"wWaistToCrossSeamCurveStart",from:s.crossSeamCurveStart,to:s.cfWaist,y:s.waist.y-(c+15),noStartMarker:!0,noEndMarker:!0}),h("hd",{id:"wCrossSeamCurveStartToCrossCurveSeamMax",from:s.crossSeamCurveMax,to:s.crossSeamCurveStart,y:s.waist.y-(c+15),noStartMarker:!0,noEndMarker:!0}),h("hd",{id:"wCrossSeamCurveMaxToFork",from:s.fork,to:s.crossSeamCurveMax,y:s.waist.y-(c+15),noStartMarker:!0,noEndMarker:!0}),h("hd",{id:"wCrossSeamCurveStartToFork",from:s.fork,to:s.crossSeamCurveStart,y:s.waist.y-(c+30)}),h("hd",{id:"wWidthAtFork",from:s.fork,to:s.waist,y:s.waist.y-(c+45)}),h("hd",{id:"wHem",from:s.inseamHem,to:s.outseamHem,y:s.outseamHem.y+(c+15)}),h("hd",{id:"wForkToHem",from:s.fork,to:s.inseamHem,y:s.inseamHem.y+(c+15)}),e.pocketSlash&&h("vd",{id:"vSlashOpening",from:s.waist,to:s.slashSide,x:s.waist.x+(c+15)}),e.pocketSlash&&h("vd",{id:"vOutseam",from:s.slashSide,to:s.outseamHem,x:s.waist.x+(c+15)}),h("vd",{id:"vTotal",from:s.waist,to:s.outseamHem,x:s.waist.x+(c+30)}),h("vd",{id:"vLegHemAllowance",from:s.outseamHem,to:c?s.outseamHemAllowance:s.outseamHem,x:s.waist.x+(c+15),noStartMarker:!0,noEndMarker:!0}),h("vd",{id:"vWaistToCrossSeamCurveStart",from:s.cfWaist,to:s.crossSeamCurveStart,x:s.fork.x-(c+15)}),h("vd",{id:"vCrossSeamCurveStartToFork",from:s.crossSeamCurveStart,to:s.fork,x:s.fork.x-(c+15)}),h("vd",{id:"vWaistToFork",from:s.cfWaist,to:s.fork,x:s.fork.x-(c+30)}),h("vd",{id:"vForkToHem",from:s.fork,to:s.inseamHem,x:s.fork.x-(c+30)}),s.grainlineTop=s.slashSide.translate(.05*-w,0),s.grainlineBottom=new i(s.grainlineTop.x,s.outseamHem.y),h("grainline",{from:s.grainlineTop,to:s.grainlineBottom}),f.cutlist.addCut({cut:2,from:"fabric"}),s.title=s.cfWaist.shiftFractionTowards(s.outseamHem,.5),h("title",{at:s.title,nr:1,title:"opal:front"}),s.logo=s.title.translate(20*-u,35*u),l.logo=new r("logo",s.logo),s.scalebox=s.title.translate(0,100*-u),h("scalebox",{at:s.scalebox}),d}};const Rc={name:"opal.bib",draft:function({measurements:t,options:e,absoluteOptions:o,Point:i,Path:a,points:s,paths:n,Snippet:r,snippets:l,sa:c,macro:p,part:h,store:d,scale:f,utils:m}){const u=t.hpsToWaistFront+t.hpsToWaistBack;return s.cfWaist=d.get("cfWaist").copy().translate(0,t.waistFront*e.bibWaistDrop),s.outseamWaist=d.get("waist"),s.cfWaistCp2=s.cfWaist.translate(1*s.cfWaist.dist(s.outseamWaist)/3,0),s.outseamTopCp1=s.cfWaist.translate(1*s.cfWaist.dist(s.outseamWaist)/2,0).shiftFractionTowards(s.outseamWaist,1/3),n.waistCurve=(new a).move(s.cfWaist).curve(s.cfWaistCp2,s.outseamTopCp1,s.outseamWaist).hide(),s.outseamWaist=s.outseamWaist.translate(s.cfWaist.dx(s.outseamWaist)-n.waistCurve.length(),0),s.cfWaistCp2=s.cfWaist.translate(1*s.cfWaist.dist(s.outseamWaist)/3,0),s.outseamTopCp1=s.cfWaist.translate(1*s.cfWaist.dist(s.outseamWaist)/2,0).shiftFractionTowards(s.outseamWaist,1/3),n.waist
1Curve=(new a).move(s.outseamWaist.flipX(s.cfWaist)).curve(s.outseamTopCp1.flipX(s.cfWaist),s.cfWaistCp2.flipX(s.cfWaist),s.cfWaist).curve(s.cfWaistCp2,s.outseamTopCp1,s.outseamWaist).hide(),s.outseamTop=s.outseamWaist.translate(0,-u*e.outseamHeight),s.topSide=new i(s.cfWaist.x*(1-e.bibWidth),-t.hpsToWaistFront*e.bibHeight),s.cfTop=new i(s.cfWaist.x,-t.hpsToWaistFront*e.bibHeight),d.set("bibFrontHeight",-s.cfTop.y),s.cfMax=s.cfWaist.translate(0,1*-s.cfWaist.dist(s.cfTop)/2),s.cfTopCp2=s.cfTop.shiftFractionTowards(s.cfMax,2/3),s.cfWaistCp1=s.cfWaist.shiftFractionTowards(s.cfMax,2/3),s.placketCenterBottom=s.cfTop.translate(0,o.bibPlacketWidth),s.placketSideBottom=m.beamIntersectsY(s.topSide,s.outseamTop,s.placketCenterBottom.y),e.bibPlacketLayers>0&&(n.placket=(new a).move(s.placketSideBottom.flipX(s.placketCenterBottom)).line(s.placketSideBottom),n.placket.setClass("fabric dashed"),n.placket.addText("opal:bibPlacket","center"),d.set("bibPlacketLengthTop",2*s.cfTop.dist(s.topSide)),d.set("bibPlacketLengthBottom",2*s.placketCenterBottom.dist(s.placketSideBottom))),s.pocketCenterTop=s.cfWaist.shiftFractionTowards(s.cfTop,e.pocketBibVerticalPosition+e.pocketBibHeight/2),s.pocketCenterBottom=s.pocketCenterTop.translate(0,s.cfWaist.dist(s.cfTop)*e.pocketBibHeight),s.pocketSideTop=s.pocketCenterTop.translate(s.cfWaist.dx(s.outseamWaist)*e.pocketBibWidth,0),s.pocketSideBottom=s.pocketCenterBottom.translate(s.cfWaist.dx(s.outseamWaist)*e.pocketBibWidth,0),s.pocketFeatureSide=s.pocketCenterBottom.translate(s.cfWaist.dx(s.outseamWaist)*e.pocketBibFeatureWidth,s.cfWaist.dy(s.cfTop)*e.pocketBibFeatureHeight),"hexagon"!==e.pocketBibStyle&&"curvedBottom"!==e.pocketBibStyle||(s.pocketMax=s.pocketSideBottom.copy(),s.pocketFeatureSide=s.pocketCenterBottom.translate(s.cfWaist.dx(s.outseamWaist)*e.pocketBibWidth,s.cfWaist.dy(s.cfTop)*e.pocketBibFeatureHeight),s.pocketSideBottom=s.pocketCenterBottom.translate(s.cfWaist.dx(s.pocketSideTop)*e.pocketBibFeatureWidth,0),s.pocketSideBottomCp2=s.pocketSideBottom.shiftFractionTowards(s.pocketMax,e.pocketBibFeatureCurve),s.pocketFeatureSideCp1=s.pocketFeatureSide.shiftFractionTowards(s.pocketMax,e.pocketBibFeatureCurve)),n.seam=(new a).move(s.outseamTop.flipX(s.cfWaist)).line(s.outseamWaist.flipX(s.cfWaist)).curve(s.outseamTopCp1.flipX(s.cfWaist),s.cfWaistCp2.flipX(s.cfWaist),s.cfWaist).curve(s.cfWaistCp2,s.outseamTopCp1,s.outseamWaist).line(s.outseamTop),n.hem=(new a).move(s.outseamTop).line(s.topSide).line(s.topSide.flipX(s.cfTop)).line(s.outseamTop.flipX(s.cfWaist)).addClass("fabric"),e.pocketBib&&(n.bibPocketHem=(new a).move(s.pocketSideTop).line(e.bibPocketOnFold?s.pocketCenterTop:s.pocketSideTop.flipX(s.pocketCenterTop)).addClass("fabric dashed"),"pentagon"===e.pocketBibStyle&&e.bibPocketOnFold&&(n.bibPocketSeam=(new a).move(s.pocketCenterTop).line(s.pocketCenterBottom).line(s.pocketFeatureSide).line(s.pocketSideTop).addClass("fabric dashed")),"pentagon"!==e.pocketBibStyle||e.bibPocketOnFold||(n.bibPocketSeam=(new a).move(s.pocketSideTop.flipX(s.pocketCenterTop)).line(s.pocketFeatureSide.flipX(s.pocketCenterTop)).line(s.pocketCenterBottom).line(s.pocketFeatureSide).line(s.pocketSideTop).addClass("fabric dashed")),"hexagon"===e.pocketBibStyle&&e.bibPocketOnFold&&(n.bibPocketSeam=(new a).move(s.pocketCenterTop).line(s.pocketCenterBottom).line(s.pocketSideBottom).line(s.pocketFeatureSide).line(s.pocketSideTop).addClass("fabric dashed")),"hexagon"!==e.pocketBibStyle||e.bibPocketOnFold||(n.bibPocketSeam=(new a).move(s.pocketSideTop.flipX(s.pocketCenterTop)).line(s.pocketFeatureSide.flipX(s.pocketCenterTop)).line(s.pocketSideBottom.flipX(s.pocketCenterTop)).line(s.pocketSideBottom).line(s.pocketFeatureSide).line(s.pocketSideTop).addClass("fabric dashed")),"curvedBottom"===e.pocketBibStyle&&e.bibPocketOnFold&&(n.bibPocketSeam=(new a).move(s.pocketCenterTop).line(s.pocketCenterBottom).line(s.pocketSideBottom).curve(s.pocketSideBottomCp2,s.pocketFeatureSideCp1,s.pocketFeatureSide).line(s.pocketSideTop).addClass("fabric dashed")),"curvedBottom"!==e.pocketBibStyle||e.bibPocketOnFold||(n.bibPocketSeam=(new a).move(s.pocketSideTop.flipX(s.pocketCenterTop)).line(s.pocketFeatureSide.flipX(s.pocketCenterTop)).curve(s.pocketFeatureSideCp1.flipX(s.pocketCenterTop),s.pocketSideBottomCp2.flipX(s.pocketCenterTop),s.pocketSideBottom.flipX(s.pocketCenterTop)).line(s.pocketSideBottom).curve(s.pocketSideBottomCp2,s.pocketFeatureSideCp1,s.pocketFeatureSide).line(s.pocketSideTop).addClass("fabric dashed")),"rectangle"===e.pocketBibStyle&&e.bibPocketOnFold&&(n.bibPocketSeam=(new a).move(s.pocketCenterTop).line(s.pocketCenterBottom).line(s.pocketSideBottom).line(s.pocketSideTop).addClass("fabric dashed")),"rectangle"!==e.pocketBibStyle||e.bibPocketOnFold||(n.bibPocketSeam=(new a).move(s.pocketSideTop.flipX(s.pocketCenterTop)).line(s.pocketSideBottom.flipX(s.pocketCenterTop)).line(s.pocketSideBottom).line(s.pocketSideTop).addClass("fabric dashed")),d.set("bibPocketCenter",s.pocketCenterTop.shiftFractionTowards(s.pocketCenterBottom,.5))),s.bibPocketText=s.pocketCenterTop.shiftFractionTowards(s.pocketCenterBottom,1/16).addText("opal:pocketBib","center"),c&&(n.sa=n.seam.offset(c).join(n.hem.offset(o.hemAllowance)).close().addClass("fabric sa")),p("pd",{id:"pWaistCurve",path:n.waistCurve}),p("hd",{id:"wBibTrapezoidalPart",from:s.topSide,to:s.outseamTop,y:s.cfTop.y-(o.hemAllowance+15)}),p("vd",{id:"hOutseam",from:s.outseamTop,to:s.outseamWaist,x:s.outseamWaist.x+(c+15)}),p("vd",{id:"hBibTrapezoidalPart",from:s.topSide,to:s.outseamTop,x:s.outseamWaist.x+(c+15)}),p("vd",{id:"hOutside",from:s.topSide,to:s.outseamWaist,x:s.outseamWaist.x+(c+30)}),p("vd",{id:"hCurve",from:s.outseamWaist,to:s.cfWaist,x:s.outseamWaist.x+(c+15),noStartMarker:!0,noEndMarker:!0}),p("vd",{id:"hTotal",from:s.topSide,to:s.cfWaist,x:s.outseamWaist.x+(c+45)}),p("hd",{id:"wTop",from:s.topSide.flipX(s.cfTop),to:s.topSide,y:s.topSide.y-(o.hemAllowance+15)}),p("hd",{id:"wTotal",from:s.outseamTop.flipX(s.cfTop),to:s.outseamTop,y:s.cfTop.y-(o.hemAllowance+30)}),s.grainlineTop=s.cfTop,s.grainlineBottom=s.cfWaist,p("grainline",{from:s.grainlineTop,to:s.grainlineBottom}),d.cutlist.addCut({cut:1,from:"fabric"}),s.title=s.cfTop.shiftFractionTowards(s.cfWaist,.5).translate(20*f,15*f),p("title",{at:s.title,nr:3,title:"opal:bib"}),s.logo=s.title.translate(35*-f,35*f),l.logo=new r("logo",s.logo),h},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:i,Path:a,points:s,paths:n,Snippet:r,snippets:l,sa:c,complete:p,macro:h,part:d,store:f,utils:m,scale:u}){const g=t.hpsToWaistFront+t.hpsToWaistBack;s.cfWaist=new i(-t.waistBackArc*(1+e.waistEase)*(1+e.waistBalance),0),s.cfSeat=new i(-t.seatBackArc*(1+e.seatEase)*(1+e.seatBalance),t.waistToSeat),s.crossSeamCurveStart=s.cfWaist.shiftFractionTowards(s.cfSeat,e.crossSeamCurveStart),s.fork=new i(-t.upperLeg/2*e.thighShape*(1+e.crotchEase+e.crotchForkBalance),t.waistToUpperLeg*(1+e.crotchDrop)),s.crossSeamCurveMax=m.beamsIntersect(s.cfWaist,s.cfSeat,s.fork,s.fork.shift(0,1337)),s.crossSeamCurveCp1=s.crossSeamCurveStart.shiftFractionTowards(s.crossSeamCurveMax,e.crossSeamCurveBend),s.crossSeamCurveCp2=s.fork.shiftFractionTowards(s.crossSeamCurveMax,e.crossSeamCurveBend).rotate(e.crossSeamCurveAngle,s.fork);const b=(t.waistToFloor-s.fork.y)*e.legLength,k=Math.min(1,e.legLength/e.anklePosition),w=t.upperLeg*(1-k)+t.ankle*k;s.inseamHem=new i(-(1+e.legHemEase)*w/2*(1+e.legBalance),s.fork.y+b),s.outseamHem=new i(0,s.fork.y+b),s.waist=new i(0,0),s.cfWaist.y=f.get("waistYCoordinate"),s.waist.y=s.cfWaist.y-g*e.outseamHeight;const C=1/s.crossSeamCurveStart.slope(s.cfWaist);s.bibHexagonBottom=new i(0,-t.hpsToWaistBack*(e.backBibHexagonVerticalPosition-.5*e.backBibHexagonHeight)),s.bibHexagonBottom.x=s.cfWaist.x+.5*s.bibHexagonBottom.y*C,s.bibHexagonCenter=s.bibHexagonBottom.translate(0,+t.hpsToWaistBack*(-.5*e.backBibHexagonHeight)),s.bibHexagonLowerInside=s.bibHexagonCenter.translate(t.waist/4*e.backBibHexagonWidth,t.hpsToWaistBack*(.5*e.backBibHexagonSideHeight)),s.bibHexagonUpperInside=s.bibHexagonCenter.translate(t.waist/4*e.backBibHexagonWidth,t.hpsToWaistBack*(-.5*e.backBibHexagonSideHeight)),s.bibHexagonTop=s.bibHexagonCenter.translate(0,+t.hpsToWaistBack*(-.5*e.backBibHexagonHeight)),s.bibHexagonLowerOutside=s.bibHexagonCenter.translate(-t.waist/4*e.backBibHexagonWidth,t.hpsToWaistBack*(.5*e.backBibHexagonSideHeight)),s.bibHexagonUpperOutside=s.bibHexagonCenter.translate(-t.waist/4*e.backBibHexagonWidth,t.hpsToWaistBack*(-.5*e.backBibHexagonSideHeight));const v=(g-f.get("bibFrontHeight")+s.bibHexagonTop.y)*e.strapLength,T=e.strapWidth*g;s.strapTaperOutside=new i(s.bibHexagonUpperOutside.x+t.waistBack*e.strapPosition,s.bibHexagonTop.y-e.strapTaperPosition*v),s.strapTaperInside=s.strapTaperOutside.translate(T,0),s.strapEndOutside=s.strapTaperOutside.translate(0,-v*(1-e.strapTaperPosition)),s.strapEndInside=s.strapEndOutside.translate(T,0),s.forkCp2=s.crossSeamCurveCp2.rotate(-90,s.fork),s.inseamHemCp1=s.inseamHem.shiftFractionTowards(s.forkCp2,2/3),s.bibCurveMax=m.beamsIntersect(s.waist,s.waist.shift(180-e.backBibBaseAngle,9001),s.bibHexagonLowerInside,s.bibHexagonUpperInside),s.bibCurveMax.y<s.bibHexagonLowerInside.y&&(s.bibCurveMax.y=s.bibHexagonLowerInside.y),s.waistCp2=s.waist.shiftFractionTowards(s.bibCurveMax,e.backBibBaseCurve),s.bibHexagonLowerInsideCp1=s.bibHexagonLowerInside.shiftFractionTowards(s.bibCurveMax,e.backBibBaseCurve),s.strapTaperCurveMax=m.beamIntersectsX(s.bibHexagonUpperInside,s.bibHexagonTop,s.strapEndInside.x),s.strapTaperInside.y>s.strapTaperCurveMax.y&&(s.strapTaperInside.y=s.strapTaperCurveMax.y,s.strapTaperOutside.y=s.strapTaperCurveMax.y),s.bibHexagonTopCp2=s.bibHexagonTop.shiftFractionTowards(s.strapTaperCurveMax,e.strapTaperCurve),s.strapTaperInsideCp1=s.strapTaperInside.shiftFractionTowards(s.strapTaperCurveMax,e.strapTaperCurve),s.strapTaperOutsideCp2=s.strapTaperOutside.translate(0,1*s.strapTaperOutside.dy(s.bibHexagonUpperOutside)/2),s.bibHexagonUpperOutsideCp1=s.bibHexagonUpperOutside.translate(0,1*s.bibHexagonUpperOutside.dy(s.strapTaperOutside)/6),s.cfBackMax=m.beamsIntersect(s.bibHexagonBottom,s.bibHexagonTop,s.cfWaist,s.crossSeamCurveStart),s.bibHexagonBottomCp2=s.bibHexagonBottom.shiftFractionTowards(s.cfBackMax,2/3),s.cfWaistCp1=s.cfWaist.shiftFractionTowards(s.cfBackMax,2/3);const y=-s.cfWaist.x;s.backPocket=new i(-y*e.pocketBackPositionX,y*e.pocketBackPositionY).addText("opal:pocketBack","center"),s.backPocketFrontTop=s.backPocket.translate(y*e.pocketBackWidth/2,-y*e.pocketBackHeight/2),s.backPocketBackTop=s.backPocketFrontTop.translate(-y*e.pocketBackWidth,0),s.backPocketFrontBottom=s.backPocketFrontTop.translate(0,y*e.pocketBackHeight),s.backPocketBackBottom=new i(s.backPocketBackTop.x,s.backPocketFrontBottom.y),s.backPocketBackBottomP1=s.backPocketBackBottom.shiftFractionTowards(s.backPocketBackTop,e.pocketBackCornerHeight),s.backPocketBackBottomP2=s.backPocketBackBottom.shiftFractionTowards(s.backPocketFrontBottom,e.pocketBackCornerWidth/2),s.backPocketFrontBottomP1=s.backPocketFrontBottom.shiftFractionTowards(s.backPocketBackBottom,e.pocketBackCornerWidth/2),s.backPocketFrontBottomP2=s.backPocketFrontBottom.shiftFractionTowards(s.backPocketFrontTop,e.pocketBackCornerHeight),s.carpe
1nterPocketTopBack=s.backPocketFrontBottom.translate(y*-e.pocketCarpenterAnchorX,y*-e.pocketCarpenterAnchorY),s.carpenterPocketTopFront=s.carpenterPocketTopBack.translate(y*e.pocketCarpenterAnchorWidth,0),s.carpenterPocketOutseamTop=new i(0,s.carpenterPocketTopBack.y+y*e.pocketCarpenterOpeningHeight),s.carpenterPocketOutseamBottom=new i(0,s.carpenterPocketTopBack.y+y*e.pocketCarpenterHeight),s.carpenterPocketBottomBack=new i(s.carpenterPocketTopBack.x,s.carpenterPocketOutseamBottom.y),s.carpenterPocketExtraOutseamTop=s.carpenterPocketOutseamBottom.translate(0,y*-e.pocketCarpenterExtraHeight),s.carpenterPocketExtraBackTop=new i(s.carpenterPocketBottomBack.x,s.carpenterPocketExtraOutseamTop.y),s.carpenterPocketLabel=s.carpenterPocketTopBack.shiftFractionTowards(s.carpenterPocketOutseamBottom,.4).addText("opal:pocketCarpenter","center"),s.carpenterPocketExtraLabel=s.carpenterPocketBottomBack.shiftFractionTowards(s.carpenterPocketExtraOutseamTop,.5).addText("opal:pocketCarpenterExtra","center"),f.set("carpenterPocketLabel",s.carpenterPocketLabel),f.set("carpenterPocketExtraLabel",s.carpenterPocketExtraLabel),s.hammerLoopTop=s.backPocketFrontBottomP1.shiftFractionTowards(s.backPocketFrontBottomP2,.5),s.hammerLoopMax=s.hammerLoopTop.translate(y*e.hammerLoopCornerX,y*e.hammerLoopCornerY),s.hammerLoopOutseam=new i(0,s.hammerLoopTop.y+y*e.hammerLoopOutseam),s.hammerLoopCp1=s.hammerLoopTop.shiftFractionTowards(s.hammerLoopMax,e.hammerLoopCurve),s.hammerLoopCp2=s.hammerLoopOutseam.shiftFractionTowards(s.hammerLoopMax,e.hammerLoopCurve);const x=y*e.hammerLoopWidth;return n.centerSeam=(new a).move(s.bibHexagonBottom).curve(s.bibHexagonBottomCp2,s.cfWaistCp1,s.cfWaist).line(s.crossSeamCurveStart).curve(s.crossSeamCurveCp1,s.crossSeamCurveCp2,s.fork).curve(s.forkCp2,s.inseamHemCp1,s.inseamHem).addClass("fabric"),n.outseam=(new a).move(s.outseamHem).line(s.waist).addClass("fabric"),n.legHem=(new a).move(s.inseamHem).line(s.outseamHem).addClass("fabric"),n.hem=(new a).move(s.waist).curve(s.waistCp2,s.bibHexagonLowerInsideCp1,s.bibHexagonLowerInside).line(s.bibHexagonUpperInside).line(s.bibHexagonTop).curve(s.bibHexagonTopCp2,s.strapTaperInsideCp1,s.strapTaperInside).line(s.strapEndInside).line(s.strapEndOutside).line(s.strapTaperOutside).curve(s.strapTaperOutsideCp2,s.bibHexagonUpperOutsideCp1,s.bibHexagonUpperOutside).line(s.bibHexagonLowerOutside).line(s.bibHexagonBottom).addClass("fabric"),e.pocketBack&&(n.pocketBackHem=(new a).move(s.backPocketFrontTop).line(s.backPocketBackTop).addClass("fabric dashed"),n.pocketBackSeam=(new a).move(s.backPocketBackTop).line(s.backPocketBackBottomP1).line(s.backPocketBackBottomP2).line(s.backPocketFrontBottomP1).line(s.backPocketFrontBottomP2).line(s.backPocketFrontTop).addClass("fabric dashed")),e.pocketCarpenter&&(n.pocketCarpenterHem=(new a).move(s.carpenterPocketOutseamTop).line(s.carpenterPocketTopFront).addClass("fabric dashed"),n.pocketCarpenterSeam=(new a).move(s.carpenterPocketTopFront).line(s.carpenterPocketTopBack).line(s.carpenterPocketBottomBack).line(s.carpenterPocketOutseamBottom).line(s.carpenterPocketOutseamTop).addClass("fabric dashed")),e.pocketCarpenterExtra&&(n.pocketCarpenterExtraHem=(new a).move(s.carpenterPocketExtraOutseamTop).line(s.carpenterPocketExtraBackTop).addClass("fabric dashed"),n.pocketCarpenterExtraSeam=(new a).move(s.carpenterPocketExtraBackTop).line(s.carpenterPocketBottomBack).line(s.carpenterPocketOutseamBottom).line(s.carpenterPocketExtraOutseamTop).addClass("fabric dashed")),e.hammerLoop&&(n.hammerLoopCenter=(new a).move(s.hammerLoopTop).curve(s.hammerLoopCp1,s.hammerLoopCp2,s.hammerLoopOutseam).addClass("various dotted").addText("opal:hammerLoop","center"),n.hammerLoopLeft=n.hammerLoopCenter.offset(x/2).addClass("fabric dashed"),n.hammerLoopRight=n.hammerLoopCenter.offset(-x/2).addClass("fabric dashed"),f.set("hammerLoopLength",n.hammerLoopCenter.length()),f.set("hammerLoopWidth",x)),c&&(s.inseamHemAllowance=s.inseamHem.translate(-c,o.legHemAllowance),s.outseamHemAllowance=s.outseamHem.translate(c,o.legHemAllowance),n.sa=n.outseam.offset(c).join(n.hem.offset(o.hemAllowance).join(n.centerSeam.offset(c))).line(s.inseamHemAllowance).line(s.outseamHemAllowance).close().addClass("fabric sa")),p&&(n.hint=(new a).move(s.crossSeamCurveStart).line(s.crossSeamCurveMax).line(s.fork).addClass("note help")),n.bibLowerHexagonHint=(new a).move(s.bibHexagonBottom).line(s.bibHexagonLowerInside).addClass("note help"),n.bibUpperHexagonHint=(new a).move(s.bibHexagonTop).line(s.bibHexagonUpperOutside).addClass("note help"),h("hd",{id:"wWaist",from:s.cfWaist,to:s.waist,y:s.cfWaist.y}),h("hd",{id:"wWaistToCrossSeamCurveStart",from:s.crossSeamCurveStart,to:s.cfWaist,y:s.cfWaist.y-(c+15),noStartMarker:!0,noEndMarker:!0}),h("hd",{id:"wCrossSeamCurveStartToCrossCurveSeamMax",from:s.crossSeamCurveMax,to:s.crossSeamCurveStart,y:s.cfWaist.y-(c+15),noStartMarker:!0,noEndMarker:!0}),h("hd",{id:"wCrossSeamCurveMaxToFork",from:s.fork,to:s.crossSeamCurveMax,y:s.cfWaist.y-(c+15),noStartMarker:!0,noEndMarker:!0}),h("hd",{id:"wCrossSeamCurveStartToFork",from:s.fork,to:s.crossSeamCurveStart,y:s.cfWaist.y-(c+30)}),h("hd",{id:"wWidthAtFork",from:s.fork,to:s.waist,y:s.outseamHem.y+(c+30)}),h("hd",{id:"wHem",from:s.inseamHem,to:s.outseamHem,y:s.outseamHem.y+(c+15)}),h("hd",{id:"wForkToHem",from:s.fork,to:s.inseamHem,y:s.inseamHem.y+(c+15)}),h("hd",{id:"wStrapWidth",from:s.strapEndOutside,to:s.strapEndInside,y:s.strapEndOutside.y-(o.hemAllowance+15)}),h("hd",{id:"wStrapInsideToHexagonTop",from:s.strapEndInside,to:s.bibHexagonTop,y:s.strapEndOutside.y-(o.hemAllowance+15)}),h("hd",{id:"wStrapOutsideToHexagonTop",from:s.strapEndOutside,to:s.bibHexagonTop,y:s.strapEndOutside.y-(o.hemAllowance+30)}),h("hd",{id:"wHexagonWidth",from:s.bibHexagonLowerOutside,to:s.bibHexagonLowerInside,y:s.bibHexagonLowerOutside.y}),h("hd",{id:"wWidthHexagonBottomToOutseam",from:s.bibHexagonBottom,to:s.waist,y:s.bibHexagonBottom.y}),h("hd",{id:"wBackBibCurve",from:s.bibHexagonLowerInside,to:s.waist,y:s.bibHexagonLowerInside.y}),h("vd",{id:"vOutseam",from:s.waist,to:s.outseamHem,x:s.waist.x+(c+15)}),h("vd",{id:"vHexagonLowerSideToOutseamTop",from:s.bibHexagonLowerInside,to:s.waist,x:s.waist.x+0}),h("vd",{id:"vHexagonUpperSideToLowerSide",from:s.bibHexagonUpperInside,to:s.bibHexagonLowerInside,x:s.waist.x+0}),h("vd",{id:"vHexagonTopToUpperSide",from:s.bibHexagonTop,to:s.bibHexagonUpperInside,x:s.waist.x+0}),h("vd",{id:"vHexagonTopToOutseam",from:s.bibHexagonTop,to:s.waist,x:s.waist.x+15}),h("vd",{id:"vStrapInsideTaperedHeight",from:s.strapTaperInside,to:s.bibHexagonTop,x:s.waist.x+0}),h("vd",{id:"vStrapInsideStraightHeight",from:s.strapEndInside,to:s.strapTaperInside,x:s.waist.x+0}),h("vd",{id:"vStrapInsideHeight",from:s.strapEndInside,to:s.bibHexagonTop,x:s.waist.x+15}),h("vd",{id:"vLegHemAllowance",from:s.outseamHem,to:c?s.outseamHemAllowance:s.outseamHem,x:s.waist.x+(c+15),noStartMarker:!0,noEndMarker:!0}),h("vd",{id:"vWaistToCrossSeamCurveStart",from:s.cfWaist,to:s.crossSeamCurveStart,x:s.fork.x-(c+15)}),h("vd",{id:"vCrossSeamCurveStartToFork",from:s.crossSeamCurveStart,to:s.fork,x:s.fork.x-(c+15)}),h("vd",{id:"vHexagonBottomToFork",from:s.bibHexagonBottom,to:s.fork,x:s.fork.x-(c+30)}),h("vd",{id:"vForkToHem",from:s.fork,to:s.inseamHem,x:s.fork.x-(c+30)}),h("vd",{id:"vHexagonBottomToWaist",from:s.bibHexagonBottom,to:s.cfWaist,x:s.fork.x-(c+15)}),h("vd",{id:"vHexagonLowerSideToHexagonBottom",from:s.bibHexagonLowerOutside,to:s.bibHexagonBottom,x:s.fork.x-(c+15)}),h("vd",{id:"vHexagonUpperSideToHexagonLowerSide",from:s.bibHexagonUpperOutside,to:s.bibHexagonLowerOutside,x:s.fork.x-(c+15)}),h("vd",{id:"vHexagonTopToHexagonUpperSide",from:s.bibHexagonTop,to:s.bibHexagonUpperOutside,x:s.fork.x-(c+15)}),h("vd",{id:"vHexagonHeight",from:s.bibHexagonTop,to:s.bibHexagonBottom,x:s.fork.x-(c+30)}),h("vd",{id:"vStrapStraightHeight",from:s.strapEndOutside,to:s.strapTaperOutside,x:s.fork.x-(c+15)}),h("vd",{id:"vStrapTaperHeight",from:s.strapTaperOutside,to:s.bibHexagonTop,x:s.fork.x-(c+15)}),h("vd",{id:"vStrapHeight",from:s.strapEndOutside,to:s.bibHexagonTop,x:s.fork.x-(c+30)}),h("vd",{id:"vTotal",from:s.strapEndOutside,to:s.inseamHem,x:s.fork.x-(c+45)}),s.grainlineTop=s.waist.shiftFractionTowards(s.cfWaist,.05),s.grainlineBottom=new i(s.grainlineTop.x,s.outseamHem.y),h("grainline",{from:s.grainlineTop,to:s.grainlineBottom}),f.cutlist.addCut({cut:2,from:"fabric"}),s.title=s.cfWaist.shiftFractionTowards(s.outseamHem,.5).shiftFractionTowards(s.inseamHem,.5),h("title",{at:s.title,nr:2,t
1itle:"opal:back"}),s.logo=s.title.translate(-20*u,35*u),l.logo=new r("logo",s.logo),s.scalebox=s.title.translate(-10*u,-80*u),h("scalebox",{at:s.scalebox}),d},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 Wc={name:"opal.waistband",draft:function({options:t,absoluteOptions:e,Point:o,Path:i,points:a,paths:s,sa:n,macro:r,part:l,store:c,scale:p}){const h=c.get("waistDist");a.topRight=new o(h,-e.waistbandWidth*t.waistbandLayers/2),a.topLeft=a.topRight.flipX(),a.bottomRight=a.topRight.flipY(),a.bottomLeft=a.bottomRight.flipX();for(let d=1;d<t.waistbandLayers;d++)a[`fold${d}Left`]=a.topLeft.shiftFractionTowards(a.bottomLeft,d/t.waistbandLayers),a[`fold${d}Right`]=a.topRight.shiftFractionTowards(a.bottomRight,d/t.waistbandLayers),s[`fold${d}`]=(new i).move(a[`fold${d}Left`]).line(a[`fold${d}Right`]).setClass("fabric dashed").addText("opal:fold","center");return s.seam=(new i).move(a.topRight).line(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).close().setClass("fabric"),a.saTopRight=a.topRight.translate(n,0),a.saTopLeft=a.topLeft.translate(-n,0),a.saBottomRight=a.bottomRight.translate(n,0),a.saBottomLeft=a.bottomLeft.translate(-n,0),n&&(s.saRight=(new i).move(a.bottomRight).line(a.saBottomRight).line(a.saTopRight).line(a.topRight).addClass("sa fabric"),s.saLeft=(new i).move(a.bottomLeft).line(a.saBottomLeft).line(a.saTopLeft).line(a.topLeft).addClass("sa fabric")),r("hd",{id:"wWaistband",from:a.topLeft,to:a.topRight,y:a.topLeft.y-15}),r("vd",{id:"hWaistband",from:a.topLeft,to:a.bottomLeft,x:a.topLeft.x-(n+15)}),a.grainlineTop=a.topLeft.shiftFractionTowards(a.bottomRight,3/32),a.grainlineBottom=a.grainlineTop.flipY(),a.grainlineTop2=new o(15*a.topLeft.x/16,0),a.grainlineBottom2=new o(11*a.topLeft.x/16,0),a.grainText=new o(13*a.topLeft.x/16,1*a.topLeft.y/16).addText("opal:grainlineEitherWay","note center"),r("grainline",{from:a.grainlineTop,to:a.grainlineBottom,text:""}),r("grainline",{id:"grainline2",from:a.grainlineTop2,to:a.grainlineBottom2,text:""}),c.cutlist.addCut({cut:1,from:"fabric"}),a.title=new o(30*p,5*p),r("title",{at:a.title,nr:11,title:"opal:waistband",scale:.75}),l},after:Pc};const Hc={name:"opal.bibPlacket",draft:function({options:t,absoluteOptions:e,Point:o,Path:i,points:a,paths:s,macro:n,part:r,
1store:l,scale:c}){if(t.bibPlacketLayers<=0)return r.hide();const p=l.get("bibPlacketLengthTop")/2,h=l.get("bibPlacketLengthBottom")/2;a.topRight=new o(p,-e.bibPlacketWidth*t.bibPlacketLayers/2),a.topLeft=a.topRight.flipX(),a.bottomRight=a.topRight.flipY(),t.bibPlacketLayers%2&&(a.bottomRight.x=h),a.bottomLeft=a.bottomRight.flipX();for(let d=1;d<t.bibPlacketLayers;d++)a[`fold${d}Left`]=a.topLeft.shiftFractionTowards(a.bottomLeft,d/t.bibPlacketLayers),a[`fold${d}Left`].x=d%2?-h:-p,a[`fold${d}Right`]=a.topRight.shiftFractionTowards(a.bottomRight,d/t.bibPlacketLayers),a[`fold${d}Right`].x=d%2?h:p,s[`fold${d}`]=(new i).move(a[`fold${d}Left`]).line(a[`fold${d}Right`]).setClass("fabric dashed").addText("opal:fold","center");s.seam=(new i).move(a.topRight).line(a.topLeft);for(let d=1;d<t.bibPlacketLayers;d++)s.seam.line(a[`fold${d}Left`]);s.seam.line(a.bottomLeft).line(a.bottomRight);for(let d=t.bibPlacketLayers-1;d>0;d--)s.seam.line(a[`fold${d}Right`]);return s.seam.line(a.topRight).close().setClass("fabric"),1==t.bibPlacketLayers&&(a.fold1Left=a.bottomLeft,a.fold1Right=a.bottomRight),n("hd",{id:"wTop",from:a.topLeft,to:a.topRight,y:a.topLeft.y-15}),n("hd",{id:"wDifference",from:a.fold1Left,to:a.topLeft,y:a.topLeft.y-15,noStartMarker:!0,noEndMarker:!0}),n("hd",{id:"wBottom",from:a.fold1Left,to:a.fold1Right,y:a.topLeft.y-30}),n("vd",{id:"hSingleFold",from:a.topLeft,to:a.fold1Left,x:a.fold1Left.x-15}),n("vd",{id:"hAllFolds",from:a.topLeft,to:a.bottomLeft,x:a.fold1Left.x-30}),a.grainlineTop=a.bottomLeft.shiftFractionTowards(a.topRight,1/16),a.grainlineBottom=a.grainlineTop.flipX(),n("grainline",{from:a.grainlineTop,to:a.grainlineBottom}),l.cutlist.addCut({cut:1,from:"fabric"}),a.title=new o(30*c,15*c),n("title",{at:a.title,nr:12,title:"opal:bibPlacket",scale:.75}),r},after:Rc};const Ac={name:"opal.pocketSlash",draft:function({options:t,Point:e,Path:o,points:i,paths:a,Snippet:s,snippets:n,sa:r,macro:l,part:c,store:p,scale:h,utils:d}){if(!t.pocketSlash)return c.hide();const f=p.get("waistDist");i.centerTop=new e(0,0),i.centerBottom=new e(0,f*t.pocketSlashHeight),i.topRight=new e(f*t.pocketSlashWidth,0),i.topLeft=new e(-f*t.pocketSlashWidth,0),i.bottomLeft=new e(-f*t.pocketSlashWidth,f*t.pocketSlashHeight),i.bottomRight=new e(f*t.pocketSlashWidth,f*t.pocketSlashHeight),i.slashTop=i.topRight.translate(-f*t.pocketSlashOpeningWidth,0),i.slashSide=i.topRight.translate(0,f*t.pocketSlashOpeningHeight);const m=t.pocketSlashOpeningWidth,u=t.pocketSlashOpeningHeight,g=Math.hypot(m,u);return i.shieldTop=i.topLeft.translate(f*(t.pocketSlashOpeningWidth+m/g*t.pocketSlashShieldOverlap),0),i.shieldSide=i.topLeft.translate(0,f*(t.pocketSlashOpeningHeight+u/g*t.pocketSlashShieldOverlap)),i.shieldSide.y>i.bottomLeft.y?(i.shieldSideTrim=d.beamIntersectsY(i.shieldSide,i.shieldTop,i.bottomLeft.y),i.shieldSide=i.bottomLeft):i.shieldSideTrim=i.shieldSide,i.shieldTop.x>i.centerTop.x?(i.shieldTopTrim=d.beamIntersectsX(i.shieldSide,i.shieldTop,i.centerTop.x),i.shieldTop=i.centerTop):i.shieldTopTrim=i.shieldTop,i.slashMax=new e(i.slashTop.x,i.slashSide.y),i.slashSideCp2=i.slashSide.shiftFractionTowards(i.slashMax,t.pocketSlashOpeningCurve),i.slashTopCp1=i.slashTop.shiftFractionTowards(i.slashMax,t.pocketSlashOpeningCurve),i.shieldMax=new e(i.shieldTop.x,i.shieldSideTrim.y),i.shieldSideCp2=i.shieldSideTrim.shiftFractionTowards(i.shieldMax,t.pocketSlashOpeningCurve),i.shieldTopCp1=i.shieldTopTrim.shiftFractionTowards(i.shieldMax,t.pocketSlashOpeningCurve),a.seam=(new o).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.slashSide).curve(i.slashSideCp2,i.slashTopCp1,i.slashTop).line(i.topLeft).close().addClass("lining"),a.fold=(new o).move(i.centerTop).line(i.centerBottom).addText("opal:fold").addClass("various dashed"),a.shield=(new o).move(i.shieldTop).line(i.topLeft).line(i.shieldSide).line(i.shieldSideTrim).curve(i.shieldSideCp2,i.shieldTopCp1,i.shieldTopTrim).line(i.shieldTop).close().addClass("fabric dashed"),i.shieldText=i.shieldTop.shiftFractionTowards(i.shieldSide,.5).shiftFractionTowards(i.topLeft,3/4).addText("opal:pocketShield"),i.shieldCenter=i.shieldTop.shiftFractionTowards(i.shieldSide,.5).shiftFractionTowards(i.topLeft,.5),r&&(a.sa=a.seam.offset(r).addClass("sa lining"),i.saShieldTopRight=i.shieldTop.translate(0,-r),i.saShieldTopLeft=i.topLeft.translate(-r,-r),i.saShieldBottomLeft=i.shieldSide.translate(-r,i.bottomLeft.y===i.shieldSide.y?r:0),i.saShieldBottomRight=i.shieldSideTrim.translate(0,i.bottomLeft.y===i.shieldSide.y?r:0),a.saShield=(new o).move(i.shieldTop).line(i.saShieldTopRight).line(i.saShieldTopLeft).line(i.saShieldBottomLeft).line(i.saShieldBottomRight).line(i.shieldSideTrim).addClass("sa fabric").hide()),l("hd",{id:"wTopLeft",from:i.topLeft,to:i.centerTop,y:i.topLeft.y-(r+15)}),l("hd",{id:"wTop",from:i.topLeft,to:i.slashTop,y:i.topLeft.y-(r+30)}),l("hd",{id:"wSlash",from:i.slashTop,to:i.slashSide,y:i.topLeft.y-(r+15)}),l("hd",{id:"wBottom",from:i.bottomLeft,to:i.bottomRight,y:i.bottomLeft.y+(r+15)}),l("vd",{id:"hSlash",from:i.slashTop,to:i.slashSide,x:i.bottomRight.x+(r+15)}),l("vd",{id:"hSide",from:i.slashTop,to:i.bottomRight,x:i.bottomRight.x+(r+30)}),p.cutlist.addCut({cut:2,from:"lining"}),i.title=i.centerTop.shiftFractionTowards(i.centerBottom,.5).translate(10*h,25*h),l("title",{at:i.title,nr:5,title:"opal:pocketSlash"}),i.logo=i.title.translate(20*-h,35*h),n.logo=new s("logo",i.logo),c},after:Pc};const Oc={name:"opal.pocketSlashShield",draft:function({options:t,points:e,paths:o,snippets:i,sa:a,macro:s,part:n,store:r,scale:l}){if(!t.pocketSlash)return n.hide();s("rmad");const c=["shield","saShield"];for(const p in o)-1===c.indexOf(p)&&delete o[p];return a&&o.saShield.unhide(),o.shield.setClass("fabric"),e.shieldText.setText(null),delete i.logo,s("hd",{id:"wTop",from:e.topLeft,to:e.shieldTop,y:e.topLeft.y-(a+15)}),s("vd",{id:"hTop",from:e.topLeft,to:e.shieldSide,x:e.shieldSide.x-(a+15)}),e.shieldSide.x!=e.shieldSideTrim.x&&(s("hd",{id:"wBottomTrim",from:e.shieldSide,to:e.shieldSideTrim,y:e.shieldSide.y+(a+15),noStartMarker:e.shieldSideTrim.x-e.shieldSide.x<25*l,noEndMarker:e.shieldSideTrim.x-e.shieldSide.x<25*l}),s("hd",{id:"wDiagonal",from:e.shieldSideTrim,to:e.shieldTopTrim,y:e.shieldSide.y+(a+15)})),e.shieldTop.y!=e.shieldTopTrim.y&&(s("vd",{id:"hSideTrim",from:e.shieldTop,to:e.shieldTopTrim,x:e.shieldTop.x+(a+15),noStartMarker:e.shieldTopTrim.y-e.shieldTop.y<25*l,noEndMarker:e.shieldTopTrim.y-e.shieldTop.y<25*l}),s("vd",{id:"hDiagonal",from:e.shieldTopTrim,to:e.shieldSideTrim,x:e.shieldTop.x+(a+15)})),e.title=e.shieldCenter.translate(-10*l,10*l),s("title",{at:e.title,nr:6,title:"opal:pocketShield",scale:.6}),r.cutlist.removeCut("lining"),r.cutlist.addCut({cut:2,from:"fabric"}),n},from:Ac};const Dc={name:"opal.pocketBib",draft:function({options:t,absoluteOptions:e,points:o,paths:i,Snippet:a,snippets:s,sa:n,macro:r,part:l,scale:c}
1){if(!t.pocketBib)return l.hide();r("rmad");const p=["bibPocketSeam","bibPocketHem","cf"];for(const h in i)-1===p.indexOf(h)&&delete i[h];return t.bibPocketOnFold&&delete i.cf,i.bibPocketSeam.unhide().setClass("fabric"),i.bibPocketHem.unhide().setClass("fabric"),delete o.bibPocketText,n&&(i.sa=i.bibPocketHem.offset(e.hemAllowance).join(i.bibPocketSeam.offset(n)).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+(n+15)}),"pentagon"!==t.pocketBibStyle&&r("hd",{id:"wBottomSide",from:o.pocketSideBottom,to:o.pocketFeatureSide,y:o.pocketCenterBottom.y+(n+15)}),r("hd",{id:"wBottom",from:t.bibPocketOnFold?o.pocketCenterBottom:o.pocketFeatureSide.flipX(o.pocketCenterTop),to:o.pocketFeatureSide,y:o.pocketCenterBottom.y+(n+30)}),r("vd",{id:"hUpperSide",from:o.pocketSideTop,to:o.pocketFeatureSide,x:o.pocketFeatureSide.x+(n+15)}),r("vd",{id:"hLowerSide",from:o.pocketFeatureSide,to:o.pocketCenterBottom,x:o.pocketFeatureSide.x+(n+15),noStartMarker:!0,noEndMarker:!0})),r("vd",{id:"hTotalSide",from:o.pocketSideTop,to:o.pocketCenterBottom,x:"rectangle"===t.pocketBibStyle?o.pocketSideBottom.x+(n+15):o.pocketFeatureSide.x+(n+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 s.logo:s.logo=new a("logo",o.logo=o.title.translate(20*-c,35*c)),l},from:Rc};const Ec={name:"opal.pocketBack",draft:function({options:t,absoluteOptions:e,points:o,paths:i,Snippet:a,snippets:s,sa:n,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 h in i)-1===p.indexOf(h)&&delete i[h];return i.pocketBackSeam.setClass("fabric"),i.pocketBackHem.setClass("fabric"),n&&(i.sa=i.pocketBackSeam.offset(n).join(i.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+(n+15)}),r("hd",{id:"wBottomSide",from:o.backPocketFrontBottomP1,to:o.backPocketFrontBottomP2,y:o.backPocketBackBottom.y+(n+15)}),r("vd",{id:"hSideMain",from:o.backPocketFrontTop,to:o.backPocketFrontBottomP2,x:o.backPocketFrontTop.x+(n+15)}),r("vd",{id:"hSideDiagonal",from:o.backPocketFrontBottomP2,to:o.backPocketFrontBottomP1,x:o.backPocketFrontTop.x+(n+15),noStartMarker:!0,noEndMarker:!0}),r("vd",{id:"hSideTotal",from:o.backPocketFrontTop,to:o.backPocketFrontBottomP1,x:o.backPocketFrontTop.x+(n+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),s.logo=new a("logo",o.logo),l},from:Fc};const Ic={name:"opal.pocketCarpenter",draft:function({options:t,absoluteOptions:e,points:o,paths:i,Snippet:a,snippets:s,sa:n,macro:r,part:l,store:c,scale:p}){if(!t.pocketCarpenter)return l.hide();r("rmad"),r("rmScalebox");const h=["pocketCarpenterSeam","pocketCarpenterHem"];for(const d in i)-1===h.indexOf(d)&&delete i[d];return delete s.logo,i.pocketCarpenterHem.setClass("fabric"),i.pocketCarpenterSeam.setClass("fabric"),n&&(i.sa=i.pocketCarpenterSeam.offset(n).join(i.pocketCarpenterHem.offset(e.hemAllowance)).close().setClass("fabric sa")),r("hd",{id:"wTop",from:o.carpenterPocketTopBack,to:o.carpe
1nterPocketTopFront,y:o.carpenterPocketTopFront.y-(n+15)}),r("hd",{id:"wOpening",from:o.carpenterPocketTopFront,to:o.carpenterPocketOutseamTop,y:o.carpenterPocketTopFront.y-(n+15)}),r("hd",{id:"wTotal",from:o.carpenterPocketTopBack,to:o.carpenterPocketOutseamTop,y:o.carpenterPocketTopFront.y-(n+30)}),r("vd",{id:"hOpening",from:o.carpenterPocketTopFront,to:o.carpenterPocketOutseamTop,x:o.carpenterPocketOutseamTop.x+(n+15)}),r("vd",{id:"hSide",from:o.carpenterPocketOutseamTop,to:o.carpenterPocketOutseamBottom,x:o.carpenterPocketOutseamTop.x+(n+15)}),r("vd",{id:"hTotal",from:o.carpenterPocketTopFront,to:o.carpenterPocketOutseamBottom,x:o.carpenterPocketOutseamTop.x+(n+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),s.logo=new a("logo",o.logo),l},from:Fc};const Nc={name:"opal.pocketCarpenterExtra",draft:function({options:t,absoluteOptions:e,points:o,paths:i,snippets:a,sa:s,macro:n,part:r,store:l,scale:c}){if(!t.pocketCarpenterExtra)return r.hide();n("rmad"),n("rmScalebox");const p=["pocketCarpenterExtraSeam","pocketCarpenterExtraHem"];for(const h in i)-1===p.indexOf(h)&&delete i[h];return delete a.logo,i.pocketCarpenterExtraHem.setClass("fabric"),i.pocketCarpenterExtraSeam.setClass("fabric"),s&&(i.sa=i.pocketCarpenterExtraSeam.offset(s).join(i.pocketCarpenterExtraHem.offset(e.hemAllowance)).close().setClass("fabric sa")),n("hd",{id:"wWidth",from:o.carpenterPocketExtraBackTop,to:o.carpenterPocketExtraOutseamTop,y:o.carpenterPocketExtraBackTop.y-(e.hemAllowance+15)}),n("vd",{id:"hHeight",from:o.carpenterPocketExtraOutseamTop,to:o.carpenterPocketOutseamBottom,x:o.carpenterPocketExtraOutseamTop.x+(s+15)}),o.grainlineTop=o.carpenterPocketExtraBackTop.translate(10*c,0),o.grainlineBottom=o.carpenterPocketBottomBack.translate(10*c,0),n("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),n("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:i,paths:a,sa:s,macro:n,part:r,store:l,scale:c}){if(!t.hammerLoop)return r.hide();const p=l.get("hammerLoopLength")*t.hammerLoopLengthFactor,h=l.get("hammerLoopWidth");return i.topLeftInside=new e(-p/2,-h/2),i.bottomLeftInside=new e(-p/2,h/2),i.bottomRightInside=new e(p/2,h/2),i.topRightInside=new e(p/2,-h/2),i.bottomLeftFold1=i.bottomLeftInside.translate(0,h*t.hammerLoopFirstFold),i.bottomRightFold1=i.bottomRightInside.translate(0,h*t.hammerLoopFirstFold),i.topLeftFold1=i.topLeftInside.translate(0,-h*t.hammerLoopFirstFold),i.topRightFold1=i.topRightInside.translate(0,-h*t.hammerLoopFirstFold),i.topLeftFold2=i.topLeftFold1.translate(0,-h*t.hammerLoopSecondFold),i.topRightFold2=i.topRightFold1.translate(0,-h*t.hammerLoopSecondFold),i.saTopLeft=i.topLeftFold2.translate(-s,0),i.saBottomLeft=i.bottomLeftFold1.translate(-s,0),i.saTopRight=i.topRightFold2.translate(s,0),i.saBottomRight=i.bottomRightFold1.translate(s,0),a.hammerLoop=(new o).move(i.topLeftFold2).line(i.bottomLeftFold1).line(i.bottomRightFold1).line(i.topRightFold2).line(i.topLeftFold2).close().addClass("fabric"),a.bottomInside=(new o).move(i.bottomLeftInside).line(i.bottomRightInside).addClass("fabric dashed").addText("opal:fold","center"),a.topInside=(new o).move(i.topLeftInside).line(i.topRightInside).addClass("fabric dashed").addText("opal:fold","center"),a.topFold1=(new o).move(i.topLeftFold1).line(i.topRightFold1).addClass("fabric dashed").addText("opal:fold","center"),s&&(a.saLeft=(new o).move(i.topLeftFold2).line(i.saTopLeft).line(i.saBottomLeft).line(i.bottomLeftFold1).addClass("fabric sa"),a.saRight=(new o).move(i.topRightFold2).line(i.saTopRight).line(i.saBottomRight).line(i.bottomRightFold1).addClass("fabric sa")),n("hd",{id:"wWidth",from:i.topLeftFold2,to:i.topRightFold2,y:i.topLeftFold2.y-15}),n("vd",{id:"hBase",from:i.topRightInside,to:i.bottomRightInside,x:i.topRightFold2.x+(s+15),noStartMarker:!0,noEndMarker:!0}),n("vd",{id:"hFoldBottom",from:i.bottomRightInside,to:i.bottomRightFold1,x:i.topRightFold2.x+(s+15),noStartMarker:!0,noEndMarker:!0}),n("vd",{id:"hFoldTop1",from:i.topRightFold1,to:i.topRightInside,x:i.topRightFold2.x+(s+15),noStartMarker:!0,noEndMarker:!0}),n("vd",{id:"hFoldTop2",from:i.topRightFold2,to:i.topRightFold1,x:i.topRightFold2.x+(s+15),noStartMarker:!0,noEndMarker:!0}),n("vd",{id:"hTotal",from:i.topRightFold2,to:i.bottomRightFold1,x:i.topRightFold2.x+(s+30)}),i.title=i.topLeftFold2.shiftFractionTowards(i.bottomLeftFold1,.5).translate(5*c,0),n("title",{at:i.title,nr:10,title:"opal:hammerLoop",scale:.4}),r},after:Fc,options:{hammerLoopLengthFactor:1}},_c=new s.pT({data:Lc,parts:[Pc,Fc,Rc,Wc,Hc,Ac,Oc,Dc,Ec,Ic,Nc,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. "}}}')},Yc={name:"otis.back",measurements:["waist"],options:{ease:{pct:14,min:0,max:30,...(0,s.Wx)("waist"),menu:"fit"},snapPlacket:{pct:5,min:0,max:30,...(0,s.Wx)("waist"),menu:"advanced"}},draft:({options:t,Point:e,Path:o,points:i,paths:a,Snippet:s,snippets:n,sa:r,measurements:l,store:c,macro:p,part:h})=>{const d=l.waist/4,f=l.waist/510,m=t.ease;return c.set("waist",d),c.set("ease",m),c.set("sizeFactor",f),i.p0=new e(0,0),i.p0Cp1=i.p0.shift(180,66.91517912470589*(m+1)*f),i.p1=i.p0.shift(149.4969649618097,114.87166082661528*(m+1)*f),i.p1Cp1=i.p1.shift(278.9548159482757,137.90010759149453*(m+1)*f),i.p1Cp2=i.p1.shift(336.4763168951959,68.61447469210127*(m+1)*f),i.p2=i.p0.shift(218.49950238029894,163.05015542953512*(m+1)*f),i.p2Cp2=i.p2.shift(2.0575442111337274,29.562919686247152*(m+1)*f),i.p3=i.p0.shift(246.77020008250858,323.5264286434397*(m+1)*f),i.p3Cp1=i.p3.shift(335.4445026359432,31.324216272472654*(m+1)*f),i.p3Cp1=i.p3.shift(0,15*(m+1)*f),i.p4=i.p0.shift(258.29473769456416,373.7460389711983*(m+1)*f),i.p4Cp1=i.p4.shift(294.805946128575,27.347838639268335*(m+1)*f),i.p4Cp2=i.p4.shift(114.81188629380082,38.21149693481505*(m+1)*f),i.p5=i.p0.shift(266.33816548102595,416.91257944059936*(m+1)*f),i.p5Cp2=i.p5.shift(180,34.60436510741867*(m+1)*f),i.p6=i.p5.shift(270,l.waist*t.snapPlacket*2),i.p7=new e(0,i.p6.y),c.set("sideseam",i.p2.dist(i.p3)),a.armhole=(new o).move(i.p1).curve(i.p1Cp1,i.p2Cp2,i.p2).hide(),c.set("armhole",.85*a.armhole.length()),i.shoulder=a.armhole.shiftFractionAlong(.15),i.snapPlacketOut=i.p5.shift(270,l.waist*t.snapPlacket),i.snapPlacketIn=new e(0,i.snapPlacketOut.y),a.seamSA=(new o).move(i.p0).curve(i.p0Cp1,i.p1Cp2,i.p1).curve(i.p1Cp1,i.p2Cp2,i.p2).line(i.p3).curve(i.p3Cp1,i.p4Cp2,i.p4).curve(i.p4Cp1,i.p5Cp2,i.p5).line(i.p5).line(i.p6).line(i.p7).hide(),a.seam=a.seamSA.clone().line(i.p0).close().unhide(),p("cutonfold",{from:new e(0,i.p5.y),to:i.p0}),c.set("BackNeckOpening",2*(new o).move(i.p0).curve(i.p0Cp1,i.p1Cp2,i.p1).length()),c.set("BackLegOpening",(new o).move(i.p3).curve(i.p3Cp1,i.p4Cp2,i.p4).curve(i.p4Cp1,i.p5Cp2,i.p5).length()),c.set("SnapPlacketWidth",i.p6.dist(i.p7)),c.cutlist.addCut({material:"fabric",cut:1}),i.logo=i.p0.shiftFractionTowards(i.p3,.5),n.logo=new s("logo",i.logo),p("title",{at:i.logo.shift(-90,d/1.7).shift(-180,d/4),nr:1,title:"back"}),a.snapPlacket=(new o).move(i.snapPlacketOut).line(i.snapPlacketIn).addClass("dashed"),i.snap=i.p6.shiftFractionTowards(i.p7,.333).shift(90,l.waist*t.snapPlacket/2),n.snap=new s("snap-stud",i.snap),r&&(a.sa=a.seamSA.offset(r).close().trim().attr("class","fabric sa")),n.shoulder=new s("notch",i.shoulder),p("hd",{from:i.p1,to:i.p0,y:i.p1.y-r-15}),p("hd",{from:i.p6,to:i.p7,y:i.p7.y+r+15}),p("vd",{from:i.p1,to:i.p0,x:i.p0.x+15}),p("vd",{from:i.p2,to:i.p1,x:i.p2.x-r-15}),p("vd",{from:i.p3,to:i.p2,x:i.p2.x-r-15}),p("vd",{from:i.p5,to:i.p3,x:i.p3.x-r-15}),p("vd",{from:i.snapPlacketOut,to:i.p5,x:i.p5.x-r-15}),p("vd",{from:i.p6,to:i.snapPlacketOut,x:i.p5.x-r-15}),p("vd",{from:i.p0,to:i.p7,x:i.p7.x+15}),h}},Uc={name:"otis.front",after:Yc,draft:({options:t,Point:e,Path:o,points:i,paths:a,Snippet:s,snippets:n,sa:r,measurements:l,store:c,macro:p,part:h})=>{const d=c.get("waist"),f=c.get("ease"),m=c.get("sizeFactor"),u=c.get("armhole"),g=c.get("SnapPlacketWidth");let b;i.p0=new e(0,0),i.p0Cp1=i.p0.shift(180,69.64248775236683*(f+1)*m),i.p1=i.p0.shift(137.39365873630706,132.32581976385896*(f+1)*m),i.p1Cp1=i.p1.shift(275.68130162148066,95.6099938788659*(f+1)*m),i.p1Cp2=i.p1.shift(334.5320444890682,74.98871362703433*(f+1)*m),i.p2=i.p0.shift(208.92817996505278,145.1854377221146*(f+1)*m),i.p2Cp2=i.p2.shift(356.8730716127121,43.74056201237602*(f+1)*m),i.p3=i.p0.shift(244.49016929788834,295.05507494424813*(f+1)*m),i.p3Cp1=i.p3.shift(0,18.248785709538428*(f+1)*m),i.p4=i.p0.shift(265.3666986326574,309.97788995830655*(f+1)*m),i.p4.x=i.p0.x-g,i.p5=i.p4.shift(270,l.waist*t.snapPlacket*2),i.p6=new e(0,i.p5.y);let k=1;do{a.armhole=(new o).move(i.p1).curve(i.p1Cp1,i.p2Cp2,i.p2).hide();
1b=.85*a.armhole.length()-u,(b<-1||b>1)&&(i.p1=i.p0.shift(137.39365873630706,132.32581976385896*(f+1)*m+b)),k++}while((b<-1||b>1)&&k<100);return i.shoulder=a.armhole.shiftFractionAlong(.15),i.snapPlacketOut=i.p4.shift(270,l.waist*t.snapPlacket),i.snapPlacketIn=new e(0,i.snapPlacketOut.y),a.seamSA=(new o).move(i.p0).curve(i.p0Cp1,i.p1Cp2,i.p1).curve(i.p1Cp1,i.p2Cp2,i.p2).line(i.p3).curve(i.p3Cp1,i.p4,i.p4).line(i.p5).line(i.p6).hide(),a.seam=a.seamSA.clone().line(i.p0).close().unhide(),c.set("FrontNeckOpening",2*(new o).move(i.p0).curve(i.p0Cp1,i.p1Cp2,i.p1).length()),c.set("FrontLegOpening",(new o).move(i.p3).curve(i.p3Cp1,i.p4,i.p4).length()),p("cutonfold",{from:new e(0,i.p4.y),to:i.p0}),c.cutlist.addCut({material:"fabric",cut:1}),i.logo=i.p0.shiftFractionTowards(i.p3,.5),n.logo=new s("logo",i.logo),p("title",{at:i.logo.shift(-90,d/1.7).shift(-180,d/4),nr:2,title:"front"}),a.snapPlacket=(new o).move(i.snapPlacketOut).line(i.snapPlacketIn).addClass("dashed"),i.snap=i.p5.shiftFractionTowards(i.p6,.333).shift(90,l.waist*t.snapPlacket/2),n.snap=new s("snap-socket",i.snap),r&&(a.sa=a.seamSA.offset(r).close().trim().attr("class","fabric sa")),n.shoulder=new s("notch",i.shoulder),p("hd",{from:i.p1,to:i.p0,y:i.p1.y-r-15}),p("hd",{from:i.p5,to:i.p6,y:i.p6.y+r+15}),p("vd",{from:i.p1,to:i.p0,x:i.p0.x+15}),p("vd",{from:i.p2,to:i.p1,x:i.p2.x-r-15}),p("vd",{from:i.p3,to:i.p2,x:i.p2.x-r-15}),p("vd",{from:i.p4,to:i.p3,x:i.p3.x-r-15}),p("vd",{from:i.snapPlacketOut,to:i.p4,x:i.p4.x-r-15}),p("vd",{from:i.p5,to:i.snapPlacketOut,x:i.p5.x-r-15}),p("vd",{from:i.p0,to:i.p6,x:i.p6.x+15}),h}},zc={name:"otis.shortsleeve",after:Yc,options:{sleeveType:{dflt:"short",list:["short","long"],menu:"style"},hem:{pct:10,min:0,max:30,toAbs:(t,{options:e,measurements:o},i)=>t*o.waist*(e.ease+1)*(o.waist/510)*.127273,menu:"advanced"}},draft:({options:t,Point:e,Path:o,points:i,paths:a,Snippet:s,snippets:n,sa:r,store:l,macro:c,utils:p,part:h})=>{const d=t.hem,f=l.get("waist"),m=l.get("ease"),u=l.get("sizeFactor"),g=l.get("armhole");let b;l.set("hem",117*(m+1)*u*d),i.p0=new e(0,0),i.p0Cp2=i.p0.shift(0,84.746*(m+1)*u),i.p1=i.p0.shift(270,117*(m+1)*u),i.p2=i.p1.shift(0,121*(m+1)*u),i.p3=i.p0.shift(331.965149,145.468319*(m+1)*u),i.p3Cp1=i.p3.shift(180,69.454559985*(m+1)*u);let k=1;do{a.armhole=(new o).move(i.p3).curve(i.p3Cp1,i.p0Cp2,i.p0).hide(),b=g-a.armhole.length(),(b<-1||b>1)&&(i.p3=i.p0.shift(331.965149,145.468319*(m+1)*u+b)),k++}while((b<-1||b>1)&&k<100);return i.p1hm=i.p1.shift(90,117*(m+1)*u*d),i.p2hm=p.beamIntersectsY(i.p2,i.p3,i.p1hm.y),i.p1h=i.p1hm.flipY(i.p1),i.p2h=i.p2hm.flipY(i.p2),a.seamSA=(new o).move(i.p1h).line(i.p2h).line(i.p2).line(i.p3).curve(i.p3Cp1,i.p0Cp2,i.p0).hide(),a.seam=a.seamSA.clone().line(i.p1).line(i.p0).close().unhide(),c("cutonfold",{from:i.p0,to:i.p1}),l.cutlist.addCut({material:"fabric",cut:2}),i.logo=i.p0.shiftFractionTowards(i.p2,.5),n.logo=new s("logo",i.logo).attr("data-scale",.5),c("title",{at:i.logo.shift(-90,f/3).shift(-180,f/4),nr:4,title:"shortSleeve",scale:.5}),a.hem=(new o).move(i.p1).line(i.p2).addClass("dashed"),r&&(a.sa=a.seamSA.offset(r).close().attr("class","fabric sa")),c("hd",{from:i.p0,to:i.p3,y:i.p0.y-r-15}),c("hd",{from:i.p2,to:i.p3,y:i.p3.y-r-15}),c("hd",{from:i.p1h,to:i.p2h,y:i.p2h.y+r+15}),c("vd",{from:i.p1h,to:i.p0,x:i.p1h.x-r-15}),c("vd",{from:i.p0,to:i.p3,x:i.p3.x+r+15}),c("vd",{from:i.p3,to:i.p2,x:i.p3.x+r+15}),c("vd",{from:i.p2,to:i.p2h,x:i.p3.x+r+15}),"short"!=t.sleeveType&&h.hide(),h}},Jc={name:"otis.longsleeve",from:zc,draft:({options:t,Path:e,points:o,paths:i,Snippet:a,snippets:s,sa:n,store:r,macro:l,utils:c,part:p})=>{const h=r.get("waist"),d=r.get("ease"),f=r.get("sizeFactor"),m=r.get("hem");for(const u in i)i[u].hide();return i.short=i.seam.clone().attr("class","note dashed"),o.p1=o.p0.shift(270,293.7625802105263*(d+1)*f),o.p2=o.p0.shift(284.345521471841,303.21713769055657*(d+1)*f),o.p2Cp1=o.p0.shift(290.01156103077165,229.3425471399697*(d+1)*f),o.p3Cp2=o.p0.shift(303.17727589125565,174.25165593501407*(d+1)*f),o.p1hm=o.p1.shift(90,m),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),i.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(),i.seam=i.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),s.logo=new a("logo",o.logo),l("title",{at:o.logo.shift(-90,h/1.7).shift(-180,h/7),nr:3,title:"longSleeve",scale:.75}),i.hem=(new e).move(o.p1).line(o.p2).addClass("dashed"),n&&(i.sa=i.seamSA.offset(n).close().attr("class","fabric sa")),l("hd",{from:o.p0,to:o.p3,y:o.p0.y-n-15}),l("hd",{from:o.p2,to:o.p3,y:o.p3.y-n-15}),l("hd",{from:o.p1h,to:o.p2h,y:o.p2h.y+n+15}),l("vd",{from:o.p1h,to:o.p0,x:o.p1h.x-n-15}),l("vd",{from:o.p0,to:o.p3,x:o.p3.x+n+15}),l("vd",{from:o.p3,to:o.p2,x:o.p3.x+n+15}),l("vd",{from:o.p2,to:o.p2h,x:o.p3.x+n+15}),"long"!=t.sleeveType&&p.hide(),p}},$c={name:"otis.bindingLeg",after:[Yc,Uc,zc],options:{binding:{pct:11,min:2,max:30,toAbs:(t,{options:e,measurements:o},i)=>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:i,options:a,Snippet:s,snippets:n,sa:r,store:l,macro:c,expand:p,units:h,part:d})=>{const f=l.get("BackLegOpening"),m=l.get("FrontLegOpening"),u=l.get("waist")*(l.get("ease")+1)*l.get("sizeFactor")*a.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:h(2*u),length:h(f+m)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),l.flag.preset("expandIsOff"),d.hide()}return l.flag.preset("expandIsOn"),o.p0=new t(0,0),o.p1=new t(0,f+m),o.p2=new t(2*u,f+m),o.p3=new t(2*u,0),i.seam=(new e).move(o.p0).line(o.p1).line(o.p2).line(o.p3).line(o.p0).close(),i.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),n.logo=new s("logo",o.logo).attr("data-scale",.25),n.middle=new s("notch",o.p2.shiftTowards(o.p3,m)),c("title",{at:o.logo.shift(-115,15),nr:7,title:"bindingLeg",scale:.2}),r&&(i.sa=i.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}),d}},Xc={name:"otis.bindingNeckBack",after:[$c],draft:({Point:t,Path:e,points:o,paths:i,Snippet:a,snippets:s,sa:n,store:r,macro:l,expand:c,units:p,part:h})=>{const d=r.get("BackNeckOpening"),f=r.get("binding");if(!c){const t="bindingNeckBack";return r.flag.note({msg:t,notes:[n?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{width:p(2*f),length:p(d)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),r.flag.preset("expandIsOff"),h.hide()}return r.flag.preset("expandIsOn"),o.p0=new t(0,0),o.p1=new t(0,d),o.p2=new t(2*f,d),o.p3=new t(2*f,0),i.seam=(new e).move(o.p0).line(o.p1).line(o.p2).line(o.p3).line(o.p0).close(),i.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),s.logo=new a("logo",o.logo).attr("data-scale",.25),s.middle=new a("notch",o.p2.shiftFractionTowards(o.p3,.5)),l("title",{at:o.logo.shift(-115,15),nr:5,title:"bindingNeckBack",
1scale:.2}),n&&(i.sa=i.seam.offset(n).close().attr("class","fabric sa")),l("hd",{from:o.p0,to:o.p3,y:o.p0.y-n-15}),l("vd",{from:o.p2,to:o.p3,x:o.p3.x+n+15}),h}},Qc={name:"otis.bindingNeckFront",after:[$c],draft:({Point:t,Path:e,points:o,paths:i,Snippet:a,snippets:s,sa:n,store:r,macro:l,expand:c,units:p,part:h})=>{const d=r.get("FrontNeckOpening"),f=r.get("binding");if(!c){const t="bindingNeckFront";return r.flag.note({msg:t,notes:[n?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{width:p(2*f),length:p(d)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),r.flag.preset("expandIsOff"),h.hide()}return r.flag.preset("expandIsOn"),o.p0=new t(0,0),o.p1=new t(0,d),o.p2=new t(2*f,d),o.p3=new t(2*f,0),i.seam=(new e).move(o.p0).line(o.p1).line(o.p2).line(o.p3).line(o.p0).close(),i.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),s.logo=new a("logo",o.logo).attr("data-scale",.25),s.middle=new a("notch",o.p2.shiftFractionTowards(o.p3,.5)),l("title",{at:o.logo.shift(-115,15),nr:6,title:"bindingNeckFront",scale:.2}),n&&(i.sa=i.seam.offset(n).close().attr("class","fabric sa")),l("hd",{from:o.p0,to:o.p3,y:o.p0.y-n-15}),l("vd",{from:o.p2,to:o.p3,x:o.p3.x+n+15}),h}},Kc=new s.pT({data:jc,parts:[Yc,Uc,zc,Jc,Xc,Qc,$c]}),Vc=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,i){return(o*t.dartMinimumWidth+(Math.max(Math.min(e,o*t.dartMaximumDifference),o*t.dartMinimumDifference)-o*t.dartMinimumDifference)/4)/i*(.5+t.dartToSideSeamFactor)}function tp(t,e,o,i){return(o*t.dartMinimumWidth+(e-o*t.dartBackControl1-(e-o*t.dartBackControl1)/t.dartBackControl2)/t.dartBackControl3)/i*(.5+t.dartToSideSeamFactor)}function ep(t,e,o,i,a){const{options:s}=t.shorthand();if(i>e.length())return null;o<i/1.9&&(o=i/2.1),e.length()-o<i&&(o=e.length()-i/1.95);const n=e.shiftAlong(o),r=e.split(n);if(r[0].length()<i/2||r[1].length()<i/2)return null;const l=r[0].reverse().shiftAlong(i/2),c=r[1].shiftAlong(i/2),p=.0015,h=Math.min(r[0].length()*p,r[0].ops[1].to.dist(r[0].ops[1].cp2)),d=Math.min(r[1].length()*p,r[1].ops[0].to.dist(r[1].ops[1].cp1)),f=n.shift(l.angle(c)-90,a),m=l.shift(l.angle(f)-90,h),u=c.shift(c.angle(f)+90,d),g=(new t.Path).move(r[0].ops[0].to).curve(r[0].ops[1].cp1,m,l).hide(),b=(new t.Path).move(c).curve(u,r[1].ops[1].cp2,r[1].ops[1].to).hide();let k=null;if(s.curvedDarts)if(f.angle(l)-f.angle(c)<2*s.curvedDartControlAngle)k=(new t.Path).move(l).line(f).line(c).hide();else{const e=f.shiftFractionTowards(n,s.curvedDartBottomControlOffset).rotate(s.curvedDartControlAngle,f),o=f.shiftFractionTowards(n,s.curvedDartBottomControlOffset).rotate(360-s.curvedDartControlAngle,f),i=l.shiftFractionTowards(f,s.curvedDartTopControlOffset),a=c.shiftFractionTowards(f,s.curvedDartTopControlOffset);k=(new t.Path).move(l).curve(i,e,f).curve(o,a,c).hide()}else k=(new t.Path).move(l).line(f).line(c).hide();return{left:g,dart:k,right:b}}
1const op=["waist","seat","waistToHips","waistToSeat","waistToKnee"],ip=["waistBack","seatBack"],ap={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,s.Wx)("waistToKnee"),menu:"style"},hemBonus:{pct:0,min:-35,max:0,...(0,s.Wx)("seat"),menu:"style"},hem:{pct:2,min:0,max:5,...(0,s.Wx)("waistToKnee"),menu:"style"},backVent:{bool:!0,menu:"style"},backVentLength:{pct:40,min:5,max:70,toAbs:(t,{measurements:e,options:o},i)=>t*(e.waistToKnee*(1+i.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,s.Wx)("seat"),menu:"fit"},waistEase:{pct:1,min:0,max:8,...(0,s.Wx)("waist"),menu:"fit"},backDartDepthFactor:{pct:50,min:35,max:70,...(0,s.Wx)("waistToSeat"),menu:"advanced"},frontDartDepthFactor:{pct:45,min:30,max:65,...(0,s.Wx)("waistToSeat"),menu:"advanced"},dartToSideSeamFactor:{pct:50,min:30,max:70,menu:"advanced"}};function sp({sa:t,options:e,measurements:o,Point:i,Path:a,points:s,paths:n,store:r,macro:l,part:c,log:p},h){const d=o.waistToKnee*(1+e.lengthBonus);r.set("skirtLength",d),r.set("waistEase",o.waist*e.waistEase),r.set("seatEase",o.seat*e.seatEase),r.set("hem",o.waistToKnee*e.hem);const f=h?e.frontDartDepthFactor:e.backDartDepthFactor;let m=o.waist,u=o.seat>m?o.seat:m;!function(t,e,o,i,a,s){o+=i,a+=s;const n=Math.max(o-a,0);let r=e.nrOfDarts,l=Zc(e,n,a,r);l<=e.dartMinimumWidth*r&&r>1&&(r--,l=Zc(e,n,a,r)),n/4-l<e.dartSideMinimum&&(l=0);let c=tp(e,n,a,r);c<e.dartMinimumWidth*r&&r>1&&(r=1,l=Zc(e,n,a,r),c=tp(e,n,a,r)),t.set("frontDartSize",l),t.set("backDartSize",c),t.set("nrOfDarts",r)}(r,e,u,r.get("seatEase"),m,r.get("waistEase"));let g=r.get("nrOfDarts"),b=r.get("frontDartSize");0==h&&(b=r.get("backDartSize")),b<=0&&(g=0),r.set("nrOfDarts",g),r.set("dartSize",b),"seatBack"in o?u=2*(h?u-o.seatBack:o.seatBack):u*=1+(h?-1:1)*e.sideSeamShiftPercentage,"waistBack"in o?m=2*(h?m-o.waistBack:o.waistBack):m*=1+(h?-1:1)*e.sideSeamShiftPercentage,m>u&&(u=m),u+=r.get("seatEase"),m+=r.get("waistEase");const k=u/4;s.lWaist=new i(0,0),s.lLeg=new i(0,d),s.rWaistOriginal=new i(k,0),s.rLeg=new i(k+e.hemBonus*u/10,d),s.lSeat=new i(0,o.waistToSeat),s.rSeat=new i(k,o.waistToSeat),s.rWaistCPdown=new i(k,o.waistToSeat/3),s.rSeatCPup=new i(k,o.waistToSeat/3*2),s.rSeatCPdown=s.rSeat.shift(270,(o.waistToSeat-o.waistToHips)*Math.abs(e.hemBonus*u/10)/e.hipCurveDividerDown);let w=.99,C=.97,v=1,T=1,y=1,x=null,B=null,S=null,L=0,P=null,R=0,F=null,W=null;do{if(v<-1?w*=.98:v>1&&(w*=1.02),T<-1?C*=.97:T>1&&(C*=1.03),s.rWaistTemp1=s.lWaist.shift(0,m/4*w),s.rWaistTemp2=s.rWaistTemp1.shift(0,b*g),s.rWaist=s.rWaistTemp2.shift(90,.0615*o.waistToSeat*C),s.lWaistCP=s.lWaist.shift(0,u/12),s.rWaistCPleft=s.rWaist.shift(s.rWaist.angle(s.rWaistCPdown)-90,m/16),x=(new a).move(s.lWaist).curve(s.lWaistCP,s.rWaistCPleft,s.rWaist).hide(),g>0){if(F=ep(c,x,u/4/e.curvePlacement,b,o.waistToSeat*f),F){if(L=F.left.length(),s.dart1Start=F.dart.start(),s.dart1Middle=F.dart.ops[1].to,s.dart1End=F.dart.end(),g>1){let t=o.waist/35;t<b/1.8&&(t=b/1.8),W=ep(c,F.right,t,b,o.waistToSeat*f*e.dart2factor),W?(L+=W.left.length(),L+=W.right.length(),B=F.left.clone().join(F.dart).join(W.left).join(W.dart).join(W.right),S=F.left.clone().line(W.left.start()).join(W.left).line(W.right.start()).join(W.right),s.dart2Start=W.dart.start(),s.dart2Middle=W.dart.ops[1].to,s.dart2End=W.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 a).move(s.rLeg).curve(s.rLeg,s.rSeatCPdown,s.rSeat).curve(s.rSeatCPup,s.rWaistCPdown,s.rWaist),v=m/4-L,h?T=0:(R=P.length(),T=r.get("sideSeamLength")-R)}while((Math.abs(v)>1||Math.abs(T)>1)&&y++<100);if(n.waist1=x.translate(0,10).attr("class","lining dashed"),y>=100&&p.error("Too many iterations trying to make it fit!"),h&&(R=P.length(),r.set("sideSeamLength",R)),s.lHem=s.lLeg,s.rHem=s.rLeg,n.hem=(new a).move(s.lLeg).line(s.rLeg).attr("class","fabric stroke-sm").hide(),r.get("hem")>0){s.lHem=s.lLeg.shift(270,r.get("hem"));const t=s.rSeat.shift(270,2*(s.rLeg.y-s.rSeat.y)),e=t.shift(90,s.rSeatCPdown.y-s.rSeat.y),o=(new a).move(t).curve(e,s.rLeg,s.rLeg);s.rHem=o.intersectsY(s.lHem.y)[0];P=o.split(s.rHem)[1].join(P),n.hem.unhide()}n.leftSide=(new a).move(s.lWaist).line(s.lHem).hide(),n.bottom=(new a).move(s.lHem).line(s.rHem).hide(),n.sideSeam=P.hide(),n.waist=B.reverse().hide(),n.waistSA=S.reverse().hide(),s.titleAnchor=new i(o.waist/6,o.waistToSeat),s.logoAnchor=s.titleAnchor.shift(270,75),s.gridAnchor=s.logoAnchor.clone(),s.grainlineTop=s.lWaist.shift(0,50).shift(270,50),s.grainlineBottom=s.lLeg.shift(0,50).shift(90,50),l("hd",{from:s.lSeat,to:s.rSeat,y:s.rSeat.y,id:"seatWidth"}),l("vd",{from:s.lWaist,to:s.rWaist,x:s.rWaist.x+e.paperlessOffset+t,id:"sideWaistHeight",noStartMarker:!0,noEndMarker:!0}),l("vd",{from:s.lWaist,to:s.lLeg,x:s.lLeg.x+e.paperlessOffset+t,id:"heightToHem"}),r.get("hem")>0&&l("vd",{from:s.lLeg,to:s.lHem,x:s.lLeg.x+e.paperlessOffset+t,id:"heightHem",noStartMarker:!0,noEndMarker:!0}),r.get("nrOfDarts")>0?(l("hd",{from:s.lWaist,to:s.dart1Middle,y:s.dart1Middle.y,id:"dart1Middle"}),l("hd",{from:s.lWaist,to:s.dart1Start,y:s.dart1Start.y-e.paperlessOffset-t,id:"middleToDart1"}),l("hd",{from:s.dart1Start,to:s.dart1End,y:s.dart1End.y-e.paperlessOffset-t,id:"widthDart1",noStartMarker:!0,noEndMarker:!0}),r.get("nrOfDarts")>1?(l("hd",{from:s.lWaist,to:s.dart2Middle,y:s.dart2Middle.y,id:"middleToDart2"}),l("hd",{from:s.dart1End,to:s.dart2Start,y:s.dart2Start.y-e.paperlessOffset-t,id:"dart1toDart2",noStartMarker:!0,noEndMarker:!0}),l("hd",{from:s.dart2Start,to:s.dart2End,y:s.dart2End.y-e.paperlessOffset-t,id:"widthDart2",noStartMarker:!0,noEndMarker:!0}),l("hd",{from:s.dart2End,to:s.rWaist,y:s.rWaist.y-e.paperlessOffset-t,id:"dart2toSide"}),l("vd",{from:s.lWaist,to:s.dart2Middle,x:s.lWaist.x-e.paperlessOffset-t,id:"heightDart2"}),l("vd",{from:s.dart2Middle,to:s.dart1Middle,x:s.lWaist.x-e.paperlessOffset-t,id:"heightDart1toDart2",noStartMarker:!0,noEndMarker:!0}),l("vd",{from:s.dart1Middle,to:s.lSeat,x:s.lWaist.x-e.paperlessOffset-t,id:"dart1ToSeat"})):(l("vd",{from:s.lWaist,to:s.dart1Middle,x:s.lWaist.x-e.paperlessOffset-t,id:"heightDart1"}),l("hd",{from:s.dart1End,to:s.rWaist,y:s.rWaist.y-e.paperlessOffset-t,id:"dart1toSide"}),l("vd",{from:s.dart1Middle,to:s.lSeat,x:s.lWaist.x-e.paperlessOffset-t,id:"dart1toSeat"}))):(l("hd",{from:s.lWaist,to:s.rWaist,y:s.rWaist.y-e.paperlessOffset-t,id:"waistWidth"}),l("vd",{from:s.lWaist,to:s.lSeat,x:s.lWaist.x-e.paperlessOffset-t,id:"waistToSeat"}))}const np={name:"penelope.back",measurements:op,optionalMeasurements:ip,options:ap,draft:t=>{const{options:e,measurements:o,Path:i,points:a,paths:s,Snippet:n,snippets:r,store:l,sa:c,macro:p,part:h}=t;if(sp(t,!1),1==e.backVent){const t=Math.min(l.get("skirtLength")-o.waistToHips,e.backVentLength*l.get("skirtLength"));a.vLeg=a.rLeg.shiftFractionTowards(a.lLeg,1+e.backVentWidth),a.vHem=a.rHem.shiftFractionTowards(a.lHem,1+e.backVentWidth),a.vTop=a.vLeg.shift(90,t),a.lVent=a.vTop.shift(0,a.lLeg.dx(a.rLeg)*e.backVentWidth).shift(90,a.lLeg.dx(a.rLeg)*e.backVentWidth),s.vent=(new i).move(a.lVent).line(a.vTop).line(a.vLeg).line(a.vHem).hide(),s.leftSide=(new i).move(a.lWaist).line(a.lVent).join(s.vent).hide(),s.hem=s.hem.line(a.vLeg)}return s.seam=s.leftSide.clone().join(s.bottom).join(s.sideSeam).join(s.waist).attr("class","fabric"),p("grainline",{from:a.grainlineTop,to:a.grainlineBottom}),r.logo=new n("logo",a.logoAnchor),l.cutlist.addCut({cut:0==e.backVent&&"backSeam"!=e.zipperLocation?1:2,from:"fabric"}),0==e.backVent&&"backSeam"!=e.zipperLocation&&p("cutonfold",{from:a.lWaist,to:a.lLeg,id:"back"}),p("title",{nr:2,at:a.titleAnchor,title:"back"}),c&&(e.backVent||"backSeam"==e.zipperLocation?s.sa=s.leftSide.clone().join(s.bottom).join(s.sideSeam).join(s.waistSA).line(a.lWaist).close().offset(c).attr("class","fabric sa"):s.sa=(new i).move(a.lHem).join(s.bottom.join(s.sideSeam).join(s.waistSA).offset(c)).line(a.lWaist).attr("class","fabric sa")),e.backVent?(p("hd",{from:a.vTop,to:a.lVent,y:a.vTop.y,id:"ventWidth",noStartMarker:!0,noEndMarker:!0}),p("vd",{from:a.lSeat,to:a.lVent,x:a.lWaist.x-e.paperlessOffset-c,id:"seatToVent"}),p("vd",{from:a.lVent,to:a.vTop,x:a.lVent.x,id:"ventDiagonalHeight",noStartMarker:!0,noEndMarker:!0}),p("hd",{from:a.vLeg,to:a.rLeg,y:a.rHem.y+c+e.paperlessOffset,id:"legWidth"}),p("hd",{from:a.vHem,to:a.rHem,y:a.rHem.y+c+2*e.paperlessOffset,id:"hemWidth"})):(p("hd",{from:a.lLeg,to:a.rLeg,y:a.rHem.y+c+e.paperlessOffset,id:"legWidth"}),p("hd",{from:a.lHem,to:a.rHem,y:a.rHem.y+c+2*e.paperlessOffset,id:"hemWidth"})),h}},rp={name:"penelope.front",measurements:op,optionalMeasurements:ip,options:ap,draft:t=>{const{options:e,Path:o,points:i,paths:a,Snippet:s,snippets:n,sa:r,macro:l,store:c,part:p}=t;return sp(t,!0),a.seam=a.leftSide.clone().join(a.bottom).join(a.sideSeam).join(a.waist).attr("class","fabric"),l("cutonfold",{from:i.lWaist,to:i.lLeg,id:"front"}),l("title",{nr:1,at:i.titleAnchor,title:"front"}),l("grainline",{from:i.grainlineTop,to:i.grainlineBottom}),i.scaleBox=i.logoAnchor.shift(270,100),l("scalebox",{at:i.scaleBox}),n.logo=new s("logo",i.logoAnchor),c.cutlist.addCut({cut:1,from:"fabric"}),r&&(a.sa=(new o).move(i.lHem).join(a.bottom.join(a.sideSeam).join(a.waistSA).offset(r)).line(i.lWaist).attr("class","fabric sa")),l("hd",{from:i.lLeg,to:i.rLeg,y:i.rHem.y+r+e.paperlessOffset,id:"legWidth"}),l("hd",{from:i.lHem,to:i.rHem,y:i.rHem.y+r+2*e.paperlessOffset,id:"hemWidth"}),p}},{waistEase:lp}=ap,cp={name:"penelope.waistband",measurements:["waist","waistToKnee"],options:{waistEase:lp,waistband:{bool:!0,menu:"style"},waistbandWidth:{pct:10,min:5,max:20,...(0,s.Wx)("waistToKnee"),menu:(t,e)=>!1!==t?.options?.waistband&&"style"},waistbandOverlap:{pct:3.5,min:0,max:10,...(0,s.Wx)("waist"),menu:(t,e)=>!1!==t?.options?.waistband&&"style"}},draft:({options:t,measurements:e,Point:o,Path:i,points:a,paths:s,Snippet:n,snippets:r,sa:l,macro:c,store:p,expand:h,units:d,part:f})=>{if(!t.waistband)return f.hide();let m=e.waist;
1m+=e.waist*t.waistEase;const u=t.waistbandWidth*e.waistToKnee,g=m/2+e.waist*t.waistbandOverlap;return p.set("waistbandWidth",u),h?(a.TL=new o(0,0),a.BL=new o(0,m/2+t.waistbandOverlap),a.TR=new o(u,0),a.BR=new o(u,m/2+t.waistbandOverlap),a.titleAnchor=new o(u/2,m/6),a.logoAnchor=new o(u/2,m/3),a.gridAnchor=a.logoAnchor.clone(),s.outline=(new i).move(a.TL).line(a.BL).line(a.BR).line(a.TR).line(a.TL).close().attr("class","fabric"),c("cutonfold",{from:a.TR,to:a.TL,grainline:!0,reverse:!0}),r.logo=new n("logo",a.logoAnchor),p.cutlist.addCut({cut:1,from:"fabric"}),c("title",{nr:3,at:a.titleAnchor,title:"waistband",rotation:90,scale:.75}),l&&(s.sa=(new i).move(a.TL).join((new i).move(a.TL).line(a.BL).line(a.BR).line(a.TR).offset(l)).line(a.TR).attr("class","fabric sa")),c("vd",{from:a.TL,to:a.BL,x:a.TL.x+t.paperlessOffset,id:"height"}),c("hd",{from:a.BL,to:a.BR,y:a.BR.y-t.paperlessOffset,id:"width"}),f):(p.flag.note({msg:"penelope:cutWaistband",replace:{width:d(g),length:d(u)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),p.flag.preset("expand"),f.hide())}},pp=new s.pT({data:Vc,parts:[np,rp,cp]}),hp={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 dp=(t,e)=>!(!e?.spread&&void 0!==e?.spread)&&"style.spread",fp=(t,e)=>!(!e?.frontPleat&&void 0!==e?.frontPleat)&&"style.pleat",mp={from:Wo,name:"percy.front",hide:{from:!0},measurements:["inseam"],options:{lengthBonus:0,lengthInseam:{pct:25,min:5,max:100,menu:"style",...(0,s.Wx)("inseam")},slashIterations:{count:8,min:1,max:24,menu:dp},hemRatio:{pct:250,min:100,max:400,menu:dp},spread:{bool:!0,menu:"style.spread"},frontPleat:{bool:!0,menu:"style.pleat"},frontPleatPosition:{pct:50,min:10,max:90,menu:fp},frontPleatWidth:{pct:6.4,min:0,max:10,menu:fp,...(0,s.Wx)("waist")},frontPleatDisplayLength:{pct:8,min:1,max:20,menu:fp,...(0,s.Wx)("waist")},waistHeight:{pct:75,min:0,max:100,menu:"style"},waistbandWidth:{pct:10,min:4,max:20,...(0,s.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:i,options:a,complete:s,measurements:n,store:r,macro:l,utils:c,snippets:p,Snippet:h,sa:d,log:f,part:m}){o.outseam=(()=>{let e=t.styleWaistOut||t.waistOut;return a.fitKnee?t.waistOut.x<t.seatOut.x?(new i).move(e).curve(t.seatOut,t.kneeOutCp1,t.kneeOut).line(t.floorOut):(new i).move(e).line(t.seatOut).curve(t.seatOutCp2,t.kneeOutCp1,t.kneeOut).line(t.floorOut):t.waistOut.x<t.seatOut.x?(new i).move(e).curve(t.seatOut,t.kneeOutCp1,t.floorOut):(new i).move(e).line(t.seatOut).curve(t.seatOutCp2,t.kneeOutCp1,t.floorOut)})().setClass("lining").hide(),o.inseam=(a.fitKnee?(new i).move(t.floorIn).line(t.kneeIn).curve(t.kneeInCp2,t.forkCp1,t.fork):(new i).move(t.floorIn).curve(t.kneeInCp2,t.forkCp1,t.fork)).setClass("lining").hide(),o.crotchseam=(new i).move(t.fork).curve(t.crotchSeamCurveCp1,t.crotchSeamCurveCp2,t.crotchSeamCurveStart).line(t.styleWaistIn),t.inseamShiftUpwards=o.inseam.shiftFractionAlong(1-a.lengthInseam);const u=o.inseam.length()*a.lengthInseam,g=o.outseam.length()-o.inseam.length();t.outseamShiftUpwards=o.outseam.shiftAlong(u+g),o.shortHem=(new i).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 i).move(t.styleWaistIn).line(t.styleWaistOut).setClass("lining");const k=["styleWaistIn","styleWaistInNoAngle","crotchSeamCurveStart","cfSeat","cfWaist","crotchSeamCurveCp2","crotchSeamCurveMax","crotchSeamCurveCp1","fork","forkCp1","inseamShiftUpwards","waistIn"];if(a.spread){t.hemcenter=t.outseamShiftUpwards.shiftFractionTowards(t.inseamShiftUpwards,.5),t.waistcenter=t.styleWaistOut.shiftFractionTowards(t.styleWaistIn,.5);
1const e=t.hemcenter.dist(t.waistcenter),s=50*(b*a.hemRatio-b)/e,n=Math.min(s,90)/a.slashIterations;let r=[],l=[];for(let o=1;o<=a.slashIterations;o++)t["slashPointsHem"+o]=t.outseamShiftUpwards.shiftFractionTowards(t.inseamShiftUpwards,o/(Number(a.slashIterations)+1)),r.push(t["slashPointsHem"+o]),t["slashPointsWaist"+o]=t.styleWaistOut.shiftFractionTowards(t.styleWaistIn,o/(Number(a.slashIterations)+1)),l.push(t["slashPointsWaist"+o]);let c=r.slice();for(let i=0;i<a.slashIterations;i++){for(let e=i;e<a.slashIterations;e++)l[e]=t["slashPointsWaist"+e]=l[e].rotate(n,l[i]);for(let e=i;e<a.slashIterations;e++)r[e]=t["slashPointsHem"+e]=r[e].rotate(n,l[i]);for(let e=i+1;e<a.slashIterations;e++)c[e]=t["slashPointsInner"+e]=c[e].rotate(n,l[i]);o.shortInseam=o.shortInseam.rotate(n,l[i]),o.hint&&(o.hint=o.hint.rotate(n,l[i]).setClass("note help")),o.crotchseam=o.crotchseam.rotate(n,l[i]);for(let e of k)t[e]=t[e].rotate(n,l[i])}o.waist=(new i).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 i).move(t.outseamShiftUpwards).setClass("various");for(let t=0;t<a.slashIterations;t++)o.shortHem=o.shortHem.line(c[t]).line(r[t]);o.shortHem=o.shortHem.line(t.inseamShiftUpwards);for(const i in o)o[i]=o[i].rotate(s/-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(s/-2,t.styleWaistOut)}const w=n.waist*(1+a.waistEase);f.info("The circumference of the garment at the waist is "+w);const C=n.seat*(1+a.seatEase);f.info("The circumference of the garment at the seat is "+C);const v=C-w;f.info("The garment is "+v+" mm wider at the seat than at the waist");const T=v/n.waistToSeat;f.info("The garment gets wider by "+T+" for every mm down from the waist");const y=n.seat-w;f.info("The body measurement at the seat is "+n.seat),f.info("The seat is "+n.waistToSeat+" down from the body waist"),f.info("This pattern needs "+y+" extra in the garment waist to fit the seat through");const x=y/T;f.info("The garment is "+y+" mm wider than the waist at a point "+
1x+" down from the waist"),f.info("The waistband is "+a.waistbandWidth*n.waistToFloor+" wide"),f.info("The front center point is below the body's waist by "+(a.waistbandWidth*n.waistToFloor+(1-a.waistHeight)*n.waistToHips));const B=Math.max(x-(a.waistbandWidth*n.waistToFloor+(1-a.waistHeight)*n.waistToHips),.1*n.waistToSeat);r.set("openingDepth",B),f.info("The opening needs to go down the front piece by "+B),t.pocketInnerEdge=o.waist.shiftFractionAlong(a.frontPanelPercentage),f.info("Waist front panel width is "+o.waist.length()*a.frontPanelPercentage*2),r.set("frontPanelWidth",o.waist.length()*a.frontPanelPercentage*2),t.pocketFacingEdge=o.waist.shiftFractionAlong(a.frontPanelPercentage*a.pocketFacingUnderlap),r.set("side_panel_width",o.waist.length()*(1-a.frontPanelPercentage)+(1-a.pocketFacingUnderlap)*o.waist.length()*a.frontPanelPercentage),r.set("frontPanelOverlap",t.pocketInnerEdge.dist(t.pocketFacingEdge)),r.set("front_waist_width",o.waist.length());const S=Math.max(n.waist*a.pocketOpeningDepth,B);if(t.pocketBottomEdge=o.outseam.shiftAlong(S),t.pocketBottomEdgeCp1=t.pocketBottomEdge.shift(t.styleWaistOut.angle(t.outseamShiftUpwards)+90,o.waist.length()*(1-a.frontPanelPercentage)*a.pocketBottomCurve),t.pocketInnerEdgeCp2=t.pocketInnerEdge.shift(t.styleWaistOut.angle(t.styleWaistIn)-90,o.waist.length()/4),o.pocketCutout=(new i).move(t.pocketBottomEdge).curve(t.pocketBottomEdgeCp1,t.pocketInnerEdgeCp2,t.pocketInnerEdge).reverse(),B<0?f.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(),a.frontPleat){const e=o.trimmedWaist.length()*a.frontPleatPosition,s=e/o.waist.length();t.topPleatPoint=o.trimmedWaist.shiftAlong(e),t.bottomPleatPoint=o.shortHem.shiftFractionAlong(1-s);let l=0;l=a.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=n.waist*a.frontPleatWidth;f.info("Pleat offset by "+c+" mm at "+l+" degrees"),t.pleatShiftByAngle=t.topPleatPoint.shift(l,c);const p=t.pleatShiftByAngle.x-t.topPleatPoint.x,h=t.pleatShiftByAngle.y-t.topPleatPoint.y;for(let o of k)t[o]=t[o].translate(p,h);o.shortInseam=o.shortInseam.translate(p,h),o.hint&&(o.hint=o.hint.translate(p,h).setClass("note help")),o.crotchseam=o.crotchseam.translate(p,h),r.set("centerToPleat",o.trimmedWaist.split(t.topPleatPoint)[0].length()),o.trimmedWaist=o.trimmedWaist.split(t.topPleatPoint)[0].translate(p,h).join(o.trimmedWaist.split(t.topPleatPoint)[1]),o.shortHem=o.shortHem.split(t.bottomPleatPoint)[0].join(o.shortHem.split(t.bottomPleatPoint)[1].translate(p,h));const d=a.frontPleatDisplayLength*n.waist;f.info("Pleat marking length is "+d),t.pleatInnerBottom=t.topPleatPoint.shift(l-90,d),t.pleatOuterBottom=t.pleatShiftByAngle.shift(l-90,d),t.pleatCenterBottom=t.pleatInnerBottom.shiftFractionTowards(t.pleatOuterBottom,.5),t.pleatCenterTop=t.topPleatPoint.shiftFractionTowards(t.pleatShiftByAngle,.5),o.pleatInner=(new i).move(t.topPleatPoint).line(t.pleatInnerBottom).setClass("sa"),o.pleatOuter=(new i).move(t.pleatShiftByAngle).line(t.pleatOuterBottom).setClass("sa"),o.pleatCenter=(new i).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(),d&&(o.saBase=o.seam,o.sa=o.saBase.offset(d).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<n.waistToFloor;)f.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<n.waistToSeat;)f.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+d}),l("hd",{id:"wHemLeft",to:t.inseamShiftUpwards,from:t.hemLowestPoint,y:t.hemLowestPoint.y+15+d}),l("hd",{id:"wHemRight",to:t.hemLowestPoint,from:t.outseamShiftUpwards,y:t.hemLowestPoint.y+15+d}),l("vd",{id:"floorToOutseam",from:t.hemLowestPoint,to:t.outseamShiftUpwards,x:t.outseamShiftUpwards.x-15-d}),l("vd",{id:"floorToInseam",from:t.hemLowestPoint,to:t.inseamShiftUpwards,x:t.inseamShiftUpwards.x+15+d}
1),l("pd",{path:o.trimmedOutseam.reverse(),d:-15-d}),l("vd",{id:"vWaistToInseam",from:t.pocketBottomEdge,to:t.outseamShiftUpwards,x:t.outseamShiftUpwards.x-15-d}),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-d}),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-d}),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+d+15}),l("hd",{id:"hInseam",to:t.inseamShiftUpwards,from:t.fork,y:t.fork.y-d-15}),l("pd",{id:"lengthInseam",path:o.shortInseam,d:-15-d}),l("pd",{id:"lengthCrossSeam",path:o.crotchseam.reverse(),d:-15-d}),l("hd",{id:"hCrossSeam",from:t.styleWaistIn,to:t.fork,y:t.styleWaistIn.y-d-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-d-15}),a.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})),m}};const up={from:Fo,name:"percy.back",hide:{from:!0},options:{},draft:function({points:t,Point:e,paths:o,Path:i,options:a,complete:s,measurements:n,store:r,macro:l,utils:c,snippets:p,Snippet:h,sa:d,log:f,part:m}){delete o.hint,o.outseam=(()=>{let e=t.styleWaistOut||t.waistOut;return a.fitKnee?t.waistOut.x>t.seatOut.x?(new i).move(t.floorOut).line(t.kneeOut).curve(t.kneeOutCp2,t.seatOut,e):(new i).move(t.floorOut).line(t.kneeOut).curve(t.kneeOutCp2,t.seatOutCp1,t.seatOut).curve_(t.seatOutCp2,e):t.waistOut.x>t.seatOut.x?(new i).move(t.floorOut).curve(t.kneeOutCp2,t.seatOut,e):(new i).move(t.floorOut).curve(t.kneeOutCp2,t.seatOutCp1,t.seatOut).curve_(t.seatOutCp2,e)})().setClass("lining").hide(),o.inseam=(a.fitKnee?(new i).move(t.fork).curve(t.forkCp2,t.kneeInCp1,t.kneeIn).line(t.floorIn):(new i).move(t.fork).curve(t.forkCp2,t.kneeInCp1,t.floorIn)).setClass("lining").hide(),t.inseamShiftUpwards=o.inseam.shiftFractionAlong(a.lengthInseam);const u=o.inseam.length()*(1-a.lengthInseam);t.outseamShiftUpwards=o.outseam.shiftAlong(u+0),o.shortHem=(new i).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 i).move(t.styleWaistIn).line(t.crossSeamCurveStart).curve(t.crossSeamCurveCp1,t.crossSeamCurveCp2,t.fork),o.waist=(new i).move(t.styleWaistIn).line(t.styleWaistOut),a.spread){const e=Math.floor(2*a.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 s=t.hemCenter.dist(t.topCenter),n=50*(g*a.hemRatio-g)/s,r=Math.min(n,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 h=[],d=[];for(let i=1;i<=c;i++)t["slashPointsWaist"+i]=o.crossSeam.reverse().shiftFractionAlong(i/c),d.push(t["slashPointsWaist"+i]);for(let i=c+1;i<=e;i++)t["slashPointsWaist"+i]=o.waist.shiftFractionAlong((i-c)/p),d.push(t["slashPointsWaist"+i]);for(let o=1;o<=e;o++)t["slashPointsHem"+o]=t.outseamShiftUpwards.shiftFractionTowards(t.inseamShiftUpwards,1-o/(e+1)),h.push(t["slashPointsHem"+o]);let m=h.slice();const u=["styleWaistOut","waistOut","seatOutCp1","seatOutCp2","seatOut","seatY","upperLegY","outseamShiftUpwards"];for(let i=0;i<e;i++){for(let o=i;o<e;o++)d[o]=t["slashPointsWaist"+o]=d[o].rotate(r,d[i]);i<c&&(t.styleWaistIn=t.styleWaistIn.rotate(r,d[i]),t.waistIn=t.waistIn.rotate(r,d[i]),t.styleWaistInNoAngle=t.styleWaistInNoAngle.rotate(r,d[i]));for(let o=i;o<e;o++)h[o]=t["slashPointsHem"+o]=h[o].rotate(r,d[i]);for(let o=i+1;o<e;o++)m[o]=t["slashPointsInner"+o]=m[o].rotate(r,d[i]);o.newOutseam=o.newOutseam.rotate(r,d[i]);for(let e of u)t[e]=t[e].rotate(r,d[i])}let b=d.slice(0,c),k=d.slice(c);f.info(b.length+" points in pointsCrossOnly"),o.crossSeam=o.crossSeam.reverse();for(let i=1;i<c;i++){t.crossSeamRotationPoint=o.crossSeam.shiftFractionAlong(i/c);let e=o.crossSeam.split(o.crossSeam.shiftFractionAlong(i/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(),f.info(k.length+" points in pointsWaistOnly"),o.waist=(new i).move(t.styleWaistIn);for(let t=0;t<p;t++)o.waist=o.waist.line(k[t]);o.waist=o.waist.line(t.styleWaistOut),o.shortHem=(new i).move(t.inseamShiftUpwards);for(let t=0;t<e;t++)o.shortHem=o.shortHem.line(m[t]).line(h[t]);o.shortHem=o.shortHem.line(t.outseamShiftUpwards);const w=180-t.outseamShiftUpwards.angle(t.inseamShiftUpwards);for(const i in o)o[i]=o[i].rotate(w,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(w,t.styleWaistOut)}r.set("back_waist_width",o.waist.length()),p.backNotch=new h("bnotch",o.waist.shiftFractionAlong(.33)),o.seam=o.newInseam.join(o.shortHem).join(o.newOutseam).join(o.waist.reverse()).join(o.crossSeam).close().hide(),d&&(o.saBase=o.seam,o.sa=o.saBase.offset(d).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,k=o.shortHem.intersectsY(t.hemLowestPoint.y+1);for(;k.length>0&&b<n.waistToSeat;)f.info("Hem intersects "+k.length+" times at y "+t.hemLowestPoint.y),t.hemLowestPoint=k[0],b+=1,k=o.shortHem.intersectsY(t.hemLowestPoint.y+1);for(t.waistLowestPoint=o.waist.shiftFractionAlong(.5),b=0,k=o.waist.intersectsY(t.waistLowestPoint.y+2);k.length>0&&b<n.waistToFloor;)f.info("Waist intersects "+k.length+" times at y "+t.waistLowestPoint.y),t.waistLowestPoint=k[0],b+=2,k=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+d}),l("hd",{id:"wHemLeft",from:t.inseamShiftUpwards,to:t.hemLowestPoint,y:t.hemLowestPoint.y+15+d}),l("hd",{id:"wHemRight",from:t.hemLowestPoint,to:t.outseamShiftUpwards,y:t.hemLowestPoint.y+15+d}),l("vd",{id:"floorToOutseam",from:t.hemLowestPoint,to:t.outseamShiftUpwards,x:t.outseamShiftUpwards.x+15+d}),l("vd",{id:"floorToInseam",from:t.hemLowestPoint,to:t.inseamShiftUpwards,x:t.inseamShiftUpwards.x-15-d}
1),l("pd",{path:o.newOutseam.reverse(),d:-15-d}),l("vd",{id:"vWaistToInseam",from:t.styleWaistOut,to:t.outseamShiftUpwards,x:t.outseamShiftUpwards.x+15+d}),l("hd",{id:"hWaistToInseam",from:t.styleWaistOut,to:t.outseamShiftUpwards,y:t.styleWaistOut.y-15-d}),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-d}),l("hd",{id:"wWaist",to:t.styleWaistOut,from:t.styleWaistIn,y:t.styleWaistIn.y-15-d}),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-d-15}),l("hd",{id:"hInseam",from:t.inseamShiftUpwards,to:t.fork,y:t.fork.y-d-15}),l("pd",{id:"lengthInseam",path:o.newInseam,d:-15-d}),l("pd",{id:"lengthCrossSeam",path:o.crossSeam.reverse(),d:-15-d}),l("hd",{id:"hCrossSeam",to:t.styleWaistIn,from:t.fork,y:t.styleWaistIn.y-d-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 h("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"),m}};const gp={name:"percy.waist_front",measurements:[],after:[mp,up],options:{},draft:function({points:t,Point:e,paths:o,Path:i,options:a,complete:s,measurements:n,store:r,macro:l,utils:c,snippets:p,Snippet:h,sa:d,log:f,part:m}){const u=2*(r.get("back_waist_width")+r.get("front_waist_width")),g=n.seat*(1+a.seatEase),b=n.waist*(1+a.waistEase),k=n.waistFront*(1+a.waistEase),w=n.waistBack*(1+a.waistEase),C=(g-b)/n.waistToSeat,v=a.waistbandWidth*n.waistToFloor+(1-a.waistHeight)*n.waistToHips,T=(2*r.get("front_waist_width")-k)/v,y=(2*r.get("back_waist_width")-w)/v,x=b+C*n.waistToHips*(1-a.waistHeight),B=k+T*n.waistToHips*(1-a.waistHeight),S=w+y*n.waistToHips*(1-a.waistHeight);r.set("garmentTopCircumference",u),r.set("waistbandTopCircumference",x),r.set("waistbandTopFront",B),r.set("waistbandTopBack",S);const L=r.get("frontPanelWidth");f.info("Front panel length is "+L);const P=a.waistbandWidth*n.waistToFloor;r.set("waistbandWidth",P);const R=x/u,F=B/(2*r.get("front_waist_width")),W=S/(2*r.get("back_waist_width"));r.set("waistbandTopRatio",R),r.set("waistbandTopRatioFront",F),r.set("waistbandTopRatioBack",W);const H=P/(1-F);r.set("waistband_outer_radius",H);const A=H-P;r.set("waistband_inner_radius",A);const O=L/(6.28*H),D=360*O;if(f.info("front waistband is "+O+" of total circle, or "+D+" degrees"),t.circleCenter=new e(0,-A),t.topCenter=new e(0,0),t.bottomCenter=new e(0,H-A),l("grainline",{from:t.topCenter,to:t.bottomCenter}),o.seam=(new i).move(t.bottomCenter).circleSegment(D/2,t.circleCenter),t.bottomRight=o.seam.end(),t.topRight=t.bottomRight.shiftTowards(t.circleCenter,P),o.seam=o.seam.line(t.topRight).circleSegment(-D,t.circleCenter),t.topLeft=o.seam.end(),t.bottomLeft=t.topLeft.shiftTowards(t.circleCenter,-P),o.seam=o.seam.line(t.bottomLeft).circleSegment(D/2,t.circleCenter).close(),o.bottomCurve=(new i).move(t.bottomLeft).circleSegment(D,t.circleCenter).hide(),o.topCurve=(new i).move(t.topLeft).circleSegment(D,t.circleCenter).hide(),d&&(o.saBase=o.seam,o.sa=o.saBase.offset(d).setClass("sa")),a.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 h("notch",t.pleatLeft),p.pleatRightNotch=new h("notch",t.pleatRight)}let E=r.get("frontPanelOverlap")/2;return t.overlapBottomRight=o.bottomCurve.reverse().shiftAlong(E),t.overlapTopRight=o.topCurve.reverse().shiftAlong(E*R),o.overlapRight=(new i).move(t.overlapTopRight).line(t.overlapBottomRight).setClass("sa").hide(),t.overlapBottomLeft=o.bottomCurve.shiftAlong(E),t.overlapTopLeft=o.topCurve.shiftAlong(E*R),o.overlapLeft=(new i).move(t.overlapTopLeft).line(t.overlapBottomLeft).setClass("sa").hide(),E=Math.min(E,o.overlapRight.length()/3),p.buttonhole_0=new h("button
1hole-end",o.overlapRight.shiftAlong(E)).rotate(90),p.buttonhole_1=new h("buttonhole-end",o.overlapRight.reverse().shiftAlong(E)).rotate(90),p.buttonhole_2=new h("buttonhole-start",o.overlapLeft.shiftAlong(E)).rotate(90),p.buttonhole_3=new h("buttonhole-start",o.overlapLeft.reverse().shiftAlong(E)).rotate(90),d&&(o.saBase=o.seam,o.sa=o.saBase.offset(d).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+d+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+d}),l("pd",{id:"lengthTop",path:o.topCurve,d:15+d}),m}};const bp={name:"percy.waist_side",measurements:[],after:[mp,gp],options:{},draft:function({points:t,Point:e,paths:o,Path:i,options:a,complete:s,measurements:n,store:r,macro:l,utils:c,snippets:p,Snippet:h,sa:d,log:f,part:m}){const u=r.get("side_panel_width");f.info("Side panel length is "+u);const g=r.get("waistbandWidth"),b=r.get("waistbandTopRatioFront"),k=r.get("waistband_outer_radius"),w=r.get("waistband_inner_radius"),C=u/(6.28*k),v=360*C;f.info("side waistband is "+C+" of total circle, or "+v+" degrees"),t.circleCenter=new e(0,-w),t.topCenter=new e(0,0),t.bottomCenter=new e(0,k-w),o.centerLine=(new i).move(t.topCenter).line(t.bottomCenter).setClass("note help"),o.seam=(new i).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 i).move(t.bottomLeft).circleSegment(v,t.circleCenter).hide(),o.topCurve=(new i).move(t.topLeft).circleSegment(v,t.circleCenter).hide(),d&&(o.saBase=o.seam,o.sa=o.saBase.offset(d).setClass("sa"));let T=r.get("frontPanelOverlap")/2;return t.overlapBottom=o.bottomCurve.reverse().shiftAlong(T),t.overlapTop=o.topCurve.reverse().shiftAlong(T*b),o.overlap=(new i).move(t.overlapTop).line(t.overlapBottom).setClass("sa").hide(),T=Math.min(T,o.overlap.length()/3),p.button_0=new h("button",o.overlap.shiftAlong(T)).rotate(90),p.button_1=new h("button",o.overlap.reverse().shiftAlong(T)).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+d+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+d}),l("pd",{id:"lengthTop",path:o.topCurve,d:15+d}),m}};const kp={name:"percy.waist_back",measurements:[],after:[up,gp],options:{},draft:function({points:t,Point:e,paths:o,Path:i,options:a,complete:s,measurements:n,store:r,macro:l,utils:c,snippets:p,Snippet:h,sa:d,log:f,part:m}){const u=2*r.get("back_waist_width");f.info("back panel length is "+u);const g=r.get("waistbandWidth"),b=g/(1-r.get("waistbandTopRatioBack")),k=b-g,w=u/(6.28*b),C=360*w;return f.info("back waistband is "+w+" of total circle, or "+C+" degrees"),t.circleCenter=new e(0,-k),t.topCenter=new e(0,0),t.bottomCenter=new e(0,b-k),o.centerLine=(new i).move(t.topCenter).line(t.bottomCenter).setClass("note help"),o.seam=(new i).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 i).move(t.bottomLeft).circleSegment(C,t.circleCenter).hide(),o.topCurve=(new i).move(t.topLeft).circleSegment(C,t.circleCenter).hide(),d&&(o.saBase=o.seam,o.sa=o.saBase.offset(d).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 h("bnotch",o.bottomCurve.shiftFractionAlong(.33)),p.backNotch2=new h("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+d+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+d}),l("pd",{id:"lengthTop",path:o.topCurve,d:15+d}),m}};const wp={name:"percy.cuff",measurements:[],after:[mp,up],options:{cuffWidth:{pct:5,min:1,max:15,...(0,s.Wx)("waistToFloor"),menu:"style"}}
1,draft:function({points:t,Point:e,paths:o,Path:i,options:a,complete:s,expand:n,measurements:r,store:l,macro:c,utils:p,units:h,snippets:d,Snippet:f,sa:m,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 k=a.cuffWidth*r.waistToFloor*2;return n?(t.topLeft=new e(0,0),t.bottomLeft=new e(0,k),t.bottomRight=new e(b,k),t.topRight=new e(b,0),t.centerLeft=new e(0,k/2),t.centerRight=new e(b,k/2),o.foldHere=(new i).move(t.centerLeft).line(t.centerRight).setClass("note help"),o.seam=(new i).move(t.topLeft).line(t.bottomLeft).line(t.bottomRight).line(t.topRight).line(t.topLeft).close(),m&&(o.sa=o.seam.offset(m).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-m}),c("vd",{id:"width",from:t.topLeft,to:t.bottomLeft,x:t.topLeft.x-15-m}),g):(l.flag.note({msg:"percy:cutCuff",replace:{width:h(k),length:h(b)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),l.flag.preset("expand"),g.hide())}};const Cp={name:"percy.pocket",measurements:[],from:mp,options:{pocketDepth:{pct:60,max:80,min:20,menu:"style",...(0,s.Wx)("waistToKnee")},pocketCurveControl:{pct:50,max:80,min:10,menu:"style.panel.advanced"}},draft:function({points:t,Point:e,paths:o,Path:i,options:a,complete:s,measurements:n,store:r,macro:l,utils:c,snippets:p,Snippet:h,sa:d,log:f,part:m}){o.shortOutseam.unhide(),o.waist.unhide(),o.pocketCutout.setClass("note help");let u=n.waistToKnee*a.pocketDepth-a.waistbandWidth*n.waistToFloor-(1-a.waistHeight)*n.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,a.pocketCurveControl*u),t.pocketFacingEdgeHalfway=t.pocketFacingEdge.shiftFractionTowards(t.pocketInnerCorner,a.pocketCurveControl),t.pocketFacingEdgeCp2=t.pocketFacingEdgeHalfway.shiftFractionTowards(t.pocketInnerCorner,a.pocketCurveControl),o.pocketBottomEdge=(new i).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"),a.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(),d&&(o.saBase=o.seam,o.sa=o.saBase.offset(d).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 h("notch",t.openingNotch)),t.lowestPocketPoint=t.pocketSideSeamInterceptHalfway;let k=0,w=o.pocketBottomEdge.intersectsY(t.lowestPocketPoint.y+1);for(;w.length>0&&k<n.waistToKnee;)t.lowestPocketPoint=w[0],k+=1,w=o.pocketBottomEdge.intersectsY(t.lowestPocketPoint.y+1);for(t.lowestWaistPoint=t.waistHalfway,k=0,w=o.pocketWaistEdge.intersectsY(t.lowestWaistPoint.y+1);w.length>0&&k<n.waistToKnee;)t.lowestPocketPoint=w[0],k+=1,w=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-d}),l("pd",{id:"lengthWaist",path:o.pocketWaistEdge.reverse(),d:-15-d}),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-d-15}),l("hd",{id:"hTop",from:t.styleWaistOut,to:t.pocketFacingEdge,y:t.styleWaistOut.y-d-15}),l("ld",{id:"lengthOpening",from:t.pocketFacingEdge,to:t.openingNotch,d:7}),t.rightmostPocketPoint=t.pocketSideSeamIntercept,k=0,w=o.pocketBottomEdge.intersectsX(t.rightmostPocketPoint.x+1);w.length>0&&k<n.waistToKnee;)t.rightmostPocketPoint=w[0],k+=1,w=o.pocketBottomEdge.intersectsX(t.rightmostPocketPoint.x+1);return l("hd",{id:"hBottom",from:t.pocketSideSeamIntercept,to:t.rightmostPocketPoint,y:t.lowestPocketPoint.y+d+30}),l("hd",{id:"hBottomLeft",to:t.lowestPocketPoint,from:t.pocketSideSeamIntercept,y:t.lowestPocketPoint.y+d+15}),l("hd",{id:"hBottomRight",from:t.lowestPocketPoint,to:t.rightmostPocketPoint,y:t.lowestPocketPoint.y+d+15}),l("vd",{id:"vBottomRight",from:t.lowestPocketPoint,to:t.pocketFacingEdge,x:t.rightmostPocketPoint.x+d+15}),l("vd",{id:"vBottomLeft",from:t.lowestPocketPoint,to:t.pocketSideSeamIntercept,x:t.pocketSideSeamIntercept.x-d-15}),m}};const vp={name:"percy.pocket_facing",measurements:[],from:Cp,options:{},draft:function({points:t,Point:e,paths:o,Path:i,options:a,complete:s,expand:n,measurements:r,store:l,macro:c,utils:p,snippets:h,Snippet:d,sa:f,log:m,part:u}){return n?(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(),f&&(o.saBase=o.seam,o.sa=o.saBase.offset(f).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-f}),c("pd",{id:"lengthWaist",path:o.trimmedWaist.reverse(),d:-15-f}),c("pd",{id:"lengthPocket",path:o.pocketCutout.reverse(),d:15+f}),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-f-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())}},Tp=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"}'),yp=new s.pT({data:Tp,parts:[mp,up,wp,gp,bp,kp,Cp,vp]}),xp=(0,s.D4)([Po,hp]),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,s.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:i,points:a,paths:s,utils:n,store:r,part:l}){const c=n.stretchToScale(t.horizontalBustStretch),p=n.stretchToScale(t.horizontalBandStretch),h=n.stretchToScale(t.verticalStretch),d=n.stretchToScale(t.strapStretch),f=e.bustSpan/2*c,m=(e.highBust-e.chest+e.bustFront)*c,u=e.bustFront*c,g=e.chest*c,b=g-u,k=(e.waist*t.length+e.underbust*(1-t.length))*p,w=e.neck*t.neckWidthFront;a.hps=new o(w,0),a.shoulder=n.beamIntersectsX(a.hps,a.hps.shift(-1*e.shoulderSlope,100),e.shoulderToShoulder/2);const C=g/2;a.hpsBack=new o(C-a.hps.x,0),a.shoulderBack=new o(C-a.shoulder.x,a.shoulder.y),a.cfNeckBase=new o(0,w*h),a.cfBust=new o(0,e.hpsToBust*h),a.cfUnderbust=a.cfBust.translate(0,e.bustPointToUnderbust*h),a.cfWaist=new o(0,e.hpsToWaistFront*h),a.bustPoint=new o(f,e.hpsToBust*h),a.cfBand=a.cfUnderbust.shiftFractionTowards(a.cfWaist,t.length),a.cfNeck=a.cfNeckBase.shiftFractionTowards(a.cfBand,t.neckHeightFront);const v=a.cfBust.dy(a.cfBand);a.cbBand=a.cfBand.translate(.5*g,0),a.sfBand=a.cfBand.translate(u*t.splitOffsetFront,0),a.sfChest=a.cfBust.translate(u/2,0),a.sfDart=a.sfBand.translate(0,-v).shiftFractionTowards(a.bustPoint,t.bustPointFocus),a.armpit=new o(.5*u,a.cfWaist.y-e.waistToArmpit*(1-t.armpitAdjustment)*h),a.defaultArmpit=new o(.5*u,a.cfWaist.y-e.waistToArmpit*h),a.cbNeck=new o(C,e.neck*t.neckHeightBack);const T=.1*b,y=b*t.backWidth;a.defaultArmpit.y+.2*T>a.bustPoint.y&&r.flag.error({msg:"sabrina:badArmpitPosition"});const x=t.strapPosition*(1-t.strapWidth)+t.strapWidth/2;a.strapFrontLeft=a.hps.shiftFractionTowards(a.shoulder,x-t.strapWidth/2),a.strapFrontRight=a.hps.shiftFractionTowards(a.shoulder,x+t.strapWidth/2),a.strapBackLeft=a.hpsBack.shiftFractionTowards(a.shoulderBack,x-t.strapWidth/2),a.strapBackRight=a.hpsBack.shiftFractionTowards(a.shoulderBack,x+t.strapWidth/2),a.strapFrontLeft=a.strapFrontLeft.shift(t.strapAngle-90-e.shoulderSlope,(1-d)*a.cfNeck.y),a.strapFrontRight=a.strapFrontRight.shift(t.strapAngle-90-e.shoulderSlope,(1-d)*a.cfNeck.y),a.strapBackLeft=a.strapBackLeft.shift(t.strapAngle-90+e.shoulderSlope,(1-d)*a.cbNeck.y),a.strapBackRight=a.strapBackRight.shift(t.strapAngle-90+e.shoulderSlope,(1-d)*a.cbNeck.y),a.strapFrontLeftCp=a.strapFrontLeft.shift(t.strapAngle-90-e.shoulderSlope,e.chest*t.stra
1pCurveFront),a.strapFrontRightCp=a.strapFrontRight.shift(t.strapAngle-90-e.shoulderSlope,e.chest*t.strapCurveFront),a.strapBackLeftCp=a.strapBackLeft.shift(t.strapAngle-90+e.shoulderSlope,e.chest*t.strapCurveBack),a.strapBackRightCp=a.strapBackRight.shift(t.strapAngle-90+e.shoulderSlope,e.chest*t.strapCurveBack),t.useLegacyArmholePosition?a.sfArmpit=a.armpit.shift(180,T):a.sfArmpit=new o(.5*e.shoulderToShoulder*(1-t.frontArmholeOpening)*c,a.armpit.y),a.armpitBottom=a.armpit.shift(270,T),a.sbBand=a.cfBand.translate(.5*g-b*t.splitOffsetBack,0),a.sbBust=a.cfBust.translate(.5*g-b*t.splitOffsetBack,0),a.sbDart=a.sbBand.translate(0,.8*-v),a.intersectTarget=n.beamIntersectsX(a.armpitBottom,a.armpitBottom.shift(10,10),a.sbBust.x);let B=n.linesIntersect(a.sbBust,a.defaultArmpit,a.armpitBottom,a.intersectTarget)||a.sbBust;a.sbArmpit=B.translate(T,0),a.sbArmpit.x>a.sbBust.x&&(a.sbArmpit.x=a.sbBust.x),a.cbCenter=new o(a.cbNeck.x,a.strapBackRight.y+.6*(a.sbArmpit.y-a.strapBackRight.y)),a.backCCenter=a.cbCenter.translate(-y/2,0),a.backCCenterCp1=a.backCCenter.translate(0,a.strapBackRight.dy(a.backCCenter)*-t.upperBackShape),a.backCCenterCp2=a.backCCenter.translate(0,a.strapBackRight.dy(a.backCCenter)*t.lowerBackShape),a.cfNeckCp=a.cfNeck.translate(w,0),a.cbNeckCp=a.cbNeck.translate(-w/2,0);const S=a.backCCenterCp2.angle(a.armpitBottom);a.sfArmpitCp1=a.sfArmpit.shift(-60,T),a.sfArmpitCp2=a.sfArmpit.shift(120,T),a.sbArmpitCp1=a.sbArmpit.shift(S,T),a.sbArmpitCp2=a.sbArmpit.shift(180+S,T/2),a.sfBandCp1=a.sfBand.shiftFractionTowards(a.cfBand,1/3),a.sfBandCp2=a.sfBand.shiftFractionTowards(a.sbBand,1/3),a.sbBandCp1=a.sbBand.shiftFractionTowards(a.sfBand,1/3),a.sbBandCp2=a.sbBand.shiftFractionTowards(a.cbBand,1/3);const L=Math.max(0,(g-k)/4),P=Math.max(0,(u-m)/2)+.01*g,R=.01*g;function F(t,e,o,i,s){const n=a[e];let r=Math.atan(s/2/t.dist(n))/Math.PI*180;a[e+"DartLeft"]=n.rotate(-r,t),a[e+"DartRight"]=n.rotate(r,t),a[o+"Dart"]=a[o].rotate(-r,t),a[i+"Dart"]=a[i].rotate(r,t)}function W(t){let e=0,i=0;return t.forEach((t=>{e+=t.x,i+=t.y})),new o(e/t.length,i/t.length)}function H(t,e,o,i=null,s=10){let n=s,r=0,l=!1,c=t.translate(r,0);for(let p=0;p<15;p++){const s=o(c).intersects(e);let p=s.length>0;if(p!==l&&(n*=1/3),p&&i&&(a[i]=W(s)),l=p,r+=p?-n:n,c=t.translate(r,0),Math.abs(n)<.1)break}return c}return F(a.sfDart,"sfBand","sfBandCp1","sfBandCp2",L),F(a.sbDart,"sbBand","sbBandCp1","sbBandCp2",L),F(a.sfDart,"sfArmpit","sfArmpitCp1","sfArmpitCp2",P),F(a.sbDart,"sbArmpit","sbArmpitCp2","sbArmpitCp1",R),L>0?(a.sfDartSide=H(a.sfDart,(new i).move(a.sfBandDartLeft).curve(a.sfDart,a.sfDart,a.sfArmpitDartRight),(t=>(new i).move(a.sfArmpitDartLeft).curve(t,t,a.sfBandDartRight)),"frontJoin",-.1*f),a.sbDartSide=H(a.sbDart,(new i).move(a.sbBandDartRight).curve(a.sbDart,a.sbDart,a.sbArmpitDartLeft),(t=>(new i).move(a.sbArmpitDartRight).curve(t,t,a.sbBandDartLeft)),"backJoin",.1*f)):(a.sfDartSide=a.sfDart,a.sbDartSide=a.sbDart,a.frontJoin=a.sfBand,a.backJoin=a.sbBand),a.strapBackLeft=a.strapBackLeft.rotate(-t.backDartAngle,a.cbCenter),a.strapBackLeftCp=a.strapBackLeftCp.rotate(-t.backDartAngle,a.cbCenter),a.strapBackRight=a.strapBackRight.rotate(-t.backDartAngle,a.cbCenter),a.strapBackRightCp=a.strapBackRightCp.rotate(-t.backDartAngle,a.cbCenter),a.cfBand=n.beamIntersectsX(a.sfBandCp1Dart,a.sfBandDartLeft,0).shiftFractionTowards(a.cfBand,.6),a.cbBand=n.beamIntersectsX(a.sbBandCp2Dart,a.sbBandDartRight,a.cbBand.x).shiftFractionTowards(a.cbBand,.6),s.frontSa=(new i).move(a.cfBand)._curve(a.sfBandCp1Dart,a.sfBandDartLeft).curve(a.sfDart,a.sfDart,a.sfArmpitDartRight).curve(a.sfArmpitCp2Dart,a.strapFrontRightCp,a.strapFrontRight).line(a.strapFrontLeft).curve(a.strapFrontLeftCp,a.cfNeckCp,a.cfNeck).hide(),s.front=s.frontSa.clone().unhide().close(),s.frontStrap=(new i).move(a.strapFrontRight).line(a.strapFrontLeft).hide(),s.frontSideJoin=(new i).move(a.sfBandDartLeft).curve(a.sfDart,a.sfDart,a.sfArmpitDartRight).hide(),s.frontBand=(new i).move(a.cfBand)._curve(a.sfBandCp1Dart,a.sfBandDartLeft).hide(),s.backSa=(new i).move(a.cbNeck).curve(a.cbNeckCp,a.strapBackLeftCp,a.strapBackLeft).line(a.strapBackRight).curve(a.strapBackRightCp,a.backCCenterCp1,a.backCCenter).curve(a.backCCenterCp2,a.sbArmpitCp2Dart,a.sbArmpitDartLeft).curve(a.sbDart,a.sbDart,a.sbBandDartRight).curve_(a.sbBandCp2Dart,a.cbBand).hide(),s.back=s.backSa.clone().unhide().close(),s.backBand=(new i).move(a.sbBandDartRight).curve_(a.sbBandCp2Dart,a.cbBand).hide(),s.backStrap=(new i).move(a.strapBackLeft).line(a.strapBackRight).hide(),s.backSideJoin=(new i).move(a.sbArmpitDartLeft).curve(a.sbDart,a.sbDart,a.sbBandDartRight).hide(),s.side=(new i).move(a.sfBandDartRight).curve(a.sfBandCp2Dart,a.sbBandCp1Dart,a.sbBandDartLeft).curve(a.sbDartSide,a.sbDartSide,a.sbArmpitDartRight).curve(a.sbArmpitCp1Dart,a.sfArmpitCp1Dart,a.sfArmpitDartLeft).curve(a.sfDartSide,a.sfDartSide,a.sfBandDartRight).close(),s.sideFrontJoin=(new i).move(a.sfArmpitDartLeft).curve(a.sfDartSide,a.sfDartSide,a.sfBandDartRight).hide(),s.sideBackJoin=(new i).move(a.sbBandDartLeft).curve(a.sbDartSide,a.sbDartSide,a.sbArmpitDartRight).hide(),s.sideBand=(new i).move(a.sfBandDartRight).curve(a.sfBandCp2Dart,a.sbBandCp1Dart,a.sbBandDartLeft).hide(),r.set("waistband",2*(s.frontBand.length()+s.sideBand.length()+s.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:i,sa:a,macro:s,store:n,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),n.cutlist.setCut({cut:2,from:"fabric",onFold:!0}),s("title",{at:t.titleAnchor,nr:1,title:"front",scale:.5}),i.bustPoint=new o("notch",t.bustPoint),i.frontJoin=new o("notch",t.frontJoin),a&&(l.fullSa?e.sa=s("sa",{paths:["frontSa",null]}):e.sa=s("sa",{paths:["frontBand","frontSideJoin",null,"frontStrap",null]})),s("cutonfold",{from:t.cfNeck,to:t.cfBand,grainline:!0}),s("pd",{id:"frontBand",path:e.frontBand,d:a+15}),s("pd",{id:"frontSideJoin",path:e.frontSideJoin,d:a+15}),s("pd",{id:"frontStrap",path:e.frontStrap.reverse(),d:-a-15}),s("vd",{id:"frontFold",from:t.cfNeck,to:t.cfBand,x:-15}),s("vd",{id:"frontNeck",from:t.strapFrontLeft,to:t.cfNeck,x:-15}),s("vd",{id:"frontSide",from:t.strapFrontRight,to:t.sfArmpitDartRight,x:Math.max(t.strapFrontRight.x,t.sfArmpitDartRight.x)+15}),s("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:i,snippets:a,sa:s,macro:n,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"}),a.frontJoin=new i("notch",e.frontJoin),a.backJoin=new i("bnotch",e.backJoin),n("title",{at:e.titleAnchor,nr:3,title:"side",scale:.5}),s&&(c.fullSa?o.sa=n("sa",{paths:["side"]}):o.sa=n("sa",{paths:["sideFrontJoin","sideBand","sideBackJoin",null]})),n("grainline",{from:e.armpitBottom,to:new t(e.armpitBottom.x,e.cfBand.y)}),n("pd",{id:"sideBand",path:o.sideBand,d:s+15}),n("pd",{id:"sideFrontJoin",path:o.sideFrontJoin,d:s+15}),n("pd",{id:"sideBackJoin",path:o.sideBackJoin,d:s+15}),l}};const Wp={name:"sabrina.back",from:Lp,hide:{from:!0},plugins:[Pp.e2],draft:function({points:t,paths:e,Snippet:o,snippets:i,sa:a,macro:s,store:n,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),i.backJoin=new o("bnotch",t.backJoin),n.cutlist.setCut({cut:2,from:"fabric",onFold:!0}),s("title",{at:t.titleAnchor,nr:2,title:"back",scale:.5}),a&&(l.fullSa?e.sa=s("sa",{paths:["backSa",null]}):e.sa=s("sa",{paths:["backSideJoin","backBand",null,"backStrap",null]})),s("cutonfold",{from:t.cbBand,to:t.cbNeck,grainline:!0}),s("pd",{id:"backBand",path:e.backBand,d:a+15}),s("pd",{id:"backSideJoin",path:e.backSideJoin,d:a+15}),s("pd",{id:"backStrap",path:e.backStrap.reverse(),d:-a-15}),s("vd",{id:"backFold",from:t.cbNeck,to:t.cbBand,x:t.cbBand.x+15}),s("vd",{id:"backNeck",from:t.strapBackLeft,to:t.cbNeck,x:t.cbBand.x+15}),s("vd",{id:"backSide",from:t.strapBackRight,to:t.sbArmpitDartRight,x:Math.min(t.strapBackRight.x,t.sbArmpitDartRight.x)-15}),s("hd",{id:"backNeck",from:t.strapBackLeft,to:t.cbNeck,y:t.stra
1pBackLeft.y-15}),r}};const Hp={name:"sabrina.waistband",measurements:["chest"],after:Lp,options:{elasticWidth:(0,s.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:i,points:a,paths:n,sa:r,macro:l,units:c,expand:p,complete:h,store:d,part:f,measurements:m}){const u=d.get("waistband")/2,g=t.elasticWidth*(1+e.waistbandEase);if(!p){const t=r?2*r:0;return d.flag.note({msg:`sabrina:cut${(0,s.ZH)(f.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]}}}),d.flag.preset("expandIsOff"),f.hide()}return d.flag.preset("expandIsOn"),a.topLeft=new o(0,0),a.topRight=new o(2*g,0),a.topFold=new o(g,0),a.bottomLeft=new o(0,u),a.bottomRight=new o(a.topRight.x,u),a.bottomFold=new o(a.topFold.x,u),n.seam=(new i).move(a.bottomRight).line(a.topRight).line(a.topLeft).line(a.bottomLeft).close().addClass("fabric"),h&&(n.fold=(new i).move(a.topFold).line(a.bottomFold).addClass("various help")),r&&(n.sa=l("sa",{paths:[(new i).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight),null]})),a.title=new o(.45*a.bottomRight.x,a.bottomRight.y/3),l("vd",{id:"hFull",from:a.bottomRight,to:a.topRight,x:a.topRight.x+r+15}),l("hd",{id:"wFull",from:a.topLeft,to:a.topRight,y:a.topRight.y-r-15}),d.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),l("title",{at:a.title,nr:4,scale:g/45,rotation:90,title:"waistband"}),l("cutonfold",{from:a.topRight,to:a.topLeft,grainline:!0,scale:.5}),f}},Ap=new s.pT({data:Sp,parts:[Lp,Rp,Fp,Wp,Hp]}),Op=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}'),Dp={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 Ep=o(66348);const Ip={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,s.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:Ep.k_,draft:function({utils:t,store:e,sa:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,options:l,measurements:c,macro:p,absoluteOptions:h,part:d}){let f,m;
1if(e.set("topCircumference",l.waistbandPosition*c.hips+(1-l.waistbandPosition)*c.waist),"curved"===l.waistbandShape?e.set("bottomCircumference",e.get("topCircumference")+h.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)m=90,f=e.get("skirtCircumference")/t.deg2rad(m)/4;else{const i=180*l.circleRatio;if(m=i/l.panels,f=e.get("skirtCircumference")/t.deg2rad(i)/2,m>90&&o){const e=t.rad2deg(Math.atan(f/o));m>90+e&&(m=90+e)}}const u=p("ringsector",{angle:m,insideRadius:f,outsideRadius:f+e.get("fullLength")*l.lengthBonus-h.waistbandWidth,rotate:!0}),g=u.paths.path;s.seam=s[g].clone().addClass("fabric"),s[g].hide();for(const[b,k]of Object.entries(u.points))i[b]=i[k].copy(),i[k+"Rotated"]&&(i[b+"Rotated"]=i[k+"Rotated"].copy());return i.gridAnchor=i.in2Flipped.clone(),o&&(s.hemBase=(new a).move(i.ex2Flipped).curve(i.ex2cFlipped,i.ex1cFlipped,i.ex1).curve(i.ex1c,i.ex2c,i.ex2).offset(e.get("fullLength")*l.lengthBonus*l.hemWidth),s.saBase=(new a).move(i.in2).curve(i.in2c,i.in1c,i.in1).curve(i.in1cFlipped,i.in2cFlipped,i.in2Flipped),l.seamlessFullCircle||(s.saBase=(new a).move(i.ex2).line(i.ex2).join(s.saBase)),s.saBase=s.saBase.offset(o),s.hemBase.hide(),s.saBase.hide(),l.seamlessFullCircle?s.sa=(new a).move(i.ex2Flipped).line(s.hemBase.start()).join(s.hemBase).line(i.ex2).move(i.in2).line(s.saBase.start()).join(s.saBase).line(i.in2Flipped).attr("class","fabric sa"):s.sa=(new a).move(i.ex2Flipped).line(s.hemBase.start()).join(s.hemBase).line(s.saBase.start()).join(s.saBase).line(i.in2Flipped).attr("class","fabric sa")),e.cutlist.setCut({cut:l.seamlessFullCircle?1:Number(l.panels),from:"fabric",onFold:!0,identical:!0}),p("cutonfold",{from:i.in2Flipped,to:i.ex2Flipped,grainline:!0}),l.seamlessFullCircle&&p("cutonfold",{from:i.ex2,to:i.in2,id:"double",reverse:!0}),i.logo=i.in2FlippedRotated.shiftFractionTowards(i.ex2FlippedRotated,l.seamlessFullCircle?.3:.1),r.logo=new n("logo",i.logo),i.title=i.in2FlippedRotated.shiftFractionTowards(i.ex2FlippedRotated,l.seamlessFullCircle?.5:.25),p("title",{at:i.title,nr:1,title:"skirt"}),i.scalebox=i.in2FlippedRotated.shiftFractionTowards(i.ex2FlippedRotated,l.seamlessFullCircle?.7:.45),p("scalebox",{at:i.scalebox}),p("sprinkle",{snippet:"notch",on:["in2","gridAnchor"]}),r.center=new n("bnotch",i.center),p("vd",{id:"hLeft",from:i.ex2Flipped,to:i.in2Flipped,x:i.ex2Flipped.x-o-15}),p("vd",{id:"hToOpeningLeft",from:i.in2Flipped,to:i.center,x:i.ex2Flipped.x-o-15}),p("vd",{id:"hFull",from:i.ex2Flipped,to:i.center,x:i.ex2Flipped.x-o-30}),90!==m&&(p("vd",{id:"hTopToOpeningRight",from:i.ex2,to:i.in2,x:m>90?i.in2.x-o-15:i.ex2.x+o+15}),p("vd",{id:"hOpeningRightToCenter",from:i.in2,to:i.center,x:m>90?i.in2.x-o-15:i.ex2.x+o+15}),p("vd",{id:"hHemRightToCenter",from:i.ex2,to:i.center,x:m>90?i.in2.x-o-30:i.ex2.x+o+30}),p("hd",{id:"wHemToOpeningRight",from:i.ex2,to:i.in2,y:m<90?i.center.y-o-15:i.ex2.y-o-15}),p("hd",{id:"wOpeningRightToCenter",from:i.center,to:i.in2,y:m<90?i.center.y-o-15:i.ex2.y-o-15}),p("hd",{id:"wHemToCenter",from:i.center,to:i.ex2,y:m<90?i.center.y-o-30:i.ex2.y-o-30})),d}};const Np={name:"sandy.waistband",after:Ip,draft:t=>"curved"===t.options.waistbandShape?function({utils:t,store:e,sa:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,options:l,macro:c,absoluteOptions:p,part:h}){const d=t.rad2deg(e.get("bottomCircumference")-e.get("topCircumference"))/p.waistbandWidth,f=e.get("topCircumference")/t.deg2rad(d),m=t.rad2deg(e.get("waistbandOverlap")/(f+p.waistbandWidth)),u=c("ringsector",{angle:d+m,insideRadius:f,outsideRadius:f+p.waistbandWidth}),g=u.paths.path;s.seam=s[g].clone().addClass("fabric"),s[g].hide();for(const[b,k]of Object.entries(u.points))i[b]=i[k].copy(),i[k+"Rotated"]&&(i[b+"Rotated"]=i[k+"Rotated"].copy());return o&&(s.sa=s.seam.offset(o).addClass("fabric sa")),e.cutlist.setCut({cut:1,from:"fabric"}),i.gridAnchor=i.in1.clone(),i.title=i.ex2Flipped.shiftFractionTowards(i.ex2,.5),c("title",{at:i.title,nr:2,t
1itle:"curvedWaistband",scale:.5}),c("grainline",{from:i.ex2Flipped,to:i.ex2}),e.get("waistbandOverlap")>=l.minimumOverlap&&(i.pivot=i.in2.shiftFractionTowards(i.ex2,.5),i.button=i.pivot.shiftTowards(i.ex2,e.get("waistbandOverlap")/2).rotate(-90,i.pivot),i.buttonhole=i.button.flipX(),r.button=new n("button",i.button),r.buttonhole=new n("buttonhole",i.buttonhole).rotate(i.in2.angle(i.ex2)),i.centerNotch=(new a).move(i.ex1Rotated).circleSegment(-(d+m),i.center).shiftAlong(e.get("waistbandOverlap")/2),i.buttonNotch=(new a).move(i.ex2Rotated).circleSegment(d+m,i.center).shiftAlong(e.get("waistbandOverlap")),c("sprinkle",{snippet:"notch",on:["centerNotch","buttonNotch","ex2Flipped"]})),c("hd",{id:"wTop",from:i.in2FlippedRotated,to:i.in2,y:i.in2.y-o-15}),c("hd",{from:i.ex2FlippedRotated,id:"wFull",to:i.ex2,y:i.in2.y-o-30}),c("vd",{id:"hFull",from:i.ex1,to:i.in2,x:i.in2.x+o+40}),c("ld",{id:"lWidth",from:i.ex2,to:i.in2,d:-1*o-15}),h}(t):function({store:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,units:l,macro:c,expand:p,absoluteOptions:h,part:d}){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*h.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"),d.hide()}return t.flag.preset("expandIsOn"),i.center=new o(0,0),i.centerLeft=new o(t.get("topCircumference")/-2,0),i.centerRight=new o(t.get("topCircumference")/2+t.get("waistbandOverlap"),0),i.topRight=i.centerRight.shift(90,h.waistbandWidth),i.topLeft=i.centerLeft.shift(90,h.waistbandWidth),i.bottomRight=i.topRight.flipY(),i.bottomLeft=i.topLeft.flipY(),s.seam=(new a).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).line(i.topLeft).close().attr("class","fabric"),s.fold=(new a).move(i.centerRight).line(i.centerLeft).attr("class","fabric dashed"),e&&(s.sa=s.seam.offset(e).attr("class","fabric sa")),t.cutlist.setCut({cut:1,from:"fabric"}),i.title=i.center.shiftFractionTowards(i.centerRight,.5),c("title",{at:i.title,nr:2,title:"straightWaistband"}),i.grainlineFrom=i.centerLeft.shiftFractionTowards(i.topLeft,.5),i.grainlineTo=i.grainlineFrom.flipX(),c("grainline",{from:i.grainlineFrom,to:i.grainlineTo}),i.button=i.centerRight.shiftFractionTowards(i.bottomRight,.5).shift(180,t.get("waistbandOverlap")/2),i.buttonhole=i.centerLeft.shiftFractionTowards(i.bottomLeft,.5).shift(0,t.get("waistbandOverlap")/2),r.button=new n("button",i.button),r.buttonhole=new n("buttonhole",i.buttonhole),i.centerNotch=new o(-1*t.get("waistbandOverlap")/2,i.bottomLeft.y),i.buttonNotch=i.bottomRight.shift(180,t.get("waistbandOverlap")),c("sprinkle",{snippet:"notch",on:["centerNotch","buttonNotch","bottomLeft"]}),c("hd",{id:"wFull",from:i.bottomLeft,to:i.bottomRight,y:i.bottomLeft.y+e+15}),c("vd",{id:"hFull",from:i.bottomRight,to:i.topRight,x:i.topRight.x+e+15}),d}(t)},Mp=new s.pT({data:Op,parts:[Ip,Np]}),_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 Yp={name:"sarah.base",draft:function({Path:t,Point:e,paths:o,points:i,measurements:a,options:n,part:r,store:l,sa:c,expand:p}){!n.showExpandNotification||n.centerFrontSeam&&n.centerBackSeam||(p?l.flag.preset("expandIsOn"):l.flag.preset("expandIsOff"));const h=a.waist-n.waistDrop*(a.hips-a.waist);l.set("sarah.waistline",h);const d=(1+n.extraWaistEase)*h;l.set("sarah.waistlineEased",d);const f=(1+n.extraSeatEase)*a.seat;l.set("sarah.seatEased",f);const m=a.seat-h;l.set("sarah.seatWaistDiff",m);const u=m*n.seatEase;l.set("sarah.seatEase",u);const g=n.waistEaseFront*m;l.set("sarah.waistEaseFront",g);const b=a.waistToSeat-n.waistDrop*a.waistToHips;
1l.set("sarah.waistToSeat",b);const k=g;l.set("sarah.frontDartWidth",k);const w=k/2,C=n.waistEaseBack*m;l.set("sarah.waistEaseBack",C);const v=n.waistRise*m;l.set("sarah.waistRise",v);const T=C/4,y=n.backOutsideDartLength*b;l.set("sarah.backOutsideDartLength",y);const x=n.backInsideDartLength*b;l.set("sarah.backInsideDartLength",x);const B=n.frontDartLength*b;l.set("sarah.frontDartLength",B);const S=n.length*(a.waistToFloor- -n.waistDrop*a.waistToHips);l.set("sarah.length",S);const L=n.sideSeamCurveOffset*m,P=n.hem*(c||10);l.set("sarah.hem",P);const R=d/4+C,F=d/4+g;i.cbTop=new e(0,0),i.cbSeat=i.cbTop.shift(270,b),i.cbBottom=i.cbTop.shift(270,S),i.sideBottom=i.cbBottom.shift(0,f/4+u),i.sideSeat=i.cbSeat.shift(0,f/4+u),i.sbWaist=new e(R,0),i.sbTop=i.sbWaist.shift(90,v),i.backInsideDartCenter=i.cbTop.shiftFractionTowards(i.sbTop,1/3),i.backInsideDartBottom=i.backInsideDartCenter.shift(i.backInsideDartCenter.angle(i.cbTop)+90,x),i.backOutsideDartCenter=i.cbTop.shiftFractionTowards(i.sbTop,2/3),i.backOutsideDartBottom=i.backOutsideDartCenter.shift(i.backOutsideDartCenter.angle(i.cbTop)+90,y),i.backInsideDartLeft=i.backInsideDartCenter.shiftTowards(i.cbTop,T),i.backInsideDartRight=i.backInsideDartCenter.shiftTowards(i.sbTop,T),i.backOutsideDartLeft=i.backOutsideDartCenter.shiftTowards(i.cbTop,T),i.backOutsideDartRight=i.backOutsideDartCenter.shiftTowards(i.sbTop,T);const W=i.cbTop.dist(i.backInsideDartLeft),H=i.backInsideDartRight.dist(i.backOutsideDartLeft),A=i.backOutsideDartRight.dist(i.sbTop);i.cbTopCp=i.cbTop.shiftTowards(i.sbWaist,.5*W*s.Qr),i.bidLCp=i.backInsideDartLeft.shift(i.backInsideDartLeft.angle(i.backInsideDartBottom)+-90,.5*W*s.Qr),i.bidRCp=i.backInsideDartRight.shift(i.backInsideDartRight.angle(i.backInsideDartBottom)+90,.5*H*s.Qr),i.bodLCp=i.backOutsideDartLeft.shift(i.backOutsideDartLeft.angle(i.backOutsideDartBottom)+-90,.5*H*s.Qr),i.bodRCp=i.backOutsideDartRight.shift(i.backOutsideDartRight.angle(i.backOutsideDartBottom)+90,.5*A*s.Qr),i.sbtCp=i.sbTop.shift(i.sbTop.angle(i.sideSeat)+-90,.5*A*s.Qr),i.ssh=i.sbTop.shiftFractionTowards(i.sideSeat,.5),i.sbTop.dist(i.ssh),i.sshCpC=i.ssh.shift(i.ssh.angle(i.sbTop)+270,L),i.sshTCp=i.sshCpC.shift(i.sshCpC.angle(i.ssh)+270,.5*i.sbTop.dist(i.ssh)*s.Qr),i.sshBCp=i.sshCpC.shift(i.sshCpC.angle(i.ssh)+90,.5*i.ssh.dist(i.sideSeat)*s.Qr),i.cfTop=i.cbTop.shift(0,a.seat/2+u),i.cfSeat=i.cfTop.shift(-90,b),i.cfBottom=i.cfTop.shift(-90,S),i.sfWaist=i.cfTop.shiftTowards(i.cbTop,F),i.sfTop=i.sfWaist.shift(90,v),i.frontDartCenter=i.sfTop.shiftFractionTowards(i.cfTop,1/3),i.frontDartBottom=i.frontDartCenter.shift(i.frontDartCenter.angle(i.cfTop)+-90,B),i.frontDartRight=i.frontDartCenter.shiftTowards(i.cfTop,w),i.frontDartLeft=i.frontDartCenter.shiftTowards(i.sfTop,w);const O=i.sfTop.dist(i.frontDartLeft),D=i.cfTop.dist(i.frontDartRight);return i.fdrCp=i.frontDartRight.shift(i.frontDartRight.angle(i.frontDartBottom)+90,.5*D*s.Qr),i.sftCp=i.sfTop.shift(i.sfTop.angle(i.sideSeat)+90,.5*O*s.Qr),i.fdlCp=i.frontDartLeft.shift(i.frontDartLeft.angle(i.frontDartBottom)+-90,.5*O*s.Qr),i.cftCp=i.cfTop.shiftTowards(i.sfWaist,.5*D*s.Qr),i.sfh=i.sideSeat.shiftFractionTowards(i.sfTop,.5),i.sfhCpC=i.sfh.shift(i.sfh.angle(i.sideSeat)+-90,L),i.sfhTCp=i.sfhCpC.shift(i.sfhCpC.angle(i.sfh)+90,.5*i.sfh.dist(i.sfTop)*s.Qr),i.sfhBCp=i.sfhCpC.shift(i.sfhCpC.angle(i.sfh)+-90,.5*i.sfh.dist(i.sideSeat)*s.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,s.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}}},Up={name:"sarah.front",plugins:[Pp.e2],from:Yp,draft:({points:t,Point:e,Path:o,paths:i,options:a,sa:s,macro:n,part:r,
1store:l,snippets:c,Snippet:p,complete:h,paperless:d,expand:f})=>{const m=a.paperlessOffset;if(i.sideFront=(new o).move(t.sfTop).curve(t.sfhTCp,t.sfhTCp,t.sfhCpC).curve(t.sfhBCp,t.sfhBCp,t.sideSeat).line(t.sideBottom),i.frontBottom=(new o).move(t.sideBottom).line(t.cfBottom),i.centerFront=(new o).move(t.cfBottom).line(t.cfTop).hide(),i.frontTopNoDart=(new o).move(t.cfTop).curve(t.cftCp,t.fdrCp,t.frontDartRight).noop("frontDart").curve(t.fdlCp,t.sftCp,t.sfTop),h?(i.frontTop=i.frontTopNoDart.insop("frontDart",(new o).move(t.frontDartRight).line(t.frontDartBottom).line(t.frontDartLeft)),i.helpers=(new o).move(t.frontDartRight).line(t.frontDartLeft).setClass("mark dashed"),i.frontTopNoDart.hide()):i.frontTop=i.frontTopNoDart.clone().insop("frontDart",(new o).move(t.frontDartRight).line(t.frontDartLeft)),f&&!a.centerFrontSeam?(n("mirror",{mirror:[i.centerFront.start(),i.centerFront.end()],clone:!0,paths:["frontTop","helpers","sideFront","frontTopNoDart","frontBottom"]}),i.frontTop=i.mirroredFrontTop.reverse().join(i.frontTop),i.mirroredSideFront=i.mirroredSideFront.reverse(),i.frontTopNoDart=i.mirroredFrontTopNoDart.reverse().join(i.frontTopNoDart).hide(),i.frontBottom=i.frontBottom.join(i.mirroredFrontBottom.reverse())):i.centerFront.unhide(),s){const t=l.get("sarah.hem");i.frontHem=n("hem",{class:"fabric",path2:f?"mirroredSideFront":"centerFront",path1:"sideFront",hemWidth:t,offset2:f?null:0}),i.frontSa=n("sa",{paths:["sideFront",{p:"frontHem",offset:0},f?"mirroredSideFront":null,"frontTopNoDart"]})}return a.centerFrontSeam?(t.gftop=t.cfTop.shift(0,-a.paperlessOffset),t.gfbottom=t.cfBottom.shift(0,-a.paperlessOffset),n("grainline",{from:t.gftop,to:t.gfbottom,grainline:!0}),l.cutlist.addCut({cut:2,onFold:!1})):(l.cutlist.addCut({cut:1,onFold:!f}),n(f?"grainline":"cutOnFold",{from:t.cfTop,to:t.cfBottom,grainline:!0,offset:-m})),n("vd",{id:"centerFront",from:t.cfTop,to:t.cfBottom,x:t.cfTop.x+m+s}),n("vd",{id:"waistRise",to:t.sfTop,from:t.sfWaist,x:t.sbTop.x+m+s}),n("ld",{id:"sf2frontDart",from:t.sfTop,to:t.frontDartLeft,d:s+m}),n("ld",{id:"frontDart2centerFront",from:t.frontDartRight,to:t.cfTop,d:s+m}),n("ld",{id:"frontDart",to:t.frontDartRight,from:t.frontDartLeft,d:s+2*m,noStartMarker:!0,noEndMarker:!0}),n("ld",{id:"frontDartLength",from:t.frontDartCenter,to:t.frontDartBottom,d:m}),n("hd",{id:"waist",from:t.cfTop,to:t.sfWaist,y:t.sfWaist.y+m}),n("hd",{id:"hem",to:t.cfBottom,from:t.sideBottom,y:t.sideBottom.y+m}),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),n("title",{at:t.title,nr:2,title:"front",align:"center",scale:.8}),!d&&h&&(t.miniscale=t.__macro_title_title_notes.shift(-90,a.paperlessOffset),n("miniscale",{at:t.miniscale})),r}},zp={name:"sarah.back",plugins:[Pp.e2],from:Yp,draft:({points:t,Point:e,Path:o,paths:i,options:a,sa:s,macro:n,part:r,store:l,snippets:c,Snippet:p,complete:h,paperless:d,expand:f})=>{const m=a.paperlessOffset;if(i.centerBack=(new o).move(t.cbTop).line(t.cbBottom),i.backBottom=(new o).move(t.cbBottom).line(t.sideBottom),i.sideBack=(new o).move(t.sideBottom).line(t.sideSeat).curve(t.sshBCp,t.sshBCp,t.sshCpC).curve(t.sshTCp,t.sshTCp,t.sbTop),i.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(),h?(i.backTop=i.backTopNoDarts.insop("backOutsideDart",(new o).line(t.backOutsideDartBottom).line(t.backOutsideDartLeft)).insop("backInsideDart",(new o).line(t.backInsideDartBottom).line(t.backInsideDartLeft)).unhide(),i.helpers=(new o).move(t.backOutsideDartRight).line(t.backOutsideDartLeft).move(t.backInsideDartRight).line(t.backInsideDartLeft).setClass("mark dashed")):i.backTop=i.backTopNoDarts.insop("backOutsideDart",(new o).move(t.backOutsideDartRight).line(t.backOutsideDartLeft)).insop("backInsideDart",(new o).move(t.backInsideDartRight).line(t.backInsideDartLeft)).unhide(),f&&!a.centerBackSeam?(n("mirror",{mirror:[i.centerBack.start(),i.centerBack.end()],clone:!0,paths:["helpers","backBottom","backTop","sideBack","backTopNoDarts"]}),i.centerBack.hide(),i.backBottom=i.mirroredBackBottom.reverse().join(i.backBottom),i.backTop=i.backTop.join(i.mirroredBackTop.reverse()),i.backTopNoDarts=i.backTopNoDarts.join(i.mirroredBackTopNoDarts.reverse()).hide(),i.mirroredSideBack=i.mirroredSideBack.reverse()):i.backTop.unhide(),s){const t=l.get("sarah.hem");a.centerBackSeam?(i.backHem=n("hem",{class:"fabric",path1:"centerBack",path2:"sideBack",hemWidth:t}),i.backSa=n("sa",{paths:["centerBack",{p:"backHem",offset:0},"sideBack","backTopNoDarts"]})):(i.backHem=n("hem",{class:"fabric",path1:f?"mirroredSideBack":"centerBack",path2:"sideBack",hemWidth:t,offset1:f?null:0}),i.backSa=n("sa",{paths:[{p:"backHem",offset:0},"sideBack","backTopNoDarts",f?"mirroredSideBack":null]}))}return a.centerBackSeam?(l.cutlist.addCut({cut:2,onFold:!1}
1),t.gtop=t.cbTop.shift(0,a.paperlessOffset),t.gbottom=t.cbBottom.shift(0,a.paperlessOffset),n("grainline",{from:t.gtop,to:t.gbottom,grainline:!0})):(l.cutlist.addCut({cut:1,onFold:!f}),n(f?"grainline":"cutOnFold",{from:t.cbTop,to:t.cbBottom,grainline:!0})),n("vd",{id:"centerBack",from:t.cbTop,to:t.cbBottom,x:-m-s}),n("vd",{id:"waistRise",to:t.sbTop,from:t.sbWaist,x:t.sbTop.x+m+s}),n("ld",{id:"cb2insideDart",from:t.cbTop,to:t.backInsideDartLeft,d:s+m}),n("ld",{id:"insideDart2outsideDart",from:t.backInsideDartRight,to:t.backOutsideDartLeft,d:s+m}),n("ld",{id:"outsideDart2side",from:t.backOutsideDartRight,to:t.sbTop,d:s+m}),n("ld",{id:"insideDartLength",from:t.backInsideDartCenter,to:t.backInsideDartBottom,d:m}),n("ld",{id:"insideDart",to:t.backInsideDartRight,from:t.backInsideDartLeft,d:s+2*m,noStartMarker:!0,noEndMarker:!0}),n("ld",{id:"outsideDart",to:t.backOutsideDartRight,from:t.backOutsideDartLeft,d:s+2*m,noStartMarker:!0,noEndMarker:!0}),n("ld",{id:"outsideDartLength",from:t.backOutsideDartCenter,to:t.backOutsideDartBottom,d:m}),n("hd",{id:"waist",from:t.cbTop,to:t.sbWaist,y:t.sbWaist.y+m}),n("hd",{id:"hem",from:t.cbBottom,to:t.sideBottom,y:t.sideBottom.y+m}),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),n("title",{at:t.title,nr:1,title:"back",align:"center",scale:.8}),!d&&h&&(t.miniscale=t.__macro_title_title_notes.shift(-90,a.paperlessOffset),n("miniscale",{at:t.miniscale})),r}},Jp={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 shape 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"}}}')},$p=new s.pT({data:_p,parts:[Up,zp]}),Xp=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}'),Qp={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 Kp={name:"shelly.base",plugins:[O],draft:function({utils:t,Path:e,Point:o,paths:i,points:a,measurements:s,options:n,part:r,
1store:l,sa:c,macro:p,snippets:h,Snippet:d,scale:f}){const m=s.biceps*n.armholeTweakFactor*(1+n.sleeveEase)/Math.PI,u=n.straightSides?n.chestEase:n.hipsEase,g=s.hpsToWaistBack-s.waistToArmpit+m*n.armpitEase,b=(n.straightSides?Math.max(s.chest*(1+n.chestEase),s.hips*(1+u)):s.chest*(1+n.chestEase))-n.raglanScoopMagnitude*g*4,k=n.bodyLength*(s.hpsToWaistBack+s.waistToHips),w=s.neck*(1+n.neckEase)/(2*Math.PI),C=s.hips*(1+u);l.set("neckRadius",w),a.raglanCenter=new o(0,0),a.neckCenter=a.raglanCenter.shift(270,n.neckBalance*w),a.armpitCorner=new o(b/4,g).translate(0,Math.max(0,s.biceps*n.armholeTweakFactor*n.sleeveEase/(2*Math.PI))),a.neckShoulderCorner=t.beamIntersectsCircle(a.neckCenter,w,a.raglanCenter,a.armpitCorner)[1],a.cfHem=new o(0,k),a.sideHem=new o(C/4,k),a.cfNeck=a.neckCenter.shift(270,w);const v=a.neckShoulderCorner.angle(a.armpitCorner);l.set("raglanAngle",v);const T=a.raglanCenter.dist(a.armpitCorner);l.set("raglanLength",T);const y=2*a.cfNeck.angle(a.neckShoulderCorner),x=t.deg2rad(y)*w;a.neckCP1=a.neckShoulderCorner.shift(y+180,x/3),a.neckCP2=a.cfNeck.shift(0,x/3);const B=v-(y+180);l.set("frontNecklineToRaglanAngle",B),a.armpitCornerScooped=a.armpitCorner.shift(v+90,n.raglanScoopMagnitude*T),a.armpitScoopCp1=a.armpitCorner.shift(v+180,1/3*n.raglanScoopLength*T),a.armpitScoopCp2=a.armpitCorner.shift(v+180,2/3*n.raglanScoopLength*T),a.armpitScoopEnd=a.armpitCorner.shift(v+180,n.raglanScoopLength*T),n.straightSides&&(a.sideHem.x=Math.max(a.armpitCornerScooped.x,a.sideHem.x)),a.sideHem.y<a.armpitCornerScooped.y&&(a.sideHem.y=a.armpitCornerScooped.y,a.cfHem.y=a.armpitCornerScooped.y);const S=a.sideHem.angle(a.armpitCornerScooped),L=a.sideHem.dist(a.armpitCornerScooped);return a.sideCp1=a.sideHem.shift(S,1/3*L).shift(S-90,n.sideShape*L),a.sideCp2=a.armpitCornerScooped.shift(S+180,1/3*L).shift(S-90,n.sideShape*L),i.saBase=(new e).move(a.sideHem),n.straightSides?i.saBase.line(a.armpitCornerScooped):i.saBase.curve(a.sideCp1,a.sideCp2,a.armpitCornerScooped),i.saBase.curve(a.armpitScoopCp1,a.armpitScoopCp2,a.armpitScoopEnd).line(a.neckShoulderCorner).curve(a.neckCP1,a.neckCP2,a.cfNeck).hide(),i.foldBase=(new e).move(a.cfNeck).line(a.cfHem).hide(),i.hemBase=(new e).move(a.cfHem).line(a.sideHem).hide(),i.seam=i.saBase.join(i.foldBase).join(i.hemBase).close().addClass("fabric"),p("hd",{id:"wHem",from:a.cfHem,to:a.sideHem,y:a.sideHem.y+(c+15)}),p("vd",{id:"hSide",from:a.sideHem,to:a.armpitCornerScooped,x:Math.max(a.sideHem.x,a.armpitCornerScooped.x)+(15+c)}),p("vd",{id:"hArmpitScoop",from:a.armpitCornerScooped,to:a.armpitScoopEnd,x:a.armpitCornerScooped.x+(30+c)}),p("hd",{id:"wArmpitScoop",from:a.armpitScoopEnd,to:a.armpitCornerScooped,y:0-(c+0)}),a.cutonfoldFrom=a.cfNeck,a.cutonfoldTo=a.cfHem,p("cutonfold",{from:a.cutonfoldFrom,to:a.cutonfoldTo,grainline:!0}),a.title=new o(a.armpitCorner.x/2,(a.cfHem.y+a.armpitCornerScooped.y/2)/2),p("title",{at:a.title,nr:5,title:"base"}),a.logo=a.title.shift(-90,70*f),h.logo=new d("logo",a.logo),c&&(i.sa=(new e).move(a.cfHem).join(i.hemBase.offset(c*n.hemWidth)).join(i.saBase.offset(c)).line(a.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 Vp={name:"shelly.front",draft:function({utils:t,Path:e,Point:o,points:i,part:a,store:s,sa:n,macro:r,snippets:l,Snippet:c}){const p=s.get("raglanAngle"),h=s.get("neckRadius");i.neckShoulderCorner=t.beamIntersectsCircle(i.neckCenter,h,i.raglanCenter,i.armpitCorner)[1];const d=i.raglanCenter.dist(i.neckShoulderCorner);s.set("frontNeckRadius",d),i.cfNeck=i.neckCenter.shift(270,h);const f=2*i.cfNeck.angle(i.neckShoulderCorner),m=t.deg2rad(f)*h;i.neckCP1=i.neckShoulderCorner.shift(f+180,m/3),i.neckCP2=i.cfNeck.shift(0,m/3);const u=p-(f+180);s.set("frontNecklineToRaglanAngle",u),r("vd",{id:"hCenterSeam",from:i.cfNeck,to:i.cfHem,x:-(15+n)}),r("vd",{id:"hNeck",from:i.neckShoulderCorner,to:i.cfNeck,x:-(15+n),noStartMarker:!0,noEndMarker:!0}),r("vd",{id:"hTotal",from:i.neckShoulderCorner,to:i.cfHem,x:-(30+n)}),r("vd",{id:"hRaglanSeam",from:i.armpitCornerScooped,to:i.neckShoulderCorner,x:i.armpitCornerScooped.x+(15+n)}),r("hd",{id:"wRaglanSeamStraightPortion",from:i.neckShoulderCorner,to:i.armpitScoopEnd,y:0-(n+0)}),r("hd",{id:"hArmpitScoop",from:i.neckShoulderCorner,to:i.armpitCornerScooped,y:0-(n+15)}),r("hd",{id:"wRaglanSeam",from:i.cfNeck,to:i.neckShoulderCorner,y:0-(n+15),noStartMarker:!0,noEndMarker:!0}),r("hd",{id:"wCenterToArmpit",from:i.cfNeck,to:i.armpitCornerScooped,y:0-(n+30)}),s.cutlist.addCut({cut:1,from:"fabric"}),l.armpitScoopEnd=new c("notch",i.armpitScoopEnd),i.title=new o(i.armpitCorner.x/2,(i.cfHem.y+i.armpitCornerScooped.y/2)/2),r("title",{at:i.title,nr:1,title:"front"});
1const g=(new e).move(i.neckShoulderCorner).curve(i.neckCP1,i.neckCP2,i.cfNeck);return s.set("neckLengthFront",g.length()),a},from:Kp};const qp={name:"shelly.back",draft:function({utils:t,Path:e,Point:o,paths:i,points:a,options:s,part:n,store:r,sa:l,macro:c,snippets:p,Snippet:h}){const d=r.get("raglanAngle"),f=r.get("neckRadius");a.neckCenter=a.raglanCenter.shift(270,-s.neckBalance*f),a.neckShoulderCorner=t.beamIntersectsCircle(a.neckCenter,f,a.raglanCenter,a.armpitCorner)[1];const m=a.raglanCenter.dist(a.neckShoulderCorner);r.set("backNeckRadius",m),a.cfNeck=a.neckCenter.shift(270,f);const u=2*a.cfNeck.angle(a.neckShoulderCorner),g=t.deg2rad(u)*f;a.neckCP1=a.neckShoulderCorner.shift(u+180,g/3),a.neckCP2=a.cfNeck.shift(0,g/3);const b=d-(u+180);r.set("backNecklineToRaglanAngle",b),i.saBase=(new e).move(a.sideHem),s.straightSides?i.saBase.line(a.armpitCornerScooped):i.saBase.curve(a.sideCp1,a.sideCp2,a.armpitCornerScooped),i.saBase.curve(a.armpitScoopCp1,a.armpitScoopCp2,a.armpitScoopEnd).line(a.neckShoulderCorner).curve(a.neckCP1,a.neckCP2,a.cfNeck).hide(),i.foldBase=(new e).move(a.cfNeck).line(a.cfHem).hide(),i.hemBase=(new e).move(a.cfHem).line(a.sideHem).hide(),i.seam=i.saBase.join(i.foldBase).join(i.hemBase).close().addClass("fabric"),c("vd",{id:"hCenterSeam",from:a.cfNeck,to:a.cfHem,x:-(15+l)}),c("vd",{id:"hNeck",from:a.neckShoulderCorner,to:a.cfNeck,x:-(15+l),noStartMarker:!0,noEndMarker:!0}),c("vd",{id:"hTotal",from:a.neckShoulderCorner,to:a.cfHem,x:-(30+l)}),c("vd",{id:"hRaglanSeam",from:a.armpitCornerScooped,to:a.neckShoulderCorner,x:a.armpitCornerScooped.x+(15+l)}),c("hd",{id:"wRaglanSeamStraightPortion",from:a.neckShoulderCorner,to:a.armpitScoopEnd,y:0-(l+0)}),c("hd",{id:"wRaglanSeam",from:a.neckShoulderCorner,to:a.armpitCornerScooped,y:0-(l+15)}),c("hd",{id:"wNeck",from:a.cfNeck,to:a.neckShoulderCorner,y:0-(l+15),noStartMarker:!0,noEndMarker:!0}),c("hd",{id:"wCenterToArmpit",from:a.cfNeck,to:a.armpitCornerScooped,y:0-(l+30)}),r.cutlist.addCut({cut:1,from:"fabric"}),p.armpitScoopEnd=new h("bnotch",a.armpitScoopEnd),a.title=new o(a.armpitCorner.x/2,(a.cfHem.y+a.armpitCornerScooped.y/2)/2),c("title",{at:a.title,nr:2,title:"back"}),l&&(i.sa=(new e).move(a.cfHem).join(i.hemBase.offset(l*s.hemWidth)).join(i.saBase.offset(l)).line(a.cfNeck).addClass("fabric sa"));const k=(new e).move(a.neckShoulderCorner).curve(a.neckCP1,a.neckCP2,a.cfNeck);return r.set("neckLengthBack",k.length()),n},from:Kp};const Zp={name:"shelly.raglanSleeve",after:[Vp,qp],draft:function({utils:t,Path:e,Point:o,paths:i,points:a,measurements:s,options:n,part:r,store:l,sa:c,macro:p,snippets:h,Snippet:d,scale:f}){const m=n.armholeTweakFactor-n.raglanScoopMagnitude,u=n.bicepsPosition,g=l.get("neckRadius"),b=s.biceps*(1+n.sleeveEase),k=s.wrist*(1+n.wristEase);a.raglanCenter=new o(0,0),a.neckCenter=a.raglanCenter.shift(180,n.neckBalance*g);const w=l.get("raglanLength"),C=n.raglanScoopMagnitude*w,v=n.raglanScoopLength*w,T=b/2*m,y=function(t,e){return Math.sqrt(t*t-e*e)}(w,T),x=n.sleeveLength*s.shoulderToWrist;let B;if(n.sleeveLength<u){B=((m-1)*(1-n.sleeveLength/u)+1)*b}else{const t=Math.min((n.sleeveLength-u)/(1-u),1);B=b*(1-t)+k*t}B/=2;const S=y+x;a.frontArmhole=new o(-T,y),a.backArmhole=new o(T,y);const L=a.raglanCenter.angle(a.frontArmhole),P=a.raglanCenter.angle(a.backArmhole);if(a.frontSleeve=new o(-B,S),a.backSleeve=new o(B,S),n.sleeveLength<u){const t=1-n.sleeveLength/u;a.frontSleeve=a.frontSleeve.shift(L-90,t*C),a.backSleeve=a.backSleeve.shift(P+90,t*C)}a.frontNeck=a.raglanCenter.shiftTowards(a.frontArmhole,l.get("frontNeckRadius")),a.backNeck=a.raglanCenter.shiftTowards(a.backArmhole,l.get("backNeckRadius"));const R=a.neckCenter.angle(a.frontNeck),F=a.neckCenter.angle(a.backNeck),W=t.deg2rad(F-R)*g,H=L+(180-l.get("frontNecklineToRaglanAngle")),A=P-(180-l.get("backNecklineToRaglanAngle"));a.neckCP1=a.backNeck.shift(A,W*(1/3)),a.neckCP2=a.frontNeck.shift(H,W*(1/3)),a.frontArmholeScooped=a.frontArmhole.shift(L-90,C),a.frontArmholeScoopCP1=a.frontArmhole.shift(L+180,1/3*v),a.frontArmholeScoopCP2=a.frontArmhole.shift(L+180,2/3*v),a.frontArmholeScoopEnd=a.frontArmhole.shift(L+180,v),a.backArmholeScooped=a.backArmhole.shift(P+90,C),a.backArmholeScoopCP1=a.backArmhole.shift(P+180,1/3*v),a.backArmholeScoopCP2=a.backArmhole.shift(P+180,2/3*v),a.backArmholeScoopEnd=a.backArmhole.shift(P+180,v),i.saBase=(new e).move(a.backSleeve).line(a.backArmholeScooped).curve(a.backArmholeScoopCP1,a.backArmholeScoopCP2,a.backArmholeScoopEnd).line(a.backNeck).curve(a.neckCP1,a.neckCP2,a.frontNeck).line(a.frontArmholeScoopEnd).curve(a.frontArmholeScoopCP2,a.frontArmholeScoopCP1,a.frontArmholeScooped).line(a.frontSleeve).hide(),i.hemBase=(new e).move(a.frontSleeve).line(a.backSleeve).hide(),i.seam=i.saBase.join(i.hemBase).close().addClass("fabric"),p("vd",{id:"hFrontRaglanSleeveStraightPortion",from:a.frontNeck,to:a.frontArmholeScoopEnd,x:a.frontArmholeScooped.x-(c+15)}),p("vd",{id:"hFrontRaglanSleeveCurvedPortion",from:a.frontArmholeScoopEnd,to:a.frontArmholeScooped,x:a.frontArmholeScooped.x-(c+15)}),p("vd",{id:"hFrontRaglanSleeve",from:a.frontNeck,to:a.frontArmholeScooped,x:a.frontArmholeScooped.x-(c+30)}),p("vd",{id:"hFrontSleeve",from:a.frontArmholeScooped,to:a.frontSleeve,x:a.frontArmholeScooped.x-(c+15)}),p("vd",{id:"hFrontTotal",from:a.frontNeck,to:a.frontSleeve,x:a.frontArmholeScooped.x-(c+45)}),p("vd",{id:"hBackRaglanSleeveStraightPortion",from:a.backNeck,to:a.backArmholeScoopEnd,x:a.backArmholeScooped.x+(c+15)}),p("vd",{id:"hBackRaglanSleeveCurvedPortion",from:a.backArmholeScoopEnd,to:a.backArmholeScooped,x:a.backArmholeScooped.x+(c+15)}),p("vd",{id:"hBackRaglanSleeve",from:a.backNeck,to:a.backArmholeScooped,x:a.backArmholeScooped.x+(c+30)}),p("vd",{id:"hBackSleeve",from:a.backArmholeScooped,to:a.backSleeve,x:a.backArmholeScooped.x+(c+15)}),p("vd",{id:"hBackTotal",from:a.backNeck,to:a.backSleeve,x:a.backArmholeScooped.x+(c+45)}),p("hd",{id:"wFrontSleeve",from:a.frontArmholeScooped,to:a.frontSleeve,y:a.frontSleeve.y+(c+15),noStartMarker:!0,noEndMarker:!0}),p("hd",{id:"wSleeveHem",from:a.frontSleeve,to:a.backSleeve,y:a.frontSleeve.y+(c+15)}),p("hd",{id:"wBackSleeve",from:a.backSleeve,to:a.backArmholeScooped,y:a.backSleeve.y+(c+15),noStartMarker:!0,noEndMarker:!0}),p("hd",{id:"wWidthAtArmpit",from:a.frontArmholeScooped,to:a.backArmholeScooped,y:a.frontSleeve.y+(c+30)}),p("hd",{id:"wWidthAtArmpit2",from:a.frontArmholeScooped,to:a.backArmholeScooped,y:Math.min(a.frontNeck.y,a.backNeck.y)-(c+45)}),p("hd",{id:"wFrontRaglanSleeveCurvedPortion",from:a.frontArmholeScooped,to:a.frontArmholeScoopEnd,y:Math.min(a.frontNeck.y,a.backNeck.y)-(c+15)}),p("hd",{id:"wFrontRaglanSleeveStraightPortion",from:a.frontArmholeScoopEnd,to:a.frontNeck,y:Math.min(a.frontNeck.y,a.backNeck.y)-(c+15)}),p("hd",{id:"wNeck",from:a.frontNeck,to:a.backNeck,y:Math.min(a.frontNeck.y,a.backNeck.y)-(c+15)}),p("hd",{id:"wBackRaglanSleeveStraightPortion",from:a.backNeck,to:a.backArmholeScoopEnd,y:Math.min(a.frontNeck.y,a.backNeck.y)-(c+15)}),p("hd",{id:"wBackRaglanSleeveCurvedPortion",from:a.backArmholeScoopEnd,to:a.backArmholeScooped,y:Math.min(a.frontNeck.y,a.backNeck.y)-(c+15)}),p("hd",{id:"wBackRaglanSleeve",from:a.backNeck,to:a.backArmholeScooped,y:Math.min(a.frontNeck.y,a.backNeck.y)-(c+30)}),p("hd",{id:"wFrontRaglanSleeve",from:a.frontArmholeScooped,to:a.frontNeck,y:Math.min(a.frontNeck.y,a.backNeck.y)-(c+30)}),a.grainlineBottom=a.backSleeve.shiftFractionTowards(a.frontSleeve,.5),a.grainlineTop=a.raglanCenter.shift(270,g),p("grainline",{from:a.grainlineTop,to:a.grainlineBottom}),l.cutlist.addCut({cut:2,from:"fabric"}),h.frontArmholeScoopEnd=new d("notch",a.frontArmholeScoopEnd),h.backArmholeScoopEnd=new d("bnotch",a.backArmholeScoopEnd),a.title=new o(0,a.backSleeve.y/3),p("title",{at:a.title,nr:3,title:"sleeve"}),a.logo=a.title.shift(-90,70*f),h.logo=new d("logo",a.logo),a.scalebox=a.logo.shift(-90,70*f),p("scalebox",{at:a.scalebox}),c&&(i.sa=i.saBase.offset(c).join(i.hemBase.offset(c*n.sleeveHem)).close().addClass("fabric sa"));const O=(new e).move(a.backNeck).curve(a.neckCP1,a.neckCP2,a.frontNeck);return l.set("neckLengthSide",O.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 th={name:"shelly.neckband",plugins:[],draft:function({Path:t,Point:e,paths:o,points:i,measurements:a,options:s,part:n,store:r,complete:l,sa:c,macro:p}){const h=(r.get("neckLengthFront")+r.get("neckLengthBack")+r.get("neckLengthSide"))*s.neckbandLength,d=s.neckbandWidth*a.neck*2;return i.topLeftCorner=new e(0,0),i.bottomLeftCorner=new e(0,d),i.bottomRightCorner=new e(h,d),i.topRightCorner=new e(h,0),i.leftCenter=new e(0,d/2),i.rightCenter=new e(h,d/2),o.saBase=(new t).move(i.bottomLeftCorner).line(i.bottomRightCorner).line(i.topRightCorner).line(i.topLeftCorner).addClass("fabric").hide(),o.foldBase=(new t).move(i.topLeftCorner).line(i.bottomLeftCorner).hide(),l&&(o.foldLine=(new t).move(i.leftCenter).line(i.rightCenter).addClass("various dashed").addText("shelly:foldLine","center")),o.seam=o.saBase.join(o.foldBase).close().addClass("fabric"),p("vd",{id:"hWidth",from:i.topLeftCorner,to:i.bottomLeftCorner,x:-(15+c)}),p("hd",{id:"wLength",from:i.topLeftCorner,to:i.topRightCorner,y:-(c+15)}),i.cutonfoldFrom=i.topLeftCorner,i.cutonfoldTo=i.bottomLeftCorner,p("cutonfold",{from:i.cutonfoldFrom,to:i.cutonfoldTo,grainline:!0}),r.cutlist.addCut({cut:1,from:"fabric"}),i.title=new e(h/4,d/2),p("title",{at:i.title,nr:4,title:"neckband"}),c&&(o.sa=(new t).move(i.bottomLeftCorner).join(o.saBase.offset(c)).line(i.topLeftCorner).addClass("fabric sa")),n},after:[Zp],options:{neckbandLength:{pct:80,min:50,max:100,menu:"fit"},neckbandWidth:{pct:7.5,min:0,max:50,menu:"fit"}}},eh=new s.pT({data:Xp,parts:[Vp,qp,Zp,th]}),oh=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}'),ih={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 ah={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,s.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:i,points:a,paths:s,snippets:n,Snippet:r,sa:l,options:c,measurements:p,utils:h,part:d}){t.set("hips",p.hips/2*h.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*h.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),a.hipSide=new o(0,0),a.hipCb=new o(t.get("hipBack"),0),a.legSide=a.hipSide.shift(-90-c.angle,p.waistToUpperLeg-p.waistToHips),a.legSideCp=a.legSide.shift(-1*c.angle+7,t.get("legBack")),a.legInner=a.legSideCp.shift(-1*c.angle-90,t.get("gusset")/2),a.legSideCp=a.legSideCp.shiftFractionTowards(a.legSide,.5);let f=(new i).move(a.legInner)._curve(a.legSideCp,a.legSide).shiftAlong(2),m=a.legInner.angle(f);if(a.crossSeam=a.legInner.shift(m-90,t.get("gusset")),a.seatCb=a.hipCb.shift(-86,.62*(p.waistToUpperLeg-p.waistToHips)),f=h.beamsIntersect(a.crossSeam,a.crossSeam.shift(m,20),a.hipCb,a.seatCb),a.seat
1Cp=a.seatCb.shiftFractionTowards(f,.7),a.crossSeamCp=a.crossSeam.shiftFractionTowards(f,.7),a.reducedLegInner=0===c.legReduction?a.legInner:(new i).move(a.legSide).curve_(a.legSideCp,a.legInner).shiftFractionAlong(1-c.legReduction),a.reducedLegInnerCp=a.legInner.rotate(90,a.reducedLegInner),a.reducedCrossSeam=(new i).move(a.crossSeam).curve(a.crossSeamCp,a.seatCp,a.seatCb).shiftFractionAlong(2*c.legReduction),c.rise>0){let t=(p.waistToUpperLeg-p.waistToHips)*c.rise;a.hipSide=a.hipSide.shift(90,t),a.hipCb=a.hipCb.shift(90,t)}if(c.backRise>0){let t=(p.waistToUpperLeg-p.waistToHips)*c.backRise;a.hipCb=a.hipCb.shift(90,t),a.hipSide=a.hipSide.shift(90,t),a.hipCbCp=new o(a.hipCb.x/2,a.hipCb.y)}return s.saBase=(new i).move(a.crossSeam).curve(a.crossSeamCp,a.seatCp,a.seatCb).split(a.reducedCrossSeam).pop().line(a.hipCb),c.backRise>0?s.saBase._curve(a.hipCbCp,a.hipSide):s.saBase.line(a.hipSide),s.saBase.line(a.legSide),s.saBase=(new i).move(a.reducedLegInner).line(a.reducedCrossSeam).join(s.saBase),s.hemBase=(new i).move(a.legSide).curve_(a.legSideCp,a.reducedLegInner),s.saBase.hide(),s.hemBase.hide(),s.seam=s.saBase.join(s.hemBase).attr("class","fabric"),l&&(s.sa=s.hemBase.offset(3*l).join(s.saBase.offset(l)).close().addClass("fabric sa")),t.cutlist.setCut({cut:2,from:"fabric"}),a.logo=a.hipSide.shiftFractionTowards(a.seatCb,.3),n.logo=new r("logo",a.logo),a.title=a.hipSide.shiftFractionTowards(a.seatCb,.7),e("title",{at:a.title,nr:1,title:"back"}),e("scalebox",{at:new o(a.legSide.x+100,a.legSide.y-40)}),a.grainlineFrom=a.legSide.shift(0,15),a.grainlineTo=a.hipSide.shift(0,15),e("grainline",{from:a.grainlineFrom,to:a.grainlineTo}),e("hd",{id:"wAtWaist",from:a.hipSide,to:a.hipCb,y:a.hipCb.y-l-15}),e("hd",{id:"wSideHemToCfWaist",from:a.legSide,to:a.hipCb,y:a.hipCb.y-l-30}),e("vd",{id:"hSide",from:a.legSide,to:a.hipSide,x:a.legSide.x-l-15}),e("vd",{id:"hFull",from:a.reducedLegInner,to:a.hipSide,x:a.legSide.x-l-30}),e("hd",{id:"wHem",from:a.legSide,to:a.reducedLegInner,y:a.reducedLegInner.y+3*l+15}),e("hd",{id:"wFull",from:a.legSide,to:a.reducedCrossSeam,y:a.reducedLegInner.y+3*l+30}),e("vd",{id:"hInseam",from:a.reducedLegInner,to:a.reducedCrossSeam,x:a.reducedCrossSeam.x+l+15}),e("vd",{id:"hFull",from:a.reducedLegInner,to:a.hipCb,x:a.reducedCrossSeam.x+l+30}),d}};const sh={name:"shin.front",after:ah,draft:function({store:t,macro:e,Point:o,Path:i,points:a,paths:s,snippets:n,Snippet:r,sa:l,options:c,measurements:p,utils:h,part:d}){const f=-12,m=(p.waistToUpperLeg-p.waistToHips)*c.bulge;if(a.hipSide=new o(0,0),a.hipCb=new o(t.get("hipFront"),0),a.legSide=a.hipSide.shift(-78,p.waistToUpperLeg-p.waistToHips),a.legSideCp=a.legSide.shift(0,t.get("legFront")),a.legInner=a.legSideCp.shift(-100,t.get("gusset")/2),a.crossSeam=a.legSideCp.shift(80,t.get("gusset")/2),a.legSideCp=a.legSide.shiftFractionTowards(a.legSideCp,.4),a.seatCb=a.hipCb.shift(-83,.67*(p.waistToUpperLeg-p.waistToHips)),a._tmp2=a.crossSeam.shift(f,20),a._tmp3=h.beamsIntersect(a.crossSeam,a._tmp2,a.hipCb,a.seatCb),a.seatCp=a.seatCb.shiftFractionTowards(a._tmp3,.7),a.crossSeamCp=a.crossSeam.shiftFractionTowards(a._tmp3,.7),a.midFront=a.hipCb.shiftFractionTowards(a.seatCb,.6),a.midFrontCpTop=a.hipCb.shiftFractionTowards(a.seatCb,.3),a.midFrontCpBottom=a.hipCb.shiftFractionTowards(a.seatCb,.9),a.midBulge=a.midFront.shift(12,m),a.bulgeCpTop=a.midFrontCpTop.shift(12,m),a.bulgeCpBottom=a.midFrontCpBottom.shift(12,m),a.midSide=a.hipSide.shiftFractionTowards(a.legSide,.5),a.hipSideCpBottom=a.hipSide.shiftFractionTowards(a.legSide,.2),a.midSideCpTop=a.hipSide.shiftFractionTowards(a.legSide,.2),a.midSideCpBottom=a.hipSide.shiftFractionTowards(a.legSide,.7),a.legSideCpTop=a.hipSide.shiftFractionTowards(a.legSide,.8),a.midSideBulge=a.midSide.shift(12,-1*m),a.midSideBulgeCpTop=a.midSideCpTop.shift(12,-1*m),a.midSideBulgeCpBottom=a.midSideCpBottom.shift(12,-1*m),a.reducedLegInner=0===c.legReduction?a.legInner:(new i).move(a.legSide).curve_(a.legSideCp,a.legInner).shiftFractionAlong(1-c.legReduction),a.reducedLegInnerCp=a.legInner.rotate(90,a.reducedLegInner),a.reducedCrossSeam=(new i).move(a.crossSeam).curve(a.crossSeamCp,a.seatCp,a.seatCb).shiftFractionAlong(2*c.legReduction),c.rise>0){let t=(p.waistToUpperLeg-p.waistToHips)*c.rise;a.hipSide=a.hipSide.shift(90,t),a.hipCb=a.hipCb.shift(90,t)}if(c.backRise>0){let t=(p.waistToUpperLeg-p.waistToHips)*c.backRise;a.hipSide=a.hipSide.shift(90,t/2),a.hipCbCp=new o(a.hipCb.x/2,a.hipCb.y)}return s.saBase=(new i).move(a.crossSeam).curve(a.crossSeamCp,a.seatCp,a.seatCb).split(a.reducedCrossSeam).pop().curve(a.midFrontCpBottom,a.bulgeCpBottom,a.midBulge).curve(a.bulgeCpTop,a.midFrontCpTop,a.hipCb),c.backRise>0?s.saBase.curve_(a.hipCbCp,a.hipSide):s.saBase.line(a.hipSide),s.saBase.curve(a.midSideCpTop,a.midSideBulgeCpTop,a.midSideBulge).curve(a.midSideBulgeCpBottom,a.legSideCpTop,a.legSide),s.saBase=(new i).move(a.reducedLegInner).line(a.reducedCrossSeam).join(s.saBase),s.hemBase=(new i).move(a.legSide).curve_(a.legSideCp,a.reducedLegInner),s.saBase.hide(),s.hemBase.hide(),s.seam=s.saBase.join(s.hemBase).attr("class","fabric"),l&&(s.sa=s.hemBase.offset(3*l).join(s.saBase.offset(l)).close().addClass("fabric sa")),t.cutlist.setCut({cut:2,from:"fabric"}),a.logo=a.hipSide.shiftFractionTowards(a.seatCb,.3),n.logo=new r("logo",a.logo),a.title=a.hipSide.shiftFractionTowards(a.seatCb,.7),e("title",{at:a.title,nr:2,t
1itle:"front"}),a.grainlineFrom=a.seatCb.shift(180,30),a.grainlineTo=a.hipCb.shift(180,30),e("grainline",{from:a.grainlineFrom,to:a.grainlineTo}),e("vd",{id:"hSide",from:a.legSide,to:a.hipSide,x:a.hipSide.x-l-15}),e("vd",{id:"hFull",from:a.reducedLegInner,to:a.hipSide,x:a.hipSide.x-l-30}),e("vd",{id:"hInseam",from:a.reducedLegInner,to:a.reducedCrossSeam,x:a.reducedCrossSeam.x+l+15}),e("vd",{id:"hFront",from:a.reducedLegInner,to:a.hipCb,x:a.reducedCrossSeam.x+l+30}),e("hd",{id:"wAtWaist",from:a.hipSide,to:a.hipCb,y:a.hipSide.y-l-15}),e("hd",{id:"wFull",from:a.hipSide,to:a.reducedCrossSeam,y:a.hipSide.y-l-30}),e("hd",{id:"wAtHem",from:a.legSide,to:a.reducedLegInner,y:a.reducedLegInner.y+3*l+15}),e("hd",{id:"wHemSideToFork",from:a.legSide,to:a.reducedCrossSeam,y:a.reducedLegInner.y+3*l+30}),d}};const nh={name:"shin.waistband",after:ah,draft:function({store:t,macro:e,Point:o,Path:i,points:a,paths:s,sa:n,expand:r,units:l,absoluteOptions:c,part:p}){const h=2.5*c.elasticWidth;return a.topLeft=new o(0,0),a.topRight=new o(h,0),a.bottomLeft=new o(0,2*t.get("hips")),a.bottomRight=new o(h,a.bottomLeft.y),r?(t.flag.preset("expandIsOn"),s.seam=(new i).move(a.topLeft).line(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).line(a.topLeft).addClass("fabric"),n&&(s.sa=(new i).move(a.topLeft).line(a.bottomLeft).line(a.bottomRight).line(a.topRight).line(a.topLeft).close().offset(n).addClass("fabric sa")),t.cutlist.setCut({cut:1,from:"fabric"}),a.title=a.topLeft.shiftFractionTowards(a.bottomRight,.5),e("title",{at:a.title,nr:3,title:"waistband",align:"center",scale:.666}),a.grainlineFrom=a.bottomLeft.shiftFractionTowards(a.bottomRight,1/8),a.grainlineTo=new o(a.grainlineFrom.x,a.topLeft.y),e("grainline",{from:a.topLeft.shift(-90,20),to:a.topRight.shift(-90,20)}),e("vd",{id:"hFull",from:a.bottomRight,to:a.topRight,x:a.topRight.x+n+15}),e("hd",{id:"wFull",from:a.bottomLeft,to:a.bottomRight,y:a.bottomRight.y+n+15}),p):(t.flag.note({msg:"shin:cutWaistband",notes:[n?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:l(h+2*n),l:l(2*t.get("hips")+2*n)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),t.flag.preset("expandIsOff"),p.hide())}},rh=new s.pT({data:oh,parts:[ah,sh,nh]}),lh=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}'),ch={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"}}}')},ph=function(t){const{store:e,measurements:o,options:i}=t.shorthand(),a=o.chest*(1+i.chestEase),s=o.waist*(1+i.waistEase),n=o.hips*(1+i.hipsEase);let r=a-s,l=a-n;r<0&&(r=0),r<l&&(l=r),e.set("waistReduction",r),e.set("hipsReduction",l),e.set("reduction",!0),e.set("chest",a),e.set("waist",s),e.set("hips",n),("never"===i.backDarts||r<=l)&&"always"!==i.backDarts?e.set("backDarts",!1):e.set("backDarts",!0)},hh=function(t,e="cfNeck",o="button"){const{points:i,options:a,snippets:s,Snippet:n}=t.shorthand(),r=i.cfNeck.dist(i.cfHips),l=r*(1-a.buttonFreeLength),c=a.buttons;switch("bustAlignedButtons"in a?a.bustAlignedButtons:"default"){case"even":{const t=i.cfNeck.dist(i.cfBust),a=t/r,l=t/Math.round(c*a);for(let r=1;r<=c;r++)i["button"+r]=i[e].shift(-90,l*r),s[o+r]=new n(o,i["button"+r]);break}case"split":{const t=i.cfNeck.dist(i.cfBust),a=l-t,r=t/l,p=Math.round(c*r),h=t/p,d=a/(c-p);for(let l=1;l<=p;l++)i["button"+l]=i[e].shift(-90,h*l),s[o+l]=new n(o,i["button"+l]);const f=(h-d)/2;i.currentpoint=i.cfBust.clone();for(let e=p+1;e<=c;e++)i.currentpoint=i.currentpoint.shift(-90,d),e==p+1?i.currentpoint=i.currentpoint.shift(-90,f):e==c&&(i.currentpoint=i.currentpoint.shift(90,f)),i["button"+e]=i.currentpoint.clone(),s[o+e]=new n(o,i["button"+e]);break}default:{const t=l/c;for(let a=1;a<=c;a++)i["button"+a]=i[e].shift(-90,t*a),s[o+a]=new n(o,i["button"+a])}}a.extraTopButton&&(s["top"+o]=new n(o,i[e].shift(-90,l/c/2)))},dh=(t,e)=>hh(t,e,"buttonhole"),fh=t=>{const{store:e,points:o,measurements:i,options:a,Point:s}=t.shorthand(),n=i.shoulderToWrist*a.cuffLength,r=i.wrist*(1+a.cuffEase)*(1+a.cuffOverlap);return e.set("cuffHeight",n),o.topLeft=new s(0,0),o.topRight=new s(r,0),o.bottomLeft=new s(0,n),o.bottomRight=new s(r,n),t},mh=t=>{const{macro:e,store:o,snippets:i,Snippet:a,points:s,measurements:n,options:r,Point:l}=t.shorthand();o.cutlist.setCut([{cut:4,from:"fabric"},{cut:2,from:"interfacing"}]),s.title=new l(s.bottomRight.x/2,s.bottomRight.y/2),e("title",{nr:11,title:"cuff",at:s.title,scale:.8});const c=n.wrist*r.cuffOverlap;s.buttonLineTop=s.topRight.shift(180,c/2),s.buttonLineBottom=s.bottomRight.shift(180,c/2),s.button
1holeLineTop=s.topLeft.shift(0,c/2),s.buttonholeLineBottom=s.bottomLeft.shift(0,c/2);for(let p=1;p<=r.cuffButtonRows;p++)s["button"+p]=s.buttonLineTop.shiftFractionTowards(s.buttonLineBottom,1/(Number(r.cuffButtonRows)+1)*p),i["button"+p]=new a("button",s["button"+p]),s["buttonhole"+p]=new l(s.buttonholeLineTop.x,s["button"+p].y),i["buttonhole"+p]=new a("buttonhole",s["buttonhole"+p]).attr("data-rotate",90),r.barrelCuffNarrowButton&&(s["narrowButton"+p]=s["button"+p].shift(180,c),i["narrowButton"+p]=new a("button",s["narrowButton"+p]));return t},uh=t=>{const{store:e,points:o,measurements:i,options:a,Point:s}=t.shorthand(),n=i.wrist*a.cuffOverlap,r=i.shoulderToWrist*a.cuffLength,l=i.wrist*(1+a.cuffEase+a.cuffOverlap+a.cuffDrape)+n/2;return e.set("cuffHeight",r),o.topLeft=new s(0,0),o.topRight=new s(l,0),o.midLeft=new s(0,r),o.midRight=new s(l,r),o.bottomLeft=new s(0,2*r),o.bottomRight=new s(l,2*r),t},gh=t=>{const{macro:e,store:o,snippets:i,Snippet:a,points:s,measurements:n,options:r,Point:l}=t.shorthand();o.cutlist.setCut([{cut:4,from:"fabric"},{cut:2,from:"interfacing"}]),s.title=new l(s.bottomRight.x/2,s.bottomRight.y/2),e("title",{nr:11,title:"cuff",at:s.title,scale:.8});const c=n.wrist*r.cuffOverlap;return s.buttonLineTop=s.topRight.shift(180,.75*c),s.buttonLineBottom=s.bottomRight.shift(180,.75*c),s.buttonholeLineTop=s.topLeft.shift(0,.75*c),s.buttonholeLineBottom=s.bottomLeft.shift(0,.75*c),s.button1=s.buttonLineTop.shiftFractionTowards(s.buttonLineBottom,.2),s.button2=s.buttonLineTop.shiftFractionTowards(s.buttonLineBottom,.8),s.button3=s.buttonholeLineTop.shiftFractionTowards(s.buttonholeLineBottom,.2),s.button4=s.buttonholeLineTop.shiftFractionTowards(s.buttonholeLineBottom,.8),i.buttonhole1=new a("buttonhole",s.button1).attr("data-rotate",90),i.buttonhole2=new a("buttonhole",s.button2).attr("data-rotate",90),i.buttonhole3=new a("buttonhole",s.button3).attr("data-rotate",90),i.buttonhole4=new a("buttonhole",s.button4).attr("data-rotate",90),t},bh=t=>{const{sa:e,macro:o,points:i,options:a,complete:s}=t.shorthand();return s&&o("hd",{id:"wBetweenButtonAndHole",from:i.buttonhole1,to:i.button1,y:i.bottomLeft.y+15+e}),o("hd",{id:"wFull",from:i.bottomLeft,to:i.bottomRight,y:i.bottomLeft.y+30+e}),o("vd",{id:"hCuff",from:i.bottomLeft,to:i.topLeft.shift(0,40),x:i.bottomLeft.x-15-e}),s&&a.barrelCuffNarrowButton&&o("hd",{id:"wBetweenButtons",from:i.narrowButton1,to:i.button1,y:i.topRight.y-15-e}),s&&2===Number(a.cuffButtonRows)&&o("vd",{id:"hBetweenButtons",from:i.button2,to:i.button1,x:i.topRight.x+15+e}),t},kh=t=>{const{sa:e,macro:o,points:i,complete:a}=t.shorthand();return a&&(o("hd",{id:"wBetweenButtons",from:i.button4,to:i.button2,y:i.bottomLeft.y+15+e}),o("vd",{id:"hBetweenButtons",from:i.button2,to:i.button1,x:i.topRight.x+15+e})),o("hd",{id:"wFull",from:i.midLeft,to:i.midRight,y:i.bottomLeft.y+30+e}),o("vd",{id:"hFull",from:i.bottomRight.shift(180,40),to:i.topRight.shift(180,40),x:i.topRight.x+30+e}),t},wh=(t,e="left")=>{const{sa:o,options:i,points:a,paths:s,macro:n}=t.shorthand(),r="right"===e?-1:1;return o&&n("banner",{id:"ffsa",path:s.ffsa,text:"simon:flatFelledSeamAllowance",classes:"text-sm fill-note center",dy:"left"===e?-2:9}),n("vd",{id:"hArmholeToArmholePitch",from:a.armhole,to:a.armholePitch,x:a.armhole.x+(15+o*i.ffsa)*r}),n("vd",{id:"hArmholeToShoulder",from:a.armhole,to:a.s3ArmholeSplit,x:a.armhole.x+(30+o*i.ffsa)*r}),n("vd",{id:"hArmholeToHps",from:a.armhole,to:a.s3CollarSplit,x:a.armhole.x+(45+o*i.ffsa)*r}),n("vd",{id:"hWaistToArmhole",from:a.waist,to:a.armhole,x:a.armhole.x+(15+o*i.ffsa)*r}),n("vd",{id:"hHipsToArmhole",from:a.hips,to:a.armhole,x:a.armhole.x+(30+o*i.ffsa)*r}),n("ld",{id:"wAtArmhole",from:"left"===e?a.cfArmhole:a.armhole,to:"left"===e?a.armhole:a.cfArmhole}),n("ld",{id:"wAtWaist",from:"left"===e?a.cfWaist:a.waist,to:"left"===e?a.waist:a.cfWaist}),n("ld",{id:"wAtHips",from:"left"===e?a.cfHips:a.hips,to:"left"===e?a.hips:a.cfHips}),"baseball"===i.hemStyle?(n("vd",{id:"hBaseballCurve",from:a.bballStart,to:a.bballEnd,x:a.hips.x+(15+i.ffsa*o)*r}),n("vd",{id:"hHemToHips",from:a.bballStart,to:a.hips,x:a.hips.x+(30+i.ffsa*o)*r}),n("vd",{id:"hHemToArmhole",from:a.bballStart,to:a.armhole,x:a.hips.x+(75+i.ffsa*o)*r}),n("vd",{id:"hFull",from:a.bballStart,to:a.s3CollarSplit,x:a.hips.x+(90+i.ffsa*o)*r}),n("hd",{id:"wBaseballCurve",from:a.bballStart,to:a.bballEnd,y:a.bballStart.y+15+3*o})):"slashed"===i.hemStyle?(n("vd",{id:"hSlashCurve",from:a.slashEnd,to:a.slashStart,x:a.hips.x+(15+3*o)*r}),n("vd",{id:"hHemToHips",from:a.slashEnd,to:a.hips,x:a.hips.x+(30+3*o)*r}),n("vd",{id:"hHemToArmhole",from:a.slashEnd,to:a.armhole,x:a.hips.x+(75+3*o)*r}),n("vd",{id:"hFull",from:a.slashEnd,to:a.s3CollarSplit,x:a.hips.x+(90+3*o)*r})):(n("vd",{id:"hHemtoArmhole",from:a.hem,to:a.armhole,x:a.armhole.x+(45+i.ffsa*o)*r}),n("vd",{id:"hFull",from:a.hem,to:a.s3CollarSplit,x:a.armhole.x+(60+i.ffsa*o)*r})),t};var Ch=o(61035);
1const vh={list:["auto","never","always"],dflt:"auto",menu:"style"},Th={pct:25,min:5,max:75,menu:"advanced"},yh={pct:7,min:4,max:10,...(0,s.Wx)("shoulderToShoulder"),menu:"advanced"},xh={pct:8,min:4,max:12,...(0,s.Wx)("neck"),menu:"style.closure"},Bh={pct:5,min:2,max:8,...(0,s.Wx)("neck"),menu:"style.closure"},Sh={pct:2,min:0,max:10,menu:"fit"},Lh={pct:8,min:3,max:13,...(0,s.Wx)("neck"),menu:"style.collar"},Ph={pct:5,min:0,max:10,menu:(t,e)=>"short"!==e?.sleeveStyle&&"style.cuffs"},Rh={pct:20,min:10,max:40,menu:(t,e)=>"short"!==e?.sleeveStyle&&"fit"},Fh={pct:10,min:3,max:15,menu:(t,e)=>"short"!==e?.sleeveStyle&&"style.cuffs"},Wh={list:["roundedBarrelCuff","angledBarrelCuff","straightBarrelCuff","roundedFrenchCuff","angledFrenchCuff","straightFrenchCuff"],dflt:"angledBarrelCuff",menu:(t,e)=>"short"!==e?.sleeveStyle&&"style.cuffs"},Hh={pct:15,min:10,max:35,...(0,s.Wx)("hips"),menu:"fit"},Ah={pct:2,min:0,max:15,...(0,s.Wx)("shoulderToShoulder"),menu:"fit"},Oh={pct:3.5,min:-40,max:10,...(0,s.Wx)("shoulderToWrist"),menu:(t,e)=>"short"!==e?.sleeveStyle&&"fit"},Dh={pct:40,min:20,max:100,...(0,s.Wx)("shoulderToWrist"),menu:(t,e)=>"short"===e?.sleeveStyle&&"style"},Eh={pct:4,min:1,max:20,...(0,s.Wx)("shoulderToWrist"),menu:(t,e)=>"short"===e?.sleeveStyle&&"style"},Ih={pct:25,min:15,max:35,...(0,s.Wx)("shoulderToWrist"),menu:(t,e)=>"short"!==e?.sleeveStyle&&"style.cuffs"},Nh={pct:13,min:8,max:18,...(0,s.Wx)("wrist"),menu:(t,e)=>"short"!==e?.sleeveStyle&&"style.cuffs"},Mh={list:["short","long"],dflt:"long",menu:"style"},_h={pct:15,min:10,max:35,...(0,s.Wx)("waist"),menu:"fit"};const jh={name:"simon.back",plugins:[Ch.dG],measurements:["waist","hips"],from:I,hide:s.V9.HIDE_TREE,options:{collarFactor:5,backDarts:vh,backDartShaping:Th,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:yh,roundBack:{pct:0,min:0,max:10,menu:"fit"},buttonholePlacketWidth:xh,buttonholePlacketFoldWidth:{pct:16,min:8,max:24,toAbs:(t,{measurements:e},o)=>e.neck*o.buttonholePlacketWidth*t,menu:"style.closure"},buttonPlacketWidth:Bh,hemCurve:{pct:50,min:25,max:100,menu:"style"},hemStyle:{list:["straight","baseball","slashed"],dflt:"straight",menu:"style"},hipsEase:Hh,lengthBonus:{pct:25,min:-4,max:60,menu:"fit"},shoulderEase:Ah,yokeHeight:{pct:70,min:40,max:90,menu:"style"},sleevePlacketWidth:Nh,waistEase:_h},draft:function({store:t,measurements:e,sa:o,Point:i,points:a,Path:s,paths:n,Snippet:r,snippets:l,complete:c,utils:p,macro:h,options:d,part:f}){t.set("buttonPlacketWidth",e.neck*d.buttonPlacketWidth),t.set("buttonholePlacketWidth",e.neck*d.buttonholePlacketWidth),t.set("buttonholePlacketFoldWidth",t.get("buttonholePlacketWidth")*d.buttonholePlacketFoldWidth),t.set("collarStandWidth",e.neck*d.collarStandWidth),t.set("sleevePlacketWidth",e.wrist*d.sleevePlacketWidth),t.set("boxPleatWidth",e.shoulderToShoulder*d.boxPleatWidth),t.set("boxPleatFold",t.get("boxPleatWidth")*d.boxPleatFold),ph(f),t.set("library.sleeve.backArmholeLength",(new s).move(a.armhole).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.armholePitchCp1,a.armholePitch).join(n.backArmhole).length()),a.hips=a.hips.shift(180,t.get("hipsReduction")/4),a.hem=a.hem.shift(180,t.get("hipsReduction")/4);let m=t.get("waistReduction");if(t.get("backDarts")){let t=m*d.backDartShaping/4,o=m*(1-d.backDartShaping)/4;a.waist=a.waist.shift(180,o),a.dartCenter=a.cbWaist.shiftFractionTowards(a.waist,.6),a.dartTop=a.dartCenter.shift(90,.75*a.armhole.dy(a.waist)),a.dartBottom=a.dartCenter.shift(-90,.75*e.waistToHips),a.dartCenterIn=a.dartCenter.shift(180,t),a.dartCenterOut=a.dartCenter.shift(0,t),a.dartCenterInCp1=a.dartCenterIn.shift(90,.2*a.dartTop.dy(a.dartCenter)),a.dartCenterInCp2=a.dartCenterIn.shift(90,.2*a.dartBottom.dy(a.dartCenter)),a.dartCenterOutCp1=a.dartCenterOut.shift(90,.2*a.dartBottom.dy(a.dartCenter)),a.dartCenterOutCp2=a.dartCenterOut.shift(90,.2*a.dartTop.dy(a.dartCenter)),n.dart=(new s).move(a.dartTop)._curve(a.dartCenterInCp1,a.dartCenterIn).curve_(a.dartCenterInCp2,a.dartBottom)._curve(a.dartCenterOutCp1,a.dartCenterOut).
1curve_(a.dartCenterOutCp2,a.dartTop).close().attr("class","fabric")}else a.waist=a.waist.shift(180,m/4);a.waistCp1=a.waist.shift(-90,.5*e.waistToHips),a.waistCp2=a.waist.shift(90,a.armhole.dy(a.waist)/2),a.hipsCp2=a.hips.shift(90,a.waist.dy(a.hips)/4),a.cbYoke=new i(0,a.s3ArmholeSplit.y+a.s3ArmholeSplit.dy(a.armholePitch)*d.yokeHeight),a.cbNeck.dy(a.cbYoke)<10&&(a.cbYoke.y=a.cbNeck.y+10);const u=n.backArmhole.intersectsY(a.cbYoke.y).pop();u?a.armholeYokeSplit=u:(a.armholeYokeSplit=n.backArmhole.start(),a.cbYoke.y=a.armholeYokeSplit.y);const[g,b]=n.backArmhole.split(a.armholeYokeSplit);n.backArmholeYoke=b.hide(),n.backArmholeBack=g.attributes?g.hide():(new s).move(a.armholeYokeSplit).line(a.armholeYokeSplit).hide();const k=(new s).move(a.armhole).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.armholePitchCp1,a.armholePitch);if(t.set("library.sleeve.backArmholeToArmholePitch",n.backArmholeBack.length()+k.length()),n.armhole=k,0===d.yokeHeight?n.armhole=n.armhole.join(n.backArmhole):n.armhole=n.armhole.join(n.backArmholeBack),n.armhole.hide(),d.roundBack>0?(a.cbTop=a.cbYoke.shift(90,a.armholePitch.x*d.roundBack),a.cbTopCp1=a.cbTop.shift(0,.5*a.armholePitch.x),n.roundedBack=(new s).move(a.armholeYokeSplit)._curve(a.cbTopCp1,a.cbTop)):a.cbTop=a.cbYoke,a.armholeYokeSplitPreBoxpleat=a.armholeYokeSplit.clone(),d.boxPleat){a.boxPleatLeft=a.cbTop.shift(0,t.get("boxPleatWidth")/2),a.boxPleatMid=a.boxPleatLeft.shift(0,t.get("boxPleatFold")),a.boxPleatRight=a.boxPleatMid.shift(0,t.get("boxPleatFold")),a.boxPleatLeftBottom=new i(a.boxPleatLeft.x,a.armholeHollowCp2.y),a.boxPleatMidBottom=new i(a.boxPleatMid.x,a.armholeHollowCp2.y),a.boxPleatRightBottom=new i(a.boxPleatRight.x,a.armholeHollowCp2.y),n.armhole.hide(),n.armhole=n.armhole.translate(2*t.get("boxPleatFold"),0);for(const e of["armholePitch","armholePitchCp1","armholeHollowCp2","armholeHollow","armholeHollowCp1","armholeCp2","armhole","armholeYokeSplit"])a[e]=a[e].shift(0,2*t.get("boxPleatFold"))}switch(d.hemStyle){case"baseball":a.bballStart=a.cbHem.shiftFractionTowards(a.hem,.5),a.bballEnd=a.hem.shiftFractionTowards(a.hips,d.hemCurve),a.bballCp1=a.bballStart.shiftFractionTowards(a.hem,.5),a.bballCp2=new i(a.bballCp1.x,a.bballEnd.y),n.saBase=(new s).move(a.bballEnd).line(a.hips).curve(a.hipsCp2,a.waistCp1,a.waist).curve_(a.waistCp2,a.armhole).join(n.armhole),n.hemBase=(new s).move(a.cbHem).line(a.bballStart).curve(a.bballCp1,a.bballCp2,a.bballEnd);break;case"slashed":{const t=h("round",{id:"slash",from:a.hips,to:a.cbHem,via:a.hem,radius:a.hips.dist(a.hem)*d.hemCurve});for(const e of["start","cp1","cp2","end"])a[`slash${p.capitalize(e)}`]=a[t.points[e]].copy();n.saBase=(new s).move(a.hips).curve(a.hipsCp2,a.waistCp1,a.waist).curve_(a.waistCp2,a.armhole).join(n.armhole),n.hemBase=(new s).move(a.cbHem).line(a.slashEnd).curve(a.slashCp2,a.slashCp1,a.slashStart);break}default:n.saBase=(new s).move(a.hem).line(a.hips).curve(a.hipsCp2,a.waistCp1,a.waist).curve_(a.waistCp2,a.armhole).join(n.armhole),n.hemBase=(new s).move(a.cbHem).line(a.hem)}let w;return n.roundedBack?n.saBase=n.saBase.join(n.roundedBack):n.saBase=n.saBase.line(a.cbYoke),n.saBase.hide(),n.hemBase.hide(),n.seam=n.hemBase.join(n.saBase).close().attr("class","fabric"),o&&(n.sa=n.saBase.offset(o).attr("class","fabric sa"),n.hemSa=n.hemBase.offset(3*o).attr("class","fabric sa"),n.saConnect=(new s).move(a.cbHem).line(n.hemSa.start()).move(n.hemSa.end()).line(n.sa.start()).move(n.sa.end()).line(a.cbYoke).attr("class","fabric sa")),c&&d.boxPleat&&(n.boxPleat=(new s).move(a.boxPleatLeft).line(a.boxPleatLeftBottom).move(a.boxPleatMid).line(a.boxPleatMidBottom).move(a.boxPleatRight).line(a.boxPleatRightBottom).attr("class","fabric stroke-sm dashed")),c&&(h("banner",{id:"chestLine",classes:"center contrast help",path:n.chest,text:"simon:chestLine"}),h("banner",{id:"waistLine",classes:"center contrast help",path:n.waist,text:"simon:waistLine"})),delete l.armholePitchNotch,l.sleevecapNotch=new r("notch",a.armholeYokeSplit),h("cutonfold",{from:a.cbYoke,to:a.cbHem,grainline:!0}),a.title=new i(a.armhole.x/4,a.armhole.y),h("title",{at:a.title,nr:3,title:"back"}),a.logo=new i(a.armhole.x/4,a.waistCp2.y),l.logo=new r("logo",a.logo),h("rmad"),t.get("backDarts")?(h("vd",{id:"hDartBottom",from:a.dartBottom,to:a.dartCenterIn,x:a.dartCenterIn.x-15}),h("vd",{id:"hDartTop",from:a.dartCenterIn,to:a.dartTop,x:a.dartCenterIn.x-15}),h("hd",{id:"wDart",from:a.dartCenterIn,to:a.dartCenterOut,y:a.dartBottom.y+15}),h("hd",{id:"wDartToWaistSide",from:a.dartCenterOut,to:a.waist}),h("hd",{id:"wDartToCbWaist",from:a.cbWaist,to:a.dartCenterIn})):h("hd",{id:"wAtWaist",from:a.cbWaist,to:a.waist}),void 0!==a.slashEnd?(h("hd",{id:"wCbHemToSlashStart",from:a.cbHem,to:a.slashEnd,y:a.cbHem.y+15+3*o}),h("vd",{id:"hSlashCurve",from:a.slashEnd,to:a.slashStart,x:a.slashStart.x+15+3*o}),w=a.slashEnd):void 0!==a.bballStart?(h("hd",{id:"wCbHemToBbalCurveStart",from:a.cbHem,to:a.bballStart,y:a.cbHem.y+15+3*o}),h("vd",{id:"hBballCurve",from:a.bballStart,to:a.bballEnd,x:a.hips.x+15+o}),w=a.bballStart):w=a.hem,h("hd",{id:"wAtHem",from:a.cbHem,to:a.hips,y:a.cbHem.y+30+3*o}),h("vd",{id:"hHemToHips",from:w,to:a.hips,x:a.hips.x+30+o}),h("vd",{id:"hHemToWaist",from:w,to:a.waist,x:a.hips.x+45+o}),h("vd",{id:"hHemToArmhole",from:w,to:a.armhole,x:a.hips.x+60+o}
1),d.roundBack>0?(h("vd",{id:"hArmholeToRoundBackYoke",from:a.armhole,to:a.armholeYokeSplit,x:a.armhole.x+15+o}),h("vd",{id:"hARmholeToCbYoke",from:a.armhole,to:a.cbTop,x:a.armhole.x+30+o}),h("hd",{id:"wCbYokeToArmholePitch",from:a.cbTop,to:a.armholePitch,y:a.cbTop.y-15-o}),h("hd",{id:"wCbYokeToArmholeYokeSplit",from:a.cbTop,to:a.armholeYokeSplit,y:a.cbTop.y-30-o})):(h("vd",{id:"hArmholeToArmholePitch",from:a.armhole,to:a.armholePitch,x:a.armhole.x+15+o}),h("hd",{id:"wAtYoke",from:a.cbYoke,to:a.armholePitch,y:a.cbYoke.y-15-o})),h("vd",{id:"hFull",from:a.cbHem,to:a.cbYoke,x:a.cbHem.x-15}),f}};const Gh={name:"simon.front",from:N,after:jh,hide:{self:!0,from:!0,inherited:!0},options:{backDarts:vh,backDartShaping:Th,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:i,points:a,Path:s,paths:n,macro:r,utils:l,snippets:c,complete:p,options:h,part:d}){for(const u in n)-1===["frontArmhole","frontCollar","chest","waist"].indexOf(u)&&delete n[u];for(const u in c)u.indexOf("otch")&&delete c[u];r("rmcutonfold"),ph(d),t.set("library.sleeve.frontArmholeLength",(new s).move(a.armhole).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.armholePitchCp1,a.armholePitch).join(n.frontArmhole).length()),a.hips=a.hips.shift(180,t.get("hipsReduction")/4),a.hem=a.hem.shift(180,t.get("hipsReduction")/4);let f=t.get("waistReduction");switch(t.get("backDarts")?f=f*(1-h.backDartShaping)/4:f/=4,a.waist=a.waist.shift(180,f),a.waistCp1=a.waist.shift(-90,.5*e.waistToHips),a.waistCp2=a.waist.shift(90,a.armhole.dy(a.waist)/2),a.hipsCp2=a.hips.shift(90,a.waist.dy(a.hips)/4),a.hem.x<a.waist.x&&(a.hem.x=a.waist.x,a.hips.x=a.waist.x,a.hipsCp2.x=a.waist.x),n.saBaseFromHips=(new s).move(a.hips).curve(a.hipsCp2,a.waistCp1,a.waist).curve_(a.waistCp2,a.armhole),n.saBaseFromArmhole=(new s).move(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),h.hemStyle){case"baseball":a.bballStart=a.cfHem.shiftFractionTowards(a.hem,.5),a.bballEnd=a.hem.shiftFractionTowards(a.hips,h.hemCurve),a.bballCp1=a.bballStart.shiftFractionTowards(a.hem,.5),a.bballCp2=new i(a.bballCp1.x,a.bballEnd.y),n.saBase=(new s).move(a.bballEnd).line(a.hips).join(n.saBaseFromHips),n.hemBase=(new s).move(a.cfHem).line(a.bballStart).curve(a.bballCp1,a.bballCp2,a.bballEnd);break;case"slashed":{const t=r("round",{id:"slash",from:a.hips,to:a.cfHem,via:a.hem,radius:a.hips.dist(a.hem)*h.hemCurve});for(const e of["start","cp1","cp2","end"])a[`slash${l.capitalize(e)}`]=a[t.points[e]].copy();n.saBase=(new s).move(a.hips).join(n.saBaseFromHips),n.hemBase=(new s).move(a.cfHem).line(a.slashEnd).curve(a.slashCp2,a.slashCp1,a.slashStart);break}default:n.saBase=(new s).move(a.hem).line(a.hips).join(n.saBaseFromHips),n.hemBase=(new s).move(a.cfHem).line(a.hem)}n.saBase.hide(),n.saBaseFromHips.hide(),n.saBaseFromArmhole.hide(),n.hemBase.hide(),n.seam=n.hemBase.join(n.saBase).join(n.saBaseFromArmhole).addClass("fabric"),o&&(n.ffsa=n.saBase.offset(o*h.ffsa).attr("class","fabric sa"),n.saFromArmhole=n.saBaseFromArmhole.offset(o).attr("class","fabric sa"),n.hemSa=n.hemBase.offset(3*o).attr("class","fabric sa"),n.saConnect=(new s).move(n.hemSa.end()).line(n.ffsa.start()).move(n.ffsa.end()).line(n.saFromArmhole.start()).attr("class","fabric sa"),delete n.sa),p&&(r("banner",{id:"chestLine",classes:"center contrast help",path:n.chest,text:"simon:chestLine"}),r("banner",{id:"waistLine",classes:"center contrast help",path:n.waist,text:"simon:waistLine"})),t.cutlist.setCut({cut:1,from:"fabric"});const m=.2*(a.hem.x-a.cfHem.x);return r("grainline",{from:a.cfHem.shift(0,m),to:a.cfNeck.shift(0,m)}),r("sprinkle",{snippet:"notch",on:["waist","armholePitch","hips","cfHips","cfWaist","armhole","cfArmhole"]}),r("rmtitle"),d}};const Yh={name:"simon.frontRight",from:Gh,options:{buttonPlacketStyle:{list:["classic","seamless"],dflt:"classic",menu:(t,e)=>!e?.separateButtonPlacket&&"style.closure"}},draft:function(t){const{sa:e,options:o,points:i,macro:a,part:s,paths:n,complete:r}=t;if(a("flip"),r&&(a("banner",{id:"chestLine",classes:"center contrast help",path:n.chest.reverse(),text:"simon:chestLine"}),a("banner",{id:"waistLine",classes:"center contrast help",path:n.waist.reverse(),text:"simon:waistLine"})),i.scalebox=i.waist.shiftFractionTowards(i.cfWaist,.5),a("scalebox",{at:i.scalebox}),wh(s,"right"),a("ld",{id:"lShoulderSeam",from:i.s3ArmholeSplit,to:i.s3CollarSplit,d:15+e}),o.separateButtonPlacket)return(({store:t,snippets:e,utils:o,sa:i,Point:a,points:s,paths:n,macro:r,part:l})=>{const c=t.get("buttonPlacketWidth");return s.placketTopIn=o.lineIntersectsCurve(new a(c/-2,s.cfNeck.y+20),new a(c/-2,s.cfNeck.y-20),s.cfNeck,s.cfNeckCp1,s.neckCp2Front,s.neck),s.placketBottomIn=s.cfHem.shift(180,c/2),n.seam=n.seam.split(s.placketTopIn)[0],n.seam.ops[0].to=s.placketBottomIn,n.seam.close().attr("class","fabric"),i&&n.saFromArmhole.line(n.hemSa.start()),r("title",{at:s.title,nr:"1a",title:"rightFront"}),delete e["cfWaist-notch"],delete e["cfHips-notch"],delete e["cfArmhole-notch"],delete e["cfBust-notch"],s.edgeArmhole=new a(s.placketTopIn.x,s.armhole.y),s.edgeWaist=new a(s.placketTopIn.x,s.waist.y),s.edgeHips=new a(s.placketTopIn.x,s.hips.y),r("hd",{id:"wHpsToEdge",from:s.s3CollarSplit,to:s.placketTopIn,y:s.s3CollarSplit.y-i-15}),r("hd",{id:"wShoulderToEdge",from:s.s3ArmholeSplit,to:s.placketTopIn,y:s.s3CollarSplit.y-i-30}),r("hd",{id:"wFull",from:s.armhole,to:s.placketTopIn,y:s.s3CollarSplit.y-i-45}),r("vd",{id:"hPlacketTopToHps",from:s.placketTopIn,to:s.s3CollarSplit,x:s.placketTopIn.x+i+15}),r("vd",{id:"hFull",from:s.placketBottomIn,to:s.placketTopIn,x:s.placketTopIn.x+i+15}),l})(t);if("seamless"===o.buttonPlacketStyle)return(({sa:t,store:e,Point:o,points:i,Path:a,paths:s,complete:n,macro:r,options:l,part:c})=>{const p=e.get("buttonPlacketWidth");let h;i.placketTopFold1=i.cfNeck.shift(0,p/2),i.placketTopFold2=i.cfNeck.shift(0,1.5*p),i.placketTopEdge=i.cfNeck.shift(0,2.5*p),i.placketTopIn=i.cfNeck.shift(180,p/2),i.placketBottomFold1=i.cfHem.shift(0,p/2),i.placketBottomFold2=i.cfHem.shift(0,1.5*p),i.placketBottomEdge=i.cfHem.shift(0,2.5*p),i.placketBottomIn=i.cfHem.shift(180,p/2),s.seam.line(i.placketTopEdge).line(i.placketBottomEdge).line(i.cfHem).close(),t&&s.saFromArmhole.line(new o(i.placketTopEdge.x,i.placketTopEdge.y-t)).line(i.placketTopEdge).move(i.placketBottomEdge).line(i.placketBottomEdge.shift(-90,3*t)).line(s.hemSa.start()),n&&(s.frontCenter=(new a).move(i.cfNeck).line(i.cfHem).attr("class","help"),l.separateButtonholePlacket||s.frontCenter.addText("simon:matchHere","text-xs center"),s.placketFold1=(new a).move(i.placketTopFold1).line(i.placketBottomFold1).attr("class","dotted"),s.placketFold2=(new a).move(i.placketTopFold2).line(i.placketBottomFold2).attr("class","dotted"),s.placketInnerFold=(new a).move(i.placketBottomIn).line(i.placketTopIn).attr("class","dotted")),r("sprinkle",{snippet:"notch",on:["placketTopFold1","placketTopFold2","placketBottomFold1","placketBottomFold2","cfNeck","cfHem"]}),hh(c),r("title",{at:i.title,nr:1,title:"frontRight"}),r("hd",{id:"wHpsToEdge",from:i.hps,to:i.placketTopEdge,y:i.hps.y-t-15}),r("hd",{id:"wShoulderToEdge",from:i.s3ArmholeSplit,to:i.placketTopEdge,y:i.hps.y-t-30}),r("hd",{id:"wFull",from:i.armhole,to:i.placketTopEdge,y:i.hps.y-t-45}),r("vd",{id:"hHpsToPlacketTop",from:i.placketTopEdge,to:i.s3CollarSplit,x:i.placketTopEdge.x+t+15}),r("vd",{id:"hPlacket",from:i.placketBottomEdge,to:i.placketTopEdge,x:i.placketTopEdge.x+30}),i.button0=i.placketTopEdge;for(let d=0;d<l.buttons;d++)h=d+1,r("vd",{id:`hBetweenButtons${d}`,from:i["button"+h],to:i["button"+d],x:i.placketTopEdge.x+15});return r("hd",{id:"wPlacketFold2",from:i.placketTopFold2,to:i.placketTopEdge,y:i.placketTopEdge.y-15-t}),r("hd",{id:"wPlacketFold1",from:i.placketTopFold1,to:i.placketTopEdge,y:i.placketTopEdge.y-30-t}),r("hd",{id:"wCfToEdge",from:i.cfNeck,to:i.placketTopEdge,y:i.placketTopEdge.y-45-t}),r("hd",{id:"wPlacketInnerToEdge",from:i.placketTopIn,to:i.placketTopEdge,y:i.placketTopEdge.y-60-t}),c})(t);if("classic"===o.buttonPlacketStyle)return(({store:t,utils:e,sa:o,Point:i,points:a,Path:s,paths:n,complete:r,macro:l,options:c,part:p})=>{const h=t.get("buttonPlacketWidth");let d;a.placketTopIn=e.lineIntersectsCurve(new i(h/-2,a.cfNeck.y+20),new i(h/-2,a.cfNeck.y-20),a.cfNeck,a.cfNeckCp1,a.neckCp2Front,a.neck),a.placketTopOut=a.cfNeck.shift(0,h/2),a.placketTopEdge=a.cfNeck.shift(0,1.5*h),a.placketBottomIn=a.cfHem.shift(180,h/2),a.placketBottomOut=a.cfHem.shift(0,h/2),a.placketBottomEdge=a.cfHem.shift(0,1.5*h),n.seam.line(a.placketTopEdge).line(a.placketBottomEdge).line(a.cfHem).close(),o&&n.saFromArmhole.line(new i(a.placketTopEdge.x+o,a.placketTopEdge.y-o)).line(new i(a.placketBottomEdge.x+o,a.placketBottomEdge.y+3*o)).line(n.hemSa.start()),r&&(n.frontCenter=(new s).move(a.cfNeck).line(a.cfHem).attr("class","help"),c.separateButtonholePlacket||n.frontCenter.addText("simon:matchHere","text-xs center"),n.placketInnerFold=(new s).move(a.placketBottomIn).line(a.placketTopIn).attr("class","dotted"),n.placketOuterFold=(new s).move(a.placketTopOut).line(a.placketBottomOut).attr("class","dotted")),l("sprinkle",{snippet:"notch",on:["placketTopIn","placketTopOut","cfNeck","placketBottomIn","placketBottomOut","cfHem"]}),hh(p),l("rmtitle"),l("title",{at:a.title,nr:1,title:"frontRight"}),l("hd",{id:"wPlacketEdge",from:a.placketTopOut,to:a.placketTopEdge,y:a.placketTopEdge.y-15-o}),l("hd",{id:"wCfToEdge",from:a.cfNeck,to:a.placketTopEdge,y:a.placketTopEdge.y-30-o}),l("hd",{id:"wPlacketInnerToEdge",from:a.placketTopIn,to:a.placketTopEdge,y:a.placketTopEdge.y-45-o}),l("hd",{id:"wHpsToEdge",from:a.s3CollarSplit,to:a.placketTopEdge,y:a.s3CollarSplit.y-15-o}),l("hd",{id:"wShoulderToEdge",from:a.s3ArmholeSplit,to:a.placketTopEdge,y:a.s3CollarSplit.y-30-o}),l("hd",{id:"wFull",from:a.armhole,to:a.placketTopEdge,y:a.s3CollarSplit.y-45-o}),a.button0=a.placketTopEdge;for(let f=0;f<c.buttons;f++)d=f+1,l("vd",{id:`hBetweenButtons${f}`,from:a["button"+d],to:a["button"+f],x:a.placketTopEdge.x+15+o});return l("vd",{id:"hPlacket",from:a.placketBottomEdge,to:a.placketTopEdge,x:a.placketTopEdge.x+30+o}),p})(t);throw`Unexpected buttonPlacketStyle: ${o.buttonPlacketStyle}`}};const Uh={name:"simon.frontLeft",from:Gh,options:{buttonholePlacketStyle:{list:["classic","seamless"],dflt:"seamless",menu:(t,e)=>!e?.separateButtonholePlacket&&"style.closure"}},draft:function(t){const{sa:e,options:o,points:i,macro:a,part:s}=t;if(wh(s,"left"),a("ld",{from:i.s3CollarSplit,to:i.s3ArmholeSplit,d:15+e}),o.separateButtonholePlacket)return(({utils:t,sa:e,Point:o,points:i,Path:a,paths:s,store:n,snippets:r,macro:l,part:c})=>{const p=n.get("buttonholePlacketFoldWidth");return i.neckEdge=t.lineIntersectsCurve(new o(i.cfNeck.x+2*p,i.cfNeck.y+20),new o(i.cfNeck.x+2*p,i.cfNeck.y-20),i.cfNeck,i.cfNeckCp1,i.neckCp2Front,i.neck),i.hemEdge=new o(i.neckEdge.x,i.cfHem.y),s.seam=s.seam.split(i.neckEdge)[0],s.seam.ops[0].to=i.hemEdge,s.seam.close().attr("class","fabric"),e&&(s.saFromArmhole.end().x=i.neckEdge.x-e,s.hemSa.start().x=i.neckEdge.x-e,s.saClosure=(new a).move(s.saFromArmhole.end()).line(s.hemSa.start()).attr("class","fabric sa")),l("title",{at:i.title,nr:"2a",title:"frontLeft"}),delete r["cfWaist-notch"],delete r["cfHips-notch"],delete r["cfArmhole-notch"],delete r["cfBust-notch"],i.edgeArmhole=new o(i.neckEdge.x,i.armhole.y),i.edgeWaist=new o(i.neckEdge.x,i.waist.y),i.edgeHips=new o(i.neckEdge.x,i.hips.y),l("sprinkle",{snippet:"notch",on:["edgeArmhole","edgeWaist","edgeHips"]}),l("hd",{id:"wEdgeToHps",from:i.neckEdge,to:i.s3CollarSplit,y:i.s3CollarSplit.y-e-15}),l("hd",{id:"wEdgeToShoulder",from:i.neckEdge,to:i.s3ArmholeSplit,y:i.s3CollarSplit.y-e-30}),l("hd",{id:"wEdgeToArmhole",from:i.neckEdge,to:i.armhole,y:i.s3CollarSplit.y-e-45}),l("vd",{id:"hPlacketTopToHps",from:i.neckEdge,to:i.s3CollarSplit,x:i.neckEdge.x-e-15}),l("vd",{id:"hFull",from:i.hemEdge,to:i.s3CollarSplit,x:i.neckEdge.x-e-30}),c})(t);
1if("seamless"===o.buttonholePlacketStyle)return(({sa:t,points:e,Path:o,paths:i,complete:a,store:s,macro:n,options:r,part:l})=>{const c=s.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),i.seam.line(e.placketTopEdge).line(e.placketBottomEdge).close(),t&&i.saFromArmhole.line(e.placketTopEdge.shift(90,t)).line(e.placketTopEdge).move(e.placketBottomEdge).line(e.placketBottomEdge.shift(-90,3*t)).line(i.hemSa.start()),a&&(i.frontCenter=(new o).move(e.cfNeck).line(e.cfHem).attr("class","help"),r.separateButtonPlacket||i.frontCenter.addText("simon:matchHere","text-xs center"),i.placketFold1=(new o).move(e.placketBottomFold1).line(e.placketTopFold1).attr("class","dotted"),i.placketFold2=(new o).move(e.placketBottomFold2).line(e.placketTopFold2).attr("class","dotted")),n("sprinkle",{snippet:"notch",on:["cfNeck","cfHem","placketTopFold1","placketTopFold2","placketBottomFold1","placketBottomFold2"]}),dh(l,"cfNeck"),n("title",{at:e.title,nr:2,title:"frontLeft"});let p,h=0;for(const d of["placketBottomFold2","placketBottomFold1","cfHem","hips"])h+=15,n("hd",{id:`wEdgeTo${d}`,from:e.placketBottomEdge,to:e[d],y:e.placketBottomEdge.y+h+3*t});n("hd",{id:"wEdgeToHps",from:e.placketTopEdge,to:e.s3CollarSplit,y:e.s3CollarSplit.y-15-t}),n("hd",{id:"wEdgeToShoulder",from:e.placketTopEdge,to:e.s3ArmholeSplit,y:e.s3CollarSplit.y-30-t}),n("hd",{id:"wFull",from:e.placketTopEdge,to:e.armhole,y:e.s3CollarSplit.y-45-t}),e.button0=e.placketTopEdge;for(let d=0;d<r.buttons;d++)p=d+1,n("vd",{from:e["button"+p],id:`hBetweenButtons${d}`,to:e["button"+d],x:e.placketTopEdge.x-15});return n("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:i,Path:a,paths:s,Snippet:n,snippets:r,complete:l,macro:c,options:p,part:h})=>{const d=t.get("buttonholePlacketFoldWidth"),f=t.get("buttonholePlacketWidth");i.placketCfNeck=i.cfNeck.shift(180,2*d),i.placketTopInnerEdgeFold=i.placketCfNeck.shift(0,f/2),i.placketTopInnerEdgeOver=i.placketCfNeck.shift(0,f/2-d),i.placketTopInnerEdgeUnder=i.placketCfNeck.shift(0,f/2+d),i.placketTopOuterEdgeFold=i.placketCfNeck.shift(180,f/2),i.placketTopOuterEdgeOver=i.placketCfNeck.shift(180,f/2-d),i.placketTopOuterEdgeUnder=i.placketCfNeck.shift(180,f/2+d),i.placketCfHem=i.cfHem.shift(180,2*d),i.placketBottomInnerEdgeFold=i.placketCfHem.shift(0,f/2),i.placketBottomInnerEdgeOver=i.placketCfHem.shift(0,f/2-d),i.placketBottomInnerEdgeUnder=i.placketCfHem.shift(0,f/2+d),i.placketBottomOuterEdgeFold=i.placketCfHem.shift(180,f/2),i.placketBottomOuterEdgeOver=i.placketCfHem.shift(180,f/2-d),i.placketBottomOuterEdgeUnder=i.placketCfHem.shift(180,f/2+d),i.placketTopEdge=i.placketTopOuterEdgeFold.shift(180,f),i.placketBottomEdge=i.placketBottomOuterEdgeFold.shift(180,f),void 0!==i.cfBust&&(i.cfBust=i.cfBust.shift(180,2*d)),i.placketEdgeWaist=new o(i.placketBottomEdge.x,i.waist.y),i.placketEdgeArmhole=new o(i.placketBottomEdge.x,i.armhole.y),i.placketEdgeHips=new o(i.placketBottomEdge.x,i.hips.y),s.seam.line(i.placketTopEdge).line(i.placketBottomEdge).close(),e&&s.saFromArmhole.line(i.placketTopEdge.shift(90,e)).line(i.placketTopEdge).move(i.placketBottomEdge).line(i.placketBottomEdge.shift(-90,3*e)).line(s.hemSa.start()),l&&(s.frontCenter=(new a).move(i.placketCfNeck).line(i.placketCfHem).attr("class","help"),p.separateButtonPlacket||s.frontCenter.addText("simon:matchHere","text-xs center"),s.placketInnerEdgeFold=(new a).move(i.placketTopInnerEdgeFold).line(i.placketBottomInnerEdgeFold).attr("class","dotted"),s.placketInnerEdgeOver=(new a).move(i.placketTopInnerEdgeOver).line(i.placketBottomInnerEdgeOver).attr("class","dotted"),s.placketInnerEdgeUnder=(new a).move(i.placketTopInnerEdgeUnder).line(i.placketBottomInnerEdgeUnder).attr("class","dotted"),s.placketOuterEdgeFold=(new a).move(i.placketTopOuterEdgeFold).line(i.placketBottomOuterEdgeFold).attr("class","dotted"),s.placketOuterEdgeOver=(new a).move(i.placketBottomOuterEdgeOver).line(i.placketTopOuterEdgeOver).attr("class","dotted"),s.placketOuterEdgeUnder=(new a).move(i.placketTopOuterEdgeUnder).line(i.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"],i.cfBust&&(r["cfBust-notch"]=new n("notch",i.cfBust)),dh(h,"placketCfNeck"),c("title",{at:i.title,nr:2,t
1itle:"frontLeft"});let m,u=0;for(const g of["placketTopOuterEdgeUnder","placketTopOuterEdgeFold","placketTopOuterEdgeOver","placketCfNeck","placketTopInnerEdgeOver","placketTopInnerEdgeFold","placketTopInnerEdgeUnder"])u+=15,c("hd",{id:`wAt${g}`,from:i.placketTopEdge,to:i[g],y:i.placketTopEdge.y-u-e});c("hd",{id:"wEdgeToHps",from:i.placketTopEdge,to:i.s3CollarSplit,y:i.placketTopEdge.y-u-e-15}),c("hd",{id:"wEdgeToShoulder",from:i.placketTopEdge,to:i.s3ArmholeSplit,y:i.placketTopEdge.y-u-e-30}),c("hd",{id:"wEdgeToArmhole",from:i.placketTopEdge,to:i.armhole,y:i.placketTopEdge.y-u-e-45}),i.button0=i.placketTopEdge;for(let g=0;g<p.buttons;g++)m=g+1,c("vd",{id:`hBetweenButtons${g}`,from:i["button"+m],to:i["button"+g],x:i.placketTopEdge.x-15});return c("vd",{id:"hPlacket",from:i.placketBottomEdge,to:i.placketTopEdge,x:i.placketTopEdge.x-30}),h})(t);throw`Unexpected buttonholePlacketStyle: ${o.buttonholePlacketStyle}`}};const zh={name:"simon.buttonPlacket",from:Gh,after:jh,draft:function({utils:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,complete:l,macro:c,options:p,store:h,part:d}){if(!p.separateButtonPlacket)return d.paths={},d.snippets={},d.points={},d;for(const g in s)"seam"!==g&&delete d.paths[g];let f=["cfBust-notch","cfArmhole-notch","cfWaist-notch","cfHem-notch"];for(const g in r)f.includes(g)||delete r[g];c("flip");const m=h.get("buttonPlacketWidth");let u;i.placketTopIn=t.lineIntersectsCurve(new o(m/-2,i.cfNeck.y+20),new o(m/-2,i.cfNeck.y-20),i.cfNeck,i.cfNeckCp1,i.neckCp2Front,i.neck),i.placketTopOut=i.cfNeck.shift(0,m/2),i.placketTopEdge=i.cfNeck.shift(0,1.5*m),i.placketBottomIn=i.cfHem.shift(180,m/2),i.placketBottomOut=i.cfHem.shift(0,m/2),i.placketBottomEdge=i.cfHem.shift(0,1.5*m),s.saBase=(new a).move(i.placketBottomIn).line(i.placketTopIn).join(s.seam.split(i.placketTopIn)[1]).line(i.placketTopEdge).line(i.placketBottomEdge),s.seam=s.saBase.clone().close().attr("class","fabric"),e&&(s.sa=s.saBase.offset(-1*e).line(new o(i.placketBottomEdge.x+e,i.placketBottomEdge.y+3*e)).line(new o(i.placketBottomIn.x-e,i.placketBottomIn.y+3*e)).close().attr("class","fabric sa")),l&&(s.placketOuterFold=(new a).move(i.placketTopOut).line(i.placketBottomOut).attr("class","dotted"),c("sprinkle",{snippet:"notch",on:["placketTopOut","placketBottomOut"]})),hh(d),i.grainlineFrom=i.placketBottomEdge.shift(180,m/2),i.grainlineTo=i.placketTopEdge.shift(180,m/2),c("grainline",{from:i.grainlineFrom,to:i.grainlineTo}),i.title=new o(i.placketTopOut.x,i.cfArmhole.y),c("title",{at:i.title,nr:"1b",title:"buttonPlacket",scale:.75,rotation:-90}),i.logo=i.title.shift(-90,120),r.logo=new n("logo",i.logo).attr("data-scale",.5).attr("data-rotate",-90),c("hd",{id:"wHalfPlacket",from:i.placketTopIn,to:i.placketTopOut,y:i.placketTopIn.y-15-e}),c("hd",{id:"wFull",from:i.placketTopIn,to:i.placketTopEdge,y:i.placketTopIn.y-30-e}),c("vd",{id:"hFull",from:i.placketBottomEdge,to:i.placketTopEdge,x:i.placketTopEdge.x+15+e}),i.button0=i.placketTopEdge;for(let g=0;g<p.buttons;g++)u=g+1,c("vd",{id:`hBetweenButtons${g}`,from:i["button"+u],to:i["button"+g],x:i.placketTopIn.x-15-e});return d}};const Jh={name:"simon.buttonholePlacket",from:Gh,after:jh,draft:function({utils:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,complete:l,macro:c,options:p,store:h,part:d}){if(!p.separateButtonholePlacket)return d.paths={},d.snippets={},d.points={},d;for(const b in s)delete d.paths[b];for(const b of["waist","armholePitch","hips","armhole","bust"])delete r[b+"-notch"];const f=h.get("buttonholePlacketWidth"),m=h.get("buttonholePlacketFoldWidth");i.topInnerEdge=t.lineIntersectsCurve(new o(i.cfNeck.x+2*m,i.cfNeck.y+20),new o(i.cfNeck.x+2*m,i.cfNeck.y-20),i.cfNeck,i.cfNeckCp1,i.neckCp2Front,i.neck),i.bottomInnerEdge=new o(i.topInnerEdge.x,i.cfHem.y),i.placketCfNeck=i.cfNeck.shift(180,2*m),i.placketTopInnerEdgeFold=i.placketCfNeck.shift(0,f/2),i.placketTopInnerEdgeOver=i.placketCfNeck.shift(0,f/2-m),i.placketTopInnerEdgeUnder=i.placketCfNeck.shift(0,f/2+m),i.placketTopOuterEdgeFold=i.placketCfNeck.shift(180,f/2),i.placketTopOuterEdgeOver=i.placketCfNeck.shift(180,f/2-m),i.placketTopOuterEdgeUnder=i.placketCfNeck.shift(180,f/2+m),i.placketCfHem=i.cfHem.shift(180,2*m),i.placketBottomInnerEdgeFold=i.placketCfHem.shift(0,f/2),i.placketBottomInnerEdgeOver=i.placketCfHem.shift(0,f/2-m),i.placketBottomInnerEdgeUnder=i.placketCfHem.shift(0,f/2+m),i.placketBottomOuterEdgeFold=i.placketCfHem.shift(180,f/2),i.placketBottomOuterEdgeOver=i.placketCfHem.shift(180,f/2-m),i.placketBottomOuterEdgeUnder=i.placketCfHem.shift(180,f/2+m),i.placketTopEdge=i.placketTopOuterEdgeFold.shift(180,f),i.placketBottomEdge=i.placketBottomOuterEdgeFold.shift(180,f),s.saBase=(new a).move(i.placketTopEdge).line(i.cfNeck).curve(i.cfNeckCp1,i.neckCp2Front,i.neck).split(i.topInnerEdge)[0].line(i.bottomInnerEdge),s.seam=s.saBase.clone().line(i.placketBottomEdge).close().attr("class","fabric"),e&&(s.sa=s.saBase.offset(-1*e),s.sa.line(new o(i.bottomInnerEdge.x+e,i.bottomInnerEdge.y+3*e)).line(new o(i.placketBottomEdge.x,i.placketBottomEdge.y+3*e)).line(i.placketBottomEdge).move(i.placketTopEdge).line(s.sa.start()).attr("class","fabric sa")),l&&(s.frontCenter=(new a).move(i.placketCfNeck).line(i.placketCfHem).attr("class","help"),s.placketInnerEdgeFold=(new a).move(i.placketTopInnerEdgeFold).line(i.placketBottomInnerEdgeFold).attr("class","dotted"),s.placketInnerEdgeOver=(new a).move(i.placketTopInnerEdgeOver).line(i.placketBottomInnerEdgeOver).attr("class","dotted"),s.placketOuterEdgeFold=(new a).move(i.placketTopOuterEdgeFold).line(i.placketBottomOuterEdgeFold).attr("class","dotted"),s.placketOuterEdgeOver=(new a).move(i.placketTopOuterEdgeOver).line(i.placketBottomOuterEdgeOver).attr("class","dotted"),s.placketOuterEdgeUnder=(new a).move(i.placketTopOuterEdgeUnder).line(i.placketBottomOuterEdgeUnder).attr("class","dotted")),r["cfArmhole-notch"].anchor.x=i.cfArmhole.x-2*m,r["cfWaist-notch"].anchor.x=i.cfArmhole.x-2*m,void 0!==r["cfBust-notch"]&&(r["cfBust-notch"].anchor.x=i.cfArmhole-2*m),void 0!==r["cfHem-notch"]&&(r["cfHem-notch"].anchor.x=i.cfArmhole.x-2*m),void 0!==r["cfHips-notch"]&&(r["cfHips-notch"].anchor.x=i.cfArmhole.x-2*m),dh(d,"placketCfNeck"),i.grainlineFrom=i.placketBottomEdge.shift(0,f/2),i.grainlineTo=i.placketTopEdge.shift(0,f/2),c("grainline",{from:i.grainlineFrom,to:i.grainlineTo}),i.title=new o(i.placketCfNeck.x,i.cfArmhole.y),c("title",{at:i.title,nr:"2b",title:"buttonholePlacket",scale:.75,rotation:-90}),i.logo=i.title.shift(-90,120),r.logo=new n("logo",i.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:i.placketBottomEdge,to:i[b],y:i.placketBottomEdge.y+g+3*e});i.button0=i.placketTopEdge;for(let b=0;b<p.buttons;b++)u=b+1,c("vd",{id:`hBetweenButtons${b}`,from:i["button"+u],to:i["button"+b],x:i.placketTopEdge.x-15});return c("vd",{id:"hFull",from:i.placketBottomEdge,to:i.placketTopEdge,x:i.placketTopEdge.x-30}),d}};const $h={name:"simon.yoke",from:jh,options:{splitYoke:{bool:!1,menu:"style"}}
1,draft:function({sa:t,Point:e,points:o,Path:i,paths:a,Snippet:s,snippets:n,macro:r,options:l,store:c,part:p}){for(const h in a)-1===["backCollar","backArmhole","backArmholeYoke"].indexOf(h)&&delete p.paths[h];return c.cutlist.setCut({cut:2,from:"fabric"}),a.saBase=(new i).move(o.cbYoke).line(o.armholeYokeSplitPreBoxpleat),l.yokeHeight>0&&(a.saBase=a.saBase.join(a.backArmholeYoke)),a.saBase=a.saBase.line(o.s3CollarSplit).join(a.backCollar),l.splitYoke?a.saBase=a.saBase.line(o.cbYoke).close():(r("mirror",{mirror:[o.cbNeck,o.cbYoke],paths:["saBase"],clone:!0}),a.saBase=a.saBase.join(a.mirroredSaBase.reverse()),a.mirroredSaBase.hide()),a.seam=a.saBase.clone(),a.saBase.hide(),a.seam=a.seam.close().attr("class","fabric"),t&&(a.sa=a.saBase.offset(t).attr("class","fabric sa"),l.splitYoke&&(a.sa=a.sa.line(o.cbNeck).move(o.cbYoke).line(a.sa.start()))),delete n.armholePitchNotch,delete n.collarNotch,delete n.shoulderNotch,n.sleevecapNotch=new s("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),n.logo=new s("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 Xh={name:"simon.sleeve",from:T,after:Gh,hide:s.V9.HIDE_TREE,options:{cuffOverlap:.15,cuffDrape:Ph,cuffEase:Rh,cuffLength:Fh,cuffStyle:Wh,sleeveLengthBonus:Oh,sleeveLengthShort:Dh,sleeveHemShort:Eh,sleevePlacketLength:Ih,sleeveStyle:Mh,libraryFitSleeve:!0},draft:function({measurements:t,sa:e,Point:o,points:i,Path:a,paths:s,complete:n,macro:r,options:l,snippets:c,Snippet:p,store:h,utils:d,part:f}){let m=0;for(const u in s)delete s[u];for(const u in c)delete c[u];if(s.sleevecap=(new a).move(i.bicepsRight)._curve(i.capQ1Cp1,i.capQ1).curve(i.capQ1Cp2,i.capQ2Cp1,i.capQ2).curve(i.capQ2Cp2,i.capQ3Cp1,i.capQ3).curve(i.capQ3Cp2,i.capQ4Cp1,i.capQ4).curve_(i.capQ4Cp2,i.bicepsLeft).hide(),i.top=new o(0,s.sleevecap.edge("top").y),"short"===l.sleeveStyle){const e=Math.max(t.shoulderToWrist*l.sleeveLengthShort,i.bicepsLeft.y-i.top.y,i.bicepsLeft.y-i.top.y+t.shoulderToWrist*l.sleeveHemShort);i.bottom=i.top.shift(-90,t.shoulderToWrist),i.shortSleeveHem=i.top.shift(-90,e),i.wristRightShort=i.bottom.shift(0,.6*t.wrist),i.wristLeftShort=i.wristRightShort.flipX();const o=Math.max(i.shortSleeveHem.y,i.bicepsLeft.y);i.wristLeft=d.beamIntersectsY(i.wristLeftShort,i.bicepsLeft,o),i.wristRight=d.beamIntersectsY(i.wristRightShort,i.bicepsRight,o),i.foldShortLeft=d.beamIntersectsY(i.wristLeftShort,i.bicepsLeft,o-t.shoulderToWrist*l.sleeveHemShort),i.foldShortRight=i.foldShortLeft.flipX(),i.foldShortLeft=i.foldShortLeft.flipY(i.wristLeft),i.foldShortRight=i.foldShortRight.flipY(i.wristRight),i.cuffMid=i.foldShortLeft.shiftFractionTowards(i.foldShortRight,.5),n&&(s.shortSleeveHemFold=(new a).move(i.wristLeft).line(i.wristRight).addClass("note help"))}else{const e=t.shoulderToWrist*(1+l.sleeveLengthBonus);i.bottom=i.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;i.wristRight=i.bottom.shift(0,r/2).shift(90,c),i.wristLeft=i.wristRight.flipX(),i.cuffMid=new o(0,i.wristLeft.y),i.cuffLeftMid=i.
1cuffMid.shiftFractionTowards(i.wristLeft,.5),i.cuffRightMid=i.cuffMid.shiftFractionTowards(i.wristRight,.5),i.cuffLeftCusp=i.cuffLeftMid.shift(90,r/50),i.cuffRightCusp=i.cuffRightMid.shift(-90,r/50),i.cuffLeftCuspCp1=i.cuffLeftCusp.shift(180,r/10),i.cuffLeftCuspCp2=i.cuffLeftCusp.shift(0,r/10),i.cuffRightCuspCp1=i.cuffRightCusp.shift(180,r/10),i.cuffRightCuspCp2=i.cuffRightCusp.shift(0,r/10);const p=l.cuffDrape*t.shoulderToWrist,h=.15*t.shoulderToWrist;if(p>0){const t=["cuffRightCuspCp1","cuffRightCusp","cuffRightCuspCp2","wristRight","cuffRightMid"],e=["cuffLeftCuspCp1","cuffLeftCusp","cuffLeftCuspCp2","wristLeft"];m=p>20?2:1;for(const o of t)i[o]=i[o].shift(0,p/(2*m));for(const o of e)i[o]=i[o].shift(180,p/(2*m));if(i.cuffPleat1Fold=i.cuffMid.shift(0,p/(2*m)),i.cuffPleat1Edge=i.cuffMid.shift(0,p/m),i.cuffMidTop=i.cuffMid.shift(90,h),i.cuffPleat1FoldTop=i.cuffPleat1Fold.shift(90,h),i.cuffPleat1EdgeTop=i.cuffPleat1Edge.shift(90,h),2===m){const o=["cuffRightCuspCp2","wristRight"],a=t.concat(e);for(const t of a)-1===o.indexOf(t)?i[t]=i[t].shift(180,p/4):i[t]=i[t].shift(0,p/4);i.cuffPleat2Fold=i.cuffRightCusp.shift(0,p/4),i.cuffPleat2Edge=i.cuffRightCusp.shift(0,p/2),i.cuffPleat2FoldTop=i.cuffPleat2Fold.shift(90,h),i.cuffPleat2EdgeTop=i.cuffPleat2Edge.shift(90,h),i.cuffPleat2Top=i.cuffRightCusp.shift(90,h)}}n&&(i.placketEnd=i.cuffLeftCusp.shift(90,l.sleevePlacketLength*t.shoulderToWrist),s.placketCut=(new a).move(i.cuffLeftCusp).line(i.placketEnd).attr("class","fabric"),m>0&&(s.pleats=(new a).move(i.cuffMid).line(i.cuffMidTop).move(i.cuffPleat1Fold).line(i.cuffPleat1FoldTop).move(i.cuffPleat1Edge).line(i.cuffPleat1EdgeTop),2===m&&s.pleats.move(i.cuffRightCusp).line(i.cuffPleat2Top).move(i.cuffPleat2Fold).line(i.cuffPleat2FoldTop).move(i.cuffPleat2Edge).line(i.cuffPleat2EdgeTop),s.pleats.attr("class","dotted")))}return s.frenchBase=(new a).move(i.wristRight).line(i.bicepsRight)._curve(i.capQ1Cp1,i.capQ1).curve(i.capQ1Cp2,i.capQ2Cp1,i.capQ2).curve(i.capQ2Cp2,i.capQ3Cp1,i.capQ3).curve(i.capQ3Cp2,i.capQ4Cp1,i.capQ4).curve_(i.capQ4Cp2,i.bicepsLeft),s.frenchBase.hide(),s.saBase=(new a).move(i.bicepsLeft).line(i.wristLeft),s.saBase.hide(),"short"===l.sleeveStyle?(s.cuffBase=(new a).move(i.wristLeft).line(i.foldShortLeft).line(i.foldShortRight),s.frenchBase=(new a).move(i.foldShortRight).join(s.frenchBase)):(s.cuffBase=(new a).move(i.wristLeft)._curve(i.cuffLeftCuspCp1,i.cuffLeftCusp),m>0&&s.cuffBase.curve_(i.cuffLeftCuspCp2,i.cuffMid).line(i.cuffPleat1Edge),s.cuffBase._curve(i.cuffRightCuspCp1,i.cuffRightCusp),2===m&&s.cuffBase.line(i.cuffPleat2Edge),s.cuffBase.curve_(i.cuffRightCuspCp2,i.wristRight),s.cuffBase.hide()),s.seam=s.frenchBase.clone().line(i.wristLeft).join(s.cuffBase).attr("class","fabric"),e&&(s.sa=s.frenchBase.offset(e*l.ffsa),s.frenchSa=s.sa.clone().attr("class","hidden"),s.sa=s.sa.join(s.saBase.offset(e)).join(s.cuffBase.offset(e)).close().attr("class","fabric sa"),r("banner",{path:s.frenchSa.reverse(),text:"simon:flatFelledSeamAllowance",repeat:30,classes:"text-sm fill-note center",dy:7})),c.backNotch=new p("bnotch",i.backNotch),c.frontNotch=new p("notch",i.frontNotch),r("title",{at:i.centerBiceps,nr:5,title:"sleeve"}),r("grainline",{from:i.cuffMid,to:new o(i.cuffMid.x,i.sleeveTip.y)}),r("hd",{id:"wCenterToBackNotch",from:i.backNotch,to:i.sleeveTip,y:i.sleeveTip.y-15-e*l.ffsa}),r("hd",{id:"wCenterToFrontNotch",from:i.sleeveTip,to:i.frontNotch,y:i.sleeveTip.y-15-e*l.ffsa}),r("hd",{id:"wFrontHalf",from:i.bicepsLeft,to:i.sleeveTip,y:i.sleeveTip.y-30-e*l.ffsa}),r("hd",{id:"wBackHalf",from:i.sleeveTip,to:i.bicepsRight,y:i.sleeveTip.y-30-e*l.ffsa}),r("hd",{id:"wFull",from:i.bicepsLeft,to:i.bicepsRight,y:i.sleeveTip.y-45-e*l.ffsa}),r("pd",{id:"lSleevecap",path:(new a).move(i.bicepsRight)._curve(i.capQ1Cp1,i.capQ1).curve(i.capQ1Cp2,i.capQ2Cp1,i.capQ2).curve(i.capQ2Cp2,i.capQ3Cp1,i.capQ3).curve(i.capQ3Cp2,i.capQ4Cp1,i.capQ4).curve_(i.capQ4Cp2,i.bicepsLeft).reverse(),d:15}),r("vd",{id:"hCuffToSleevecap",from:i.wristRight,to:i.bicepsRight,x:i.bicepsRight.x+15+e*l.ffsa}),r("vd",{id:"hSleevecapToFrontNotch",from:i.bicepsRight,to:i.frontNotch,x:i.bicepsRight.x+15+e*l.ffsa}),r("vd",{id:"hSleevecapToBackNotch",from:i.bicepsLeft,to:i.backNotch,x:i.bicepsLeft.x-15-e}),r("vd",{id:"hSleevecap",from:i.bicepsRight,to:i.sleeveTip,x:i.bicepsRight.x+30+e*l.ffsa}),r("hd",{id:"wCuff",from:i.wristLeft,to:i.wristRight,y:i.wristLeft.y+1
15+("short"===l.sleeveStyle?0:e)}),"short"===l.sleeveStyle?(r("hd",{id:"hFold",from:i.foldShortLeft,to:i.foldShortRight,y:i.foldShortLeft.y+15+e}),r("vd",{id:"vFold",from:i.foldShortLeft,to:i.wristLeft,x:i.foldShortLeft.x-15-e})):(n&&r("vd",{id:"hCut",from:i.cuffLeftCusp,to:i.placketEnd,x:i.placketEnd.x-15}),m>0&&r("hd",{id:"wPleat",from:i.cuffMidTop,to:i.cuffPleat1EdgeTop,y:i.cuffMidTop.y-15}),2===m&&r("hd",{id:"wPleat2",from:i.cuffPleat2Top,to:i.cuffPleat2EdgeTop,y:i.cuffPleat2Top.y-15})),f}};const Qh={name:"simon.collarStand",after:jh,options:{collarEase:Sh,collarStandBend:{deg:3,min:0,max:5,menu:"style.collar"},collarStandCurve:{deg:2,min:0,max:5,menu:"style.collar"},collarStandWidth:Lh},draft:function({measurements:t,store:e,sa:o,Point:i,points:a,Path:s,paths:n,Snippet:r,snippets:l,complete:c,macro:p,options:h,part:d}){const f=function(o=1){const n=t.neck*(1+h.collarEase)*o,r=e.get("collarStandWidth"),l=n/2,c=-1*h.collarStandBend,p=h.collarStandCurve-h.collarStandBend,d=90+(c+p)/2;return a.center=new i(0,0),a.hinge=a.center.shift(c,.7*l),a.rightCf=a.hinge.shift(p,.3*l),a.topMid=a.center.shift(90,r/2),a.bottomMid=a.topMid.flipY(),a.rightTopHinge=a.hinge.shift(d,r/2),a.rightBottomHinge=a.hinge.shift(180+d,r/2),a.rightTopCf=a.rightCf.shift(p+90,r/2),a.rightBottomCf=a.rightCf.shift(p-90,r/2),a.rightBottomEdge=a.rightBottomCf.shift(p,e.get("buttonholePlacketWidth")/2),a.bottomMidCp2=a.bottomMid.shift(0,.2*l),a.rightBottomHingeCp1=a.rightBottomHinge.shift(90+d,.2*l),a.rightBottomHingeCp2=a.rightBottomHinge.shift(d-90,.1*l),a.rightBottomCfCp1=a.rightBottomCf.shift(180+p,.1*l),a.rightBottomEdgeCp2=a.rightBottomCf.rotate(-90,a.rightBottomEdge),a.rightTopCfCp1=a.rightTopCf.shift(p,e.get("buttonholePlacketWidth")/2),a.topMidCp1=a.topMid.shift(0,.2*l),a.rightTopHingeCp2=a.rightTopHinge.shift(90+d,.2*l),a.rightTopHingeCp1=a.rightTopHinge.shift(d-90,.1*l),a.topEdgeCp1=a.rightTopCf.rotate(-90,a.rightBottomEdge),a.rightTopCfCp2=a.rightTopCf.shift(180+p,e.get("buttonholePlacketWidth")/2),a.leftCf=a.rightCf.flipX(),a.topMidCp2=a.topMidCp1.flipX(),a.leftTopHingeCp1=a.rightTopHingeCp2.flipX(),a.leftTopHinge=a.rightTopHinge.flipX(),a.leftTopHingeCp2=a.rightTopHingeCp1.flipX(),a.leftTopCfCp1=a.rightTopCfCp2.flipX(),a.leftTopCf=a.rightTopCf.flipX(),a.leftBottomCf=a.rightBottomCf.flipX(),a.leftBottomEdge=a.leftBottomCf.shift(c+180,e.get("buttonPlacketWidth")/2),a.leftTopCfCp2=a.leftTopCf.shift(c+180,e.get("buttonPlacketWidth")/2),a.leftBottomEdgeCp1=a.leftBottomCf.rotate(90,a.leftBottomEdge),a.leftBottomCfCp2=a.rightBottomCfCp1.flipX(),a.leftBottomHingeCp1=a.rightBottomHingeCp2.flipX(),a.leftBottomHinge=a.rightBottomHinge.flipX(),a.leftBottomHingeCp2=a.rightBottomHingeCp1.flipX(),a.bottomMidCp1=a.bottomMidCp2.flipX(),2*(new s).move(a.leftBottomCf).curve(a.leftBottomCfCp2,a.leftBottomHingeCp1,a.leftBottomHinge).curve(a.leftBottomHingeCp2,a.bottomMidCp1,a.bottomMid).length()-t.neck*(1+h.collarEase)};let m,u,g;u=1,g=1;do{m=f(u),u*=1-m/1e3,g++}while(Math.abs(m)>1&&g<20);n.seam=(new s).move(a.bottomMid).curve(a.bottomMidCp2,a.rightBottomHingeCp1,a.rightBottomHinge).curve(a.rightBottomHingeCp2,a.rightBottomCfCp1,a.rightBottomCf).line(a.rightBottomEdge).curve(a.rightBottomEdgeCp2,a.rightTopCfCp1,a.rightTopCf).curve(a.rightTopCfCp2,a.rightTopHingeCp1,a.rightTopHinge).curve(a.rightTopHingeCp2,a.topMidCp1,a.topMid).curve(a.topMidCp2,a.leftTopHingeCp1,a.leftTopHinge).curve(a.leftTopHingeCp2,a.leftTopCfCp1,a.leftTopCf).curve(a.leftTopCfCp2,a.leftBottomEdgeCp1,a.leftBottomEdge).line(a.leftBottomCf).curve(a.leftBottomCfCp2,a.leftBottomHingeCp1,a.leftBottomHinge).curve(a.leftBottomHingeCp2,a.bottomMidCp1,a.bottomMid).close().attr("class","fabric"),o&&(n.sa=n.seam.offset(o).attr("class","fabric sa")),c&&(n.help=(new s).move(a.rightTopCf).line(a.rightBottomCf).move(a.topMid).line(a.bottomMid).move(a.leftTopCf).line(a.leftBottomCf).attr("class","dotted")),e.cutlist.setCut([{cut:2,from:"fabric"},{cut:2,from:"interfacing"}]),p("grainline",{from:a.leftCf,to:a.rightCf}),a.title=a.center.shift(0,20),p("title",{at:a.title,nr:6,title:"collarStand",scale:.6}),p("sprinkle",{snippet:"notch",on:["rightTopCf","rightBottomCf","leftBottomCf","leftTopCf","rightBottomEdge","leftBottomEdge"]}),l.button=new r("button",a.leftCf);const b=h.collarStandCurve-h.collarStandBend-180;return a.buttonhole=a.rightCf.shift(b,3),l.buttonhole=new r("buttonhole",a.buttonhole).attr("data-rotate",90-b),p("hd",{id:"wCbToNotchRight",from:a.topMid,to:a.rightTopCf,y:a.topMid.y-15-o}),p("hd",{id:"wCbToNotchLeft",from:a.leftTopCf,to:a.topMid,y:a.topMid.y-15-o}),p("hd",{id:"wCbToEdgeRight",from:a.topMid,to:a.rightBottomEdge,y:a.topMid.y-30-o}),p("hd",{id:"wCbToEdgeLeft",from:a.leftBottomEdge,to:a.topMid,y:a.topMid.y-30-o}),p("pd",{id:"lBottomFit",path:(new s).move(a.leftBottomCf).curve(a.leftBottomCfCp2,a.leftBottomHingeCp1,a.leftBottomHinge).curve(a.leftBottomHingeCp2,a.bottomMidCp1,a.bottomMid).curve(a.bottomMidCp2,a.rightBottomHingeCp1,a.r
1ightBottomHinge).curve(a.rightBottomHingeCp2,a.rightBottomCfCp1,a.rightBottomCf),d:15+o}),p("ld",{id:"lLeftNotchToEdge",from:a.leftBottomEdge,to:a.leftBottomCf,d:-30-o}),p("ld",{id:"lRightNotchToEdge",from:a.rightBottomCf,to:a.rightBottomEdge,d:-30-o}),p("ld",{id:"hStand",from:a.rightBottomCf,to:a.rightTopCf,d:-15-o-e.get("buttonholePlacketWidth")/2}),p("vd",{id:"hFull",from:a.rightBottomCf,to:a.topMid,x:a.rightBottomEdge.x+30+o}),d}};const Kh={name:"simon.collar",after:jh,options:{collarEase:Sh,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:i,Point:a,points:s,Path:n,paths:r,complete:l,macro:c,options:p,part:h}){const d=function(i=1){const r=e.neck*(1+p.collarEase-p.collarGap)*i,l=t.get("collarStandWidth")*p.collarWidth*(1+p.collarRoll);return s.topMid=new a(0,0),s.bottomMid=new a(0,l),s.bottomMidCp1=s.bottomMid.shift(0,.35*r),s.rightBottomEdge=new a(r/2,l+r*p.collarBend),s.rightTopHinge=s.topMid.shift(0,.25*r),s.rightTopEdgeDirection=s.rightTopHinge.shift(p.collarFlare,10),s.rightBottomEdgeDirection=s.rightBottomEdge.shift(p.collarAngle,10),s.rightTopEdge=o.beamsIntersect(s.rightTopHinge,s.rightTopEdgeDirection,s.rightBottomEdge,s.rightBottomEdgeDirection),s.rightTopHingeCp1=s.rightTopHinge.shift(0,.1*r),s.leftTopHinge=s.rightTopHinge.flipX(),s.bottomMidCp2=s.bottomMidCp1.flipX(),s.leftTopHingeCp2=s.rightTopHingeCp1.flipX(),s.leftTopEdge=s.rightTopEdge.flipX(),s.leftBottomEdge=s.rightBottomEdge.flipX(),2*(new n).move(s.leftBottomEdge)._curve(s.bottomMidCp2,s.bottomMid).length()-e.neck*(1+p.collarEase-p.collarGap)};let f,m,u;m=1,u=1;do{f=d(m),m*=1-f/1e3,u++}while(Math.abs(f)>1&&u<20);r.seam=(new n).move(s.bottomMid).curve_(s.bottomMidCp1,s.rightBottomEdge).line(s.rightTopEdge)._curve(s.rightTopHingeCp1,s.rightTopHinge).line(s.topMid).line(s.leftTopHinge).curve_(s.leftTopHingeCp2,s.leftTopEdge).line(s.leftBottomEdge)._curve(s.bottomMidCp2,s.bottomMid).close().attr("class","fabric");const g=s.topMid.dist(s.bottomMid)*p.collarRoll;s.ucTopMid=s.topMid.shift(-90,g),s.ucRightTopHinge=s.rightTopHinge.shift(-90,g),s.ucRightTopHingeCp1=s.rightTopHingeCp1.shift(-90,g),s.ucLeftTopHinge=s.ucRightTopHinge.flipX(),s.ucLeftTopHingeCp2=s.ucRightTopHingeCp1.flipX(),r.underCollar=(new n).move(s.rightTopEdge)._curve(s.ucRightTopHingeCp1,s.ucRightTopHinge).line(s.ucLeftTopHinge).curve_(s.ucLeftTopHingeCp2,s.leftTopEdge).attr("class","fabric dashed"),l&&(r.help=(new n).move(s.topMid).line(s.bottomMid).attr("class","dotted")),i&&(r.sa=r.seam.offset(i).attr("class","fabric sa"),r.saUndercollar=r.underCollar.offset(i).attr("class","dotted")),t.cutlist.setCut([{cut:1,from:"fabric"},{cut:1,from:"fabric"},{cut:1,from:"interfacing"},{cut:1,from:"interfacing"}]);const b=(s.bottomMid.y-s.ucTopMid.y)/2;return c("grainline",{from:new a(s.bottomMidCp2.x,b),to:new a(s.bottomMidCp1.x,b)}),s.title=new a(20,s.bottomMid.y/2),c("title",{at:s.title,nr:"7 + 8",title:"collarAndUndercollar",scale:.6,append:!0}),c("banner",{path:(new n).move(s.leftBottomEdge)._curve(s.bottomMidCp2,s.bottomMid).curve_(s.bottomMidCp1,s.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:s.bottomMid,to:s.topMid,x:s.rightTopEdge.x+15+i}),c("vd",{id:"hCbBottomToTop",from:s.bottomMid,to:s.rightTopEdge,x:s.rightTopEdge.x+30+i}),c("vd",{id:"hBottomToCbTop",from:s.rightBottomEdge,to:s.topMid,x:s.rightTopEdge.x+45+i}),c("vd",{id:"hFull",from:s.rightBottomEdge,to:s.rightTopEdge,x:s.rightTopEdge.x+60+i}),c("hd",{id:"wBetweenHinges",from:s.leftTopHinge,to:s.rightTopHinge,y:s.leftTopEdge.y-15-i}),c("hd",{id:"wFullTop",from:s.leftTopEdge,to:s.rightTopEdge,y:s.leftTopEdge.y-30-i}),c("hd",{id:"wFullBottom",from:s.leftBottomEdge,to:s.rightBottomEdge,y:s.leftBottomEdge.y+15+i}),h}};const Vh={name:"simon.sleevePlacketUnderlap",after:jh,options:{sleevePlacketLength:Ih},draft:function({measurements:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,complete:l,macro:c,options:p,store:h,part:d}){if("short"===p.sleeveStyle)return d.hide();const f=Math.min(h.get("sleevePlacketWidth")/2,10),m=t.shoulderToWrist*p.sleevePlacketLength;return i.midLeft=new o(0,0),i.midRight=i.midLeft.shift(0,m),i.fold1Left=i.midLeft.shift(90,f),i.fold2Left=i.midLeft.shift(-90,f),i.fold1Right=i.fold1Left.shift(0,m),i.fold2Right=i.fold2Left.shift(0,m),i.topLeft=i.midLeft.shift(90,2*f-1.5),i.topRight=i.midRight.shift(90,2*f-1.5),i.bottomLeft=i.midLeft.shift(-90,2*f-1.5),i.bottomRight=i.midRight.shift(-90,2*f-1.5),s.seam=(new a).move(i.topLeft).line(i.topRight).line(i.bottomRight).line(i.bottomLeft).close().attr("class","fabric"),l&&(s.folds=(new a).move(i.fold1Left).line(i.fold1Right).move(i.fold2Left).line(i.fold2Right).move(i.midLeft).line(i.midRight).attr("class","help")),e&&(s.sa=(new a).move(i.bottomLeft).line(i.bottomLeft.shift(180,e)).line(i.topLeft.shift(180,e)).line(i.topLeft).addClass("fabric sa")),h.cutlist.setCut({cut:2,from:"fabric"}),i.title=new o(m/8,0),c("title",{at:i.title,nr:9,title:"sleevePlacketUnderlap",scale:.5,append:!0}),i.button=new o(m/2,f/2),r.button=new n("button",i.button),c("vd",{id:"wBetweenFolds",from:i.fold2Right,to:i.fold1Right,x:i.topRight.x+15}),c("vd",{id:"hFull",from:i.bottomRight,to:i.topRight,x:i.topRight.x+30}),l&&c("hd",{id:"wToButton",from:i.bottomLeft,to:i.button,y:i.bottomRight.y+15}),c("hd",{id:"wFull",from:i.bottomLeft,to:i.bottomRight,y:i.bottomRight.y+30}),d}};const qh={name:"simon.sleevePlacketOverlap",after:jh,options:{sleevePlacketLength:Ih},draft:function({measurements:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,complete:l,macro:c,options:p,store:h,part:d}){if("short"===p.sleeveStyle)return d.hide();const f=h.get("sleevePlacketWidth"),m=t.shoulderToWrist*p.sleevePlacketLength;return i.midLeft=new o(0,0),i.midLen=i.midLeft.shift(0,m),i.midRight=i.midLeft.shift(0,m
1+1.25*f),i.fold1Left=i.midLeft.shift(90,f/2),i.fold2Left=i.midLeft.shift(-90,f/2),i.boxTopRight=i.midRight.shift(90,f/2),i.boxBottomRight=i.midRight.shift(-90,f/2),i.boxTopLeft=i.fold1Left.shift(0,m-.25*f),i.boxBottomLeft=i.fold2Left.shift(0,m-.25*f),i.boxTip=i.midLen.shift(0,1.5*f),i.fold1Right=i.boxTopRight.shift(0,.5*f),i.fold2Right=i.boxBottomRight.shift(0,.5*f),i.topLeft=i.fold1Left.shift(90,f/2-1.5),i.topRight=i.fold1Right.shift(90,f/2-1.5),i.bottomRight=i.fold2Right.shift(-90,1.5*f-1.5),i.bottomLeft=i.fold2Left.shift(-90,1.5*f-1.5),i.fold3Left=new o(0,1.5*f),i.fold3Right=new o(m,1.5*f),i.cutBottom=new o(m,i.bottomLeft.y),i.cutLeft=i.fold3Right.shift(90,.1*f+1.5),i.cutRight=i.fold2Right.shift(-90,f/2-1.5),i.zig=i.cutRight.shift(180,.6*f),i.zag=new o(i.bottomRight.x-f,i.cutLeft.y),s.seam=(new a).move(i.topLeft).line(i.topRight).line(i.cutRight).line(i.zig).line(i.zag).line(i.cutLeft).line(i.cutBottom).line(i.bottomLeft).close().attr("class","fabric"),l&&(s.outline=(new a).move(i.fold1Left).line(i.boxTopRight).line(i.boxTip).line(i.boxBottomRight).line(i.fold2Left).move(i.boxTopLeft).line(i.boxBottomLeft).attr("class","dashed"),s.folds=(new a).move(i.fold3Left).line(i.fold3Right).move(i.boxBottomRight).line(i.fold2Right).line(i.boxTip).line(i.fold1Right).line(i.boxTopRight).attr("class","dotted")),e&&(s.sa=(new a).move(i.bottomLeft).line(i.bottomLeft.shift(180,e)).line(i.topLeft.shift(180,e)).line(i.topLeft).attr("class","fabric sa")),h.cutlist.setCut({cut:2,from:"fabric"}),i.title=new o(m/4,0),c("title",{at:i.title,nr:10,title:"sleevePlacketOverlap",scale:.6}),i.buttonhole=new o(m/2,0),r.buttonhole=new n("buttonhole",i.buttonhole).attr("data-rotate",90),c("hd",{id:"wToZig1",from:i.bottomLeft,to:i.cutBottom,y:i.bottomLeft.y+15}),c("hd",{id:"wToZig2",from:i.bottomLeft,to:i.zag,y:i.bottomLeft.y+30}),c("hd",{id:"wToZag2",from:i.bottomLeft,to:i.zig,y:i.bottomLeft.y+45}),c("hd",{id:"wFull",from:i.bottomLeft,to:i.cutRight,y:i.bottomLeft.y+60}),c("vd",{id:"hTopFold",from:i.fold1Right,to:i.topRight,x:i.topRight.x+15}),c("vd",{from:i.boxTip,id:"hTopToMiddle",to:i.topRight,x:i.topRight.x+30}),c("vd",{id:"hTopToEdge",from:i.fold2Right,to:i.topRight,x:i.topRight.x+45}),c("vd",{id:"hTopToZag2",from:i.cutRight,to:i.topRight,x:i.topRight.x+60}),c("vd",{id:"hToZig2",from:i.zag,to:i.topRight,x:i.topRight.x+75}),c("vd",{id:"hFull",from:i.cutBottom,to:i.topRight,x:i.topRight.x+90}),c("hd",{id:"wToBox",from:i.topLeft,to:i.boxTopLeft,y:i.topLeft.y-15}),c("hd",{id:"wToTipStart",from:i.topLeft,to:i.boxTopRight,y:i.topLeft.y-30}),d}},Zh={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:Ph,cuffEase:Rh,cuffLength:Fh,cuffStyle:Wh,sleeveStyle:Mh},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:i,Path:a,paths:s,macro:n,part:r})=>{fh(r);const l=t.get("cuffHeight"),c={topLeftRound:n("round",{id:"topLeftRound",from:i.topRight,to:i.bottomLeft,via:i.topLeft,radius:l/3}),topRightRound:n("round",{id:"topRightRound",from:i.bottomRight,to:i.topLeft,via:i.topRight,radius:l/3})};for(const p in c)for(const t of["start","cp1","cp2","end"])i[`${p}${o.capitalize(t)}`]=i[c[p].points[t]].copy();return i.leftAngleBottom=i.topLeft.shift(-90,l/3),i.rightAngleTop=i.topRight.shift(180,l/3),i.rightAngleBottom=i.topRight.shift(-90,l/3),s.seam=(new a).move(i.topLeftRoundEnd).line(i.bottomLeft).line(i.bottomRight).line(i.topRightRoundStart).curve(i.topRightRoundCp1,i.topRightRoundCp2,i.topRightRoundEnd).line(i.topLeftRoundStart).curve(i.topLeftRoundCp1,i.topLeftRoundCp2,i.topLeftRoundEnd).close().attr("class","fabric"),e&&(s.sa=s.seam.offset(e).attr("class","fabric sa")),t.cutlist.setCut({cut:4,from:"fabric"}),mh(r),bh(r),n("vd",{id:"hRound",from:i.topRightRoundStart,to:i.topRightRoundEnd,x:i.topRightRoundStart.x+15+e}),r})(t);case"straightBarrelCuff":return(({sa:t,points:e,Path:o,paths:i,part:a})=>(fh(a),i.seam=(new o).move(e.topLeft).line(e.bottomLeft).line(e.bottomRight).line(e.topRight).line(e.topLeft).close().attr("class","fabric"),t&&(i.sa=i.seam.offset(t).attr("class","fabric sa")),mh(a),bh(a),a))(t);case"roundedFrenchCuff":return(({store:t,sa:e,points:o,Path:i,paths:a,complete:s,utils:n,macro:r,part:l})=>{uh(l);const c=t.get("cuffHeight"),p={topLeft:r("round",{id:"topLeft",from:o.topRight,to:o.bottomLeft,via:o.topLeft,radiu
1s: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 h in p)for(const t of["start","cp1","cp2","end"])o[`${h}${n.capitalize(t)}`]=o[p[h].points[t]].copy();return a.seam=(new i).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"),s&&(a.fold=(new i).move(o.midLeft).line(o.midRight).attr("class","dotted")),e&&(a.sa=a.seam.offset(e).attr("class","fabric sa")),gh(l),kh(l),l})(t);case"angledFrenchCuff":return(({store:t,sa:e,points:o,Path:i,paths:a,part:s})=>{uh(s);const n=t.get("cuffHeight");return o.leftAngleTopTop=o.topLeft.shift(0,n/3),o.leftAngleTopBottom=o.topLeft.shift(-90,n/3),o.rightAngleTopTop=o.topRight.shift(180,n/3),o.rightAngleTopBottom=o.topRight.shift(-90,n/3),o.leftAngleBottomTop=o.bottomLeft.shift(90,n/3),o.leftAngleBottomBottom=o.bottomLeft.shift(0,n/3),o.rightAngleBottomTop=o.bottomRight.shift(90,n/3),o.rightAngleBottomBottom=o.bottomRight.shift(180,n/3),a.seam=(new i).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"),a.fold=(new i).move(o.midLeft).line(o.midRight).attr("class","dotted"),e&&(a.sa=a.seam.offset(e).attr("class","fabric sa")),gh(s),kh(s),s})(t);case"straightFrenchCuff":return(({sa:t,points:e,Path:o,paths:i,complete:a,part:s})=>(uh(s),i.seam=(new o).move(e.topLeft).line(e.bottomLeft).line(e.bottomRight).line(e.topRight).line(e.topLeft).close().attr("class","fabric"),a&&(i.fold=(new o).move(e.midLeft).line(e.midRight).attr("class","dotted")),t&&(i.sa=i.seam.offset(t).attr("class","fabric sa")),gh(s),kh(s),s))(t);default:return(({store:t,sa:e,points:o,Path:i,paths:a,macro:s,part:n})=>{fh(n);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),a.seam=(new i).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&&(a.sa=a.seam.offset(e).attr("class","fabric sa")),mh(n),bh(n),s("vd",{id:"hFull",from:o.rightAngleBottom,to:o.rightAngleTop,x:o.rightAngleBottom.x+15+e}),n})(t)}}},td=new s.pT({data:lh,parts:[jh,Jh,zh,Kh,Qh,Zh,Gh,Yh,Uh,Xh,qh,Vh,$h]}),ed=(0,s.D4)([_,ch]),od=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}'),id={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 ad={name:"simone.fbaFront",from:Gh,measurements:["highBust","bustSpan","hpsToBust"],hide:{self:!0,from:!0,inherited:!1},plugins:[O],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:i,paths:a,macro:s,options:n,Snippet:r,snippets:l,utils:c,sa:p,log:h,part:d}){o.bust=new e(t.bustSpan/2,o.neck.y+t.hpsToBust),o.cfBust=new e(0,o.bust.y);const f=(1+n.chestEase)*(t.bust-t.highBust)/2;if(f<0)return h.info("No FBA required, using unaltered Simon front"),d;let m=o.armholePitch.dist(o.bust),u=o.bust.dx(o.armholePitch)/m*-1,g=(o.bust.dx(o.armholePitch)-f)/m*-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*n.bustDartAngle,t.bust/3);const k=()=>c.lineIntersectsCurve(o.bust,o._dartDirection,o.waist,o.waistCp2,o.armhole,o.armhole);let w=k();w||(o._dartDirection=(new i).move(o.waist).curve_(o.waistCp2,o.armhole).shiftFractionAlong(.5),w=k()),o.bustSideCut1=w,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 i).move(o.waist_rot1).curve_(o.waistCp2_rot1,o.armhole_rot1).split(o.bustSideCut1_rot1);a.fbaAboveDart=v.pop(),a.fbaBelowDart=v.pop(),a.fbaAboveDart.hide(),a.fbaBelowDart.hide(),o.belowDartCpTop_rot1=a.fbaBelowDart.ops[1].cp2,o.belowDartCpBottom_rot1=a.fbaBelowDart.ops[1].cp1,o.aboveDartCpBottom_rot1=a.fbaAboveDart.ops[1].cp1;const T=["bust","bustSideCut1","bustWaist","bustHem","hem","hips","hipsCp2","waistCp1","waist","waistCp2","armhole","armholeCp2","armholeHollowCp1","armholeHollow","armholeHollowCp2","armholePitchCp1","belowDartCpTop","belowDartCpBottom"];for(let B of T)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,n.bustDartLength),n.frontDarts){let t=
1o.waist.dx(o.waist_rot2);o.frontDartTip=o.bustWaist_rot2.shiftFractionTowards(o.bust_rot2,n.frontDartLength),o.frontDartRight=new e(o.frontDartTip.x+t/2,o.hem_rot2.y-o.frontDartTip.dy(o.hem_rot2)*n.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),a.frontDart=(new i).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)*n.contour,e=o.hips.dx(o.hips_rot2);for(let i of["waist_rot2","waistCp1_rot2","belowDartCpBottom_rot2"])o[i]=o[i].shift(180,t);for(let i of["hipsCp2_rot2","hips_rot2","hem_rot2"])o[i]=o[i].shift(180,e)}let y=["armhole","armholeCp2","armholeHollowCp1","armholeHollow","armholeHollowCp2","armholePitchCp1"];for(let B of y)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)),a.frontArmhole.ops[0].to.x=o.armholePitch.x,a.frontArmhole.ops[0].to.y=o.armholePitch.y,a.dart=(new i).move(o.dartBottom).line(o.bustDartTip).line(o.dartTop),a.saBaseFromHips=(new i).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),a.saBaseFromArmhole=(new i).move(o.armhole).curve(o.armholeCp2,o.armholeHollowCp1,o.armholeHollow).curve(o.armholeHollowCp2,o.armholePitchCp1,o.armholePitch).join(a.frontArmhole).line(o.s3CollarSplit).join(a.frontCollar),n.hemStyle){case"baseball":o.bballStart=o.cfHem.shiftFractionTowards(o.hem,.5),n.frontDarts&&o.bballStart.x>o.frontDartRight.x&&(o.bballStart.x=o.frontDartRight.x),o.bballEnd=o.hem.shiftFractionTowards(o.hips,n.hemCurve),o.bballCp1=o.bballStart.shiftFractionTowards(o.hem,.5),o.bballCp2=new e(o.bballCp1.x,o.bballEnd.y),a.saBase=(new i).move(o.bballEnd).line(o.hips).join(a.saBaseFromHips),a.hemBase=(new i).move(o.cfHem).line(o.bballStart).curve(o.bballCp1,o.bballCp2,o.bballEnd);break;case"slashed":s("round",{from:o.hips,to:o.cfHem,via:o.hem,radius:o.hips.dist(o.hem)*n.hemCurve,prefix:"slash"}),a.saBase=(new i).move(o.hips).join(a.saBaseFromHips),a.hemBase=(new i).move(o.cfHem).line(o.slashEnd).curve(o.slashCp2,o.slashCp1,o.slashStart);break;default:a.saBase=(new i).move(o.hem).line(o.hips).join(a.saBaseFromHips),a.hemBase=(new i).move(o.cfHem).line(o.hem)}a.seam=a.hemBase.join(a.saBase).join(a.saBaseFromArmhole).attr("class","fabric"),a.saBaseFromHips.hide(),a.saBaseFromArmhole.hide(),a.saBase.hide(),p&&(a.ffsa=a.saBase.offset(p*n.ffsa).attr("class","fabric sa"),a.saFromArmhole=a.saBaseFromArmhole.offset(p).attr("class","fabric sa"),a.hemSa=a.hemBase.offset(3*p).attr("class","fabric sa"),a.saConnect=(new i).move(a.hemSa.end()).line(a.ffsa.start()).move(a.ffsa.end()).line(a.saFromArmhole.start()).attr("class","fabric sa"),delete a.sa);for(let B in l)delete l[B];return s("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),d}},sd={...Jh,from:ad},nd={...zh,from:ad},rd={...Yh,from:ad},ld={...Uh,from:ad},cd=new s.pT({data:od,parts:[ad,jh,Kh,Qh,Zh,Xh,qh,Vh,$h,sd,nd,rd,ld]}),pd=(0,s.D4)([ed,id]),hd=JSON.parse('{"id":"skully","name":"Skully the FreeSewing mascot","code":"Wouter Van Wageningen","de
1scription":"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}'),dd={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:i,paths:a,Snippet:s,snippets:n,measurements:r,sa:l,complete:c,store:p,macro:h,part:d})=>{const f="text-xs center",m=("head"in r?r.head:596)/929.5*t.size*2;p.set("sizeFactor",m),i.point0=new e(0,0),i.point1=i.point0.shift(254.78244159705943,22.5254232590644*m),i.point1Cp1=i.point1.shift(321.2022157426192,7.140882368447221*m),i.point2=i.point0.shift(260.1018837009255,44.64105174612264*m),i.point2Cp1=i.point2.shift(243.25309471936828,16.615062563830442*m),i.point2Cp2=i.point2.shift(322.6411575424251,21.283352555459906*m),i.point3=i.point0.shift(261.38174456728586,76.35866165668438*m),i.point3Cp1=i.point3.shift(333.3176703576494,12.168666812761435*m),i.point3Cp2=i.point3.shift(85.91520774712568,11.731692674119953*m),i.point4=i.point0.shift(299.45265842618784,86.78060596475459*m),i.point4Cp1=i.point4.shift(84.35380802294482,49.11521286943584*m),i.point4Cp2=i.point4.shift(184.39630340760462,19.40463369919666*m),i.point5=i.point0.shift(342.8506386745285,121.04758752176764*m),i.point5Cp1=i.point5.shift(137.52316754335672,29.889370057597382*m),i.point5Cp2=i.point5.shift(196.75764739545923,56.96390931984925*m),i.point6=i.point0.shift(1.1205493505415198,54.26948752485138*m),i.point6Cp2=i.point6.shift(316.18924774003017,44.726876316259826*m),i.point7=i.point0.shift(357.37806779049225,43.287782602138435*m),i.point7Cp1=i.point7.shift(299.1399624138707,19.59910745416729*m),i.point8=i.point0.shift(317.5381963475652,36.1375990486363*m),i.point8Cp1=i.point8.shift(173.12090742697325,12.479807891149623*m),i.point8Cp2=i.point8.shift(353.1201304168364,15.075322060904695*m),i.point9=i.point0.shift(336.14503661026947,8.388980629373263*m),i.point9Cp2=i.point9.shift(255.27121271777986,18.645853640957277*m),i.point5a=(new o).move(i.point6).curve(i.point6Cp2,i.point5Cp1,i.point5).shiftAlong(65*m);const u=(new o).move(i.point5).curve(i.point5Cp1,i.point6Cp2,i.point6).split(i.point5a);return i.point5aCp1=u[1].ops[1].cp1.clone(),i.point6Cp2=u[1].ops[1].cp2.clone(),i.point5=i.point5.rotate(357,i.point0),i.point5Cp2=i.point5.shift(196.75764739545923,56.96390931984925*m),a.eyeBottom=(new o).move(i.point7).curve(i.point7Cp1,i.point8Cp2,i.point8).curve(i.point8Cp1,i.point9Cp2,i.point9).addText(c?"skully:eyeBottom":"",f).addText(c?" (4)":"",f).addClass("hidden"),a.mouthTop=(new o).move(i.point3).curve(i.point3Cp1,i.point4Cp2,i.point4).addText(c?"skully:mouthTop":"",f).addText(c?" (16)":"",f).addClass("hidden"),a.upperJaw=(new o).move(i.point4).curve(i.point4Cp1,i.point5Cp2,i.point5).addText(c?"skully:upperJaw":"",f).addText(c?" (16)":"",f).addClass("hidden"),a.nose=(new o).move(i.point1).curve(i.point1Cp1,i.point2Cp2,i.point2).addText(c?"skully:nose":"",f).addText(c?" (10)":"",f).addClass("hidden"),p.set("templeToJaw",i.point5.dist(i.point5a)),p.set("upperJaw",a.upperJaw.length()),a.seam1=(new o).move(i.point9).line(i.point0).addText(c?"1":"",f).addClass("hidden"),a.seam2=(new o).move(i.point6).line(i.point7).addText(c?"2":"",f).addClass("hidden"),a.seam5=(new o).move(i.point5a).curve(i.point5aCp1,i.point6Cp2,i.point6).addText(c?"5":"",f).addClass("hidden"),a.seam7=(new o).move(i.point0).line(i.point1).addText(c?"7":"",f).addClass("hidden"),a.seam8=(new o).move(i.point2).curve(i.point2Cp1,i.point3Cp2,i.point3).addText(c?"8":"",f).addClass("hidden"),a.seam=(new o).move(i.point0).join(a.seam7).join(a.nose).join(a.seam8).join(a.mouthTop).join(a.upperJaw).line(i.point5a).join(a.seam5).join(a.seam2).join(a.eyeBottom).join(a.seam1).close(),p.set("templeWidth",i.point6.dist(i.point7)),p.set("noseBridgeWidth",i.point0.dist(i.point9)),p.set("templeWidth",i.point6.dist(i.point7)),p.set("mouthTop",a.mouthTop.length()),p.set("eyeBottom",a.eyeBottom.length()),p.set("noseSide",a.nose.length()),p.set("noseHeight",i.point1.dist(i.point2)),p.cutlist.addCut({cut:2,from:"fabric"}),i.title=i.point4Cp2.shiftFractionTowards(i.point0,.3),h("title",{nr:1,at:i.title,scale:.5,title:"skully:cheek"}
1),n.n1=new s("notch",i.point9),n.n2=new s("notch",i.point5),n.n3=new s("notch",i.point5a),n.n4=new s("notch",i.point1),n.n5=new s("bnotch",i.point7),n.n6=new s("bnotch",i.point2),i.gridAnchor=i.point4.clone(),i.logo=i.point7.shiftFractionTowards(i.point5,.5).shiftFractionTowards(i.point4,.25),n.logo=new s("logo",i.logo).attr("data-scale",.3),l&&(a.sa=a.seam.offset(l).trim().attr("class","fabric sa")),i.noseX=a.nose.edge("right"),i.eyeBottomY=a.eyeBottom.edge("bottom"),i.upperJaw=a.upperJaw.shiftFractionAlong(.42),h("hd",{from:i.noseX,to:i.point4,y:i.noseX.y+5,id:"noseToBackOfJaw"}),h("hd",{from:i.point6,to:i.point5,y:i.point6.y-l-15,id:"cheekBoneToBackOfJaw"}),h("hd",{from:i.point6,to:i.point5a,y:i.point6.y-l-5,id:"cheekBoneWidth"}),h("hd",{from:i.point7,to:i.point5,y:i.point6.y-l-25,id:"rightEyeToBackOfJaw"}),h("hd",{from:i.point3,to:i.point7,y:i.point6.y-l-35,id:"leftToRightEye"}),h("hd",{from:i.point2,to:i.point7,y:i.point6.y-l-25,id:"bottomNoseToRigthEye"}),h("hd",{from:i.point1,to:i.point7,y:i.point6.y-l-15,id:"topNoseToRigthEye"}),h("hd",{from:i.point0,to:i.point7,y:i.point6.y-l-5,id:"foreheadToRightEye"}),h("hd",{from:i.point9,to:i.point7,y:i.point6.y-l+5,id:"eyeWidth"}),h("hd",{from:i.point3,to:i.point4,y:i.point4.y+l+15,id:"jawWidth"}),h("hd",{from:i.point4,to:i.point5,y:i.point4.y+l+15,id:"jawToRight"}),h("vd",{from:i.eyeBottomY,to:i.point4,x:i.point4.x,id:"eyeToJaw"}),h("vd",{from:i.point6,to:i.point5a,x:i.point5.x+l+10,id:"cheekBoneHeight"}),h("vd",{from:i.point6,to:i.point5,x:i.point5.x+l+20,id:"cheekBoneToJawCorner"}),h("vd",{from:i.point5,to:i.point4,x:i.point5.x+l+20,id:"bottomToJaw"}),h("vd",{from:i.point3,to:i.point2,x:i.point2.x-l-10,id:"jawToBottomNose"}),h("vd",{from:i.point3,to:i.point1,x:i.point2.x-l-20,id:"jawToTopNose"}),h("vd",{from:i.point1,to:i.point0,x:i.point2.x-l-20,id:"topNoseToForehead"}),h("vd",{from:i.point6,to:i.upperJaw,x:i.point6.x,id:"cheekBoneToJaw"}),d}},fd={name:"skully.cheekbone",after:dd,draft:({Point:t,Path:e,points:o,paths:i,sa:a,complete:s,store:n,macro:r,part:l})=>{const c="text-xs center text-decoration='line-through'",p=n.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),i.seam5=(new e).move(o.point1).curve_(o.point1Cp1,o.point0).setText(s?"5":"",c).addClass("hidden"),i.seam6=(new e).move(o.point0).curve(o.point0Cp1,o.point1Cp2,o.point1).setText(s?"6":"",c).attr("data-text-text-decoration","underline").addClass("hidden"),i.seam=(new e).move(o.point0).join(i.seam6).join(i.seam5).close(),n.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"}),a&&(i.sa=i.seam.offset(a).attr("class","fabric sa")),o.pointY=i.seam.edge("top"),r("hd",{from:o.point0,to:o.point1,y:o.point0.y+a+15,id:"width"}),r("hd",{from:o.point0,to:o.pointY,y:o.pointY.y-a-15,id:"leftToTop"}),r("hd",{from:o.pointY,to:o.point1,y:o.pointY.y-a-15,id:"topToRight",noStartMarker:!0,noEndMarker:!0}),r("vd",{from:o.point1,to:o.point0,x:o.point1.x+a+15,id:"cornerToCornerHeight",noStartMarker:!0,noEndMarker:!0}),r("vd",{from:o.pointY,to:o.point0,x:o.point0.x-a-15,id:"height",noStartMarker:!0,noEndMarker:!0}),l}},md={name:"skully.forehead",after:dd,draft:({Point:t,Path:e,points:o,paths:i,Snippet:a,snippets:s,sa:n,complete:r,store:l,macro:c,part:p})=>{const h="text-xs center",d=l.get("sizeFactor");return o.point0=new t(0,0),o.point0Cp1=o.point0.shift(241.92955090220636,37.666339998598225*d),o.point0Cp2=o.point0.shift(333.9339465987448,38.41308527689494*d),o.point1=o.point0.shift(255.81688050452775,105.61426225557886*d),o.point1Cp2=o.point1.shift(122.25481630103288,16.221492810466046*d),o.point2=o.point0.shift(260.36453213741225,104.78002255825727*d),o.point2Cp1=o.point2.shift(104.52547665837686,6.962227517109787*d),o.point3=o.point0.shift(266.83135324063875,91.72676538115797*d),o.point3Cp1=o.point3.shift(10.824271939403667,7.255955140434657*d),o.point3Cp2=o.point3.shift(190.82219510192064,8.8744083082141*d),o.point4=o.point0.shift(279.23029819067256,99.89481626481647*d),o.point4Cp2=o.point4.shift(109.3914373863736,10.114793621226355*d),o.point5=o.point0.shift(285.6356187763194,96.73748550220853*d),o.point5Cp1=o.point5.shift(322.25160644653687,21.112881376069897*d
1),o.point6=o.point0.shift(299.0865415436474,123.293691591622*d),o.point6Cp1=o.point6.shift(102.44153405115529,30.07799330075059*d),o.point6Cp2=o.point6.shift(171.33241486296131,9.49614011059247*d),o.point7=o.point0.shift(301.8945694309706,53.41879968784397*d),o.point7Cp1=o.point7.shift(330.8064552671208,26.14383661592154*d),o.point7Cp2=o.point7.shift(306.82890730505164,20.883100248765764*d),o.point8=o.point0.shift(315.99934749521526,121.10503287183268*d),o.point8Cp2=o.point8.shift(138.225501502238,23.326308173390803*d),o.point9=o.point0.shift(325.07215199461336,129.7747702101221*d),o.point9Cp1=o.point9.shift(126.07355572621562,42.01723333347864*d),i.firstSeam=(new e).move(o.point9).curve(o.point9Cp1,o.point0Cp2,o.point0).setText(r?"20":"",h).addClass("hidden"),l.set("firstSeam",i.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()),i.eyeTop=(new e).move(o.point2).curve(o.point2Cp1,o.point3Cp2,o.point3).curve(o.point3Cp1,o.point4Cp2,o.point4).addText(r?"skully:eyeTop":"",h).addText(r?" (4)":"",h).addClass("hidden"),i.seam1=(new e).move(o.point1).line(o.point2).setText(r?"1":"",h).addClass("hidden"),i.seam2=(new e).move(o.point4).line(o.point5).setText(r?"2":"",h).addClass("hidden"),i.seam6a=(new e).move(o.point5).curve(o.point5Cp1,o.point6Cp2,o.point6).setText(r?"6":"",h).attr("data-text-text-decoration","underline").addClass("hidden"),i.seam6b=(new e).move(o.point8).line(o.point9).setText(r?"6":"",h).attr("data-text-text-decoration","underline").addClass("hidden"),i.seam7=(new e).move(o.point0).curve(o.point0Cp1,o.point1Cp2,o.point1).setText(r?"7":"",h).addClass("hidden"),i.seam=(new e).move(o.point0).join(i.seam7).join(i.seam1).join(i.eyeTop).join(i.seam2).join(i.seam6a).line(o.point8).join(i.seam6b).curve(o.point9Cp1,o.point0Cp2,o.point0).close(),i.dart=(new e).move(o.point6).curve(o.point6Cp1,o.point7Cp2,o.point7).curve(o.point7Cp1,o.point8Cp2,o.point8),l.set("eyeTop",i.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"}),s.n1=new a("notch",o.point2),s.n2=new a("bnotch",o.point4),n&&(i.sa=i.seam.offset(n).trim().attr("class","fabric sa")),o.pointX=i.seam.edge("left"),c("hd",{from:o.point0,to:o.point9,y:o.point0.y-n-15,id:"topToRight"}),c("hd",{from:o.pointX,to:o.point0,y:o.point0.y-n-15,id:"leftToTop"}),c("hd",{from:o.point6,to:o.point8,y:o.point6.y+n+5,id:"dartWidth"}),c("hd",{from:o.point6,to:o.point9,y:o.point6.y+n+15,id:"dartToRight"}),c("hd",{from:o.point5,to:o.point6,y:o.point6.y+n+5,id:"cheekBoneToDart"}),c("hd",{from:o.point4,to:o.point6,y:o.point6.y+n+15,id:"rightEyeToDart"}),c("hd",{from:o.point2,to:o.point6,y:o.point6.y+n+25,id:"leftEyeToDart"}),c("hd",{from:o.point1,to:o.point6,y:o.point6.y+n+35,id:"leftCornerToDart"}),c("hd",{from:o.pointX,to:o.point6,y:o.point6.y+n+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-n-10,id:"cheekBoneToTop"}),c("vd",{from:o.point4,to:o.point0,x:o.pointX.x-n-20,id:"rightEyeToTop"}),c("vd",{from:o.point1,to:o.point0,x:o.pointX.x-n-30,id:"leftCornerToTop"}),c("vd",{from:o.point2,to:o.point0,x:o.pointX.x-n-40,id:"leftEyeToTop"}),c("vd",{from:o.point0,to:o.point9,x:o.point9.x+n+10,id:"rightToTop"}),c("vd",{from:o.point0,to:o.point8,x:o.point9.x+n+20,id:"rightDartToTop"}),c("vd",{from:o.point0,to:o.point6,x:o.point9.x+n+30,id:"leftDartToTop"}),c("vd",{from:o.point0,to:o.point7,x:o.point0.x,id:"dartPointToTop"}),p}},ud={name:"skully.eye",after:[dd,md],draft:({Point:t,Path:e,points:o,paths:i,Snippet:a,snippets:s,sa:n,complete:r,store:l,macro:c,part:p})=>{const h="text-xs center",d=(l.get("eyeBottom")+l.get("eyeTop"))/Math.PI*2,f=.55191502449351;o.point0=new t(0,0),o.point2=o.point0.shift(0,d/2).shift(90,d/2),o.point0Cp1=o.point0.shift(0,d/2*f),o.point2Cp2=o.point2.shift(270,d/2*f);const m=(new e).move(o.point0).curve(o.point0Cp1,o.point2Cp2,o.point2);o.point1=m.shiftAlong(m.length()/2);const u=m.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,d/2*f*.4),o.p2Cp2=o.p2.shift(270,d/2*f*.4),o.p1Cp1=o.p1.shift(45,d/2*f*.7),o.p1Cp2=o.p1.shift(225,d/2*f*.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(),i.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=i.eye.shiftAlong(l.get("eyeTop"));const g=i.eye.split(o.pointNotch);return i.eyeTop=g[0].clone().addText(r?"skully:eyeTop":"",h).addText(r?" (4)":"",h),i.eyeBottom=g[1].clone().addText(r?"skully:eyeBottom":"",h).addText(r?" (4)":"",h),i.seam=(new e).move(o.p4).join(i.eyeTop).join(i.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),s.n1=new a("notch",o.p2),s.n2=new a("notch",o.p4),s.n3=new a("bnotch",o.pointNotch),n&&(i.sa=i.seam.offset(n).attr("class","fabric sa")),c("hd",{from:o.p4,to:o.pointNotch,y:o.p0.y+n+15,id:"leftToNotch",noStartMarker:!0,noEndMarker:!0}),c("hd",{from:o.p4,to:o.p2,y:o.p2.y-n-15,id:"width"}),c("vd",{from:o.p2,to:o.p0,x:o.p2.x+n+15,id:"height"}),p}},gd={name:"skully.head1",after:[dd,md],draft:({Point:t,Path:e,points:o,paths:i,Snippet:a,snippets:s,sa:n,complete:r,store:l,macro:c,part:p})=>{const h="text-xs center",d=l.get("sizeFactor");return o.point0=new t(0,0),o.point0Cp2=o.point0.shift(270.9766531413822,42.41716221059584*d),o.point2=o.point0.shift(254.08224234639044,161.93553876093907*d),o.point2Cp2=o.point2.shift(105.78717948197567,54.27380801428633*d),o.point2Cp1=o.point2.shift(75.48077210575057,107.97156739510459*d),o.point1=o.point0.shift(180,72.005*d),o.point1Cp1=o.point1.shift(268.60871199245156,55.97160080799901*d),o.point0=o.point0.shift(270,5),o.point0Cp2=o.point0.shift(270.9766531413822,42.41716221059584*d),i.firstSeam=(new e).move(o.point1).curve(o.point1Cp1,o.point2Cp2,o.point2).setText(r?"20":"",h).addClass("hidden"),o.fs1=i.firstSeam.shiftAlong(l.get("firstSeam")),o.fs2=i.firstSeam.shiftAlong(l.get("firstSeam")+l.get("templeToJaw")),o.gridAnchor=o.point0.clone(),l.cutlist.addCut({cut:2,from:"fabric"}),l.set("upperJawToLowerJaw",i.firstSeam.length()-l.get("firstSeam")-l.get("templeToJaw")),i.secondSeam=(new e).move(o.point2).curve(o.point2Cp1,o.point0Cp2,o.point0).setText(r?"17":"",h).addClass("hidden"),i.top=(new e).move(o.point0).line(o.point1).setText(r?"19":"",h).addClass("hidden"),l.set("secondSeam",i.secondSeam.length()),i.seam=(new e).move(o.point0).join(i.top).join(i.firstSeam).join(i.secondSeam).close(),o.title=o.point2.shiftFractionTowards(o.point1,.65).shift(0,10*d),c("title",{nr:3,at:o.title,scale:.5,title:"skully:head1"}),s.n1=new a("notch",o.fs1),s.n2=new a("notch",o.fs2),n&&(i.sa=i.seam.offset(n).attr("class","fabric sa")),c("hd",{from:o.point1,to:o.point2,y:o.point2.y+n+10,id:"leftToBottom",noStartMarker:!0,noEndMarker:!0}),c("hd",{from:o.point2,to:o.point0,y:o.point2.y+n+10,id:"bottomToRight"}),c("vd",{from:o.point0,to:o.point2,x:o.point0.x+n+15,id:"bottomToRight"}),c("vd",{from:o.point2,to:o.point1,x:o.point1.x-n-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}},bd={name:"skully.head2",after:[dd,gd],draft:({Point:t,Path:e,points:o,paths:i,sa:a,complete:s,log:n,store:r,macro:l,part:c})=>{const p="text-xs center",h=r.get("sizeFactor");o.point0=new t(0,0),o.point0Cp2=o.point0.shift(0,15*h),o.point1=o.point0.shift(257.7901473243395,66.12988849226953*h),o.point1Cp1=o.point1.shift(270,30.242724116719366*h),o.point1Cp2=o.point1.shift(90,18.83053830882166*h),o.point2=o.point0.shift(272.3327760921532,153.20596573567235*h),o.point3=o.point0.shift(282.5001868336755,164.15422647315543*h),o.point3Cp1=o.point3.shift(81.44269285511335,54.758598457228615*h),o.point4=o.point0.shift(340.927384878832,52.16879559660159*h),o.point4Cp2=o.point4.shift(274.04106104609286,50.57373626695976*h);const d=r.get("secondSeam");let f=0;var m;do{f++,(d-(m=(new e).move(o.point0)._curve(o.point1Cp2,o.point1).curve_(o.point1Cp1,o.point2)).length()>
1.1||d-m.length()<-.1)&&(o.point0=o.point0.shift(90,d-m.length()),o.point1=o.point1.shift(90,d-m.length()),o.point1Cp1=o.point1.shift(270,30.242724116719366*h),o.point1Cp2=o.point1.shift(90,18.83053830882166*h),o.point0Cp2=o.point0.shift(0,15*h))}while(f<100&&(d-m.length()>1||d-m.length()<-1));return f>=100&&n.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*h),o.dartPoint1=o.point0.shift(285.96197961706986,65.4910471438654*h),o.dartPoint1Cp1=o.dartPoint1.shift(354.74216521134053,13.662486193954589*h),o.dartPoint1Cp2=o.dartPoint1.shift(356.55115250146685,13.680777207454268*h),o.dartPoint2=(new e).move(o.point3).curve(o.point3Cp1,o.point4Cp2,o.point4).shiftAlong(92.81578231343269*h),i.secondSeam=(new e).move(o.point0)._curve(o.point1Cp2,o.point1).curve_(o.point1Cp1,o.point2).setText(s?"17":"",p).addClass("hidden"),i.thirdSeam=(new e).move(o.point3).curve(o.point3Cp1,o.point4Cp2,o.point4).setText(s?"18":"",p).addClass("hidden"),i.top=(new e).move(o.point4).curve(o.point4,o.point0Cp2,o.point0).setText(s?"19":"",p).addClass("hidden"),i.bottom=(new e).move(o.point2).line(o.point3).setText(s?"21":"",p).addClass("hidden"),r.set("thirdSeam",i.thirdSeam.length()-o.dartPoint0.dist(o.dartPoint2)),r.set("head2width",o.point2.dist(o.point3)),i.dart=(new e).move(o.dartPoint0)._curve(o.dartPoint1Cp2,o.dartPoint1).curve_(o.dartPoint1Cp1,o.dartPoint2),i.seam=(new e).move(o.point0).join(i.secondSeam).join(i.bottom).join(i.thirdSeam).join(i.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"}),a&&(i.sa=i.seam.offset(a).attr("class","fabric sa")),o.pointX=i.seam.edge("right"),l("hd",{from:o.point0,to:o.point4,y:o.point0.y-a-15,id:"topWidth"}),l("hd",{from:o.point0,to:o.pointX,y:o.point0.y-a-25,id:"topToRight"}),l("hd",{from:o.point1,to:o.pointX,y:o.point0.y-a-35,id:"totalWidth"}),l("hd",{from:o.point3,to:o.pointX,y:o.point3.y+a+15,id:"bottomRightToRight",noStartMarker:!0,noEndMarker:!0}),l("hd",{from:o.point2,to:o.point3,y:o.point3.y+a+15,id:"bottomWidth",noStartMarker:!0,noEndMarker:!0}),l("hd",{from:o.point1,to:o.point2,y:o.point3.y+a+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-a-15,id:"leftToTop"}),l("vd",{from:o.point2,to:o.point1,x:o.point1.x-a-15,id:"leftToBottomLeft"}),l("vd",{from:o.point3,to:o.point1,x:o.point1.x-a-25,id:"leftToBottomRight"}),l("vd",{from:o.point0,to:o.point4,x:o.point4.x+a+15,id:"topRightToTopLeft",noStartMarker:!0,noEndMarker:!0}),l("vd",{from:o.point4,to:o.dartPoint0,x:o.point4.x+a+15,id:"topDartToTopRight"}),l("vd",{from:o.point4,to:o.dartPoint2,x:o.point4.x+a+25,id:"bottomDartToTopRight"}),l("vd",{from:o.dartPoint2,to:o.point3,x:o.point4.x+a+25,id:"bottomRightToBottomDart"}),l("vd",{from:o.point0,to:o.dartPoint1,x:o.dartPoint1.x,id:"dartPointToTopLeft"}),c}},kd={name:"skully.lowermouth",after:dd,draft:({Point:t,Path:e,points:o,paths:i,sa:a,complete:s,store:n,macro:r,part:l})=>{const c="text-xs center",p=n.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),i.mouth1=(new e).move(o.point0).curve(o.point0Cp1,o.point1Cp2,o.point1).addText(s?"skully:mouthBottom":"",c).addText(s?" (13)":"",c).addClass("hidden"),i.mouth2=(new e).move(o.point1).curve(o.point1Cp1,o.point2Cp2,o.point2).addText(s?"skully:mouthBottom":"",c).addText(s?" 
1(13)":"",c).addClass("hidden"),i.backOfMouth=(new e).move(o.point2).line(o.point0).addText(s?"skully:backOfMouth":"",c).addText(s?" (11)":"",c).addClass("hidden"),n.set("mouthWidth",o.point0.dist(o.point2)),i.seam=(new e).move(o.point0).curve(o.point0Cp1,o.point1Cp2,o.point1).curve(o.point1Cp1,o.point2Cp2,o.point2).line(o.point0).close(),n.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"}),a&&(i.sa=i.seam.offset(a).attr("class","fabric sa")),r("hd",{from:o.point1,to:o.point0,y:o.point0.y-a-15,id:"width"}),r("vd",{from:o.point0,to:o.point2,x:o.point0.x+a+15,id:"height"}),l}},wd={name:"skully.uppermouth",after:[dd,gd,kd],draft:({Point:t,Path:e,points:o,paths:i,sa:a,complete:s,store:n,macro:r,part:l})=>{const c="text-xs center",p=n.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)-n.get("mouthWidth")/2),o.point2=o.point2.shift(90,o.point0.dist(o.point1)-n.get("mouthWidth")/2),o.point2Cp1=o.point2.shift(358.24231642721344,5.05337768230318*p),o.point3=o.point3.shift(90,o.point0.dist(o.point1)-n.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)-n.get("mouthWidth")/2),o.point4Cp2=o.point4.shift(178.12857030706965,15.433231709528583*p),o.point5=o.point4.shift(0,n.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,n.get("mouthWidth")/2),o.pointM1Cp1=o.pointM1.shift(270,33.0746752291626*p),i.backOfUpperJaw=(new e).move(o.point5).curve(o.point5Cp1,o.point6Cp2,o.point6).setText(s?"not sewn":"",c).addClass("hidden"),o.lowerJaw=i.backOfUpperJaw.shiftAlong(n.get("upperJawToLowerJaw"));var h=o.lowerJaw.angle(i.backOfUpperJaw.shiftAlong(n.get("upperJawToLowerJaw")+1));return n.set("halfOfBack",i.backOfUpperJaw.length()-n.get("upperJawToLowerJaw")),o.point2ToLowerJaw=o.point2.shift(0,o.point2.dist(o.lowerJaw)/2),o.lowerJawToPoint2=o.lowerJaw.shift(h+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"}),i.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(s?"skully:upperJaw":"",c).addText(s?" (16)":"",c).addClass("hidden"),i.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(s?"skully:upperJaw":"",c).addText(s?" (16)":"",c).addClass("hidden"),i.front1=(new e).move(o.pointM1).curve_(o.pointM1Cp1,o.point1).addText(s?"skully:mouthTop":"",c).addText(s?" (16)":"",c).addClass("hidden"),i.front2=(new e).move(o.mPoint1).curve_(o.mPointM1Cp1,o.pointM1).addText(s?"skully:mouthTop":"",c).addText(s?" (16)":"",c).addClass("hidden"),i.backOfUpperJaw.curve(o.mPoint6Cp2,o.mPoint5Cp1,o.mPoint5),i.seam=(new e).move(o.point1).join(i.upperJaw1).join(i.backOfUpperJaw).join(i.upperJaw2).join(i.front2).join(i.front1).close(),i.backOfMouth=(new e).move(o.mPoint1).line(o.point1).addText(s?"skully:backOfMouth":"",c).addText(s?" (11)":"",c).setClass("dashed"),i.lowerJaw1=(new e).move(o.point2).curve(o.point2ToLowerJaw,o.lowerJawToPoint2,o.lowerJaw).addText(s?"skully:lowerjaw":"",c).addText(s?" (14)":"",c).setClass("dashed"),i.lowerJaw2=(new e).move(o.mPoint2).curve(o.mPoint2ToLowerJaw,o.mLowerJawToPoint2,o.mLowerJaw).addText(s?"skully:lowerjaw":"",c).addText(s?" (14)":"",c).setClass("dashed"),i.backOfUpperJaw1=(new e).move(o.point5).line(o.lowerJaw).setText(s?"21":"",c).addClass("hidden"),i.backOfUpperJaw2=(new e).move(o.mLowerJaw).line(o.mPoint5).setText(s?"21":"",c).addClass("hidden"),n.set("lowerJaw",i.lowerJaw1.length()+o.point1.dist(o.point2)),n.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"}),a&&(i.sa=i.seam.offset(a).attr("class","fabric sa")),r("hd",{from:o.pointM1,to:o.point1,y:o.point5.y+a+15,id:"leftToBOM"}),r("hd",{from:o.point1,to:o.point3,y:o.point5.y+a+15,id:"BOMtoCorner"}),r("hd",{from:o.point3,to:o.point5,y:o.point5.y+a+15,id:"cornerToRight"}),r("hd",{from:o.point5,to:o.point6,y:o.point5.y+a+15,id:"rightToMiddle",noStartMarker:!0,noEndMarker:!0}),r("hd",{from:o.pointM1,to:o.point6,y:o.mPoint5.y-a-15,id:"totalWidth"}),r("vd",{from:o.point6,to:o.point5,x:o.point6.x+a+15,id:"bottomToMiddle"}),r("vd",{from:o.mPoint5,to:o.point6,x:o.point6.x+a+15,id:"middleToTop"}),r("vd",{from:o.mPoint1,to:o.mPoint5,x:o.pointM1.x-a-15,id:"topBOMtoTop",noStartMarker:!0,noEndMarker:!0}),r("vd",{from:o.point1,to:o.mPoint1,x:o.pointM1.x-a-15,id:"BOMheight1"}),r("vd",{from:o.point5,to:o.point1,x:o.pointM1.x-a-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}},Cd={name:"skully.lowerjaw",after:[dd,wd],draft:({Point:t,Path:e,points:o,paths:i,sa:a,complete:s,log:n,store:r,macro:l,part:c})=>{const p="text-xs center",h=r.get("sizeFactor");o.point0=new t(0,0),o.point1=o.point0.shift(174.91311161963839,43.0264648094635*h),o.point2=o.point0.shift(240.9901082422603,82.64382533498798*h),o.point3=o.point0.shift(251.1601763775522,106.01579184725264*h),o.point4=o.point0.shift(276.6440430845334,116.75813357963548*h
1),o.point5=o.point0.shift(264.48800048134507,50.78381912578058*h);const d=r.get("mouthTop");o.point0=new t(0,0),o.point0Cp2=o.point0.shift(354.9481781658739,16.659715303689914*h),o.point1=o.point0.shift(264.91311161963836,43.0264648094635*h),o.point1Cp1=o.point1.shift(0,53.02160375733651*h),o.point2=o.point0.shift(331.14662128979205,83.05325951149062*h),o.point2Cp1=o.point2.shift(23.491413537740165,11.818521142681087*h),o.point2Cp2=o.point2.shift(203.48599545649284,6.360957553702122*h),o.point3=o.point0.shift(341.2414817357221,106.45865437980989*h),o.point3Cp1=o.point3.shift(83.22770461819215,15.755934754878917*h),o.point3Cp2=o.point3.shift(263.2247839478168,8.959567958333654*h),o.point4=o.point0.shift(6.617587088273078,117.22282297600707*h),o.point4Cp1=o.point4.shift(171.59670910061834,40.160161877163844*h),o.point4Cp2=o.point4.shift(255.77964223723035,21.208879767682262*h),o.point5=o.point0.shift(354.81977589032454,54.026610044075944*h),o.point5Cp1=o.point5.shift(166.25960112580196,20.659041530160696*h),o.point5Cp2=o.point5.shift(76.26126036953632,34.11095664483535*h),o.point0=new t(0,0);let f=0;var m;do{f++,o.point5Cp1=o.point5.shift(166.25960112580196,20.659041530160696*h),o.point5Cp2=o.point5.shift(76.26126036953632,34.11095664483535*h),m=(new e).move(o.point5).curve(o.point5Cp1,o.point0Cp2,o.point0),o.point5=o.point5.shift(270,.5*(d-m.length()))}while(f<100&&(d-m.length()>1||d-m.length()<-1));return f>=100&&n.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*h),o.point4Cp2=o.point4.shift(255.77964223723035,21.208879767682262*h),i.mouthBottom=(new e).move(o.point5).curve(o.point5Cp1,o.point0Cp2,o.point0).addText(s?"skully:mouthBottom":"",p).addText(s?" (13)":"",p).addClass("hidden"),i.lowerJaw=(new e).move(o.point4).curve(o.point4Cp1,o.point5Cp2,o.point5).addText(s?"skully:lowerjaw":"",p).addText(s?" (14)":"",p).addClass("hidden"),i.front=(new e).move(o.point0).line(o.point1).setText(s?"12":"",p),i.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(s?"skully:jawBottom":"",p).addText(s?"(15)":"",p).addClass("hidden"),i.seam=(new e).move(o.point0).join(i.front).join(i.bottomJaw).join(i.lowerJaw).join(i.mouthBottom).close(),r.set("bottomJaw",i.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"}),a&&(i.sa=i.seam.offset(a).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-a-15,id:"leftTopToTopHook"}),l("hd",{from:o.pointY,to:o.point4,y:o.pointY.y-a-15,id:"topToRight"}),l("hd",{from:o.point1,to:o.point5,y:o.pointY.y-a-25,id:"leftBottomToTopHook"}),l("hd",{from:o.point5,to:o.point4,y:o.pointY.y-a-25,id:"topHookToRight"}),l("hd",{from:o.point1,to:o.point3,y:o.point1.y+a+15,id:"bottomLeftToRightCorner"}),l("hd",{from:o.point3,to:o.point4,y:o.point1.y+a+15,id:"rightCornerToRight",noStartMarker:!0,noEndMarker:!0}),l("vd",{from:o.point1,to:o.point5,x:o.point1.x-a-15,id:"bottomToTopHook"}),l("vd",{from:o.point1,to:o.point0,x:o.point1.x-a-25,id:"bottomToTopLeft"}),l("vd",{from:o.point1,to:o.pointY,x:o.point1.x-a-35,id:"totalHeight"}),l("vd",{from:o.pointY,to:o.point3,x:o.point4.x+a+25,id:"rightCornerToTop"}),l("vd",{from:o.point4,to:o.point3,x:o.point4.x+a+15,id:"rightCornerToRight"}),c}},vd={name:"skully.jawfloor",after:[dd,Cd],draft:({Point:t,Path:e,points:o,paths:i,sa:a,complete:s,store:n,macro:r,part:l})=>{const c="text-xs center",p=n.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.7834753138
1606,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"}),i.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(s?"skully:jawBottom":"",c).addText(s?" (15)":"",c).addClass("hidden"),i.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(s?"skully:jawBottom":"",c).addText(s?" (15)":"",c).addClass("hidden"),i.back=(new e).move(o.point4).curve(o.point4,o.point5Cp2,o.point5).curve(o.mPoint5Cp2,o.mPoint4,o.mPoint4).setText(s?"21":"",c).addClass("hidden"),i.seam=(new e).move(o.point6).join(i.bottomJaw1).join(i.back).join(i.bottomJaw2).close(),n.set("backOfLowerJaw",(new e).move(o.point4).curve(o.point4,o.point5Cp2,o.point5).length()),n.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"}),a&&(i.sa=i.seam.offset(a).attr("class","fabric sa")),r("hd",{from:o.mPoint0,to:o.mPoint5,y:o.mPoint4.y-a-15,id:"width"}),r("hd",{from:o.point4,to:o.point5,y:o.point4.y+a+15,id:"bottomRightToRight",noStartMarker:!0,noEndMarker:!0}),r("hd",{from:o.point2,to:o.point4,y:o.point4.y+a+15,id:"indentToBottomRight"}),r("hd",{from:o.point1,to:o.point2,y:o.point4.y+a+15,id:"outdentToIndent"}),r("hd",{from:o.point0,to:o.point1,y:o.point4.y+a+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+a+15,id:"middleToTop"}),r("vd",{from:o.mPoint5,to:o.point4,x:o.mPoint5.x+a+15,id:"bottomToMiddle"}),l}},Td={name:"skully.head3",after:[dd,bd,vd],draft:({Point:t,Path:e,points:o,paths:i,sa:a,complete:s,log:n,store:r,macro:l,utils:c,part:p})=>{const h="text-xs center",d=r.get("sizeFactor");o.point0=new t(0,0),o.point0Cp2=o.point0.shift(176.85941213458383,24.45873430903567*d),o.point0Cp1=o.point0.shift(80.97143471134606,19.435805231582247*d),o.point5=o.point0.shift(174.83014371859687,57.4195861357429*d),o.point5Cp1=o.point5.shift(359.48476820979687,24.91000716579583*d),o.point4=o.point0.shift(128.37,82.29999999999998*d),o.point4Cp1=o.point4.shift(280,20*d),o.point3=o.point0.shift(122.10525602099625,99.24923435875874*d),o.point3Cp2=o.point3.shift(75,20*d),o.point2=o.point0.shift(92.0479806305003,131.18279286933938*d),o.point2Cp2=o.point2.shift(286.4630945432234,43.38779202725112*d),o.point2Cp1=o.point2.shift(208.11590506019132,16.689416556608613*d),o.point1=o.point0.shift(80.96712201455671,37.967861804426136*d),o.point1Cp2=o.point1.shift(266.0887375411011,17.372462375840676*d),o.point1Cp1=o.point1.shift(86.08762325510818,17.602020395397776*d),o.dartPoint0=o.point4.clone(),o.dartPoint0Cp1=o.dartPoint0.shift(10,15.674240045373793*d),o.dartPoint1=o.point0.shift(93.69495535762911,79.06034303618978*d),o.dartPoint1Cp1=o.dartPoint1.shift(190.57289744169927,19.19488590744941*d),o.dartPoint1Cp2=o.dartPoint1.shift(206.69161019830457,18.019174148667343*d),o.dartPoint2=o.point3.clone(),o.dartPoint2Cp2=o.dartPoint2.shift(345,15.211717490145492*d);let f=r.get("halfOfBack")-r.get("head2width"),m=r.get("thirdSeam")-(new e).move(o.point2).curve(o.point2Cp1,o.point3Cp2,o.point3).length(),u=c.circlesIntersect(o.dartPoint0,m,o.point0,f);return u?o.point5=u[0].clone():n.error("Could not make the lower part of head3 fit the other parts!"),o.point5Cp1=o.point5.shift(359.48476820979687,24.91000716579583*d),o.gridAnchor=o.dartPoint1.clone(),i.thirdSeam1=(new e).move(o.point2).curve(o.point2Cp1,o.point3Cp2,o.point3).setText(s?"18":"",h).addClass("hidden"),i.thirdSeam2=(new e).move(o.point4).line(o.point5).setText(s?"18":"",h).addClass("hidden"),i.back=(new e).move(o.point0).curve(o.point0Cp1,o.point1Cp2,o.point1).curve(o.point1Cp1,o.point2Cp2,o.point2).setText(s?"19":"",h).addClass("hidden"),i.bottom=(new e).move(o.point5).line(o.point0).setText(s?"21":"",h).addClass("hidden"),i.dart=(new e).move(o.dartPoint0).curve(o.dartPoint0Cp1,o.dartPoint1Cp2,o.dartPoint1).curve(o.dartPoint1Cp1,o.dartPoint2Cp2,o.dartPoint2),i.seam=(new e).move(o.point0).join(i.back).join(i.thirdSeam1).line(o.point4).join(i.thirdSeam2).join(i.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"}),a&&(i.sa=i.seam.offset(a).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-a-15,id:"topDartToTop"}),l("hd",{from:o.dartPoint2,to:o.pointX,y:o.point2.y-a-25,id:"totalWidth"}),l("hd",{from:o.dartPoint2,to:o.point5,y:o.point0.y+a+15,id:"topDartToBottomLeft",noStartMarker:!0,noEndMarker:!0}),l("hd",{from:o.dartPoint0,to:o.point5,y:o.point0.y+a+5,id:"bottomDartToBottomLeft",noStartMarker:!0,noEndMarker:!0}),l("hd",{from:o.dartPoint2,to:o.point0,y:o.point0.y+a+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+a+15,id:"dartPointToTop"}),l("vd",{from:o.dartPoint1,to:o.point0,x:o.pointX.x+a+15,id:"dartPointToBottom"}),l("vd",{from:o.point2,to:o.pointX,x:o.pointX.x+a+25,id:"rightToTop"}),l("vd",{from:o.dartPoint2,to:o.point2,x:o.dartPoint2.x-a-15,id:"topDartToTop"}),l("vd",{from:o.dartPoint0,to:o.dartPoint2,x:o.dartPoint2.x-a-15,id:"dartHeight",noStartMarker:!0,noEndMarker:!0}),l("vd",{from:o.point5,to:o.dartPoint0,x:o.dartPoint2.x-a-15,id:"bottomDartToTop"}),p}},yd={name:"skully.nose",after:[dd,md,ud],draft:({Point:t,Path:e,points:o,paths:i,Snippet:a,snippets:s,sa:n,complete:r,log:l,store:c,macro:p,part:h})=>{const d="text-xs center",f=c.get("noseSide"),m=c.get("noseHeight");o.point0=new t(0,0),o.point2=o.point0.shift(90,m),o.point0Cp1=o.point0.shift(315,m),o.point2Cp2=o.point2.shift(325,m/3),i.p1=(new e).move(o.point0).curve(o.point0Cp1,o.point2Cp2,o.point2).hide(),o.pRotate=o.point0.shift(30,m),i.p0p1=(new e).move(o.point0).line(o.point2).setClass("dashed mark"),o.point1=o.pRotate.shiftTowards(o.point2,-1*m),o.point1Cp2=o.point1.shift(o.point1.angle(o.point2)+55,m/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),i.p1=(new e).move(o.point0).curve(o.point0Cp1,o.point1Cp2,o.point1).addText(r?"skully:nose":"",d).addText(r?" (10)":"",d),u=i.p1.length()}while(g<100&&u-f>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(),i.p2=(new e).move(o.point3).curve(o.point3Cp1,o.point0Cp2,o.point0).addText(r?"skully:nose":"",d).addText(r?" (10)":"",d),i.seam=(new e).move(o.point0).join(i.p1).line(o.point2).line(o.point3).join(i.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"}),s.n1=new a("bnotch",o.point0),s.n2=new a("notch",o.point1),s.n3=new a("notch",o.point2),s.n4=new a("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"}),n){const t=(new e).move(o.point0).join(i.p1).line(o.point2).offset(n).addClass("hidden"),a=(new e).move(o.point2).line(o.point3).curve(o.point3Cp1,o.point0Cp2,o.point0).offset(n).addClass("hidden"),s=t.intersectsX(0)[0];i.sa1=t.split(s)[1].hide();const r=a.intersectsX(0)[0];i.sa2=a.split(r)[0].hide(),i.sa=(new e).move(s).join(i.sa1).join(i.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+n+5,id:"heightRight",noStartMarker:!0,noEndMarker:!0}),p("vd",{from:o.pointY1,to:o.point2,x:o.point3.x-n-5,id:"heightLeft",noStartMarker:!0,noEndMarker:!0}),p("hd",{from:o.point0,to:o.point1,y:o.point2.y-n-5,id:"widthRight",noStartMarker:!0,noEndMarker:!0}),p("hd",{from:o.point3,to:o.point0,y:o.point2.y-n-5,id:"widthLeft",noStartMarker:!0,noEndMarker:!0}),p("hd",{from:o.pointY1,to:o.point1,y:o.pointY2.y+n+5,id:"bottomToRight",noStartMarker:!0,noEndMarker:!0}),p("hd",{from:o.pointY2,to:o.pointY1,y:o.pointY2.y+n+5,id:"leftToRight",noStartMarker:!0,noEndMarker:!0}),p("hd",{from:o.point3,to:o.pointY2,y:o.pointY2.y+n+5,id:"leftToBottom",noStartMarker:!0,noEndMarker:!0}),h}},xd={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)"}}}')},Bd=new s.pT({data:hd,parts:[dd,fd,ud,md,gd,bd,Td,vd,Cd,kd,yd,wd]}),Sd=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}'),Ld={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,s.Wx)("waistToKnee"),menu:"style"},bottomWidthBonus:{pct:20,min:0,max:100,...(0,s.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,s.Wx)("bustFront"),menu:"fit"},underbustEase:{pct:5,min:0,max:25,...(0,s.Wx)("underbust"),menu:"fit"},waistEase:{pct:5,min:0,max:25,...(0,s.Wx)("waist"),menu:"fit"},hipsEase:{pct:5,min:0,max:25,...(0,s.Wx)("hips"),menu:"fit"},seatEase:{pct:5,min:0,max:25,...(0,s.Wx)("seat"),menu:"fit"}},draft:({options:t,measurements:e,part:o,store:i,points:a,Point:s,Path:n,paths:r,macro:l,sa:c,paperless:p})=>{const h=e.hpsToBust+e.bustPointToUnderbust,d=e.bustFront*(1+t.bustEase);i.set("bustFront",d);const f=e.underbust*(1+t.underbustEase);i.set("underbust",f);const m=e.waist*(1+t.waistEase);i.set("waist",m);const u=e.hips*(1+t.hipsEase);i.set("hips",u);const g=e.seat*(1+t.seatEase);i.set("seat",g),i.set("hpsToUnderbust",h);const b=e.shoulderToShoulder/4*t.strapWidth;i.set("strapWidth",b);const k=(e.hpsToBust+e.bustPointToUnderbust)*t.necklineCoverage;i.set("necklineCoverage",k);const w=(e.hpsToWaistBack-e.waistToUnderbust)*t.backCoverage;i.set("backCoverage",w);const C=e.waistToKnee*(1+t.lengthBonus);i.set("skirtLength",C);const v=e.seat*(1+t.bottomWidthBonus);i.set("bottomWidth",v);const T=f/4*(1-t.sideCornerDrop)+m/4*t.sideCornerDrop;i.set("cornerWidth",T);const y=e.waistToUnderbust+i.get("skirtLength"),x=h*t.armholeDrop;i.set("armholeDrop",x);const B=(e.bustFront-e.bustSpan/2)*t.armholeWidthFront;i.set("armholeWidthFront",B);const S=f/4*t.armholeWidthBack;return i.set("armholeWidthBack",S),a.foldCenterpoint=new s(0,y/2),a.bottomCenterpoint=new s(0,y),a.bottomSide=new s(v/4,y),a.seatSide=new s(g/4,e.waistToUnderbust+e.waistToSeat),a.seatToHipsTweak=new s(g/4,e.waistToUnderbust+(e.waistToSeat+e.waistToHips)/2),a.hipsSide=new s(u/4,e.waistToUnderbust+e.waistToHips),a.hipsToWaistTweak=new s(m/4,e.waistToUnderbust+e.waistToHips/2),a.waistSide=new s(m/4,e.waistToUnderbust),a.topSide=new s(f/4*(1-t.sideCornerDrop)+m/4*t.sideCornerDrop,e.waistToUnderbust*t.sideCornerDrop),r.shared=(new n).move(a.bottomCenterpoint).line(a.bottomSide).line(a.seatSide).curve_(a.seatToHipsTweak,a.hipsSide).curve_(a.hipsToWaistTweak,a.waistSide).line(a.topSide),p&&(l("vd",{from:a.topSide,to:a.waistSide,x:a.bottomSide.x+c+10,id:"vd2"}),l("vd",{from:a.waistSide,to:a.hipsSide,x:a.bottomSide.x+c+10,id:"vd3"}),l("vd",{from:a.hipsSide,to:a.seatSide,x:a.bottomSide.x+c+10,id:"vd4"}),l("vd",{from:a.seatSide,to:a.bottomSide,x:a.bottomSide.x+c+10,id:"vd5"}),l("hd",{from:a.bottomCenterpoint,to:a.bottomSide,y:a.bottomSide.y+c+10,id:"hd0"}),l("hd",{from:a.seatSide,to:a.bottomSide,y:a.seatSide.y,id:"hd1"}),l("hd",{from:a.hipsSide,to:a.bottomSide,y:a.hipsSide.y,id:"hd2"}),l("hd",{from:a.waistSide,to:a.bottomSide,y:a.waistSide.y,id:"hd3"}),l("hd",{from:a.topSide,to:a.bottomSide,y:a.topSide.y,id:"hd4"})),o.hide(),o}},Pd={name:"sophie.cup",after:Ld,draft:({Point:t,points:e,Path:o,paths:i,macro:a,sa:s,measurements:n,part:r,store:l,paperless:c,options:p})=>{const h=l.get("hpsToUnderbust"),d=l.get("strapWidth"),f=l.get("armholeDrop"),m=l.get("armholeWidthFront"),u=l.get("necklineCoverage"),g=l.get("bustFront"),b=l.get("cornerWidth"),k=l.get("underbust");return e.a=new t(0,f),e.b=new t(k/4-b,h+n.waistToUnderbust*p.sideCornerDrop),e.bc=new t(g/2-n.bustSpan/4,h+n.waistToUnderbust*p.sideCornerDrop),e.c=new t(g/2,h-u),e.d=new t(n.shoulderToShoulder/4,0),e.e=e.d.shift(180+n.shoulderSlope,d),e.ea=new t(m,.9*f),i.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"),s&&(i.sa=i.cup.offset(s).addClass("fabric sa")),c&&(a("vd",{from:e.a,to:e.e,x:e.a.x-s-10,id:"vd0"}),a("vd",{from:e.b,to:e.a,x:e.a.x-s-10,id:"vd1"}),a("vd",{from:e.b,to:e.c,x:e.c.x+s+10,id:"vd2"}),a("vd",{from:e.c,to:e.d,x:e.c.x+s+10,id:"vd3"}),a("hd",{from:e.a,to:e.e,y:e.d.y-s-10,id:"hd0"}),a("hd",{from:e.b,to:e.c,y:e.b.y+s+10,id:"hd1"}),a("hd",{from:e.d,to:e.c,y:e.d.y-s-10,id:"hd2"}),a("hd",{from:e.e,to:e.d,y:e.d.y-s-10,id:"hd3"}),a("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*h),e.grainlineTo=e.d.shift(-90,.5*h),a("grainline",{from:e.grainlineFrom,to:e.grainlineTo}),e.title=new t(g/4,.7*h),a("title",{at:e.title,nr:1,title:"cup",align:"center",scale:.8}),r}},Rd={name:"sophie.backStrap",after:Ld,draft:({Point:t,points:e,Path:o,paths:i,macro:a,sa:s,measurements:n,part:r,
1store:l,paperless:c,options:p})=>{const h=n.hpsToWaistBack-n.waistToUnderbust,d=n.hpsToWaistBack-n.waistToUnderbust*(1-p.sideCornerDrop),f=l.get("hpsToUnderbust"),m=l.get("strapWidth"),u=l.get("armholeDrop"),g=l.get("armholeWidthBack"),b=l.get("backCoverage"),k=l.get("underbust"),w=l.get("cornerWidth");return e.a=new t(0,h-(f-u)),e.b=new t(k/4-w,d),e.c=new t(k/4,h-b),e.d=new t(n.shoulderToShoulder/4,0),e.e=e.d.shift(180+n.shoulderSlope,m),e.ea=new t(g,h-.9*(f-u)),i.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"),s&&(i.sa=i.backStrap.offset(s).addClass("fabric sa")),c&&(a("vd",{from:e.a,to:e.e,x:e.a.x-s-10,id:"vd0"}),a("vd",{from:e.b,to:e.a,x:e.a.x-s-10,id:"vd1"}),a("vd",{from:e.b,to:e.c,x:e.c.x+s+10,id:"vd2"}),a("vd",{from:e.c,to:e.d,x:e.c.x+s+10,id:"vd3"}),a("hd",{from:e.a,to:e.e,y:e.d.y-s-10,id:"hd0"}),a("hd",{from:e.b,to:e.c,y:e.b.y+s+10,id:"hd1"}),a("hd",{from:e.d,to:e.c,y:e.d.y-s-10,id:"hd2"}),a("hd",{from:e.e,to:e.d,y:e.d.y-s-10,id:"hd3"}),a("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*d),e.grainlineTo=e.d.shift(-90,.4*d),a("grainline",{from:e.grainlineFrom,to:e.grainlineTo}),e.title=new t(k/8,.6*d),a("title",{at:e.title,nr:2,title:"Back Strap",align:"center",scale:.8}),r}},Fd={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?"}}}')},Wd={name:"sophie.frontPanel",from:Ld,draft:({Point:t,points:e,paths:o,snippets:i,Snippet:a,macro:s,measurements:n,part:r,sa:l,store:c,paperless:p})=>{const h=n.waistToUnderbust+c.get("skirtLength"),d=c.get("hips"),f=c.get("necklineCoverage");return e.topCenterpoint=new t(0,-f),o.seam=o.shared.clone().line(e.topCenterpoint).close().addClass("fabric"),s("cutonfold",{from:e.topCenterpoint,to:e.bottomCenterpoint,id:"front"}),l&&(o.sa=o.seam.offset(l).addClass("fabric sa")),p&&(s("vd",{from:e.bottomCenterpoint,to:e.topCenterpoint,x:e.topCenterpoint.x-l-10,id:"vd0"}),s("vd",{from:e.topCenterpoint,to:e.topSide,x:e.bottomSide.x+l+10,id:"vd1"}),s("ld",{from:e.topCenterpoint,to:e.topSide,id:"ld1",d:15})),e.grainlineFrom=e.foldCenterpoint.shift(-45,.1*h),e.grainlineTo=e.foldCenterpoint.shift(-45,.4*h),s("grainline",{from:e.grainlineFrom,to:e.grainlineTo}),i.waist=new a("notch",e.waistSide),i.seat=new a("notch",e.seatSide),c.cutlist.addCut({cut:1,from:"fabric",onFold:1,onBias:1}),e.title=new t(d/8,h/4),s("title",{at:e.title,nr:3,title:"Front Panel",align:"center",scale:.8}),e.scalebox=e.title.shift(-90,65),s("scalebox",{at:e.scalebox}),r}},Hd={name:"sophie.backPanel",from:Ld,draft:({Point:t,points:e,paths:o,snippets:i,Snippet:a,macro:s,measurements:n,part:r,
1sa:l,store:c,paperless:p})=>{const h=n.waistToUnderbust+c.get("skirtLength"),d=c.get("hips"),f=c.get("backCoverage");return e.topCenterpoint=new t(0,-f),o.seam=o.shared.clone().line(e.topCenterpoint).close().addClass("fabric"),s("cutonfold",{from:e.topCenterpoint,to:e.bottomCenterpoint,id:"back"}),l&&(o.sa=o.seam.offset(l).addClass("fabric sa")),p&&(s("vd",{from:e.bottomCenterpoint,to:e.topCenterpoint,x:e.topCenterpoint.x-l-10,id:"vd0"}),s("vd",{from:e.topCenterpoint,to:e.topSide,x:e.bottomSide.x+l+10,id:"vd1"}),s("ld",{from:e.topCenterpoint,to:e.topSide,id:"ld1",d:15})),e.grainlineFrom=e.foldCenterpoint.shift(-45,.1*h),e.grainlineTo=e.foldCenterpoint.shift(-45,.4*h),s("grainline",{from:e.grainlineFrom,to:e.grainlineTo}),i.waist=new a("notch",e.waistSide),i.hips=new a("notch",e.seatSide),c.cutlist.addCut({cut:1,from:"fabric",onFold:1,onBias:1}),e.title=new t(d/8,h/4),s("title",{at:e.title,nr:4,title:"Back Panel",align:"center",scale:.8}),r}},Ad=new s.pT({data:Sd,parts:[Pd,Rd,Wd,Hd]}),Od=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 Dd={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,s.Wx)("waistToSeat"),menu:"fit"},length:{pct:100,min:25,max:400,...(0,s.Wx)("waist"),menu:"style"},waistbandWidth:{pct:25,min:10,max:100,...(0,s.Wx)("waistToSeat"),menu:t=>!!t.fabricWaistband&&"style"},bindingWidth:{pct:25,min:10,max:100,...(0,s.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,s.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:i,macro:a,part:s,measurements:n,options:r,store:l,expand:c,units:p,sa:h,complete:d,snippets:f,Snippet:m,paperless:u})=>{const g=n.waist,b=n.waistToSeat*r.waistEase,k=(b+g)/2,w=r.length*n.waist;l.set("length",w);const C=k/(1-r.pleatOverlap)*3;l.set("width",C);const v=r.waistbandLength*n.waist;l.set("waistbandLength",v);const T=r.sideOpeningLength*n.waistToSeat,y=k+b/2;c&&l.flag.preset("expandIsOn");const x=r.hem*(h||10);l.set("hem",x);const B=4*r.waistbandWidth*n.waistToSeat;l.set("waistbandWidth",B);const S=4*r.bindingWidth*n.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,w),e.br=new t(C,w),e.tr=new t(C,0),e.lNotch=new t(0,T),e.rNotch=new t(C,T),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-y/2,B/4),e.wtrNotch=new t(v/2+y/2,B/4),e.wblNotch=new t(v/2-y/2,B/4*3),e.wbrNotch=new t(v/2+y/2,B/4*3)),r.fabricBinding&&(e.bbl=new t(0,S),e.btr=new t(y,0),e.bbr=new t(y,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=(n.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);i.upFolds=(new o).hide().addClass("lashed"),i.downFolds=(new o).hide().addClass("dashed");for(let F=L;F>0;F--)i.upFolds.move(e[`pleat${F}_top_up`]).line(e[`pleat${F}_bottom_up`]),i.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),f.logo=new m("logo",e.logo),!u&&d&&(e.miniscale=e.title.shift(-90,r.paperlessOffset+32),a("miniscale",{at:e.miniscale})),s.hide()}},Ed={name:"sunny.panel",measurements:[],optionalMeasurements:[],plugins:[Pp.e2],from:Dd,options:{},draft:({Point:t,points:e,Path:o,paths:i,macro:a,part:s,store:n,expand:r,units:l,sa:c,snippets:p,Snippet:h,complete:d,options:f})=>{const m=f.paperlessOffset,u=n.get("hem");if(!r){const t=n.get("width")+2*c,e=n.get("length")+c+(c?u:0);return n.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]}}}),s.hide()}return i.left=(new o).move(e.tl).line(e.bl).hide(),i.right=(new o).move(e.br).line(e.tr).hide(),i.top=(new o).move(e.tr).line(e.tl).hide(),i.fabric=i.left.join(i.right).join(i.top),d&&(i.upFolds.unhide(),i.downFolds.unhide()),a("sprinkle",{snippet:"notch",on:["tl","tr"]}),c&&(i.hem=a("hem",{class:"fabric",path1:"left",path2:"right",hemWidth:u}),i.sa=a("sa",{paths:["left",{p:"hem",offset:0},"right","top"]}
1)),a("sprinkle",{snippet:"notch",on:["rNotch","lNotch"]}),a("hd",{id:"length",from:e.tl,to:e.tr,y:m}),d&&(a("hd",{id:"pleatA",to:e.pleat3_top_down,from:e.pleat3_top_up,y:2*m}),a("hd",{id:"pleatB",from:e.pleat3_top_down,to:e.pleat4_top_up,y:2*m})),a("vd",{id:"width",from:e.tl,to:e.bl,x:m}),p.logo=new h("logo",e.logo),a("title",{at:e.title,nr:1,title:"panel",align:"center"}),s}},Id={name:"sunny.binding",measurements:[],optionalMeasurements:[],plugins:[Pp.e2],from:Dd,draft:({Point:t,points:e,Path:o,paths:i,macro:a,part:s,options:n,expand:r,store:l,units:c,snippets:p,Snippet:h,complete:d,sa:f})=>{const m=n.paperlessOffset,u=l.get("width"),g=l.get("bindingWidth");return n.fabricBinding?r?(d&&(i.bfold1=(new o).move(e.bfold1tr).line(e.bfold1tl).move(e.bfold1br).line(e.bfold1bl).addClass("fabric dashed stroke-sm"),i.bfold2=(new o).move(e.bfold2r).line(e.bfold2l).addClass("fabric lashed stroke-sm")),i.bLeft=(new o).move(e.tl).line(e.bbl).hide(),i.bRight=(new o).move(e.bbr).line(e.btr).hide(),i.bTop=(new o).move(e.btr).line(e.tl).hide(),i.bBottom=(new o).move(e.bbl).line(e.bbr).hide(),i.binding=i.bLeft.clone().join(i.bBottom).join(i.bRight).join(i.bTop),f&&(i.sa=a("sa",{paths:["bLeft",{p:"bBottom",offset:0},"bRight",{p:"bTop",offset:0}]})),a("hd",{id:"length",from:e.tl,to:e.btr,y:10}),a("vd",{id:"width",from:e.tl,to:e.bbl,x:10}),a("sprinkle",{snippet:"notch",on:["tl","btr","bbl","bbr"]}),a("vd",{id:"bfold",from:e.btr,to:e.bfold1tr,x:e.btr.x-m}),l.cutlist.addCut({cut:2,identical:!0}),a("title",{at:e.title,nr:2,title:"binding",align:"center"}),s):(l.flag.note({msg:"sunny:cutBinding",notes:["flag:saUnused","flag:partHiddenByExpand"],replace:{width:c(g),length:c(u+2*f)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),s.hide()):s.hide()}},Nd={name:"sunny.waistband",measurements:[],optionalMeasurements:[],from:Dd,draft:({Point:t,points:e,Path:o,paths:i,macro:a,part:s,options:n,expand:r,store:l,units:c,snippets:p,Snippet:h,complete:d,paperless:f})=>{const m=n.paperlessOffset,u=l.get("waistbandLength"),g=l.get("waistbandWidth");return n.fabricWaistband?r?(i.waistband=(new o).move(e.tl).line(e.wbl).line(e.wbr).line(e.wtr).line(e.tl).close(),d?(i.fold1=(new o).move(e.wfold1tr).line(e.wfold1tl).move(e.wfold1br).line(e.wfold1bl).addClass("fabric dashed stroke-sm"),i.fold2=(new o).move(e.wfold2r).line(e.wfold2l).addClass("fabric lashed stroke-sm"),a("hd",{id:"length",from:e.tl,to:e.wtr,y:m}),a("hd",{id:"waistNotch1",from:e.wfold1tl,to:e.wtlNotch,y:e.wfold1tl.y+m}),a("hd",{id:"waistNotch2",to:e.wfold1tr,from:e.wtrNotch,y:e.wfold1tr.y+m}),a("vd",{id:"width",from:e.tl,to:e.wbl,x:m}),a("vd",{id:"wfold",from:e.wtr,to:e.wfold1tr,x:e.wtr.x-m}),l.cutlist.addCut({cut:2,identical:!0}),a("sprinkle",{snippet:"notch",on:["wtlNotch","wtrNotch","wblNotch","wbrNotch"]}),a("title",{at:e.title,nr:n.fabricBinding?3:2,title:"waistband",align:"center"}),s):s):(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]}}}),s.hide()):s.hide()}},Md={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"}}}')},_d=new s.pT({data:Od,parts:[Ed,Id,Nd]}),jd=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}'),Gd={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 Yd({store:t,measurements:e,sa:o,Point:i,points:a,Path:s,paths:n,macro:r,options:l,part:c}){let p=!0;if(void 0===a.cfHem&&(p=!1),a.hem.x=e.hips*(1+l.hipsEase)/4,a.hipsCp2=new i(a.hem.x,p?a.cfWaist.y:a.cbWaist.y),l.ribbing){let o=(e.hpsToWaistBack+e.waistToHips)*l.ribbingHeight;t.setIfUnset("ribbingHeight",o),a.hem=a.hem.shift(90,o),p?a.cfHem=a.cfHem.shift(90,o):a.cbHem=a.cbHem.shift(90,o)}return n.saBase=(new s).move(a.hem).curve_(a.hipsCp2,a.armhole).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.armholePitchCp1,a.armholePitch),n.saBase=p?n.saBase.join(n.frontArmhole):n.saBase.join(n.backArmhole),n.saBase.line(a.s3CollarSplit),n.saBase=p?n.saBase.join(n.frontCollar):n.saBase.join(n.backCollar),n.hemBase=p?(new s).move(a.cfHem).line(a.hem):(new s).move(a.cbHem).line(a.hem),n.saBase.hide(),n.hemBase.hide(),n.seam=n.hemBase.join(n.saBase),p?n.seam.line(a.cfHem):n.seam.line(a.cbHem),n.seam.attr("class","fabric"),o&&(n.sa=n.hemBase.offset(o*(l.ribbing?1:3)).join(n.saBase.offset(o)),p?n.sa.line(a.cfNeck).move(a.cfHem):n.sa.line(a.cbNeck).move(a.cbHem),n.sa.line(n.sa.start()),n.sa.attr("class","fabric sa")),r("rmad"),r("pd",{id:"lArmhole",path:(new s).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:o+15}),r("pd",{id:"lShoulderToArmholePitch",path:(new s).move(a.armholePitch).curve(a.armholePitchCp2,a.shoulderCp1,a.shoulder),d:-15}),r("vd",{id:"hHemToHips",from:a.hem,to:a.waist,x:a.hips.x+o+15}),r("vd",{id:"hHemToArmhole",from:a.hem,to:a.armhole,x:a.hips.x+o+30}),r("vd",{id:"hHemToArmholePitch",from:a.hem,to:a.armholePitch,x:a.hips.x+o+45}),r("vd",{id:"hHemToShoulder",from:a.hem,to:a.shoulder,x:a.hips.x+o+60}),r("vd",{id:"hFull",from:a.hem,to:a.neck,x:a.hips.x+o+75}),r("ld",{from:a.neck,to:a.shoulder,d:o+15,id:"lShoulderSeam"}
1),a.cxHem=new i(0,a.hem.y),a.cxNeck=a.cbNeck?a.cbNeck.copy():a.cfNeck.copy(),r("hd",{id:"wAtHem",from:a.cxHem,to:a.hem,y:a.hem.y+o+15}),r("hd",{id:"wAtArmhole",from:a.cxHem,to:a.armhole,y:a.hem.y+o+30}),r("hd",{id:"wNeckToHps",from:a.cxNeck,to:a.s3CollarSplit,y:a.s3CollarSplit.y-o-15}),r("hd",{id:"wNeckToShoulder",from:a.cxNeck,to:a.s3ArmholeSplit,y:a.s3CollarSplit.y-o-15}),r("hd",{id:"wNeckToArmhole",from:a.cxNeck,to:a.armhole,y:a.s3CollarSplit.y-o-45}),r("hd",{id:"wArmholeToPitch",from:a.armholePitch,to:a.armhole,y:a.armhole.y}),c}const Ud=["hips","waist"],zd={pct:8,min:-4,max:20,...(0,s.Wx)("hips"),menu:"fit"},Jd={bool:!0,menu:"style"},$d={waistEase:.08,collarEase:{pct:10,min:5,max:30,...(0,s.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:zd,ribbing:Jd},Xd={name:"sven.front",from:N,options:$d,hide:s.V9.HIDE_TREE,measurements:Ud,draft:Yd},Qd={name:"sven.back",from:I,options:$d,hide:s.V9.HIDE_TREE,measurements:Ud,draft:Yd};const Kd={name:"sven.sleeve",from:T,hide:s.V9.HIDE_TREE,after:[Xd,Qd],options:{ribbing:Jd,cuffEase:{pct:20,min:0,max:200,...(0,s.Wx)("wrist"),menu:"fit"},libraryFitSleeve:!0},draft:function({store:t,sa:e,points:o,paths:i,Path:a,macro:s,options:n,part:r}){if(n.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 i.seam=(new a).move(o.wristRight).line(o.bicepsRight).join(i.sleevecap).line(o.wristLeft).line(o.wristRight).close().attr("class","fabric"),e&&(i.saBase=(new a).move(o.wristRight).line(o.bicepsRight).join(i.sleevecap).line(o.wristLeft),i.hemBase=(new a).move(o.wristLeft).line(o.wristRight),i.saBase.hide(),i.hemBase.hide(),i.sa=i.saBase.offset(e).join(i.hemBase.offset(e*(n.ribbing?1:3))),i.sa.line(i.sa.start()).close().attr("class","fabric sa")),s("grainline",{from:o.centerWrist,to:o.sleeveTop}),s("rmad"),s("vd",{id:"hWristToArmhole",from:o.wristLeft,to:o.bicepsLeft,x:o.bicepsLeft.x-e-15}),s("vd",{id:"hFull",from:o.wristLeft,to:o.sleeveTip,x:o.bicepsLeft.x-e-30}),s("hd",{id:"wFull",from:o.bicepsLeft,to:o.bicepsRight,y:o.sleeveTip.y-e-30}),s("hd",{id:"wCuff",from:o.wristLeft,to:o.wristRight,y:o.wristLeft.y+e*(n.ribbing?1:3)+15}),s("pd",{id:"lSleevecap",path:i.sleevecap.reverse(),d:-1*e-15}),r}},Vd=function({store:t,measurements:e,options:o,points:i,paths:a,Path:s,Point:n,sa:r,macro:l,units:c,part:p},h){const d=(e.hpsToWaistBack+e.waistToHips)*o.ribbingHeight;p.context.settings.sample?t.set("ribbingHeight",d):t.setIfUnset("ribbingHeight",d),i.topLeft=new n(0,0),i.topRight=new n(2*d,0),i.bottomLeft=new n(0,h),i.bottomRight=new n(2*d,h),a.seam=(new s).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).line(i.topLeft).close().attr("class","various"),r&&(a.sa=a.seam.offset(r).addClass("various sa")),i.title=new n(i.bottomRight.x/2,i.bottomRight.y/2),l("vd",{from:i.bottomRight,to:i.topRight,x:i.topRight.x+r+15,text:c(h)}),l("hd",{from:i.topLeft,to:i.topRight,y:i.topRight.y-r-15})};const qd={pct:15,min:0,max:30,menu:"fit"},Zd={name:"sven.cuff",measurements:["wrist"],after:Kd,options:{ribbing:Jd,ribbingStretch:qd},draft:function(t){const{measurements:e,sa:o,points:i,macro:a,options:s,store:n,expand:r,units:l,part:c}=t;if(!s.ribbing)return c;const p=e.wrist*(1+s.cuffEase)*(1-s.ribbingStretch);if(!r){const t=o?2*o:0;return n.flag.note({msg:"sven:cutCuff",notes:[o?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:l((e.hpsToWaistBack+e.waistToHips)*s.ribbingHeight+t),l:l(p+t)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),n.flag.preset("expandIsOff"),c.hide()}return n.flag.preset("expandIsOn"),Vd(t,p),n.cutlist.setCut({cut:2,from:"ribbing"}),a("title",{at:i.title,nr:5,title:"cuff",align:"center"}),c}};const tf={name:"sven.waistband",measurements:["hips"],options:{ribbing:Jd,ribbingStretch:qd,hipsEase:zd},draft:function(t){const{measurements:e,points:o,macro:i,options:a,store:s,expand:n,units:r,sa:l,part:c}=t;if(!a.ribbing)return c;const p=e.hips*(1+a.hipsEase)*(1-a.ribbingStretch);if(!n){const t=l?2*l:0;return s.flag.note({msg:"sven:cutWaistband",notes:[l?"flag:saIncluded":"flag:saExcluded","flag:partHiddenByExpand"],replace:{w:r((e.hpsToWaistBack+e.waistToHips)*a.ribbingHeight+t),l:r(p+t)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),s.flag.preset("expandIsOff"),c.hide()}return s.flag.preset("expandIsOn"),Vd(t,p),s.cutlist.setCut({cut:2,from:"ribbing"}),i("title",{at:o.title,nr:4,title:"waistband",align:"center"}),c}},ef=new s.pT({data:jd,parts:[Xd,Qd,Kd,Zd,tf]}),of=(0,s.D4)([_,Gd]),af=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}'),sf={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 nf={name:"tamiko.top",plugins:[O],draft:function({sa:t,Point:e,points:o,Path:i,paths:a,Snippet:s,snippets:n,options:r,measurements:l,store:c,macro:p,part:h}){const d=l.shoulderToShoulder,f=l.chest/2*(1+r.chestEase),m=(1+r.lengthBonus)*(l.hpsToWaistBack+l.waistToHips),u=d*r.armholeDepthFactor,g=d*r.shoulderseamLength;
1o.shoulderEdge=new e(0,0),o.armgapTop=new e(5,0),o.armgapNeck=o.armgapTop.shift(-90,g),o.bottomLeft=new e(0,d),o.armholeTop=new e(d/4,d),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,d*r.shoulderseamLength).rotate(l.shoulderSlope,o.armholeTop),o.armgapBottom=o.armgapTop.shift(0,u),o.armgapBottom=o.armholeBottom.shiftTowards(o.armgapBottom,f),o.sideBottom=o.armgapTop.shiftTowards(o.armgapBottom,m),o.sideEdge=o.armgapTop.shiftTowards(o.armgapBottom,m);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,m),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),a.seam=(new i).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&&(a.sa=(new i).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),n.logo=new s("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+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}),h},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,s.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"}}},rf=new s.pT({data:af,parts:[nf]}),lf=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}'),cf={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 pf={name:"teagan.front",from:E,measurements:["hips","waist"],hide:s.V9.HIDE_TREE,options:{bicepsEase:.05,shoulderEase:0,collarEase:0,shoulderSlopeReduction:0,sleeveWidthGuarantee:.85,frontArmholeDeeper:.005,chestEase:{pct:12,min:5,max:25,...(0,s.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,s.Wx)("waist"),menu:(t,e)=>!!e.fitWaist&&"fit"},hipsEase:{pct:18,min:8,max:30,...(0,s.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"}}
1,draft:function({complete:t,utils:e,store:o,sa:i,Point:a,points:s,Path:n,paths:r,Snippet:l,snippets:c,options:p,measurements:h,macro:d,log:f,units:m,part:u}){for(let g of Object.keys(r))r[g].hide();if(p.fitWaist){let t,e,o,i;t=h.waist*(1+p.waistEase)/4,e=h.hips*(1+p.hipsEase)/4,s.hem.x=e,s.hips.x=e,s.waist.x=t,o=.6*s.armhole.dy(s.waist),i=.25*s.hips.dy(s.waist),s.waistCp1=s.waist.shift(90,2*i/3-o/3),s.waistCp2=s.waist.shift(90,2*o/3-i/3),s.hipsCp2=s.hips.shift(90,.3*s.waist.dy(s.hips)),t>e&&f.warn("width at waist exceeds width at hips; consider disabling the curve to waist option for a more standard shape")}else{let t;t=h.waist>h.hips?h.waist*(1+p.hipsEase)/4:h.hips*(1+p.hipsEase)/4,s.hem.x=t,s.hips.x=t,s.waist.x=t,s.waistCp2=s.waist.shift(90,s.armhole.dy(s.waist)/3)}for(let g of["Neck","Shoulder","Armhole","Hips","Hem"])s[`cf${g}`]=s[`cb${g}`].clone();if(s.cfNeck=new a(0,p.necklineDepth*h.hpsToWaistBack),s.cfNeckCp1=s.cfNeck.shift(0,s.neck.x*p.necklineBend*2),s.neck=s.hps.shiftFractionTowards(s.shoulder,p.necklineWidth),s.neckCp2=s.neck.shiftTowards(s.shoulder,s.neck.dy(s.cfNeck)*(.2+p.necklineBend)).rotate(-90,s.neck),s.shoulderCp1=e.beamIntersectsY(s.shoulder,s.shoulderCp1,s.armholePitch.y),s.armholeHollowCp2=e.beamIntersectsX(s.armholeHollow,s.armholeHollowCp2,s.armholePitch.x),o.flag.info({msg:"teagan:fullLengthFromHps",replace:{length:m(s.hps.dy(s.hem))}}),o.set("lengthFrontNeckOpening",2*(new n).move(s.neck).curve(s.neckCp2,s.cfNeckCp1,s.cfNeck).length()),p.fitWaist){if(s.hem.y<s.hipsCp2.y){const t=(new n).move(new a(s.hem.x,s.hipsCp2.y)).curve(s.hipsCp2,s.waistCp1,s.waist).curve_(s.waistCp2,s.armhole);s.hem=t.intersectsY(s.hem.y)[0];const e=t.split(s.hem);
1e[1].ops.length<3?(s.hipsCp2=s.hem.copy(),s.waistCp1=s.hem.copy(),s.waist=s.hem.copy()):(s.hipsCp2=e[1].ops[1].cp1.copy(),s.waistCp1=e[1].ops[1].cp2.copy(),s.waist=e[1].ops[1].to.copy(),s.waistCp2=e[1].ops[2].cp1.copy())}r.sideSeam=(new n).move(s.hem).curve(s.hipsCp2,s.waistCp1,s.waist).curve_(s.waistCp2,s.armhole).hide()}else r.sideSeam=(new n).move(s.hem).curve_(s.waistCp2,s.armhole).hide();return r.hemBase=(new n).move(s.cfHem).line(s.hem).hide(),r.saBase=(new n).move(s.armhole).curve(s.armholeCp2,s.armholeHollowCp1,s.armholeHollow).curve(s.armholeHollowCp2,s.shoulderCp1,s.shoulder).line(s.neck).curve(s.neckCp2,s.cfNeckCp1,s.cfNeck).hide(),r.seam=(new n).move(s.cfHem).join(r.hemBase).join(r.sideSeam).join(r.saBase).line(s.cfHem).close().attr("class","fabric"),i&&(r.sa=(new n).move(s.cfHem).join(r.hemBase.offset(3*i)).join(r.sideSeam.offset(i)).join(r.saBase.offset(i)).line(s.cfNeck).attr("class","fabric sa")),o.set("library.sleeve.frontArmholeLength",(new n).move(s.armhole).curve(s.armholeCp2,s.armholeHollowCp1,s.armholeHollow).curve(s.armholeHollowCp2,s.shoulderCp1,s.shoulder).length()),s.armholeNotchFront=(new n).move(s.armhole).curve(s.armholeCp2,s.armholeHollowCp1,s.armholeHollow).curve(s.armholeHollowCp2,s.shoulderCp1,s.shoulder).shiftFractionAlong(.5),o.set("library.sleeve.frontArmholeToArmholePitch",o.get("library.sleeve.frontArmholeLength")/2),s.chest=new a(s.armhole.x,s.cbChest.y),t&&(r.chest=(new n).move(s.cbChest).line(s.chest).attr("class","contrast help"),d("banner",{id:"chestLine",classes:"center contrast help",path:r.chest,text:"teagan:chestLine"})),t&&(r.waist=(new n).move(s.cbWaist).line(s.waist).attr("class","contrast help"),d("banner",{id:"waistLine",classes:"center contrast help",path:r.waist,text:"teagan:waistLine"})),o.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),d("cutonfold",{from:s.cfNeck,to:s.cfHem,grainline:!0}),s.title=new a(s.waist.x/2,s.waist.y),d("title",{at:s.title,nr:1,title:"front"}),s.logo=s.title.shift(-90,75),c.logo=new l("logo",s.logo),c.armholeNotch=new l("bnotch",s.armholeNotchFront),d("hd",{id:"wAtHem",from:s.cfHem,to:s.hem,y:s.hem.y+2.5*i+15}),p.fitWaist&&(d("hd",{id:"wHemToWaist",from:s.waist,to:s.hem,y:s.hem.y+2.5*i+30}),d("vd",{id:"hHemToWaist",from:s.hem,to:s.waist,x:s.waist.x-15})),d("vd",{id:"hHemToArmhole",from:s.hem,to:s.armhole,x:s.armhole.x+i+15}),d("vd",{id:"hHemToShoulder",from:s.hem,to:s.shoulder,x:s.armhole.x+i+30}),d("vd",{id:"hFull",from:s.hem,to:s.neck,x:s.armhole.x+i+45}),d("hd",{id:"wFoldToHps",from:s.cfNeck,to:s.neck,y:s.neck.y-i-15}),d("hd",{id:"wFoldToShoulder",from:s.cfNeck,to:s.shoulder,y:s.neck.y-i-30}),d("hd",{id:"wFull",from:s.cfNeck,to:s.armhole,y:s.neck.y-i-45}),d("vd",{id:"hHemToNeck",from:s.cfHem,to:s.cfNeck,x:s.cfHem.x-i-15}),u}};const hf={name:"teagan.back",from:pf,draft:function({store:t,sa:e,Point:o,points:i,Path:a,paths:s,options:n,macro:r,utils:l,units:c,measurements:p,snippets:h,Snippet:d,part:f}){return i.cbNeck=new o(0,i.neck.y+n.backNeckCutout*p.neck),i.cbNeckCp1=i.cbNeck.shift(0,i.neck.x/2),i.neckCp2=l.beamIntersectsY(i.neck,i.neckCp2,i.cbNeck.y),i.shoulderCp1=i.shoulderCp1.shiftFractionTowards(i.shoulder,.25),s.hemBase=(new a).move(i.cfHem).line(i.hem).hide(),n.fitWaist?s.sideSeam=(new a).move(i.hem).curve(i.hipsCp2,i.waistCp1,i.waist).curve_(i.waistCp2,i.armhole).hide():s.sideSeam=(new a).move(i.hem).curve_(i.waistCp2,i.armhole).hide(),s.saBase=(new a).move(i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.shoulderCp1,i.shoulder).line(i.neck).curve(i.neckCp2,i.cbNeckCp1,i.cbNeck).hide(),s.seam=(new a).move(i.cfHem).join(s.hemBase).join(s.sideSeam).join(s.saBase).line(i.cfHem).close().setClass("fabric"),e&&(s.sa=(new a).move(i.cfHem).join(s.hemBase.offset(3*e)).join(s.sideSeam.offset(e)).join(s.saBase.offset(e)).line(i.cbNeck).attr("class","fabric sa")),t.set("sleevecapEase",0),t.set("library.sleeve.backArmholeLength",(new a).move(i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.shoulderCp1,i.shoulder).length()),i.armholeNotchBack=(new a).move(i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.shoulderCp1,i.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 a).move(i.neck).curve(i.neckCp2,i.cbNeckCp1,i.cbNeck).length())}}),t.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),r("cutonfold",{from:i.cfNeck,to:i.cfHem,grainline:!0}
1),r("title",{at:i.title,nr:2,title:"back"}),i.scaleboxAnchor=i.scalebox=i.title.shift(90,100),r("scalebox",{at:i.scalebox}),h.armholeNotch=new d("bnotch",i.armholeNotchBack),r("vd",{id:"hHemToNeck",from:i.cbHem,to:i.cbNeck,x:i.cbHem.x-e-15}),f}};const df={name:"teagan.sleeve",from:T,after:hf,hide:{from:!0},options:{...T.options,sleeveEase:{pct:15,min:5,max:35,menu:"style"},libraryFitSleeve:!0},draft:function({sa:t,Point:e,points:o,Path:i,paths:a,options:s,macro:n,measurements:r,store:l,part:c}){a.sleevecap.hide();const p=o.bicepsRight.x*s.sleeveLength;let h=r.biceps*(1+s.bicepsEase)*(1+s.sleeveEase);return h>2*o.bicepsRight.x&&(h=2*o.bicepsRight.x),o.hemLeft=new e(h/-2,p),o.hemRight=new e(h/2,p),o.top=(new i).move(o.capQ2).curve(o.capQ2Cp2,o.capQ3Cp1,o.capQ3).edge("top"),a.hemBase=(new i).move(o.hemLeft).line(o.hemRight).hide(),a.saBase=(new i).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(),a.seam=(new i).move(o.hemLeft).join(a.hemBase).join(a.saBase).close().attr("class","fabric"),t&&(a.sa=(new i).move(o.hemLeft.shift(-90,3*t)).join(a.hemBase.offset(3*t)).join(a.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(),n("title",{at:o.title,nr:3,title:"sleeve"}),n("grainline",{from:new e(o.top.x,o.hemLeft.y),to:o.top}),n("hd",{id:"wAtHem",from:o.hemLeft,to:o.hemRight,y:o.hemLeft.y+3*t+15}),n("hd",{id:"wFull",from:o.bicepsLeft,to:o.bicepsRight,y:o.hemLeft.y+3*t+30}),n("vd",{id:"hSleeveSeam",from:o.hemRight,to:o.bicepsRight,x:o.bicepsRight.x+t+15}),n("vd",{id:"hFull",from:o.hemRight,to:(new i).move(o.capQ2).curve(o.capQ2Cp2,o.capQ3Cp1,o.capQ3).edge("top"),x:o.bicepsRight.x+t+30}),c}},ff=new s.pT({data:lf,parts:[hf,pf,df]}),mf=(0,s.D4)([_,cf]),uf=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}'),gf={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 bf={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:i,measurements:a,options:s,macro:n,complete:r,snippets:l,Snippet:c,store:p,sa:h,part:d}){const f="toElbow"===s.width?a.shoulderToElbow:"toMidArm"===s.width?a.shoulderToElbow/2:0;let m=(a.shoulderToShoulder/2+f)*s.widthBonus;!1===s.forceWidth&&(m<a.waist/4&&(m=a.waist/4*s.widthBonus),m<a.hips/4&&(m=a.hips/4*s.widthBonus),m<a.chest/4&&(m=a.chest/4*s.widthBonus),m<a.seat/4&&(m=a.seat/4*s.widthBonus));const u="toKnee"===s.length?a.waistToKnee:"toMidLeg"===s.length?a.waistToKnee/1.3:.95*a.waistToFloor,g=(a.hpsToWaistBack+u)*s.lengthBonus,b=a.head/4*s.headRatio,k=a.biceps/2*1.3*s.armholeDrop,w=s.clavusWidth*m/13/s.widthBonus;return e.top=new t(0,0),e.bottom=new t(0,g),e.topLeft=e.top.shift(0,-m),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,k),i.saBase=(new o).move(e.top).line(e.topLeft).line(e.bottomLeft).hide(),i.hem=(new o).move(e.bottomLeft).line(e.bottom).hide(),i.fold=(new o).move(e.bottom).line(e.top).hide(),i.seam=i.saBase.join(i.hem).join(i.fold).unhide().attr("class","fabric"),s.clavi&&r&&(e.claviCenterTop=e.top.shiftFractionTowards(e.topLeft,s.clavusLocation),e.claviRightTop=e.claviCenterTop.shift(0,w),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),i.clavi=(new o).move(e.claviRightBottom).line(e.claviRightTop).move(e.claviLeftBottom).line(e.claviLeftTop).addClass("note dashed"),n("banner",{path:i.clavi,text:"tiberius:biasTape",classes:"center fill-note text-sm",repeat:69})),h&&(i.sa=i.saBase.offset(h).join(i.hem.offset(2.5*h)).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),n("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),n("title",{at:e.title,nr:1,title:"tunica",align:"center"}),e.scalebox=e.midTop.shiftFractionTowards(e.midBottom,.7),n("scalebox",{at:e.scalebox}),n("vd",{id:"hFull",from:e.bottom,to:e.top,x:e.bottomLeft.x-30-h}),n("vd",{id:"hToNotch",from:e.bottomLeft,to:e.armholeLeft,x:e.armholeLeft.x-15-h}),n("vd",{id:"hFromNotch",from:e.armholeLeft,to:e.topLeft,x:e.armholeLeft.x-15-h}),n("hd",{id:"wFull",from:e.topLeft,to:e.top,y:e.top.y-h-(s.clavi?60:30)}),n("hd",{id:"wNotchToFold",to:e.top,from:e.headLeft,y:e.top.y-15-h}
1),s.clavi&&(n("hd",{id:"wClavi1ToFold",from:e.claviRightTop,to:e.top,y:e.top.y-30-h}),n("hd",{id:"wClavi2ToFold",from:e.claviLeftTop,to:e.top,y:e.top.y-45-h})),d}},kf=new s.pT({data:uf,parts:[bf]}),wf=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}'),Cf={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."}}}')},vf={tipWidth:{pct:15,min:5,max:35,snap:Ro.Hw,...(0,s.Wx)("neck"),menu:"style"},knotWidth:{pct:8,min:4,max:12,snap:Ro.Hw,...(0,s.Wx)("neck"),menu:"style"},lengthBonus:{pct:0,min:-50,max:50,menu:"style"}},Tf=({store:t,measurements:e,options:o,absoluteOptions:i})=>{const a=(e.hpsToWaistBack+e.waistToHips+e.neck/2)*(1+o.lengthBonus);let s=.7*i.tipWidth;s<i.knotWidth&&(s=o.knotWidth),t.set("halfLength",a),t.set("backTip",s)},yf=({points:t,Point:e,store:o,utils:i,paths:a,Path:s,macro:n,absoluteOptions:r},l,c,p=!1)=>{const h=o.get("halfLength"),d=l/2,f=c/2;t.tip=new e(0,0),t.mid=new e(0,h),t.tipRight=new e(d,d),t.tipLeft=t.tipRight.flipX(),t._tmp1=t.mid.shift(0,f),t._tmp2=t._tmp1.rotate(45,t.mid),t.midRight=i.beamsIntersect(t.mid,t._tmp2,t.tipRight,t._tmp1),t._tmp3=t.mid.shift(180,f),t._tmp4=t._tmp3.rotate(45,t.mid),t.midLeft=i.beamsIntersect(t.mid,t._tmp4,t.tipLeft,t._tmp3),t.gridAnchor=new e(0,t.tipRight.y),t.title=new e(0,h/5),p&&(t.notch1=t.tip.shift(-45,r.tipWidth/5),t.notch2=t.tip.shift(-135,r.tipWidth/5),n("sprinkle",{snippet:"notch",on:["notch1","notch2","mid"]})),a.seam=(new s).move(t.tip).line(t.tipLeft).line(t.midLeft).line(t.midRight).line(t.tipRight).line(t.tip).close()},xf=({points:t,macro:e,paths:o,Path:i,complete:a},s=!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}),s?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}),a&&(o.hint=(new i).move(t._tmp3).line(t._tmp1).line(t.midRight).attr("class","dotted")))},Bf=({paths:t,Path:e,points:o,sa:i},a)=>{t.sa=(new e).move(o.tipLeft).line(o.tip).line(o.tipRight).offset(-1*i).attr("class","sa "+a),t.sa.move(t.sa.end()).line(o.tipRight).move(t.sa.start()).line(o.tipLeft)};const Sf={name:"trayvon.interfacingTail",measurements:["hpsToWaistBack","waistToHips","neck"],options:vf,draft:function(t){const{paths:e,points:o,macro:i,complete:a,Path:s,store:n,absoluteOptions:r}=t;return Tf(t),yf(t,n.get("backTip"),r.knotWidth),e.seam.addClass("interfacing"),n.cutlist.addCut({cut:1,material:"interfacing"}),i("title",{at:o.title,nr:2,title:"interfacingTail",rotation:-90}),xf(t),a&&(e.n45=(new s).move(o.midLeft).line(o.midRight).addClass("hidden").addText("45\xb0","center text-sm fill-note")),t.part}},Lf={name:"trayvon.interfacingTip",measurements:["hpsToWaistBack","waistToHips","neck"],options:vf,draft:function(t){const{paths:e,points:o,macro:i,complete:a,Path:s,absoluteOptions:n,store:r}=t;return Tf(t),yf(t,n.tipWidth,n.knotWidth),e.seam.addClass("interfacing"),r.cutlist.addCut({cut:1,material:"interfacing"}),i("title",{at:o.title,nr:1,title:"interfacingTip",rotation:-90}),xf(t),a&&(e.n45=(new s).move(o.midLeft).line(o.midRight).addClass("hidden").addText("45\xb0","center text-sm fill-note")),t.part}};const Pf={name:"trayvon.liningTail",measurements:["hpsToWaistBack","waistToHips","neck"],options:vf,draft:function(t){const{Path:e,Snippet:o,macro:i,options:a,paths:s,points:n,sa:r,snippets:l,store:c,absoluteOptions:p}=t;return Tf(t),yf(t,2.5*c.get("backTip"),2.5*a.knotWidth),n.cutRight=n.tipRight.shiftTowards(n.midRight,2.5*p.tipWidth),n.cutLeft=n.cutRight.flipX(),s.seam=(new e).move(n.tip).line(n.tipLeft).line(n.cutLeft).line(n.cutRight).line(n.tipRight).line(n.tip).close().addClass("lining"),r&&Bf(t,"lining"),c.cutlist.addCut({cut:1,material:"lining"}),i("title",{at:n.title,nr:6,title:"liningTip",rotation:-90}),l.notch=new o("notch",n.tip),xf(t,!0),t.part}},Rf={name:"trayvon.liningTip",measurements:["hpsToWaistBack","waistToHips","neck"],options:vf,draft:function(t){const{Path:e,Snippet:o,macro:i,paths:a,points:s,sa:n,snippets:r,absoluteOptions:l,store:c}=t;return Tf(t),yf(t,2.5*l.tipWidth,2.5*l.knotWidth),s.cutRight=s.tipRight.shiftTowards(s.midRight,2.5*l.tipWidth),s.cutLeft=s.cutRight.flipX(),a.seam=(new e).move(s.tip).line(s.tipLeft).line(s.cutLeft).line(s.cutRight).line(s.tipRight).line(s.tip).close().addClass("lining"),n&&Bf(t,"lining"),c.cutlist.addCut({cut:1,material:"lining"}),i("title",{at:s.title,nr:5,title:"liningTip",rotation:-90}),r.notch=new o("notch",s.tip),i("miniscale",{at:s.gridAnchor}),xf(t,!0),t.part}};const Ff={name:"trayvon.fabricTail",measurements:["hpsToWaistBack","waistToHips","neck"],options:vf,draft:function(t){const{Path:e,complete:o,macro:i,paths:a,points:s,sa:n,store:r,absoluteOptions:l}=t;return Tf(t),yf(t,2.5*r.get("backTip"),2.5*l.knotWidth,!0),a.seam.addClass("fabric"),n&&Bf(t,"fabric"),r.cutlist.addCut({cut:1}),i("title",{at:s.title,nr:4,title:"fabricTail",rotation:-90}),xf(t),i("ld",{id:"lTipToNotch1",from:s.tip,to:s.notch1,d:l.tipWidth/-2.5}),i("ld",{id:"lTipToNotch2",from:s.notch2,to:s.tip,d:l.tipWidth/-2.5}),o&&(a.n45=(new e).move(s.midLeft).line(s.midRight).addClass("hidden").addText("45\xb0","center")),t.part}},Wf={name:"trayvon.fabricTip",measurements:["hpsToWaistBack","waistToHips","neck"],options:vf,draft:function(t){const{Path:e,Snippet:o,complete:i,macro:a,paths:s,points:n,sa:r,snippets:l,absoluteOptions:c,store:p}=t;return Tf(t),yf(t,2.5*c.tipWidth,2.5*c.knotWidth,!0),s.seam.addClass("fabric"),r&&Bf(t,"fabric"),p.cutlist.addCut({cut:1}),a("title",{at:n.title,nr:3,title:"fabricTip",rotation:-90}),n.logo=n.tip.shiftFractionTowards(n.mid,.4),l.logo=new o("logo",n.logo),xf(t),a("ld",{id:"lTipToNotch1",from:n.tip,to:n.notch1,d:c.tipWidth/-2.5}),a("ld",{id:"lTipToNotch2",from:n.notch2,to:n.tip,d:c.tipWidth/-2.5}),i&&(s.n45=(new e).move(n.midLeft).line(n.midRight).addClass("hidden").addText("45\xb0","center")),t.part}};const Hf={name:"trayvon.fabricLoop",after:Lf,measurements:["hpsToWaistBack","waistToHips","neck"],draft:function({points:t,Point:e,paths:o,Path:i,store:a,macro:s,expand:n,units:r,part:l}){const c=3.5*a.get("backTip"),p=a.get("backTip");return n?(a.flag.preset("expandIsOn"),t.topLeft=new e(0,0),t.bottomRight=new e(3.5*a.get("backTip"),a.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 i).move(t.topLeft).line(t.bottomLeft).line(t.bottomRight).line(t.topRight).line(t.topLeft).close().attr("class","fabric"),a.cutlist.addCut({cut:1,material:"lining"}),t.title=t.topLeft.shiftFractionTowards(t.bottomRight,.5),s("title",{nr:7,title:"loop",at:t.title,align:"center",scale:.666}),s("hd",{id:"wFull",from:t.bottomLeft,to:t.bottomRight,y:t.bottomRight.y+15}),s("vd",{id:"hFull",from:t.topRight,to:t.bottomRight,x:t.topRight.x+15}),l):(a.flag.note({msg:"trayvon:cutLoop",replace:{width:r(c),length:r(p)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),a.flag.preset("expandIsOff"),l.hide())}},Af=new s.pT({data:wf,parts:[Sf,Lf,Pf,Rf,Ff,Wf,Hf]}),Of={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."}}}')},Df=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}'),Ef={name:"tristan.frontPoints",from:Qa,hide:s.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,s.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:i,options:a,macro:s,store:n,utils:r,units:l,part:c})=>{const p=1==a.lacing&&"front"==a.lacingLocation;for(const m of Object.keys(o))o[m].hide();for(const m in i)delete i[m];s("rmtitle"),s("rmscalebox"),s("rmcutonfold"),t.sideWaist=t.sideHem.clone(),t.sideWaistInitial=t.sideHemInitial.clone(),t.cfWaist=t.cfHem.clone(),n.cutlist.removeCut();const h=t.shoulderDartInside.dist(t.hps),d=t.shoulderDartOutside.dist(t.shoulder);let f=(h+d)*a.strapWidth;if(f/2>h&&(f=2*h),f/2>d&&(f=2*d),n.set("strapWidth",f),f!=(h+d)*a.strapWidth&&n.flag.info({msg:"tristan:strapWidthAdjusted",replace:{width:l(f)}}),t.strapInside=t.shoulderDartInside.shiftTowards(t.hps,f/2),t.strapOutside=t.shoulderDartOutside.shiftTowards(t.shoulder,f/2),t.cfCut=t.cfNeck.shiftFractionTowards(t.cfBust,a.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-a.cutRoundnessFront),t.strapInsideCp=t.strapInside.shiftFractionTowards(t.cutSeamInside.shift(t.cutSeamInside.angle(t.shoulderDartInside)+90,f/2),1-a.cutRoundnessFront),t.armholeCutCp=t.armhole.shiftFractionTowards(t.bustDartTip,a.armholeFrontIn),t.strapOutsideCp=t.strapOutside.shiftFractionTowards(t.bustDartTip.shift(t.cutSeamOutside.angle(t.shoulderDartOutside)-90,f/2),a.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)*a.lacingWidth),t.lacingWaist=t.cfWaist.shiftTowards(t.waistDartLeft,(t.strapInsideCp.x-t.cfCut.x)*a.lacingWidth)),a.hem&&!a.peplum){const e=t.cfWaist.dist(t.cfNeck)*a.hemSize;n.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 i=t.sideWaistHemIn.shift(t.sideWaist.angle(t.waistDartRight),1.5*t.sideWaist.dist(t.waistDartRight));t.waistDartRightHem=r.beamIntersectsCurve(t.sideWaistHemIn,i,t.waistDartRight,t.waistDartRightCp,t.waistUpDartRightCpDown,t.waistUpDartRight),s("mirror",{clone:!1,mirror:[t.cfWaist,t.waistDartLeft],points:["waistDartLeftHem"]}),s("mirror",{clone:!1,mirror:[t.sideWaist,t.waistDartRight],points:["waistDartRightHem"]})}
1return n.set("frontOutsideWaistLength",t.waistDartRight.dist(t.sideWaist)),n.set("frontInsideWaistLength",t.waistDartLeft.dist(p?t.lacingWaist:t.cfWaist)),n.set("frontLength",t.cfNeck.dist(t.cfWaist)),n.set("sideSeamLength",t.armhole.dist(t.sideWaist)),c}},If={name:"tristan.frontInside",from:Ef,draft:({store:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,options:l,macro:c,part:p})=>{delete i.waistDartHem,delete i.waistDartRight,delete i.waistDartRightCp,delete i.waistDartCpBottom,delete i.bustDartBottom,delete i.bustDartCpBottom,delete i.bustDartTip,delete i.bustDartTop,delete i.shoulderDartTipCpDownOutside,delete i.ex,delete i.bustB,delete i.shoulder,delete i.shoulderDartShoulder,delete i.shoulderDartOutside,delete i.pitchMax,delete i.armholeCpTarget,delete i.armholePitch,delete i.armholePitchCp1,delete i.armholePitchCp2,delete i.armhole,delete i.armholeCp2,delete i.bustDartCpTop,delete i.bustSide,delete i.bustDartMiddle,delete i.bustDartEdge;const h=1==l.lacing&&"front"==l.lacingLocation;s.cut=(new a).move(i.strapInside).curve(i.strapInsideCp,i.cfCutCp,h?i.lacingCut:i.cfCut),s.insideSeamTemp=(new a).move(i.waistDartLeft).curve(i.waistDartLeftCp,i.shoulderDartTipCpDownInside,i.shoulderDartTip).line(i.shoulderDartInside).join(s.cut).hide(),l.hem&&!l.peplum?(s.insideSeam=(new a).move(i.waistDartLeftHem).line(i.waistDartLeft).join(s.insideSeamTemp),s.hemFold=(new a).move(h?i.lacingWaist:i.cfWaist).line(i.waistDartLeft).addClass("note dashed").addText("hem","center note")):s.insideSeam=(new a).move(h?i.lacingWaist:i.cfWaist).line(i.waistDartLeft).join(s.insideSeamTemp);const d=h?(new a).move(i.lacingCut).line(i.lacingWaist):(new a).move(i.cfCut).line(i.cfWaist);if(l.hem&&!l.peplum&&d.line(i.cfHem),s.seam=s.insideSeam.clone().join(d).close().attr("class","fabric"),t.set("shoulderDartTipNotch",(new a).move(i.waistDartLeft).curve(i.waistDartLeftCp,i.shoulderDartTipCpDownInside,i.shoulderDartTip).length()),h){t.cutlist.addCut({cut:2,from:"fabric"}),s.originalSide=(new a).move(i.lacingCut).line(i.cfCut).line(i.cfWaist).line(i.lacingWaist).setClass("note dashed");const e=i.waistDartLeft.shift(135,10);c("grainline",{from:new o(e.x,i.cfCut.y),to:e,grainline:!0});const l=i.lacingWaist.y-i.lacingCut.y;if(l>
175){const t=Math.floor(l/15),e=l/(t+1);for(let a=0;a<t;a++)i["eyelet"+a]=new o(i.lacingCut.x+10,i.lacingCut.y+a*e+e),r["eyelet"+a]=new n("eyelet",i["eyelet"+a])}}else"front"==l.zipperLocation?(t.cutlist.addCut({cut:2,from:"fabric"}),c("grainline",{from:i.cfCut.shift(315,10),to:i.cfWaist.shift(45,10),grainline:!0})):(c("cutonfold",{from:i.cfCut,to:i.cfWaist,grainline:!0}),t.cutlist.addCut({cut:1,from:"fabric"}));return r.shoulderDartTip=new n("notch",i.shoulderDartTip),i.titleAnchor=i.waistDartLeft.shiftFractionTowards(h?i.lacingCut:i.cfCut,.75),c("title",{at:i.titleAnchor,nr:1,title:"tristan:frontInside"}),i.gridAnchor=i.hps.clone(),e&&("front"==l.zipperLocation?s.sa=s.seam.offset(e).attr("class","fabric sa"):l.hem&&!l.peplum?s.sa=(new a).move(i.waistDartLeftHem).join(s.insideSeam.offset(e)).line(h?i.lacingCut:i.cfCut).attr("class","fabric sa"):s.sa=(new a).move(h?i.lacingWaist:i.cfWaist).join(s.insideSeam.offset(e)).line(h?i.lacingCut:i.cfCut).attr("class","fabric sa")),c("hd",{from:h?i.lacingWaist:i.cfWaist,to:i.shoulderDartInside,y:i.hps.y-25,id:"hpsToDart"}),c("vd",{from:i.cfWaist,to:i.shoulderDartInside,x:-30,id:"waistToDart"}),c("vd",{from:i.cfWaist,to:i.shoulderDartTip,x:-10,id:"waistToDartTip"}),c("hd",{from:h?i.lacingWaist:i.cfWaist,to:i.shoulderDartTip,y:i.cfWaist.y+e+25,id:"middleToDartTip"}),c("vd",{from:i.cfWaist,to:h?i.lacingCut:i.cfCut,x:-20,id:"waistToNeck"}),c("vd",{from:i.cfWaist,to:i.strapInside,x:-40,id:"waistToHps"}),c("hd",{from:h?i.lacingWaist:i.cfWaist,to:i.waistDartLeft,y:i.cfWaist.y+e+15,id:"middleToDart"}),c("hd",{from:h?i.lacingCut:i.cfCut,to:i.strapInside,y:i.strapInside.y-e-15,id:"middleToHps"}),p}},Nf={name:"tristan.frontOutside",from:Ef,after:If,draft:({store:t,sa:e,points:o,Path:i,paths:a,Snippet:s,snippets:n,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,a.cut=(new i).move(o.armhole).curve(o.armholeCutCp,o.strapOutsideCp,o.strapOutside).hide(),a.armhole=(new i).move(o.armhole).curve(o.armholeCp2,o.armholePitchCp1,o.armholePitch).curve_(o.armholePitchCp2,o.shoulder).hide(),r.hem&&!r.peplum?(a.hem=(new i).move(o.waistDartRight).line(o.waistDartRightHem).line(o.sideWaistHem).line(o.sideWaist).hide(),a.hemFold=(new i).move(o.waistDartRight).line(o.sideWaist).addClass("note dashed").addText("hem","center note")):a.hem=(new i).move(o.waistDartRight).line(o.sideWaist).hide(),a.seamSA=(new i).move(o.sideWaist).line(o.armhole).join(a.cut).line(o.shoulderDartOutside).join(a.princessSeam).line(o.waistDartRight).hide(),a.seam=a.seamSA.clone().join(a.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=a.princessSeam.shiftAlong(a.princessSeam.length()-t.get("shoulderDartTipNotch")),n.shoulderDartTip=new s("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?a.sa=(new i).move(o.sideWaistHem).join((new i).move(o.sideWaistHem).join(a.seamSA).line(o.waistDartRightHem).offset(e)).line(o.waistDartRightHem).attr("class","fabric sa"):a.sa=a.seam.offset(e).attr("class","fabric sa"));const p=a.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}},Mf={name:"tristan.backPoints",from:Ua,after:Ef,hide:s.V9.HIDE_ALL,draft:({points:t,Path:e,paths:o,options:i,snippets:a,macro:s,utils:n,store:r,part:l})=>{const c=1==i.lacing&&"back"==i.lacingLocation;for(const h of Object.keys(o))o[h].hide();for(const h in a)delete a[h];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(i.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-i.cutRoundnessBack),t.strapInsideCp=t.strapInside.shiftFractionTowards(t.cutSeamInside.shift(t.cutSeamInside.angle(t.shoulderDart)+90,p/2),1-i.cutRoundnessBack),t.armholeCutCp=t.armhole.shift(180,i.armholeBackIn*t.armhole.dist(t.dartTip)),t.strapOutsideCp=t.strapOutside.shiftFractionTowards(t.dartTip.shift(t.dartTip.angle(t.shoulderDart)-90,p/2),i.armholeFrontDepth),c){let e=(t.strapInsideCp.x-t.cbCut.x)*i.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),i.hem&&!i.peplum){const e=r.get("hemSize"),o=(c?t.lacingWaist:t.waistCenter).shiftTowards(c?t.lacingCut:t.cbCut,e),i=o.shift((c?t.lacingWaist:t.cbWaist).angle(t.dartBottomLeft),1.5*(c?t.lacingWaist:t.cbWaist).dist(t.dartBottomLeft)),a=i.shiftOutwards(o,100);t.waistCenterHem=c?n.beamsIntersect(a,i,t.lacingWaist,t.cbCut):n.beamIntersectsCurve(a,i,t.waistCenter,t.waistCenter,t.cbCutCp2,c?t.lacingCut:t.cbCut),t.dartBottomLeftHem=n.beamIntersectsCurve(a,i,t.dartBottomLeft,t.dartLeftCp,t.shoulderDartCpDown,t.dartTip),s("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)),h=p.shiftOutwards(l,100);t.waistSideHem=n.beamIntersectsCurve(h,p,t.waistSide,t.waistSideCp2,t.armhole,t.armhole),t.dartBottomRightHem=n.beamIntersectsCurve(h,p,t.dartTip,t.shoulderDartCpDown,t.dartRightCp,t.dartBottomRight),s("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}},_f={name:"tristan.backInside",from:Mf,draft:({sa:t,Point:e,points:o,Path:i,paths:a,Snippet:s,snippets:n,options:r,store:l,macro:c,part:p})=>{const h=1==r.lacing&&"back"==r.lacingLocation;if(c("rmtitle"),l.cutlist.removeCut(),a.cut=(new i).move(o.strapInside).curve(o.strapInsideCp,o.cbCutCp,h?o.lacingCut:o.cbCut),h){a.cut.line(o.lacingWaist),a.originalSide=(new i).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),a=t/(e+1),r=(new i).move(o.lacingCut).line(o.lacingWaist).offset(-10);for(let t=1;t<=e;t++)o["eyelet"+t]=r.shiftAlong(t*a),n["eyelet"+t]=new s("eyelet",o["eyelet"+t])}}else a.cut.curve_(o.cbCutCp2,o.waistCenter);return r.hem&&!r.peplum?(a.hem=(new i).move(h?o.lacingWaist:o.waistCenter).line(o.waistCenterHem).line(o.dartBottomLeftHem).line(o.dartBottomLeft).hide(),a.hemFold=(new i).move(o.waistCenter).line(o.dartBottomLeft).addClass("note dashed").addText("hem","center note")):a.hem=(new i).move(h?o.lacingWaist:o.waistCenter).line(o.dartBottomLeft).hide(),a.seamSA=(new i).move(o.dartBottomLeft).curve(o.dartLeftCp,o.shoulderDartCpDown,o.dartTip).curve(o.shoulderDartCpUp,o.shoulderDart,o.shoulderDart).line(o.strapInside).join(a.cut),a.seam=a.seamSA.clone().join(a.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(h?o.lacingCut:o.cbCut,.75),c("title",{at:o.titleAnchor,nr:3,title:"tristan:backInside"}),t&&(r.hem&&!r.peplum?a.sa=(new i).move(o.dartBottomLeftHem).join((new i).move(o.dartBottomLeftHem).line(o.dartBottomLeft).join(a.seamSA).line(o.waistCenterHem).offset(t)).line(o.waistCenterHem).attr("class","fabric sa"):a.sa=a.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:h?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:h?o.lacingWaist:o.waistCenter,to:o.cbCut,x:o.cbCut.x-t-15,id:"waistToCut"}),c("vd",{from:h?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}},jf={name:"tristan.backOutside",from:Mf,draft:({sa:t,Point:e,points:o,Path:i,paths:a,options:s,store:n,macro:r,part:l})=>{n.cutlist.removeCut(),a.cut=(new i).move(o.armhole).curve(o.armholeCutCp,o.strapOutsideCp,o.strapOutside).hide(),a.dart=(new i).move(o.shoulderDart).curve(o.shoulderDart,o.shoulderDartCpUp,o.dartTip).curve(o.shoulderDartCpDown,o.dartRightCp,o.dartBottomRight).hide(),s.hem&&!s.peplum?(a.hem=(new i).move(o.dartBottomRight).line(o.dartBottomRightHem).line(o.waistSideHem).line(o.waistSide).hide(),a.hemFold=(new i).move(o.dartBottomRight).line(o.waistSide).addClass("note dashed").addText("hem","center note")):a.hem=(new i).move(o.dartBottomRight).line(o.waistSide).hide(),a.seamSA=(new i).move(o.waistSide).curve_(o.waistSideCp2,o.armhole).join(a.cut).join(a.dart),a.seam=a.seamSA.clone().join(a.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}),n.cutlist.removeCut("fabric"),n.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&&(s.hem&&!s.peplum?a.sa=(new i).move(o.waistSideHem).join((new i).move(o.waistSideHem).line(o.waistSide).join(a.seamSA).line(o.dartBottomRightHem).offset(t)).line(o.dartBottomRightHem).attr("class","fabric sa"):a.sa=a.seam.offset(t).attr("class","fabric sa"));const c=a.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}},Gf=({points:t,paths:e,Path:o,options:i,macro:a,store:s,sa:n,type:r,radius:l,width:c,ratio:p})=>{const h=r==i.zipperLocation||1==i.lacing&&r==i.lacingLocation;a("ringsector",{id:r+"Peblum",angle:i.peplumFullness/2*p*(h?.5:1),insideRadius:l,outsideRadius:l+c,rotate:!1}),a("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),s.cutlist.addCut({cut:h?2:1,from:"fabric",onFold:!0}),a("title",{nr:10+("front"==r?0:1),at:t[r+"TitleAnchor"],id:r+"Peplum",title:"tristan:"+r+"Peplum",align:"center",scale:2*i.peplumSize}),n&&(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(n)).line(t["__macro_ringsector_"+r+"Peblum_in2Flipped"]).attr("class","fabric sa")),a("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-n}),a("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+n}),a("ld",{id:"width",from:t["__macro_ringsector_"+r+"Peblum_in1Rotated"],to:t["__macro_ringsector_"+r+"Peblum_ex1Rotated"],d:15+n})},Yf={name:"tristan.peplumFront",after:Mf,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:[Ep.IQ],draft:({sa:t,Point:e,points:o,paths:i,Path:a,options:s,macro:n,store:r,units:l,part:c})=>{if(0==s.peplum)return c.hide();const p=r.get("backInsideWaistLength"),h=r.get("backOutsideWaistLength"),d=r.get("frontInsideWaistLength"),f=r.get("frontOutsideWaistLength"),m=p+h+d+f,u=m/Math.PI*(360/s.peplumFullness)/2,g=s.peplumSize*r.get("frontLength"),b=(d+f)/m;return r.set("peplumRadius",u),r.set("peplumWidth",g),r.set("peplumratio",b),r.flag.note({msg:"tristan:peplumWidth",replace:{peplumWidth:l(g)}}),Gf({Point:e,points:o,paths:i,Path:a,options:s,macro:n,store:r,sa:t,type:"front",radius:u,width:g,offset:0,ratio:b}),c}},Uf={name:"tristan.peplumBack",after:Yf,plugins:[Ep.IQ],draft:({points:t,paths:e,Path:o,options:i,store:a,macro:s,sa:n,part:r})=>{if(0==i.peplum)return r.hide();const l=a.get("peplumRadius"),c=a.get("peplumWidth"),p=a.get("peplumratio");return Gf({points:t,paths:e,Path:o,options:i,macro:s,store:a,sa:n,type:"back",radius:l,width:c,ratio:1-p}),r}},zf=new s.pT({data:Df,parts:[Ef,If,Nf,Mf,_f,jf,Yf,Uf]}
1),Jf=(0,s.D4)([Sa,Of],{p:{drop:["back","front"]},o:{keep:[...Object.keys(Ef.options),...Object.keys(Yf.options),"armholeDartCurved","armholeDartCurvePoint","armholeDartCurveWidth","chestEase","frontShoulderWidth","fullChestEaseReduction","highBustWidth","shoulderDartCurvature","shoulderToShoulderEase","waistdartposition","waistEase"]},s:{drop:[]}}),$f=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}'),Xf={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 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 Qf={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,s.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:i,paths:a,measurements:s,store:n,utils:r,expand:l,units:c,part:p}){const h=r.stretchToScale(t.xStretch),d=r.stretchToScale(t.yStretch),f=s.seat*t.gussetLength*d,m=t.backExposure<.25?.25:t.backExposure;i.cfWaist=new e(0,0),i.sideWaist=new e(s.waist/4*h,0),i.cfSeat=new e(0,s.waistToSeat*d),i.sideSeat=new e(s.seat/4*h,i.cfSeat.y),i.cfMiddle=new e(0,d*s.waistToUpperLeg+f/2),i.sideMiddle=new e(s.waistToUpperLeg*t.gussetWidth*h,i.cfMiddle.y),i.cfMidGusset=i.cfMiddle.shift(-90,f/2).shift(90,f*t.gussetPosition),i.cfFrontGusset=i.cfMidGusset.shift(90,f/2),i.cfBackGusset=i.cfMidGusset.shift(-90,f/2),i.cfWaistband=i.cfSeat.shiftFractionTowards(i.cfWaist,t.rise),i.sideWaistband=r.beamIntersectsY(i.sideWaist,i.sideSeat,i.cfWaistband.y),i.cfWaistbandDip=i.cfWaistband.shift(-90,s.waistToUpperLeg*t.frontDip),i.cfWaistbandDipCp=new e(i.sideWaistband.x/2,i.cfWaistbandDip.y),i.sideLeg=i.sideSeat.shiftFractionTowards(i.sideWaistband,t.legRise);const u=i.sideWaistband.angle(i.cfWaistbandDipCp);i.sideLegCp=i.sideLeg.shift(u,i.sideMiddle.dx(i.sideLeg)/3),i.gussetFrontCp=i.sideMiddle.shift(90,i.sideLegCp.dy(i.sideMiddle)*t.frontExposure);for(const k of["cfWaist","cfWaistband","sideWaistband","sideLeg"])i[`${k}Back`]=i[k].flipY(i.cfMiddle);i.cfWaistbandDipBack=i.cfWaistbandBack.shift(90,s.waistToUpperLeg*t.backDip),i.cfWaistbandDipCpBack=new e(i.sideWaistbandBack.x/2,i.cfWaistbandDipBack.y);const g=i.sideWaistbandBack.angle(i.cfWaistbandDipCpBack);i.sideLegCpBack=i.sideLegBack.shift(g,i.sideMiddle.dx(i.sideLegBack)*m);const b=m>.8?1-4*(m-.8):1;if(i.gussetBackCp=i.sideMiddle.shift(90,i.sideLegCpBack.dy(i.sideMiddle)*m).shift(180,i.sideMiddle.x*(1-b)),1!==b&&(i.sideMiddle=r.beamIntersectsY(i.gussetFrontCp,i.gussetBackCp,i.sideMiddle.y)),n.set("bulge",t.bulge>=2),n.get("bulge")){if(n.set("gusset",!1),i.backGussetSplit=i.sideMiddle.copy(),a.frontAndGussetCurve=(new o).move(i.sideMiddle).curve(i.gussetFrontCp,i.sideLegCp,i.sideLeg).hide(),a.frontAndGusset=(new o).move(i.cfWaistbandDip).line(i.cfMiddle).line(i.sideMiddle).join(a.frontAndGussetCurve).line(i.sideWaistband).curve_(i.cfWaistbandDipCp,i.cfWaistbandDip).close().addClass("lining"),t.backExposure<.25){a.backCurve=(new o).move(i.sideMiddle).curve(i.gussetBackCp,i.sideLegCpBack,i.sideLegBack).addClass("stroke-xl lining").hide(),i.backCurveGussetSplit=a.backCurve.shiftFractionAlong(.15),i.backCurveBackSplit=a.backCurve.reverse().shiftFractionAlong(.05);const e=i.backCurveGussetSplit.angle(i.backCurveBackSplit),s=i.backCurveGussetSplit.dist(i.backCurveBackSplit),n=2*i.sideMiddle.x*(.25-t.backExposure);i.backCurveBump=i.backCurveGussetSplit.shiftFractionTowards(i.backCurveBackSplit,.5).shift(e+90,n),i.backCurveBumpCp1=i.backCurveBump.shift(e,s/4),i.backCurveBumpCp2=i.backCurveBump.shift(e,s/-4);let r=a.backCurve.split(i.backCurveBackSplit);a.backCurveBackRest=r[0].reverse().hide(),a.backCurveBack=r[1].hide(),r=a.backCurve.split(i.backCurveGussetSplit),a.backCurveGusset=r[0].hide(),a.backCurveGussetRest=r[1].hide(),i.backCurveGussetCp=i.backCurveGussetSplit.shiftTowards(a.backCurveBackRest.ops[1].cp1,n),i.backCurveBackCp=i.backCurveBackSplit.shiftTowards(a.backCurveGussetRest.ops[1].cp1,n),a.bump=(new o).move(i.backCurveBackSplit).curve(i.backCurveBackCp,i.backCurveBumpCp1,i.backCurveBump).smurve(i.backCurveGussetCp,i.backCurveGussetSplit).hide(),a.back=(new o).move(i.cfWaistbandDipBack).curve_(i.cfWaistbandDipCpBack,i.sideWaistbandBack).line(i.sideLegBack).join(a.backCurveBack.reverse()).join(a.bump).join(a.backCurveGusset.reverse()).line(i.cfMiddle).addClass("note"),a.legElastic=(new o).move(i.sideLegBack).join(a.backCurveBack.reverse()).join(a.bump).join(a.backCurveGusset.reverse()).hide()}else a.back=(new o).move(i.cfWaistbandDipBack).curve_(i.cfWaistbandDipCpBack,i.sideWaistbandBack).line(i.sideLegBack).curve(i.sideLegCpBack,i.gussetBackCp,i.sideMiddle).line(i.cfMiddle).addClass("note"),a.legElastic=(new o).move(i.sideLegBack).curve(i.sideLegCpBack,i.gussetBackCp,i.sideMiddle).addClass("stroke-2xl lining").hide();if(n.get("bulge")){for(const e of["gussetFrontCp","backGussetSplit","cfMiddle"])i[`${e}Bulge`]=i[e].rotate(t.bulge,i.cfWaistbandDip);i.bulgeCp=i.cfWaistbandDip.shift(-90,i.cfWaistbandDip.dy(i.cfMiddleBulge)/1.5),a.bulge=(new o).move(i.cfWaistbandDip).curve_(i.bulgeCp,i.cfMiddleBulge).line(i.backGussetSplitBulge).curve(i.gussetFrontCpBulge,i.sideLegCp,i.sideLeg).line(i.sideWaistband).curve_(i.cfWaistbandDipCp,i.cfWaistbandDip).line(i.cfWaistbandDip).close(),a.legElastic.move(i.backGussetSplitBulge).curve(i.gussetFrontCpBulge,i.sideLegCp,i.sideLeg).hide()}i.backGussetSplit=i.sideMiddle.copy(),i.backGussetSplitCpTop=i.gussetBackCp.copy(),i.backGussetSplitCpBottom=i.sideLegCpBack.copy()}else{n.set("gusset",!0),i.backGussetSplit=r.curveIntersectsY(i.sideLegBack,i.sideLegCpBack,i.gussetBackCp,i.sideMiddle,i.cfBackGusset.y);const e=(new o).move(i.sideLegBack).curve(i.sideLegCpBack,i.gussetBackCp,i.sideMiddle).split(i.backGussetSplit);i.backGussetSplitCpBottom=e[0].ops[1].cp1,i.backGussetSplitCpTop=e[0].ops[1].cp2,i.frontGussetSplit=r.curveIntersectsY(i.sideMiddle,i.gussetFrontCp,i.sideLegCp,i.sideLeg,i.cfFrontGusset.y);const s=(new o).move(i.sideMiddle).curve(i.gussetFrontCp,i.sideLegCp,i.sideLeg).split(i.frontGussetSplit);if(i.frontGussetSplitCpBottom=s[1].ops[1].cp1,i.frontGussetSplitCpTop=s[1].ops[1].cp2,i.gussetFrontSplitCpTop=s[0].ops[1].cp2,i.gussetFrontSplitCpBottom=s[0].ops[1].cp1,i.gussetBackSplitCpTop=e[1].ops[1].cp2,i.gussetBackSplitCpBottom=e[1].ops[1].cp1,a.gusset=(new o).move(i.backGussetSplit).join(e[1]).join(s[0]).line(i.cfFrontGusset).line(i.cfBackGusset).line(i.backGussetSplit).close().addClass("lining"),a.front=(new o).move(i.cfWaistbandDip).line(i.cfFrontGusset).line(i.frontGussetSplit).join(s[1]).line(i.sideWaistband).curve_(i.cfWaistbandDipCp,i.cfWaistbandDip).close().addClass("note"),t.backExposure<.25){a.backCurve=(new o).move(i.backGussetSplit).curve(i.backGussetSplitCpTop,i.backGussetSplitCpBottom,i.sideLegBack).addClass("stroke-xl lining").hide();const e=.05;i.backCurveGussetSplit=a.backCurve.shiftFractionAlong(e),i.backCurveBackSplit=a.backCurve.reverse().shiftFractionAlong(e);const s=i.backCurveGussetSplit.angle(i.backCurveBackSplit),n=i.backCurveGussetSplit.dist(i.backCurveBackSplit),r=2*i.sideMiddle.x*(.25-t.backExposure);i.backCurveBump=i.backCurveGussetSplit.shiftFractionTowards(i.backCurveBackSplit,.5).shift(s+90,r),i.backCurveBumpCp1=i.backCurveBump.shift(s,n/4),i.backCurveBumpCp2=i.backCurveBump.shift(s,n/-4);let l=a.backCurve.split(i.backCurveBackSplit);a.backCurveBackRest=l[0].hide(),a.backCurveBack=l[1].hide(),l=a.backCurve.split(i.backCurveGussetSplit),a.backCurveGusset=l[0].hide(),a.backCurveGussetRest=l[1].hide(),i.backCurveGussetCp=i.backCurveGussetSplit.shiftTowards(a.backCurveBackRest.ops[1].cp1,r),i.backCurveBackCp=i.backCurveBackSplit.shiftTowards(a.backCurveGussetRest.ops[1].cp1,r),a.bump=(new o).move(i.backCurveBackSplit).curve(i.backCurveBackCp,i.backCurveBumpCp1,i.backCurveBump).smurve(i.backCurveGussetCp,i.backCurveGussetSplit).hide(),a.back=(new o).move(i.cfWaistbandDipBack).curve_(i.cfWaistbandDipCpBack,i.sideWaistbandBack).line(i.sideLegBack).join(a.backCurveBack.reverse()).join(a.bump).join(a.backCurveGusset.reverse()).line(i.cfBackGusset).addClass("note"),a.legElastic=(new o).move(i.sideLegBack).join(a.backCurveBack.reverse()).join(a.bump).join(a.backCurveGusset.reverse()).curve(i.gussetBackSplitCpBottom,i.gussetBackSplitCpTop,i.sideMiddle).curve(i.gussetFrontCp,i.sideLegCp,i.sideLeg).hide()}else a.back=(new o).move(i.cfWaistbandDipBack).curve_(i.cfWaistbandDipCpBack,i.sideWaistbandBack).line(i.sideLegBack).join(e[0]).line(i.cfBackGusset).addClass("note"),a.legElastic=(new o).move(i.sideLegBack).curve(i.sideLegCpBack,i.gussetBackCp,i.sideMiddle).curve(i.gussetFrontCp,i.sideLegCp,i.sideLeg).hide()}return n.set("legElasticLength",a.legElastic.hide().length()),n.set("waistbandElasticLength",2*((new o).move(i.cfWaistbandDip).curve_(i.cfWaistbandDipCp,i.sideWaistband).length()+(new o).move(i.cfWaistbandDipBack).curve_(i.cfWaistbandDipCpBack,i.sideWaistbandBack).length())),l?n.flag.preset("expandIsOn"):n.flag.preset("expandIsOff"),n.flag.note({msg:"uma:legElasticLength",replace:{length:c(n.get("legElasticLength"))}}),n.flag.note({msg:"uma:waistbandElasticLength",replace:{length:c(n.get("waistbandElasticLength"))}}),p},hide:{self:!0}},Kf={name:"uma.back",from:Qf,draft:function({Point:t,Path:e,points:o,paths:i,store:a,sa:s,Snippet:n,snippets:r,expand:l,macro:c,part:p}){const h=["cfWaistbandDipCpBack","sideWaistbandBack","sideLegBack","backGussetSplitCpTop","backGussetSplitCpBottom","backGussetSplit"];if(l){for(const t of h)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}),i.seam=i.mirroredBack.join(i.mirroredMirroredBack.reverse()),i.mirroredBack.hide(),i.mirroredMirroredBack.hide(),s&&(i.sa=i.seam.offset(-1*s).addClass("fabric sa")),a.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+s+15}),c("hd",{id:"wAtLeg",from:o.sideLegBackFlipped,to:o.sideLegBack,y:o.backGussetSplit.y+s+30}),c("hd",{id:"wAtWaistband",from:o.sideWaistbandBackFlipped,to:o.sideWaistbandBack,y:o.sideWaistbandBack.y-s-15})}else{for(const t of h)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}),i.mirroredBack.hide(),i.saBase=i.mirroredBack.reverse().hide(),i.seam=i.saBase.clone().line(o.cfWaistbandDipBack).close().unhide().addClass("fabric"),s&&(i.sa=(new e).move(o.cfBackGusset).join(i.saBase.offset(s)).line(i.saBase.end()).addClass("fabric sa")),a.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+s+15}),c("hd",{id:"wAtLeg",from:o.cfBackGusset,to:o.sideLegBack,y:o.cfBackGusset.y+s+30}),c("hd",{id:"wAtTop",from:o.cfWaistbandDipBack,to:o.sideWaistbandBack,y:o.sideWaistbandBack.y-s-15})}return c("vd",{id:"hToLeg",from:o.backGussetSplit,to:o.sideLegBack,x:o.sideLegBack.x+s+15}),c("vd",{id:"hToCfWaistband",from:o.backGussetSplit,to:o.cfWaistbandDipBack,x:o.sideLegBack.x+s+30}),c("vd",{id:"hToSideWaistband",from:o.backGussetSplit,to:o.sideWaistbandBack,x:o.sideLegBack.x+s+45}),delete i.back,delete i.front,delete i.gusset,delete i.frontAndGusset,delete i.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 n("logo",o.logo),p}};const Vf={name:"uma.front",from:Qf,draft:function({Point:t,Path:e,points:o,paths:i,store:a,sa:s,Snippet:n,snippets:r,expand:l,macro:c,part:p}){if(a.get("bulge"))i.seam=i.bulge.clone().setClass("fabric"),delete i.bulge,delete i.back,delete i.frontAndGusset,s&&(i.sa=i.seam.offset(s).addClass("fabric sa")),a.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-s-15}),c("hd",{id:"wFull",from:o.cfWaistbandDip,to:o.sideLeg,y:o.sideWaistband.y-s-30}),c("hd",{id:"wWedge",from:o.cfWaistbandDip,to:o.cfMiddleBulge,y:o.cfMiddleBulge.y+s+15}),c("hd",{id:"wTusk",from:o.cfWaistbandDip,to:o.backGussetSplitBulge,y:o.cfMiddleBulge.y+s+30}),c("vd",{id:"hToCf",from:o.cfMiddleBulge,to:o.cfWaistbandDip,x:o.cfWaistbandDip.x-s-15}),c("vd",{id:"hFull",from:o.cfMiddleBulge,to:o.sideWaistband,x:o.cfWaistbandDip.x-s-30}),c("vd",{id:"hSide",from:o.sideLeg,to:o.sideWaistband,x:o.sideWaistband.x+s+15});else{if(l){for(const t of["cfWaistbandDipCp","sideWaistband","sideLeg","sideLegCp","frontGussetSplitCpBottom","frontGussetSplitCpTop","frontGussetSplit"])o[`${t}Flipped`]=o[t].flipX();i.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"),s&&(i.sa=i.seam.offset(s).addClass("fabric sa")),a.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+s+15}),c("hd",{id:"wAtLeg",from:o.sideLegFlipped,to:o.sideLeg,y:o.frontGussetSplit.y+s+30}),c("hd",{id:"wAtWaistband",from:o.sideWaistbandFlipped,to:o.sideWaistband,y:o.sideWaistband.y-s-15})}else i.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(),i.seam=i.saBase.clone().line(o.cfFrontGusset).close().unhide().addClass("fabric"),s&&(i.sa=(new e).move(o.cfFrontGusset).join(i.saBase.offset(s)).line(i.saBase.end()).setClass("fabric sa").unhide()),a.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+s+15}),c("hd",{id:"wAtLeg",from:o.cfFrontGusset,to:o.sideLeg,y:o.frontGussetSplit.y+s+30}),c("hd",{id:"wAtWaistband",from:o.cfWaistbandDip,to:o.sideWaistband,y:o.sideWaistband.y-s-15});c("vd",{id:"hToSideLeg",from:o.frontGussetSplit,to:o.sideLeg,x:o.sideLeg.x+s+15}),c("vd",{id:"hToWaistbandDip",from:o.frontGussetSplit,to:o.cfWaistbandDip,x:o.sideLeg.x+s+30}),c("vd",{id:"hFull",from:o.frontGussetSplit,to:o.sideWaistband,x:o.sideLeg.x+s+45})}return delete i.back,delete i.front,delete i.gusset,c("title",{at:o.title,nr:1,title:"front"}),r.logo=new n("logo",o.logo),p}};const qf={name:"uma.gusset",from:Qf,draft:function({Path:t,points:e,paths:o,store:i,sa:a,expand:s,macro:n,part:r}){if(i.get("bulge"))return r.hide();{if(s){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"),a&&(o.sa=o.seam.offset(a).addClass("fabric sa")),i.cutlist.setCut({cut:2,from:"fabric"}),e.title=e.cfFrontGusset.shiftFractionTowards(e.cfMiddle,.5),n("grainline",{from:e.cfBackGusset,to:e.cfFrontGusset}),n("hd",{id:"wAtMiddle",from:e.sideMiddleFlipped,to:e.sideMiddle}),n("hd",{id:"wAtTop",from:e.frontGussetSplitFlipped,to:e.frontGussetSplit,y:e.frontGussetSplit.y-a-15}),n("hd",{id:"wAtBottom",from:e.backGussetSplitFlipped,to:e.backGussetSplit,y:e.backGussetSplit.y+a+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"),a&&(o.sa=(new t).move(e.cfBackGusset).join(o.saBase.offset(a)).line(o.saBase.end()).addClass("fabric sa")),i.cutlist.setCut({cut:2,from:"fabric",onFold:!0}),e.title=e.cfFrontGusset.shiftFractionTowards(e.sideMiddle,.5),n("cutonfold",{to:e.cfBackGusset,from:e.cfFrontGusset,grainline:!0}),n("hd",{id:"wAtMiddle",from:e.cfMiddle,to:e.sideMiddle}),n("hd",{id:"wAtBottom",from:e.cfBackGusset,to:e.backGussetSplit,y:e.backGussetSplit.y+a+15}),n("hd",{id:"wAtTop",from:e.cfFrontGusset,to:e.frontGussetSplit,y:e.frontGussetSplit.y-a-15});const r=Math.max(e.frontGussetSplit.x,e.backGussetSplit.x);n("vd",{id:"hToMiddle",from:e.backGussetSplit,to:e.sideMiddle,x:r+a+15}),n("vd",{id:"hFromMiddle",from:e.sideMiddle,to:e.frontGussetSplit,x:r+a+15}),n("vd",{id:"hFull",from:e.backGussetSplit,to:e.frontGussetSplit,x:r+a+30})}return delete o.back,delete o.front,delete o.gusset,n("title",{at:e.title,nr:2,t
1itle:"gusset",scale:.666}),r}};const Zf=new s.pT({data:$f,parts:[Qf,Kf,Vf,qf]}),tm={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 em(t,e,o,i){let{points:a,paths:s,Path:n,macro:r}=t.shorthand();const l=e.intersectsY(a[i].y);if(2===l.length){let t=l[0],e=l[1];t.x>e.x&&([t,e]=[e,t]),s[i]=(new n).move(t).line(e).attr("class","contrast help"),r("banner",{id:i+"Line",classes:"center contrast help",path:s[i],text:"umbra:"+o})}}function om(t,e){t.shorthand().complete&&(em(t,e,"waist","cfWaist"),em(t,e,"hips","cfHips"),em(t,e,"seat","cfSeat"),em(t,e,"waist","cfWaistBack"),em(t,e,"hips","cfHipsBack"),em(t,e,"seat","cfSeatBack"))}const im={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,s.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,s.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,s.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:i,paths:a,measurements:s,complete:n,store:r,utils:l,expand:c,units:p,macro:h,part:d}){function f(t,e,o,i){return i<.5?2*(e*i+t*(.5-i)):2*(o*(i-.5)+e*(1-i))}const m=l.stretchToScale(t.xStretch),u=l.stretchToScale(t.yStretch),g=l.stretchToScale(t.elasticStretch);let b=t.minFabricWidth*s.seat;i.cfWaist=new e(0,0),i.sideWaist=new e(s.waist/4*m,0),i.cfHips=new e(0,s.waistToHips*u),i.sideHips=new e(s.hips/4*m,i.cfHi
1ps.y),i.cfSeat=new e(0,s.waistToSeat*u),i.sideSeat=new e(s.seat/4*m,i.cfSeat.y);const k=s.crossSeam/2;i.cfMiddle=new e(0,u*k),i.cfGusset=new e(0,u*f(s.waistToSeat,s.crossSeamFront,k,t.gussetPosition)),i.sideGusset=new e(k*t.gussetWidth*m,i.cfGusset.y),a.bodySide=(new o).move(i.sideWaist).line(i.sideHips).line(i.sideSeat).hide(),i.cfWaistband=i.cfSeat.shiftFractionTowards(i.cfHips,t.rise);const w=a.bodySide.intersectsY(i.cfWaistband.y);null==w||0===w.length?i.sideWaistbandBase=new e(i.sideWaist.x,i.cfWaistband.y):i.sideWaistbandBase=w[0],i.sideLegBase=i.sideSeat.shiftTowards(i.sideWaistbandBase,t.legRise*i.cfGusset.dist(i.cfHips)),(i.sideLegBase.dist(i.sideWaistbandBase)<b||i.sideLegBase.y<i.sideWaistbandBase.y)&&(i.sideLegBase=i.sideWaistbandBase.shiftTowards(i.sideSeat,b)),i.cfMaxSplit=new e(0,2*u*k-i.sideLegBase.y),i.cfBackGusset=i.cfGusset.shiftFractionTowards(i.cfMaxSplit,t.splitPosition),i.gussetFrontCp=i.sideGusset.shift(90,i.sideLegBase.dy(i.sideGusset)*t.frontExposure);for(const H of["cfWaist","cfHips","cfSeat","cfWaistband","sideWaistbandBase","sideLegBase"])i[`${H}Back`]=i[H].flipY(i.cfMiddle);i.sideWaistbandFront=new e(i.sideWaistbandBase.x*(1-t.frontReduction),i.sideWaistbandBase.y),i.sideLegFront=new e(i.sideLegBase.x*(1-t.frontReduction),i.sideLegBase.y),i.sideWaistbandBack=i.sideWaistbandBaseBack.shift(0,i.sideWaistbandFront.dist(i.sideWaistbandBase)),i.sideLegBack=i.sideLegBaseBack.shift(0,i.sideLegFront.dist(i.sideLegBase)),i.sideLegBack=i.sideWaistbandBack.shiftTowards(i.sideLegBack,i.sideWaistbandFront.dist(i.sideLegFront)),i.cfWaistbandDipCp1Front=l.beamIntersectsX(i.sideWaistbandFront,i.sideLegFront.rotate(-90,i.sideWaistbandFront),i.sideWaistbandFront.x/2),i.cfWaistbandDipFront=new e(0,i.cfWaistbandDipCp1Front.y+k*t.frontDip),i.cfWaistbandDipCp2Front=new e(i.cfWaistbandDipCp1Front.x*t.frontDipShape,i.cfWaistbandDipFront.y),i.cfWaistbandDipCp1Front=i.cfWaistbandDipCp1Front.shiftFractionTowards(i.sideWaistbandFront,t.frontDipShape),i.cfWaistbandDipCp1Back=l.beamIntersectsX(i.sideWaistbandBack,i.sideLegBack.rotate(-90,i.sideWaistbandBack),i.sideWaistbandBack.x/2),i.cfWaistbandDipBack=new e(0,i.cfWaistbandDipCp1Back.y-k*t.backDip),i.cfWaistbandDipCp2Back=new e(i.cfWaistbandDipCp1Back.x*t.backDipShape,i.cfWaistbandDipBack.y),i.cfWaistbandDipCp1Back=i.cfWaistbandDipCp1Back.shiftFractionTowards(i.sideWaistbandBack,t.backDipShape);const C=i.sideLegFront.angle(i.sideWaistbandFront)+90;i.sideLegCpFront=i.sideLegFront.shift(C,i.sideGusset.dx(i.sideLegFront)/3*(1-t.frontReduction)),i.sideLegCp1Back=i.sideLegBack.shift(-C,.25*i.sideGusset.dx(i.sideLegBack)),i.gussetBackCp2=i.sideGusset.shift(90,.25*i.sideLegCp1Back.dy(i.sideGusset)),r.set("bulge",t.bulge>=2),a.simpleBackCurve=(new o).move(i.sideLegBaseBack).curve(i.sideLegCp1Back,i.gussetBackCp2,i.sideGusset).hide();const v=i.cfWaistbandDipBack.y-i.sideLegBase.dist(i.sideWaistbandBase);i.backCurveCenterDefault=a.simpleBackCurve.shiftFractionAlong(.6);const T=a.simpleBackCurve.shiftFractionAlong(.59).angle(a.simpleBackCurve.shiftFractionAlong(.61));var y,x,B,S;i.backCurveCenterMax=new e(.7*i.sideLegBase.x,i.cfMiddle.shiftFractionTowards(i.sideLegBaseBack,.3).y),i.backCurveCenterMin=i.cfWaistbandBack.shiftFractionTowards(i.cfMiddle,.5).shift(0,b/2),i.sideFullnessBack=(y=i.backCurveCenterMax,x=i.backCurveCenterDefault,B=i.backCurveCenterMin,S=t.backExposure,new e(f(y.x,x.x,B.x,S),f(y.y,x.y,B.y,S))),i.sideFullnessBack.y>v&&(i.sideFullnessBack=new e(i.sideFullnessBack.x,v));const L=f(160,T,90,t.backExposure),P=i.cfSeat.dist(i.sideSeat)*f(.5,.1,.5,t.backExposure);i.sideLegCp2Back=i.sideFullnessBack.shift(L,-P),i.sideLegCp2Back.y>v&&(i.sideLegCp2Back=new e(i.sideLegCp2Back.x,v)),i.gussetBackCp1=i.sideFullnessBack.shift(L,P),i.gussetBackCp2=i.sideGusset.shift(90,i.sideFullnessBack.dy(i.sideGusset)/4),i.gussetFrontCp=i.sideGusset.shift(90,i.sideLegCpFront.dy(i.sideGusset)*t.frontExposure),a.backCurve=(new o).move(i.sideLegBack).curve(i.sideLegCp1Back,i.sideLegCp2Back,i.sideFullnessBack).curve(i.gussetBackCp1,i.gussetBackCp2,i.sideGusset).hide();const R=a.backCurve.intersectsY(i.cfBackGusset.y)[0];let F,W=[];R&&!Array.isArray(R)&&(i.backGussetSplit=R,W=a.backCurve.split(i.backGussetSplit)),W&&W.length>1||(i.backGussetSplit=i.sideGusset,W=[a.backCurve]),a.elasticLegBack=W[0].hide(),a.back=(new o).move(i.cfWaistbandDipBack).curve(i.cfWaistbandDipCp2Back,i.cfWaistbandDipCp1Back,i.sideWaistbandBack).join(a.elasticLegBack).line(i.cfBackGusset).hide(),i.cfBulgeSplit=i.cfMiddle.shiftFractionTowards(i.cfHips,.5),i.cfBulgeSplit.y<i.cfWaistbandDipFront.y+b&&(i.cfBulgeSplit=i.cfWaistbandDipFront.shift(-90,b)),i.rotationOrigin=new e(i.sideGusset.x,i.cfBulgeSplit.y);for(const H of["backGussetSplit","cfMiddle","cfGusset","cfBackGusset","sideGusset","gussetFrontCp"])r.get("bulge")?i[`${H}Bulge`]=i[H].rotate(t.bulge,i.rotationOrigin):i[`${H}Bulge`]=i[H];if(i.bulgeCp=i.cfBulgeSplit.shift(-90,i.cfBulgeSplit.dy(i.cfGussetBulge)*t.bulgeFullness),i.cfGussetBulgeCp=i.cfGussetBulge.shift(90+t.bulge,.5*i.cfGussetBulge.dist(i.cfBulgeSplit)),i.gussetFrontCpBulge=i.gussetFrontCpBulge.shiftFractionTowards(i.sideGussetBulge,t.bulge/200),r.get("bulge")?i.bulgeCpBulge=i.bulgeCp.rotate(t.bulge,i.rotationOrigin):i.bulgeCpBulge=i.bulgeCp,i.bulgeCpBottom=i.bulgeCpBulge.shiftFractionTowards(i.bulgeCp,t.bulgeFullness).shiftFractionTowards(i.cfBulgeSplit,.5),F=W.length<=1?null:r.get("bulge")?W[1].rotate(t.bulge,i.rotationOrigin):W[1],a.elasticLegFront=(new o).move(i.backGussetSplitBulge),F&&(a.elasticLegFront=a.elasticLegFront.join(F)),a.elasticLegFront.curve(i.gussetFrontCpBulge,i.sideLegCpFront,i.sideLegFront).hide(),"none"!==t.pockets){i.sidePocketHeight=i.sideWaistbandFront.shiftTowards(i.sideLegFront,Math.min(t.pocketHeight*i.cfHips.dist(i.cfSeat),i.sideWaistbandFront.dist(i.sideLegFront)/3)),i.cfPocketHeight=i.cfWaistbandDipFront.shiftTowards(i.cfMiddle,i.sidePocketHeight.dist(i.sideWaistbandFront)),i.cfPocketHeightCp=new e(i.sidePocketHeight.x/2*t.frontDipShape,i.cfPocketHeight.y),c?(h("mirror",{mirror:[new e(0,0),new e(0,100)],points:["cfPocketHeightCp","sidePocketHeight"],clone:!0}),a.pocketHeight=(new o).move(i.sidePocketHeight)._curve(i.cfPocketHeightCp,i.cfPocketHeight).curve_(i.mirroredCfPocketHeightCp,i.mirroredSidePocketHeight).reverse().addClass("help lining").addText("umbra:foldLining","center lining")):a.pocketHeight=(new o).move(i.sidePocketHeight)._curve(i.cfPocketHeightCp,i.cfPocketHeight).reverse().addClass("help lining").addText("umbra:foldLining","center lining"),n||a.pocketHeight.hide();const r=i.sideHips.x*t.pocketGap;i.pocketSeamTop=(new o).move(i.sideWaistbandFront).curve(i.cfWaistbandDipCp1Front,i.cfWaistbandDipCp2Front,i.cfWaistbandDipFront).intersectsX(r)[0],a.pocketPilotPath=(new o).move(i.pocketSeamTop).curve_(i.pocketSeamTop.shift(-80,s.crossSeamFront/2),new e(i.sideLegFront.x,i.sideGussetBulge.y
1)).setClass("mark").hide();const l=a.elasticLegFront.intersects(a.pocketPilotPath);if(l.length>0&&(i.pocketSeamBottom=l[0],a.pocketPilotPath2=(new o).move(i.pocketSeamBottom).line(i.pocketSeamBottom.shift(125,s.crossSeam)).hide(),i.pocketSeamMiddle=a.pocketPilotPath2.intersectsX(r)[0],i.pocketSeamBottomCp=new e(r,(2*i.pocketSeamBottom.y+i.pocketSeamMiddle.y)/3),n&&(a.pocketShape=(new o).move(i.pocketSeamTop).line(i.pocketSeamMiddle).curve_(i.pocketSeamBottomCp,i.pocketSeamBottom).addClass("mark dashed").addText("umbra:pocketseam","center mark")),"zipper"===t.pockets)){const t=r+10,l=Math.min(i.sidePocketHeight.x-10,t+s.hips/10),p=a.pocketHeight.intersectsX(t)[0],d=a.pocketHeight.intersectsX(l)[0],f=p.angle(d);i.leftZipperTop=p.shift(f+90,2.5),i.leftZipperBottom=i.leftZipperTop.shift(f-90,5),i.rightZipperTop=d.shift(f+90,2.5),i.rightZipperBottom=i.rightZipperTop.shift(f-90,5),n&&(a.zipper=(new o).move(i.leftZipperBottom).line(i.rightZipperBottom).line(i.rightZipperTop).line(i.leftZipperTop).close().reverse().addClass("mark dashed").addText("umbra:zipper","mark"),c&&(h("mirror",{mirror:[new e(0,0),new e(0,100)],points:["leftZipperBottom","rightZipperBottom","rightZipperTop","leftZipperTop"],clone:!0}),a.mirroredZipper=(new o).move(i.mirroredRightZipperTop).line(i.mirroredLeftZipperTop).line(i.mirroredLeftZipperBottom).line(i.mirroredRightZipperBottom).close().addClass("mark dashed").addText("umbra:zipper","mark"))),a.zipperCut=(new o).move(i.leftZipperBottom).line(i.leftZipperTop).move(i.rightZipperTop).line(i.rightZipperBottom).move(p).line(d).addClass("fabric"),a.pocketHeight.hide()}}return r.set("waistbandElasticLength",2*(new o).move(i.cfWaistbandDipBack).curve(i.cfWaistbandDipCp2Back,i.cfWaistbandDipCp1Back,i.sideWaistbandBack).move(i.cfWaistbandDipFront).curve(i.cfWaistbandDipCp2Front,i.cfWaistbandDipCp1Front,i.sideWaistbandFront).hide().length()*g),r.set("legElasticLength",(a.elasticLegBack.length()+a.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*(s.seat/r.get("waistbandElasticLength")-1))+"%"}}),r.get("bulge")?a.seamBase=(new o).move(i.cfBulgeSplit).curve(i.bulgeCpBottom,i.cfGussetBulgeCp,i.cfGussetBulge).line(i.cfBackGussetBulge):a.seamBase=(new o).move(i.cfBackGussetBulge),a.seamBase=a.seamBase.line(i.backGussetSplitBulge).join(a.elasticLegFront).line(i.sideWaistbandFront).curve(i.cfWaistbandDipCp1Front,i.cfWaistbandDipCp2Front,i.cfWaistbandDipFront).join(a.back),d},hide:{self:!0},plugins:[Pp.e2]},am={name:"umbra.back",from:im,hide:{from:!0},draft:function({Point:t,Path:e,points:o,paths:i,store:a,sa:s,Snippet:n,snippets:r,options:l,expand:c,macro:p,part:h}){i.seamBase.hide();const d=["cfWaist","cfHips","cfSeat","cfWaistBack","cfHipsBack","cfSeatBack","cfWaistbandDipCp1Back","cfWaistbandDipCp2Back","sideWaistbandBack","sideLegBack","backGussetSplit"];if(c){if(l.flipBack){for(const t of d)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}):i.mirroredBack=i.back.reverse(),p("mirror",{mirror:[new t(0,0),new t(0,100)],paths:["mirroredBack"],clone:!0}),i.seam=i.mirroredBack.join(i.mirroredMirroredBack.reverse()).addClass("fabric"),i.mirroredBack.hide(),i.mirroredMirroredBack.hide(),s&&(i.sa=p("sa",{paths:[i.seam.reverse()]})),a.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 d)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}),i.mirroredBack.hide(),i.saBase=i.mirroredBack.reverse().hide()}else i.saBase=i.back;i.seam=i.saBase.clone().line(o.cfWaistbandDipBack).close().unhide().addClass("fabric"),om(h,i.seam),s&&(i.sa=p("sa",{paths:[i.saBase,null]})),a.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+s+15}),p("hd",{id:"wAtLeg",from:o.cfBackGusset,to:o.sideLegBack,y:o.cfBackGusset.y+s+30}),p("hd",{id:"wAtTop",from:o.cfWaistbandDipBack,to:o.sideWaistbandBack,y:o.sideWaistbandBack.y-s-15}),p("vd",{id:"hToLeg",from:o.backGussetSplit,to:o.sideLegBack,x:o.sideLegBack.x+s+15}),p("vd",{id:"hToCfWaistband",from:o.backGussetSplit,to:o.cfWaistbandDipBack,x:o.sideLegBack.x+s+30}),0!==l.backDip&&p("vd",{id:"hToSideWaistband",from:o.backGussetSplit,to:o.sideWaistbandBack,x:o.sideLegBack.x+s+45});let f=o.sideWaistbandBack.shiftFractionTowards(o.sideLegBack,.5);r.sideBackCenter=new n("notch",f),c&&(r.sideBackCenterMirrored=new n("notch",new t(-f.x,f.y)));delete i.back,delete i.front,delete i.gusset,delete i.frontAndGusset,delete i.bulge,delete i.pocketHeight,delete i.saBase,delete i.pocketShape,delete i.zipper,delete i.mirroredZipper,delete i.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 n("logo",o.logo),h}};const sm={name:"umbra.front",from:im,hide:{from:!0},draft:function({Point:t,Path:e,points:o,paths:i,store:a,sa:s,Snippet:n,snippets:r,options:l,expand:c,macro:p,units:h,part:d}){a.get("bulge")?i.seamBase=(new e).move(o.cfBulgeSplit).curve(o.bulgeCpBottom,o.cfGussetBulgeCp,o.cfGussetBulge).line(o.cfBackGussetBulge):i.seamBase=(new e).move(o.cfBackGussetBulge);i.seamBase=i.seamBase.line(o.backGussetSplitBulge).join(i.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}),i.seam=i.seamBase.join(i.mirroredSeamBase.reverse()),i.mirroredSeamBase.hide(),p("mirror",{mirror:[new t(0,0),new t(0,100)],paths:["pocketShape","zipperCut"],points:["pocketTop"],clone:!0})):i.seam=i.seamBase.clone().close();i.seam.unhide().addClass("fabric"),om(d,i.seam),s&&(i.saBase=(new e).move(o.cfBackGussetBulge).line(o.backGussetSplitBulge).join(i.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}),i.saBase=i.saBase.join(i.mirroredSaBase.reverse()).close().hide(),i.sa=p("sa",{paths:["saBase"]})):i.sa=p("sa",{paths:["saBase",null,a.get("bulge")?{p:(new e).move(o.cfBulgeSplit).line(o.cfGusset),offset:0}:null]}));a.cutlist.setCut({cut:1,from:"fabric",onFold:!c}),a.cutlist.addCut({cut:1,from:"lining",onFold:!c}),o.title=o.cfWaistbandDipFront.shift(-45,20).shift(-90,40),c?p("grainline",{to:a.get("bulge")?o.cfBulgeSplit:o.cfBackGusset,from:o.cfWaistbandDipFront}):p("cutonfold",{to:a.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-s-15}),p("vd",{id:"grainline",from:o.cfWaistbandDipFront,to:o.cfBackGussetBulge,x:-30}),a.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 f=o.sideWaistbandFront.shiftFractionTowards(o.sideLegFront,.5);r.sideFrontCenter=new n("notch",f),c&&(r.sideFrontCenterMirrored=new n("notch",new t(-f.x,f.y)));o.pocketSeamBottom&&(r.pocketTop=new n("notch",o.pocketSeamTop),r.pocketBottom=new n("notch",o.pocketSeamBottom),c&&(r.pocketTopMirrored=new n("notch",new t(-o.pocketSeamTop.x,o.pocketSeamTop.y)),r.pocketBottomMirrored=new n("notch",new t(-o.pocketSeamBottom.x,o.pocketSeamBottom.y))));return delete i.back,delete i.front,delete i.saBase,p("title",{at:o.title,nr:1,title:"front",notes:["umbra:waistbandMeasure",h(a.get("waistbandElasticLength")),"\n","umbra:legMeasure",h(a.get("legElasticLength"))]}),d}};const nm=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}'),rm=new s.pT({data:nm,parts:[im,am,sm]}),lm=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'),cm={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"}}}')},pm=t=>{const{measurements:e,options:o,points:i,Point:a,store:s}=t.shorthand(),n={},r=e.chest*(1+o.chestEase),l=e.waist*(1+o.waistEase),c=e.hips*(1+o.hipsEase);n.waist=r-l,n.hips=r-c,n.hips<0&&(n.hips=0),n.waist<0&&(n.waist=0);let p=n.waist/12,h=n.hips/12;if(s.set("wr12",p),s.set("hr12",h),!o.legacyWaistHips){const t=r>=c?r:c;n.waist=t-l,n.hips=t-c,n.hips<0&&(n.hips=0),n.waist<0&&(n.waist=0);const e=15;p=n.waist/e,h=n.hips/e,s.set("wr12",-2*p),s.set("hr12",-2*h)}i.dartWaistCenter=new a(i.armhole.x/2,i.waist.y),i.dartWaistRight=i.dartWaistCenter.shift(0,p),i.dartWaistLeft=i.dartWaistCenter.shift(180,p),i.dartTop=i.dartWaistCenter.shift(90,.35*i.neck.dy(i.waist)),i.dartWaistRightCpTop=i.dartWaistRight.shift(90,.35*i.dartTop.dy(i.waist)),i.dartWaistLeftCpTop=i.dartWaistLeft.shift(90,.35*i.dartTop.dy(i.waist)),i.dartHipCenter=new a(i.dartWaistCenter.x,i.hips.y),i.dartHipRight=i.dartHipCenter.shift(0,h),i.dartHipLeft=i.dartHipCenter.shift(180,h),i.dartHemRight=new a(i.dartHipRight.x,i.hem.y),i.dartHemLeft=new a(i.dartHipLeft.x,i.hem.y),i.dartHipRightCpTop=i.dartHipRight.shift(90,.25*i.waist.dy(i.hi
1ps)),i.dartHipLeftCpTop=i.dartHipLeft.shift(90,.25*i.waist.dy(i.hips)),i.dartWaistRightCpBottom=i.dartWaistRight.shift(-90,.25*i.waist.dy(i.hips)),i.dartWaistLeftCpBottom=i.dartWaistLeft.shift(-90,.25*i.waist.dy(i.hips))},hm=t=>{const{points:e,Point:o,store:i}=t.shorthand(),a=i.get("wr12"),s=i.get("hr12");e.waist=e.waist.shift(180,a),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,s),e.hipsCp2=new o(e.hips.x,e.dartHipRightCpTop.y),e.hem=e.hem.shift(180,s)},dm=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)},fm={pct:10,max:15,min:8,menu:"style"},mm={pct:12.5,max:20,min:10,menu:"style"},um={pct:10,min:0,max:20,menu:"advanced"},gm={pct:5,min:0,max:10,menu:"advanced"},bm={deg:5,min:0,max:5,menu:"advanced"},km={bool:!1,menu:"advanced"};const wm={name:"wahid.front",from:N,hide:s.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:um,neckInset:gm,hemStyle:{dflt:"classic",list:["classic","rounded","square"],menu:"style"},hemRadius:{pct:6,min:2,max:12,menu:"style"},pocketWidth:fm,pocketAngle:bm,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:km},draft:function({points:t,Point:e,paths:o,Path:i,measurements:a,options:s,utils:n,macro:r,snippets:l,Snippet:c,complete:p,sa:h,store:d,part:f}){for(let v of Object.keys(o))delete o[v];delete l.armholePitchNotch,s.legacyWaistHips||(t.waist=new e(a.waist*(1+s.waistEase)/4,t.cfWaist.y),t.hips=new e(a.hips*(1+s.hipsEase)/4,t.cfHips.y),t.hem=new e(t.hips.x,t.cfHem.y)),t.closureTop=new e(a.chest*s.frontOverlap*-1,t.waist.y*s.necklineDrop),"classic"===s.frontStyle?t.closureTopCp1=new e(t.neck.x,t.waist.y*s.necklineDrop/2):t.closureTopCp1=new e(t.neck.x,t.closureTop.y);let m=t.shoulder.dist(t.neck),u=m*s.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,m*s.shoulderInset),t.shoulderCp1=t.shoulderCp1.shift(t.shoulder.angle(t.neck),m*s.shoulderInset),t.neck=t.neck.shiftTowards(t.shoulder,m*s.neckInset),t.neckCp2=t.neck.shift(t.shoulder.angle(t.neck)+90,.2*m),pm(f),hm(f),"classic"===s.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 i=t.dartHemLeft.dx(t.dartHemRight);t.splitHem=t.hem.shift(180,i),t.hemSplit=n.curveIntersectsX(t.hemTip,t.hemTip,t.dartHemLeft,t.splitHem,t.dartHemLeft.x);let[a,s]=n.splitCurve(t.hemTip,t.hemTip,t.dartHemLeft,t.splitHem,t.hemSplit);t.splitDartHemLeftCp1=a.cp2,t.splitDartHemRightCp2=s.cp1.shift(0,i),t.splitHemCp1=s.cp2.shift(0,i),t.splitDartHemLeft=n.curveIntersectsX(t.hemTip,t.hemTip,t.dartHemLeft,t.splitHem,t.dartHemLeft.x),t.splitDartHemRight=t.splitDartHemLeft.shift(0,i),t.lastButton=new e(0,t.closureBottom.y)}else if("rounded"===s.hemStyle){t.closureBottom=new e(t.closureTop.x,t.hem.y
1);let o=a.hips*s.hemRadius;o>t.closureTop.dx(t.dartHemLeft)&&(o=t.closureTop.dx(t.dartHemLeft));const i=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${n.capitalize(e)}`]=t[i.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"===s.hemStyle?t.splitDartHemLeft:t.dartHemLeft,t.dartEnd="classic"===s.hemStyle?t.splitDartHemRight:t.dartHemRight;let g=a.hips*s.pocketWidth,b=g*s.weltHeight,k=b/Math.cos(n.deg2rad(s.pocketAngle));t.pocketTopMid=t.dartWaistCenter.shiftFractionTowards(t.dartHipCenter,s.pocketLocation),t.pocketTopMidLeft=n.curveIntersectsY(t.dartWaistLeft,t.dartWaistLeftCpBottom,t.dartHipLeftCpTop,t.dartHipLeft,t.pocketTopMid.y),t.pocketBottomMidLeft=n.curveIntersectsY(t.dartWaistLeft,t.dartWaistLeftCpBottom,t.dartHipLeftCpTop,t.dartHipLeft,t.pocketTopMid.y+k);const w=t.pocketBottomMidLeft.angle(t.pocketTopMidLeft)-90;if(t.pocketTopLeft=t.pocketTopMidLeft.shift(180+s.pocketAngle+w,g/2),t.pocketBottomLeft=t.pocketTopLeft.shift(s.pocketAngle-90+w,b),t.pocketTopMidRight=t.pocketTopMidLeft.flipX(t.pocketTopMid),t.pocketBottomMidRight=t.pocketBottomMidLeft.flipX(t.pocketTopMid),t.pocketTopRight=t.pocketTopMidRight.shift(s.pocketAngle-w,g/2),t.pocketBottomRight=t.pocketTopRight.shift(s.pocketAngle-90-w,b),d.set("pocketBagLength",.75*t.pocketTopMid.dy(t.cfHem)),s.frontScyeDart){const e=t.cfArmhole.dist(t.armhole);t._dartWidth=t.dartTop.shiftFractionTowards(t.armholeHollow.rotate(s.frontScyeDart,t.dartTop),1.5),t.armholeHollowTop=(new i).move(t.armholeHollow).curve(t.armholeHollowCp2,t.armholePitchCp1,t.armholePitch).intersects((new i).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 i of o)void 0!==t[i]&&(t[i]=t[i].rotate(s.frontScyeDart,t.dartTop));s.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 i).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"===s.hemStyle?(o.saBase.line(t.closureBottom).line(t.hemTip)._curve(t.splitDartHemLeftCp1,t.splitDartHemLeft),o.hemBase=(new i).move(t.dartEnd).curve(t.splitDartHemRightCp2,t.splitHemCp1,t.hem)):"rounded"===s.hemStyle?(o.saBase.line(t.roundStart).curve(t.roundCp1,t.roundCp2,t.roundEnd).line(t.dartHemLeft),o.hemBase=(new i).move(t.dartEnd).line(t.hem)):(o.saBase.line(t.closureBottom).line(t.dartHemLeft),o.hemBase=(new i).move(t.dartEnd).line(t.hem)),o.dart=dm(f),o.seam=o.saBase.join(o.dart).join(o.hemBase).close().attr("class","fabric"),h&&(o.sa=o.saBase.offset(h).join(o.hemBase.offset(h)).close().addClass("fabric sa")),o.saBase.hide(),o.hemBase.hide(),o.dart.hide(),p&&(o.pocket=(new i).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 i).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"})),d.cutlist.setCut({cut:2,from:"fabric"}),d.cutlist.addCut({cut:2,from:"interfacing"}),t.button1=new e(0,t.closureTop.y+10);let C=t.button1.dist(t.lastButton)/(s.buttons-1);for(let v=1;v<=s.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-h}),r("hd",{id:"wFrontEdgeToShoulder",from:t.closureTop,to:t.shoulder,y:t.neck.y-30-h}),r("hd",{id:"wFrontEdgeToArmhole",from:t.closureTop,to:t.armhole,y:t.neck.y-45-h}),r("ld",{id:"lShoulderSeam",from:t.neck,to:t.shoulder,d:15+h}),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+h}),r("vd",{id:"hArmholeToHps",from:t.armhole,to:t.neck,x:t.armhole.x+30+h}),r("vd",{id:"hHemToArmhole",from:t.hem,to:t.armhole,x:(t.armhole.x>t.hem.x?t.armhole.x:t.hem.x)+15+h}),r("vd",{id:"hDartRightToArmhole",from:"classic"===s.hemStyle?t.splitDartHemRight:t.dartHemRight,to:t.armhole,x:(t.armhole.x>t.hem.x?t.armhole.x:t.hem.x)+30+h}),r("vd",{id:"hDartLeftToArmhole",from:"classic"===s.hemStyle?t.splitDartHemLeft:t.dartHemLeft,to:t.armhole,x:(t.armhole.x>t.hem.x?t.armhole.x:t.hem.x)+45+h}),r("ld",{id:"wDartToSide",from:t.dartHemRight,to:t.hem,d:15}),"classic"===s.hemStyle?(r("hd",{id:"wHemChamfer",from:t.closureBottom,to:t.hemTip,y:t.hemTip.y+15+h}),r("vd",{id:"hHemChamfer",from:t.hemTip,to:t.closureBottom,x:t.closureBottom.x-15-h})):"rounded"===s.hemStyle&&(r("hd",{id:"wHemFinish",from:t.roundStart,to:t.roundEnd,y:t.roundEnd.y+15+h}),r("vd",{id:"hHemToButton",from:t.roundEnd,to:t.roundStart,x:t.roundStart.x-15-h})),r("hd",{id:"wFrontEdgeToDartStart",from:t.roundStart,to:t.dartHemLeft,y:t.hemTip.y+30+h}),r("hd",{id:"wFrontEdgeToDartEnd",from:t.roundStart,to:t.dartHemRight,y:t.hemTip.y+45+h}),r("hd",{id:"wFull",from:t.roundStart,to:t.hem,y:t.hemTip.y+60+h}),r("vd",{id:"hHemToPocketTopAtDart",from:t.roundEnd,to:t.pocketTopMidLeft,x:t.roundStart.x-30-h}),r("vd",{id:"hHemToWaist",from:t.roundEnd,to:t.dartWaistLeft,x:t.roundStart.x-45-h}),r("vd",{id:"hHemToClosureTop",from:t.roundEnd,to:t.closureTop,x:t.roundStart.x-60-h}),r("vd",{id:"hClosureTopToHps",from:t.closureTop,to:t.neck,x:t.closureTop.x-15-h}),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-h}),f}};const Cm={name:"wahid.back",from:I,hide:s.V9.HIDE_TREE,measurements:["hips","waist"],options:{backInset:{pct:15,min:10,max:20,menu:"advanced"},shoulderInset:um,neckInset:gm,centerBackDart:{pct:2,min:0,max:5,menu:"fit"},backScyeDart:{deg:2,min:0,max:6,menu:"fit"},legacyWaistHips:km},draft:function({points:t,Point:e,paths:o,Path:i,measurements:a,options:s,macro:n,store:r,sa:l,snippets:c,part:p}){for(let g of Object.keys(o))delete o[g];delete c.armholePitchNotch,s.legacyWaistHips||(t.waist=new e(a.waist*(1+s.waistEase)/4,t.cbWaist.y),t.hips=new e(a.hips*(1+s.hipsEase)/4,t.cbHips.y),t.hem=new e(t.hips.x,t.cbHem.y));let h=t.shoulder.dist(t.neck),d=h*s.backInset;t.armholePitch=t.armholePitch.shift(180,d),t.armholePitchCp1=t.armholePitchCp1.shift(180,d),t.armholePitchCp2=t.armholePitchCp2.shift(180,d),t.armholeHollow=t.armholeHollow.shift(180,d/2),t.armholeHollowCp2=t.armholeHollowCp2.shift(180,d/2),t.armholeHollowCp1=t.armholeHollowCp1.shift(180,d/2),t.shoulder=t.shoulder.shiftTowards(t.neck,h*s.shoulderInset),t.shoulderCp1=t.shoulderCp1.shift(t.shoulder.angle(t.neck),h*s.shoulderInset),t.neck=t.neck.shiftTowards(t.shoulder,h*s.neckInset),t.neckCp2=t.neck.shift(t.shoulder.angle(t.neck)+90,.1*h),t.cbNeck=(new i).move(t.cbNeck)._curve(t.neckCp2,t.neck).shiftAlong(a.shoulderToShoulder*s.centerBackDart),t.cbNeckCp2=new e(0,t.armholePitch.y),pm(p),t.dartStart=t.dartHemLeft,t.dartEnd=t.dartHemRight,hm(p),t._dartWidth=t.cbNeckCp2.shiftFractionTowards(t.armholePitch.rotate(s.backScyeDart,t.cbNeckCp2),1.2),t.armholePitchTop=s.backScyeDart>0?(new i).move(t.armholePitch).curve(t.armholePitchCp2,t.shoulderCp1,t.shoulder).intersects((new i).move(t.cbNeckCp2).line(t._dartWidth)).pop():t.armholePitch.clone();let f=["cbNeck","neckCp2","neck","shoulder","shoulderCp1"];for(let g of f)t[g]=t[g].rotate(s.backScyeDart,t.cbNeckCp2);delete o.cutonfold,delete o.saBase,delete o.sa,o.saBase=(new i).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 i).move(t.cbHem).line(t.hem),o.dart=dm(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 m=r.get("wr12"),u=r.get("hr12");return 0===m&&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"}),n("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),n("grainline",{from:t.grainlineTop,to:t.grainlineBottom}),n("scalebox",{at:new e(t.logo.x,t.cfNeck.y)}),n("ld",{id:"lShoulderSeam",from:t.neck,to:t.shoulder,d:15+l}),n("hd",{id:"wCbDart",from:t.cbArmhole,to:t.cbNeck,y:t.cbNeck.y-15-l}),n("hd",{id:"wCbToHps",from:t.cbArmhole,to:t.neck,y:t.cbNeck.y-30-l}),n("hd",{id:"wCbToShoulder",from:t.cbArmhole,to:t.shoulder,y:t.cbNeck.y-45-l}),n("hd",{id:"wCbToArmholePitch",from:t.cbArmhole,to:t.armholePitch,y:t.armholePitch.y}),n("hd",{id:"wCbToDartTip",from:t.cbArmhole,to:t.dartTop,y:t.dartTop.y-15}),n("vd",{id:"hArmholeToArmholePitch",from:t.armhole,to:t.armholePitch,x:t.armhole.x+15+l}),n("vd",{id:"hArmholeTpShoulder",from:t.armhole,to:t.shoulder,x:t.armhole.x+30+l}),n("vd",{id:"hArmholeToHps",from:t.armhole,to:t.neck,x:t.armhole.x+45+l}),n("vd",{id:"hHemToWaist",from:t.hem,to:t.waist,x:t.armhole.x+15+l}),n("vd",{id:"hHemToArmhole",from:t.hem,to:t.armhole,x:t.armhole.x+30+l}),n("hd",{id:"wDartSideAtHemToSide",from:t.dartHemRight,to:t.hem,y:t.hem.y+3*l+15}),n("hd",{id:"wDartSideAtHemToCb",from:t.cbHem,to:t.dartHemLeft,y:t.hem.y+3*l+15}),n("hd",{id:"wAtHem",from:t.cbHem,to:t.hem,y:t.hem.y+3*l+30}),n("ld",{id:"lDartAtWaist",from:t.dartWaistLeft,to:t.dartWaistRight}),n("ld",{id:"wDartAtHip",from:t.dartHipLeft,to:t.dartHipRight}),n("vd",{id:"hHemToArmhole",from:t.cbHem,to:t.cbArmhole,x:t.cbHem.x-15-l}),n("vd",{id:"hHemToCbNeck",from:t.cbHem,to:t.cbNeck,x:t.cbHem.x-30-l}),n("vd",{id:"hFull",from:t.cbHem,to:t.neck,x:t.cbHem.x-45-l}),p}};const vm={name:"wahid.frontFacing",from:wm,draft:function({points:t,Point:e,paths:o,Path:i,options:a,macro:s,snippets:n,Snippet:r,store:l,expand:c,sa:p,part:h}){if(!c)return l.flag.note({msg:"wahid:cutFrontFacing",suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),l.flag.preset("expandIsOff"),h.hide();l.flag.preset("expandIsOn");for(let d of Object.keys(o).filter((t=>"grainline"!==t)))delete o[d];for(let d of Object.keys(n))delete n[d];return o.seam=(new i).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"===a.hemStyle?o.seam.line(t.closureBottom).line(t.hemTip)._curve(t.splitDartHemLeftCp1,t.splitDartHemLeft):"rounded"===a.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),s("title",{nr:"1a",at:t.title,title:"frontFacing"}),t.logo=t.closureTop.shiftFractionTowards(t.dartWaistLeft,.5),n.logo=new r("logo",t.logo),s("grainline",{to:t.neck,from:new e(t.neck.x,t.cfHem.y)}),h}};const Tm={name:"wahid.frontLining",from:wm,draft:function({points:t,Point:e,paths:o,Path:i,options:a,macro:s,snippets:n,Snippet:r,store:l,sa:c,expand:p,part:h}){if(!p)return l.flag.note({msg:"wahid:cutFrontLining",suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),l.flag.preset("expandIsOff"),h.hide();l.flag.preset("expandIsOn");for(let d of Object.keys(o))delete o[d];for(let d of Object.keys(n))delete n[d];return o.seam=(new i).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"===a.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"}),s("grainline",{from:t.flbTop,to:new e(t.flbTop.x,t.dartTop.y)}),t.title=t.armhole.shiftFractionTowards(t.dartTop,.5),s("rmtitle"),s("title",{nr:"1b",at:t.title,title:"frontLining"}),t.logo=t.dartWaistRight.shiftFractionTowards(t.waist,.5),n.logo=new r("logo",t.logo),h}};const ym={name:"wahid.pocketWelt",measurements:["hips"],options:{pocketWidth:fm,pocketAngle:bm,weltHeight:mm},draft:function({points:t,Point:e,paths:o,Path:i,measurements:a,store:s,options:n,macro:r,units:l,complete:c,expand:p,part:h}){const d=a.hips*n.pocketWidth,f=d*n.weltHeight;if(!p)return s.flag.note({msg:"wahid:cutPocketWelt",replace:{l:l(d),w:l(f)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),s.flag.preset("expandIsOff"),h.hide();s.flag.preset("expandIsOn"),t.topLeft=new e(0,0),t.topRight=new e(d+30,0),t.bottomLeft=new e(0,2*f+20),t.bottomRight=new e(t.topRight.x,t.bottomLeft.y),t.notchLeft=new e(15,10),t.notchRight=new e(d+15,10),t.midLeft=new e(0,f+10),t.midRight=new e(d+30,f+10),o.seam=(new i).move(t.topLeft).line(t.bottomLeft).line(t.bottomRight).line(t.topRight).line(t.topLeft).close().attr("class","fabric"),c&&(o.cutline=(new i).move(t.notchLeft).line(t.notchRight).attr("class","fabric stroke-sm dashed"),o.foldline=(new i).move(t.midLeft).line(t.midRight).attr("class","hint dotted")),s.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 m=.1*t.topLeft.dist(t.topRight);return t.grainlineFromWelt=new e(t.topLeft.x,t.topLeft.y).shift(0,m),t.grainlineToWelt=new e(t.topLeft.x,t.topLeft.y).shift(0,m).shift(-90,2*f+20),t.grainlineToWeltRotated=t.grainlineToWelt.rotate(n.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}),h}};const xm={name:"wahid.pocketBag",after:wm,draft:function({points:t,Point:e,paths:o,Path:i,measurements:a,utils:s,options:n,macro:r,store:l,part:c}){const p=a.hips*n.pocketWidth,h=l.get("pocketBagLength");t.topLeft=new e(0,0),t.topRight=new e(p+30,0),t.bottomLeft=new e(0,h+10),t.bottomRight=new e(t.topRight.x,t.bottomLeft.y);const d={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 f in d)for(const e of["start","cp1","cp2","end"])t[`${f}${s.capitalize(e)}`]=t[d[f].points[e]].copy();return o.seam=(new i).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 Bm={name:"wahid.pocketFacing",after:wm,draft:function({points:t,Point:e,paths:o,Path:i,measurements:a,utils:s,options:n,macro:r,complete:l,store:c,part:p}){const h=a.hips*n.pocketWidth,d=h*n.weltHeight,f=c.get("pocketBagLength")+d;t.topLeft=new e(0,0),t.topRight=new e(h+30,0),t.bottomLeft=new e(0,f+10),t.bottomRight=new e(t.topRight.x,t.bottomLeft.y),t.notchLeft=new e(15,10),t.notchRight=new e(h+15,10);
1const m={roundLeft:r("round",{id:"roundLeft",from:t.topLeft,to:t.bottomRight,via:t.bottomLeft,radius:h/8,hidden:!0}),roundRight:r("round",{id:"roundRight",from:t.bottomLeft,to:t.topRight,via:t.bottomRight,radius:h/8,hidden:!0})};for(const g in m)for(const e of["start","cp1","cp2","end"])t[`${g}${s.capitalize(e)}`]=t[m[g].points[e]].copy();o.seam=(new i).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 i).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,f),t.grainlineToPocketFacingRotated=t.grainlineToPocketFacing.rotate(n.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 Sm={name:"wahid.pocketInterfacing",measurements:["hips"],options:{pocketWidth:fm,pocketAngle:bm,weltHeight:mm},draft:function({points:t,Point:e,paths:o,Path:i,measurements:a,options:s,macro:n,expand:r,units:l,store:c,complete:p,part:h}){const d=a.hips*s.pocketWidth,f=d*s.weltHeight;if(!r)return c.flag.note({msg:"wahid:cutPocketInterfacing",replace:{l:l(d),w:l(f)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),c.flag.preset("expandIsOff"),h.hide();c.flag.preset("expandIsOn"),t.topLeft=new e(0,0),t.topRight=new e(d+30,0),t.bottomLeft=new e(0,f+20),t.bottomRight=new e(t.topRight.x,t.bottomLeft.y),t.notchLeft=new e(15,10),t.notchRight=new e(d+15,10),o.seam=(new i).move(t.topLeft).line(t.bottomLeft).line(t.bottomRight).line(t.topRight).line(t.topLeft).close().attr("class","interfacing"),p&&(o.cutline=(new i).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),n("title",{nr:6,title:"pocketInterfacing",at:t.title,align:"center",scale:.666});const m=.1*t.topLeft.dist(t.topRight);return t.grainlineFromInterfacing=new e(t.topLeft.x,t.topLeft.y).shift(0,m),t.grainlineToInterfacing=new e(t.topLeft.x,t.topLeft.y).shift(0,m).shift(-90,f+20),t.grainlineToInterfacingRotated=t.grainlineToInterfacing.rotate(s.pocketAngle,t.grainlineFromInterfacing),n("grainline",{from:t.grainlineFromInterfacing,to:t.grainlineToInterfacingRotated}),n("sprinkle",{snippet:"notch",on:["notchLeft","notchRight"]}),n("hd",{id:"wFull",from:t.bottomLeft,to:t.bottomRight,y:t.bottomLeft.y+15}),n("vd",{id:"hFull",from:t.bottomRight,to:t.topRight,x:t.topRight.x+15}),h}},Lm=new s.pT({data:lm,parts:[wm,Cm,vm,Tm,ym,xm,Bm,Sm]}),Pm=(0,s.D4)([_,cm],{o:{drop:Object.keys(_.en.o).filter((t=>0===t.indexOf("sleeve")))}}),Rm=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}'),Fm={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 Wm={bool:!0,menu:"style"},Hm={pct:100,min:10,max:190,menu:"style"},Am={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:Wm,neckoRatio:Hm},draft:function({Point:t,points:e,Path:o,paths:i,measurements:a,options:n,macro:r,snippets:l,Snippet:c,sa:p,store:h,utils:d,part:f}){const m="toKnee"===n.length?a.waistToKnee:"toMidLeg"===n.length?a.waistToKnee/1.3:.95*a.waistToFloor,u=a.hpsToWaistBack+a.waistToHips,g=a.shoulderToShoulder/2*n.widthBonus,b=(a.hpsToWaistBack+m)*n.lengthBonus,k=a.head/4*n.headRatio;if(h.set("hhead",k),h.set("goldenRatio",s.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,k),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)/s.fC),e.triangleLeft=e.triangle.shift(0,e.bottom.dx(e.bottomLeft)),i.seamBase=(new o).move(e.headLeft).line(e.topLeft).line(e.triangleLeft).line(e.bottomMiddle).line(e.triangle).hide(),i.seam=(new o).move(e.top).line(e.topLeft).join(i.seamBase).line(e.top).close().attr("class","fabric"),p){const t=e.bottomMiddle.angle(e.triangle);i.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(d.beamIntersectsX(e.bottomMiddle.shift(270+t,p),e.triangle.shift(270+t,p),e.triangle.x)).line(e.triangle).hide(),i.sa=i.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 h.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),!1===n.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}),f}};const Om={name:"walburga.front",from:Am,measurements:["neck"],options:{neckline:Wm,neckoRatio:Hm},draft:function({points:t,Path:e,paths:o,measurements:i,options:a,macro:s,snippets:n,Snippet:r,sa:l,store:c,utils:p,part:h}){const d=2*c.get("hhead"),f=c.get("goldenRatio"),m=f*a.neckoRatio;if(!0===a.neckline){let a,s;a=1/4*(-(m**2)*d+Math.sqrt(4*d**2*m**2+d**2*m**4)),s=2*a/m,a<i.neck/4&&(a=i.neck/4,s=2*i.neck/4/f),s<i.neck/4&&(s=i.neck/4,a=i.neck/4*f/2),t.neckotop=t.top.shift(0,-a
1),t.neckomid=t.top.shift(-90,s),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===a.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===a.neckline&&(s("rmcutonfold"),s("cutonfold",{from:t.triangle,to:t.neckomid,grainline:!0})),t.logo=t.top.shift(45,t.bottom.dy(t.top)/5),n.logo=new r("logo",t.logo),t.title=t.logo.shift(90,t.bottom.dy(t.top)/4),s("title",{at:t.title,nr:1,title:"front",align:"center"}),t.scalebox=t.title.shift(90,t.bottom.dy(t.top)/5),s("scalebox",{at:t.scalebox}),a.neckline&&(s("ld",{id:"lNeckOpening",from:t.neckotop,to:t.neckomid,d:-15}),s("hd",{id:"wNeckOpening",from:t.neckomid,to:t.neckotop,y:t.top.y-l-15}),s("vd",{id:"hNeckOpening",from:t.neckotop,to:t.neckomid,x:t.top.x+l+15})),h}};const Dm={name:"walburga.back",from:Am,draft:function({points:t,macro:e,snippets:o,Snippet:i,part:a}){return t.logo=t.top.shift(45,t.bottom.dy(t.top)/5),o.logo=new i("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}),a}},Em=new s.pT({data:Rm,parts:[Dm,Om]}),Im=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}'),Nm={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."}}}')},Mm={backRaise:{pct:10,min:0,max:25,toAbs:(t,{measurements:e,options:o},i)=>t*(e.crotchDepth*(1+i.waistRaise)*i.crotchEase),menu:"fit"},waistRaise:{pct:0,min:-20,max:40,toAbs:(t,{measurements:e,options:o},i)=>e.crotchDepth*(1+t),menu:"fit"},fitWaist:{bool:!0,menu:"fit"},hemWidth:{pct:1.75,min:1,max:2.5,...(0,s.Wx)("inseam"),menu:"style"},legSize:{pct:75,max:90,min:50,...(0,s.Wx)("inseam"),menu:"style"},waistOverlap:{pct:50,min:10,max:100,toAbs:(t,{measurements:e,options:o},i)=>{const a=void 0===e.waist||0==i.fitWaist?e.seat:e.waist;return(e.seat>a?e.seat:a)*t},menu:"style"},frontPocket:{bool:!0,menu:"style"},backPocket:{bool:!0,menu:"style"},waistbandWidth:{pct:3.5,min:2,max:5,...(0,s.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},_m={name:"waralee.pantsProto",hide:{self:!0},measurements:["seat","inseam","crotchDepth","waistToHips"],optionalMeasurements:["waist","waistBack"],options:Mm,draft:({options:t,measurements:e,Point:o,Path:i,points:a,paths:s,store:n,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,h=e.seat>p?e.seat:p,d=void 0===e.waistBack||0==t.fitWaist?p/2:e.waistBack,f=t.separateWaistband||"waistband"==t.frontPocketStyle,m=h/4,u=e.inseam*t.hemWidth,g=e.inseam*t.waistbandWidth,b=t.frontPocketSize*e.crotchDepth,k=(e.crotchDepth-e.waistToHips)*t.frontPocketDepthFactor>1.75*b?(e.crotchDepth-e.waistToHips)*t.frontPocketDepthFactor:1.75*b,w=b*t.frontPocketWidthHeightRatio;n.set("waistBand",g),n.set("hem",u),n.set("pocketDepth",k),n.set("frontPocketSize",b),a.mWaist=new o(0,0),a.mHip=a.mWaist.shift(270,c),a.fWaistSide=a.mWaist.shift(180,t.crotchFront*m).shift(90,g),a.fWaistCrotchCP=a.fWaistSide.shift(270,c*t.crotchFactorFrontVer+g),a.fHipCrotchCP=a.mHip.shift(180,t.crotchFront*m*t.crotchFactorFrontHor),a.fHipSide=a.mHip.shift(180,t.crotchFront*m),a.bWaistSide=a.mWaist.shift(0,t.crotchBack*m).shift(90,g).shift(90,t.backRaise*c),a.bWaistCrotchCP=a.bWaistSide.shift(270,c*t.crotchFactorBackVer),a.bHipCrotchCP=a.mHip.shift(0,t.crotchBack*m*t.crotchFactorBackHor),a.bHipSide=a.mHip.shift(0,t.crotchBack*m),a.fCutOutHip=(new i).move(a.fWaistSide).curve(a.fWaistCrotchCP,a.fHipCrotchCP,a.mHip).shiftAlong(e.waistToHips+g),a.bCutOutHip=(new i).move(a.bWaistSide).curve(a.bWaistCrotchCP,a.bHipCrotchCP,a.mHip).shiftAlong(e.waistToHips+g+t.backRaise*c);const C=e.seat/2-d,v=e.seat/2-(p-d);a.bWaistAdjusted=a.bWaistSide.shift(0,C*t.backWaistAdjustment),a.fWaistAdjusted=a.fWaistSide.shift(180,v*t.frontWaistAdjustment),a.mLeg=a.mHip.shift(270,e.inseam*t.legSize),a.fLegSide=a.mLeg.shift(180,t.crotchFront*m),a.bLegSide=a.mLeg.shift(0,t.crotchBack*m),a.fWaistFront=a.fWaistSide.shift(180,m),a.fWaistFrontOverlap=a.fWaistFront.shift(180,t.waistOverlap*m),a.fHipFront=a.fHipSide.shift(180,m),a.fHipFrontOverlap=a.fHipFront.shift(180,t.waistOverlap*m),a.fLegFront=a.fLegSide.shift(180,m),a.fLegFrontOverlap=a.fLegFront.shift(180,t.waistOverlap*m);const T=Math.sqrt(m*m-t.backRaise*c*t.backRaise*c);a.bWaistBack=a.mWaist.shift(90,g).shift(0,t.crotchBack*m+T),a.bWaistBackOverlap=a.bWaistBack.shift(0,t.waistOverlap*m),a.bHipBack=a.bHipSide.shift(0,m),a.bHipBackOverlap=a.bHipBack.shift(0,t.waistOverlap*m),a.bLegBack=a.bLegSide.shift(0,m),a.bLegBackOverlap=a.bLegBack.shift(0,t.waistOverlap*m),a.bWaistSideTemp=a.bWaistSide.shift(0,2);const y=(new i).move(a.fWaistSide).curve(a.fWaistCrotchCP,a.fHipCrotchCP,a.mHip).split(a.fCutOutHip),x=(new i).move(a.bWaistSide).curve(a.bWaistCrotchCP,a.bHipCrotchCP,a.mHip).split(a.bCutOutHip);if(y[0].hide(),y[1].hide(),x[0].hide(),x[1].hide(),a.fCutOutHipCp1=y[1].ops[1].cp1.shiftFractionTowards(a.fCutOutHip,1.25),a.fCutOutHipCp2=y[1].ops[1].cp1.clone(),a.mHipCp1=y[1].ops[1].cp2.clone(),a.mHipCp2=x[1].ops[1].cp2.clone(),a.bCutOutHipCp1=x[1].ops[1].cp1.clone(),a.bCutOutHipCp2=x[1].ops[1].cp1.shiftFractionTowards(a.bCutOutHip,1.25),s.frontBottomCutOut=(new i).move(a.mHip).curve(a.mHipCp1,a.fCutOutHipCp2,a.fCutOutHip).hide(),s.backBottomCutOut=(new i).move(a.bCutOutHip).curve(a.bCutOutHipCp1,a.mHipCp2,a.mHip).hide(),s.frontTopCutOut=(new i).move(a.fCutOutHip).curve(a.fCutOutHipCp1,a.fWaistAdjusted,a.fWaistAdjusted).hide(),s.backTopCutOut=(new i).move(a.bWaistAdjusted).curve(a.bWaistAdjusted,a.bCutOutHipCp2,a.bCutOutHip).hide(),a.fWaistSideHem=s.frontTopCutOut.reverse().shiftAlong(g),a.fWaistSideSeam=s.frontTopCutOut.reverse().shiftAlong(2*g),a.fWaistSide=a.fWaistSideSeam.flipY(a.fWaistSideHem),a.bWaistSideHem=s.backTopCutOut.shiftAlong(g),a.bWaistSideSeam=s.backTopCutOut.shiftAlong(2*g),a.bWaistSide=a.bWaistSideSeam.flipY(a.bWaistSideHem),a.fWaistFrontOverlapHem=a.fWaistFrontOverlap.shift(270,g),a.bWaistBackHem=a.bWaistBack.shift(270,g),a.bWaistBackOverlapHem=a.bWaistBackOverlap.shift(270,g),a.fWaistFrontOverlapSeam=a.fWaistFrontOverlap.shift(270,2*g),a.bWaistBackSeam=a.bWaistBack.shift(270,2*g),a.bWaistBackOverlapSeam=a.bWaistBackOverlap.shift(270,2*g),a.fWaistSideCp2=s.frontTopCutOut.split(a.fWaistSideSeam)[0].ops[1].cp2.clone(),a.fWaistSideCp2=s.frontTopCutOut.split(a.fWaistSideSeam)[0].ops[1].cp2.clone(),a.fWaistHipCp1=s.frontTopCutOut.split(a.fWaistSideSeam)[0].ops[1].cp1.clone(),a.bWaistSideCp1=s.backTopCutOut.split(a.bWaistSideSeam)[1].ops[1].cp1.clone(),a.bWaistHipCp2=s.backTopCutOut.split(a.bWaistSideSeam)[1].ops[1].cp2.clone(),a.mWaist1=new o(a.mWaist.x,f?a.fWaistSideSeam.y:a.fWaistSide.y),a.mWaist2=new o(a.mWaist.x,f?a.bWaistSideSeam.y:a.bWaistSide.y),s.frontTopCutOut=(new i).move(a.fCutOutHip).curve(a.fCutOutHipCp1,a.fWaistSideCp2,a.fWaistSideSeam).hide(),0==f&&(s.frontTopCutOut.line(a.fWaistSideHem),s.frontTopCutOut.line(a.fWaistSide)),s.backTopCutOut=0==f?(new i).move(a.bWaistSide).line(a.bWaistSideHem).line(a.bWaistSideSeam):(new i).move(a.bWaistSideSeam),s.backTopCutOut.curve(a.bWaistSideCp1,a.bCutOutHipCp2,a.bCutOutHip).hide(),s.cutout=s.backTopCutOut.join(s.backBottomCutOut).join(s.frontBottomCutOut).join(s.frontTopCutOut).hide(),s.waistBack=(new i).move(f?a.bWaistBackOverlapSeam:a.bWaistBackOverlap).line(f?a.bWaistBackSeam:a.bWaistBack).line(f?a.bWaistSideSeam:a.bWaistSide).hide(),s.waistFront=(new i).move(f?a.fWaistSideSeam:a.fWaistSide).line(f?a.fWaistFrontOverlapSeam:a.fWaistFrontOverlap).hide(),s.front=(new i).move(f?a.fWaistFrontOverlapSeam:a.fWaistFrontOverlap).line(a.fHipFrontOverlap).line(a.fLegFrontOverlap).hide(),s.back=(new i).move(a.bLegBackOverlap).line(a.bHipBackOverlap).line(f?a.bWaistBackOverlapSeam:a.bWaistBackOverlap).hide(),s.leg=(new i).move(a.fLegFrontOverlap).line(a.bLegBackOverlap).hide(),s.seam=s.waistFront.join(s.front).join(s.leg).join(s.back).join(s.waistBack).join(s.cutout).close().addClass("fabric").hide(),t.frontPocket){a.frontPocketTop=a.fWaistSideSeam.shift(270,t.frontPocketVerticalOffset*e.crotchDepth+g*(f?1:2)).shift(180,t.frontPocketHorizontalOffset*e.seat),a.frontPocketTop2=a.frontPocketTop.shift(340,w),a.frontPocketBottom=a.frontPocketTop.shift(250,b),a.frontPocketBottom2=a.frontPocketBottom.shift(340,w),s.frontPocket=(new i).move(a.frontPocketTop).line(a.frontPocketBottom).line(a.frontPocketBottom2).line(a.frontPocketTop2).close().addClass("fabric").hide(),a.frontPocketSeam=l.beamsIntersect(a.frontPocketBottom,a.frontPocketTop,a.fWaistSideSeam,a.fWaistFrontOverlapSeam);const o=a.frontPocketTop.dist(a.frontPocketSeam);a.frontPocketTopLeft=a.frontPocketSeam.shiftTowards(a.fWaistFrontOverlapSeam,w),a.frontPocketTopRight=a.frontPocketTopLeft.shift(0,k*(1/3)),a.frontPocketBottomRight=a.frontPocketTopRight.shift(270,k+o),a.frontPocketBottomLeft=a.frontPocketTopLeft.shift(250,k*(5/6)+o),a.frontPocketBottomRight
1CP=a.frontPocketBottomRight.shift(180,k*(1/6)),a.frontPocketBottomLeftCP=a.frontPocketBottomLeft.shift(315,k*(1/4)),s.frontPocketSeamSA=(new i).move(a.frontPocketTopRight).line(a.frontPocketTopLeft).line(a.frontPocketBottomLeft).curve(a.frontPocketBottomLeftCP,a.frontPocketBottomRightCP,a.frontPocketBottomRight).hide(),s.frontPocketSeam=(new i).move(a.frontPocketBottomRight).line(a.frontPocketTopRight).join(s.frontPocketSeamSA).close().addClass("dotted mark").hide()}return t.backPocket&&(a.backPocketRight=a.bWaistBack.shiftTowards(a.bWaistSide,t.backPocketHorizontalOffset*e.seat).shift(270,t.backPocketVerticalOffset*e.crotchDepth+g*(f?1:2)),a.backPocketLeft=a.bWaistBack.shiftTowards(a.bWaistSide,t.backPocketHorizontalOffset*e.seat+t.backPocketSize*e.crotchDepth).shift(270,t.backPocketVerticalOffset*e.crotchDepth+g*(f?1:2)),a.backPocketRight2=a.backPocketRight.shift(a.backPocketRight.angle(a.backPocketLeft)+90,12),a.backPocketLeft2=a.backPocketLeft.shift(a.backPocketLeft.angle(a.backPocketRight)-90,12),s.backPocket=(new i).move(a.backPocketLeft).line(a.backPocketLeft2).line(a.backPocketRight2).line(a.backPocketRight).close().addClass("fabric").hide()),r.hide()}},jm={name:"waralee.pants",from:_m,draft:({options:t,points:e,Path:o,paths:i,Snippet:a,snippets:s,sa:n,macro:r,store:l,expand:c,part:p})=>{const h=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==h&&(i.waistFoldBack=(new o).move(e.bWaistSideHem).line(h?e.bWaistBackSeam:e.bWaistBackHem).line(h?e.bWaistBackSeam:e.bWaistBackOverlapHem).addClass("fabric stroke-sm"),i.waistFoldFront=(new o).move(e.fWaistSideHem).line(e.fWaistFrontOverlapHem).addClass("fabric stroke-sm")),i.frontFold=i.front.offset(-1*l.get("hem")).addClass("fabric stroke-sm"),i.legFold=i.leg.offset(-1*l.get("hem")).addClass("fabric stroke-sm"),i.backFold=i.back.offset(-1*l.get("hem")).addClass("fabric stroke-sm"),i.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),s.logo=new a("logo",e.logo),r("scalebox",{at:e.mHip.shift(-90,70)}),n&&(i.sa=i.seam.offset(n).addClass("fabric sa")),t.frontPocket&&"welt"==t.frontPocketStyle&&(i.frontPocket.unhide(),i.frontPocketSeam.unhide()),t.backPocket&&i.backPocket.unhide();let d=h?e.fWaistSideSeam:e.fWaistSide,f=h?e.bWaistSideSeam:e.bWaistSide;return r("hd",{id:1,from:d,to:e.mWaist1,y:d.y}),r("hd",{id:2,from:e.fWaistFrontOverlap,to:e.mWaist1,y:d.y-n-15}),r("hd",{id:2,from:e.mWaist,to:f,y:f.y}),r("hd",{id:3,from:e.mWaist1,to:h?e.bWaistBackSeam:e.bWaistBack,y:f.y-n-15}),r("hd",{id:4,from:e.mWaist1,to:h?e.bWaistBackSeam:e.bWaistBackOverlap,y:f.y-n-30}),r("vd",{id:5,from:e.mWaist1,to:e.mHip,x:e.mWaist.x}),r("vd",{id:6,from:f,to:h?e.bWaistBackSeam:e.bWaistBack,x:f.x+15}),r("vd",{id:7,from:h?e.bWaistBackSeam:e.bWaistBackOverlap,to:e.bLegBackOverlap,x:e.bLegBackOverlap.x-30}),0==h&&(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:d,to:e.frontPocketTop,x:e.frontPocketTop.x}),r("vd",{id:10,from:d,to:e.frontPocketBottom,x:e.frontPocketBottom.x}),r("hd",{id:11,from:e.frontPocketTop,to:d,y:e.frontPocketTop.y}),r("hd",{id:12,from:e.frontPocketBottom,to:d,y:e.frontPocketBottom.y})),t.backPocket&&(r("vd",{id:13,from:f,to:e.backPocketLeft,x:e.backPocketLeft.x}),r("vd",{id:14,from:f,to:e.backPocketRight,x:e.backPocketRight.x}),r("hd",{id:15,from:f,to:e.backPocketLeft,y:e.backPocketLeft.y}),r("hd",{id:16,from:f,to:e.backPocketRight,y:e.backPocketRight.y}))),p}},Gm={name:"waralee.cutout",from:_m,draft:({options:t,Path:e,points:o,paths:i,Snippet:a,snippets:s,sa:n,macro:r,expand:l,part:c})=>{if(l)return c.hide();const p=t.separateWaistband||"waistband"==t.frontPocketStyle;return i.seam=(new e).move(o.mWaist1).line(o.mWaist2).line(p?o.bWaistSideSeam:o.bWaistSide).join(i.backTopCutOut).join(i.backBottomCutOut).join(i.frontBottomCutOut).join(i.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),s.logo=new a("logo",o.logo),n&&(i.seamAlternate=(new e).move(p?o.bWaistSideSeam:o.bWaistSide).join(i.backTopCutOut).join(i.backBottomCutOut).join(i.frontBottomCutOut).join(i.frontTopCutOut),i.sa=i.seamAlternate.offset(n).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}},Ym={name:"waralee.pocket",from:_m,draft:({options:t,Point:e,Path:o,points:i,paths:a,Snippet:n,snippets:r,sa:l,macro:c,store:p,part:h})=>{if(0==t.frontPocket)return h.hide();const d=p.get("frontPocketSize");return"welt"!=t.frontPocketStyle?(i.topLeft=new e(0,0),i.topRight=i.topLeft.shift(0,d),i.bottomLeft=i.topLeft.shift(270,1.5*d),i.bottomRight=i.topRight.shift(270,1.5*d),i.bottomLeftCornerUp=i.bottomLeft.shift(90,d/4),i.bottomLeftCornerUpCp1=i.bottomLeftCornerUp.shift(270,d/4*s.Qr),i.bottomLeftCornerOver=i.bottomLeft.shift(0,d/4),i.bottomLeftCornerOverCp2=i.bottomLeftCornerOver.shift(180,d/4*s.Qr),i.bottomRightCornerUp=i.bottomRight.shift(90,d/4),i.bottomRightCornerUpCp2=i.bottomRightCornerUp.shift(270,d/4*s.Qr),i.bottomRightCornerOver=i.bottomRight.shift(180,d/4),i.bottomRightCornerOverCp1=i.bottomRightCornerOver.shift(0,d/4*s.Qr),a.seam=(new o).move(i.topLeft).line(i.bottomLeftCornerUp).curve(i.bottomLeftCornerUpCp1,i.bottomLeftCornerOverCp2,i.bottomLeftCornerOver).line(i.bottomRightCornerOver).curve(i.bottomRightCornerOverCp1,i.bottomRightCornerUpCp2,i.bottomRightCornerUp).line(i.topRight).line(i.topLeft).close().addClass("fabric"),a.sa=a.seam.offset(l).addClass("fabric sa")):(a.frontPocketSeam.unhide().setClass("fabric"),l&&(
1a.sa=a.frontPocketSeamSA.offset(l).close().addClass("fabric sa")),a.frontPocket.unhide().setClass("mark"),c("cutonfold",{from:i.frontPocketBottomRight,to:i.frontPocketTopRight})),p.cutlist.addCut({cut:2,from:"lining"}),i.title=i.frontPocketTopLeft.shift(270,75).shift(0,50),c("title",{nr:3,at:i.title,title:"pocket"}),i.logo=i.title.shift(270,75),r.logo=new n("logo",i.logo),i.text=i.logo.shift(-90,25).addText("Waralee","center"),"welt"==t.frontPocketStyle?(c("hd",{id:1,from:i.frontPocketTopLeft,to:i.frontPocketTopRight,y:i.frontPocketTopLeft.y-l-15}),c("hd",{id:2,from:i.frontPocketBottomLeft,to:i.frontPocketBottomRight,y:i.frontPocketBottomRight.y+l+15}),c("vd",{id:3,from:i.frontPocketBottomLeft,to:i.frontPocketTopLeft,x:i.frontPocketBottomLeft.x-l-15}),c("vd",{id:4,from:i.frontPocketTopRight,to:i.frontPocketBottomRight,x:i.frontPocketBottomRight.x+15}),c("vd",{id:5,from:i.frontPocketBottomRight,to:i.frontPocketBottomLeft,x:i.frontPocketBottomLeft.x-l-15})):(c("hd",{id:6,from:i.topLeft,to:i.topRight,y:i.topLeft.y+15}),c("vd",{id:7,from:i.bottomLeftCornerOver,to:i.topLeft,x:i.bottomLeftCornerOver.x})),h}},Um={name:"waralee.backPocket",after:_m,draft:({options:t,measurements:e,Point:o,Path:i,points:a,paths:s,Snippet:n,snippets:r,macro:l,sa:c,store:p,expand:h,units:d,part:f})=>{if(0==t.backPocket)return f.hide();const m=t.backPocketDepth*e.crotchDepth;return h?(a.topLeft=new o(0,0),a.bottomLeft=a.topLeft.shift(270,m+t.backPocketVerticalOffset*e.crotchDepth),a.topRight=a.topLeft.shift(0,t.backPocketSize*e.crotchDepth),a.bottomRight=a.topRight.shift(270,m+t.backPocketVerticalOffset*e.crotchDepth),s.seamSA=(new i).move(a.bottomRight).line(a.topRight).line(a.topLeft).line(a.bottomLeft).hide(),s.seam=(new i).move(a.bottomLeft).line(a.bottomRight).join(s.seamSA).close().addClass("fabric"),l("cutonfold",{from:a.bottomLeft,to:a.bottomRight}),p.cutlist.addCut({cut:2,from:"lining"}),a.title=a.topLeft.shift(270,75).shift(0,50),l("title",{nr:4,at:a.title,title:"backPocket"}),a.logo=a.title.shift(270,75),r.logo=new n("logo",a.logo),a.text=a.logo.shift(-90,25).addText("Waralee","center"),c&&(s.sa=s.seamSA.close().offset(c).addClass("fabric sa")),l("hd",{id:1,from:a.topLeft,to:a.topRight,y:a.topLeft.y+15}),l("vd",{id:2,from:a.topLeft,to:a.bottomLeft,x:a.topLeft.x+15}),f):(p.flag.note({msg:"waralee:cutBackPocket",replace:{width:d(t.backPocketSize*e.crotchDepth),length:d(m+t.backPocketVerticalOffset*e.crotchDepth)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),p.flag.preset("expand"),f.hide())}};function zm(t,{options:e,measurements:o,Point:i,Path:a,points:s,paths:n,Snippet:r,snippets:l,macro:c,sa:p,store:h,expand:d,units:f,part:m}){const u=e.frontPocketSize*o.crotchDepth,g=e.backPocketSize*o.crotchDepth;if("front"==t){if(!e.frontPocket||"welt"!=e.frontPocketStyle)return m.hide()}else if(!e.backPocket)return m.hide();const b=("front"==t?u:g)+p+p,k=("front"==t?u:g)/2;return d?(s.tl=new i(0,0),s.tr=s.tl.shift(0,b),s.bl=s.tl.shift(270,k),s.br=s.tr.shift(270,k),n.seamSeam=(new a).move(s.tl).line(s.bl).line(s.br).line(s.tr).line(s.tl).close().addClass("fabric"),h.cutlist.addCut({cut:"front"==t?4:2,from:"fabric"}),s.title=s.tl.shift(270,30).shift(0,40),c("title",{nr:"front"==t?5:6,at:s.title.shift(0,30),title:t+"Facing",scale:.6}),s.logo=s.title.shift(270,0),l.logo=new r("logo",s.logo).attr("data-scale",.3),c("hd",{id:1,from:s.tl,to:s.tr,y:s.tl.y+15}),c("vd",{id:2,from:s.tl,to:s.bl,x:s.tl.x+15}),m):(h.flag.note({msg:"waralee:cutFacing"+t,replace:{width:f(b),length:f(k)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),h.flag.preset("expand"),m.hide())}const Jm={name:"waralee.facingFront",after:_m,draft:t=>zm("front",t)},$m={name:"waralee.facingBack",after:_m,draft:t=>zm("back",t)},Xm={name:"waralee.mini",from:_m,draft:({options:t,Path:e,points:o,paths:i,sa:a,macro:s,store:n,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;i.waistFoldBack=i.waistBack.offset(-1*n.get("waistBand")/c).addClass("fabric stroke-sm"),i.waistFoldFront=i.waistFront.offset(-1*n.get("waistBand")/c).addClass("fabric stroke-sm"),i.frontFold=i.front.offset(-1*n.get("hem")/c).addClass("fabric stroke-sm"),i.legFold=i.leg.offset(-1*n.get("hem")/c).addClass("fabric stroke-sm"),i.backFold=i.back.offset(-1*n.get("hem")/c).addClass("fabric stroke-sm"),i.cutOut=(new e).move(p?o.bWaistSideSeam:o.bWaistSide).line(o.mWaist2).line(o.mWaist1).line(p?o.fWaistSideSeam:o.fWaistSide).addClass("help"),i.seam.unhide(),s("scalebox",{at:o.mLeg.shift(-90,35)}),t.frontPocket&&"welt"==t.frontPocketStyle&&i.frontPocket.unhide(),t.backPocket&&i.backPocket.unhide(),a&&(i.sa=i.seam.offset(a/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 h=p?o.fWaistSideSeam:o.fWaistSide,d=p?o.fWaistFrontOverlapSeam:o.fWaistFrontOverlap,f=p?o.bWaistSideSeam:o.bWaistSide,m=p?o.bWaistBackOverlapSeam:o.bWaistBackOverlap;return s("hd",{id:1,from:o.fWaistFrontOverlap,to:h,y:h.y+10,text:l.units(h.dist(o.fWaistFrontOverlap)*c),force:!0}),s("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}),s("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}),s("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}),s("vd",{id:5,from:d,to:o.fLegFrontOverlap,x:o.fLegFrontOverlap.x+10,text:l.units(d.dist(o.fLegFrontOverlap)*c),force:!0}),s("vd",{id:6,from:o.bLegBackOverlap,to:m,x:o.bLegBackOverlap.x-10,text:l.units(m.dist(o.bLegBackOverlap)*c),force:!0}),s("vd",{id:7,from:o.bLegBackOverlap,to:f,x:f.x+10,text:l.units((o.bLegBackOverlap.y-f.y)*c),force:!0}),t.frontPocket&&"welt"==t.frontPocketStyle&&(s("hd",{id:8,from:d,to:o.frontPocketBottom2,y:o.frontPocketBottom2.y+20,text:l.units((o.frontPocketBottom2.x-d.x)*c),force:!0}),s("vd",{id:9,from:d,to:o.frontPocketBottom2,x:o.frontPocketBottom2.x+20,text:l.units((o.frontPocketBottom2.y-d.y)*c),force:!0})),t.backPocket&&(s("hd",{id:10,from:o.backPocketRight,to:m,y:m.y+40,text:l.units((m.x-o.backPocketRight.x)*c),force:!0}),s("vd",{id:11,from:m,to:o.backPocketRight,x:o.backPocketRight.x,text:l.units((o.backPocketRight.y-m.y)*c),force:!0})),l}};function Qm(t,{options:e,measurements:o,Point:i,Path:a,points:s,paths:n,Snippet:r,snippets:l,macro:c,sa:p,store:h,expand:d,units:f,part:m}){const u=h.get("waistBand"),g=s.fWaistSideHem.dist(s.fWaistFrontOverlapHem),b=s.bWaistSideHem.dist(s.bWaistBackHem)+s.bWaistBackHem.dist(s.bWaistBackOverlapHem);let k=o.waist+1.75*o.crotchDepth,w=0;switch(t){case"strapFront":w=7,k-=2*g,k+="front"===e.knotPlacement?o.waist/2:0;break;case"strapBack":w=8,k-=2*b,k+="back"===e.knotPlacement?o.waist/2:0;break;case"waistBandFront":if(0==e.separateWaistband&&"welt"===e.frontPocketStyle)return m.hide();w=9,k=2*g;break;case"waistBandBack":if(0==e.separateWaistband&&"welt"===e.frontPocketStyle)return m.hide();w=10,k=2*b}return d?(h.cutlist.addCut({cut:1,from:"fabric"}),s.tl=new i(0,0),s.bl=new i(0,k),s.tm=new i(u,0),s.bm=new i(u,k),s.tr=new i(2*u,0),s.br=new i(2*u,k),n.seam=(new a).move(s.br).line(s.tr).line(s.tl).line(s.bl).line(s.br).close(),n.fold=(new a).move(s.tm).line(s.bm).addClass("fabric dotted").setText("fold"),p&&(n.sa=n.seam.offset(p).addClass("fabric sa")),h.cutlist.addCut({cut:1,from:"fabric"}),s.title=new i(u,.2*k),c("title",{nr:w,at:s.title,title:t,scale:.4,align:"center"}),s.logo=new i(u,.4*k),l.logo=new r("logo",s.logo).attr("data-scale",.3),c("hd",{id:"w",from:s.tl,to:s.tr,y:s.tl.y-p-10}),c("vd",{id:"h",from:s.tr,to:s.br,x:s.br.x+p+10}),m):(h.flag.note({msg:"waralee:cut"+t,replace:{width:f(2*u),length:f(k)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),h.flag.preset("expand"),m.hide())}const Km={name:"waralee.waistbandFront",from:_m,draft:t=>Qm("waistBandFront",t)},Vm={name:"waralee.waistbandBack",from:_m,draft:t=>Qm("waistBandBack",t)},qm={name:"waralee.strapFront",from:_m,draft:t=>Qm("strapFront",t)},Zm={name:"waralee.strapBack",from:_m,draft:t=>Qm("strapBack",t)},tu=new s.pT({data:Im,parts:[jm,Gm,Ym,Um,Jm,$m,Xm,Km,Vm,qm,Zm]}),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"}}}')},iu=function(t,e){const{macro:o,Point:i,points:a,sa:s}=t.shorthand();"front"===e?(a.cHem=a.cfBottom,a.cNeck=a.cfNeck):(a.cHem=a.cbBottom,a.cNeck=a.cbNeck),o("hd",{id:"wAtHem",from:a.cHem,to:a.bottom,y:a.cHem.y+3*s+15}),o("hd",{id:"wHemToArmhole",from:a.armhole,to:a.bottom,y:a.bottom.y+10}),o("ld","front"===e?{id:"wCollarToArmholePitch",from:new i(a.s3CollarSplit.x,a.armholePitch.y),to:a.armholePitch}:{from:new i(0,a.armholePitch.y),to:a.armholePitch}),"back"===e&&(o("hd",{id:"wCbNeckToHps",from:a.cNeck,to:a.neck,y:a.neck.y-s-15}),o("hd",{id:"wCbNeckToShoulder",from:a.cNeck,to:a.shoulder,y:a.neck.y-s-30}),o("hd",{id:"wFull",from:a.cNeck,to:a.armhole,y:a.neck.y-s-45})),"front"===e&&(o("hd",{id:"wEdgeToCollar",from:a.button,to:a.s3CollarSplit,y:a.s3CollarSplit.y}),o("vd",{id:"hEdgeToCollar",from:a.button,to:a.s3CollarSplit,x:a.button.x}),o("vd",{id:"hShoulderToCollar",from:a.s3CollarSplit,to:a.s3ArmholeSplit,x:a.s3ArmholeSplit.x})),o("ld",{id:"lShoulderSeam",from:a.neck,to:a.shoulder,d:-15}),o("vd",{id:"hHem",from:a.cHem,to:a.bottom,x:a.bottom.x+10}),o("vd",{id:"hHemToArmhole",from:a.bottom,to:a.armhole,x:a.armhole.x+s+15}),o("vd",{id:"hArmholeToArmholePitch",from:a.armhole,to:a.armholePitch,x:a.armhole.x+s+15}),o("vd",{id:"hArmholePitchToShoulder",from:a.armholePitch,to:a.shoulder,x:a.armhole.x+s+15}
1),o("vd",{from:a.armhole,id:"hArmholeToShoulder",to:a.shoulder,x:a.armhole.x+s+30}),o("vd",{id:"hArmholeToHps",from:a.armhole,to:a.neck,x:a.armhole.x+s+45}),"back"===e&&(o("vd",{id:"hCbNeckToHps",from:a.cNeck,to:a.neck,x:a.cNeck.x-15}),o("vd",{id:"hHemToCbHeck",from:a.cHem,to:a.cNeck,x:a.cNeck.x-15}),o("vd",{id:"hFull",from:a.cHem,to:a.neck,x:a.cNeck.x-30}))};const au={name:"yuri.back",from:{...I,options:{...I.options,collarEase:{pct:20,min:10,max:30,...(0,s.Wx)("neck"),menu:"fit"},cuffEase:{pct:30,min:20,max:60,...(0,s.Wx)("wrist"),menu:"fit"},lengthBonus:{pct:10,min:5,max:15,menu:"fit"},sleeveLengthBonus:{pct:1,min:0,max:10,menu:"fit"}}},hide:s.V9.HIDE_TREE,options:{hipsEase:{pct:0,min:0,max:10,menu:"fit"}},measurements:["hips"],draft:function({store:t,macro:e,Path:o,Point:i,points:a,paths:s,sa:n,options:r,measurements:l,part:c}){for(const p in s)-1===["backArmhole","backCollar"].indexOf(p)&&delete s[p];return a.hips.x=l.hips*(1+r.hipsEase)/4,a.hem.x=a.hips.x,a.hemCp2=new i(a.hips.x,a.cbWaist.y),a.cbBottom=new i(0,1.27*a.cbHem.y),a.bottom=new i(1.23*a.hem.x,.97*a.cbBottom.y),a.bottomCp2=new i(a.bottom.x,a.cbWaist.y),t.set("backNeckSeamLength",(new o).move(a.neck).curve_(a.neckCp2,a.cbNeck).length()),t.set("neckCutoutBack",a.cbNeck.y),s.gussetBase=(new o).move(a.bottom).line(a.armhole).setClass("note stroke-xxl").hide(),t.set("gussetLength",s.gussetBase.length()),s.saBase=(new o).move(a.armhole).curve(a.armholeCp2,a.armholeHollowCp1,a.armholeHollow).curve(a.armholeHollowCp2,a.armholePitchCp1,a.armholePitch).join(s.backArmhole).line(a.s3CollarSplit).join(s.backCollar).setClass("note stroke-xxl").hide(),s.hemBase=(new o).move(a.cbBottom).line(a.bottom).setClass("note stroke-xxl").hide(),s.seam=s.gussetBase.join(s.saBase).clone().line(a.cbBottom).join(s.hemBase).close().attr("class","fabric"),n&&(s.sa=s.hemBase.offset(3*n).join(s.gussetBase.offset(n)).join(s.saBase.offset(n)),s.sa.move(s.sa.end()).line(a.cbNeck).move(s.sa.start()).line(a.cbBottom).attr("class","fabric sa")),t.cutlist.setCut({cut:1,from:"fabric",onFold:!0}),e("cutonfold",{from:a.cbNeck,to:a.cbBottom,grainline:!0}),e("scalebox",{at:new i(a.armholePitch.x/2,a.cbWaist.y)}),e("rmtitle"),e("title",{at:a.title,nr:2,title:"back"}),iu(c,"back"),c}};const su={name:"yuri.front",from:{...N,options:{...N.options,collarEase:{pct:20,min:10,max:30,...(0,s.Wx)("neck"),menu:"fit"},cuffEase:{pct:30,min:20,max:60,...(0,s.Wx)("wrist"),menu:"fit"},lengthBonus:{pct:10,min:5,max:15,menu:"fit"},sleeveLengthBonus:{pct:1,min:0,max:10,menu:"fit"}}},hide:s.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:i,paths:a,sa:s,options:n,measurements:r,macro:l,snippets:c,Snippet:p,part:h}){for(const d in a)-1===["frontArmhole","frontCollar"].indexOf(d)&&delete a[d];return i.hips.x=r.hips*(1+n.hipsEase)/4,i.hem.x=i.hips.x,i.hemCp2=new e(i.hips.x,i.cfWaist.y),i.cfBottom=new e(0,1.27*i.cfHem.y),i.bottom=new e(1.23*i.hem.x,.97*i.cfBottom.y),i.bottomCp2=new e(i.bottom.x,i.cfWaist.y),i.button=new e(i.s3CollarSplit.x-2/3*r.shoulderToShoulder,i.s3CollarSplit.y+1.17*r.hpsToBust),t.set("frontNeckSeamLength",(new o).move(i.neck).curve(i.neckCp2Front,i.cfNeckCp1,i.cfNeck).length()),t.set("neckCutoutFront",i.cfNeck.y),a.saBase=(new o).move(i.bottom).line(i.armhole).curve(i.armholeCp2,i.armholeHollowCp1,i.armholeHollow).curve(i.armholeHollowCp2,i.armholePitchCp1,i.armholePitch).join(a.frontArmhole).line(i.s3CollarSplit).setClass("note stroke-xxl").hide(),a.buttonBase=(new o).move(i.s3CollarSplit).line(i.button).line(i.cfBottom).attr("note stroke-xxl").hide(),a.hemBase=(new o).move(i.cfBottom).line(i.bottom).setClass("note stroke-xxl").hide(),a.seam=a.saBase.clone().join(a.buttonBase).join(a.hemBase).close().attr("class","fabric"),s&&(a.sa=a.hemBase.offset(3*s).join(a.saBase.offset(s)).join(a.buttonBase.offset(3*s)),a.sa=a.sa.line(a.sa.start()).close().attr("class","fabric sa")),t.cutlist.setCut({cut:2,from:"fabric"}),l("grainline",{from:i.s3CollarSplit,to:new e(i.s3CollarSplit.x,i.bottom.y)}
1),c.buttonhole=new p("buttonhole-start",i.button.shift(0,25)).attr("data-rotate","90").attr("data-scale","2.5"),c.button=new p("button",a.buttonBase.shiftFractionAlong(.146).shift(0,30)).attr("data-scale","3.3"),iu(h,"front"),h}};const nu={name:"yuri.sleeve",from:T,hide:s.V9.HIDE_TREE,draft:function({Path:t,points:e,paths:o,sa:i,part:a}){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"),i&&(o.sa=o.saBase.clone().offset(i).join(o.hemBase.offset(3*i)).close(),o.sa.attr("class","fabric sa")),a},options:{...T.options,libraryFitSleeve:!0}};const ru={name:"yuri.gusset",after:au,draft:function({Point:t,Path:e,points:o,paths:i,Snippet:a,snippets:s,sa:n,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),i.hat=(new e).move(o.right).line(o.top).line(o.bottom).attr("class","fabric"),i.curve=(new e).move(o.bottom).curve(o.cp1,o.cp2,o.right).attr("class","fabric"),i.seam=i.hat.join(i.curve).close(),n&&(i.saBase=(new e).move(o.right).line(o.top).hide(),i.sa=i.curve.offset(3*n).join(i.saBase.offset(n)).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),s.logo=new a("logo",o.logo),r("vd",{id:"hFull",from:o.top,to:o.bottom,x:o.top.x-n-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:n+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:[su,au],measurements:["head"],draft:function({store:t,sa:e,Point:o,points:i,Path:a,paths:s,Snippet:n,snippets:r,measurements:l,macro:c,part:p}){const h=t.get("frontNeckSeamLength")+t.get("backNeckSeamLength"),d=l.head,f=t.get("neckCutoutFront")-t.get("neckCutoutBack");t.set("hoodCenterWidth",l.head/10);const m=t.get("hoodCenterWidth")/2;i.topLeft=new o(0,0),i.topRight=new o(h,0),i.neckRight=new o(h,(d-m)/2),i.neckLeft=new o(0,i.neckRight.y),i.frontLeft=i.neckLeft.shift(-90,f),i.frontEdge=i.neckRight.shift(-90,f),i.neckEdge=i.neckLeft.shift(0,m),i.neckEdgeCp2=new o(i.neckRight.x/2,i.neckEdge.y),i.frontEdgeCp1=new o(i.neckEdgeCp2.x,i.frontEdge.y),i.shoulderNotch=(new a).move(i.neckEdge).curve(i.neckEdgeCp2,i.frontEdgeCp1,i.frontEdge).shiftAlong(t.get("backNeckSeamLength")-m),i.hoodTop=new o(i.shoulderNotch.x,i.topLeft.y),i.hoodTopCp2=i.hoodTop.shift(180,.7*i.neckEdge.y),i.hoodRim=new o(i.frontEdge.x,.2*i.neckRight.y),i.hoodTopCp1=i.hoodTop.shift(0,i.hoodTop.dx(i.hoodRim)/2),i.frontEdgeCp2=i.frontEdge.shift(90,m),i._tmp1=(new a).move(i.hoodRim).curve(i.hoodRim,i.hoodTopCp1,i.hoodTop).shiftAlong(2).rotate(90,i.hoodRim),i.hoodRimCp=i.hoodRim.shiftTowards(i._tmp1,i.neckRight.y/3),i.neckRoll=i.neckRight.shift(180,m),i._tmp2=(new a).move(i.neckRoll).curve(i.neckRoll,i.hoodRimCp,i.hoodRim).shiftAlong(2),i.neckRollCp2=i.neckRoll.shiftTowards(i._tmp2,m),i.neckRollCp1=i.neckRollCp2.rotate(180,i.neckRoll),s.seam=(new a).move(i.frontEdge).curve(i.frontEdgeCp2,i.neckRollCp1,i.neckRoll).curve(i.neckRollCp2,i.hoodRimCp,i.hoodRim).curve(i.hoodRim,i.hoodTopCp1,i.hoodTop).curve(i.hoodTopCp2,i.neckEdge,i.neckEdge).curve(i.neckEdgeCp2,i.frontEdgeCp1,i.frontEdge).close().attr("class","fabric"),t.set("hoodCenterLength",(new a).move(i.hoodRim).curve(i.hoodRim,i.hoodTopCp1,i.hoodTop).curve(i.hoodTopCp2,i.neckEdge,i.neckEdge).length()),e&&(s.sa=s.seam.reverse().offset(-1*e).addClass("fabric sa")),t.cutlist.setCut({cut:4,from:"fabric"}),i.title=i.hoodTop.shift(-90,50),c("title",{at:i.title,nr:5,title:"hoodSide"}),i.logo=i.title.shift(-90,60),r.logo=new n("logo",i.logo),c("grainline",{from:i.shoulderNot
1ch,to:i.hoodTop});const u=(new a).move(i.neckEdge).curve(i.neckEdgeCp2,i.frontEdgeCp1,i.frontEdge).split(i.shoulderNotch),g=(new a).move(i.hoodRim).curve(i.hoodRim,i.hoodTopCp1,i.hoodTop).curve(i.hoodTopCp2,i.neckEdge,i.neckEdge).reverse(),b=(new a).move(i.neckRoll).curve(i.neckRollCp2,i.hoodRimCp,i.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:i.neckEdge,to:i.frontEdge,y:i.frontEdge.y+e+30}),c("hd",{id:"wFull",from:g.edge("left"),to:i.frontEdge,y:i.frontEdge.y+e+45});const k=b.edge("left");return c("hd",{id:"wOpeningDepth",from:k,to:i.frontEdge,y:k.y}),c("vd",{id:"hToOpeningTop",from:i.frontEdge,to:i.hoodRim,x:i.hoodRim.x+e+15}),c("vd",{id:"hFull",from:i.frontEdge,to:i.hoodTop,x:i.hoodRim.x+e+30}),p}};const cu={name:"yuri.hoodCenter",after:lu,draft:function({store:t,sa:e,Point:o,points:i,Path:a,paths:s,expand:n,macro:r,units:l,part:c}){const p=t.get("hoodCenterWidth"),h=t.get("hoodCenterLength");if(!n){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(h+o)},suggest:{text:"flag:show",icon:"expand",update:{settings:["expand",1]}}}),t.flag.preset("expandIsOff"),c.hide()}return t.flag.preset("expandIsOn"),i.topLeft=new o(0,0),i.bottomLeft=new o(0,p),i.topRight=new o(h,0),i.bottomRight=new o(h,p),s.seam=(new a).move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).line(i.topLeft).close().attr("class","fabric"),e&&(s.sa=s.seam.offset(e).addClass("fabric sa")),t.cutlist.setCut({cut:2,from:"fabric"}),i.title=i.bottomLeft.shiftFractionTowards(i.topRight,.5),r("title",{at:i.title,nr:6,title:"hoodCenter"}),r("grainline",{from:i.topLeft.shift(-90,p/2),to:i.topRight.shift(-90,p/2)}),r("hd",{id:"wFull",from:i.bottomLeft,to:i.bottomRight,y:i.bottomRight.y+e+15,text:l(t.get("hoodCenterLength"))}),r("vd",{id:"hFull",from:i.bottomRight,to:i.topRight,x:i.topRight.x+e+15}),c}},pu=new s.pT({data:eu,parts:[au,su,nu,ru,lu,cu]}),hu={aaron:Q,albert:tt,bee:mt,bella:nt,benjamin:vt,bent:St,bibi:te,bob:ie,breanna:Te,brian:_,bruce:He,carlita:mo,carlton:so,cathrin:xo,charlie:Xo,cornelius:si,crux:Ta,devon:xs,diana:Hs,florence:Ds,florent:Ns,gozer:zs,hi:Ks,holmes:hn,hortensia:kn,huey:Mn,hugo:ir,jaeger:Or,jane:Ir,jett:qr,library:f,lily:tl,lucy:wl,lumina:Tl,lumira:xl,lunetius:Xl,noble:Sa,octoplushy:ql,onyx:dc,opal:Sc,otis:Gc,paco:ul,penelope:qc,percy:xp,sabrina:Bp,sandy:Dp,sarah:Jp,shelly:Qp,shin:ih,simon:ed,simone:pd,skully:xd,sophie:Fd,sunny:Md,sven:of,tamiko:sf,teagan:mf,tiberius:gf,titan:Po,trayvon:Cf,tristan:Jf,uma:Xf,umbra:tm,wahid:Pm,walburga:Fm,waralee:Nm,yuri:(0,s.D4)([_,ou])};var du=o(57416);const fu={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"},mu={};for(const[Wu,Hu]of Object.entries(fu))mu[Wu]=`${du.iR.url}${Hu}/public`;const uu={aaron:X,albert:et,bee:dt,bella:rt,benjamin:Tt,bent:Bt,bibi:Zt,bob:ae,breanna:ye,brian:M,bruce:Ae,carlita:fo,carlton:ao,cathrin:Bo,charlie:$o,cornelius:ni,crux:ya,devon:ys,diana:Ws,florence:Es,florent:Us,gozer:Xs,hi:cn,holmes:gn,hortensia:Sn,huey:Nn,hugo:or,jaeger:Ar,jane:Nr,jett:Zr,library:L,lily:bl,lucy:vl,lumina:Jl,lumira:El,lunetius:Kl,noble:qa,octoplushy:pc,onyx:Bc,opal:_c,otis:Kc,paco:ml,penelope:pp,percy:yp,sabrina:Ap,sandy:Mp,sarah:$p,shelly:eh,shin:rh,simon:td,simone:cd,skully:Bd,sophie:Ad,sunny:_d,sven:ef,tamiko:rf,teagan:ff,tiberius:kf,titan:Ho,trayvon:Af,tristan:zf,uma:Zf,umbra:rm,wahid:Lm,walburga:Em,waralee:tu,yuri:pu},gu=Object.keys(uu),bu={},ku={},wu={},Cu={},vu=new Set,Tu=new Set,yu=new Set,xu=new Set;for(const Wu in uu)bu[Wu]=uu[Wu].patternConfig.measurements,ku[Wu]=uu[Wu].patternConfig.optionalMeasurements,wu[Wu]=[...uu[Wu].patternConfig.measurements,...uu[Wu].patternConfig.optionalMeasurements],Cu[Wu]={...uu[Wu].designConfig.data}
1,Cu[Wu].tags&&Cu[Wu].tags.forEach((t=>vu.add(t))),Cu[Wu].techniques&&Cu[Wu].techniques.forEach((t=>Tu.add(t))),Array.isArray(Cu[Wu].code)?Cu[Wu].code.forEach((t=>yu.add(t))):yu.add(Cu[Wu].code),Array.isArray(Cu[Wu].design)?Cu[Wu].design.forEach((t=>xu.add(t))):xu.add(Cu[Wu].design);const Bu=Array.from(vu).filter((t=>!!t)).sort(),Su=Array.from(Tu).filter((t=>!!t)).sort(),Lu=Array.from(yu).filter((t=>!!t)).sort(),Pu=Array.from(xu).filter((t=>!!t)).sort(),Ru=hu,Fu={id:fu,href:mu}},57416:(t,e,o)=>{o.d(e,{A4:()=>a.A,DS:()=>c.D,I3:()=>n.I3,Kk:()=>n.Kk,Ot:()=>l.O,VI:()=>s.V,Vi:()=>r.V,fR:()=>p.f,iR:()=>i.i,iU:()=>l.i,rA:()=>n.rA,zM:()=>a.z});var i=o(80021),a=o(33727),s=o(99005),n=o(27791),r=o(84985),l=o(29203),c=o(19970),p=o(2980)},61035:(t,e,o)=>{o.d(e,{dG:()=>s,FY:()=>n});const i=JSON.parse('{"id":"plugin-flip","r":"4.6.0"}'),a={name:i.id,version:i.r,macros:{flip:function(t,{paths:e,points:o,snippets:i}){const a="y"===t?.axis?"y":"x";let s=null;const n=["from","to","cp1","cp2"];for(const r in o)null===s&&(s=o[r].attributes.get("flipped"),!1===s?s=1:s+=1),o[r][a]=-1*o[r][a],o[r].attributes.set("flipped",s);for(let r of Object.keys(e))for(let t in e[r].ops)for(let o of n)if(void 0!==e[r].ops[t][o]){let i=e[r].ops[t][o].attributes.get("flipped");!1!==i&&(i=parseInt(i)),i!==s&&(e[r].ops[t][o][a]=-1*e[r].ops[t][o][a],e[r].ops[t][o].attributes.set("flipped",s))}for(let r of Object.keys(i)){let t=i[r].anchor.attributes.get("flipped");!1!==t&&(t=parseInt(t)),t!==s&&(i[r].anchor[a]=-1*i[r].anchor[a])}}}},s=a,n=a},66348:(t,e,o)=>{o.d(e,{IQ:()=>r,eJ:()=>c,k_:()=>l});const i=JSON.parse('{"id":"plugin-ringsector","r":"4.6.0"}'),a=(t,e)=>{const o={};for(const i of t)o[i]=`__macro_ringsector_${e}_${i}`;return o},s=(t,e=90,o)=>{const i=o.deg2rad(e/2);return 4*t*(1-Math.cos(i))/Math.sin(i)/3},n=["center","in1","in1c","in2","in2c","ex1","ex1c","ex2","ex2c","in2Flipped","in2cFlipped","in1cFlipped","ex1cFlipped","ex2cFlipped","ex2Flipped"],r={name:i.id,version:i.r,macros:{rmringsector:function(t="ringsector",{points:e,paths:o,store:i,part:a}){const s=["parts",a.name,"macros","@freesewing/plugin-ringsector","ids",t];for(const n of Object.values(i.get([...s,"paths"])))delete o[n];for(const n of Object.values(i.get([...s,"points"])))delete e[n]},ringsector:function(t,{utils:e,Point:o,points:i,Path:r,paths:l,store:c}){const{angle:p,insideRadius:h,outsideRadius:d,rotate:f=!1,center:m=new o(0,0),id:u="ringsector"}=t,g=a(n,u),b=a(["path"],u),k=s(h,p/2,e),w=s(d,p/2,e);i[g.center]=m.copy(),i[g.in1]=i[g.center].shift(-90,h),i[g.in1c]=i[g.in1].shift(0,k),i[g.in2]=i[g.center].shift(p/2-90,h),i[g.in2c]=i[g.in2].shift(p/2+180,k),i[g.ex1]=i[g.center].shift(-90,d),i[g.ex1c]=i[g.ex1].shift(0,w),i[g.ex2]=i[g.center].shift(p/2-90,d),i[g.ex2c]=i[g.ex2].shift(p/2+180,w);for(const a of["in2","in2c","in1c","ex1c","ex2c","ex2"])i[g[a+"Flipped"]]=i[g[a]].flipX(m);for(const a of n)i[g[a]+"Rotated"]=i[g[a]].rotate(p/2,i[g.center]),g[a+"Rotated"]=g[a]+"Rotated";if(f){const t=270-i[g.in2Flipped].angle(i[g.ex2Flipped]);for(const e of n)i[g[e]]=i[g[e]].rotate(t,i[g.in2Flipped]),i[g[e]+"Rotated"].rotate(t,i[g.in2Flipped])}return l[b.path]=(new r).move(i[g.ex2Flipped]).curve(i[g.ex2cFlipped],i[g.ex1cFlipped],i[g.ex1]).curve(i[g.ex1c],i[g.ex2c],i[g.ex2]).line(i[g.in2]).curve(i[g.in2c],i[g.in1c],i[g.in1]).curve(i[g.in1cFlipped],i[g.in2cFlipped],i[g.in2Flipped]).line(i[g.ex2Flipped]).close(),c.storeMacroIds(t.id,{paths:b,points:g}),c.getMacroIds(t.id)}}},l=r,c=r},80021:(t,e,o)=>{o.d(e,{i:()=>i});const i={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"}},84985:(t,e,o)=>{o.d(e,{V:()=>i});const i=["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"]},86063:(t,e,o)=>{o.d(e,{hk:()=>s});const i=JSON.parse('{"id":"plugin-gore","r":"4.6.0"}'),a={name:i.id,version:i.r,macros:{gore:function(t,{points:e,paths:o,Path:i}){const a=t.from,s=Number(t.gores),n=Number(t.radius),r=t.prefix||"gore",l=Number(t.extraLength);e[r+"p1"]=a.shift(0,n*Math.PI/2+l),e[r+"Cp1"]=e[r+"p1"].shift(180-180/s,n/2/Math.cos(Math.PI/s)),e[r+"p3"]=a.shift(90,n*Math.PI/s),e[r+"p2"]=e[r+"p3"].shift(0,l),e[r+"Cp2"]=e[r+"p2"].shift(0,n*(Math.PI-2)/2),l<0&&(o.auxiliaryPath=(new i).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 i).move(a).line(e[r+"p1"]).curve(e[r+"Cp1"],e[r+"Cp2"],e[r+"p2"]).line(e[r+"p3"]).line(a).close().attr("class",t.class?t.class:""),t.hidden?o[r+"seam"].hide():o[r+"seam"].unhide()}}},s=a},99005:(t,e,o)=>{o.d(e,{V:()=>i});const i="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.6175-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.02
11 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.0065-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.
10015-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 i=JSON.parse('{"id":"plugin-annotations","r":"4.6.0"}'),a={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"}')},s=[{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>`},{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;
1"\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 n=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="${n.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:i}){if(!i&&!t.force)return;const a={...c,...t},s=o.generateMacroIds(["banner"],a.id);e[s.banner]=a.path.clone().setClass("hidden").attr("data-text-dy",a.dy).attr("data-text-class",a.classes);const n="&#160;".repeat(a.spaces);for(let r=0;r<a.repeat;r++)e[s.banner].addText(a.text).addText(n);return e[s.banner].addText(a.text),o.storeMacroIds(a.id,{paths:s}),o.getMacroIds(a.id)},rmbanner:(t=c.id,{store:e,part:o})=>e.removeMacroNodes(t,"banner",o)},h={classes:{text:"text-xs fill-note",box:"stroke-xs stroke-note lashed"},dy:4,id:"bannerbox",margin:15,repeat:99,spaces:12,text:""},d={bannerbox:function(t,{Point:e,paths:o,Path:i,macro:a,log:s,store:n,complete:r}){if(!r&&!t.force)return;const l={...h,...t,classes:h.classes};t.classes&&(l.classes={...l.classes,...t.classes}),l.topLeft&&"function"==typeof l.topLeft.attr||(s.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||(s.warn("Bannerbox macro called without a valid bottomRight point. Using (6660,666) for bottomRight."),l.bottomRight=new e(666,666));const c=n.generateMacroIds(["box"],l.id),p=Math.sqrt(2*Math.pow(l.margin,2));return o[c.box]=(new i).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),a("banner",{id:l.id,path:o[c.box],text:l.text,className:l.classes.text,repeat:l.repeat,spaces:l.spaces,dy:l.dy}),n.storeMacroIds(l.id,{paths:c}),n.getMacroIds(l.id)},rmbannerbox:(t=h.id,{macro:e,store:o,part:i})=>(e("rmbanner",t),o.removeMacroNodes(t,"bannerbox",i))},f={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},m=(t,e,o)=>t?((t,{Path:e})=>{let o=(new e).move(t.path1[0]);for(const i in t.path1)t.path1[i]&&(o=o.line(t.path1[i])),t.path2[i]&&(o=o.line(t.path2[i]));return o})(((t,e)=>{let o=t.offset(e.width/2),i=t.offset(e.width/-2),a=o.length(),s=i.length();if(s>a){let t=i;i=o,o=t,a=s}let n={path1:[o.start()],path2:[i.start()]},r=Math.ceil(a/e.width*e.density);for(let l=1;l<r;l++)n.path1.push(o.shiftFractionAlong(1/r*l)),n.path2.push(i.shiftFractionAlong(1/r*l));return n})(t,e),o):null;function u(t,e){if(!e.complete&&!t.force)return;const o={...f,...t},{Path:i,paths:a}=e;o.angle<0&&(o.angle=360+o.angle%-360);let s=!1;if(o.anchor)s=(new i).move(o.anchor).line(o.anchor.shift(o.angle,o.length));else if(o.from&&o.to)s=(new i).move(o.from).line(o.to);else if(o.path){let t=!1,e=!1;if(o.bartackAlong)s=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)),s=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 n=e.store.generateMacroIds(["stitches"],o.id);return a[n.stitches]=m(s,o,e).attr("class",o.classes),e.store.storeMacroIds(o.id,{paths:n}),e.store.getMacroIds(o.id)}const g=(t="bartack",e=f.id,{store:o,part:i})=>o.removeMacroNodes(e,t,i),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)},k={classes:{box:"lining dotted stroke-sm",cross:"lining dotted stroke-sm",text:"center fill-lining"},id:"crossbox",offset:.1,text:""},w={crossbox:function(t,{points:e,Point:o,paths:i,Path:a,complete:s,store:n,log:r}){if(!s&&!t.force)return;const l={...k,...t,classes:k.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=n.generateMacroIds(["box","cross","text"],l.id),p={paths:{box:c.box,cross:c.cross},points:{text:c.text}},h=Math.abs(l.topLeft.dx(l.bottomRight))>Math.abs(l.topLeft.dy(l.bottomRight))?Math.abs(l.topLeft.dx(l.bottomRight))*l.offset:M
1ath.abs(l.topLeft.dy(l.bottomRight))*l.offset;return i[p.paths.box]=(new a).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),i[p.paths.cross]=(new a).move(l.topLeft.shift(315,h)).line(new o(l.bottomRight.x,l.topLeft.y).shift(225,h)).line(l.bottomRight.shift(135,h)).line(new o(l.topLeft.x,l.bottomRight.y).shift(45,h)).line(l.topLeft.shift(315,h)).line(l.bottomRight.shift(135,h)).move(new o(l.bottomRight.x,l.topLeft.y).shift(225,h)).line(new o(l.topLeft.x,l.bottomRight.y).shift(45,h)).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,n.storeMacroIds(l.id,p),n.getMacroIds(l.id)},rmcrossbox:(t=k.id,{store:e,part:o})=>e.removeMacroNodes(t,"crossbox",o)},C=[["cutlist.addCut",v],["cutlist.setCut",function(t,e){return T(t),v(t,e)}],["cutlist.removeCut",T],["cutlist.setGrain",function(t,e=!1,o="grainline"){const i=t.get("activePart"),a=["cutlist",i,"grain"];if(!1===e)return t.log.warn("Using setGrain() to remove the grain is deprecated. Use removeGrain() instead"),t.unset(a);if("number"!=typeof e)return t.log.error("Called part.setGrain() with a value that is not a number"),t;return t.set(["cutlist",i,"grainOrigin"],o),t.set(a,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 i=["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(i);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(i,[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"),i=e.only?[].concat(e.only):Object.keys(o),a=[];return i.forEach((t=>{if(o[t]?.materials)for(var e in o[t].materials)a.includes(e)||a.push(e)})),a}]];function v(t,e={}){if(Array.isArray(e)){for(const o of e)v(t,o);return t}const{cut:o=2,from:i="fabric",identical:a=!1,onBias:s=!1,onFold:n=!1}=e,r=t.get("activePart");if(!1===o)return!1===i?t.unset(["cutlist",r,"materials"]):t.unset(["cutlist",r,"materials",i]),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 i)return t.log.warn("Tried to set material to a value that is not a string"),t;const l=["cutlist",r,"materials",i],c=t.get(l,[]);return t.set(l,c.concat({cut:o,identical:a,onBias:s,onFold:n})),t}function T(t,e=!1){return v(t,{cut:!1,from:e})}const y={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},i){return t||(t=i),e.removeMacroNodes(t,i,o)},S={scalebox:function(t,{store:e,points:o,paths:i,scale:a,Point:s,Path:n,complete:r,log:l}){if(!r&&!t.force)return;const c={...y,id:"scalebox",...t,classes:y.classes};t.classes&&(c.classes={...c.classes,...t.classes});const p=Math.round(10*Math.max(.1,Math.min(1,a)))-1,[h,d,f,m]=x.scalebox.metric[p],[u,g,b,k]=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 s(0,0));const w=e.generateMacroIds(["metric","imperial","textLead","textMetric","textImperial","textTitle","textText","textLink"],c.id),C={mtl:new s(c.at.x-h/2,c.at.y-d/2),mtr:new s(c.at.x+h/2,c.at.y-d/2),mbl:new s(c.at.x-h/2,c.at.y+d/2),mbr:new s(c.at.x+h/2,c.at.y+d/2),itl:new s(c.at.x-u/2,c.at.y-g/2),itr:new s(c.at.x+u/2,c.at.y-g/2),ibl:new s(c.at.x-u/2,c.at.y+g/2),ibr:new s(c.at.x+u/2,c.at.y+g/2)},v={lead:new s(c.at.x-45*a,c.at.y-15*a),metric:new s(c.at.x,c.at.y+20*a),imperial:new s(c.at.x,c.at.y+24*a)};if(v.title=v.lead.shift(-90,10*a),v.text=v.title.shift(-90,12*a),v.link=v.text.shift(-90,5*a),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)}i[w.imperial]=(new n).addClass(c.classes.imperialBox).move(C.itl).line(C.ibl).line(C.ibr).line(C.itr).line(C.itl).close(),i[w.metric]=(new n).addClass(c.classes.metricBox).move(C.mtl).line(C.mbl).line(C.mbr).line(C.mtr).line(C.mtl).close(),o[w.textLead]=v.lead.addText(c.lead,c.classes.lead);let T=c.title;return T||(T=e.data?.name||"plugin-annotations:noName",-1!==T.indexOf("@freesewing/")&&(T=T.replace("@freesewing/",""))),o[w.textTitle]=v.title.addText(T,c.classes.title).attr("data-text","v"+(e.data?.version||"No Version")),o[w.textText]=v.text.addText(c.text,c.classes.text),o[w.textLink]=v.link.addText(c.link,c.classes.link).attr("data-text-lineheight",4),o[w.textMetric]=v.metric.attr("data-text","plugin-annotations:theWhiteInsideOfThisBoxShouldMeasure").attr("data-text",f).attr("data-text","x").attr("data-text",m).attr("data-text-class",c.classes.metric),o[w.textImperial]=v.imperial.attr("data-text","plugin-annotations:theBlackOutsideOfThisBoxShouldMeasure").attr("data-text",b).attr("data-text","x").attr("data-text",k).attr("data-text-class",c.classes.imperial),e.storeMacroIds(c.id,{points:{textLead:w.textLead,textMetric:w.textMetric,textImperial:w.textImperial,textTitle:w.textTitle,textText:w.textText,textLink:w.textLink},paths:{metric:w.metric,imperial:w.imperial}}),e.getMacroIds(c.id)},miniscale:function(t,{points:e,paths:o,scale:i,Point:a,Path:s,complete:n,log:r,store:l}){if(!n&&!t.force)return;const c={...y,id:"miniscale",...t,classes:y.classes};t.classes&&(c.classes={...c.classes,...t.classes});const p=Math.ceil(6*Math.max(.1,Math.min(1,i)))-1,[h,d,f,m]=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 a(0,0));const u=l.generateMacroIds(["metric","imperial","textMetric","textImperial"],c.id),g={mtl:new a(c.at.x-h/2,c.at.y-h/2),mtr:new a(c.at.x+h/2,c.at.y-h/2),mbl:new a(c.at.x-h/2,c.at.y+h/2),mbr:new a(c.at.x+h/2,c.at.y+h/2),itl:new a(c.at.x-f/2,c.at.y-f/2),itr:new a(c.at.x+f/2,c.at.y-f/2),ibl:new a(c.at.x-f/2,c.at.y+f/2),ibr:new a(c.at.x+f/2,c.at.y+f/2)},b={metric:new a(c.at.x,c.at.y-2*i),imperial:new a(c.at.x,c.at.y+8*i)};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 s).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 s).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(`${d} x ${d}
1`,c.classes.metric),e[u.textImperial]=b.imperial.addText(`${m} x ${m}`,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:i,locale:a,store:s,part:n,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*i,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})`,h=s.generateMacroIds(["nr","date","title","name","notes"],c.id);let d=c.dy;void 0!==c.nr?(o[h.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),s.set(["partNumbers",n.name],c.nr)):delete h.nr,o[h.date]=c.at.shift(-90,d/2).addText((new Date).toLocaleString(a||"en",{weekday:"long",year:"numeric",month:"short",day:"numeric"}),`${c.classes.date} ${c.align}`).attr("data-text-transform",p).attr("data-render-always",1),d+=c.dy,c.title?(o[h.title]=c.at.clone().shift(-90,d).attr("data-text-transform",p).attr("data-render-always",1),c.append?o[h.title].addText(c.title,`${c.classes.title} ${c.align}`):o[h.title].setText(c.title,`${c.classes.title} ${c.align}`),d+=c.dy,s.set(["partTitles",n.name],c.title)):delete h.title;const f=n.context.settings;var m;o[h.name]=c.at.clone().shift(-90,d).addText(`${c.brand} ${m=(s.data?.name||"plugin-annotations:noName").replace("@freesewing/",""),"string"==typeof m?m.charAt(0).toUpperCase()+m.slice(1):""} v${s.data?.version||"plugin-annotations:noVersion"} (`,`${c.classes.name} ${c.align}`).addText(f.metadata?.setName?f.metadata.setName:"ephemeral").addText(")").attr("data-text-transform",p).attr("data-render-always",1),d+=c.dy;const u=[];if(c.cutlist){o[h.notes]=c.at.clone().shift(-90,d);const t=s.get(["cutlist",n.name],null);if(t?.materials)for(const[e,o]of Object.entries(t.materials))o.forEach((({cut:t,identical:o,onBias:i,onFold:a})=>{u.push("plugin-annotations:cut"),u.push(t),!o&&t>1&&u.push("plugin-annotations:mirrored"),a?u.push(i?"plugin-annotations:onFoldAndBias":"plugin-annotations:onFold"):i&&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[h.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 h.cutlist,s.storeMacroIds(c.id,{points:h}),s.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>`}],W={cutonfold:function(t,{paths:e,Path:o,complete:i,store:a,scale:s,log:n,Point:r}){if(!i&&!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||(n.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||(n.warn("Cutonfold macro called without a valid to point. Using (6660,666) for to."),l.to=new r(666,666)),a.cutlist.setCutOnFold(l.from,l.to),l.grainline&&a.cutlist.setGrain(l.from.angle(l.to),"cutonfold");const c=a.generateMacroIds(["line"],l.id),p=l.from.shiftFractionTowards(l.to,l.margin),h=l.to.shiftFractionTowards(l.from,l.margin),d=p.shiftTowards(l.from,l.offset*s).rotate(-90,p),f=h.shiftTowards(l.to,l.offset*s).rotate(90,h);return e[c.line]=(new o).move(p).line(d).line(f).line(h),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),a.storeMacroIds(l.id,{paths:c}),a.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))},H=[{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>`}],A={text:!1,noStartMarker:!1,noEndMarker:!1,classes:{line:"mark",leaders:"mark dotted",text:"fill-mark center"}},O={hd:function(t,e,o,i){let a;return void 0===t.y||t[e].y===t.y?a=t[e]:(a=new o.Point(t[e].x,t.y),D(o,t[e],a,i)),a},vd:function(t,e,o,i){let a;return void 0===t.x||t[e].x===t.x?a=t[e]:(a=new o.Point(t.x,t[e].y),D(o,t[e],a,i)),a},ld:function(t,e,o,i){let a,s,n;return"from"===e?(s=1,n="to"):(s=-1,n="from"),void 0===t.d?a=t[e]:(a=t[e].shiftTowards(t[n],t.d).rotate(90*s,t[e]),D(o,t[e],a,i)),a}};function D({paths:t,Path:e},o,i,a){t[a]=(new e).move(o).line(i).attr("class","mark dotted")}const E=(t,e,o)=>{if(!e.paperless&&!t.force)return;const i={...A[o],id:o,...t,classes:A.classes};t.classes&&(i.classes={...i.classes,...t.classes});const a=e.store.generateMacroIds(["line","from","to"],i.id);return"pd"===o?(void 0===i.d&&(i.d=10*e.scale),e.paths[a.line]=i.path.offset(i.d).attr("class",i.classes.line).addText(i.text||e.units(i.path.length()),i.classes.text),i.noStartMarker||e.paths[a.line].attributes.set("marker-start","url(#dimensionFrom)"),i.noEndMarker||e.paths[a.line].attributes.set("marker-end","url(#dimensionTo)"),D(e,i.path.start(),e.paths[a.line].start(),a.from),D(e,i.path.end(),e.paths[a.line].end(),a.to)):e.paths[a.line]=function(t,e,o,{Path:i,units:a}){const s=(new i).move(t).line(e).attr("class","mark").attr("data-text",o.text||a(t.dist(e))).attr("data-text-class","fill-mark center").attr("data-macro-id",o.id);return o.noStartMarker||s.attributes.set("marker-start","url(#dimensionFrom)"),o.noEndMarker||s.attributes.set("marker-end","url(#dimensionTo)"),s}(O[o](i,"from",e,a.from),O[o](i,"to",e,a.to),i,e),e.store.storeMacroIds(i.id,{paths:a}),e.store.getMacroIds(i.id)},I=function(t=A.id,{store:e,part:o},i){return e.removeMacroNodes(t,i,o)},N=function({store:t,part:e},o){const i=t.get(["parts",e.name,"macros",o,"ids"],{});for(const a in i)t.removeMacroNodes(a,o,e)},M={hd:(t,e)=>E(t,e,"hd"),ld:(t,e)=>E(t,e,"ld"),vd:(t,e)=>E(t,e,"vd"),pd:(t,e)=>E(t,e,"pd"),rmhd:(t,e)=>I(t,e,"hd"),rmld:(t,e)=>I(t,e,"ld"),rmvd:(t,e)=>I(t,e,"vd"),rmpd:(t,e)=>I(t,e,"pd"),rmahd:(t,e)=>N(e,"hd"),rmald:(t,e)=>N(e,"ld"),rmavd:(t,e)=>N(e,"vd"),rmapd:(t,e)=>N(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:i,complete:a,store:s,log:n}){if(!a&&!t.force)return;const r={..._,...t,classes:_.classes};t.classes&&(r.classes={...r.classes,...t.classes}),r.from&&"function"==typeof r.from.attr||(n.warn("Grainline macro called without a valid from point. Using (0,0) for from."),r.from=new i(0,0)),r.to&&"function"==typeof r.to.attr||(n.warn("Grainline macro called without a valid to point. Using (666,666) for to."),r.to=new i(666,666)),s.cutlist.setGrain(r.from.angle(r.to),"grainline");const l=s.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),s.storeMacroIds(r.id,{paths:l}),s.getMacroIds(r.id)},rmgrainline:(t=_.id,{store:e,part:o})=>("grainline"===e.cutlist.getGrainOrigin()&&e.cutlist.removeGrain(),e.removeMacroNodes(t,"grainline",o))},Y={classes:{arrow:"note",from:"note",to:"note dashed"},id:"pleat",margin:35,reverse:!1},U=[{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`}],z={pleat:function(t,{paths:e,Path:o,log:i,Point:a,complete:s,scale:n,store:r}){if(!s&&!t.force)return;const l={...Y,...t,classes:Y.classes};t.classes&&(l.classes={...l.classes,...t.classes}),l.from&&"function"==typeof l.from.attr||(i.warn("Pleat macro called without a valid from point. Using (0,0) for from."),l.from=new a(0,0)),l.to&&"function"==typeof l.to.attr||(i.warn("Pleat macro called without a valid to point. Using (666,666) for to."),l.to=new a(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*n),h=l.from.shift(l.from.shiftTowards(l.to,.1).angle(l.from)+270,l.margin*n);return e[c.from]=(new o).move(l.from).line(h).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(h,.25)).line(l.to.shiftFractionTowards(h,.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=Y.id,{store:e,part:o})=>e.removeMacroNodes(t,"rmpleat",o)},J={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"},$=[{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>`}],X={sewtogether:function(t,{paths:e,Path:o,log:i,Point:a,complete:s,sa:n,store:r}){if(!s&&!t.force)return;const l={...J,...t,classes:J.classes};t.classes&&(l.classes={...l.classes,...t.classes}),l.from&&"function"==typeof l.from.attr||(i.warn("Sewtogether macro called without a valid from point. Using (0,0) for from."),l.from=new a(0,0)),l.to&&"function"==typeof l.to.attr||(i.warn("Sewtogether macro called without a valid to point. Using (666,666) for to."),l.to=new a(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),h=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,h,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+(n?180:0),n||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=J.id,{store:e,part:o})=>e.removeMacroNodes(t,"sewtogether",o)},Q=["plugins","plugin-annotations","flags"],K=[["flag.info",(t,e)=>V("info",t,e)],["flag.tip",(t,e)=>V("tip",t,e)],["flag.note",(t,e)=>V("note",t,e)],["flag.warn",(t,e)=>V("warn",t,e)],["flag.fixme",(t,e)=>V("fixme",t,e)],["flag.error",(t,e)=>V("error",t,e)],["flag.preset",(t,e)=>V("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 V(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([...Q,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([...Q,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:i.id,version:i.r,hooks:{preRender:[function(t){const e=[...s,...F,...H,...j,...r,...l,...U,...$];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],i=o.get(["cutlist",e],{});o.set(["cutlist",t.activePart],{...i})}]},macros:{...p,...d,...b,...w,...S,...W,...M,...G,...z,...X,...P},store:[...C,...K]},et=tt,ot=a}}]);

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.